UNPKG

@affinidi/internal-api-clients

Version:
247 lines (246 loc) 9.31 kB
import { DidAuthConstructorOptions, GetDidAuthParams } from '@affinidi/tools-openapi'; type ConstructorOptions = DidAuthConstructorOptions & { revocationUrl: string; }; type ReplaceFieldsWithAny<T> = { [key in keyof T]: any; }; declare const clientMethods: { GetRevocationListCredential: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData & { didAuthSession: { getResponseToken(createRequestToken: (did: string) => Promise<string>): Promise<string | undefined>; }; }, requestOptions: Omit<{ authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams?: undefined; pathParams: { readonly id: string; readonly issuerDid: string; }; }, "authorization">) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: { readonly id: string; readonly issuerDid: string; }; queryParams: undefined; requestBody: undefined; responseBody: { readonly id: string; readonly type: string[]; readonly issuer: string; readonly "@context": string[]; readonly credentialSubject: { readonly id: string; readonly type: string; readonly encodedList: string; }; readonly issuanceDate: string; readonly proof: { readonly type: string; readonly proofPurpose: string; readonly verificationMethod: string; readonly jws: string; readonly created?: string | null | undefined; }; }; }>>; BuildRevocationListStatus: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData & { didAuthSession: { getResponseToken(createRequestToken: (did: string) => Promise<string>): Promise<string | undefined>; }; }, requestOptions: Omit<{ authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly credentialId: string; readonly subjectDid: string; }; queryParams?: undefined; pathParams?: undefined; }, "authorization">) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly credentialId: string; readonly subjectDid: string; }; responseBody: { readonly revocationListCredential: { [x: string]: any; }; readonly credentialStatus: { readonly id: string; readonly type: string; readonly revocationListIndex: string; readonly revocationListCredential: string; }; }; }>>; RevokeCredential: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData & { didAuthSession: { getResponseToken(createRequestToken: (did: string) => Promise<string>): Promise<string | undefined>; }; }, requestOptions: Omit<{ authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly id: string; readonly revocationReason?: string | null | undefined; }; queryParams?: undefined; pathParams?: undefined; }, "authorization">) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly id: string; readonly revocationReason?: string | null | undefined; }; responseBody: { readonly revocationListCredential: string; }; }>>; PublishRevocationListCredential: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData & { didAuthSession: { getResponseToken(createRequestToken: (did: string) => Promise<string>): Promise<string | undefined>; }; }, requestOptions: Omit<{ authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly id: string; readonly type: string[]; readonly issuer: string; readonly "@context": string[]; readonly credentialSubject: { readonly id: string; readonly type: string; readonly encodedList: string; }; readonly issuanceDate: string; readonly proof: { readonly type: string; readonly proofPurpose: string; readonly verificationMethod: string; readonly jws: string; readonly created?: string | null | undefined; }; }; queryParams?: undefined; pathParams?: undefined; }, "authorization">) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly id: string; readonly type: string[]; readonly issuer: string; readonly "@context": string[]; readonly credentialSubject: { readonly id: string; readonly type: string; readonly encodedList: string; }; readonly issuanceDate: string; readonly proof: { readonly type: string; readonly proofPurpose: string; readonly verificationMethod: string; readonly jws: string; readonly created?: string | null | undefined; }; }; responseBody: { readonly id: string; readonly type: string[]; readonly issuer: string; readonly "@context": string[]; readonly credentialSubject: { readonly id: string; readonly type: string; readonly encodedList: string; }; readonly issuanceDate: string; readonly proof: { readonly type: string; readonly proofPurpose: string; readonly verificationMethod: string; readonly jws: string; readonly created?: string | null | undefined; }; }; }>>; }; export default class RevocationApiService { private readonly client; constructor(options: ConstructorOptions); buildRevocationListStatus(params: GetDidAuthParams<typeof clientMethods.BuildRevocationListStatus>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly credentialId: string; readonly subjectDid: string; }; responseBody: { readonly revocationListCredential: { [x: string]: any; }; readonly credentialStatus: { readonly id: string; readonly type: string; readonly revocationListIndex: string; readonly revocationListCredential: string; }; }; }>>; publishRevocationListCredential(params: ReplaceFieldsWithAny<GetDidAuthParams<typeof clientMethods.PublishRevocationListCredential>>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly id: string; readonly type: string[]; readonly issuer: string; readonly "@context": string[]; readonly credentialSubject: { readonly id: string; readonly type: string; readonly encodedList: string; }; readonly issuanceDate: string; readonly proof: { readonly type: string; readonly proofPurpose: string; readonly verificationMethod: string; readonly jws: string; readonly created?: string | null | undefined; }; }; responseBody: { readonly id: string; readonly type: string[]; readonly issuer: string; readonly "@context": string[]; readonly credentialSubject: { readonly id: string; readonly type: string; readonly encodedList: string; }; readonly issuanceDate: string; readonly proof: { readonly type: string; readonly proofPurpose: string; readonly verificationMethod: string; readonly jws: string; readonly created?: string | null | undefined; }; }; }>>; revokeCredential(params: GetDidAuthParams<typeof clientMethods.RevokeCredential>): Promise<{ body: { revocationListCredential: any; }; }>; } export {};