Interface ThemesAPI

interface ThemesAPI {
    clearCache: () => void;
    deleteTheme: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteThemeHttpResponse>;
    downloadFileFromTheme: (
        id: string,
        filepath: string,
        options?: ApiCallOptions,
    ) => Promise<DownloadFileFromThemeHttpResponse>;
    downloadTheme: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DownloadThemeHttpResponse>;
    getTheme: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<GetThemeHttpResponse>;
    getThemes: (options?: ApiCallOptions) => Promise<GetThemesHttpResponse>;
    patchTheme: (
        id: string,
        body: { data?: Theme; file?: BodyInit },
        options?: ApiCallOptions,
    ) => Promise<PatchThemeHttpResponse>;
    uploadTheme: (
        body: { data?: Theme; file?: BodyInit },
        options?: ApiCallOptions,
    ) => Promise<UploadThemeHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for themes api requests.

Type declaration

    • (): void
    • Clears the cache for themes api requests.

      Returns void

deleteTheme: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DeleteThemeHttpResponse>

Deletes a specific theme matching either theme ID or theme name.

Type declaration

Theme identifier or its qextFilename.

DeleteThemeHttpError

downloadFileFromTheme: (
    id: string,
    filepath: string,
    options?: ApiCallOptions,
) => Promise<DownloadFileFromThemeHttpResponse>

Downloads a file from the theme matching either theme ID or theme name, identified by the file path within the imported extension.

Type declaration

    • (
          id: string,
          filepath: string,
          options?: ApiCallOptions,
      ): Promise<DownloadFileFromThemeHttpResponse>
    • Downloads a file from the theme matching either theme ID or theme name, identified by the file path within the imported extension.

      Parameters

      • id: string

        Theme identifier or its qextFilename.

      • filepath: string

        Path to the file location within the specified theme archive. Folders separated with forward slashes.

      • Optionaloptions: ApiCallOptions

      Returns Promise<DownloadFileFromThemeHttpResponse>

      DownloadFileFromThemeHttpError

Theme identifier or its qextFilename.

Path to the file location within the specified theme archive. Folders separated with forward slashes.

DownloadFileFromThemeHttpError

downloadTheme: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DownloadThemeHttpResponse>

Downloads all files in the theme matching either theme ID or theme name as a .zip archive.

Type declaration

Theme identifier or its qextFilename

DownloadThemeHttpError

getTheme: (
    id: string,
    options?: ApiCallOptions,
) => Promise<GetThemeHttpResponse>

Returns a specific theme matching either theme ID or theme name.

Type declaration

Theme identifier or its qextFilename

GetThemeHttpError

getThemes: (options?: ApiCallOptions) => Promise<GetThemesHttpResponse>

Lists all imported themes in the tenant.

Type declaration

GetThemesHttpError

patchTheme: (
    id: string,
    body: { data?: Theme; file?: BodyInit },
    options?: ApiCallOptions,
) => Promise<PatchThemeHttpResponse>

Updates a specific theme matching either theme ID or theme name. Accepts either provided file or data object.

Type declaration

    • (
          id: string,
          body: { data?: Theme; file?: BodyInit },
          options?: ApiCallOptions,
      ): Promise<PatchThemeHttpResponse>
    • Updates a specific theme matching either theme ID or theme name. Accepts either provided file or data object.

      Parameters

      • id: string

        Theme identifier or its qextFilename.

      • body: { data?: Theme; file?: BodyInit }

        an object with the body content

        • Optionaldata?: Theme

          The theme model.

        • Optionalfile?: BodyInit

          Theme archive.

      • Optionaloptions: ApiCallOptions

      Returns Promise<PatchThemeHttpResponse>

      PatchThemeHttpError

Theme identifier or its qextFilename.

an object with the body content

PatchThemeHttpError

uploadTheme: (
    body: { data?: Theme; file?: BodyInit },
    options?: ApiCallOptions,
) => Promise<UploadThemeHttpResponse>

Creates a new theme. Accepts either provided file or data object. The name of the new theme must be different to any existing themes.

Type declaration

    • (
          body: { data?: Theme; file?: BodyInit },
          options?: ApiCallOptions,
      ): Promise<UploadThemeHttpResponse>
    • Creates a new theme. Accepts either provided file or data object. The name of the new theme must be different to any existing themes.

      Parameters

      • body: { data?: Theme; file?: BodyInit }

        an object with the body content

        • Optionaldata?: Theme

          The theme model.

        • Optionalfile?: BodyInit

          Theme archive.

      • Optionaloptions: ApiCallOptions

      Returns Promise<UploadThemeHttpResponse>

      UploadThemeHttpError

an object with the body content

UploadThemeHttpError