interface GraphQLExtensions { requestId: string; } type InvalidCredentialError = Readonly<{ name: "InvalidCredentialError"; context: GraphQLExtensions; }>; declare const cardFields: readonly ["cvv", "expirationDate", "cardNumber"]; type PaymentCardFields = (typeof cardFields)[number]; interface CardViewerRenderedFields { unmount: () => Promise; toggleCardNumberMask: () => void; } interface CardViewerElementConfig { selector: string; styles?: AllowedFrameStyle; } export type OnCopyToClipboardSuccessPayload = Readonly<{ field: PaymentCardFields; }>; interface CardViewerConfig { /** A client token generated via the [`generatePaymentCardClientToken`](https://highnote.com/docs/reference/mutation/generatePaymentCardClientToken) mutation. */ clientToken: string; paymentCardId: string; elements: Record; onError: (error: CardViewerConfigError) => void; /** * Callback for when the user successfully copies a value to their clipboard. * * Errors from this action will be dispatched to the `onError` callback. */ onCopyToClipboardSuccess?: (payload: OnCopyToClipboardSuccessPayload) => void; /** The environment to use for making requests to the Highnote API. * * default value: 'test' */ environment?: HighnoteEnvironment; /** * Configurable value to enable or disable the use copying value to clipboard functionality on click. * Default: true */ enableClipboard?: boolean; /** * Mask the card number on load. * Default: true */ maskedOnLoad?: boolean; /** * Callback for when the card viewer is ready. */ onReady?: () => void; } type CardViewerFieldsInputError = Readonly<{ name: "CardViewerFieldsInputError"; message: string; }>; type CardViewerError = Readonly<{ message: string; }>; type CardViewerRequestError = Readonly<{ name: "CardViewerRequestError"; message?: string; context: GraphQLExtensions; }>; type CardViewerCopyToClipboardError = Readonly<{ name: "CopyToClipboardError"; message: string; field: PaymentCardFields; }>; type CardViewerConfigError = Readonly; declare const allowedStyleDeclarations: readonly ["borderRadius", "backgroundColor", "color", "cursor", "fontFamily", "fontSize", "fontWeight", "letterSpacing", "lineHeight", "userSelect", "border"]; declare const allowedPseudoClasses: readonly [":focus", ":hover", ":invalid", ":valid"]; type AllowedPseudoClasses = (typeof allowedPseudoClasses)[number]; type ArrayElement = Array_ extends readonly (infer Type)[] ? Type : never; type AllowedStyleOptions = Partial>>; type AllowedPseudoClassStyleOptions = Partial>; type AllowedFrameStyle = AllowedPseudoClassStyleOptions | AllowedStyleOptions; declare const allowedHighnoteEnvironments: readonly ["live", "test"]; type HighnoteEnvironment = (typeof allowedHighnoteEnvironments)[number]; export const renderFields: ({ clientToken, paymentCardId, elements, onError, onCopyToClipboardSuccess, environment, enableClipboard, maskedOnLoad, onReady, }: Readonly) => Promise; //# sourceMappingURL=types.d.ts.map