/** * 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 Presentations { 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 Verifiable Presentations. */ export declare class Presentations { protected readonly _options: Presentations.Options; constructor(_options?: Presentations.Options); /** * Generate an unsigned Verifiable Presentation in JSON-LD format from a list of Credentials. * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} */ presentationExport(request: Truvity.PresentationExportRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationExport; /** * Import a Verifiable Presentation's resource with **blob_id**. * * To get **blob_id** call [Upload](#tag/presentations/operation/PresentationUpload) first. * * @param {Truvity.PresentationImportRequest} request * @param {Presentations.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.presentations.presentationImport({ * blobId: "blob_id" * }) */ presentationImport(request: Truvity.PresentationImportRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationImport; /** * It's a handy call that wraps the following: * 1) [Exporting](#tag/presentations/operation/PresentationExport) an unsigned JSON-LD representation of a Verifiable Presentation. * 2) [Signing](#tag/keys/operation/PresentationSign) the created unsigned Presentation. * 3) [Importing](#tag/presentations/operation/PresentationImport) the signed Presentation. * * @param {Truvity.PresentationIssueRequest} request * @param {Presentations.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.presentations.presentationIssue({ * compositionType: "EMBED", * credentialIds: ["credential_ids"], * keyId: "key_id" * }) */ presentationIssue(request: Truvity.PresentationIssueRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationIssue; /** * Search for Presentations with extended filters capabilities. * * @param {Truvity.PresentationSearchRequest} request * @param {Presentations.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.presentations.presentationSearch() */ presentationSearch(request?: Truvity.PresentationSearchRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationSearch; /** * Initiates a Presentation blob upload, returning a pre-signed S3 URL. Response contains: * * - **blob_id** (required for Presentation creation) * * - **upload_uri** (pre-signed URL for upload) * * - **timeout** (expiration in seconds). * * @param {Truvity.PresentationUploadRequest} request * @param {Presentations.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.presentations.presentationUpload() */ presentationUpload(request?: Truvity.PresentationUploadRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationUpload; /** * Get the latest version of Presentation. * * @param {string} id - The ID of the resource. * @param {Truvity.PresentationLatestRequest} request * @param {Presentations.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.presentations.presentationLatest("id") */ presentationLatest(id: string, request?: Truvity.PresentationLatestRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationLatest; /** * Delete Presentation'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.PresentationDeleteRequest} request * @param {Presentations.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.presentations.presentationDelete("id", { * ifMatch: "If-Match" * }) */ presentationDelete(id: string, request: Truvity.PresentationDeleteRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationDelete; /** * Update annotations of Presentation'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.PresentationUpdateAnnotationsRequest} request * @param {Presentations.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.presentations.presentationUpdateAnnotations("id", { * ifMatch: "If-Match", * annotations: { * "key": "value" * } * }) */ presentationUpdateAnnotations(id: string, request: Truvity.PresentationUpdateAnnotationsRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationUpdateAnnotations; /** * Update labels of Presentation'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.PresentationUpdateLabelsRequest} request * @param {Presentations.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.presentations.presentationUpdateLabels("id", { * ifMatch: "If-Match", * labels: { * "key": "value" * } * }) */ presentationUpdateLabels(id: string, request: Truvity.PresentationUpdateLabelsRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationUpdateLabels; /** * Restore Presentation'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.PresentationRestoreRequest} request * @param {Presentations.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.presentations.presentationRestore("id", { * ifMatch: "If-Match" * }) */ presentationRestore(id: string, request: Truvity.PresentationRestoreRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationRestore; /** * History of the Presentation's resources. * * @param {string} id - The ID of the resource. * @param {Truvity.PresentationHistoryRequest} request * @param {Presentations.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.presentations.presentationHistory("id") */ presentationHistory(id: string, request?: Truvity.PresentationHistoryRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationHistory; /** * Read the specific version of the Presentation's resource. * * @param {string} id - The ID of the resource. * @param {number} revision - The revision of the resource. * @param {Truvity.PresentationRevisionRequest} request * @param {Presentations.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.presentations.presentationRevision("id", 1) */ presentationRevision(id: string, revision: number, request?: Truvity.PresentationRevisionRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationRevision; /** * Download of Presentation'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} */ presentationDownload(id: string, revision: number, request?: Truvity.PresentationDownloadRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationDownload; /** * Verify a Verifiable Presentation. * * @param {string} id - The ID of the resource. * @param {Truvity.PresentationVerifyRequest} request * @param {Presentations.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.presentations.presentationVerify("id") */ presentationVerify(id: string, request?: Truvity.PresentationVerifyRequest, requestOptions?: Presentations.RequestOptions): core.HttpResponsePromise; private __presentationVerify; protected _getCustomAuthorizationHeaders(): Promise<{ 'X-API-KEY': string | undefined; }>; } //# sourceMappingURL=Client.d.ts.map