UNPKG

@piiano/forms

Version:
306 lines (305 loc) 12.9 kB
import { type Infer } from './schema'; export declare const StrategyValidator: import("./schema").Validator<"tokenize-object" | "tokenize-fields" | "encrypt-object" | "encrypt-fields" | "store-object">; export type Strategy = Infer<typeof StrategyValidator>; export declare const ReasonValidator: import("./schema").Validator<"AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other">; export type Reason = Infer<typeof ReasonValidator>; export declare const FieldValidator: import("./schema").Validator<{ name: string; dataTypeName: string; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; value?: string | undefined; }>; export type Field = Infer<typeof FieldValidator>; export declare const ThemeValidator: import("./schema").Validator<"none" | "default" | "floating-label">; export type Theme = Infer<typeof ThemeValidator>; export declare const VariablesValidator: import("./schema").Validator<{ primary?: string | undefined; primaryDark?: string | undefined; background?: string | undefined; focusBackground?: string | undefined; placeholderColor?: string | undefined; borderColor?: string | undefined; }>; export type Variables = Infer<typeof VariablesValidator>; export declare const StyleValidator: import("./schema").Validator<{ theme?: "none" | "default" | "floating-label" | undefined; variables?: { primary?: string | undefined; primaryDark?: string | undefined; background?: string | undefined; focusBackground?: string | undefined; placeholderColor?: string | undefined; borderColor?: string | undefined; } | undefined; css?: string | undefined; }>; export type Style = Infer<typeof StyleValidator>; /** * The options to use to initialize the form. */ export declare const FormInitOptionsValidator: import("./schema").Validator<{ vaultURL: string; apiKey: string; collection: string; fields: { name: string; dataTypeName: string; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; value?: string | undefined; }[]; debug?: boolean | undefined; allowUpdates?: boolean | undefined; strategy?: "tokenize-object" | "tokenize-fields" | "encrypt-object" | "encrypt-fields" | "store-object" | undefined; globalVaultIdentifiers?: boolean | undefined; tenantId?: string | undefined; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; expiration?: number | undefined; storeObject?: boolean | undefined; submitButton?: string | undefined; style?: { theme?: "none" | "default" | "floating-label" | undefined; variables?: { primary?: string | undefined; primaryDark?: string | undefined; background?: string | undefined; focusBackground?: string | undefined; placeholderColor?: string | undefined; borderColor?: string | undefined; } | undefined; css?: string | undefined; } | undefined; }>; export type FormInitOptions = Infer<typeof FormInitOptionsValidator>; export declare const SizeValidator: import("./schema").Validator<{ width: number; height: number; }>; export type Size = Infer<typeof SizeValidator>; export declare const FormIframeEventValidator: import("./schema").Validator<{ event: "init"; payload: { vaultURL: string; apiKey: string; collection: string; fields: { name: string; dataTypeName: string; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; value?: string | undefined; }[]; debug?: boolean | undefined; allowUpdates?: boolean | undefined; strategy?: "tokenize-object" | "tokenize-fields" | "encrypt-object" | "encrypt-fields" | "store-object" | undefined; globalVaultIdentifiers?: boolean | undefined; tenantId?: string | undefined; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; expiration?: number | undefined; storeObject?: boolean | undefined; submitButton?: string | undefined; style?: { theme?: "none" | "default" | "floating-label" | undefined; variables?: { primary?: string | undefined; primaryDark?: string | undefined; background?: string | undefined; focusBackground?: string | undefined; placeholderColor?: string | undefined; borderColor?: string | undefined; } | undefined; css?: string | undefined; } | undefined; }; } | { event: "update"; payload: { vaultURL: string; apiKey: string; collection: string; fields: { name: string; dataTypeName: string; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; value?: string | undefined; }[]; debug?: boolean | undefined; allowUpdates?: boolean | undefined; strategy?: "tokenize-object" | "tokenize-fields" | "encrypt-object" | "encrypt-fields" | "store-object" | undefined; globalVaultIdentifiers?: boolean | undefined; tenantId?: string | undefined; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; expiration?: number | undefined; storeObject?: boolean | undefined; submitButton?: string | undefined; style?: { theme?: "none" | "default" | "floating-label" | undefined; variables?: { primary?: string | undefined; primaryDark?: string | undefined; background?: string | undefined; focusBackground?: string | undefined; placeholderColor?: string | undefined; borderColor?: string | undefined; } | undefined; css?: string | undefined; } | undefined; }; } | { event: "submit"; } | { event: "container-size"; payload: { width: number; height: number; }; }>; export type FormIframeEvent = Infer<typeof FormIframeEventValidator>; /** * Options for the read-objects strategy to fetch objects from the Vault and show them in the view. */ declare const ReadObjectStrategyOptionsValidator: import("./schema").Validator<{ type: "read-objects"; collection: string; ids: string[]; props: string[]; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; transformationParam?: string | undefined; }>; export type ReadObjectStrategyOptions = Infer<typeof ReadObjectStrategyOptionsValidator>; /** * Options for the invoke-action strategy to invoke actions in the Vault and show the result in the view. */ declare const InvokeActionStrategyOptionsValidator: import("./schema").Validator<{ type: "invoke-action"; action: string; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; input?: { [x: string]: unknown; } | undefined; }>; export type InvokeActionStrategyOptions = Infer<typeof InvokeActionStrategyOptionsValidator>; declare const DisplayOptionsValidator: import("./schema").Validator<{ path: string; label?: string | undefined; clickToCopy?: boolean | undefined; class?: string | undefined; format?: string | undefined; }[]>; export type DisplayOptions = Infer<typeof DisplayOptionsValidator>; /** * The options to use to initialize the protected view. */ export declare const ViewInitOptionsValidator: import("./schema").Validator<{ vaultURL: string; apiKey: string; strategy: { type: "read-objects"; collection: string; ids: string[]; props: string[]; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; transformationParam?: string | undefined; } | { type: "invoke-action"; action: string; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; input?: { [x: string]: unknown; } | undefined; }; display: { path: string; label?: string | undefined; clickToCopy?: boolean | undefined; class?: string | undefined; format?: string | undefined; }[]; debug?: boolean | undefined; dynamic?: boolean | undefined; css?: string | undefined; }>; export type ViewInitOptions = Infer<typeof ViewInitOptionsValidator>; export declare const ViewIframeEventValidator: import("./schema").Validator<{ event: "init"; payload: { vaultURL: string; apiKey: string; strategy: { type: "read-objects"; collection: string; ids: string[]; props: string[]; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; transformationParam?: string | undefined; } | { type: "invoke-action"; action: string; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; input?: { [x: string]: unknown; } | undefined; }; display: { path: string; label?: string | undefined; clickToCopy?: boolean | undefined; class?: string | undefined; format?: string | undefined; }[]; debug?: boolean | undefined; dynamic?: boolean | undefined; css?: string | undefined; }; } | { event: "update"; payload: { vaultURL: string; apiKey: string; strategy: { type: "read-objects"; collection: string; ids: string[]; props: string[]; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; transformationParam?: string | undefined; } | { type: "invoke-action"; action: string; reason?: "AppFunctionality" | "Analytics" | "Notifications" | "Marketing" | "ThirdPartyMarketing" | "FraudPreventionSecurityAndCompliance" | "AccountManagement" | "Maintenance" | "DataSubjectRequest" | "Other" | undefined; input?: { [x: string]: unknown; } | undefined; }; display: { path: string; label?: string | undefined; clickToCopy?: boolean | undefined; class?: string | undefined; format?: string | undefined; }[]; debug?: boolean | undefined; dynamic?: boolean | undefined; css?: string | undefined; }; } | { event: "container-size"; payload: { width: number; height: number; }; } | { event: "copy"; payload: { path: string; trustedEventKey?: string | undefined; }; }>; export type ViewIframeEvent = Infer<typeof ViewInitOptionsValidator>; export {};