/** * This file was auto-generated by Fern from our API Definition. */ import * as core from '../../../../core'; import * as environments from '../../../../environments'; import * as Truvity from '../../../index'; export declare namespace Files { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey?: core.Supplier; /** Additional headers to include in requests. */ headers?: Record | undefined>; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } } /** * The API to manage files. */ export declare class Files { protected readonly _options: Files.Options; constructor(_options?: Files.Options); /** * Creates File's resource with **blob_id**. * * To get **blob_id** call [Upload](#tag/files/operation/FileUpload) first. * * @param {Truvity.FileCreateRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.ConflictError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileCreate({ * blobId: "blob_id" * }) */ fileCreate(request: Truvity.FileCreateRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileCreate; /** * Search for Files with extended filters capabilities. * * @param {Truvity.FileSearchRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileSearch() */ fileSearch(request?: Truvity.FileSearchRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileSearch; /** * Initiates a File blob upload, returning a pre-signed S3 URL. Response contains: * * - **blob_id** (required for File creation) * * - **upload_uri** (pre-signed URL for upload) * * - **timeout** (expiration in seconds). * * @param {Truvity.FileUploadRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileUpload() */ fileUpload(request?: Truvity.FileUploadRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileUpload; /** * Get the latest version of File. * * @param {string} id - The ID of the resource. * @param {Truvity.FileLatestRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileLatest("id") */ fileLatest(id: string, request?: Truvity.FileLatestRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileLatest; /** * Delete File's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.FileDeleteRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileDelete("id", { * ifMatch: "If-Match" * }) */ fileDelete(id: string, request: Truvity.FileDeleteRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileDelete; /** * Update annotations of File's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.FileUpdateAnnotationsRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileUpdateAnnotations("id", { * ifMatch: "If-Match", * annotations: { * "key": "value" * } * }) */ fileUpdateAnnotations(id: string, request: Truvity.FileUpdateAnnotationsRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileUpdateAnnotations; /** * Update labels of File's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.FileUpdateLabelsRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileUpdateLabels("id", { * ifMatch: "If-Match", * labels: { * "key": "value" * } * }) */ fileUpdateLabels(id: string, request: Truvity.FileUpdateLabelsRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileUpdateLabels; /** * Restore File's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.FileRestoreRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileRestore("id", { * ifMatch: "If-Match" * }) */ fileRestore(id: string, request: Truvity.FileRestoreRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileRestore; /** * History of the File's resources. * * @param {string} id - The ID of the resource. * @param {Truvity.FileHistoryRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileHistory("id") */ fileHistory(id: string, request?: Truvity.FileHistoryRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileHistory; /** * Read the specific version of the File's resource. * * @param {string} id - The ID of the resource. * @param {number} revision - The revision of the resource. * @param {Truvity.FileRevisionRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.files.fileRevision("id", 1) */ fileRevision(id: string, revision: number, request?: Truvity.FileRevisionRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileRevision; /** * Download of File's blob. * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} */ fileDownload(id: string, revision: number, request?: Truvity.FileDownloadRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __fileDownload; protected _getCustomAuthorizationHeaders(): Promise<{ 'X-API-KEY': string | undefined; }>; } //# sourceMappingURL=Client.d.ts.map