import React, { ReactNode, SyntheticEvent } from "react"; //#region src/types/Field.d.ts type FieldState = 'dirty' | 'empty' | 'valid' | 'invalid' | 'focused' | 'touched'; type VGSCollectFieldType = 'text' | 'card-number' | 'card-expiration-date' | 'card-security-code' | 'ssn' | 'zip-code' | 'file' | 'password' | 'number' | 'checkbox' | 'radio' | 'dropdown' | 'textarea' | 'date'; type ClassMap = Partial>; type VGSCollectKeyboardEventData = { type: T; timeStamp: number; isTrusted: boolean; key: string | null; keyCode: number | null; which: number | null; metaKey: boolean; ctrlKey: boolean; valueHidden: boolean; keyIndex: number; }; type VGSCollectFocusEventData = { type: T; timeStamp: number; isTrusted: boolean; }; interface IVGSCollectFieldInstance { classes: ClassMap; container: HTMLElement; debugId: string; env: string; fieldId: string; formId: string; name: string; tnt: string; type: VGSCollectFieldType; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldon */ on(eventType: 'keydown', callback: (event: VGSCollectKeyboardEventData<'keydown'>) => void): void; on(eventType: 'keypress', callback: (event: VGSCollectKeyboardEventData<'keypress'>) => void): void; on(eventType: 'keyup', callback: (event: VGSCollectKeyboardEventData<'keyup'>) => void): void; on(eventType: 'delete', callback: () => void): void; on(eventType: 'update', callback: (fieldState: any) => void): void; on(eventType: 'focus', callback: (event: VGSCollectFocusEventData<'focus'>) => void): void; on(eventType: 'blur', callback: (event: VGSCollectFocusEventData<'blur'>) => void): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldoff */ off(eventType: 'keydown', callback: (event: VGSCollectKeyboardEventData<'keydown'>) => void): void; off(eventType: 'keypress', callback: (event: VGSCollectKeyboardEventData<'keypress'>) => void): void; off(eventType: 'keyup', callback: (event: VGSCollectKeyboardEventData<'keyup'>) => void): void; off(eventType: 'delete', callback: () => void): void; off(eventType: 'update', callback: (fieldState: any) => void): void; off(eventType: 'focus', callback: (event: VGSCollectFocusEventData<'focus'>) => void): void; off(eventType: 'blur', callback: (event: VGSCollectFocusEventData<'blur'>) => void): void; off(eventType: 'update', callback: (fieldState: any) => void): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldoff */ update(params: any): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldreset */ reset(): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fielddelete */ delete(): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldmask */ mask(mask: string, maskChar: string, formatChar: string): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldreplacepattern */ replacePattern(regExpString: string, newSubStr: string): void; } //#endregion //#region src/types/HttpStatusCode.d.ts declare enum HttpStatusCode { CONTINUE = 100, SWITCHING_PROTOCOLS = 101, PROCESSING = 102, OK = 200, CREATED = 201, ACCEPTED = 202, NON_AUTHORITATIVE_INFORMATION = 203, NO_CONTENT = 204, RESET_CONTENT = 205, PARTIAL_CONTENT = 206, MULTI_STATUS = 207, ALREADY_REPORTED = 208, IM_USED = 226, MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, USE_PROXY = 305, SWITCH_PROXY = 306, TEMPORARY_REDIRECT = 307, PERMANENT_REDIRECT = 308, BAD_REQUEST = 400, UNAUTHORIZED = 401, PAYMENT_REQUIRED = 402, FORBIDDEN = 403, NOT_FOUND = 404, METHOD_NOT_ALLOWED = 405, NOT_ACCEPTABLE = 406, PROXY_AUTHENTICATION_REQUIRED = 407, REQUEST_TIMEOUT = 408, CONFLICT = 409, GONE = 410, LENGTH_REQUIRED = 411, PRECONDITION_FAILED = 412, PAYLOAD_TOO_LARGE = 413, URI_TOO_LONG = 414, UNSUPPORTED_MEDIA_TYPE = 415, RANGE_NOT_SATISFIABLE = 416, EXPECTATION_FAILED = 417, I_AM_A_TEAPOT = 418, MISDIRECTED_REQUEST = 421, UNPROCESSABLE_ENTITY = 422, LOCKED = 423, FAILED_DEPENDENCY = 424, UPGRADE_REQUIRED = 426, PRECONDITION_REQUIRED = 428, TOO_MANY_REQUESTS = 429, REQUEST_HEADER_FIELDS_TOO_LARGE = 431, UNAVAILABLE_FOR_LEGAL_REASONS = 451, INTERNAL_SERVER_ERROR = 500, NOT_IMPLEMENTED = 501, BAD_GATEWAY = 502, SERVICE_UNAVAILABLE = 503, GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505, VARIANT_ALSO_NEGOTIATES = 506, INSUFFICIENT_STORAGE = 507, LOOP_DETECTED = 508, NOT_EXTENDED = 510, NETWORK_AUTHENTICATION_REQUIRED = 511, NETWORK_ERROR = "Network Error" } //#endregion //#region src/types/Form.d.ts declare global { interface Window { VGSCollect: IVGSCollect; } interface Crypto { randomUUID: () => string; } } type VGSCollectVaultEnvironment = 'sandbox' | 'live' | 'live-eu-1' | 'live-ap-1'; /** * Available options for .field() method configuration */ type BooleanValue = boolean | 'true' | 'false'; type YearLength = '2' | '4' | 2 | 4; /** * Available options for .submit() method */ type SubmitMethod = 'post' | 'patch' | 'put' | 'delete' | 'get'; type SubmitSerializer = 'deep' | 'flat'; type SubmitSerialization = 'json' | 'formData'; type SubmitMapDotToObject = BooleanValue | 'merge' | 'mergeArray'; type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'; type StorageTypes = 'PERSISTENT' | 'VOLATILE'; type TokenFormats = 'FPE_ACC_NUM_T_FOUR' | 'FPE_ALPHANUMERIC_ACC_NUM_T_FOUR' | 'FPE_SIX_T_FOUR' | 'FPE_SSN_T_FOUR' | 'FPE_T_FOUR' | 'RAW_UUID' | 'UUID' | 'NUM_LENGTH_PRESERVING' | 'PFPT'; /** * Available options for the form .on() method */ type FormEventTypes = 'enterPress' | 'getCardAttributesSuccess' | 'getCardAttributesError'; type VGSCollectSessionAuthResult = string | { token: string; }; type VGSCollectSessionAuthHandler = string | (() => VGSCollectSessionAuthResult | Promise); interface IBaseCollectProps { vaultId: string; cname?: string; routeId?: string; children?: ReactNode; onCustomSubmit?: (event: SyntheticEvent) => void; onUpdateCallback?: (state: VGSCollectFormState | null) => void; onSubmitCallback?: (status: any, resp: any) => void; onErrorCallback?: (errors: any) => void; onCardCreateCallback?: (status: any, resp: any) => void; } interface ICollectFormProps extends IBaseCollectProps { environment: VGSCollectVaultEnvironment; submitParameters?: any; action?: string; tokenizationAPI?: boolean; } interface ICollectSessionProxySubmit { api: 'proxy'; action: string; routeId?: string; submitParameters?: Partial; } interface ICollectSessionVaultSubmit { api: 'vault'; submitParameters?: Record; } interface ICollectSessionTokenizationSubmit { api: 'tokenization'; routeId?: string; } interface ICollectSessionCMPCreateCardSubmit { api: 'cmp'; operation: 'createCard'; submitParameters?: Partial; } interface ICollectSessionCMPUpdateCardSubmit { api: 'cmp'; operation: 'updateCard'; params: { cardId: string; [key: string]: any; }; } type ICollectSessionSubmit = ICollectSessionProxySubmit | ICollectSessionVaultSubmit | ICollectSessionTokenizationSubmit | ICollectSessionCMPCreateCardSubmit | ICollectSessionCMPUpdateCardSubmit; interface ICollectSessionProps extends IBaseCollectProps { environment?: VGSCollectVaultEnvironment; env?: VGSCollectVaultEnvironment; formId?: string; configuration?: any; authHandler?: VGSCollectSessionAuthHandler; submit?: ICollectSessionSubmit; stateCallback?: (state: VGSCollectFormState | null) => void; onGetCardAttributesSuccess?: (resp: any) => void; onGetCardAttributesError?: (errors: any) => void; } interface VGSCollectStateParams { name: string; errorMessages: string[]; isDirty: boolean; isTouched: boolean; isFocused: boolean; isValid: boolean; isEmpty: boolean; last4?: string; bin?: string; cardType?: string; errors?: any[]; } type VGSCollectFormState = Record | null; interface IFieldTokenization { format?: TokenFormats; storage?: StorageTypes; } interface IDefaultFieldOptions { type: VGSCollectFieldType; name: string; validations?: string[]; css?: Record; style?: Record; defaultValue?: string; successColor?: string; errorColor?: string; classes?: ClassMap; serializers?: any; autoComplete?: string; placeholder?: string; autoFocus?: BooleanValue; disabled?: BooleanValue; ariaLabel?: string; readonly?: BooleanValue; inputMode?: InputMode; tokenization?: IFieldTokenization | boolean; } type FieldConfig = IVGSCollectTextField | IVGSCollectCardholderField | IVGSCollectCardNumberField | IVGSCollectCardExpirationField | IVGSCollectCardCVCField | IVGSCollectSSNField | IVGSCollectZipCodeField | IVGSCollectPasswordField | IVGSCollectNumberField | IVGSCollectTextareaField; interface IVGSCollectTextField extends IDefaultFieldOptions { type: 'text'; min?: number; max?: number; maxLength?: number; step?: number; hideValue?: BooleanValue; } interface IVGSCollectCardholderField extends IDefaultFieldOptions { type: 'text'; hideValue?: BooleanValue; } interface IVGSCollectCardNumberField extends IDefaultFieldOptions { type: 'card-number'; icons?: Record; showCardIcon?: boolean | Record; addCardBrands?: Array; validCardBrands: Array>; hideValue?: BooleanValue; } interface IVGSCollectCardExpirationField extends IDefaultFieldOptions { type: 'card-expiration-date'; yearLength?: YearLength; separator?: string; hideValue?: BooleanValue; } interface IVGSCollectCardCVCField extends IDefaultFieldOptions { type: 'card-security-code'; showCardIcon?: boolean | object; icons?: Record; hideValue?: BooleanValue; } interface IVGSCollectSSNField extends IDefaultFieldOptions { type: 'ssn'; hideValue?: BooleanValue; } interface IVGSCollectZipCodeField extends IDefaultFieldOptions { type: 'zip-code'; hideValue?: BooleanValue; } interface IVGSCollectPasswordField extends IDefaultFieldOptions { type: 'password'; hideValue?: BooleanValue; } interface IVGSCollectNumberField extends IDefaultFieldOptions { type: 'number'; hideValue?: BooleanValue; } interface IVGSCollectTextareaField extends IDefaultFieldOptions { type: 'textarea'; min?: number; max?: number; maxLength?: number; step?: number; hideValue?: BooleanValue; } interface IVGSCollectFileField extends IDefaultFieldOptions { type: 'file'; multiple: boolean; accept: string[]; capture: 'user' | 'environment'; maxFileSize: number; maxFiled: number; } interface IVGSCollectDateField extends IDefaultFieldOptions { type: 'date'; min?: number; max?: number; } interface CardInfo { type: string; pattern: RegExp; format?: RegExp; length?: number[]; cvvLength?: number[]; luhn?: Boolean; useExtendedBin?: Boolean; } interface VGSCollectSubmitOptions { data: object | ((values: any) => any); headers: object; method: SubmitMethod; serailizer: SubmitSerializer; serialization: SubmitSerialization; mapDotToObject: SubmitMapDotToObject; withCredentials: BooleanValue; } interface IVGSCollectForm { /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-formfield */ field(selector: string, options: FieldConfig): IVGSCollectFieldInstance; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldon * https://www.verygoodsecurity.com/docs/api/collect/#api-fieldoff */ on(event: FormEventTypes, callback: (info: any) => void): void; off(event: FormEventTypes, callback: (info: any) => void): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-formsubmit */ submit(path: string, options: Partial, successCallback?: (status: HttpStatusCode | null, data: any) => any, errorCallback?: (error: VGSCollectFormState) => any): any; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-formtokenize */ tokenize(successCallback: (status: HttpStatusCode | null, data: any) => any, errorCallback: (error: VGSCollectFormState) => any): any; /** * Docs: https://docs.verygoodsecurity.com/vault/developer-tools/vgs-collect/js/reference-documentation */ createAliases(options: Record, successCallback: (status: HttpStatusCode | null, data: any) => any, errorCallback: (error: VGSCollectFormState) => any): any; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-formcreatecard */ createCard(options: Partial, successCallback: (status: HttpStatusCode | null, data: any) => any, errorCallback: (error: VGSCollectFormState) => any): any; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-formupdatecard */ updateCard(params: Record, successCallback: (status: HttpStatusCode | null, data: any) => any, errorCallback: (error: VGSCollectFormState) => any): any; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-fieldreset */ reset(): any; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect/#api-formunmount */ unmount(): void; /** * Docs: https://www.verygoodsecurity.com/docs/vgs-collect/js/cookbook#how-to-integrate-vgs-collectjs-with-vgs-satellite */ connectSatellite(port: number): any; /** * Docs: https://www.verygoodsecurity.com/docs/vgs-collect/js/integration#vgs-collect-with-cname */ useCname(cname: string): void; /** * Docs: https://www.verygoodsecurity.com/docs/api/collect#api-formsetrouteid */ setRouteId(routeId: string): void; } interface IVGSCollectSessionOptions { vaultId: string; env?: VGSCollectVaultEnvironment; stateCallback?: (state: VGSCollectFormState) => void; formId?: string; configuration?: any; authHandler?: VGSCollectSessionAuthHandler; onErrorCallback?: (error: any) => void; routeId?: string; } interface IVGSCollect { create(vaultId: string, environment: string, stateCallback?: (state: VGSCollectFormState) => void): IVGSCollectForm; session(options: IVGSCollectSessionOptions): Promise; } type ICollectFieldAlias = { __type: string; elementIndex: any; key: string; }; interface ICollectFormPayloadStructure { [key: string]: ICollectFieldAlias; } //#endregion //#region src/Form.d.ts declare function VGSCollectForm(props: ICollectFormProps): React.JSX.Element; declare namespace VGSCollectForm { var TextField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardholderField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardNumberField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardExpirationDateField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardSecurityCodeField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var PasswordField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var SSNField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var ZipCodeField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var TextareaField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var NumberField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var FileField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var DateField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; } //#endregion //#region src/Session.d.ts declare function VGSCollectSession(props: ICollectSessionProps): React.JSX.Element; declare namespace VGSCollectSession { var TextField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardholderField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardNumberField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardExpirationDateField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var CardSecurityCodeField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var PasswordField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var SSNField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var ZipCodeField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var TextareaField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var NumberField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var FileField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; var DateField: React.MemoExoticComponent<(props: Partial) => void; onBlur: (info: VGSCollectFocusEventData<"focus" | "blur">) => void; onUpdate: (state: VGSCollectStateParams) => void; onDelete: () => void; onKeyUp: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyDown: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; onKeyPress: (info: VGSCollectKeyboardEventData<"keydown" | "keypress" | "keyup">) => void; }>) => React.JSX.Element>; } //#endregion //#region src/provider.d.ts type GlobalStateContext = VGSCollectFormState | undefined; type GlobalSubmitContext = { status: HttpStatusCode; data: any; } | undefined; declare const initialState: undefined; declare const GlobalSubmitContext: React.Context; declare const DispatchSubmitContext: React.Context>; declare const GlobalStateContext: React.Context; declare const DispatchStateContext: React.Context>; declare const GlobalFormInstanceContext: React.Context; declare const DispatchFormInstanceContext: React.Context>; declare const GlobalStateProvider: ({ children }: any) => React.JSX.Element; declare const useVGSCollectState: () => GlobalStateContext[]; declare const useVGSCollectResponse: () => GlobalSubmitContext[]; declare const useVGSCollectFormInstance: () => any[]; declare const VGSCollectProvider: ({ children }: any) => React.JSX.Element; //#endregion export { ClassMap, DispatchFormInstanceContext, DispatchStateContext, DispatchSubmitContext, GlobalFormInstanceContext, GlobalStateContext, GlobalStateProvider, GlobalSubmitContext, type ICollectFormPayloadStructure, type ICollectFormProps, type ICollectSessionCMPCreateCardSubmit, type ICollectSessionCMPUpdateCardSubmit, type ICollectSessionProps, type ICollectSessionProxySubmit, type ICollectSessionSubmit, type ICollectSessionTokenizationSubmit, type ICollectSessionVaultSubmit, type IVGSCollect, type IVGSCollectCardCVCField, type IVGSCollectCardExpirationField, type IVGSCollectCardNumberField, type IVGSCollectCardholderField, type IVGSCollectDateField, type IVGSCollectFieldInstance, type IVGSCollectFileField, type IVGSCollectForm, type IVGSCollectNumberField, type IVGSCollectPasswordField, type IVGSCollectSSNField, type IVGSCollectSessionOptions, type IVGSCollectTextField, type IVGSCollectTextareaField, type IVGSCollectZipCodeField, VGSCollectFieldType, type VGSCollectFocusEventData, VGSCollectForm, type VGSCollectFormState, type HttpStatusCode as VGSCollectHttpStatusCode, type VGSCollectKeyboardEventData, VGSCollectProvider, VGSCollectSession, type VGSCollectSessionAuthHandler, type VGSCollectSessionAuthResult, type VGSCollectStateParams, type VGSCollectVaultEnvironment, initialState, useVGSCollectFormInstance, useVGSCollectResponse, useVGSCollectState }; //# sourceMappingURL=index.d.ts.map