@affinidi/internal-api-clients
Version:
SDK core monorepo for affinity DID solution
618 lines (617 loc) • 27.1 kB
TypeScript
import { ClientOptions, GetParams } from '@affinidi/tools-openapi';
type ConstructorOptions = ClientOptions & {
verifierUrl: string;
};
declare const clientMethods: {
readonly ValidateJwt: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: {
authorization?: string | undefined;
storageRegion?: string | undefined;
params: {
readonly token: string;
};
queryParams?: undefined;
pathParams?: undefined;
}) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly token: string;
};
responseBody: {
readonly payload: string | {
[x: string]: any;
readonly jti?: string | undefined;
readonly exp?: string | number | undefined;
readonly iat?: string | number | undefined;
readonly iss?: string | undefined;
};
readonly isValid: boolean;
};
}>>;
readonly VerifyCredentialShareResponse: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: {
authorization?: string | undefined;
storageRegion?: string | undefined;
params: {
readonly credentialShareResponseToken: string;
readonly credentialShareRequestToken?: string | null | undefined;
readonly isHolderMustBeSubject?: boolean | null | undefined;
};
queryParams?: undefined;
pathParams?: undefined;
}) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly credentialShareResponseToken: string;
readonly credentialShareRequestToken?: string | null | undefined;
readonly isHolderMustBeSubject?: boolean | null | undefined;
};
responseBody: {
readonly jti: string;
readonly errors: string[];
readonly issuer: string;
readonly isValid: boolean;
readonly suppliedCredentials: {
[x: string]: any;
}[];
};
}>>;
readonly VerifyCredentials: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: {
authorization?: string | undefined;
storageRegion?: string | undefined;
params: {
readonly verifiableCredentials: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly issuerDidDocument?: {
[x: string]: any;
} | undefined;
};
queryParams?: undefined;
pathParams?: undefined;
}) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly verifiableCredentials: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly issuerDidDocument?: {
[x: string]: any;
} | undefined;
};
responseBody: {
readonly errors: string[];
readonly isValid: boolean;
};
}>>;
readonly VerifyPresentation: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: {
authorization?: string | undefined;
storageRegion?: string | undefined;
params: {
readonly verifiablePresentation?: {
readonly type: string[];
readonly "@context": string | {
[x: string]: any;
};
readonly holder: {
[x: string]: any;
};
readonly proof: {
[x: string]: any;
};
readonly verifiableCredential: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly id?: string | null | undefined;
} | undefined;
readonly signedPresentation?: {
readonly type: string[];
readonly "@context": string | {
[x: string]: any;
};
readonly holder: {
[x: string]: any;
};
readonly proof: {
[x: string]: any;
};
readonly verifiableCredential: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly id?: string | null | undefined;
} | undefined;
readonly challenge?: string | undefined;
};
queryParams?: undefined;
pathParams?: undefined;
}) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly verifiablePresentation?: {
readonly type: string[];
readonly "@context": string | {
[x: string]: any;
};
readonly holder: {
[x: string]: any;
};
readonly proof: {
[x: string]: any;
};
readonly verifiableCredential: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly id?: string | null | undefined;
} | undefined;
readonly signedPresentation?: {
readonly type: string[];
readonly "@context": string | {
[x: string]: any;
};
readonly holder: {
[x: string]: any;
};
readonly proof: {
[x: string]: any;
};
readonly verifiableCredential: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly id?: string | null | undefined;
} | undefined;
readonly challenge?: string | undefined;
};
responseBody: {
readonly isValid: boolean;
readonly error?: string | undefined;
readonly errors?: string[] | undefined;
};
}>>;
readonly BuildCredentialRequest: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: {
authorization?: string | undefined;
storageRegion?: string | undefined;
params: {
readonly credentialRequirements: {
readonly type: string[];
readonly constraints?: string[] | {
[x: string]: any;
}[] | undefined;
}[];
readonly audienceDid?: (string & Record<never, never>) | null | undefined;
readonly callbackUrl?: (string & Record<never, never>) | null | undefined;
readonly expiresAt?: (string & Record<never, never>) | null | undefined;
readonly nonce?: string | null | undefined;
readonly subjectDid?: (string & Record<never, never>) | null | undefined;
readonly issuerDid?: (string & Record<never, never>) | null | undefined;
};
queryParams?: undefined;
pathParams?: undefined;
}) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly credentialRequirements: {
readonly type: string[];
readonly constraints?: string[] | {
[x: string]: any;
}[] | undefined;
}[];
readonly audienceDid?: (string & Record<never, never>) | null | undefined;
readonly callbackUrl?: (string & Record<never, never>) | null | undefined;
readonly expiresAt?: (string & Record<never, never>) | null | undefined;
readonly nonce?: string | null | undefined;
readonly subjectDid?: (string & Record<never, never>) | null | undefined;
readonly issuerDid?: (string & Record<never, never>) | null | undefined;
};
responseBody: {
readonly credentialShareRequest: {
[x: string]: any;
};
};
}>>;
};
export default class VerifierApiService {
private readonly client;
constructor(options: ConstructorOptions);
buildCredentialRequest(params: GetParams<typeof clientMethods.BuildCredentialRequest>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly credentialRequirements: {
readonly type: string[];
readonly constraints?: string[] | {
[x: string]: any;
}[] | undefined;
}[];
readonly audienceDid?: (string & Record<never, never>) | null | undefined;
readonly callbackUrl?: (string & Record<never, never>) | null | undefined;
readonly expiresAt?: (string & Record<never, never>) | null | undefined;
readonly nonce?: string | null | undefined;
readonly subjectDid?: (string & Record<never, never>) | null | undefined;
readonly issuerDid?: (string & Record<never, never>) | null | undefined;
};
responseBody: {
readonly credentialShareRequest: {
[x: string]: any;
};
};
}>>;
verifyCredentials(params: GetParams<typeof clientMethods.VerifyCredentials>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly verifiableCredentials: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly issuerDidDocument?: {
[x: string]: any;
} | undefined;
};
responseBody: {
readonly errors: string[];
readonly isValid: boolean;
};
}>>;
verifyPresentation(params: GetParams<typeof clientMethods.VerifyPresentation>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly verifiablePresentation?: {
readonly type: string[];
readonly "@context": string | {
[x: string]: any;
};
readonly holder: {
[x: string]: any;
};
readonly proof: {
[x: string]: any;
};
readonly verifiableCredential: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly id?: string | null | undefined;
} | undefined;
readonly signedPresentation?: {
readonly type: string[];
readonly "@context": string | {
[x: string]: any;
};
readonly holder: {
[x: string]: any;
};
readonly proof: {
[x: string]: any;
};
readonly verifiableCredential: {
readonly type: string[];
readonly issuer: string;
readonly "@context": string | {
[x: string]: any;
};
readonly credentialSubject: {
[x: string]: any;
};
readonly issuanceDate: string;
readonly proof: {
readonly proofPurpose: string;
readonly verificationMethod: string;
readonly type?: string | null | undefined;
readonly nonce?: string | null | undefined;
readonly jws?: string | null | undefined;
readonly created?: string | null | undefined;
readonly proofValue?: string | null | undefined;
};
readonly id?: string | null | undefined;
readonly holder?: string | {
[x: string]: any;
} | null | undefined;
readonly expirationDate?: string | null | undefined;
readonly credentialStatus?: {
readonly id: string;
readonly type: string;
readonly revocationListIndex: string;
readonly revocationListCredential: string;
} | null | undefined;
readonly credentialSchema?: {
[x: string]: any;
readonly id: string;
readonly type: string;
} | undefined;
}[];
readonly id?: string | null | undefined;
} | undefined;
readonly challenge?: string | undefined;
};
responseBody: {
readonly isValid: boolean;
readonly error?: string | undefined;
readonly errors?: string[] | undefined;
};
}>>;
verifyCredentialShareResponse(params: GetParams<typeof clientMethods.VerifyCredentialShareResponse>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{
pathParams: undefined;
queryParams: undefined;
requestBody: {
readonly credentialShareResponseToken: string;
readonly credentialShareRequestToken?: string | null | undefined;
readonly isHolderMustBeSubject?: boolean | null | undefined;
};
responseBody: {
readonly jti: string;
readonly errors: string[];
readonly issuer: string;
readonly isValid: boolean;
readonly suppliedCredentials: {
[x: string]: any;
}[];
};
}>>;
}
export {};