Interface ReportTemplatesAPI

interface ReportTemplatesAPI {
    clearCache: () => void;
    createReportTemplate: (
        body: CreateTemplateRequest,
        options?: ApiCallOptions,
    ) => Promise<CreateReportTemplateHttpResponse>;
    deleteReportTemplate: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteReportTemplateHttpResponse>;
    downloadReportTemplate: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DownloadReportTemplateHttpResponse>;
    getReportTemplate: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<GetReportTemplateHttpResponse>;
    getReportTemplates: (
        query: {
            limit?: number;
            name?: string;
            ownerId?: string;
            skip?: number;
            sort?: (
                | "type"
                | "name"
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt"
                | "createdAt"
                | "updatedAt"
                | "+type"
                | "-type"
            )[];
            sourceAppId?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetReportTemplatesHttpResponse>;
    patchReportTemplate: (
        id: string,
        body: Operation[],
        options?: ApiCallOptions,
    ) => Promise<PatchReportTemplateHttpResponse>;
    updateReportTemplate: (
        id: string,
        body: UpdateTemplateRequest,
        options?: ApiCallOptions,
    ) => Promise<UpdateReportTemplateHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for report-templates api requests.

Type declaration

    • (): void
    • Clears the cache for report-templates api requests.

      Returns void

createReportTemplate: (
    body: CreateTemplateRequest,
    options?: ApiCallOptions,
) => Promise<CreateReportTemplateHttpResponse>

Create a new report template.

Type declaration

an object with the body content

CreateReportTemplateHttpError

deleteReportTemplate: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DeleteReportTemplateHttpResponse>

Delete the specified report template.

Type declaration

The ID of the report template to delete.

DeleteReportTemplateHttpError

downloadReportTemplate: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DownloadReportTemplateHttpResponse>

Download the template file of the specified report template

Type declaration

The ID of the report template.

DownloadReportTemplateHttpError

getReportTemplate: (
    id: string,
    options?: ApiCallOptions,
) => Promise<GetReportTemplateHttpResponse>

Get descriptive info for the specified report template.

Type declaration

The ID of the report template.

GetReportTemplateHttpError

getReportTemplates: (
    query: {
        limit?: number;
        name?: string;
        ownerId?: string;
        skip?: number;
        sort?: (
            | "type"
            | "name"
            | "-name"
            | "+name"
            | "+createdAt"
            | "-createdAt"
            | "+updatedAt"
            | "-updatedAt"
            | "createdAt"
            | "updatedAt"
            | "+type"
            | "-type"
        )[];
        sourceAppId?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetReportTemplatesHttpResponse>

Get descriptive info for the specified templates.

Type declaration

    • (
          query: {
              limit?: number;
              name?: string;
              ownerId?: string;
              skip?: number;
              sort?: (
                  | "type"
                  | "name"
                  | "-name"
                  | "+name"
                  | "+createdAt"
                  | "-createdAt"
                  | "+updatedAt"
                  | "-updatedAt"
                  | "createdAt"
                  | "updatedAt"
                  | "+type"
                  | "-type"
              )[];
              sourceAppId?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetReportTemplatesHttpResponse>
    • Get descriptive info for the specified templates.

      Parameters

      • query: {
            limit?: number;
            name?: string;
            ownerId?: string;
            skip?: number;
            sort?: (
                | "type"
                | "name"
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt"
                | "createdAt"
                | "updatedAt"
                | "+type"
                | "-type"
            )[];
            sourceAppId?: string;
        }

        an object with query parameters

        • Optionallimit?: number

          If present, restrict the number of returned items to this value.

        • Optionalname?: string

          Template name to search and filter for. Case-insensitive open search with wildcards both as prefix and suffix.

        • OptionalownerId?: string

          Return the templates for the specified owner.

        • Optionalskip?: number

          If present, skip this number of the returned values in the result set (facilitates paging).

        • Optionalsort?: (
              | "type"
              | "name"
              | "-name"
              | "+name"
              | "+createdAt"
              | "-createdAt"
              | "+updatedAt"
              | "-updatedAt"
              | "createdAt"
              | "updatedAt"
              | "+type"
              | "-type"
          )[]

          Field to sort by. Prefix with +/- to indicate ascending/descending. By default, the sort order is ascending.

        • OptionalsourceAppId?: string

          Return the templates that are using the specified app as data source.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetReportTemplatesHttpResponse>

      GetReportTemplatesHttpError

an object with query parameters

GetReportTemplatesHttpError

patchReportTemplate: (
    id: string,
    body: Operation[],
    options?: ApiCallOptions,
) => Promise<PatchReportTemplateHttpResponse>

Patch an existing report template.

Type declaration

The ID of the report template to patch.

an object with the body content

PatchReportTemplateHttpError

updateReportTemplate: (
    id: string,
    body: UpdateTemplateRequest,
    options?: ApiCallOptions,
) => Promise<UpdateReportTemplateHttpResponse>

Update an existing report template.

Type declaration

The ID of the report template to update.

an object with the body content

UpdateReportTemplateHttpError