UNPKG

@affinidi-tdk/credential-verification-client

Version:

Affinidi TDK typescript client for Affinidi CREDENTIAL VERIFICATION

484 lines (483 loc) 18.5 kB
/** * VerificationService * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * Contact: info@affinidi.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import type { RequestArgs } from './base'; import { BaseAPI } from './base'; /** * * @export * @interface InvalidParameterError */ export interface InvalidParameterError { /** * * @type {string} * @memberof InvalidParameterError */ name: InvalidParameterErrorNameEnum; /** * * @type {string} * @memberof InvalidParameterError */ message: InvalidParameterErrorMessageEnum; /** * * @type {number} * @memberof InvalidParameterError */ httpStatusCode: InvalidParameterErrorHttpStatusCodeEnum; /** * * @type {string} * @memberof InvalidParameterError */ traceId: string; /** * * @type {Array<NotFoundErrorDetailsInner>} * @memberof InvalidParameterError */ details?: Array<NotFoundErrorDetailsInner>; } export declare const InvalidParameterErrorNameEnum: { readonly InvalidParameterError: "InvalidParameterError"; }; export type InvalidParameterErrorNameEnum = (typeof InvalidParameterErrorNameEnum)[keyof typeof InvalidParameterErrorNameEnum]; export declare const InvalidParameterErrorMessageEnum: { readonly InvalidParameterParam: "Invalid parameter: ${param}."; }; export type InvalidParameterErrorMessageEnum = (typeof InvalidParameterErrorMessageEnum)[keyof typeof InvalidParameterErrorMessageEnum]; export declare const InvalidParameterErrorHttpStatusCodeEnum: { readonly NUMBER_400: 400; }; export type InvalidParameterErrorHttpStatusCodeEnum = (typeof InvalidParameterErrorHttpStatusCodeEnum)[keyof typeof InvalidParameterErrorHttpStatusCodeEnum]; /** * * @export * @interface NotFoundError */ export interface NotFoundError { /** * * @type {string} * @memberof NotFoundError */ name: NotFoundErrorNameEnum; /** * * @type {string} * @memberof NotFoundError */ message: NotFoundErrorMessageEnum; /** * * @type {number} * @memberof NotFoundError */ httpStatusCode: NotFoundErrorHttpStatusCodeEnum; /** * * @type {string} * @memberof NotFoundError */ traceId: string; /** * * @type {Array<NotFoundErrorDetailsInner>} * @memberof NotFoundError */ details?: Array<NotFoundErrorDetailsInner>; } export declare const NotFoundErrorNameEnum: { readonly NotFoundError: "NotFoundError"; }; export type NotFoundErrorNameEnum = (typeof NotFoundErrorNameEnum)[keyof typeof NotFoundErrorNameEnum]; export declare const NotFoundErrorMessageEnum: { readonly NotFoundParam: "Not found: ${param}."; }; export type NotFoundErrorMessageEnum = (typeof NotFoundErrorMessageEnum)[keyof typeof NotFoundErrorMessageEnum]; export declare const NotFoundErrorHttpStatusCodeEnum: { readonly NUMBER_404: 404; }; export type NotFoundErrorHttpStatusCodeEnum = (typeof NotFoundErrorHttpStatusCodeEnum)[keyof typeof NotFoundErrorHttpStatusCodeEnum]; /** * * @export * @interface NotFoundErrorDetailsInner */ export interface NotFoundErrorDetailsInner { /** * * @type {string} * @memberof NotFoundErrorDetailsInner */ issue: string; /** * * @type {string} * @memberof NotFoundErrorDetailsInner */ field?: string; /** * * @type {string} * @memberof NotFoundErrorDetailsInner */ value?: string; /** * * @type {string} * @memberof NotFoundErrorDetailsInner */ location?: string; } /** * Request model of /verify-vcs * @export * @interface VerifyCredentialInput */ export interface VerifyCredentialInput { /** * List of VCs * @type {Array<object>} * @memberof VerifyCredentialInput */ verifiableCredentials: Array<object>; /** * Dynamic model * @type {{ [key: string]: any; }} * @memberof VerifyCredentialInput */ issuerDidDocument?: { [key: string]: any; }; } /** * Response model of /verify-vcs * @export * @interface VerifyCredentialOutput */ export interface VerifyCredentialOutput { /** * Errors of the VCs failed verification * @type {Array<string>} * @memberof VerifyCredentialOutput */ errors: Array<string>; /** * Verification result * @type {boolean} * @memberof VerifyCredentialOutput */ isValid: boolean; } /** * Request model of /v2/verify-vcs * @export * @interface VerifyCredentialV2Input */ export interface VerifyCredentialV2Input { /** * List of JWT VC strings * @type {Array<string>} * @memberof VerifyCredentialV2Input */ jwtVcs?: Array<string>; /** * List of LDP VC objects * @type {Array<{ [key: string]: any; }>} * @memberof VerifyCredentialV2Input */ ldpVcs?: Array<{ [key: string]: any; }>; } /** * Request model of /verify-vp * @export * @interface VerifyPresentationInput */ export interface VerifyPresentationInput { /** * * @type {object} * @memberof VerifyPresentationInput */ verifiablePresentation?: object; /** * * @type {object} * @memberof VerifyPresentationInput */ signedPresentation?: object; /** * * @type {object} * @memberof VerifyPresentationInput */ presentationDefinition?: object; /** * * @type {object} * @memberof VerifyPresentationInput */ presentationSubmission?: object; /** * * @type {object} * @memberof VerifyPresentationInput */ dcqlQuery?: object; /** * * @type {string} * @memberof VerifyPresentationInput */ challenge?: string; } /** * Response model of /verify-vp * @export * @interface VerifyPresentationOutput */ export interface VerifyPresentationOutput { /** * Error of the verification * @type {Array<string>} * @memberof VerifyPresentationOutput */ errors: Array<string>; /** * Verification result * @type {boolean} * @memberof VerifyPresentationOutput */ isValid: boolean; } /** * Request model of /v2/verify-vp * @export * @interface VerifyPresentationV2Input */ export interface VerifyPresentationV2Input { /** * * @type {object} * @memberof VerifyPresentationV2Input */ verifiablePresentation?: object; /** * * @type {VerifyPresentationV2InputPexQuery} * @memberof VerifyPresentationV2Input */ pexQuery?: VerifyPresentationV2InputPexQuery; /** * DCQL (Digital Credentials Query Language) Query used to verify that the credentials in the Verifiable Presentation match the specified query requirements. Currently supports only ldp_vc format credentials. Developers should implement additional business rule validation on top of the verification results returned by this service. * @type {{ [key: string]: any; }} * @memberof VerifyPresentationV2Input */ dcqlQuery?: { [key: string]: any; }; /** * Optional challenge string for domain/challenge verification * @type {string} * @memberof VerifyPresentationV2Input */ challenge?: string; /** * Optional domain for verification. Array of domain strings as per W3C VP standard * @type {Array<string>} * @memberof VerifyPresentationV2Input */ domain?: Array<string>; } /** * Presentation Exchange Query containing presentation definition and submission * @export * @interface VerifyPresentationV2InputPexQuery */ export interface VerifyPresentationV2InputPexQuery { /** * Presentation definition for the verification request * @type {object} * @memberof VerifyPresentationV2InputPexQuery */ presentationDefinition?: object; /** * Presentation submission for the verification request * @type {object} * @memberof VerifyPresentationV2InputPexQuery */ presentationSubmission?: object; } /** * DefaultApi - axios parameter creator * @export */ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => { /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialInput} verifyCredentialInput VerifyCredentials * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyCredentials: (verifyCredentialInput: VerifyCredentialInput, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialV2Input} verifyCredentialV2Input Request body for verifying VCs with separate JWT and LDP arrays * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyCredentialsV2: (verifyCredentialV2Input: VerifyCredentialV2Input, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Verifying Verifiable Presentation (signatures) `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationInput} verifyPresentationInput VerifyPresentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyPresentation: (verifyPresentationInput: VerifyPresentationInput, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Verifying Verifiable Presentation (signatures) Uses Presentation Exchange Query (pexQuery) structure for presentation definition and submission. Supports optional domain and challenge verification as per W3C VP standard. `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationV2Input} verifyPresentationV2Input VerifyPresentationV2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyPresentationV2: (verifyPresentationV2Input: VerifyPresentationV2Input, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * DefaultApi - functional programming interface * @export */ export declare const DefaultApiFp: (configuration?: Configuration) => { /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialInput} verifyCredentialInput VerifyCredentials * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyCredentials(verifyCredentialInput: VerifyCredentialInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyCredentialOutput>>; /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialV2Input} verifyCredentialV2Input Request body for verifying VCs with separate JWT and LDP arrays * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyCredentialsV2(verifyCredentialV2Input: VerifyCredentialV2Input, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyCredentialOutput>>; /** * Verifying Verifiable Presentation (signatures) `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationInput} verifyPresentationInput VerifyPresentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyPresentation(verifyPresentationInput: VerifyPresentationInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyPresentationOutput>>; /** * Verifying Verifiable Presentation (signatures) Uses Presentation Exchange Query (pexQuery) structure for presentation definition and submission. Supports optional domain and challenge verification as per W3C VP standard. `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationV2Input} verifyPresentationV2Input VerifyPresentationV2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyPresentationV2(verifyPresentationV2Input: VerifyPresentationV2Input, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyPresentationOutput>>; }; /** * DefaultApi - factory interface * @export */ export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialInput} verifyCredentialInput VerifyCredentials * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyCredentials(verifyCredentialInput: VerifyCredentialInput, options?: RawAxiosRequestConfig): AxiosPromise<VerifyCredentialOutput>; /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialV2Input} verifyCredentialV2Input Request body for verifying VCs with separate JWT and LDP arrays * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyCredentialsV2(verifyCredentialV2Input: VerifyCredentialV2Input, options?: RawAxiosRequestConfig): AxiosPromise<VerifyCredentialOutput>; /** * Verifying Verifiable Presentation (signatures) `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationInput} verifyPresentationInput VerifyPresentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyPresentation(verifyPresentationInput: VerifyPresentationInput, options?: RawAxiosRequestConfig): AxiosPromise<VerifyPresentationOutput>; /** * Verifying Verifiable Presentation (signatures) Uses Presentation Exchange Query (pexQuery) structure for presentation definition and submission. Supports optional domain and challenge verification as per W3C VP standard. `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationV2Input} verifyPresentationV2Input VerifyPresentationV2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ verifyPresentationV2(verifyPresentationV2Input: VerifyPresentationV2Input, options?: RawAxiosRequestConfig): AxiosPromise<VerifyPresentationOutput>; }; /** * DefaultApi - object-oriented interface * @export * @class DefaultApi * @extends {BaseAPI} */ export declare class DefaultApi extends BaseAPI { /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialInput} verifyCredentialInput VerifyCredentials * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ verifyCredentials(verifyCredentialInput: VerifyCredentialInput, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VerifyCredentialOutput, any>>; /** * Verifying Verifiable Credentials (signatures) `isValid` - true if all credentials verified `errors` contains list of error messages for invalid credentials. * @summary Verifying VC * @param {VerifyCredentialV2Input} verifyCredentialV2Input Request body for verifying VCs with separate JWT and LDP arrays * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ verifyCredentialsV2(verifyCredentialV2Input: VerifyCredentialV2Input, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VerifyCredentialOutput, any>>; /** * Verifying Verifiable Presentation (signatures) `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationInput} verifyPresentationInput VerifyPresentation * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ verifyPresentation(verifyPresentationInput: VerifyPresentationInput, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VerifyPresentationOutput, any>>; /** * Verifying Verifiable Presentation (signatures) Uses Presentation Exchange Query (pexQuery) structure for presentation definition and submission. Supports optional domain and challenge verification as per W3C VP standard. `isValid` - true if presentation verified `error` verificaction error. * @summary Verifying VP * @param {VerifyPresentationV2Input} verifyPresentationV2Input VerifyPresentationV2 * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ verifyPresentationV2(verifyPresentationV2Input: VerifyPresentationV2Input, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VerifyPresentationOutput, any>>; }