import { AnyObject } from '@truvity/js-core__utils'; import { CredentialDto } from '@truvity/widget__jsonld'; export declare type AnyDid = string; export declare type WalletDid = AnyDid; export declare type EntityDid = AnyDid; export declare type CredentialDid = AnyDid; export declare type DraftNotFoundError = { code: 'ERRDRAFTNOTFOUND'; draftId: CredentialDid; }; export declare type DraftRevisionMissmatchError = { code: 'ERRDRAFTREVISIONMISSMATCH'; draftId: CredentialDid; }; export declare type CredentialNotFoundError = { code: 'ERRCREDENTIALNOTFOUND'; credentialId: CredentialDid; }; export declare type CredentialNotSupportedError = { code: 'ERRCREDENTIALNOTSUPPORTED'; credentialId: CredentialDid; }; export declare type NoAccessError = { code: 'ERRNOACCESS'; }; export declare type UnknownError = { code: 'ERRUNKNOWN'; }; export declare type WidgetNetworkErrors = NoAccessError | UnknownError; export declare type ViewWidgetErrors = CredentialNotFoundError | CredentialNotSupportedError | WidgetNetworkErrors; export declare type EditWidgetErrors = DraftNotFoundError | DraftRevisionMissmatchError | CredentialNotFoundError | CredentialNotSupportedError | WidgetNetworkErrors; export declare type VcPreview = { Preview: string; VcDid: CredentialDid; }; declare type CredentialPayload = CredentialDto & { revision: number; }; export declare type WidgetViewApi = { getCredentialSchema: (credentialId: CredentialDid, walletDid: WalletDid, entityDid: EntityDid) => Promise; getCredential: (credentialId: CredentialDid, walletDid: WalletDid, entityDid: EntityDid) => Promise; }; declare type CredentialUpdatePayload = { claims: AnyObject; revision: number; }; export declare type WidgetEditApi = WidgetViewApi & { updateCredential: (draftId: CredentialDid, walletDid: WalletDid, entityDid: EntityDid, payload: CredentialUpdatePayload) => Promise; }; export declare type WalletViewApi = { getPresignedDownloadUrlV1: (url: string, walletDid: WalletDid, entityDid: EntityDid) => Promise<{ DownloadUrl: string; }>; }; export declare type WalletEditApi = WalletViewApi & { getPresignedUploadUrlV1: (walletDid: WalletDid, entityDid: EntityDid) => Promise<{ FileDid: AnyDid; UploadURL: string; }>; finalizeUploadV1: (fileDid: AnyDid, walletDid: WalletDid, entityDid: EntityDid) => Promise; }; export {}; //# sourceMappingURL=types.d.ts.map