Interface ExtensionsAPI

interface ExtensionsAPI {
    clearCache: () => void;
    deleteExtension: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteExtensionHttpResponse>;
    downloadExtension: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DownloadExtensionHttpResponse>;
    downloadFileFromExtension: (
        id: string,
        filepath: string,
        options?: ApiCallOptions,
    ) => Promise<DownloadFileFromExtensionHttpResponse>;
    getExtension: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<GetExtensionHttpResponse>;
    getExtensions: (
        options?: ApiCallOptions,
    ) => Promise<GetExtensionsHttpResponse>;
    patchExtension: (
        id: string,
        body: { data?: Extension; file?: BodyInit },
        options?: ApiCallOptions,
    ) => Promise<PatchExtensionHttpResponse>;
    uploadExtension: (
        body: { data?: Extension; file?: BodyInit },
        options?: ApiCallOptions,
    ) => Promise<UploadExtensionHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for extensions api requests.

Type declaration

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

      Returns void

deleteExtension: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DeleteExtensionHttpResponse>

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

Type declaration

Extension identifier or its qextFilename.

DeleteExtensionHttpError

downloadExtension: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DownloadExtensionHttpResponse>

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

Type declaration

Extension identifier or its qextFilename.

DownloadExtensionHttpError

downloadFileFromExtension: (
    id: string,
    filepath: string,
    options?: ApiCallOptions,
) => Promise<DownloadFileFromExtensionHttpResponse>

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

Type declaration

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

      Parameters

      • id: string

        Extension identifier or its qextFilename.

      • filepath: string

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

      • Optionaloptions: ApiCallOptions

      Returns Promise<DownloadFileFromExtensionHttpResponse>

      DownloadFileFromExtensionHttpError

Extension identifier or its qextFilename.

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

DownloadFileFromExtensionHttpError

getExtension: (
    id: string,
    options?: ApiCallOptions,
) => Promise<GetExtensionHttpResponse>

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

Type declaration

Extension identifier or its qextFilename.

GetExtensionHttpError

getExtensions: (options?: ApiCallOptions) => Promise<GetExtensionsHttpResponse>

Lists all imported extensions in the tenant.

Type declaration

GetExtensionsHttpError

patchExtension: (
    id: string,
    body: { data?: Extension; file?: BodyInit },
    options?: ApiCallOptions,
) => Promise<PatchExtensionHttpResponse>

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

Type declaration

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

      Parameters

      • id: string

        Extension identifier or its qextFilename.

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

        an object with the body content

        • Optionaldata?: Extension

          The extension model.

        • Optionalfile?: BodyInit

          Extension archive.

      • Optionaloptions: ApiCallOptions

      Returns Promise<PatchExtensionHttpResponse>

      PatchExtensionHttpError

Extension identifier or its qextFilename.

an object with the body content

PatchExtensionHttpError

uploadExtension: (
    body: { data?: Extension; file?: BodyInit },
    options?: ApiCallOptions,
) => Promise<UploadExtensionHttpResponse>

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

Type declaration

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

      Parameters

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

        an object with the body content

        • Optionaldata?: Extension

          The extension model.

        • Optionalfile?: BodyInit

          Extension archive.

      • Optionaloptions: ApiCallOptions

      Returns Promise<UploadExtensionHttpResponse>

      UploadExtensionHttpError

an object with the body content

UploadExtensionHttpError