UNPKG

@affinidi/internal-api-clients

Version:
573 lines (572 loc) 24.7 kB
import { ClientOptions, GetParams } from '@affinidi/tools-openapi'; type GetSignedCredentialOptions = { env?: Env; issuerUrl?: string; accessApiKey: string; apiKey?: string; }; type GetSignedCredentialRequest = { credentialOfferResponseToken: string; options: GetSignedCredentialOptions; }; type Env = 'dev' | 'staging' | 'prod'; type ConstructorOptions = ClientOptions & { keyStorageUrl: string; }; type DoesUserExistInput = { field: 'username' | 'email' | 'phone_number'; value: string; }; declare const clientMethods: { readonly StoreTemplate: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly username: string; readonly template: string; readonly subject?: string | null | undefined; readonly htmlTemplate?: string | null | undefined; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; readonly template: string; readonly subject?: string | null | undefined; readonly htmlTemplate?: string | null | undefined; }; responseBody: undefined; }>>; readonly DeleteTemplate: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly username: string; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; }; responseBody: undefined; }>>; readonly GetCredentialOffer: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams: { readonly env?: "dev" | "staging" | "prod" | undefined; }; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: { readonly env?: "dev" | "staging" | "prod" | undefined; }; requestBody: undefined; responseBody: { readonly offerToken: string; }; }>>; readonly GetSignedCredential: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly credentialOfferResponseToken: string; readonly options: { readonly accessApiKey: string | null; readonly env?: (("dev" | "staging" | "prod") & Record<never, never>) | null | undefined; readonly apiKey?: string | null | undefined; readonly issuerUrl?: string | null | undefined; } | null; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly credentialOfferResponseToken: string; readonly options: { readonly accessApiKey: string | null; readonly env?: (("dev" | "staging" | "prod") & Record<never, never>) | null | undefined; readonly apiKey?: string | null | undefined; readonly issuerUrl?: string | null | undefined; } | null; }; responseBody: { readonly signedCredentials: { [x: string]: any; }[]; }; }>>; readonly ReadMyKey: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams: { readonly tenantToken?: string | undefined; }; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: { readonly tenantToken?: string | undefined; }; requestBody: undefined; responseBody: { readonly encryptedSeed: string; }; }>>; readonly StoreMyKey: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly encryptedSeed: string; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly encryptedSeed: string; }; responseBody: { readonly encryptedSeed: string; }; }>>; readonly StoreInTruecallerUserList: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly profileTrueCaller: { [x: string]: any; readonly payload: string; readonly signature: string; readonly signatureAlgorithm: string; readonly email?: string | null | undefined; readonly avatarUrl?: string | null | undefined; readonly city?: string | null | undefined; readonly companyName?: string | null | undefined; readonly countryCode?: string | null | undefined; readonly facebookId?: string | null | undefined; readonly firstName?: string | undefined; readonly gender?: string | undefined; readonly isAmbassador?: boolean | undefined; readonly isBusiness?: boolean | undefined; readonly isVerified?: boolean | undefined; readonly jobTitle?: string | null | undefined; readonly lastName?: string | undefined; readonly phoneNumber?: string | undefined; readonly requestNonce?: string | undefined; readonly street?: string | null | undefined; readonly successful?: boolean | undefined; readonly twitterId?: string | null | undefined; readonly url?: string | null | undefined; readonly zipcode?: string | null | undefined; }; readonly env?: string | null | undefined; readonly expiredAt?: string | undefined; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly profileTrueCaller: { [x: string]: any; readonly payload: string; readonly signature: string; readonly signatureAlgorithm: string; readonly email?: string | null | undefined; readonly avatarUrl?: string | null | undefined; readonly city?: string | null | undefined; readonly companyName?: string | null | undefined; readonly countryCode?: string | null | undefined; readonly facebookId?: string | null | undefined; readonly firstName?: string | undefined; readonly gender?: string | undefined; readonly isAmbassador?: boolean | undefined; readonly isBusiness?: boolean | undefined; readonly isVerified?: boolean | undefined; readonly jobTitle?: string | null | undefined; readonly lastName?: string | undefined; readonly phoneNumber?: string | undefined; readonly requestNonce?: string | undefined; readonly street?: string | null | undefined; readonly successful?: boolean | undefined; readonly twitterId?: string | null | undefined; readonly url?: string | null | undefined; readonly zipcode?: string | null | undefined; }; readonly env?: string | null | undefined; readonly expiredAt?: string | undefined; }; responseBody: undefined; }>>; readonly AdminCreateConfirmedUser: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly username: string; readonly profileTrueCaller: { [x: string]: any; readonly payload: string; readonly signature: string; readonly signatureAlgorithm: string; readonly email?: string | null | undefined; readonly avatarUrl?: string | null | undefined; readonly city?: string | null | undefined; readonly companyName?: string | null | undefined; readonly countryCode?: string | null | undefined; readonly facebookId?: string | null | undefined; readonly firstName?: string | undefined; readonly gender?: string | undefined; readonly isAmbassador?: boolean | undefined; readonly isBusiness?: boolean | undefined; readonly isVerified?: boolean | undefined; readonly jobTitle?: string | null | undefined; readonly lastName?: string | undefined; readonly phoneNumber?: string | undefined; readonly requestNonce?: string | undefined; readonly street?: string | null | undefined; readonly successful?: boolean | undefined; readonly twitterId?: string | null | undefined; readonly url?: string | null | undefined; readonly zipcode?: string | null | undefined; }; readonly password: string; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; readonly profileTrueCaller: { [x: string]: any; readonly payload: string; readonly signature: string; readonly signatureAlgorithm: string; readonly email?: string | null | undefined; readonly avatarUrl?: string | null | undefined; readonly city?: string | null | undefined; readonly companyName?: string | null | undefined; readonly countryCode?: string | null | undefined; readonly facebookId?: string | null | undefined; readonly firstName?: string | undefined; readonly gender?: string | undefined; readonly isAmbassador?: boolean | undefined; readonly isBusiness?: boolean | undefined; readonly isVerified?: boolean | undefined; readonly jobTitle?: string | null | undefined; readonly lastName?: string | undefined; readonly phoneNumber?: string | undefined; readonly requestNonce?: string | undefined; readonly street?: string | null | undefined; readonly successful?: boolean | undefined; readonly twitterId?: string | null | undefined; readonly url?: string | null | undefined; readonly zipcode?: string | null | undefined; }; readonly password: string; }; responseBody: undefined; }>>; readonly AdminConfirmUser: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly username: string; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; }; responseBody: undefined; }>>; readonly AdminDeleteUnconfirmedUser: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params: { readonly username: string; }; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; }; responseBody: undefined; }>>; readonly AdminDeleteIncompleteUser: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: undefined; responseBody: undefined; }>>; readonly AdminLogOutUser: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: undefined; responseBody: undefined; }>>; readonly AdminGetUserInfo: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: undefined; responseBody: { readonly userCreateDate?: string | undefined; }; }>>; readonly ConfirmPasswordlessSignUp: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams?: undefined; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: undefined; responseBody: undefined; }>>; readonly DoesUserExist: (this: import("@affinidi/tools-openapi/dist/helpers/client").ThisData, requestOptions: { authorization?: string | undefined; storageRegion?: string | undefined; params?: undefined; queryParams: { readonly value: string; readonly field: "username" | "email" | "phone_number"; }; pathParams?: undefined; }) => Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: { readonly value: string; readonly field: "username" | "email" | "phone_number"; }; requestBody: undefined; responseBody: { [x: string]: any; readonly isUnconfirmed: boolean; readonly userExists: boolean; }; }>>; }; export default class KeyStorageApiService { private readonly client; constructor(options: ConstructorOptions); storeTemplate(params: GetParams<typeof clientMethods.StoreTemplate>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; readonly template: string; readonly subject?: string | null | undefined; readonly htmlTemplate?: string | null | undefined; }; responseBody: undefined; }>>; readMyKey({ accessToken }: { accessToken: string; }): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: { readonly tenantToken?: string | undefined; }; requestBody: undefined; responseBody: { readonly encryptedSeed: string; }; }>>; storeMyKey(accessToken: string, params: GetParams<typeof clientMethods.StoreMyKey>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly encryptedSeed: string; }; responseBody: { readonly encryptedSeed: string; }; }>>; adminCreateConfirmedUser(params: GetParams<typeof clientMethods.AdminCreateConfirmedUser>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; readonly profileTrueCaller: { [x: string]: any; readonly payload: string; readonly signature: string; readonly signatureAlgorithm: string; readonly email?: string | null | undefined; readonly avatarUrl?: string | null | undefined; readonly city?: string | null | undefined; readonly companyName?: string | null | undefined; readonly countryCode?: string | null | undefined; readonly facebookId?: string | null | undefined; readonly firstName?: string | undefined; readonly gender?: string | undefined; readonly isAmbassador?: boolean | undefined; readonly isBusiness?: boolean | undefined; readonly isVerified?: boolean | undefined; readonly jobTitle?: string | null | undefined; readonly lastName?: string | undefined; readonly phoneNumber?: string | undefined; readonly requestNonce?: string | undefined; readonly street?: string | null | undefined; readonly successful?: boolean | undefined; readonly twitterId?: string | null | undefined; readonly url?: string | null | undefined; readonly zipcode?: string | null | undefined; }; readonly password: string; }; responseBody: undefined; }>>; storeInTruecallerUserList(params: GetParams<typeof clientMethods.StoreInTruecallerUserList>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly profileTrueCaller: { [x: string]: any; readonly payload: string; readonly signature: string; readonly signatureAlgorithm: string; readonly email?: string | null | undefined; readonly avatarUrl?: string | null | undefined; readonly city?: string | null | undefined; readonly companyName?: string | null | undefined; readonly countryCode?: string | null | undefined; readonly facebookId?: string | null | undefined; readonly firstName?: string | undefined; readonly gender?: string | undefined; readonly isAmbassador?: boolean | undefined; readonly isBusiness?: boolean | undefined; readonly isVerified?: boolean | undefined; readonly jobTitle?: string | null | undefined; readonly lastName?: string | undefined; readonly phoneNumber?: string | undefined; readonly requestNonce?: string | undefined; readonly street?: string | null | undefined; readonly successful?: boolean | undefined; readonly twitterId?: string | null | undefined; readonly url?: string | null | undefined; readonly zipcode?: string | null | undefined; }; readonly env?: string | null | undefined; readonly expiredAt?: string | undefined; }; responseBody: undefined; }>>; adminConfirmUser(params: GetParams<typeof clientMethods.AdminConfirmUser>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; }; responseBody: undefined; }>>; adminDeleteUnconfirmedUser(params: GetParams<typeof clientMethods.AdminDeleteUnconfirmedUser>): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly username: string; }; responseBody: undefined; }>>; adminDeleteIncompleteUser({ accessToken }: { accessToken: string; }): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: undefined; responseBody: undefined; }>>; adminLogOutUser({ accessToken }: { accessToken: string; }): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: undefined; responseBody: undefined; }>>; adminGetUserInfo({ accessToken }: { accessToken: string; }): Promise<{ readonly userCreateDate?: string | undefined; }>; confirmPasswordlessSignUp({ accessToken }: { accessToken: string; }): Promise<undefined>; doesUserExist({ field, value }: DoesUserExistInput): Promise<{ isUnconfirmed: boolean; userExists: boolean; }>; getCredentialOffer({ accessToken, env }: { accessToken: string; env: Env; }): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: { readonly env?: "dev" | "staging" | "prod" | undefined; }; requestBody: undefined; responseBody: { readonly offerToken: string; }; }>>; getSignedCredential(accessToken: string, params: GetSignedCredentialRequest): Promise<import("@affinidi/tools-openapi").ResponseForOperation<{ pathParams: undefined; queryParams: undefined; requestBody: { readonly credentialOfferResponseToken: string; readonly options: { readonly accessApiKey: string | null; readonly env?: (("dev" | "staging" | "prod") & Record<never, never>) | null | undefined; readonly apiKey?: string | null | undefined; readonly issuerUrl?: string | null | undefined; } | null; }; responseBody: { readonly signedCredentials: { [x: string]: any; }[]; }; }>>; } export {};