UNPKG

avify-client

Version:
39 lines 992 B
export interface ApiResponse<T> { success: boolean; httpCode: number; data?: T; error?: { message: string; code: string; }; } export interface GetPublicKeyResponse { key: string; } export declare type Mode = 'sandbox' | 'production'; declare type Version = 'v1'; export interface Constructor { mode: Mode; version: Version; } export interface CheckoutOptions { currency: 'USD' | 'CRC'; cardHolder: string; cardNumber: string; cvc: string; expMonth: string; expYear: string; } declare class Avify { prodBaseUrl: string; sadboxBaseUrl: string; baseUrl: string; mode: string; publicKey: string | undefined; constructor({ mode, version }: Constructor); getPublicKey(): Promise<ApiResponse<GetPublicKeyResponse>>; encrypt(text: string): Promise<ApiResponse<string>>; checkout(options: CheckoutOptions): Promise<ApiResponse<any>>; } export default Avify; //# sourceMappingURL=Avify.d.ts.map