Interface TempContentsAPI

interface TempContentsAPI {
    clearCache: () => void;
    downloadTempFile: (
        id: string,
        query: { inline?: string },
        options?: ApiCallOptions,
    ) => Promise<DownloadTempFileHttpResponse>;
    getTempFileDetails: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<GetTempFileDetailsHttpResponse>;
    uploadTempFile: (
        query: { filename?: string; ttl?: number },
        body: BodyInit,
        options?: ApiCallOptions,
    ) => Promise<UploadTempFileHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for temp-contents api requests.

Type declaration

    • (): void
    • Clears the cache for temp-contents api requests.

      Returns void

downloadTempFile: (
    id: string,
    query: { inline?: string },
    options?: ApiCallOptions,
) => Promise<DownloadTempFileHttpResponse>

This endpoint is used to retrieve a temporary content file. It returns a valid (200 OK) in case the file exists and the user is authorized to view the contents. It returns a 410 Gone if the file has expired and 404 Not Found if the criteria is not met.

Type declaration

    • (
          id: string,
          query: { inline?: string },
          options?: ApiCallOptions,
      ): Promise<DownloadTempFileHttpResponse>
    • This endpoint is used to retrieve a temporary content file. It returns a valid (200 OK) in case the file exists and the user is authorized to view the contents. It returns a 410 Gone if the file has expired and 404 Not Found if the criteria is not met.

      Parameters

      • id: string

        The temporary contents ID.

      • query: { inline?: string }

        an object with query parameters

        • Optionalinline?: string

          Set to "1" to download the file in inline mode. Useful for displaying a preview of the file in a browser.

      • Optionaloptions: ApiCallOptions

      Returns Promise<DownloadTempFileHttpResponse>

      DownloadTempFileHttpError

The temporary contents ID.

an object with query parameters

DownloadTempFileHttpError

getTempFileDetails: (
    id: string,
    options?: ApiCallOptions,
) => Promise<GetTempFileDetailsHttpResponse>

Retrieve a summary of the metadata associated with a temporary content resource. It returns a 200 OK with a model if the temporary resource is valid. It returns a 410 Gone if the file has expired and 404 Not Found if the criteria is not met.

Type declaration

    • (id: string, options?: ApiCallOptions): Promise<GetTempFileDetailsHttpResponse>
    • Retrieve a summary of the metadata associated with a temporary content resource. It returns a 200 OK with a model if the temporary resource is valid. It returns a 410 Gone if the file has expired and 404 Not Found if the criteria is not met.

      Parameters

      Returns Promise<GetTempFileDetailsHttpResponse>

      GetTempFileDetailsHttpError

The temporary contents ID.

GetTempFileDetailsHttpError

uploadTempFile: (
    query: { filename?: string; ttl?: number },
    body: BodyInit,
    options?: ApiCallOptions,
) => Promise<UploadTempFileHttpResponse>

Upload a file as a temporary content resource. It returns a 201 Created with a location header that contains the location of the created resource. If filename or TTL is not properly set, a 400 Bad request is returned. For internal issues, a 500 Internal Server Error is returned.

Type declaration

    • (
          query: { filename?: string; ttl?: number },
          body: BodyInit,
          options?: ApiCallOptions,
      ): Promise<UploadTempFileHttpResponse>
    • Upload a file as a temporary content resource. It returns a 201 Created with a location header that contains the location of the created resource. If filename or TTL is not properly set, a 400 Bad request is returned. For internal issues, a 500 Internal Server Error is returned.

      Parameters

      • query: { filename?: string; ttl?: number }

        an object with query parameters

        • Optionalfilename?: string

          The name of the file to upload.

        • Optionalttl?: number

          The TTL parameter is used to define the time-to-live for the content resource in seconds. It defaults to one hour (3600) if no input is provided. Max TTL is 259200 (3 days).'

      • body: BodyInit

        an object with the body content

      • Optionaloptions: ApiCallOptions

      Returns Promise<UploadTempFileHttpResponse>

      UploadTempFileHttpError

an object with query parameters

an object with the body content

UploadTempFileHttpError