/** * Endpoint pattern types * - host-controller: /api/[Controller]/[Action] * - application-service: /services/app/[Service]/[Method] */ export type EndpointPattern = 'host-controller' | 'application-service' | 'custom'; /** * Custom endpoint paths configuration */ export interface CustomEndpointPaths { [key: string]: string; } /** * Endpoint configuration */ export interface EndpointConfig { pattern: EndpointPattern; customPaths?: CustomEndpointPaths; } /** * SardinAI provider configuration: a development override only. VeroCompliance sends the Sardine client, * environment, region and session key with the SDK state and the identity token, and those always win, because * device data joins VeroCompliance's Sardine calls only when they match. These values fill in only what * VeroCompliance doesn't send, such as against a local backend without Sardine credentials. */ export interface SardinAIProviderConfig { clientId: string; clientSecret?: string; environment: 'sandbox' | 'production'; region?: 'us' | 'eu' | 'ca' | 'au'; enableBiometrics?: boolean; enablePortScanning?: boolean; flow?: string; } /** * Sumsub provider configuration (frontend-only settings). * Server-side API keys are never exposed — only UI/SDK behavior config. */ export interface SumsubProviderConfig { /** Theme for Sumsub UI: 'light' or 'dark'. Follows device theme if omitted. */ theme?: 'light' | 'dark'; /** Language override (ISO 639-1). Falls back to SDK locale. */ lang?: string; /** * WebSDK 2.0: name of a customization created in the Sumsub Dashboard. * This is the recommended way to style the Sumsub widget. */ customizationName?: string; /** WebSDK 1.0 fallback: URL to an external CSS file. */ customCss?: string; /** Whether to adapt Sumsub iframe height automatically (default: true). */ adaptIframeHeight?: boolean; } /** * Identity provider configurations */ export interface IdentityProviderConfigs { sardinai?: SardinAIProviderConfig; sumsub?: SumsubProviderConfig; onfido?: Record; } /** * Applicant form field name type */ export type ApplicantFormField = 'firstName' | 'lastName' | 'title' | 'email' | 'dateOfBirth' | 'phonenumber' | 'mobileCountryCode' | 'street' | 'streetNumber' | 'zip' | 'city' | 'country' | 'nationality' | 'otherNationality' | 'defaultLanguage' | 'taxCountry' | 'placeOfBirth' | 'countryOfBirth' | 'salutation' | 'educationLevel' | 'occupation' | 'taxNumber' | 'externalRefId'; /** * Company applicant form field name type */ export type CompanyApplicantFormField = 'companyName' | 'registrationNumber' | 'email' | 'phone' | 'legalAddress' | 'incorporatedOn' | 'controlScheme' | 'taxId' | 'registrationLocation' | 'website' | 'postalAddress' | 'street' | 'city' | 'state' | 'postalCode' | 'addressCountry' | 'lei' | 'streetNumber' | 'externalRefId'; /** * Applicant form configuration */ export interface ApplicantFormConfig { /** * Whether this form collects data for an individual or a company. * - 'individual' (default): uses ApplicantRequestData fields * - 'company': uses CompanyApplicantRequestData fields */ applicantType?: 'individual' | 'company'; /** List of fields to show in the form. If not specified, shows default fields */ visibleFields?: ApplicantFormField[]; /** Default workflow key for applicant creation. Can be overridden per component instance */ workflowKey?: string; /** Default external reference ID. Required if not shown in visible fields. */ externalRefId?: string; /** Pre-fill the email field in the applicant form (e.g. for testing or SSO flows). */ email?: string; /** * Hidden pre-filled values that are submitted with the form but never shown in the UI. * Built-in fields (e.g. 'country', 'firstName') are sent as top-level request fields. * Custom param names (any other key) are sent as applicantAdditionalDatas entries. * Example: { country: 'AUT', no_marketing: 'yes' } */ hiddenValues?: Record; /** * Controls how field labels are displayed. * - 'label' (default): a label element is shown above each input. * - 'placeholder' : no label element; the label text is used as the input placeholder instead. */ fieldLabelMode?: 'label' | 'placeholder'; /** * Pre-filled field values that are shown as **read-only** in the form. * If a field listed here is also in the visible fields, it appears filled and disabled. * The values are always included in the submission payload. * Works for both individual and company applicant forms. * Example: { firstName: 'John', lastName: 'Doe', email: 'john@example.com' } */ initialValues?: Record; } /** * VeroCompliance client configuration */ export interface VeroComplianceClientConfig { /** API key for authentication. Required unless getAccessToken is provided. */ apiKey?: string; /** Tenant ID — sets the Abp-TenantId header on every request */ tenantId?: number; /** Client ID — sets the ClientId header on every request (alternative to tenantId) */ clientId?: string; /** Base URL of the VeroCompliance API */ baseUrl: string; /** * Callback that returns a Bearer token for session-based authentication. * When provided, the SDK sends `Authorization: Bearer ` instead of API Key headers. * Useful for first-party apps where the user is already authenticated. * Can return null/undefined to skip the header for that request. */ getAccessToken?: () => string | null | undefined; /** Endpoint configuration */ endpoints?: EndpointConfig; /** Request timeout in milliseconds (default: 30000) */ timeout?: number; /** Number of retry attempts for failed requests (default: 3) */ retries?: number; /** Locale/language code (default: 'en') */ locale?: string; /** Identity provider configurations */ identityProviders?: IdentityProviderConfigs; /** * Existing applicant ID to continue a previous KYC session. * When provided, the SDK skips applicant creation and goes straight to the workflow. * When omitted or null, the SDK starts with the applicant creation form. */ applicantId?: number; /** Applicant form configuration */ applicantForm?: ApplicantFormConfig; /** Theme configuration (optional - will fetch from backend if not provided) */ theme?: any; /** * Pick one of the built-in theme presets by name. Shorthand for * `theme: themePresets[name]` — saves you from constructing a full * `ThemeConfig` object when you just want one of the canned looks. * * Accepts a `ThemePreset` enum value (e.g. `ThemePreset.Modern`) or its * raw string equivalent (e.g. `'modern'`, case-insensitive). Unknown names * fall back to the default preset. * * Precedence (highest first): * 1. `theme` (explicit full ThemeConfig) * 2. `themePreset` * 3. backend-fetched theme * 4. default theme * * Regardless of which base wins, `customCSS` is always **appended** on top. */ themePreset?: string; /** * Component/rendering engine override — `'verocompliance'` (the SDK's own primitives) or * `'vpdev2-ui'` (render via the @vpdev2/ui design system). * * Unlike `theme`/`themePreset`, this does NOT replace the resolved theme or skip the backend * fetch — it only overrides the engine ON TOP of whatever theme is resolved (backend, preset, or * default). So you keep the tenant's backend form/field/KYB configuration while switching engines. * Normally the engine comes from the backend `preset`; use this only to force it (e.g. testing). */ engine?: 'verocompliance' | 'vpdev2-ui'; /** * Extra CSS that is injected into `` after the theme's CSS variables. * Use it to override anything the theme system doesn't expose (specific * selectors, animations, third-party widget chrome inside the SDK, etc.). * * The string is appended verbatim — wrap your rules in `.verocompliance-sdk { … }` * or any other selector to scope them. This value is additive: if the * resolved theme already has a `customCSS` block, your string is concatenated * after it so your rules win on equal specificity. */ customCSS?: string; /** * SDK configuration version name. * When set, the SDK fetches the saved configuration snapshot matching this name. * When omitted, the backend returns the live configuration. */ configVersion?: string; /** Show SDK version badge at the top of the SDK content (default: false) */ showVersion?: boolean; /** Show a language picker dropdown with a globe icon (default: false) */ showLanguagePicker?: boolean; /** * Enable developer debug mode (Stripe-style trace logging). * When true, every API request/response is logged to the console with * method, URL, timing, and response data — making integration debugging * easy without opening the Network tab. * Shorthand for `logLevel: 'debug'`. */ debug?: boolean; /** * Fine-grained log level control. * - 'none' (default): silent * - 'error': only errors * - 'warn' : errors + warnings * - 'info' : lifecycle events (init, phase transitions) * - 'debug': full request/response trace (same as debug: true) */ logLevel?: 'none' | 'error' | 'warn' | 'info' | 'debug'; /** * @internal AES-256-GCM key derived from the ECDH key exchange during session creation. * Set automatically by VeroComplianceSession.createToken — not for public use. */ encryptionKey?: ArrayBuffer; /** * @internal Encryption session ID used to identify the server-side AES key. * Set automatically by VeroComplianceSession.createToken — not for public use. */ encSessionId?: string; /** * @internal Pre-generated Sardin AI session key from CreateToken. * Set automatically by VeroComplianceSession.createToken — not for public use. */ sardinSessionKey?: string; } /** * Default configuration values */ export declare const defaultConfig: Partial; //# sourceMappingURL=config.d.ts.map