import * as React from 'react'; import { ReactNode, ComponentType, AnchorHTMLAttributes, PropsWithChildren, ErrorInfo, ReactElement } from 'react'; import { FallbackProps } from 'react-error-boundary'; import { SortingState, OnChangeFn } from '@tanstack/react-table'; type PartialDeep$5 = { [K in keyof T]?: T[K] extends object ? PartialDeep$5 : T[K]; }; interface AcceptDisclosuresWidgetLabels { title: string; acceptButton: string; agreementCheckboxAriaLabel: string; /** Fallback when the accept API fails without a usable message. */ acceptErrorFallback: string; /** * Use `{bankName}` for the bank display name and `{documents}` for the * conjunction list of titles the backend returned (same order as the links). * A legacy override that omits `{documents}` still has those titles appended * so consent copy cannot disagree with the linked documents. */ agreementTextTemplate: string; providerAttributionPrefix: string; providerAttributionMiddle: string; providerAttributionSuffix: string; /** * @deprecated Ignored. Document titles come from * `GET /identity/v1/disclosures`. Kept so hosts that implement the full * published `AcceptDisclosuresWidgetLabels` interface continue to typecheck. */ linkLabels: { termsOfUse: string; privacyPolicy: string; electronicCommunications: string; patriotAct: string; }; /** Title when the backend returned no documents (`NOT_REQUIRED`). */ noDocumentsTitle?: string; /** Use `{bankName}` when the backend returned no documents. */ noDocumentsAgreementTextTemplate?: string; /** * Checkbox `aria-label` when the backend returned no documents. Use * `{bankName}`. Must not say the user is agreeing to disclosures. */ noDocumentsAgreementCheckboxAriaLabel?: string; /** * Two-item document list. Use `{first}` and `{second}` for the titles. */ documentListPairTemplate?: string; /** Separator between titles in a list of three or more (before the last). */ documentListSeparator?: string; /** Conjunction before the last title in a list of three or more. */ documentListLastConjunction?: string; /** Heading when the disclosures query fails. */ loadErrorTitle?: string; /** Fallback when the disclosures query fails without a usable message. */ loadErrorFallback?: string; /** Retry control on the disclosures-query error surface. */ loadErrorRetryLabel?: string; /** * Shown when accept is refused because a newer disclosure version is in * force than the documents the invitee agreed to. */ disclosuresUpdatedFallback?: string; } declare const ACCEPT_DISCLOSURES_WIDGET_LABELS_EN: { title: string; acceptButton: string; agreementCheckboxAriaLabel: string; acceptErrorFallback: string; agreementTextTemplate: string; providerAttributionPrefix: string; providerAttributionMiddle: string; providerAttributionSuffix: string; linkLabels: { termsOfUse: string; privacyPolicy: string; electronicCommunications: string; patriotAct: string; }; noDocumentsTitle: string; noDocumentsAgreementTextTemplate: string; noDocumentsAgreementCheckboxAriaLabel: string; documentListPairTemplate: string; documentListSeparator: string; documentListLastConjunction: string; loadErrorTitle: string; loadErrorFallback: string; loadErrorRetryLabel: string; disclosuresUpdatedFallback: string; }; interface DisclosureLink { label: string; href: string; } interface AcceptDisclosuresWidgetProps$1 { /** * Attribution line under the title (e.g. “Banking services for Nail It! are * provided by Zenith Bank, Member FDIC.”). Caller supplies emphasis (bold VSP). */ providerAttribution: ReactNode; /** Plain agreement copy rendered next to the checkbox. */ agreementText: string; disclosureLinks: DisclosureLink[]; isAgreed: boolean; onAgreedChange: (checked: boolean) => void; onAccept: () => void; /** Disables the checkbox and Accept control while a submit is in flight. */ isSubmitting?: boolean; /** * Keeps the checkbox and Accept control disabled once acceptance is done. * Separate from {@link isSubmitting} so `aria-busy` only means "in flight". */ isAccepted?: boolean; /** Inline error shown under Accept; omit or empty when there is no error. */ errorMessage?: string; labels?: PartialDeep$5; } type AuthToken = string | undefined; interface Auth { /** * Which part of the request do we use to send the auth? * * @default 'header' */ in?: 'header' | 'query' | 'cookie'; /** * A unique identifier for the security scheme. * * Defined only when there are multiple security schemes whose `Auth` * shape would otherwise be identical. */ key?: string; /** * Header or query parameter name. * * @default 'Authorization' */ name?: string; scheme?: 'basic' | 'bearer'; type: 'apiKey' | 'http'; } interface SerializerOptions { /** * @default true */ explode: boolean; style: T; } type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type ObjectStyle = 'form' | 'deepObject'; type QuerySerializer = (query: Record) => string; type BodySerializer = (body: unknown) => unknown; type QuerySerializerOptionsObject = { allowReserved?: boolean; array?: Partial>; object?: Partial>; }; type QuerySerializerOptions = QuerySerializerOptionsObject & { /** * Per-parameter serialization overrides. When provided, these settings * override the global array/object settings for specific parameter names. */ parameters?: Record; }; type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace'; type Client$1 = { /** * Returns the final request URL. */ buildUrl: BuildUrlFn; getConfig: () => Config; request: RequestFn; setConfig: (config: Config) => Config; } & { [K in HttpMethod]: MethodFn; } & ([SseFn] extends [never] ? { sse?: never; } : { sse: { [K in HttpMethod]: SseFn; }; }); interface Config$1 { /** * Auth token or a function returning auth token. The resolved value will be * added to the request payload as defined by its `security` array. */ auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; /** * A function for serializing request body parameter. By default, * {@link JSON.stringify()} will be used. */ bodySerializer?: BodySerializer | null; /** * An object containing any HTTP headers that you want to pre-populate your * `Headers` object with. * * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} */ headers?: RequestInit['headers'] | Record; /** * The request method. * * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} */ method?: Uppercase; /** * A function for serializing request query parameters. By default, arrays * will be exploded in form style, objects will be exploded in deepObject * style, and reserved characters are percent-encoded. * * This method will have no effect if the native `paramsSerializer()` Axios * API function is used. * * {@link https://swagger.io/docs/specification/serialization/#query View examples} */ querySerializer?: QuerySerializer | QuerySerializerOptions; /** * A function validating request data. This is useful if you want to ensure * the request conforms to the desired shape, so it can be safely sent to * the server. */ requestValidator?: (data: unknown) => Promise; /** * A function transforming response data before it's returned. This is useful * for post-processing data, e.g., converting ISO strings into Date objects. */ responseTransformer?: (data: unknown) => Promise; /** * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user. */ responseValidator?: (data: unknown) => Promise; } type ServerSentEventsOptions = Omit & Pick & { /** * Fetch API implementation. You can use this option to provide a custom * fetch instance. * * @default globalThis.fetch */ fetch?: typeof fetch; /** * Implementing clients can call request interceptors inside this hook. */ onRequest?: (url: string, init: RequestInit) => Promise; /** * Callback invoked when a network or parsing error occurs during streaming. * * This option applies only if the endpoint returns a stream of events. * * @param error The error that occurred. */ onSseError?: (error: unknown) => void; /** * Callback invoked when an event is streamed from the server. * * This option applies only if the endpoint returns a stream of events. * * @param event Event streamed from the server. * @returns Nothing (void). */ onSseEvent?: (event: StreamEvent) => void; serializedBody?: RequestInit['body']; /** * Default retry delay in milliseconds. * * This option applies only if the endpoint returns a stream of events. * * @default 3000 */ sseDefaultRetryDelay?: number; /** * Maximum number of retry attempts before giving up. */ sseMaxRetryAttempts?: number; /** * Maximum retry delay in milliseconds. * * Applies only when exponential backoff is used. * * This option applies only if the endpoint returns a stream of events. * * @default 30000 */ sseMaxRetryDelay?: number; /** * Optional sleep function for retry backoff. * * Defaults to using `setTimeout`. */ sseSleepFn?: (ms: number) => Promise; url: string; }; interface StreamEvent { data: TData; event?: string; id?: string; retry?: number; } type ServerSentEventsResult = { stream: AsyncGenerator ? TData[keyof TData] : TData, TReturn, TNext>; }; type ErrInterceptor = (error: Err, /** response may be undefined due to a network error where no response object is produced */ response: Res | undefined, /** request may be undefined, because error may be from building the request object itself */ request: Req | undefined, options: Options) => Err | Promise; type ReqInterceptor = (request: Req, options: Options) => Req | Promise; type ResInterceptor = (response: Res, request: Req, options: Options) => Res | Promise; declare class Interceptors { fns: Array; clear(): void; eject(id: number | Interceptor): void; exists(id: number | Interceptor): boolean; getInterceptorIndex(id: number | Interceptor): number; update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false; use(fn: Interceptor): number; } interface Middleware { error: Interceptors>; request: Interceptors>; response: Interceptors>; } type ResponseStyle = 'data' | 'fields'; interface Config extends Omit, Config$1 { /** * Base URL for all requests made by this client. */ baseUrl?: T['baseUrl']; /** * Fetch API implementation. You can use this option to provide a custom * fetch instance. * * @default globalThis.fetch */ fetch?: typeof fetch; /** * Please don't use the Fetch client for Next.js applications. The `next` * options won't have any effect. * * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. */ next?: never; /** * Return the response data parsed in a specified format. By default, `auto` * will infer the appropriate method from the `Content-Type` response header. * You can override this behavior with any of the {@link Body} methods. * Select `stream` if you don't want to parse response data at all. * * @default 'auto' */ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text'; /** * Should we return only data or multiple fields (data, error, response, etc.)? * * @default 'fields' */ responseStyle?: ResponseStyle; /** * Throw an error instead of returning it in the response? * * @default false */ throwOnError?: T['throwOnError']; } interface RequestOptions extends Config<{ responseStyle: TResponseStyle; throwOnError: ThrowOnError; }>, Pick, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> { /** * Any body that you want to add to your request. * * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} */ body?: unknown; path?: Record; query?: Record; /** * Security mechanism(s) to use for the request. */ security?: ReadonlyArray; url: Url; } interface ResolvedRequestOptions extends RequestOptions { headers: Headers; serializedBody?: string; } type RequestResult = ThrowOnError extends true ? Promise ? TData[keyof TData] : TData : { data: TData extends Record ? TData[keyof TData] : TData; request: Request; response: Response; }> : Promise ? TData[keyof TData] : TData) | undefined : ({ data: TData extends Record ? TData[keyof TData] : TData; error: undefined; } | { data: undefined; error: TError extends Record ? TError[keyof TError] : TError; }) & { /** request may be undefined, because error may be from building the request object itself */ request?: Request; /** response may be undefined, because error may be from building the request object itself or from a network error */ response?: Response; }>; interface ClientOptions$1 { baseUrl?: string; responseStyle?: ResponseStyle; throwOnError?: boolean; } type MethodFn = (options: Omit, 'method'>) => RequestResult; type SseFn = (options: Omit, 'method'>) => Promise>; type RequestFn = (options: Omit, 'method'> & Pick>, 'method'>) => RequestResult; type BuildUrlFn = ; query?: Record; url: string; }>(options: TData & Options) => string; type Client = Client$1 & { interceptors: Middleware; }; interface TDataShape { body?: unknown; headers?: unknown; path?: unknown; query?: unknown; url: string; } type OmitKeys = Pick>; type Options = OmitKeys, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit); type ClientOptions = { baseUrl: 'https://api.stage.tesouro.com' | 'https://api.sandbox.stage.tesouro.com' | 'https://api.stage.business-banking.app' | 'https://api.tesouro.com' | 'https://api.sandbox.tesouro.com' | 'https://api.business-banking.app' | (string & {}); }; type CreditCardStatus = 'PENDING_ACTIVATION' | 'ACTIVE' | 'LOCKED' | 'CLOSED'; type CreditCardType = 'DIGITAL' | 'PHYSICAL'; type DisclosureRequirement = 'NOT_REQUIRED' | 'REQUIRED'; type OrganizationType = 'BANK' | 'EMBEDDED' | 'PLATFORM' | 'TRANSACTOR' | 'VERTICAL_SOFTWARE_PROVIDER'; type WidgetInitResponse = { bankName?: null | string; /** * Whether the user has accepted the version currently in force. False for a user who accepted an * earlier version, which is what makes publishing a new one prompt them again, and false when * there is no user yet. Prompt on this rather than on `status`, which cannot answer it: an * already-active user can owe a re-acceptance while never being invited again. */ disclosuresAccepted?: boolean; /** * Whether embedded banking requires this widget session's user to accept disclosures. * Resolved through the organization hierarchy, nearest owner first: the organization asked about, * then its VSP, then its parent platform, then the bank, defaulting to NOT_REQUIRED. * Resolved for the user when there is one, which is the rung the acceptance writes against. * It falls back to the organization owning the widget application in the two cases where the user * cannot answer: before the user exists, which is what an onboarding widget needs, and when their * organization's settings chain resolves nothing at all. In that second case the acceptance * refuses rather than reporting the user clear, so a prompt shown here is never one the widget * can silently fail to record. */ disclosuresRequired?: DisclosureRequirement; organizationId?: null | string; organizationTypes?: null | Array; scopes: Array; status?: WidgetUserStatus; userId?: null | string; vspName?: null | string; }; type WidgetUserStatus = 'ACTIVE' | 'INACTIVE' | 'INVITED' | 'NOT_FOUND'; type EmbeddedClient = Client; type ExtractLiterals = T extends string ? string extends T ? never : T : never; type BaseUrl = ExtractLiterals; /** * Returns a new {@link EmbeddedClient} that is a shallow clone of `source`: * same config, and all existing interceptors copied in their original order. * * Use this inside a `configClient` callback when you want to add interceptors * without mutating the client instance that was passed in. * * @example * ```ts * const addLogging = useCallback((client: EmbeddedClient) => { * const cloned = cloneEmbeddedClient(client); * cloned.interceptors.request.use((req) => { * console.log('[widget]', req.method, req.url); * return req; * }); * return cloned; * }, []); * ``` */ declare function cloneEmbeddedClient(source: EmbeddedClient): EmbeddedClient; type LinkComponentProps = AnchorHTMLAttributes & { children?: ReactNode; }; type LinkComponent = ComponentType; /** * The UI frameworks a widget's UI layer can render with. * * - `shadcn` — the shadcn/Tailwind implementation. This is the default and the * implicit fallback, so existing consumers that select nothing keep rendering * shadcn. * - `tecton` — the Tecton implementation. * * Declared as an `as const` object (not a TypeScript `enum`) per repo * convention. */ declare const UIFramework: { readonly Shadcn: "shadcn"; readonly Tecton: "tecton"; }; type UIFramework = (typeof UIFramework)[keyof typeof UIFramework]; /** * A renderer is just a component that accepts the widget's public props. The * registry is keyed by a stable widget id (e.g. `'help-widget'`), so a single * extension can register implementations for many widgets at once. */ type AnyRenderer = ComponentType; type RendererMap = Record; /** A framework's design-system bootstrap (idempotent, SSR-safe). */ type DesignSystemEnsurer = () => Promise; /** * Registers UI renderers for a framework. Called by an extension package (never * by core) to make its implementations resolvable by the widget switches. * * Idempotent and additive: later calls merge into any existing map for the * framework, so multiple extensions (or repeated calls) compose rather than * clobber. Notifies mounted switches via `useSyncExternalStore`. * * @param framework - The framework these renderers implement (e.g. `'tecton'`). * @param map - Widget-id → component for that framework's surface. */ declare function registerUIRenderers(framework: UIFramework, map: RendererMap): void; /** * Registers a framework's design-system bootstrap (e.g. Tecton's * `ensureTectonDesignSystem`). Called by an extension; core invokes the * registered ensurer from its provider cascade when the resolved framework * matches. No-op resolution (undefined) means the extension is absent — core * simply does not bootstrap any non-shadcn design system. * * @param framework - The framework this ensurer bootstraps. * @param ensurer - Idempotent, SSR-safe bootstrap returning a `Promise`. */ declare function registerDesignSystemEnsurer(framework: UIFramework, ensurer: DesignSystemEnsurer): void; declare const ERROR_STATE_ID = "error-state"; interface PaginationFooterLabels { rowsPerPageLabel: string; previousPageButton: string; nextPageButton: string; } /** * The implementation a widget renders with. * * - `native` — the Tesouro-native implementation. This is the default and the * implicit fallback, so consumers that select nothing keep rendering native. * - `monite` — the Monite SDK implementation. * * Declared as an `as const` object (not a TypeScript `enum`) per repo * convention. */ declare const Implementation: { readonly Native: "native"; readonly Monite: "monite"; }; type Implementation = (typeof Implementation)[keyof typeof Implementation]; /** * The settable fields of the widget config cascade. * * This is the type accepted by {@link setGlobalWidgetConfig} and all provider props. * It intentionally excludes `initResponse`, which is populated automatically by the * provider after a successful fetch and must never be set manually. * * The `null` vs `undefined` distinction on `widgetToken` and `organizationId` is intentional: * - `undefined` — not set at this level; inherit from the nearest ancestor or global store. * - `null` — explicitly cleared; downstream sees "no value" even if an ancestor had one * (e.g. after logout or deliberate de-scoping). * * @see {@link WidgetConfig} for the resolved output type (includes `initResponse`) * @see {@link RootWidgetProvider} * @see {@link WidgetProvider} * @see {@link setGlobalWidgetConfig} */ interface WidgetConfigInput { /** * Base URL of the Tesouro embedded API (e.g. `"https://api.tesouro.com"`). * * When omitted the nearest ancestor's `baseUrl` or the global store value is used. * Changing this recreates the underlying HTTP client so all subsequent requests * go to the new host. */ baseUrl?: BaseUrl; /** * Bearer token used to authenticate widget requests. * * Injected as `Authorization: Bearer ` on every outgoing request via an * interceptor on the scoped HTTP client. Token updates are picked up immediately * without recreating the client. * * - `string` — send this token on all requests from this level downward. * - `null` — explicitly cleared; no auth header is sent and fetching is suppressed. * - `undefined` — not set at this level; inherit from the nearest ancestor or global store. */ widgetToken?: string | null; /** * Organization ID forwarded as the `x-organization-id` request header. * * Passed through {@link EmbedApiProvider} context rather than the auth interceptor, * so individual data-access hooks can opt in per-request. * * - `string` — use this organization for downstream data requests. * - `null` — explicitly cleared; queries that require an org ID will be disabled. * - `undefined` — not set at this level; inherit from the nearest ancestor or global store. * * When `undefined` across the **whole** cascade (no prop, no ancestor, no global * value), the resolved org defaults to the loaded `initResponse.organizationId` * (see {@link WidgetConfig.initResponse}) once the widget-init fetch settles. This * is the lowest-priority fallback — any explicit `string` or `null` at any cascade * level wins, and an explicit `null` is preserved and never falls back. * * Only an **explicit** ancestor org is inherited. An ancestor's *init-derived* * default does not propagate into a descendant that owns its own fetch (its own * `baseUrl`/`widgetToken`); such a descendant defaults to its own * `initResponse.organizationId` instead, so it never sends an ancestor's org with * its own token. */ organizationId?: string | null; /** * Optional post-creation hook for the scoped HTTP client. * * Called once after the provider creates its scoped {@link EmbeddedClient} and * applies the built-in `Authorization: Bearer` interceptor. Receives the * fully-configured client and must return the client to be used for the lifetime of * this provider level — either the same instance (with additional interceptors * attached) or a new client entirely. * * **Order:** The built-in auth interceptor is always applied first. `configClient` * is called on top of it, so any interceptors you add here run after auth is set. * * **Any prop triggers a scoped client.** A {@link WidgetProvider} creates its own * scoped client whenever any prop is set — including `configClient` alone, without * `baseUrl` or `widgetToken`. Only a fully props-free pass-through provider skips * client creation and never calls this function. * * **Stability:** The function reference is included in the client creation memo's * dependency array. Passing an unstable (inline) function recreates the client on * every render. Stabilize with `useCallback` or define the function outside the * component. * * **Cascade:** Inherits from the nearest ancestor when `undefined`. A child * {@link WidgetProvider} that creates its own scoped client will use the resolved * `configClient` from the cascade unless it provides its own override. * * @example * ```tsx * const addLogging = useCallback( * (client: EmbeddedClient) => { * client.interceptors.request.use((req) => { * console.log('[widget]', req.method, req.url); * return req; * }); * return client; * }, * [], * ); * * * * * ``` */ configClient?: (client: EmbeddedClient) => EmbeddedClient; /** * Overrides the widget-gateway routing decision for the scoped HTTP client. * * Any caller reaching the Tesouro API with a widget token must route data * requests through the widget gateway: prefix the path with * `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The * provider applies both automatically per request when the request origin is * a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the * generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the * init round-trip) always pass through untouched. * * - `undefined` — decide from the request origin, as above. Inherits from * the nearest ancestor or global store like every other config field. * - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a * custom domain in front of the gateway). * - `false` — never apply it. For hosts that route widget requests their own * way, such as a same-origin BFF whose `configClient` retargets every * request. * * Independent of {@link configClient}: a host that only adds a header keeps * the built-in routing, and the built-in interceptor runs before any * `configClient` interceptor. */ gatewayRouting?: boolean; /** * Component the embedded widgets should render in place of plain `` tags. * * Pass e.g. Next.js's `Link` to make in-app navigation use the host router. * Cascades like other config: provider prop > nearest ancestor > global store. * When no value is set anywhere, widgets fall back to a plain `` element. */ linkComponent?: LinkComponent; /** * Which UI framework the widget UI layer should render with. * * Lets a consuming context bind widgets to either the shadcn/Tailwind or the * Tecton implementation behind the same outward-facing API. The selection is * a presentation concern only — it cascades through the provider tree exactly * like {@link linkComponent} and is read by UI libraries via `useUIFramework`; * it never appears in any widget's feature-library or component props. * * - `'shadcn'` — the shadcn/Tailwind implementation. * - `'tecton'` — the Tecton implementation. * - `null` / `undefined` — not set at this level; inherit from the nearest * ancestor or global store, falling back to `shadcn` when unset everywhere. * `shadcn` is the implicit default, so existing consumers need no changes. */ uiFramework?: UIFramework | null; /** * Which implementation a widget renders with. * * Lets a consuming context bind widgets to either the Tesouro-native or the * Monite SDK implementation behind the same outward-facing API. It cascades * through the provider tree exactly like {@link linkComponent} and * {@link uiFramework} — provider prop > nearest ancestor > global store — and * is read via `useImplementation`. * * - `'native'` — the Tesouro-native implementation. * - `'monite'` — the Monite SDK implementation. * - `null` / `undefined` — not set at this level; inherit from the nearest * ancestor or global store, falling back to `native` when unset everywhere. * `native` is the implicit default, so existing consumers need no changes. */ implementation?: Implementation | null; } /** * Props shared by every analytics-owner-capable widget provider. * * Combines the full settable cascade ({@link WidgetConfigInput}) with the * analytics opt-out honored by analytics owners. Both {@link RootWidgetProvider} * and {@link WidgetProvider} build their public props on top of this; the latter * adds error-boundary props of its own. * * @see {@link WidgetConfigInput} for per-field cascade and `null` vs omitted semantics */ interface WidgetProviderBaseProps extends WidgetConfigInput { /** * Opt out of all analytics capture and prevent PostHog from loading. Default `true`. * * Honored only by an analytics **owner** — a {@link RootWidgetProvider} or a * standalone {@link WidgetProvider} with no parent provider. When `false`, * owner-bound `track` calls in this subtree become no-ops and the PostHog * installer is never dynamically imported for this owner's environment. * Setting it on a nested {@link WidgetProvider} is ignored in v1 (a one-time * `console.warn` is emitted to make the no-op discoverable). */ analytics?: boolean; } /** * The fully-resolved widget config at a given provider level. * * Extends {@link WidgetConfigInput} with `initResponse`, which is populated automatically * after a successful `GET /api/widget-gateway/init` fetch. This type is returned by * {@link useWidgetConfig} and represents the cascade result — it is never an input type. * * `initResponse` cascades as a **whole object** — it is either present (a fetch succeeded * at some level in the tree) or absent (`undefined`). Fields are never merged across levels. * It is cleared immediately when `widgetToken` or `baseUrl` changes to prevent stale tenant * data from persisting across auth boundaries. * * @see {@link WidgetConfigInput} for the input type accepted by providers and setGlobalWidgetConfig * @see {@link useWidgetConfig} */ interface WidgetConfig extends WidgetConfigInput { /** * The response from `GET /api/widget-gateway/init` for this level of the tree. * * Read-only — populated automatically by the provider. Use {@link useWidgetConfig} * to access it; do not attempt to set this field via {@link setGlobalWidgetConfig} * or provider props (those accept {@link WidgetConfigInput}, which excludes this field). * * Its `organizationId` also seeds the resolved {@link WidgetConfigInput.organizationId} * when the org is unset across the whole cascade. */ initResponse?: WidgetInitResponse; } /** * Replaces the global widget config and notifies all reactive subscribers. * * Designed for non-React entry points — web component hosts, imperative SDKs, or any * code outside the React tree — that need to push configuration into mounted widgets * before or after they render. Any mounted {@link RootWidgetProvider} or component * calling {@link useWidgetConfig} outside a provider re-renders automatically via * `useSyncExternalStore`. * * **Priority**: The global store is the lowest-priority fallback. Any prop passed * directly to a {@link RootWidgetProvider} or {@link WidgetProvider} overrides it. * * @param config - The new global config. **Replaces** the previous value entirely; * fields absent from `config` revert to `undefined` on the next read. * * @example * ```ts * // Web component attribute-change handler — outside the React tree * setGlobalWidgetConfig({ * baseUrl: 'https://api.tesouro.com', * widgetToken: tokenFromHost, * }); * ``` * * @see {@link getGlobalWidgetConfig} for a synchronous non-reactive read * @see {@link RootWidgetProvider} for the React provider that subscribes to this store */ declare function setGlobalWidgetConfig(config: WidgetConfigInput): void; /** * Merges a partial widget config into the global store and notifies subscribers. * * Unlike {@link setGlobalWidgetConfig}, this does **not** wipe untouched fields: * keys absent from `patch` are preserved. Keys explicitly present in `patch` — * including those set to `undefined` or `null` — overwrite. Use this when you * have a single field to update (most commonly a freshly fetched * `widgetToken`) without disturbing the rest of the global config. * * @param patch - The fields to merge into the existing global config. Omitted * keys are preserved; explicitly present keys replace their counterparts. * * @example * ```ts * setGlobalWidgetConfig({ baseUrl: 'https://api.tesouro.com', widgetToken: 'a' }); * updateGlobalWidgetConfig({ widgetToken: 'b' }); * // baseUrl is still 'https://api.tesouro.com' * ``` * * @see {@link setGlobalWidgetConfig} for the replace-all variant */ declare function updateGlobalWidgetConfig(patch: WidgetConfigInput): void; /** * Returns the current global widget config synchronously without subscribing to changes. * * Use this in non-React contexts such as event handlers or imperative callbacks where * you need a one-off read. For reactive reads inside React components use * {@link useWidgetConfig} instead. * * @returns The current {@link WidgetConfig} from the global store. The object is * replaced (not mutated) on each {@link setGlobalWidgetConfig} call — do not * cache the return value across renders or async boundaries. * * @see {@link setGlobalWidgetConfig} to write to the global store * @see {@link useWidgetConfig} for a reactive React hook alternative */ declare function getGlobalWidgetConfig(): WidgetConfigInput; /** * The widget-init state a non-React host observes. * * A discriminated union, so `status` narrows the payload: the `ready` branch * guarantees an `initResponse` and the `error` branch guarantees an `error`. * * - `idle` — no init in flight and none landed. The owner has no usable * `widgetToken` yet, or it was cleared (logout, de-scoping). Also the state * before any provider mounts and after the last one unmounts. A host that * supplies the token asynchronously — minting it before calling * `setGlobalWidgetConfig`, or mounting `RefreshingRootWidgetProvider`, which * passes `widgetToken={null}` while its fetcher runs — therefore sees `idle` * *before* `loading`, so loading chrome should cover both. The channel says * nothing about the mint itself: if it fails, the state stays `idle`, and * surfacing that is the host's job. * - `loading` — **no usable init response yet**, and a * `GET /api/widget-gateway/init` is in flight or about to be. This is the * first-load and token-rotation signal, *not* "a request is in flight": a * background refetch that still has a valid response for the active token * stays `ready`, so a host rendering from this channel never blanks * mid-session. (A host that needs to show a refresh indicator wants a * separate in-flight flag, which this channel does not carry.) * - `ready` — an init response fetched under the currently-resolved token. * - `error` — the last init fetch settled as a failure. `initResponse` rides * along when a previously-successful response is still valid for the active * token and only a later refetch failed, which is the same split * `useWidgetError()` + `useWidgetConfig()` expose together in the tree; a host * can render through a background failure instead of blanking. * * A response is never carried across a token change: while a rotation's * replacement fetch is in flight the status is `loading`, even though the React * tree deliberately keeps the previous response visible for UI continuity. */ type WidgetInitState = { status: 'idle'; } | { status: 'loading'; } | { status: 'ready'; initResponse: WidgetInitResponse; } | { status: 'error'; error: Error; initResponse?: WidgetInitResponse; }; /** * Returns the current widget-init state synchronously, without subscribing. * * The non-React equivalent of reading `useWidgetConfig().initResponse` + * `useWidgetLoading()` + `useWidgetError()` together. Use it for a one-off read * from an event handler or imperative SDK call, and pair it with * {@link subscribeToGlobalWidgetInitState} when you need to react to changes — * reading first closes the window where init settles before your subscription * lands. * * @returns The elected owner's {@link WidgetInitState}, or an `idle` state when * no provider is mounted. The object is replaced (never mutated) on change. * * @example * ```ts * const state = getGlobalWidgetInitState(); * if (state.status === 'ready' && state.initResponse.status === 'INVITED') { * showDisclosureGate(); * } * ``` * * @see {@link subscribeToGlobalWidgetInitState} for change notifications * @see {@link getGlobalWidgetConfig} for the matching read of the config store * @see {@link useWidgetConfig} for the React equivalent */ declare function getGlobalWidgetInitState(): WidgetInitState; /** * Subscribes to widget-init changes from outside the React tree. * * Designed for web-component and drop-in hosts, which have no hooks available * to them: it is the only way for such a host to branch on the user's init * status (`status`, `scopes`, `disclosuresRequired`, …) or to show its own * loading and error chrome around the widget tree. * * The listener fires only on change — not immediately on subscribe. Call * {@link getGlobalWidgetInitState} once alongside subscribing to pick up an * init that has already settled. * * @param listener - Called with the new state on every change. Repeat states * are collapsed, so a provider re-render that changes nothing does not fire. * @returns An unsubscribe function. Call it to stop receiving updates; the * channel holds no reference to the listener afterwards. * * @example * ```ts * const unsubscribe = subscribeToGlobalWidgetInitState((state) => { * // `idle` too, not just `loading`: a host that mints its own token sits at * // `idle` until the token lands. See {@link WidgetInitState}. * host.toggleSpinner(state.status === 'idle' || state.status === 'loading'); * if (state.status === 'ready') { * host.setDisclosureGate( * state.initResponse.disclosuresRequired === 'REQUIRED', * ); * } * }); * * // Cover an init that settled before this subscription: * const current = getGlobalWidgetInitState(); * * // Later, when the host tears down: * unsubscribe(); * ``` * * @see {@link getGlobalWidgetInitState} for a synchronous non-reactive read * @see {@link setGlobalWidgetConfig} for the matching non-React config channel */ declare function subscribeToGlobalWidgetInitState(listener: (state: WidgetInitState) => void): () => void; /** * Props for {@link RootWidgetProvider}. * * All fields are optional and come from {@link WidgetProviderBaseProps}. When a * field is omitted the global store value (set via {@link setGlobalWidgetConfig}) * is used as a reactive fallback. See {@link WidgetConfigInput} for per-field * cascade and `null` vs omitted semantics. */ interface RootWidgetProviderProps extends WidgetProviderBaseProps { /** * Host-supplied replacement for the `GET /api/widget-gateway/init` response. * * For first-party hosts whose users authenticate directly against the * Tesouro issuer: the host already holds a user access token whose claims * carry everything init would return, so the widget-gateway round-trip is * redundant. When this prop is set the provider skips the init fetch * entirely — no `/api/widget-gateway/init` request is made — and the given * object is exposed as `initResponse` to the whole subtree (scope gating, * org default, `useWidgetConfig()`), exactly as a fetched response would be. * * The `widgetToken` (typically the user's bearer access token in this mode) * is still required and still rides every data request as * `Authorization: Bearer `; only the init round-trip is bypassed. * * Embed integrations that mint widget JWEs must leave this unset — the * gateway init response is the source of truth for their scopes and status. */ unstable_initResponseOverride?: WidgetInitResponse; /** * Accept surface shown when an ACTIVE user owes a new disclosure version. * Pass `` (no invite * credentials) so gated widgets have somewhere to accept. Cascades to * nested WidgetProviders. */ disclosuresAcceptance?: ReactNode; } /** * Top-level provider for the widget config cascade. * * Place this **once** near the root of your React tree. It: * - Resolves `baseUrl`, `widgetToken`, and `organizationId` from its own props, * falling back to the global store (see {@link setGlobalWidgetConfig}) for any * prop that is `undefined`. * - Calls `GET /api/widget-gateway/init` whenever both `baseUrl` and `widgetToken` * resolve to a non-null value. The response is stored as `initResponse` and made * available to every descendant via {@link useWidgetConfig}. * - Creates a stable `QueryClient` once on mount and provides it via * `QueryClientProvider` for the entire subtree. * - Creates a scoped `@hey-api` HTTP client configured for `baseUrl`. The * `Authorization: Bearer` header is kept current via a ref-based interceptor so * token rotation never recreates the client. * - Provides `QueryClientProvider`, {@link EmbedApiProvider}, and `WidgetContext` * for the entire subtree. * * Reacts to {@link setGlobalWidgetConfig} calls after mount — any global change * that resolves a previously missing `baseUrl` or `widgetToken` triggers a fetch. * * @param props.baseUrl - API base URL. Falls back to `global.baseUrl` when omitted. * @param props.widgetToken - Auth token. Falls back to `global.widgetToken` when omitted. * @param props.organizationId - Org ID for data requests. Falls back to `global.organizationId`, * then to the init response's `organizationId` when unset everywhere. * @param props.children - The React subtree that will consume the widget context. * * @example * ```tsx * // Standard usage — one fetch for the whole tree * * * * ``` * * @example * ```tsx * // Host sets the URL globally; React tree only needs the token * setGlobalWidgetConfig({ baseUrl: 'https://api.tesouro.com' }); * * * * * ``` * * @see {@link WidgetProvider} for mid-tree token or URL overrides * @see {@link useWidgetConfig} to read the resolved config in descendants * @see {@link setGlobalWidgetConfig} to push config imperatively from outside React */ declare function RootWidgetProvider({ children, baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, implementation, analytics, unstable_initResponseOverride, disclosuresAcceptance, }: PropsWithChildren): React.JSX.Element; /** * Props for {@link WidgetProvider}. * * All fields are optional. When **all** are omitted the provider is a transparent * pass-through: no fetch is issued and all resolved values cascade unchanged from * the nearest ancestor. */ interface WidgetProviderProps extends WidgetProviderBaseProps { /** * Fallback rendered when a render-time exception is caught inside this * provider's subtree. Pass either a `ReactNode` (rendered directly) or a * render-prop receiving `{ error, resetErrorBoundary }` from * `react-error-boundary`. Default is a plain `role="alert"` div with * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`. */ errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode); /** * Called once when the boundary catches an error, before the fallback * renders. Use for telemetry / Sentry / partner logging. Exceptions * thrown from `onError` propagate per `react-error-boundary` semantics. */ onError?: (error: unknown, info: ErrorInfo) => void; /** * Accept surface shown when an ACTIVE user owes a new disclosure version. * Pass `` (no invite * credentials). Cascades like `linkComponent`. Omit on INVITED — that * path still uses invite-link `invitationToken`/`userId` on the host * landing page. WidgetProvider cannot import the widget itself (cycle). */ disclosuresAcceptance?: ReactNode; } declare const USStateAbbreviation: { readonly Alabama: "AL"; readonly Alaska: "AK"; readonly Arizona: "AZ"; readonly Arkansas: "AR"; readonly California: "CA"; readonly Colorado: "CO"; readonly Connecticut: "CT"; readonly Delaware: "DE"; readonly DistrictOfColumbia: "DC"; readonly Florida: "FL"; readonly Georgia: "GA"; readonly Hawaii: "HI"; readonly Idaho: "ID"; readonly Illinois: "IL"; readonly Indiana: "IN"; readonly Iowa: "IA"; readonly Kansas: "KS"; readonly Kentucky: "KY"; readonly Louisiana: "LA"; readonly Maine: "ME"; readonly Maryland: "MD"; readonly Massachusetts: "MA"; readonly Michigan: "MI"; readonly Minnesota: "MN"; readonly Mississippi: "MS"; readonly Missouri: "MO"; readonly Montana: "MT"; readonly Nebraska: "NE"; readonly Nevada: "NV"; readonly NewHampshire: "NH"; readonly NewJersey: "NJ"; readonly NewMexico: "NM"; readonly NewYork: "NY"; readonly NorthCarolina: "NC"; readonly NorthDakota: "ND"; readonly Ohio: "OH"; readonly Oklahoma: "OK"; readonly Oregon: "OR"; readonly Pennsylvania: "PA"; readonly RhodeIsland: "RI"; readonly SouthCarolina: "SC"; readonly SouthDakota: "SD"; readonly Tennessee: "TN"; readonly Texas: "TX"; readonly Utah: "UT"; readonly Vermont: "VT"; readonly Virginia: "VA"; readonly Washington: "WA"; readonly WestVirginia: "WV"; readonly Wisconsin: "WI"; readonly Wyoming: "WY"; }; type USStateAbbreviation = (typeof USStateAbbreviation)[keyof typeof USStateAbbreviation]; type WidgetTokenFetcher = () => Promise<{ widgetToken: string; exp?: number; }>; type WidgetTokenState = { status: 'loading'; } | { status: 'ready'; widgetToken: string; exp?: number; isRefreshing: boolean; lastError?: unknown; } | { status: 'error'; error: unknown; }; interface WidgetTokenManager { start(): void; stop(): void; refresh(): Promise; getState(): WidgetTokenState; subscribe(listener: () => void): () => void; } interface WidgetTokenRefreshProviderProps { fetcher: WidgetTokenFetcher; leadSeconds?: number; onToken?: (widgetToken: string) => void; } declare function WidgetTokenRefreshProvider({ fetcher, leadSeconds, onToken, children, }: PropsWithChildren): React.JSX.Element; type RefreshingRootWidgetProviderProps = Omit & WidgetTokenRefreshProviderProps; /** * One-stop provider that bundles {@link WidgetTokenRefreshProvider} and * {@link RootWidgetProvider} so callers don't have to wire `useWidgetToken()` * into the `widgetToken` prop themselves. Takes every `RootWidgetProvider` * prop *except* `widgetToken` (which is managed by the internal token * refresh manager) plus the refresh provider's `fetcher` / `leadSeconds` / * `onToken`. * * While the manager is `loading` or `error`, this passes `widgetToken={null}` * to `RootWidgetProvider`, deferring the init fetch until a valid token is * available. Once `ready`, it passes the live `state.widgetToken` through. * * Children render inside both providers' contexts, so `useWidgetToken()` and * `useWidgetConfig()` both work in descendants — useful for status badges, * retry buttons, etc. * * @example * ```tsx * { * const res = await fetch('/api/widget-token').then((r) => r.json()); * return { widgetToken: res.token, exp: res.exp }; * }} * > * * * ``` */ declare function RefreshingRootWidgetProvider({ fetcher, leadSeconds, onToken, children, ...rootProps }: PropsWithChildren): React.JSX.Element; /** * Returns the fully-resolved {@link WidgetConfig} for the nearest provider level. * * Reads from the nearest `WidgetContext` ancestor (set by {@link RootWidgetProvider} * or {@link WidgetProvider}) and falls back to the global store when called outside * any provider. Subscribes to {@link setGlobalWidgetConfig} calls reactively via * `useSyncExternalStore`. * * **Cascade priority** (highest to lowest): * 1. Nearest `WidgetProvider` / `RootWidgetProvider` own prop * 2. Global store (`setGlobalWidgetConfig`) * * @returns The resolved {@link WidgetConfig} at the nearest provider level. All fields * may be `undefined` if no values have been provided at any level. `initResponse` is * `undefined` until the first successful fetch completes. * * @example * ```tsx * function BankNameBadge() { * const { initResponse } = useWidgetConfig(); * if (!initResponse) return ; * return {initResponse.bankName}; * } * ``` * * @see {@link useWidgetLoading} to check whether a fetch is currently in progress * @see {@link useWidgetError} to check whether the last fetch failed * @see {@link useOwnWidgetConfig} to read only what the *current* level contributed */ declare function useWidgetConfig(): WidgetConfig; /** * Returns only the {@link WidgetConfig} fields explicitly set at the **current** * provider level, without inheriting from ancestors. * * Useful for debugging or conditional logic that needs to distinguish "set here" * from "inherited from parent". Fields not explicitly set at this level are * `undefined` even if a parent has a value. * * Does **not** subscribe to the global store — use {@link useWidgetConfig} if you * need the fully-resolved (cascaded) config. * * @returns The partial {@link WidgetConfig} owned by the nearest provider, or `null` * when called outside any provider context. * * @example * ```tsx * function DebugLayer() { * const own = useOwnWidgetConfig(); * // e.g. { baseUrl: undefined, widgetToken: 'tok_partner', organizationId: undefined } * // — only widgetToken was set at this provider level * console.log('own config at this level:', own); * return null; * } * ``` * * @see {@link useWidgetConfig} to read the fully-resolved cascaded config instead */ declare function useOwnWidgetConfig(): WidgetConfigInput | null; /** * Host-supplied AcceptDisclosuresWidget (or equivalent) for ACTIVE users who * owe a new disclosure version. `undefined` outside a provider or when the * host has not passed `disclosuresAcceptance`. */ declare function useDisclosuresAcceptanceSurface(): ReactNode | undefined; /** * Returns a stable callback that re-triggers the widget-init fetch at the * **nearest provider level that owns a fetch**. * * Pass-through {@link WidgetProvider} instances (no own `baseUrl`/`widgetToken`) * automatically bubble this up the tree, so the returned function always targets * the correct fetch-owning ancestor regardless of nesting depth. * * Re-fetching keeps the current `initResponse` visible while the request is in * flight — the previous data is not cleared until the new response arrives. This * prevents a blank/loading flash during background refreshes. * * **A failed re-fetch keeps it visible too**, and only sets * {@link useWidgetError}. `useWidgetFetch` clears the retained response for a * *client* change, which is an auth boundary; a re-fetch is not one, so the * previous response is still valid for the active token. This line previously * said the opposite, which matters: a consumer branching on `!initResponse` * would conclude a failed refresh drops it back to its pre-init state, when in * fact it keeps rendering the response it already had. Verified against the * running provider (EMBD-4911) — a suite gating on a field of the init response * holds that gate closed after a failed refresh rather than falling open. * * @returns A stable `() => void` function. Calling it increments an internal counter * that re-triggers the fetch effect. Returns a no-op when called outside any provider. * * @example * ```tsx * function RefreshButton() { * const refetch = useRefetchWidget(); * return ; * } * ``` * * @see {@link useWidgetLoading} to show a loading indicator during the re-fetch * @see {@link useWidgetError} to handle fetch failures after a re-fetch */ declare function useRefetchWidget(): () => void; /** * Returns `true` while the nearest fetch-owning provider has a widget-init * request in flight, `false` otherwise. * * Pass-through {@link WidgetProvider} instances (no own `baseUrl`/`widgetToken`) * bubble this up automatically, so the value always reflects the owning ancestor * regardless of nesting depth. * * `loading` transitions to `true` immediately when a fetch starts (including * manual refetches) and back to `false` when the fetch settles — whether it * succeeds or fails. * * @returns `true` during an active fetch, `false` at all other times. * Returns `false` when called outside any provider. * * @example * ```tsx * function WidgetShell() { * const loading = useWidgetLoading(); * const { initResponse } = useWidgetConfig(); * * if (loading && !initResponse) return ; * if (!initResponse) return null; * return ; * } * ``` * * @see {@link useWidgetError} for fetch failure state * @see {@link useRefetchWidget} to manually trigger a re-fetch */ declare function useWidgetLoading(): boolean; /** * Returns the most recent fetch error from the nearest fetch-owning provider, * or `null` when the last fetch succeeded (or no fetch has run yet). * * Pass-through {@link WidgetProvider} instances (no own `baseUrl`/`widgetToken`) * bubble this up automatically, so the value always reflects the owning ancestor * regardless of nesting depth. * * The error is cleared automatically when: * - `widgetToken` or `baseUrl` changes (a new fetch is about to start). * - A subsequent fetch succeeds. * * A first-load failure leaves `initResponse` from {@link useWidgetConfig} * undefined. A failed same-token refetch can keep the previous response visible * because it is still valid for the active token; token/client changes never * carry the old response across the auth boundary. * * API errors thrown by the HTTP client (4xx/5xx responses) are wrapped in a plain * `Error` with `error.cause` set to the raw response body for inspection. * * @returns The `Error` from the last failed fetch, or `null`. Returns `null` when * called outside any provider. * * @example * ```tsx * function WidgetShell() { * const error = useWidgetError(); * const { initResponse } = useWidgetConfig(); * const refetch = useRefetchWidget(); * * if (error) return ; * if (!initResponse) return ; * return ; * } * ``` * * @see {@link useWidgetLoading} for in-flight request status * @see {@link useRefetchWidget} to retry after an error */ declare function useWidgetError(): Error | null; interface UseWidgetTokenResult { state: WidgetTokenState; refresh: () => Promise; /** * Synchronously read the manager's current state without subscribing the * caller to re-renders. Useful for non-React callbacks (e.g. a Monite * `fetchToken` callback) that need the post-`await refresh()` token without * the React render lag of `state`. */ getState: () => WidgetTokenState; } declare function useWidgetToken(): UseWidgetTokenResult; /** * Which issuing product a card belongs to. A card list shows exactly one * program at a time, and the value selects the endpoint the data-access layer * calls: `credit` → `/embedded-banking/v1/credit-cards`, `debit` → * `/embedded-banking/v1/debit-cards`. * * Defined here rather than in either widget because `CardsWidget` and * `CardDetailsWidget` both publish it as a required public prop. Declared * inline in each, the literal would become public API twice with no single * definition — and `cards-widget/ui` ↔ `card-details-widget/ui` imports are * lint-banned while the reverse feature import would be an Nx cycle, so * `shared/feature` is the only home that serves both without duplication. * * Deliberately **not** the generated `CardTypeEnum` (`credit | debit | prepaid * | unknown`), which greps as an exact match for this concept but belongs to * the unrelated snake_case third-party schema family (its sibling fields are * `card_type`, `last4`, `background_color`) and carries two members neither * widget supports. In this codebase "card type" is the DIGITAL/PHYSICAL form * factor instead — see `CardType` in `./cardPresentation`. * * Const-object-plus-type rather than a bare union, mirroring `UIFramework` in * `shared/ui` — the other two-member literal that ships as a public prop type. */ declare const CardProgram: { readonly Credit: "credit"; readonly Debit: "debit"; }; type CardProgram = (typeof CardProgram)[keyof typeof CardProgram]; /** * A card's lifecycle status, program-agnostic. Aliases the credit union because * one of the two has to be the base; the parity assertions below are what keep * that choice arbitrary. */ type CardStatus = CreditCardStatus; /** * A card's physical form factor — the codebase's meaning of "card type". The * credit/debit axis is `CardProgram`, not this. */ type CardType = CreditCardType; /** * Host-supplied URLs for the four disclosure documents. * * @deprecated The widget fetches title/url pairs from * `GET /identity/v1/disclosures`. This type remains exported so existing * consumers continue to typecheck until a coordinated breaking release. */ interface AcceptDisclosuresLinks { termsOfUseUrl: string; privacyPolicyUrl: string; electronicCommunicationsAgreementUrl: string; usaPatriotActUrl: string; } type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage'; type InnerProps = Omit & { /** * Invitation token from the invite link. Bound into the disclosures lookup * before activation, and used to remount consent state when the invite * changes. This widget does not read URL search params. * * Supply it (with {@link userId}) for the invite flow. Omit both for an * already-active user re-accepting a newly published version — they hold no * invite, and the widget token identifies them on both calls. See * `useAcceptWidgetDisclosures`. */ invitationToken?: string; /** * Invited user id from the invite link. Paired with {@link invitationToken} * for the disclosures lookup and remount identity; omitted with it outside the * invite flow. */ userId?: string; /** * Called after the atomic accept succeeds and before init refresh is kicked. * May return a promise — the widget awaits it before locking controls and * refreshing init, so a rejected continuation surfaces as an error and leaves * Accept retryable (and the host gate stays mounted). */ onAccepted?: () => void | Promise; /** * @deprecated Ignored. Documents come from `GET /identity/v1/disclosures`. * Kept so existing hosts that still pass this continue to typecheck until a * coordinated breaking release. */ disclosureLinks?: AcceptDisclosuresLinks; }; type AcceptDisclosuresWidgetProps = WidgetProviderProps & InnerProps; /** * Self-contained AcceptDisclosures widget. Fetches the caller's disclosure * document set (title/url pairs, in presentation order) from * `GET /identity/v1/disclosures` and renders it directly — the host supplies * no document URLs. An empty document list (`NOT_REQUIRED`) still renders * Accept so those invitees can activate. Posts * `POST /api/widget-gateway/disclosure-acceptance` with the version that was * on screen after confirming that version is still in force (and the invite * still valid, when one was supplied) via the widget-gateway proxy. A newer * published version is refused rather than accepted unseen. The POST * activates the invitee and records acceptance in one transaction, then * awaits any `onAccepted` continuation and kicks a widget-init refresh so * host gates keyed on `INVITED` — or on the disclosure flags — can clear. * Auth uses the normal WidgetToken provider contract — never an APP/M2M * bearer. * * Two flows, one surface: the pre-auth invite flow passes `invitationToken` + * `userId`; an already-active user who owes a re-acceptance (widget init * reports `disclosuresRequired: 'REQUIRED'` with `disclosuresAccepted: false`) * passes neither, and the same init refresh clears the gate that mounted this. * See `WidgetSuite`, which mounts it as its acceptance state. */ declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element; interface Labels$6 { title: string; bankingTaglinePrefix: string; availableBalanceLabel: string; availableBalanceTooltip: string; accountNumberLabel: string; routingNumberLabel: string; addAccountButton: string; emptyAccountsLabel: string; createDialogTitle: string; createDialogSubtitle: string; createNicknameLabel: string; createNicknameRequiredError: string; /** Use `{agreementLink}` for the deposit-agreement link placeholder. */ createLegalTemplate: string; /** * Rendered instead of {@link Labels.createLegalTemplate} when the host supplies * no `depositAgreementUrl`. Must not reference an agreement — see * `CreateAccountDialog`. */ createLegalTemplateWithoutAgreement: string; createLegalAgreementLink: string; createTeamAccessHeading: string; createDialogCloseAriaLabel: string; createCancelButton: string; createSubmitButton: string; teamMembersLoadingLabel: string; teamMembersErrorTitle: string; teamMembersEmptyLabel: string; teamMemberAccessTooltip: string; toggleAccountNumberVisibility: string; copyAccountNumber: string; copyRoutingNumber: string; copiedLabel: string; openAccountAriaLabel: string; loadingLabel: string; errorTitle: string; } interface Labels$5 { backToAccounts: string; bankingTaglinePrefix: string; availableBalanceLabel: string; availableBalanceTooltip: string; transactionsTab: string; statementsTab: string; detailsTab: string; noTransactionsLabel: string; transactionDateColumn: string; transactionDescriptionColumn: string; transactionAmountColumn: string; transactionBalanceColumn: string; exportButton: string; exportDialogTitle: string; exportDialogDescription: string; exportDialogCloseAriaLabel: string; exportStartDateLabel: string; exportEndDateLabel: string; exportStartDatePlaceholder: string; exportEndDatePlaceholder: string; exportCancelButton: string; exportDownloadButton: string; noStatementsLabel: string; editAccountMenuItem: string; editDialogTitle: string; editNicknameLabel: string; editDialogCloseAriaLabel: string; editCancelButton: string; editSaveButton: string; editErrorTitle: string; detailsSectionTitle: string; receiveMoneySectionTitle: string; domesticWireTitle: string; domesticWireIntro: string; domesticWireNote: string; wireDetailsSectionTitle: string; bankNameLabel: string; bankAddressLabel: string; thingsToKnowHeading: string; thingsToKnowBody: string; supportQuestionsPrefix: string; supportTeamLink: string; routingNumberLabel: string; accountNumberLabel: string; copyLabel: string; copiedLabel: string; toggleAccountNumberVisibility: string; loadingLabel: string; errorTitle: string; } interface FeatureLabels$5 { accountFallback: string; createSuccessToast: string; editSuccessToast: string; copyAccountNumberToast: string; copyRoutingNumberToast: string; /** Account-details export toast — forwarded to AccountDetailsWidget. */ exportLoadingToast: string; /** Account-details export toast — forwarded to AccountDetailsWidget. */ exportSuccessToast: string; /** Account-details export toast — forwarded to AccountDetailsWidget. */ exportErrorToast: string; } interface BankAccountsWidgetProps extends WidgetProviderProps { labels?: Partial; accountDetailsLabels?: Partial; featureLabels?: Partial; isBankingTaglineVisible?: boolean; /** * Bank logo for the tagline row. The widget ships no bank artwork of its own — * an embeddable library must not depend on a Tesouro-hosted asset a host page's * content-security policy can block (PLAT-1179). Omit it and the row renders * the bank name alone. */ bankLogoSrc?: string; bankLogoAlt?: string; /** Deposit-agreement PDF linked from the create-account legal copy when supplied. */ depositAgreementUrl?: string; /** Bank postal address shown in the account-details domestic wire panel. */ bankAddress?: string; /** Support URL linked from the account-details domestic wire copy. */ supportTeamUrl?: string; 'data-testid'?: string; /** * Controlled selection. Pass `null` to clear, a string to select an account. * Leave undefined for uncontrolled behavior (driven by `defaultSelectedAccountId`). */ selectedAccountId?: string | null; /** Initial selected account when uncontrolled. */ defaultSelectedAccountId?: string | null; /** Called when the user opens account details or goes back to the list. */ onSelectedAccountIdChange?: (accountId: string | null) => void; } declare function BankAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: BankAccountsWidgetProps): React.JSX.Element; /** * Action handlers for custom payment flows in payable operations. * * These handlers provide fine-grained control over payment workflows, allowing customers to: * - Integrate external payment providers * - Implement custom approval processes or multi-step authentication * - Add specialized banking solutions or enterprise payment workflows * - Control UI feedback and data refresh timing after payment completion * * @example Custom payment provider integration: * ```typescript * const onPay = (id: string, _data?: unknown, actions?: PayActionHandlers) => { * // Start custom payment flow * initiatePayment(id) * .then(() => { * // Payment successful - update SDK state and show success message * actions?.resolve({ showToast: true }); * }) * .catch((error) => { * // Payment failed - update SDK state and show error message * actions?.reject(error, { showToast: true }); * }); * }; * ``` */ type PayActionHandlers = { /** * Call when a custom payment flow has been successfully initiated/completed. * This triggers SDK's built-in state management: refreshes payable data, * payment records, and optionally displays success feedback to the user. * * @param options.showToast - Whether to display a success toast notification */ resolve: (options?: { showToast?: boolean; }) => void; /** * Call when a custom payment flow failed or was cancelled by the user. * This triggers SDK's built-in state management: refreshes payable data, * payment records, and optionally displays error feedback to the user. * * @param error - Optional error details from the failed payment attempt * @param options.showToast - Whether to display an error toast notification */ reject: (error?: unknown, options?: { showToast?: boolean; }) => void; }; type UsePayableDetailsProps = { /** * The ID of the payable */ id?: string; /** when provided it takes precedence over component settings */ enableGLCodes?: boolean; /** when provided it makes the payable open in edit mode */ shouldOpenInEditMode?: boolean; /** * Callback function that is called when the payable is saved * * @param {string} id - The ID of the payable * * @returns {void} */ onSaved?: (id: string) => void; /** * Callback function that is called when the payable is canceled * * @param {string} id - The ID of the payable * * @returns {void} */ onCanceled?: (id: string) => void; /** * Callback function that is called when the payable is submitted * * @param {string} id - The ID of the payable * * @returns {void} */ onSubmitted?: (id: string) => void; /** * Callback function that is called when the payable is rejected * * @param {string} id - The ID of the payable * * @returns {void} */ onRejected?: (id: string) => void; /** * Callback function that is called when the payable is approved * * @param {string} id - The ID of the payable * * @returns {void} */ onApproved?: (id: string) => void; /** Callback function that is called when the payable is reopened * * @param {string} id - The ID of the payable * * @returns {void} */ onReopened?: (id: string) => void; /** Callback function that is called when the payable is deleted * * @param {string} id - The ID of the payable * * @returns {void} */ onDeleted?: (id: string) => void; /** * Callback function that is called when the user press the Pay button * * @param {string} id - The ID of the payable * * @returns {void} */ onPay?: (id: string, _data?: unknown, actions?: PayActionHandlers) => void; }; type PayablesProps = { pageTitleComponent: (children: ReactNode) => ReactNode; /** * Enable GL code selection for payable line items. * When true, users can assign GL codes to individual line items. * GL codes are fetched from the connected accounting system. */ enableGLCodes?: boolean; /** Arrival prop: 'create' opens the create-bill dialog on mount. */ initialView?: 'create'; /** Arrival prop: preselects this counterpart in the create-bill form. */ initialCounterpartId?: string; } & Partial>; type ReceivablesProps = { pageTitleComponent: (children: ReactNode) => ReactNode; /** * Display name of the sponsor bank that powers embedded bank accounts, e.g. * "Zenith Bank". Shown next to embedded accounts as "Powered by * {embeddedBankName}" in the invoice payment account picker, on both the * create and the edit form. */ embeddedBankName?: string; /** Arrival prop: 'create' opens the create-invoice dialog on mount. */ initialView?: 'create'; /** Arrival prop: preselects this counterpart in the create-invoice form. */ initialCounterpartId?: string; }; type ALIGN_DIALOG_TYPES = 'left' | 'right'; declare module '@mui/material/transitions' { interface TransitionProps { alignDialog?: ALIGN_DIALOG_TYPES; } } interface FinopsThemeColors { primary?: string; primaryForeground?: string; } interface MoniteWrapperProps { finopsThemeColors?: FinopsThemeColors; } type MoniteRegionProviderProps = WidgetProviderProps & MoniteWrapperProps; type BillPayWidgetMoniteProps = MoniteRegionProviderProps & Omit & { pageTitleComponent?: PayablesProps['pageTitleComponent']; }; type BillPayWidgetProps = BillPayWidgetMoniteProps; /** * BillPay widget entry point — selects the rendering implementation. * * BillPay is deliberately **pinned to `monite`** until the Tesouro-native * (shadcn) build reaches parity (epic EMBD-2171; * `docs/billpay-usification-shadcn/technical-design.md` §2). `native` is the * global default across widgets, so BillPay applies its own `monite` fallback * whenever *nothing* selects an implementation — this is what keeps the native * build off by default. * * An explicit selection is still honored, whether it comes from this widget's * `implementation` prop or from the provider/global cascade * (`RootWidgetProvider implementation="native"`, `setGlobalWidgetConfig`). We * read the *raw* cascade value (undefined when unset) rather than the resolved * one so the global `native` default does not leak past the pin. The cutover is * a one-line change: drop the `monite` fallback once native is at parity. */ declare function BillPayWidget({ implementation, ...props }: BillPayWidgetProps): React.JSX.Element; /** * Every key of `T` optional, recursively, so a consumer can override one nested * label without restating its siblings. Defined locally because the repo has no * shared deep-partial type and does not depend on `type-fest`. */ type PartialDeep$4 = { [K in keyof T]?: T[K] extends object ? PartialDeep$4 : T[K]; }; interface CardsListColumnHeaderLabels { cardName: string; fundingAccount: string; cardholder: string; status: string; limit: string; } /** * Screen-reader-only copy naming the details sheet a row click opens. * * Both strings are invisible by design: the sheet's visible header belongs to * whatever the owner slots into it (`CardDetailsPanel`, via `CardsWidget`), and a * second visible title would duplicate it. They exist because the sheet is a * dialog, and a dialog without an accessible name is announced as nothing. */ interface CardsListDetailsSheetLabels { /** Accessible name for the sheet. */ title: string; /** Accessible description, announced after the name. */ description: string; } /** * Every user-facing string the cards list renders, including screen-reader-only * copy and the decorative separators. * * There is intentionally **no** card-type or card-status map here: the row * arrives with `typeLabel` and `statusLabel` already resolved, so the * `DIGITAL`/`PHYSICAL` and `PENDING_ACTIVATION`/`ACTIVE`/`LOCKED`/`CLOSED` maps * live in `shared/feature` keyed on the generated types (EMBD-4404 amendment; * see `statusBadge.ts`). That is also where the "label keys carry the code term, * values carry the copy" rule applies — `digital`, never `virtual`, so a later * wording change is not a breaking rename. */ interface CardsListLabels { title: string; /** Accessible name for the list region. */ regionLabel: string; columnHeaders: CardsListColumnHeaderLabels; /** Screen-reader name for the unheaded trailing row-actions column. */ rowActionsColumn: string; showMyCardsToggle: string; createCardButton: string; activateButton: string; /** Accessible name for a row's Activate button; the card name is appended. */ activateButtonForCard: string; /** Accessible name for a row's open-details control; card name appended. */ selectCardButton: string; /** Separator between a card's nickname and its last four digits. */ cardNameSeparator: string; /** Stands in for the limit when a card has none set. */ noLimit: string; /** Announced while a page of cards is loading. */ loadingLabel: string; emptyTitle: string; emptyDescription: string; errorTitle: string; errorDescription: string; retryButton: string; pagination: PaginationFooterLabels; /** * Copy for the details sheet a row click opens. Rendered by * `CardsListDetailsSheet` rather than by the table, but part of this surface * because it is one screen and one `labels` prop — the same reason `pagination` * sits here for a footer that lives in `shared/ui`. */ detailsSheet: CardsListDetailsSheetLabels; /** * Screen-reader copy for the same sheet when Create card is slotted in, rather * than a selected card's details. Same chrome, different accessible name. */ createSheet: CardsListDetailsSheetLabels; } /** Accessible copy for the panel header's controls. */ interface CardDetailsHeaderLabels { /** Fallback title when the card has no nickname. */ untitledCard: string; /** Accessible name for the kebab that opens the card actions menu. */ menuTriggerAriaLabel: string; /** Accessible name for the close (X) control. */ closeAriaLabel: string; } /** Accessible copy for the simplified card face. */ interface CardDetailsCardFaceLabels { /** Alt text for the bank logo when the caller supplies no `bankLogoAlt`. */ bankLogoAlt: string; } /** Row headings and per-row copy affordance names for the details table. */ interface CardDetailsFieldLabels { cardholder: string; nickname: string; billingAddress: string; allowedCategories: string; /** Stands in for a row whose value the card does not carry. */ emptyValue: string; copyCardholderAriaLabel: string; copyNicknameAriaLabel: string; copyBillingAddressAriaLabel: string; } /** Copy for the three non-loaded screens. */ interface CardDetailsStatusScreenLabels { /** Accessible name announced while the panel is loading. */ loadingAriaLabel: string; errorTitle: string; errorDescription: string; errorRetry: string; notFoundTitle: string; notFoundDescription: string; } interface CardDetailsPanelLabels { header: CardDetailsHeaderLabels; cardFace: CardDetailsCardFaceLabels; fields: CardDetailsFieldLabels; status: CardDetailsStatusScreenLabels; } /** * Deep partial for label overrides. * * Both label surfaces this widget exposes have nested groups, and a shallow * `Partial` would let a consumer who overrides one nested string drop the rest * of that group. The repo has no shared `PartialDeep` and does not depend on * `type-fest`, so each labels module defines its own — `card-details-widget/ui` * has an identical one for the panel's labels, and this declaration also types * that prop here so the widget carries one such helper rather than two. */ type PartialDeep$3 = { [K in keyof T]?: T[K] extends object ? PartialDeep$3 : T[K]; }; /** * Copy the **feature** layer owns, as opposed to the panel's own * `CardDetailsPanelLabels`. * * The split follows where the string is resolved, not where it is painted. A * status badge word is chosen by mapping a generated `cardStatus` enum member, * which is a data-access-typed decision the presentational layer is not allowed * to make — so it is overridable here even though the panel renders it. The * panel's own labels stay with the panel. */ interface CardDetailsFeatureLabels { /** Confirmation toast after a copy affordance writes to the clipboard. */ copySuccessToast: string; /** Program wording on the card face, keyed on the widget's `cardProgram`. */ programLabels: Record; /** Status badge wording, keyed on the generated card status. */ statusLabels: Record; /** Form-factor subtitle wording, keyed on the generated card type. */ formFactorLabels: Record; } interface CardDetailsWidgetProps extends WidgetProviderProps { /** Id of the card to show. */ cardId: string; /** * Which issuing product `cardId` belongs to. **Required, with no default** — * it selects the endpoint the card is fetched from, and a wrong guess would * 404 a card that exists. `CardsWidget` publishes the same required prop, so * one value configures a list and its detail panel together. * * A JavaScript consumer, or a host passing a route param straight through, can * still get a value past the type. **There is no catch-all and no default:** * anything that is not explicitly one of the two programs fetches nothing and * renders the panel's error state with no retry, and the reason is named on the * console. That covers an absent prop (`undefined` / `null`) as well as an * unrecognised one (`'prepaid'`, a case-wrong `'Credit'`), because the widget * cannot know which product to ask about in either case. * * A host that resolves the program asynchronously should gate its own render on * it rather than mounting this widget without it — an absent program is not * read as "still loading". */ cardProgram: CardProgram; /** * Called when the header's close control is pressed. Omitting it renders no * close control at all: a standalone card page has nothing to close back to, * while a host rendering the panel in a drawer supplies this and suppresses * its own chrome's close button so the two do not sit side by side. */ onClose?: () => void; /** Overrides for the panel's own copy. */ labels?: PartialDeep$3; /** Overrides for the copy this layer resolves — see `CardDetailsFeatureLabels`. */ featureLabels?: PartialDeep$3; /** * Bank logo for the card face. The widget ships no bank artwork of its own and * resolves none from the init response: an embeddable library must not depend * on a Tesouro-hosted asset a host page's content-security policy can block, * and a bundled bank-name→URL table would put internal CDN links in the * published package (PLAT-1179, embedded ADR 0005). Omit it and the card face * renders without a logo rather than with a placeholder. */ bankLogoSrc?: string; bankLogoAlt?: string; } /** * Read-only details for one card, standalone-capable. * * Provides its own `WidgetProvider`, so it renders with nothing above it — a * partner can mount it on a real `/cards/[id]` page. Nested inside another * widget's provider with no auth props of its own, it inherits that init * response and `QueryClient` instead, costing no second `/init` call and sharing * one cache with the list that opened it. Do not forward `baseUrl` or * `widgetToken` into it from a parent widget: either one flips this provider into * fetch mode and buys a redundant init request per open. * * Both placements are covered by specs, because they take different code paths * through the provider and this export exists for the standalone one. */ declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element; type PartialDeep$2 = { [K in keyof T]?: T[K] extends object ? PartialDeep$2 : T[K]; }; interface CreateCardWidgetLabels { header: { title: string; closeAriaLabel: string; }; cardArtAlt: string; setup: { sectionTitle: string; sectionDescription: string; cardholderLabel: string; cardholderPlaceholder: string; cardFormatLabel: string; cardFormatPlaceholder: string; cardFormatVirtual: string; cardFormatPhysical: string; fundingAccountLabel: string; fundingAccountPlaceholder: string; }; mailing: { sectionTitle: string; sectionDescription: string; businessTitle: string; businessDescription: string; customTitle: string; customDescription: string; }; manualAddress: { streetLabel: string; cityLabel: string; stateLabel: string; statePlaceholder: string; zipLabel: string; }; preparing: { title: string; description: string; }; success: { title: string; description: string; createAnother: string; viewCard: string; }; footer: { cancel: string; createCard: string; }; cardholderError: { title: string; description: string; retry: string; }; fundingAccountError: { title: string; description: string; retry: string; }; } interface CreateCardFeatureLabels { toast: { creating: string; success: string; error: string; }; untitledFundingAccount: string; /** * Success-screen copy chosen from the create response's `cardStatus`. * Active/ready wording lives on the UI defaults; these cover statuses that * must not claim the card is already usable. */ success: { pendingActivationTitle: string; pendingActivationDescription: string; createdTitle: string; createdDescription: string; }; } declare const CREATE_CARD_FEATURE_LABELS_EN: CreateCardFeatureLabels; declare function resolveCreateCardFeatureLabels(overrides?: Partial<{ toast: Partial; untitledFundingAccount: string; success: Partial; }>): CreateCardFeatureLabels; type CreateCardWidgetProps = WidgetProviderProps & { /** Static card plastic image URL (no overlays). Host / white-label supplied. */ cardArtSrc: string; labels?: PartialDeep$2; featureLabels?: Partial<{ toast: Partial; untitledFundingAccount: string; success: Partial; }>; className?: string; onClose?: () => void; onCancel?: () => void; /** Fired with the new debit card id after a successful create. */ onViewCard?: (cardId: string) => void; }; /** * Self-contained Create Card widget. Issues a debit card via the Embed API and * drives setup → preparing → success with sonner toasts for the mutation. */ declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CreateCardWidgetProps): React.JSX.Element; /** Opaque UI format values — mapped to API `DebitCardType` in the feature. */ declare const CardFormatValue: { readonly Virtual: "virtual"; readonly Physical: "physical"; }; type CardFormatValue = (typeof CardFormatValue)[keyof typeof CardFormatValue]; /** * Every key of `T` optional, recursively, so a consumer can override one nested * label without restating its siblings. Defined locally because the repo has no * shared deep-partial type and does not depend on `type-fest` — same helper the * two card `ui` libs declare. */ type PartialDeep$1 = { [K in keyof T]?: T[K] extends object ? PartialDeep$1 : T[K]; }; /** * Strings this layer produces rather than passes through. * * They are separate from `CardsListLabels` (the `ui` lib's) because the cells * reaching that library are already formatted: the em-dash, the nickname * fallback and the "Viewing" prefix are all written *here*, so the UI lib has * no key to override them with. `bank-accounts-widget`'s `featureLabels` is the * precedent for the split. * * The status and form-factor maps live here for the same reason. EMBD-4503's * amendment put them in `shared/feature` keyed on the generated unions, and the * row arrives with `statusLabel` / `typeLabel` resolved — so this is the only * layer a consumer could reach them through. */ interface CardsFeatureLabels { /** * Stands in for a cell the card program carries no value for — credit has no * funding account, and a debit card's funding account is unresolvable without * the bank-account read scope. */ emptyValue: string; /** Name shown for a card with no nickname set. */ untitledCard: string; /** * Last-resort name for a funding account with neither a nickname nor an * account number to mask. An account with no nickname shows `••••1234` * instead, so that two unnamed accounts stay distinguishable — this is only * for the case where there is nothing at all to show. */ untitledFundingAccount: string; /** Display copy per card lifecycle status; keys are the generated code terms. */ cardStatus: Record; /** Display copy per card form factor; keys are the generated code terms. */ cardType: Record; } interface CardsWidgetPagination { /** Cursor for the page on screen. Omit for the first page. */ paginationToken?: string; /** Number of rows requested per page. */ pageSize: number; } interface CardsWidgetPaginationInput { paginationToken?: string; pageSize?: number; } interface CardsWidgetProps extends WidgetProviderProps { /** * Which issuing program the list shows — `'credit'` or `'debit'`. * * **Required, with no default.** A cards list shows exactly one program, and * the value selects the endpoint that is read as well as which scopes gate the * affordances. Defaulting it would make the choice invisible at the call site * and would silently pick a program for a host that meant the other one. */ cardProgram: CardProgram; /** * Controlled cursor/page-size metadata. Supply with `onPaginationChange` when * a host owns the list position, e.g. URL-backed pagination. */ pagination?: CardsWidgetPaginationInput; /** * Initial cursor/page-size metadata for uncontrolled usage. Omit for first * page with the default page size. Ignored when `pagination` is supplied. */ defaultPagination?: CardsWidgetPaginationInput; /** * Called whenever the widget changes its cursor/page-size pair through pagination * controls or a cursor-invalidating reset such as page-size changes. Hosts that * persist list position should store this whole object, not the token alone. */ onPaginationChange?: (pagination: CardsWidgetPagination) => void; /** * Overrides for the list's own copy, merged per nested group. Typed with the * `ui` lib's own deep-partial helper (each labels module declares one — the * repo has no shared version) so this prop follows that library's contract. */ labels?: PartialDeep$4; /** * Overrides for the copy this layer produces rather than passes through — the * status and form-factor vocabulary, the empty-cell placeholder, the nickname * fallbacks, and the pagination range prefix. Separate from `labels` because * the list library receives those values already formatted and so has no key * for them; `BankAccountsWidget.featureLabels` is the same split. */ featureLabels?: PartialDeep$1; /** * The card whose details panel is open. Supply with `onSelectedCardIdChange` * when the host owns that state — a deep-linked `/cards/[id]`, say. `null` * closes the panel; omit the prop for uncontrolled behaviour. * * Pinning it to `null` and navigating from `onSelectedCardIdChange` is how a * host suppresses the built-in panel entirely and owns navigation itself: the * click is still reported, and because the value never comes back non-null, * nothing ever opens. */ selectedCardId?: string | null; /** Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. */ defaultSelectedCardId?: string | null; /** * Called whenever the open card changes, including on close (`null`). * * Supplying it does **not** change what renders — a host can observe row clicks * for analytics, or mirror the selection into a query param, and still get the * built-in panel. (The removed `onCardSelect` could not: its presence * suppressed the panel, so those two intents were unexpressible together.) */ onSelectedCardIdChange?: (cardId: string | null) => void; /** * Label overrides forwarded into the nested card details panel, mirroring * `BankAccountsWidgetProps.accountDetailsLabels`. * * Derived from the receiving prop rather than restated, so the forwarded and * received types cannot drift. Naming the panel's labels type directly is not * an option anyway: a cross-widget `type:ui` import is banned by * `EMBEDDED_DEP_CONSTRAINTS`, and this indexed access reaches it through the * sanctioned feature → feature edge without re-exporting anything. It already * carries `card-details-widget`'s own deep partial, so no wrapper here. */ cardDetailsLabels?: CardDetailsWidgetProps['labels']; /** * Overrides for the copy the panel's *feature* layer resolves — its status * vocabulary, form-factor wording, program label and copy-success toast. * * Distinct from `featureLabels`, which covers the list's own vocabulary. * Without this prop the panel is unreachable for that copy, so a host that * renames a status in the list would still read the default inside the panel. */ cardDetailsFeatureLabels?: CardDetailsWidgetProps['featureLabels']; /** * Bank logo for the details panel's card face. Forwarded verbatim; the panel * renders no logo without it, so omitting these leaves the built-in sheet * showing a logo-less card rather than a placeholder. * * These stay props because the package ships no bank artwork and resolves none * from the init response (PLAT-1179, embedded ADR 0005). */ bankLogoSrc?: string; bankLogoAlt?: string; /** * Plastic art for the built-in debit create sheet. Forwarded verbatim into * nested `CreateCardWidget`. Required for that sheet: omitting it (with no * host `onCreateCard`) hides Create card rather than opening a panel that * cannot render. Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package * ships no card artwork. */ cardArtSrc?: string; /** * Label overrides forwarded into the nested create-card panel. Indexed off * `CreateCardWidgetProps` so the forwarded and received types cannot drift, * the same feature → feature edge as `cardDetailsLabels`. */ createCardLabels?: CreateCardWidgetProps['labels']; /** * Overrides for the copy the create panel's *feature* layer resolves — mutation * toasts, the untitled funding-account fallback, and pending-activation success * copy. */ createCardFeatureLabels?: CreateCardWidgetProps['featureLabels']; /** * Called when Create card is clicked. When supplied, the host owns the * gesture: the built-in debit sheet does **not** open. Omit it on a debit list * with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has * no in-package issuance widget, so credit Create card still requires this * callback — omitting it hides the button rather than offering a control that * does nothing. */ onCreateCard?: () => void; /** * Called with the card's id when a row's Activate button is clicked. The button * renders only on cards in `PENDING_ACTIVATION`, and only when the widget token * also holds the program's activate scope. * * Host-owned for the same reason as `onCreateCard`: EMBD-4398 designs no * activation flow, and `POST /debit-cards/{id}/activate` does not exist even * though `debit_card:activate:org` does — so a built-in flow could serve only * one of the two programs. */ onActivateCard?: (cardId: string) => void; } /** * The cards list widget: one page of an organization's credit or debit cards, * with scope-gated Show my cards, Create card and per-row Activate affordances. * * Selecting a row opens that card's read-only details in a sheet, composed from * `CardDetailsWidget` over the sanctioned feature → feature edge. Which card is * open is a controllable value (`selectedCardId` / `defaultSelectedCardId` / * `onSelectedCardIdChange`) so a host can deep-link into it, mirror it into a * query param, or take navigation over entirely — the widget itself reads no * router and no search params. * * On a debit list with `cardArtSrc`, Create card opens the same sheet with * nested `CreateCardWidget`. A host `onCreateCard` still takes over that * gesture (credit, or a custom debit flow). The two panels are mutually * exclusive: opening one closes the other. Success **View card** selects the * new debit card so its details open. * * A pure provider wrapper — every hook lives in `CardsWidgetInner` so it runs * inside `WidgetProvider`'s subtree, which is what the data-access hooks read * their client, org and token from. */ declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CardsWidgetProps): React.JSX.Element; interface AddressFieldGroupLabels { line1: string; line2: string; city: string; state: string; statePlaceholder: string; postalCode: string; country: string; /** Fixed country display value (US-only locale in v1). */ countryValue: string; } interface CounterpartFormSheetLabels { createTitleOrganization: string; createTitleIndividual: string; editTitleOrganization: string; editTitleIndividual: string; createTitleCustomer: string; createTitleVendor: string; editTitleCustomer: string; editTitleVendor: string; createDescriptionCustomer: string; createDescriptionVendor: string; customerTypeHeading: string; vendorTypeHeading: string; businessTypeOption: string; businessTypeHint: string; personTypeOption: string; personTypeHint: string; profileHeading: string; addressHeading: string; customerAddressDescription: string; legalNameLabel: string; businessNameLabel: string; firstNameLabel: string; lastNameLabel: string; titleLabel: string; emailLabel: string; phoneLabel: string; taxIdLabel: string; customerTaxIdHelp: string; vendorTaxIdHelp: string; paymentRemindersLabel: string; paymentRemindersDescription: string; paymentMethodsHeading: string; paymentMethodsDescription: string; accountHolderNameLabel: string; routingNumberLabel: string; accountNumberLabel: string; cancelButton: string; createButton: string; saveButton: string; address: AddressFieldGroupLabels; } interface BankAccountFormSheetLabels { createTitle: string; editTitle: string; nameLabel: string; accountHolderNameLabel: string; accountNumberLabel: string; routingNumberLabel: string; ibanLabel: string; bicLabel: string; sortCodeLabel: string; currencyLabel: string; currencyPlaceholder: string; countryLabel: string; countryValue: string; isDefaultLabel: string; cancelButton: string; createButton: string; saveButton: string; } interface AddressFormSheetLabels { title: string; cancelButton: string; saveButton: string; address: AddressFieldGroupLabels; } interface ConfirmDeleteDialogLabels { confirmButton: string; cancelButton: string; } /** * Overridable validation / error messages produced by the counterparts feature * layer and surfaced through each form's `errors` prop. Consumers override via * the widget's `messageLabels` prop, merged over {@link COUNTERPART_MESSAGE_LABELS_EN}. */ interface CounterpartMessageLabels { legalNameRequired: string; firstNameRequired: string; lastNameRequired: string; emailRequired: string; emailInvalid: string; addressLine1Required: string; cityRequired: string; stateRequired: string; postalCodeRequired: string; bankAccountNameRequired: string; bankAccountIdentifierRequired: string; bankAccountCurrencyRequired: string; routingNumberInvalid: string; accountNumberInvalid: string; vatIdValueRequired: string; /** Shown for a non-field-specific submit failure. */ genericError: string; /** Delete confirmation title; `{name}` is replaced with the entity name. */ deleteTitle: string; deleteCounterpartMessage: string; deleteSubEntityMessage: string; } /** * Co-located user-facing strings for the counterparts widget UI. Each component * takes a `labels?: Partial<...Labels>` prop merged over the matching * `*_LABELS_EN` default, so integrators can re-label without forking the UI. */ interface CounterpartsScreenLabels { customersTitle: string; vendorsTitle: string; /** Customer-mode create action. */ createButton: string; /** Vendor-mode create action — the Bill Pay Figma labels it, not "Create new". */ vendorsCreateButton: string; columnName: string; sortByName: string; /** Customer mode only — the vendor table has no billed column. */ columnBilledAmount: string; columnReceivedAmount: string; columnAmountDue: string; columnTotalPaidToDate: string; columnBalanceDue: string; columnActions: string; openActionsMenu: string; editAction: string; deleteAction: string; searchPlaceholder: string; entityFilterAll: string; entityFilterOrganization: string; entityFilterIndividual: string; customersEmptyTitle: string; customersEmptyDescription: string; customersEmptyAction: string; vendorsEmptyTitle: string; vendorsEmptyDescription: string; vendorsEmptyAction: string; customersFilterEmptyTitle: string; vendorsFilterEmptyTitle: string; filterEmptyDescription: string; errorTitle: string; errorDescription: string; errorRetry: string; accessRestrictedTitle: string; accessRestrictedDescription: string; } interface CounterpartDetailsSheetLabels { hiddenDescription: string; loadingTitle: string; errorTitle: string; errorDescription: string; openActionsMenu: string; closeAction: string; deleteCustomerAction: string; deleteVendorAction: string; summaryAmountDue: string; summaryBalanceDue: string; summaryBilled: string; summaryReceived: string; summaryPaid: string; summaryRejected: string; overdueTag: string; sendPaymentAction: string; issueInvoiceAction: string; recentCustomerDocumentsHeading: string; recentVendorDocumentsHeading: string; recentCustomerDocumentsDescription: string; recentVendorDocumentsDescription: string; /** Shown beside the recent-documents heading only when the host wires it. */ viewAllDocumentsAction: string; subtitleTemplate: string; customerSubtitleLabel: string; vendorSubtitleLabel: string; entityTypePersonLabel: string; entityTypeBusinessLabel: string; remindersEnabledLabel: string; remindersDisabledLabel: string; paymentMethodTitle: string; customerDetailsHeading: string; vendorDetailsHeading: string; customerDetailsDescription: string; vendorDetailsDescription: string; rowType: string; rowName: string; rowEmail: string; rowPaymentReminders: string; rowPhone: string; rowTaxIdSsn: string; rowTaxIdEin: string; showTaxId: string; hideTaxId: string; customerTaxIdHelp: string; vendorTaxIdHelp: string; addressHeading: string; customerAddressDescription: string; addAddressAction: string; editAddressAction: string; noAddress: string; paymentMethodsHeading: string; paymentMethodsDescription: string; addPaymentMethodAction: string; editPaymentMethodAction: string; deletePaymentMethodAction: string; incompletePaymentMethod: string; accountHolderLabel: string; accountNumberLabel: string; routingNumberLabel: string; noPaymentMethods: string; editButton: string; } /** Whether this widget is showing customers (receivables) or vendors (payables). */ type CounterpartMode = 'customer' | 'vendor'; interface CounterpartsWidgetOwnProps { /** Selects customer (receivables) or vendor (payables) behavior and copy. */ counterpartType: CounterpartMode; pageSizeOptions?: number[]; /** * Whether to render the screen title row. Defaults to true, which suits a * host page that renders its own title above the widget. Pass false when the * embedding surface already titles this screen; the create action then moves * into the search row. */ showTitle?: boolean; /** * Reveals a "View all" action beside the recent-documents heading in the * details sheet. Omit when the host has nowhere to send the user; the * standalone widget does not own a bills or invoices list. */ onViewAllDocuments?: () => void; screenLabels?: Partial; formLabels?: Partial; detailsLabels?: Partial; bankAccountLabels?: Partial; addressLabels?: Partial; deleteLabels?: Partial; /** Overrides for validation / error / delete-prompt messages. */ messageLabels?: Partial; } /** Public props for {@link CounterpartsWidget}. */ type CounterpartsWidgetProps = WidgetProviderProps & CounterpartsWidgetOwnProps; /** * Self-contained customers/vendors widget: lists counterparts with money * columns, and creates, edits, views, and deletes counterparts plus their * payment method and address. `counterpartType` selects customer (receivables) * vs vendor (payables) behavior. The provider/inner split keeps the public * component a pure {@link WidgetProvider} wrapper. * * @example * ```tsx * * ``` */ declare function CounterpartsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element; interface Labels$4 { title: string; description: string; receiptsTab: string; matchingTab: string; policiesTab: string; requirementsTab: string; } /** * Aggregate outcome of a receipt batch after the backend finishes OCR and * auto-matching. `stillProcessing` counts receipts that never reached a terminal * state inside the host's budget, which is a neutral state, not a failure. */ interface ReceiptMatchSummary { total: number; matched: number; unmatched: number; unreadable: number; stillProcessing: number; } interface UploadReceiptWidgetProps { emailAddress: string; onFileUpload?: (file: File) => unknown | Promise; /** * Awaited after every file in the batch has uploaded. Resolve once the backend * has finished OCR and auto-matching so the widget can report the outcome in * its batch toast. Omit it and the widget stops at "Uploaded N attachments". */ onAwaitMatching?: (uploadedCount: number) => Promise; isUploading?: boolean; } declare function UploadReceiptWidget({ emailAddress, onFileUpload, onAwaitMatching, isUploading, }: UploadReceiptWidgetProps): React.JSX.Element; interface ExpenseManagementWidgetProps extends WidgetProviderProps { labels?: Partial; receiptUpload?: UploadReceiptWidgetProps; receiptsContent?: ReactNode; matchingContent?: ReactNode; policiesContent?: ReactNode; requirementsContent?: ReactNode; } declare function ExpenseManagementWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: ExpenseManagementWidgetProps): React.JSX.Element; type ExpenseApprovalPoliciesWidgetProps = WidgetProviderProps & { /** @deprecated Use `widgetToken` instead */ token?: string | null; /** @deprecated Use `organizationId` instead */ orgId?: string | null; }; declare function ExpenseApprovalPoliciesWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, }?: ExpenseApprovalPoliciesWidgetProps): React.JSX.Element; type ExpenseRequirementsWidgetProps = WidgetProviderProps & { /** @deprecated Use `widgetToken` instead */ token?: string | null; /** @deprecated Use `organizationId` instead */ orgId?: string | null; }; declare function ExpenseRequirementsWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, }?: ExpenseRequirementsWidgetProps): React.JSX.Element; interface BalancesWidgetLabels { /** Card header title (e.g. next to the building icon) */ widgetTitle: string; /** Shown under the total amount */ totalAvailableBalance: string; /** Full explanation shown in the info tooltip */ totalAvailableBalanceTooltip: string; /** Short label for the info control (e.g. `aria-label`) */ totalAvailableBalanceInfoAriaLabel: string; /** CTA to open the full accounts list */ viewAllAccounts: string; /** Shown when there are no balances to list */ noBalancesFound: string; /** Shown when the bank account request failed */ loadErrorTitle: string; loadErrorDescription: string; /** Label for retry after a failed load */ loadErrorRetry: string; } declare const BALANCES_WIDGET_LABELS_EN: BalancesWidgetLabels; interface BalancesWidgetWithContextProps { /** * Maximum number of account rows to render in-card. Anything beyond this * cap is reachable only via the View-all CTA. Default 5. */ maxAccounts?: number; labels?: Partial; onBalanceRowClick?: (accountId: string) => void; onViewAllAccountsClick?: () => void; } type BalancesWidgetPassthroughProps = Pick; interface BalancesWidgetProps extends WidgetProviderProps, BalancesWidgetPassthroughProps { } declare function BalancesWidget({ maxAccounts, labels, onBalanceRowClick, onViewAllAccountsClick, ...widgetProviderProps }: BalancesWidgetProps): React.JSX.Element; interface InsightsWidgetLabels { widgetTitle: string; activeTab: string; dismissedTab: string; noInsightsFound: string; loadErrorTitle: string; loadErrorDescription: string; loadErrorRetry: string; } declare const INSIGHTS_WIDGET_LABELS_EN: InsightsWidgetLabels; /** * Presentational model for one insight row — screen-shaped only (no domain ids or types). */ interface InsightRowView { displayText: string; createdDate: string; badgeLabel: string; badgeIcon: ReactElement; showDismissButton: boolean; showToggle: boolean; toggleLabel?: string; /** Required when `onToggle` is set — owner-controlled switch state. */ toggleChecked?: boolean; onToggle?: (checked: boolean) => void; navigationLinkText?: string; onNavigationClick?: () => void; actionText?: string; onActionClick?: () => void; } interface SingleInsightLabels { dismissInsightAriaLabel: string; } declare const SINGLE_INSIGHT_LABELS_EN: SingleInsightLabels; interface InsightsFeatureLabels { onboardingBadgeLabel: string; routingOnboardingText: string; enableRoutingToggle: string; createAccountText: string; connectExternalText: string; linkAccountAction: string; verifyExternalAccountText: (nickname: string) => string; } declare const INSIGHTS_FEATURE_LABELS_EN: InsightsFeatureLabels; /** Domain model for one generated insight — stays in the feature layer only. */ interface InsightItem { id: string; isDismissed: boolean; showToggle: boolean; canDismiss: boolean; displayText: string; toggleLabel?: string; toggleChecked?: boolean; onToggle?: (checked: boolean) => void; actionText?: string; onActionClick?: () => void; } declare function mapInsightToRowView(insight: InsightItem, labels: InsightsFeatureLabels, createdDate: string): InsightRowView; interface SingleInsightProps { insight: InsightItem; createdDate: string; featureLabels: Parameters[1]; onDismissClick: (id: string) => void; labels?: Partial; } declare const SingleInsight: ({ insight, createdDate, featureLabels, onDismissClick, labels, }: SingleInsightProps) => React.JSX.Element; interface InsightsWidgetInternalProps { labels?: Partial; singleInsightLabels?: Parameters[0]['labels']; } interface InsightsWidgetWithContextProps { labels?: Partial; singleInsightLabels?: InsightsWidgetInternalProps['singleInsightLabels']; featureLabels?: Partial; routingEnabled?: boolean; onRoutingToggleChange?: (enabled: boolean) => void; onLinkExternalAccountClick?: () => void; } type InsightsWidgetPassthroughProps = Pick; interface InsightsWidgetProps extends WidgetProviderProps, InsightsWidgetPassthroughProps { } declare function InsightsWidget({ labels, singleInsightLabels, featureLabels, routingEnabled, onRoutingToggleChange, onLinkExternalAccountClick, ...widgetProviderProps }: InsightsWidgetProps): React.JSX.Element; /** * Co-located user-facing strings for every chart-of-accounts surface: the table, * the create/edit sheet, and the delete confirmation. Each component takes a * `labels?: Partial<…Labels>` prop merged over the matching `*_LABELS_EN` * default. * * This is the single home for the widget's translation surface. Keeping any of * it next to a component instead splits what a translator has to find. * * The copy follows the Chart of accounts design, which calls each row an * "account" rather than a "GL code" or a "category": the GL code is one field on * an account, not the thing itself. */ interface ChartOfAccountsLabels { /** Section heading, and the sentence beneath it explaining what the list is. */ title: string; subtitle: string; columnGlCode: string; columnName: string; columnDescription: string; columnActions: string; actionEdit: string; actionDelete: string; /** Accessible name for the icon-only sort control in the name column. */ sortByName: string; openActionsMenu: string; /** Toolbar and empty-state call to action. */ addAccount: string; emptyTitle: string; emptyDescription: string; /** * Shown instead of {@link ChartOfAccountsLabels.emptyTitle} when a later page * comes back empty, which happens when the rows it held were deleted. The * organization still has accounts, so the copy must not claim otherwise. */ emptyPageTitle: string; emptyPageDescription: string; errorTitle: string; errorDescription: string; paginationPrev: string; paginationNext: string; } declare const CHART_OF_ACCOUNTS_LABELS_EN: ChartOfAccountsLabels; /** * Copy for the create/edit sheet. * * Four of these are resolved by the **owner** rather than by `AccountFormSheet`: * `createTitle`, `createDescription`, `editDescription`, and `descriptionCounter`. * The sheet takes an already-assembled `title`, `description`, and * `descriptionCounterText`, because choosing between create and edit copy is form * policy and filling `{count}`/`{max}` is formatting, neither of which belongs in * a presentational component. They stay in this file anyway: it is the single * home for the widget's translation surface, and splitting it by which layer * happens to read a key would make a translator hunt in two places. * * There is no `editTitle`. The design titles the edit sheet with the account's * own name, verbatim, so there is no template to translate. */ interface AccountFormSheetLabels { /** Create-mode heading. Owner-resolved. */ createTitle: string; /** Screen-reader description of the edit sheet's purpose. Owner-resolved. */ editDescription: string; /** Screen-reader description of the create sheet's purpose. Owner-resolved. */ createDescription: string; glCodeLabel: string; glCodePlaceholder: string; nameLabel: string; namePlaceholder: string; descriptionLabel: string; descriptionPlaceholder: string; /** * `{count}` and `{max}` are replaced with the current and maximum length. * Owner-resolved; the sheet renders the finished `descriptionCounterText`. */ descriptionCounter: string; cancelButton: string; saveButton: string; /** Tooltip on a disabled save, explaining why it cannot be pressed yet. */ saveDisabledHint: string; openAccountMenu: string; deleteAction: string; /** * Accessible name for the sheet's close control. The built-in `SheetContent` * close is switched off in favour of one this widget owns, so the copy stays * inside the label contract instead of the primitive's hardcoded "Close". */ closeSheet: string; } declare const ACCOUNT_FORM_SHEET_LABELS_EN: AccountFormSheetLabels; interface AccountDeleteDialogLabels { /** * `{name}` is replaced with the account name. Owner-resolved, for the same * reason as the sheet's titles above: the dialog takes a finished `title` * rather than a domain value plus a template. */ title: string; /** Used when the owner passes no `message`, which is the normal case. */ message: string; confirmButton: string; cancelButton: string; } declare const ACCOUNT_DELETE_DIALOG_LABELS_EN: AccountDeleteDialogLabels; type LedgerAccountRow = { id: string; name: string; nominal_code: string; description: string; /** * True when the account came from an external accounting system. The API * refuses to update or delete these (403), so row actions are withheld. */ is_external?: boolean; }; interface ChartOfAccountsTableProps { data: LedgerAccountRow[]; isLoading?: boolean; isError?: boolean; sorting: SortingState; onSortingChange: OnChangeFn; pageSize: number; onPageSizeChange: (pageSize: number) => void; pageSizeOptions: number[]; hasNextPage?: boolean; hasPrevPage?: boolean; onNextPage: () => void; onPrevPage: () => void; /** Merged with CHART_OF_ACCOUNTS_LABELS_EN; only override what you need. */ labels?: Partial; onEdit?: (row: LedgerAccountRow) => void; onDelete?: (row: LedgerAccountRow) => void; /** * Enables the add action. Rendered as a toolbar button above the table, or as * the centred call to action when the first page comes back with no rows. * Omit it (for example when the user lacks write permission) to withhold the * affordance entirely. */ onAdd?: () => void; /** Optional section heading rendered above the table. Omit when the host * already provides its own title. */ title?: string; /** Applied to the empty state's root element. Supplied by the caller, not decided here. */ emptyStateTestId?: string; } declare function ChartOfAccountsTable({ data, isLoading, isError, sorting, onSortingChange, pageSize, onPageSizeChange, pageSizeOptions, hasNextPage, hasPrevPage, onNextPage, onPrevPage, labels, title, emptyStateTestId, onEdit, onDelete, onAdd, }: ChartOfAccountsTableProps): React.JSX.Element; /** * Which form the owner has open. Deliberately *not* a prop on * {@link AccountFormSheet}: the sheet renders whatever `title` and `description` * it is handed, so create-versus-edit is the owner's state rather than something * the sheet interprets. Lives here because it belongs to this widget's shared * vocabulary and is part of the published package surface; * `useChartOfAccountsCrud` is the consumer. */ type AccountFormMode = 'create' | 'edit'; interface AccountFormValues { name: string; nominal_code: string; description: string; } interface AccountFormErrors { name?: string; nominal_code?: string; description?: string; /** Form-level error (e.g. an API failure not tied to a single field). */ form?: string; } interface AccountFormSheetProps { open: boolean; onOpenChange: (open: boolean) => void; /** * Heading, already assembled. The owner decides whether that is the create * copy or the edited account's own name; the sheet does not interpolate a * domain value into a template or branch on a form mode to pick one. */ title: string; /** Screen-reader description of the sheet's purpose, already assembled. */ description: string; values: AccountFormValues; errors?: AccountFormErrors; /** Disables every action while a mutation is in flight. */ inProgress?: boolean; /** * Whether the form is not yet complete enough to submit. The owner decides, * so the rule stays with the validation that enforces it; the sheet only * reflects the answer and shows {@link AccountFormSheetLabels.saveDisabledHint}. */ submitDisabled?: boolean; /** Already-formatted character counter for the description, e.g. "53/280 characters". */ descriptionCounterText: string; onNameChange: (name: string) => void; onGlCodeChange: (nominalCode: string) => void; onDescriptionChange: (description: string) => void; onSubmit: () => void; onCancel: () => void; /** * Shows the header menu when supplied. The owner withholds it for a form that * has nothing to delete yet, so its presence is the whole condition here. */ onDelete?: () => void; /** Merged with {@link ACCOUNT_FORM_SHEET_LABELS_EN}. */ labels?: Partial; } /** * Presentational create/edit form for a ledger account, rendered in a side * sheet. Fully controlled: the owner holds `values` and validation `errors` and * reacts to the field-change and submit/cancel/delete gestures. * * Three fields (GL code, account name, description), in the order the design * lists them. An **Account type** select is also in the design and deliberately * absent here: the API exposes `type` on the response only, so the control would * silently discard whatever was chosen. It arrives with EMBD-4603. */ declare function AccountFormSheet({ open, onOpenChange, title, description, values, errors, inProgress, submitDisabled, descriptionCounterText, onNameChange, onGlCodeChange, onDescriptionChange, onSubmit, onCancel, onDelete, labels, }: AccountFormSheetProps): React.JSX.Element; interface AccountDeleteDialogProps { open: boolean; onOpenChange: (open: boolean) => void; /** * Confirmation heading, already assembled. The owner names the account, so the * dialog never interpolates a domain value into a template. */ title: string; /** * Body copy. Falls back to * {@link AccountDeleteDialogLabels.message} when omitted, since nothing about * this sentence depends on which account is being deleted. */ message?: string; /** Disables the buttons while the delete mutation is in flight. */ isDeleting?: boolean; /** Failure message from the delete attempt; keeps the dialog open. */ error?: string; onConfirm: () => void; onCancel: () => void; /** Merged with {@link ACCOUNT_DELETE_DIALOG_LABELS_EN}. */ labels?: Partial; } /** * Destructive confirmation dialog for deleting a GL code. Controlled by the * owner; composes the shared `AlertDialog` primitive with a destructive confirm * button. */ declare function AccountDeleteDialog({ open, onOpenChange, title, message, isDeleting, error, onConfirm, onCancel, labels, }: AccountDeleteDialogProps): React.JSX.Element; /** * Feature-layer copy for the widget's built-in create/edit/delete flow. * * The table, form sheet, and delete dialog each carry their own label sets in * the `ui` library; these are only the strings the orchestration produces * itself, which is validation messages, API failure fallbacks, and the * confirmation toasts. Consumers override them through the widget's * `messageLabels` prop, merged over {@link CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN}. */ interface ChartOfAccountsMessageLabels { nameRequired: string; glCodeRequired: string; /** `{max}` is replaced with the field's character limit. */ nameTooLong: string; /** `{max}` is replaced with the field's character limit. */ glCodeTooLong: string; /** `{max}` is replaced with the field's character limit. */ descriptionTooLong: string; saveError: string; deleteError: string; /** `{name}` is replaced with the account's name. */ accountCreated: string; /** `{name}` is replaced with the account's name. */ accountUpdated: string; /** `{name}` is replaced with the account's name. */ accountDeleted: string; } declare const CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN: ChartOfAccountsMessageLabels; /** * Props that the feature layer owns and wires internally. Consumers cannot * override these because they are driven by the query and pagination state. * Everything else on `ChartOfAccountsTableProps` (including `title`) passes through * this `Omit` untouched via the `...tableProps` spread below, so no explicit * feature-layer wiring needed when a new pass-through UI prop is added there. */ type TableProps = Omit; /** * Label override channels, one per surface the widget mounts. * * The widget renders more than the table, so a single `labels` prop would leave * the built-in create/edit/delete flow stuck on English while the table around * it localized. Split per surface rather than nested under one object, which is * the shape `tags-widget`, `products-widget`, and `counterparts-widget` all use. */ interface ChartOfAccountsWidgetLabelProps { /** Table copy: headings, column headers, row actions, empty and error states. */ screenLabels?: Partial; /** Create/edit sheet copy: titles, field labels, placeholders, buttons. */ formLabels?: Partial; /** Delete confirmation copy. */ deleteLabels?: Partial; /** Validation messages, save/delete failure fallbacks, and success toasts. */ messageLabels?: Partial; } /** * Public props for {@link ChartOfAccountsWidget}. * * Merges {@link WidgetProviderProps} (auth/base-URL scope) with the subset of * {@link ChartOfAccountsTableProps} that consumers are allowed to control (row * action callbacks, empty-state CTAs, etc.) plus a label channel per surface. */ type ChartOfAccountsWidgetProps = WidgetProviderProps & TableProps & ChartOfAccountsWidgetLabelProps; /** * Self-contained GL code table widget. * * Composes a {@link WidgetProvider} scope with the table's query and pagination * logic. The two-component split (`ChartOfAccountsWidget` → `ChartOfAccountsWidgetInner`) * ensures that `useGetLedgerAccountsQuery` runs *inside* the provider tree and * can therefore resolve the correct API base URL and auth token from context. * * @example * ```tsx * openEditDialog(row)} * onDelete={(row) => confirmDelete(row)} * /> * ``` */ declare function ChartOfAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, analytics, disclosuresAcceptance, errorFallback, onError, ...tableProps }: ChartOfAccountsWidgetProps): React.JSX.Element; /** * Static FAQ content for the Help widget. * * The shape mirrors the original MUI `HelpPage` rich-text model so the renderer * can reproduce paragraphs, ordered/unordered bullet lists, nested bullets, and * inline `` runs. Callers may supply their own `HelpFaqSection[]` * to override the default content below. */ /** Which list marker to render for a group of bullet points. */ type HelpFaqBulletType = 'bullet' | 'numeric'; /** A single bullet point, optionally with its own nested list. */ interface HelpFaqBullet { text: string; bulletPointType?: HelpFaqBulletType; bulletPoints?: HelpFaqBullet[]; } /** One answer block: a paragraph, optionally followed by a bullet list. */ interface HelpFaqAnswer { text: string; bulletPointType?: HelpFaqBulletType; bulletPoints?: HelpFaqBullet[]; } /** A question and its ordered list of answer blocks. */ interface HelpFaqItem { question: string; answers: HelpFaqAnswer[]; } /** A titled group of questions rendered as a single card. */ interface HelpFaqSection { title: string; items: HelpFaqItem[]; } /** * Default English FAQ content, ported from the original * `embedded-banking-dashboard-settings` Help page (`defaultWidgetFaqContent` — * the embedded-widget variant, which omits the password-management questions * since embedded users authenticate through the provider). A stray "Testing 1" * placeholder bullet from the source has been dropped. */ declare const HELP_FAQ_EN: HelpFaqSection[]; /** * Externalized, overridable display strings for the Help widget. * * Callers pass `labels={{ ... }}` to override individual strings (merged over * `HELP_WIDGET_LABELS_EN`). Defaults reproduce the copy from the original * `embedded-banking-dashboard-settings` Help page. */ interface HelpWidgetLabels { /** Heading above the FAQ accordion. */ title: string; /** Heading for the contact section. */ contactUsTitle: string; /** * Lead-in text for the contact line, rendered as * `{contactUsBody} {bankName} {link}.` */ contactUsBody: string; /** Text of the contact link (wraps `contactUrl`). */ contactUsLinkText: string; } declare const HELP_WIDGET_LABELS_EN: HelpWidgetLabels; /** * The Help widget's public, framework-agnostic API surface. * * This is the single source of truth for the props consumers pass. Both the * shadcn and Tecton implementations accept exactly these props, and the public * {@link HelpWidget} switch forwards them unchanged — so the UI-framework choice * never leaks into a consumer-facing prop. Keep this contract identical across * implementations: a prop that only one framework honors does not belong here. */ interface HelpWidgetProps$1 { /** FAQ content to render, grouped into titled sections. */ faq: HelpFaqSection[]; /** Bank/provider name interpolated into the contact line. Defaulted from the * widget-init response by {@link HelpWidget}, so hosts rarely pass it. */ bankName?: string; /** When set, renders a "Contact Us" card linking here. Omit to hide it. */ contactUrl?: string; /** Overrides merged over {@link HELP_WIDGET_LABELS_EN}. */ labels?: Partial; } /** * Presentational props consumers may override. `faq` is optional here and * defaults to {@link HELP_FAQ_EN} so the widget renders standalone with no * configuration. */ type HelpContentProps = Partial; /** * Public props for {@link HelpWidget}: {@link WidgetProviderProps} (auth/base-URL * scope) plus the overridable presentational props of the underlying UI widget. */ type HelpWidgetProps = WidgetProviderProps & HelpContentProps; /** * Self-contained Help widget: a static, shadcn FAQ accordion with an optional * "Contact Us" card. Composes a {@link WidgetProvider} scope around the * presentational UI component so it can be wired as the Settings `help` section * default with no props, or mounted standalone by an integrator. * * @example * ```tsx * * ``` */ declare function HelpWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...contentProps }: HelpWidgetProps): React.JSX.Element; type ReceivablesWidgetMoniteProps = MoniteRegionProviderProps & Omit & { pageTitleComponent?: ReceivablesProps['pageTitleComponent']; }; declare function ReceivablesWidgetMonite({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, errorFallback, onError, finopsThemeColors, analytics, disclosuresAcceptance, pageTitleComponent, uiFramework, ...receivablesProps }: ReceivablesWidgetMoniteProps): React.JSX.Element; interface ProductFormSheetLabels { createTitle: string; /** Shown in the sheet description for the create form. */ headerDescription: string; /** `{type}` is replaced with the product/service word. */ editTitle: string; /** `{type}` is replaced with the product/service word. */ editingBanner: string; nameLabel: string; namePlaceholder: string; descriptionLabel: string; /** Appended to the description label to indicate it is optional. */ descriptionOptional: string; descriptionPlaceholder: string; /** `{count}` is replaced with the current character count. */ descriptionCount: string; typeLabel: string; typeProduct: string; typeProductDescription: string; typeService: string; typeServiceDescription: string; unitLabel: string; unitPlaceholder: string; /** Shown as the first option in the unit select to clear/leave blank. */ noUnit: string; manageUnits: string; priceLabel: string; currencyLabel: string; currencyPlaceholder: string; cancelButton: string; /** `{type}` is replaced with the product/service word. */ createButton: string; saveButton: string; } interface MeasureUnitsManagerLabels { title: string; hiddenDescription: string; searchPlaceholder: string; columnLabel: string; columnDescription: string; namePlaceholder: string; descriptionPlaceholder: string; addButton: string; doneButton: string; editAction: string; deleteAction: string; saveAction: string; cancelAction: string; emptyText: string; } interface MeasureUnitDeleteDialogLabels { /** `{name}` is replaced with the unit name. */ titleNoItems: string; /** `{name}` is replaced with the unit name. */ titleWithItems: string; messageNoItems: string; messageNoItemsHint: string; messageWithItems: string; messageWithItemsHint: string; confirmButton: string; cancelButton: string; } /** * Overridable validation / error messages produced by the products feature * layer and surfaced through the form's `errors` prop and the measure-units * manager. Consumers override via the widget's `messageLabels` prop, merged * over {@link PRODUCT_MESSAGE_LABELS_EN}. */ interface ProductMessageLabels { nameRequired: string; /** Shown when a name exceeds the 100-character limit. */ nameTooLong: string; typeRequired: string; priceInvalid: string; currencyRequired: string; /** Shown when a description exceeds the 255-character limit. */ descriptionTooLong: string; unitNameRequired: string; /** Shown for a non-field-specific product submit failure. */ genericError: string; /** Fallback when creating a measure unit fails without a server message. */ createMeasureUnitError: string; /** Fallback when updating a measure unit fails without a server message. */ updateMeasureUnitError: string; } interface ReceivableStatusBadgeLabels { draft: string; issuing: string; issued: string; failed: string; accepted: string; expired: string; declined: string; recurring: string; partially_paid: string; paid: string; overdue: string; uncollectible: string; canceled: string; deleted: string; unknown: string; } interface ReceivablesScreenLabels { title: string; createButton: string; templateSettingsButton: string; searchPlaceholder: string; statusFilterAll: string; tabInvoices: string; tabQuotes: string; tabCreditNotes: string; columnDocument: string; columnCustomer: string; columnStatus: string; columnIssueDate: string; columnDueDate: string; columnTotal: string; columnAmountDue: string; columnActions: string; sortByDocument: string; sortByCustomer: string; sortByIssueDate: string; sortByDueDate: string; sortByTotal: string; actionEdit: string; actionIssue: string; actionSend: string; actionRecordPayment: string; actionMarkPaid: string; actionMarkUncollectible: string; actionAccept: string; actionDecline: string; actionCancel: string; actionClone: string; actionDelete: string; emptyTitle: string; emptyDescription: string; emptyAction: string; filterEmptyTitle: string; filterEmptyDescription: string; errorTitle: string; errorDescription: string; errorRetry: string; statusBadge: ReceivableStatusBadgeLabels; } type ReceivablesScreenLabelOverrides = Partial> & { statusBadge?: Partial; }; interface ReceivableFormSheetLabels { createTitle: string; editTitle: string; hiddenDescription: string; documentTypeLabel: string; typeInvoice: string; typeQuote: string; customerLabel: string; customerHint: string; currencyLabel: string; issueDateLabel: string; dueDateLabel: string; memoLabel: string; paymentTermsLabel: string; paymentTermsPlaceholder: string; paymentTermsNone: string; lineItemsHeading: string; productLabel: string; quantityLabel: string; addLineItemButton: string; removeLineItemButton: string; cancelButton: string; createButton: string; updateButton: string; } interface ReceivableDetailsSheetLabels { hiddenDescription: string; loadingTitle: string; errorTitle: string; errorDescription: string; summaryHeading: string; lineItemsHeading: string; activityHeading: string; mailsHeading: string; noLineItems: string; noActivity: string; noMails: string; quantityColumn: string; unitPriceColumn: string; totalColumn: string; closeButton: string; downloadPdfButton: string; editButton: string; issueButton: string; sendButton: string; acceptButton: string; declineButton: string; recordPaymentButton: string; markPaidButton: string; markUncollectibleButton: string; cancelButton: string; cloneButton: string; deleteButton: string; statusBadge: ReceivableStatusBadgeLabels; } type ReceivableDetailsSheetLabelOverrides = Partial> & { statusBadge?: Partial; }; interface ReceivableSendDialogLabels { title: string; description: string; toLabel: string; ccLabel: string; bccLabel: string; subjectLabel: string; bodyLabel: string; cancelButton: string; sendButton: string; } interface ReceivablePaymentDialogLabels { title: string; description: string; modeLabel: string; fullPayment: string; partialPayment: string; amountPaidLabel: string; paidAtLabel: string; commentLabel: string; cancelButton: string; submitButton: string; } interface ReceivableActionDialogLabels { cancelButton: string; confirmButton: string; } type ReceivableDocumentType = 'invoice' | 'quote' | 'credit_note'; type ReceivablesWidgetTab = 'invoices' | 'quotes' | 'credit_notes'; interface ReceivableMessageLabels { customerRequired: string; customerAddressRequired: string; currencyRequired: string; lineItemProductRequired: string; lineItemQuantityInvalid: string; sendToRequired: string; sendSubjectRequired: string; sendBodyRequired: string; paymentAmountInvalid: string; genericError: string; untitledDocument: string; unknownCustomer: string; notAvailable: string; invoiceType: string; quoteType: string; creditNoteType: string; summaryDocumentType: string; summaryDocumentNumber: string; summaryCustomer: string; summaryIssued: string; summaryDue: string; summaryCreated: string; summaryUpdated: string; summaryTotal: string; summaryAmountDue: string; activityStatusChanged: string; activityReceivableCreated: string; activityReceivableUpdated: string; activityPaymentReceived: string; activityMailSent: string; activityUnknown: string; recipientsNone: string; sendSubjectDefault: string; sendBodyDefault: string; issueTitle: string; issueDescription: string; issueConfirm: string; acceptTitle: string; acceptDescription: string; acceptConfirm: string; declineTitle: string; declineDescription: string; declineConfirm: string; cancelTitle: string; cancelDescription: string; cancelConfirm: string; cloneTitle: string; cloneDescription: string; cloneConfirm: string; deleteTitle: string; deleteDescription: string; deleteConfirm: string; markPaidTitle: string; markPaidDescription: string; markPaidConfirm: string; markUncollectibleTitle: string; markUncollectibleDescription: string; markUncollectibleConfirm: string; } interface ReceivablesWidgetOwnProps { defaultTab?: ReceivablesWidgetTab; enabledTabs?: ReceivablesWidgetTab[]; pageSizeOptions?: number[]; onReceivableCreated?: (id: string, type: ReceivableDocumentType) => void; onReceivableOpened?: (id: string, type: ReceivableDocumentType) => void; onTemplateSettingsClick?: () => void; screenLabels?: ReceivablesScreenLabelOverrides; formLabels?: Partial; detailsLabels?: ReceivableDetailsSheetLabelOverrides; sendLabels?: Partial; paymentLabels?: Partial; actionLabels?: Partial; productFormLabels?: Partial; counterpartFormLabels?: Partial; measureUnitsLabels?: Partial; measureUnitDeleteLabels?: Partial; messageLabels?: Partial; productMessageLabels?: Partial; counterpartMessageLabels?: Partial; } type ReceivablesWidgetProps = WidgetProviderProps & ReceivablesWidgetOwnProps; declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element; interface Labels$3 { title: string; connectButton: string; verifyCtaButton: string; learnMoreButton: string; connectTitle: string; nicknameLabel: string; accountNumberLabel: string; routingNumberLabel: string; routingNumberError: string; typeLabel: string; accountTypePlaceholder: string; checkingOption: string; savingsOption: string; cancelButton: string; nextButton: string; backButton: string; /** Step indicator template, e.g. "Step {current}/{total}". */ stepIndicator: string; connectStep1Heading: string; connectStep1Description: string; connectStep2Heading: string; connectStep2Description: string; teamMemberAccessTooltip: string; teamMembersLoadingLabel: string; teamMembersErrorTitle: string; teamMembersEmptyLabel: string; summaryCompletedHeading: string; summaryNextStepsHeading: string; summaryAccountPrefix: string; summaryStep1Title: string; summaryStep1Description: string; summaryStep2Title: string; summaryStep2Description: string; summaryStep3Title: string; summaryStep3Description: string; summaryStep4Title: string; summaryStep4Description: string; statusComplete: string; statusTodo: string; backToTransfersButton: string; saveButton: string; editButton: string; verifyButton: string; unlinkButton: string; linkButton: string; editTitle: string; verifyTitle: string; verifyDescription: string; verifySectionHeading: string; verifyExampleLabel: string; verifyExampleText: string; verifyAccountInProcess: string; verifySuccessTitle: string; verifySuccessDescription: string; unlinkTitle: string; unlinkDescription: string; unlinkConfirmButton: string; firstAmountLabel: string; secondAmountLabel: string; verifyAmountError: string; loadingLabel: string; errorTitle: string; actionErrorTitle: string; emptyTitle: string; emptyDescription: string; } interface FeatureLabels$4 { accountFallback: string; accountLabel: string; pendingStatus: string; editSuccessToast: string; unlinkSuccessToast: string; } interface LinkedAccountsWidgetProps extends WidgetProviderProps { labels?: Partial; featureLabels?: Partial; } declare function LinkedAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: LinkedAccountsWidgetProps): React.JSX.Element; interface AdditionalOwnersLabels { heading: string; subheading: string; primaryOwnerShareLabel: string; emptyOwnersText: string; addOwner: string; edit: string; remove: string; cancel: string; save: string; close: string; addOwnerSubmit: string; saveOwnerSubmit: string; ownerNameColumn: string; ownerShareColumn: string; ownerActionsColumn: string; formHeadingAdd: string; formHeadingEdit: string; firstName: string; lastName: string; dateOfBirth: string; dateOfBirthPlaceholder: string; dateOfBirthMinAgeError: string; ssn: string; ssnInvalid: string; ssnShow: string; ssnHide: string; homeAddress: string; city: string; state: string; statePlaceholder: string; zipCode: string; mobilePhoneNumber: string; mobilePhoneNumberInvalid: string; ownershipPercentage: string; ownershipPercentagePlaceholder: string; ownershipPercentageMinError: string; /** Required-field marker appended to field labels (e.g. ` *`). */ requiredFieldMarker: string; /** Suffix shown after ownership percentage inputs (e.g. `%`). */ percentSuffix: string; deleteOwnerHeading: string; deleteOwnerPromptBeforeName: string; deleteOwnerPromptAfterName: string; deleteOwnerConfirm: string; totalOwnershipExceedsTemplate: (total: number) => string; stateTitles?: Partial>; } declare const ADDITIONAL_OWNERS_LABELS_EN: AdditionalOwnersLabels; interface BusinessDetailsLabels { heading: string; subheading: string; companyLegalName: string; companyDbaName: string; businessAddress: string; city: string; state: string; statePlaceholder: string; zipCode: string; companyPhoneNumber: string; companyPhoneNumberInvalid: string; companyStructure: string; companyStructurePlaceholder: string; website: string; websiteInvalid: string; taxId: string; taxIdInvalid: string; naicsCode: string; naicsCodePlaceholder: string; isAuthorizedQuestion: string; isAuthorizedYes: string; isAuthorizedNo: string; /** Use `{bankName}` for the sponsoring bank (e.g. "Zenith Bank"). */ acceptDisclosuresPrefix: string; termsOfUse: string; privacyPolicy: string; acceptDisclosuresTermsPrivacyJoin: string; acceptDisclosuresAfterPrivacy: string; electronicCommunication: string; acceptDisclosuresAfterElectronic: string; patriotAct: string; companyStructureOptions: Record<'CORPORATION_PUBLIC' | 'CORPORATION_PRIVATE' | 'CORPORATION_NOT_FOR_PROFIT' | 'LLC' | 'LLP' | 'PARTNERSHIP' | 'SOLE_PROPRIETORSHIP' | 'GOVERNMENT' | 'COOPERATIVE' | 'ASSOCIATION' | 'OTHER', string>; naicsTitles?: Record; stateTitles?: Partial>; } declare const BUSINESS_DETAILS_LABELS_EN: BusinessDetailsLabels; interface PersonalDetailsLabels { heading: string; subheading: string; firstName: string; lastName: string; dateOfBirth: string; dateOfBirthPlaceholder: string; dateOfBirthMinAgeError: string; ssn: string; ssnInvalid: string; ssnShow: string; ssnHide: string; homeAddress: string; city: string; state: string; statePlaceholder: string; zipCode: string; mobilePhoneNumber: string; mobilePhoneNumberInvalid: string; workEmail: string; ownsOver25Question: string; ownsOver25SummaryLabel: string; ownsOver25Yes: string; ownsOver25No: string; ownershipPercentage: string; ownershipPercentagePlaceholder: string; ownershipPercentageRangeError: string; /** Suffix shown after ownership percentage inputs (e.g. `%`). */ percentSuffix: string; stateTitles?: Partial>; } declare const PERSONAL_DETAILS_LABELS_EN: PersonalDetailsLabels; interface ResultLabels { loadingMessage: string; successHeadingLine1: string; successBody: string; pendingHeadingLine1: string; pendingBody: string; pendingEmailBoxLead: string; navigateToDashboard: string; /** Use `{bankName}` for the sponsoring bank (e.g. "Zenith Bank"). */ bankLogoAlt: string; /** Use `{bankName}` for the sponsoring bank (e.g. "Zenith Bank"). */ fdicDisclaimer: string; } declare const RESULT_LABELS_EN: ResultLabels; interface MarketingWidgetImage { src: string; alt: string; width?: number; } interface MarketingWidgetAppearance { primaryColor: string; primaryContrastColor: string; cardBackgroundColor: string; borderRadius: string; boxShadow: string; modalBackgroundColor: string; } interface MarketingWidgetContent { vspLogo: MarketingWidgetImage; bankingText: string; primaryCaption: string; secondaryCaption: string; /** Full card/modal attribution, e.g. "Provided by Zenith Bank, Member FDIC". */ providedByCaption: string; modalPrimaryImg: MarketingWidgetImage; primaryModalHeader: string; benefits: string[]; bankLogoSrc: string; appearance: MarketingWidgetAppearance; } /** * Host-facing domain shapes for bank-account onboarding prefill and widget * state. Owned by the feature layer so the published API does not re-export * UI form view-models as the business contract. */ type CompanyStructureValue = 'CORPORATION_PUBLIC' | 'CORPORATION_PRIVATE' | 'CORPORATION_NOT_FOR_PROFIT' | 'LLC' | 'LLP' | 'PARTNERSHIP' | 'SOLE_PROPRIETORSHIP' | 'GOVERNMENT' | 'COOPERATIVE' | 'ASSOCIATION' | 'OTHER'; interface BusinessDetailsValues { companyLegalName: string; companyDbaName: string; businessAddress: string; city: string; state: string; zipCode: string; companyPhoneNumber: string; companyStructure: CompanyStructureValue | ''; website: string; taxId: string; naicsCode: string; isAuthorized: boolean | null; isCheckboxChecked: boolean; } interface PersonalDetailsValues { firstName: string; lastName: string; dateOfBirth: Date | undefined; ssn: string; homeAddress: string; city: string; state: string; zipCode: string; mobilePhoneNumber: string; workEmail: string; ownsOver25Percent: boolean | null; ownershipPercentage: number | null; } interface AdditionalOwner { firstName: string; lastName: string; dateOfBirth: Date | undefined; ssn: string; homeAddress: string; city: string; state: string; zipCode: string; mobilePhoneNumber: string; ownsOver25Percent: boolean | null; ownershipPercentage: number | null; } /** * Legal disclosure URLs for the onboarding agreement step. * * Resolved by the host application (e.g. from white-label `onboardingTerms` * or bank disclosure PDFs) and passed into the widget — the published package * must not hard-code host/bank lookups. */ interface DisclosureLinks { termsHref?: string; privacyHref?: string; electronicCommunicationHref?: string; patriotActHref?: string; } /** Nested keys are individually optional — see AGENTS.md labels guidance. */ type PartialDeep = { [K in keyof T]?: T[K] extends object ? PartialDeep : T[K]; }; interface BankAccountOnboardingWidgetLabels { stepIndicator: { business: string; personal: string; ownership: string; done: string; }; businessDetails: PartialDeep; personalDetails: Partial; additionalOwners: Partial; result: ResultLabels; back: string; cancel: string; next: string; submit: string; businessReviewTitle: string; businessReviewSubtitle: string; personalReviewTitle: string; personalReviewSubtitle: string; /** Accessible title for the onboarding modal. */ modalTitle: string; /** Thrown when submit returns without an application id. */ submitFailedError: string; /** Fallback when an API error has no extractable message. */ genericRetryError: string; /** Used when init has no bank name for disclaimers / result branding. */ fallbackBankName: string; /** * Shell footer disclaimer. Use `{bankName}` for the sponsoring bank * (e.g. "Zenith Bank"). */ shellFdicDisclaimer: string; } interface BankAccountOnboardingWidgetInnerProps { onEmbeddedOnboardingCompletedSuccessfully: () => void; onNavigateToDashboard: () => void; labels?: PartialDeep; initialBusinessDetails?: Partial; initialPersonalDetails?: Partial; initialAdditionalOwners?: AdditionalOwner[]; bankLogoSrc?: string; /** * Host-resolved disclosure URLs for the business-details agreement step. * The published widget does not look up white-label/bank maps itself. */ disclosureLinks?: DisclosureLinks; /** * Host-resolved marketing card/modal content. When omitted or `null`, the * marketing surface is not rendered. */ marketingContent?: MarketingWidgetContent | null; /** * Controlled open state for the onboarding modal. When provided, the host * application owns the open/close state and must update it via * `onOpenChange`. Defaults to uncontrolled mode (`defaultOpen` is honoured). */ open?: boolean; /** * Initial open state when uncontrolled. Defaults to `false` so the onboarding * modal stays hidden until the host or marketing CTA opens it. */ defaultOpen?: boolean; /** * Notified whenever the modal opens or closes — both from internal gestures * (overlay click, escape key, close button) and external state updates. * Also fires in uncontrolled mode (`open` omitted) so hosts can run analytics * or other side effects without owning the open state. */ onOpenChange?: (open: boolean) => void; } type BankAccountOnboardingWidgetProps = WidgetProviderProps & BankAccountOnboardingWidgetInnerProps; declare function BankAccountOnboardingWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: BankAccountOnboardingWidgetProps): React.JSX.Element; /** * Co-located user-facing strings for the products widget UI. Each component * takes a `labels?: Partial<…Labels>` prop merged over the matching * `*_LABELS_EN` default. */ interface ProductTypeBadgeLabels { product: string; service: string; } interface ProductsScreenLabels { title: string; createButton: string; manageUnitsButton: string; columnName: string; columnType: string; columnDescription: string; columnUnit: string; columnPrice: string; searchPlaceholder: string; typeFilterAll: string; typeFilterProduct: string; typeFilterService: string; unitFilterAll: string; emptyTitle: string; emptyDescription: string; emptyAction: string; filterEmptyTitle: string; filterEmptyDescription: string; errorTitle: string; errorDescription: string; errorRetry: string; typeBadge: ProductTypeBadgeLabels; } interface ProductDetailsSheetLabels { hiddenDescription: string; /** `{type}` and `{createdAt}` are replaced at render time. */ subtitle: string; /** `{type}` is replaced with "Product" or "Service". */ sectionHeading: string; typeProductDescription: string; typeServiceDescription: string; /** `{type}` is replaced with "Product" or "Service". */ rowName: string; rowDescription: string; rowType: string; rowUnit: string; rowPrice: string; historyHeading: string; rowCreatedOn: string; rowLastUpdate: string; /** Accessible label for the overflow actions trigger button. */ moreActionsLabel: string; /** Accessible label for the close button. */ closeLabel: string; /** Fallback displayed in a detail row when the value is empty. */ rowEmptyValue: string; /** Label for the delete item in the actions dropdown. `{type}` is replaced with "Product" or "Service". */ deleteProductOption: string; editButton: string; loadingTitle: string; errorTitle: string; errorDescription: string; typeBadge: ProductTypeBadgeLabels; } interface ProductDeleteDialogLabels { /** `{name}` is replaced with the product name. */ title: string; message: string; confirmButton: string; cancelButton: string; } interface ProductsWidgetOwnProps { pageSizeOptions?: number[]; screenLabels?: Partial; formLabels?: Partial; detailsLabels?: Partial; deleteLabels?: Partial; measureUnitsLabels?: Partial; measureUnitDeleteLabels?: Partial; /** Overrides for validation / error messages produced by the widget. */ messageLabels?: Partial; } /** Public props for {@link ProductsWidget}. */ type ProductsWidgetProps = WidgetProviderProps & ProductsWidgetOwnProps; /** * Self-contained products/services widget: lists, filters, creates, edits, * views, and deletes products, and manages measure units. The provider/inner * split keeps the public component a pure {@link WidgetProvider} wrapper. * * @example * ```tsx * * ``` */ declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: ProductsWidgetProps): React.JSX.Element; interface Labels$2 { loadingLabel: string; errorLabel: string; /** * Lead-in for the contact line, rendered as * `{contactPrefix} {bankName} {link}.` when both a bank name and a contact * URL are available. */ contactPrefix: string; /** Text of the contact link (wraps the contact URL). */ contactLinkText: string; } interface FeatureLabels$3 { personalTab: string; businessTab: string; subtitle: string; nameLabel: string; emailLabel: string; phoneLabel: string; legalNameLabel: string; companyAddressLabel: string; companyPhoneLabel: string; companyEmailLabel: string; emptyValue: string; } interface ProfileWidgetProps extends WidgetProviderProps { labels?: Partial; featureLabels?: Partial; /** * Where the "to change this information, contact your bank" line links (a * support page URL or a `mailto:`). Left unset, the card shows the plain * unlinked sentence instead — the package has no tenant-agnostic support * address to fall back on. The bank name in that line comes from widget init, * so this is the only value a host needs to supply. */ contactUrl?: string; } declare function ProfileWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: ProfileWidgetProps): React.JSX.Element; type ReceiptMatchWidgetProps = WidgetProviderProps & { isOpen?: boolean; preSelectedReceiptIds?: string[]; onClose?: () => void; targetTransactionId?: string; onSingleTransactionUpdate?: () => void; }; declare function ReceiptMatchWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, isOpen, preSelectedReceiptIds, onClose, targetTransactionId, onSingleTransactionUpdate, }: ReceiptMatchWidgetProps): React.JSX.Element; interface Labels$1 { title: string; description?: string; } interface SettingsWidgetSection { id: string; label: string; content: ReactNode; } interface FeatureLabels$2 { profileSection: string; teamSection: string; invoiceSection: string; billPaySection: string; accountingSection: string; tagsSection: string; expenseSection: string; helpSection: string; expenseApprovalsTab: string; expenseRequirementsTab: string; } /** * The sections this widget renders itself. These ids are the public vocabulary * a host uses to deep-link into a section, so they are part of the package's * API surface — renaming one is a breaking change. */ declare const SettingsSection: { readonly Profile: "profile"; readonly Team: "team"; readonly Invoice: "invoice"; readonly Expense: "expense"; readonly BillPay: "bill-pay"; readonly Accounting: "accounting"; readonly Tags: "tags"; readonly Help: "help"; }; type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection]; /** * A selectable section id: one of the built-ins, or the id of a host-supplied * {@link SettingsWidgetAdditionalSection}. The `string & {}` arm keeps the * built-in literals visible to editor autocomplete while still accepting a * host's own id. */ type SettingsWidgetSectionId = SettingsSection | (string & {}); /** * A section contributed by the host, rendered alongside the built-in ones. * * This exists for surfaces the published package cannot own — the white-label * dashboard's password management, for instance, which is an app-auth concern * rather than an embedded one. Prefer the `*Content` props when replacing the * content of a section that already exists. */ interface SettingsWidgetAdditionalSection extends SettingsWidgetSection { /** * Place this section immediately after the named built-in one. Sections with * no `after` — and those whose anchor is hidden by scope gating — are * appended to the end of the list. */ after?: SettingsSection; } interface SettingsWidgetProps extends MoniteRegionProviderProps { labels?: Partial; featureLabels?: Partial; /** Forwarded to the embedded Team section's {@link TeamWidget} — the * allowlisted URL invite emails link to. Defaults to * `${window.location.origin}/accept-invite`; set it when the host app's * registered landing route differs from that default, or the origin is * not on the OIDC redirect-URI allowlist (preview/localhost). */ acceptInviteRedirectUri?: string; /** Forwarded to the embedded Help section's {@link HelpWidget} — where its * "Contact Us" line links (a support page URL or a `mailto:`). The line is * hidden entirely when unset, since the package has no tenant-agnostic * support address to fall back on. The bank name in that line comes from * widget init, so this is the only value a host needs to supply. */ helpContactUrl?: string; /** Forwarded to the embedded Profile section's {@link ProfileWidget} — where * its "to change this information, contact your bank" line links. The line * falls back to a plain, unlinked sentence when unset, for the same reason * {@link SettingsWidgetProps.helpContactUrl} does. */ profileContactUrl?: string; /** The section to show. Leave unset to let the widget own the selection; * supply it (with {@link SettingsWidgetProps.onSelectedSectionChange}) to * drive navigation from a route, a search param, or host state. A section * hidden by the user's scopes falls back to the first visible one. */ selectedSection?: SettingsWidgetSectionId; /** Called with the id of the section the user selected. Fires whether or not * {@link SettingsWidgetProps.selectedSection} is supplied, so a host can mirror * the selection into its URL without taking ownership of it. */ onSelectedSectionChange?: (section: SettingsWidgetSectionId) => void; /** Host-owned sections rendered alongside the built-in ones. */ additionalSections?: SettingsWidgetAdditionalSection[]; profileContent?: ReactNode; teamContent?: ReactNode; billPayContent?: ReactNode; helpContent?: ReactNode; expenseContent?: ReactNode; accountingContent?: ReactNode; tagsContent?: ReactNode; invoiceContent?: ReactNode; } declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, disclosuresAcceptance, ...innerProps }: SettingsWidgetProps): React.JSX.Element; /** * Co-located user-facing strings for the tags widget UI. Each component takes a * `labels?: Partial<…Labels>` prop merged over the matching `*_LABELS_EN` default. */ interface TagsScreenLabels { title: string; createButton: string; columnName: string; columnCategory: string; columnKeywords: string; columnCreatedAt: string; columnUpdatedAt: string; columnCreatedBy: string; columnActions: string; actionDelete: string; openActionsMenu: string; emptyTitle: string; emptyDescription: string; emptyAction: string; errorTitle: string; errorDescription: string; errorRetry: string; } interface TagFormSheetLabels { createTitle: string; /** `{name}` is replaced with the tag being edited. */ editTitle: string; nameLabel: string; categoryLabel: string; categoryPlaceholder: string; keywordsLabel: string; keywordsPlaceholder: string; /** Accessible label for a keyword chip's remove button. `{keyword}` is replaced. */ removeKeyword: string; cancelButton: string; createButton: string; saveButton: string; deleteButton: string; } interface TagDeleteDialogLabels { /** `{name}` is replaced with the tag name. */ title: string; message: string; confirmButton: string; cancelButton: string; } /** * Overridable validation / error messages produced by the tags feature layer * and surfaced through the form's `errors` prop. Consumers override via the * widget's `messageLabels` prop, merged over {@link TAG_MESSAGE_LABELS_EN}. */ interface TagMessageLabels { nameRequired: string; nameTooLong: string; keywordTooShort: string; keywordTooLong: string; /** Shown for a non-field-specific submit failure. */ genericError: string; } interface TagsWidgetOwnProps { /** Page-size options for the table footer. */ pageSizeOptions?: number[]; /** Label overrides for the tags table screen. */ screenLabels?: Partial; /** Label overrides for the create/edit form. */ formLabels?: Partial; /** Label overrides for the delete confirmation. */ deleteLabels?: Partial; /** Overrides for validation / error messages produced by the widget. */ messageLabels?: Partial; } /** Public props for {@link TagsWidget}. */ type TagsWidgetProps = WidgetProviderProps & TagsWidgetOwnProps; /** * Self-contained tags widget: lists, creates, edits, and deletes tags, and * manages per-tag OCR auto-tagging keywords. The provider/inner split keeps the * public component a pure {@link WidgetProvider} wrapper while the inner runs * inside the provider tree so data-access hooks can read widget context. * * @example * ```tsx * * ``` */ declare function TagsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: TagsWidgetProps): React.JSX.Element; interface Labels { title: string; nameColumn: string; roleColumn: string; /** Placeholder shown in the role cell for deactivated members (no role). */ inactiveRolePlaceholder: string; departmentColumn: string; statusColumn: string; loadingLabel: string; emptyTitle: string; emptyDescription: string; errorTitle: string; errorDescription: string; rowsPerPageLabel: string; previousPageButton: string; nextPageButton: string; detailsBackButton: string; /** "Member details" section heading on the detail view. */ detailsMemberDetailsHeading: string; detailsNameLabel: string; detailsEmailLabel: string; detailsRoleLabel: string; detailsStatusLabel: string; detailsLastSignInLabel: string; detailsDepartmentLabel: string; detailsLocationLabel: string; /** "Reporting manager" section heading on the detail view. */ detailsReportingManagerLabel: string; /** Shown in the reporting-manager section when the member has no manager. */ detailsReportingManagerNone: string; /** "Approves expenses for" section heading (the member's direct reports). */ detailsApprovesExpensesHeading: string; detailsAccountAccessLabel: string; rolesSectionHeading: string; rolesSectionDescription: string; roleLoadingLabel: string; detailsEditButton: string; detailsDeactivateButton: string; /** Resend-invite action on the detail view (pending members only). */ detailsResendButton: string; inviteButton: string; inviteTitle: string; inviteBackToTeamButton: string; inviteDetailsSectionHeading: string; /** Single full-name field — the create endpoint takes one `name`. */ inviteNameLabel: string; inviteWorkEmailLabel: string; inviteDepartmentLabel: string; inviteDepartmentPlaceholder: string; inviteDepartmentEmpty: string; /** Error placeholder + helper when the department list fails to load. */ inviteDepartmentLoadError: string; inviteDepartmentLoadErrorHelper: string; /** Helper shown when the department list loaded but is empty. */ inviteDepartmentEmptyHelper: string; inviteLocationLabel: string; inviteLocationPlaceholder: string; inviteLocationEmpty: string; inviteLocationLoadError: string; inviteLocationLoadErrorHelper: string; inviteLocationEmptyHelper: string; inviteReportingManagerLabel: string; inviteReportingManagerPlaceholder: string; inviteReportingManagerEmpty: string; inviteReportingManagerLoadError: string; inviteReportingManagerLoadErrorHelper: string; inviteReportingManagerEmptyHelper: string; /** Explainer shown under the reporting-manager select when managers exist. */ inviteReportingManagerHelper: string; /** Placeholder in the reporting-manager search box. */ inviteReportingManagerSearchPlaceholder: string; /** Shown in the reporting-manager list when a search matches no one. */ inviteReportingManagerNoResults: string; inviteOptionsLoading: string; /** Clears an optional select (department/location/reporting manager). */ inviteOptionNone: string; inviteRoleSectionHeading: string; inviteRoleSectionDescription: string; inviteAccountAccessSectionHeading: string; inviteAccountAccessSectionDescription: string; inviteAccountAccessPlaceholder: string; inviteAccountAccessEmpty: string; /** Account-access table column headers, shared by the invite section and the * view/change access modal. */ accountAccessNameColumn: string; accountAccessAccessColumn: string; /** aria-label for an account row's access checkbox; the name is appended. */ accountAccessToggleLabel: string; /** Read-only account table columns on the member detail view. */ accountAccessNumberColumn: string; accountAccessTypeColumn: string; accountAccessSourceColumn: string; /** Shown in place of the picker when the selected role is an admin. */ inviteAccountAccessAdminNote: string; /** Shown beneath the account-access heading when the selected role is an * employee, who inherits no account access (invite and edit flows). */ manageAccessEmployeeNote: string; /** Shown when the account list failed to load, blocking the invite. */ inviteAccountAccessLoadError: string; inviteCancelButton: string; inviteSubmitButton: string; /** Empty state for the account-access checklist (no accounts in the org). */ manageAccessAccountsEmpty: string; /** Loading placeholder for the account-access checklist. */ manageAccessLoadingLabel: string; /** Shown in place of the checklist when the selected role is an admin. */ manageAccessAdminNote: string; editTitle: string; editDescription: string; /** Back gesture on the full-page edit form (returns to the member detail). */ editBackButton: string; editNameLabel: string; /** Work email in edit — read-only, so no required asterisk. */ editEmailLabel: string; editRoleLabel: string; editRolePlaceholder: string; /** Section heading for the account-access checklist on the edit page. */ editAccountAccessLabel: string; editCancelButton: string; editSaveButton: string; actionDialogCancelButton: string; } /** Strings the feature layer bakes into the display-ready view models. */ interface FeatureLabels$1 { /** Placeholder for fields the API has no value for (role, department, ...). */ notAvailable: string; /** Last sign-in value for members who have never signed in. */ neverSignedIn: string; /** Prefix for the pagination range, e.g. "Viewing 1-10". */ viewingRangeLabel: string; /** Validation messages the feature attaches to form fields. */ nameRequiredError: string; firstNameRequiredError: string; lastNameRequiredError: string; emailRequiredError: string; emailInvalidError: string; roleRequiredError: string; /** Toasts shown after a mutation succeeds. */ inviteSuccessToast: string; resendSuccessToast: string; /** Mutation failure messages shown inline in the workflows. */ inviteFailedError: string; editFailedError: string; deactivateFailedError: string; manageAccessFailedError: string; /** Shown when a member's per-account access could not be loaded. */ loadAccessFailedError: string; /** Shown when an Admin/Employee role change can't reconcile account access * (the token lacks the account-access scopes). */ roleNeedsAccountAccessError: string; /** Account-access detail summary building blocks. */ accountAccessAll: string; /** Shown for a non-admin member with zero granted accounts (distinct from the * not-available placeholder used while access is still loading). */ accountAccessNone: string; accountAccessCountSingular: string; accountAccessCountPlural: string; accountAccessOf: string; /** Account type labels shown in the account-access table. */ accountTypeChecking: string; accountTypeSavings: string; /** Account source labels shown in the detail view's account table. */ accountSourceInternal: string; accountSourceExternal: string; /** Deactivate confirmation copy. */ deactivateDialogTitle: string; deactivateDialogDescription: string; deactivateConfirmButton: string; /** Resend-invite confirmation copy (pending members). */ resendDialogTitle: string; resendDialogDescription: string; resendConfirmButton: string; resendFailedError: string; /** Tabs. */ teamMembersTab: string; departmentsTab: string; locationsTab: string; /** Shared group-admin (departments + locations) strings. */ groupNameColumn: string; groupAssignedColumn: string; groupActionsColumn: string; groupEditAction: string; groupRowActionsAriaLabel: string; groupMembersLabel: string; groupMembersSearchPlaceholder: string; groupMembersEmpty: string; groupCancelButton: string; groupSaveButton: string; groupMemberSingular: string; groupMemberPlural: string; groupNoMembers: string; /** Departments. */ departmentsTitle: string; departmentsAddButton: string; departmentsEmpty: string; departmentsLoading: string; departmentsErrorTitle: string; departmentsErrorDescription: string; departmentCreateTitle: string; departmentEditTitle: string; departmentDrawerDescription: string; departmentNameLabel: string; departmentNamePlaceholder: string; departmentDeleteAction: string; departmentDeleteDialogTitle: string; departmentDeleteDialogDescription: string; departmentDeleteConfirmButton: string; departmentSaveFailed: string; departmentDeleteFailed: string; /** Locations. */ locationsTitle: string; locationsAddButton: string; locationsEmpty: string; locationsLoading: string; locationsErrorTitle: string; locationsErrorDescription: string; locationCreateTitle: string; locationEditTitle: string; locationDrawerDescription: string; locationNameLabel: string; locationNamePlaceholder: string; locationDeleteAction: string; locationDeleteDialogTitle: string; locationDeleteDialogDescription: string; locationDeleteConfirmButton: string; locationSaveFailed: string; locationDeleteFailed: string; } interface TeamWidgetProps extends WidgetProviderProps { labels?: Partial; featureLabels?: Partial; /** Optional page heading rendered above the widget. Embedders that already * provide their own page title should omit this. */ title?: string; /** * Absolute URL the accept-invite link in invitation emails points at (sent * as `redirectUri` on the identity create-user call, for both invite and * resend). Must be registered on the OIDC application's redirect-URI * allowlist. Defaults to `${window.location.origin}/accept-invite` — the * universal invite landing route every dashboard host registers. Set it * when the host app's registered landing route differs from that default, * or the origin is not on the allowlist (e.g. a preview deployment or * localhost). */ acceptInviteRedirectUri?: string; } declare function TeamWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: TeamWidgetProps): React.JSX.Element; interface TransfersWidgetLabels { widgetTitle: string; transferMoneyCta: string; /** Tooltip when the transfer CTA is disabled for insufficient eligible accounts. */ transferMoneyCtaDisabledTooltip: string; /** Fallback when an account has no nickname in lists or options. */ accountFallbackName: string; /** Mask prefix before last four digits on account options. */ embeddedAccountMaskPrefix: string; /** Prefix before full account number on review cards (e.g. "Account #:"). */ modalReviewAccountNumberPrefix: string; /** Separator between from and to account names in the route line. */ listAccountsSeparator: string; loadErrorTitle: string; loadErrorDescription: string; loadErrorRetry: string; emptyTitle: string; emptyDescription: string; modalTitle: string; /** Shown under the title on the accounts step (e.g. ACH timing). */ modalAccountsSubtitle: string; /** Placeholder inside the From account select on the accounts step. */ modalFromAccountPlaceholder: string; /** Placeholder inside the To account select on the accounts step. */ modalToAccountPlaceholder: string; /** Primary action on the accounts step (legacy: full-width Confirm). */ modalAccountsConfirm: string; modalStepAccounts: string; modalStepAmount: string; modalStepReview: string; modalStepResult: string; modalFromLabel: string; modalToLabel: string; modalAmountLabel: string; /** Placeholder for the amount input (e.g. "0.00"). */ modalAmountPlaceholder: string; modalContinue: string; modalBack: string; modalSubmit: string; modalClose: string; modalReviewHeading: string; modalReviewFromAccountLabel: string; modalReviewToAccountLabel: string; modalAvailableBalanceCaption: string; modalConfirmTransfer: string; modalGoBack: string; modalSuccessTitle: string; modalSuccessDescription: string; modalResultSuccessTitle: string; modalResultErrorTitle: string; modalResultTransferMessagePrefix: string; modalResultSuccessMessageSuffix: string; modalResultErrorMessageSuffix: string; modalBackToTransfers: string; modalSelectPlaceholder: string; rowStatusCompleted: string; rowStatusPending: string; rowStatusFailed: string; rowTypeInternal: string; rowTypeToExternal: string; rowTypeFromExternal: string; modalAmountInvalidError: string; /** Shown under the amount field when the from (embedded) balance is too low. */ modalInsufficientFundsError: string; /** Resets from, to, and amount on the accounts step. */ modalClearSelections: string; modalUnsupportedPairError: string; modalSubmitFailedError: string; } declare const TRANSFERS_WIDGET_LABELS_EN: TransfersWidgetLabels; interface FeatureLabels { unavailableLabel: string; routeSeparator: string; defaultCurrencyCode: string; defaultSecCode: string; } declare const DEFAULT_FEATURE_LABELS: FeatureLabels; interface TransfersWidgetPassthroughProps { labels?: Partial; featureLabels?: Partial; } interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps { } declare function TransfersWidget({ labels, featureLabels, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element; /** * Public {@link WidgetProvider} — the integrator-facing provider. * * The workspace-internal provider additionally accepts a `widgetName` prop that * stamps analytics identity (`widget_name` + a per-mount `widget_instance_id`) * on everything emitted beneath it (EMBD-4190). That identity is set **only** by * widget feature libs, never by integrators: a spoofed `widget_name` or a forced * fresh `widget_instance_id` would corrupt correlation. * * `WidgetProviderProps` deliberately omits `widgetName`, so typed (TS) consumers * cannot pass it. This wrapper additionally strips any stray `widgetName` a * non-typed (JS) host might pass at runtime before delegating, so the internal * identity prop is unreachable from the published surface in every case — the * provider's declaration in the emitted types carries no `widgetName`. */ declare function WidgetProvider(props: PropsWithChildren): ReactNode; interface NoPolicyBannerLabels { Title: string; Body: string; /** * Heading for an org that *has* rules, none of which this editor can show. The * plain `Title` would contradict the notice sitting directly above it, which * has just said how many rules exist. */ TitleWithUnlistedRules: string; /** Body for that case. The notice above already explains the why. */ BodyWithUnlistedRules: string; CreateRule: string; } interface NoPolicyBannerProps { onCreateRule: () => void; disabled?: boolean; /** * Why Create rule is off, shown on hover and on keyboard focus. Omit it for the * transient reasons that explain themselves on screen (a write in flight). */ createRuleDisabledReason?: string; /** * Whether the org has rules that simply are not shown here. Switches the copy * off the "none created yet" claim, which would contradict the notice that * sits above this banner and has just counted them. */ hasUnlistedRules?: boolean; labels?: Partial; } interface GapCoverageAlertLabels { Title: string; Footer: string; } /** * One uncovered bill-amount range. `label` is pre-formatted by the caller * (e.g. "$10.01 to $99.99" or "$500.01 or more") — this component renders it * as-is rather than composing range/currency copy itself. */ interface GapRange { id: string; label: string; /** * Why a new rule cannot take this range, for the link's tooltip. A range can be * uncovered today and still be spoken for — a rule whose schedule has not * started covers nothing yet but claims its range — in which case starting a * rule here only ever ends in a rejected save. Omit for a range that is free. */ blockedReason?: string; } interface GapCoverageAlertProps { gaps: GapRange[]; onSelectGap: (id: string) => void; disabled?: boolean; labels?: Partial; } type PendingFeatureStyleSources = GapCoverageAlertProps | NoPolicyBannerProps; export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ACCOUNT_DELETE_DIALOG_LABELS_EN, ACCOUNT_FORM_SHEET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, AccountDeleteDialog, AccountFormSheet, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CHART_OF_ACCOUNTS_LABELS_EN, CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, CREATE_CARD_FEATURE_LABELS_EN, CardDetailsWidget, CardFormatValue, CardsWidget, ChartOfAccountsTable, ChartOfAccountsWidget, CounterpartsWidget, CreateCardWidget, ERROR_STATE_ID, ExpenseApprovalPoliciesWidget, ExpenseManagementWidget, ExpenseRequirementsWidget, HELP_FAQ_EN, HELP_WIDGET_LABELS_EN, HelpWidget, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, ProfileWidget, RESULT_LABELS_EN, ReceiptMatchWidget, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TagsWidget, TeamWidget, TransfersWidget, UIFramework, UploadReceiptWidget, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, resolveCreateCardFeatureLabels, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken }; export type { AcceptDisclosuresLinks, AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccountDeleteDialogLabels, AccountDeleteDialogProps, Labels$5 as AccountDetailsWidgetLabels, AccountFormErrors, AccountFormMode, AccountFormSheetLabels, AccountFormSheetProps, AccountFormValues, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$5 as BankAccountsWidgetFeatureLabels, Labels$6 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels as CardsWidgetFeatureLabels, CardsListLabels as CardsWidgetLabels, CardsWidgetPagination, CardsWidgetProps, ChartOfAccountsLabels, ChartOfAccountsMessageLabels, ChartOfAccountsTableProps, ChartOfAccountsWidgetLabelProps, ChartOfAccountsWidgetProps, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreateCardFeatureLabels, CreateCardWidgetLabels, CreateCardWidgetProps, DisclosureLinks, EmbeddedClient, ExpenseApprovalPoliciesWidgetProps, Labels$4 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseRequirementsWidgetProps, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, HelpWidgetLabels, HelpWidgetProps, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LedgerAccountRow, LinkComponent, LinkComponentProps, FeatureLabels$4 as LinkedAccountsWidgetFeatureLabels, Labels$3 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetContent, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, FeatureLabels$3 as ProfileWidgetFeatureLabels, Labels$2 as ProfileWidgetLabels, ProfileWidgetProps, ReceiptMatchSummary, ReceiptMatchWidgetProps, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$2 as SettingsWidgetFeatureLabels, Labels$1 as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TagDeleteDialogLabels, TagFormSheetLabels, TagMessageLabels, TagsScreenLabels, TagsWidgetProps, FeatureLabels$1 as TeamWidgetFeatureLabels, Labels as TeamWidgetLabels, TeamWidgetProps, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderProps, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };