import * as React from 'react'; import { ComponentType, AnchorHTMLAttributes, ReactNode, PropsWithChildren, ErrorInfo, ReactElement } from 'react'; import { FallbackProps } from 'react-error-boundary'; import { SortingState, OnChangeFn } from '@tanstack/react-table'; 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'; /** * The rolling period a velocity control's amount and usage limits are evaluated over. * `TRANSACTION` applies the limit per-transaction and therefore carries no usage limit. */ type VelocityWindow = 'DAY' | 'LIFETIME' | 'MONTH' | 'TRANSACTION' | 'WEEK'; 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; } /** * Copy for the states `WidgetProvider` renders *itself*, in place of the widget: * the error-boundary fallback and the disclosures gate. A host overrides any * subset through the `providerLabels` prop, which cascades like * `disclosuresAcceptance`. * * Not named `Labels` on the public surface: a widget's own `labels` prop is a * different thing, and these two travel together on every widget's props type. */ interface WidgetProviderLabels { /** Default copy for the built-in error boundary fallback. */ errorBoundaryFallback: string; /** Heading when init reports disclosures are required and not yet accepted. */ disclosuresRequiredTitle: string; /** Heading while a token-only refresh leaves init stale for the live token. */ disclosuresRefreshingTitle: string; /** Supporting copy while the accept action is withheld for a stale init. */ disclosuresRefreshingDescription: string; } /** * 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 the caller owes disclosures — INVITED or * an ACTIVE user who owes a new version. Pass `` * so gated widgets have somewhere to accept. Cascades to nested * WidgetProviders. */ disclosuresAcceptance?: ReactNode; /** * Overrides for the copy a descendant `WidgetProvider` renders in place of * its widget: the built-in error-boundary fallback and the disclosures gate. * Any subset; unlisted keys keep their defaults. Cascades to the whole tree. */ providerLabels?: Partial; } /** * 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, providerLabels, }: 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 whose copy * comes from `providerLabels.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 the caller owes disclosures — an INVITED * teammate (including `NOT_REQUIRED` orgs, who still need Accept to * activate) or an ACTIVE user who owes a new version. Pass * ``. Cascades like `linkComponent`. * WidgetProvider cannot import the widget itself (cycle). */ disclosuresAcceptance?: ReactNode; /** * Overrides for the copy this provider renders in place of the widget: the * built-in error-boundary fallback and the disclosures gate. Any subset; * unlisted keys keep their defaults. Cascades like `linkComponent`. * * Named `providerLabels` rather than `labels` because a widget's own * `labels` prop sits alongside this one on the same props type. */ providerLabels?: Partial; } 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 callers who * owe disclosures. `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; 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 Labels$6 { 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, providerLabels, ...innerProps }: BankAccountsWidgetProps): 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$7 = { [K in keyof T]?: T[K] extends object ? PartialDeep$7 : 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; /** Sub-header over the merchant categories / velocity control rows. */ cardControlsHeading: string; allowedCategories: string; spendLimit: string; perTransactionMax: string; /** Stands in for a row whose value the card does not carry. */ emptyValue: string; copyCardholderAriaLabel: string; copyNicknameAriaLabel: string; copyBillingAddressAriaLabel: string; } /** Copy for the controls the owner can switch on alongside the details. */ interface CardDetailsActionLabels { /** Primary control that opens the Activate Card form. */ activateCard: string; /** Secondary control that asks the owner to reveal the card's credentials. */ viewCard: string; /** The same control, once the credentials are on screen. */ hideCard: string; } /** * Copy for the revealed card credentials. The values themselves never have a * default here — the panel is handed them or renders the field blank. */ interface CardDetailsCredentialsLabels { cardNumber: string; expirationDate: string; securityCode: string; copyCardNumberAriaLabel: string; copyExpirationDateAriaLabel: string; copySecurityCodeAriaLabel: string; /** Shown next to the control when the reveal failed. */ errorDescription: 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; actions: CardDetailsActionLabels; credentials: CardDetailsCredentialsLabels; status: CardDetailsStatusScreenLabels; } /** Chrome around the form. */ interface ActivateCardHeaderLabels { title: string; /** Accessible name for the close (X) control. */ closeAriaLabel: string; } /** Accessible copy for the card face this panel reuses. */ interface ActivateCardCardFaceLabels { /** Alt text for the bank logo when the caller supplies no `bankLogoAlt`. */ bankLogoAlt: string; } /** Field headings, placeholders and the copy behind each affordance. */ interface ActivateCardFieldLabels { expirationDate: string; expirationDatePlaceholder: string; securityCode: string; securityCodePlaceholder: string; /** Accessible name for the (?) control that reveals the explanation. */ securityCodeInfoAriaLabel: string; /** The explanation itself, shown in the tooltip. */ securityCodeInfo: string; } /** One message per failure the panel can mark. */ interface ActivateCardValidationLabels { impossibleMonth: string; pastExpiration: string; /** * Shown when the server rejects the pair. Names both values because the * verify endpoint withholds which one missed — see `ActivateCardFormErrors`. */ verificationRejected: string; } /** The CTA and the two screens that replace or accompany the form. */ interface ActivateCardStatusLabels { submit: string; /** Accessible name announced while the activation is in flight. */ submittingAriaLabel: string; successTitle: string; successDescription: string; /** Label for the optional post-success control. */ done: string; /** Fallback failure copy when the owner supplies no `errorMessage`. */ errorDescription: string; } interface ActivateCardPanelLabels { header: ActivateCardHeaderLabels; cardFace: ActivateCardCardFaceLabels; fields: ActivateCardFieldLabels; validation: ActivateCardValidationLabels; status: ActivateCardStatusLabels; } /** * 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$6 = { [K in keyof T]?: T[K] extends object ? PartialDeep$6 : 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; /** * Toast shown when activation is refused because the card is no longer * awaiting it. Resolved here rather than in the panel because it is an * API outcome, and because the panel closes as it fires. */ activationConflictToast: string; /** * Replaces the panel's generic reveal error when the credentials call was * refused (HTTP 403). * * It lives here rather than on the panel because deciding that a failure was a * refusal means reading the error, which is this layer's job — the panel is * handed one already-chosen sentence either way, and its own * `credentials.errorDescription` still covers every other failure. * * The wording deliberately does not tell the reader to ask for a permission. * Reading a debit card and reading its credentials take the same scope, so a * reader looking at this panel already holds it; a 403 here means the call was * refused for this session, which asking an admin for a role will not fix. */ revealNotPermittedDescription: 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; /** * A velocity control's reset-period wording, keyed on the generated * `velocityWindow`. Used to build the spend limit row, e.g. "$500 / month". * `TRANSACTION` is unused there (it drives the separate per-transaction max * row instead) but is still a real enum member, so it stays in the map. */ velocityWindowLabels: 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$6; /** Overrides for the Activate Card form's copy. */ activateLabels?: PartialDeep$6; /** Overrides for the copy this layer resolves — see `CardDetailsFeatureLabels`. */ featureLabels?: PartialDeep$6; /** * 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, providerLabels, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element; /** * Reset-period tab labels and notice copy are deliberately absent: the owner * supplies those through `spendLimitPeriodOptions` / `spendLimitPeriodNotices`, * so declaring them here would give consumers override keys that no component * ever reads. */ interface CardControlsLabels { currencySymbol: string; spendLimit: { title: string; description: string; amountPlaceholder: string; amountAriaLabel: string; }; merchantCategories: { title: string; description: string; }; perTransactionMaximum: { title: string; description: string; amountPlaceholder: string; amountAriaLabel: string; }; } type PartialDeep$5 = { [K in keyof T]?: T[K] extends object ? PartialDeep$5 : T[K]; }; interface CreateCardWidgetLabels { header: { title: string; closeAriaLabel: string; }; cardArtAlt: string; setup: { sectionTitle: 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; }; cardControls: CardControlsLabels; 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; /** * Card issued but a follow-up velocity-control POST failed. The card * already exists; this must not read as a create failure. */ controlsWarning: string; /** * Card issued but granting company admins access to it failed. The card * already exists; this must not read as a create failure. */ companyAdminAccessWarning: string; /** * Card issued, but BOTH the velocity-control POST(s) and the company-admin * access grant failed. Distinct from the two single-failure warnings above * so an issuer who hits both is told about both, not just whichever this * code checks first. */ controlsAndAccessWarning: string; /** * The roster of users to grant access to a new card failed to load. * Shown with a retry action; Create stays disabled until it resolves so * a card is never issued without its required admin grants. */ debitCardIssuersError: string; retry: string; }; untitledFundingAccount: string; /** * API-required `name` on a velocity control. Not shown in this widget; * may surface on a later controls list. */ velocityControlNames: { spendLimit: string; perTransactionMaximum: string; }; /** * Spend-limit reset-period tab labels and notices. Owned here (not UI * labels) because the feature layer decides what each opaque period value * means. */ spendLimit: { periodOneTime: string; periodDaily: string; periodMonthly: string; oneTimeWarningTitle: string; oneTimeWarningDescription: string; dailyResetNotice: string; monthlyResetNotice: 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; }; } type CreateCardWidgetProps = WidgetProviderProps & { /** Static card plastic image URL (no overlays). Host / white-label supplied. */ cardArtSrc: string; labels?: PartialDeep$5; featureLabels?: Partial<{ toast: Partial; untitledFundingAccount: string; velocityControlNames: Partial; spendLimit: Partial; success: Partial; }>; className?: string; onClose?: () => void; onCancel?: () => void; /** Fired with the new debit card id after a successful create. */ onViewCard?: (cardId: string) => void; }; /** * 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$4 = { [K in keyof T]?: T[K] extends object ? PartialDeep$4 : 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; } /** * What `onPaginationChange` reports. One shared type across both programs — the * shape does not vary by program, so per-program aliases would be published * surface for nothing. Named without the `Widget` segment because no widget * called `CardsWidget` is published any more; `CreditCardsWidget` and * `DebitCardsWidget` both hand back this. */ interface CardsPagination { /** Cursor for the page on screen. Omit for the first page. */ paginationToken?: string; /** Number of rows requested per page. */ pageSize: number; } /** * The wider shape `pagination` / `defaultPagination` accept. Internal: a * `CardsPagination` handed back by `onPaginationChange` satisfies it, which is * the round-trip the docs describe, so the package publishes only that one. * Keeps the `CardsWidget` segment because the internal component keeps the name. */ interface CardsWidgetPaginationInput { paginationToken?: string; pageSize?: number; } /** * The internal props. Not published: `CreditCardsWidgetProps` and * `DebitCardsWidgetProps` are derived from this by omission, which is what makes * `cardProgram` an implementation detail and the debit-only create props * unreachable on a credit list. */ interface CardsWidgetProps extends WidgetProviderProps { /** * Which issuing program the list shows — `'credit'` or `'debit'`. It selects * the endpoint that is read as well as which scopes gate the affordances. * * **Required, with no default**, and supplied by the wrapper rather than by a * consumer: `CreditCardsWidget` and `DebitCardsWidget` pin it. It was a public * prop until those two exports replaced it, and a default here would silently * pick a program, where an integrator on one route only ever wants 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: CardsPagination) => 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$7; /** * 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$4; /** * 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']; /** * Overrides for the Activate Card form the details panel opens. * * Its own prop for the same reason `cardDetailsLabels` is: without it that * screen's copy is unreachable from this composition, so a host that translated * everything else would still meet English on the one form that asks the reader * to type something. */ cardDetailsActivateLabels?: CardDetailsWidgetProps['activateLabels']; /** * 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 because EMBD-4398 designs no activation flow for the *list*. * * The original second reason — that no activate endpoint existed — no longer * holds: both programs have one, and the details panel this widget opens now * runs the whole flow itself (EMBD-5085). So a built-in row flow is now * buildable, and this callback stays host-owned by choice rather than by * necessity. Changing it would be a breaking change to a published prop and * belongs in its own ticket; until then a host that wants the built-in flow * can omit this and let the reader open the card. */ onActivateCard?: (cardId: string) => void; } /** * Derived from the internal props rather than restated, so the two cannot drift. * * Four omissions, not one. `cardProgram` is pinned below. The three create-sheet * props are debit-only: the built-in sheet issues against `POST /credit-cards`'s * sibling and `CreateCardWidget` covers debit alone, so credit's Create card * needs a host `onCreateCard` or the button hides. That was prose in the doc; the * type says it here. */ type CreditCardsWidgetProps = Omit; /** * One page of an organization's **credit** cards, with a scope-gated Show my * cards toggle and per-row Activate affordance. Selecting a row opens that * card's read-only details in a sheet. * * Create card is host-owned here: pass `onCreateCard` or the button does not * render. Debit is {@link DebitCardsWidget}, a separate export because * integrators put the two programs on different routes — and because the * built-in create sheet is debit's alone. * * The program is pinned *after* the spread, so a JavaScript host still passing * the retired `cardProgram` cannot point this export at the debit endpoint. */ declare function CreditCardsWidget(props: CreditCardsWidgetProps): React.JSX.Element; /** * Derived from the internal props rather than restated, so the two cannot drift. * Only `cardProgram` is omitted — the built-in create sheet is debit's, so this * export keeps `cardArtSrc` and the two create-panel label props. */ type DebitCardsWidgetProps = Omit; /** * One page of an organization's **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. * * With `cardArtSrc`, Create card opens the same sheet with the built-in * `CreateCardWidget` issuance flow; a host `onCreateCard` still takes the * gesture over. Credit is {@link CreditCardsWidget}, which accepts neither * `cardArtSrc` nor the create-panel labels. * * The program is pinned *after* the spread, so a JavaScript host still passing * the retired `cardProgram` cannot point this export at the credit endpoint. */ declare function DebitCardsWidget(props: DebitCardsWidgetProps): 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; interface Labels$4 { description?: string; } interface SettingsWidgetSection { id: string; label: string; content: ReactNode; } interface FinopsThemeColors { primary?: string; primaryForeground?: string; } interface MoniteWrapperProps { finopsThemeColors?: FinopsThemeColors; } type MoniteRegionProviderProps = WidgetProviderProps & MoniteWrapperProps; interface FeatureLabels$4 { 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; /** The section to open on, for a host that wants a deep link without taking * ownership of the selection. Ignored when * {@link SettingsWidgetProps.selectedSection} is supplied; defaults to the * first visible section. Scopes arrive with the init response, so a section * this names opens as soon as it becomes visible, and one the user's scopes * never grant leaves the first visible section on screen. */ defaultSelectedSection?: 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, providerLabels, ...innerProps }: SettingsWidgetProps): 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$3 { unavailableLabel: string; routeSeparator: string; defaultCurrencyCode: string; defaultSecCode: string; } declare const DEFAULT_FEATURE_LABELS: FeatureLabels$3; interface TransfersWidgetPassthroughProps { labels?: Partial; featureLabels?: Partial; /** * Whether the transfer money modal is showing. Supplying it makes the modal * controlled: the widget reports every open and close through * `onTransferMoneyOpenChange` and changes nothing on screen until the host * supplies a new value. Omit to let the widget own it. */ isTransferMoneyOpen?: boolean; /** The modal's state on first render, for a host that only wants to seed it. */ defaultIsTransferMoneyOpen?: boolean; /** * Called on every open and close — the CTA, the modal's own dismissals, and * the close that follows a completed transfer — whether or not the modal is * controlled. */ onTransferMoneyOpenChange?: (open: boolean) => void; } interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps { } declare function TransfersWidget({ labels, featureLabels, isTransferMoneyOpen, defaultIsTransferMoneyOpen, onTransferMoneyOpenChange, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element; /** * Copy the shell owns. The section names are deliberately absent: they arrive on * each `SuiteSection`, because whoever decides which sections exist is also the * only layer that can name them. */ interface WidgetSuiteShellLabels { /** Names the section menu for assistive technology. */ navAriaLabel: string; /** * Announces the placeholder shell while the caller resolves which sections * exist. Read out in place of the menu, which has no items yet to name. */ loadingAriaLabel: string; /** Shown in place of the menu when the caller supplies no sections. */ emptyState: { title: string; body: string; }; } /** * `Labels` has a nested group, so a shallow `{ ...defaults, ...overrides }` * would let a consumer overriding one `emptyState` string drop the other. The * repo has no shared deep-partial type, so each labels module declares its own. */ type PartialDeep$3 = { [K in keyof T]?: T[K] extends object ? PartialDeep$3 : T[K]; }; /** * The section id vocabulary, and the shape of a registry entry. * * A leaf module on purpose: it imports no widget feature library and never * reaches the provider, so `labels.ts` and `WidgetSuiteProvider.tsx` can take * the ids from here without sitting downstream of the eight widgets the registry * pulls in. */ /** * The sections the suite can offer, declared in the default menu order. Order * here is documentation only — the suite renders whatever order its `sections` * prop lists. */ declare const WidgetSuiteSectionId: { readonly Dashboard: "dashboard"; readonly Accounts: "accounts"; readonly Cards: "cards"; readonly Transfers: "transfers"; readonly BillPay: "bill-pay"; readonly Invoicing: "invoicing"; readonly Expenses: "expenses"; readonly Settings: "settings"; }; type WidgetSuiteSectionId = (typeof WidgetSuiteSectionId)[keyof typeof WidgetSuiteSectionId]; /** * The whole surface in the shipped white-label header order * (`useDashboardLayout.tsx`): its banking group, then its finops group, then * Settings, which white label keeps in the avatar menu rather than the header. * * This is what `sections` defaults to, and it is exported as well so a host can * spread it and edit the list — dropping a section, or reordering one — without * writing the whole thing out. */ declare const WIDGET_SUITE_DEFAULT_SECTIONS: readonly ["dashboard", "accounts", "cards", "transfers", "bill-pay", "invoicing", "expenses", "settings"]; /** * The section names in the suite menu. * * Keyed by section id rather than hand-listed, so adding a section to the * registry fails the build here until it is named — the menu can never render a * section with no label. The ids come from the leaf `sectionIds` module, so this * reaches neither the registry nor the widgets behind it. */ type WidgetSuiteMenuLabels = Record; /** Copy for the heading above a section, as opposed to its menu item. */ interface WidgetSuiteSectionTitleLabels { /** * The bank attribution beneath the heading. `{bankName}` is replaced with the * bank `/init` names, so a translation can put it anywhere in the sentence * rather than after a fixed lead-in. An override that drops the placeholder * shows no name. */ bankTagline: string; } /** * Copy for the states where the suite cannot prove it may show normal content. * * Both are places the gate cannot proceed, and neither is reachable by a correct * integration against a healthy API. */ interface WidgetSuiteDisclosureLabels { /** * The first init fetch failed before the disclosure flags were known. The suite * must fail closed here, because an unknown requirement is not permission to * show ungated sections. */ initFailedState: { title: string; body: string; retryButton: string; }; /** * The acceptance was recorded and the init refresh that clears the gate * failed, so only our view of it is stale. * * The failure is the title and the reassurance is the body, in that order on * purpose: `ErrorState` puts a destructive-toned glyph above the title, so * leading with "accepted" reads at a glance as the acceptance having failed — * the one thing this state must not imply, since a user who believes that will * try to accept again. */ refreshFailedState: { title: string; body: string; retryButton: string; }; } /** * A widget's whole copy surface: every label prop it accepts, spread onto it so * the props keep the names that widget's own doc gives them. * * Derived rather than hand-listed: the debit card list alone has six, so a * written-out list goes stale the next time one grows a panel. `providerLabels` * is excluded because the suite addresses the provider once, at the top level. */ type WidgetLabelProps = Omit>, 'providerLabels'>; type WidgetSuiteBalancesLabels = WidgetLabelProps; type WidgetSuiteInsightsLabels = WidgetLabelProps; type WidgetSuiteAccountsLabels = WidgetLabelProps; type WidgetSuiteCreditCardsLabels = WidgetLabelProps; type WidgetSuiteDebitCardsLabels = WidgetLabelProps; type WidgetSuiteTransfersLabels = WidgetLabelProps; type WidgetSuiteSettingsLabels = WidgetLabelProps; /** The two widgets the Dashboard section pairs, each taking its own copy. */ interface WidgetSuiteDashboardLabels { balances?: WidgetSuiteBalancesLabels; insights?: WidgetSuiteInsightsLabels; } /** * The two card lists. * * `labels.title` is the one leaf the suite defaults anywhere under `sections`: * `CardsList` titles itself "Cards", and two instances stack in this section, so * each is retitled by program. */ interface WidgetSuiteCardsLabels { creditCards: WidgetSuiteCreditCardsLabels; debitCards: WidgetSuiteDebitCardsLabels; } /** Expenses is only a placeholder until the suite wires a read/self surface. */ interface WidgetSuiteExpensesLabels { expensesUnavailable: string; } /** * Copy the suite puts *inside* a section's panel, one group per section. * * A group is shaped as the override its widget accepts, so it is handed down by * reference rather than remapped key by key. * * Two sections have no group: Bill Pay and Invoicing both mount a Monite * surface, which carries its own copy and takes no label props at all. They get * one when the native builds replace them, and adding a group to an * already-optional tree breaks nobody. */ interface WidgetSuiteSectionContentLabels { dashboard: WidgetSuiteDashboardLabels; accounts?: WidgetSuiteAccountsLabels; cards: WidgetSuiteCardsLabels; transfers?: WidgetSuiteTransfersLabels; expenses: WidgetSuiteExpensesLabels; settings?: WidgetSuiteSettingsLabels; } /** * Every string the suite puts on screen, including the copy inside the widgets * it mounts. Two kinds of group, differing in who holds the default: * * - **Suite-owned** — `shell`, `menu`, `sectionTitle`, `disclosure`, * `sections.expenses`, and the two card-list titles. Defaulted in * {@link WIDGET_SUITE_LABELS_EN}, with an override merged over it. * - **Forwarded** — every other key under `sections`. Handed down untouched for * the widget to merge over its own defaults, so the suite carries no copy of a * widget's strings and cannot go stale against one. * * `WidgetProvider`'s copy is deliberately absent: it is already reachable * through the inherited `providerLabels` prop, and two routes to one string * could disagree. */ interface WidgetSuiteLabels { /** The shell's own copy — the nav landmark name, the empty state. */ shell: WidgetSuiteShellLabels; menu: WidgetSuiteMenuLabels; sectionTitle: WidgetSuiteSectionTitleLabels; disclosure: WidgetSuiteDisclosureLabels; sections: WidgetSuiteSectionContentLabels; } /** * The `labels` prop: a deep partial of {@link WidgetSuiteLabels}. * * `sections` is exempted from `PartialDeep` on purpose — every group under it is * already the exact override its widget accepts, so deepening it again would * admit a shape the suite cannot forward and would flatten a non-plain member * (`PartialDeep` maps a function-valued label to `{}`). The two suite-owned * groups under it are made partial one level for the same reason. */ type WidgetSuiteLabelOverrides = PartialDeep$3> & { sections?: Partial> & { cards?: Partial; expenses?: Partial; }; }; declare const WIDGET_SUITE_LABELS_EN: WidgetSuiteLabels; interface WidgetSuiteProps extends WidgetProviderProps { /** * Which sections the suite offers, in menu order. * * Defaults to {@link WIDGET_SUITE_DEFAULT_SECTIONS}, the whole surface in the * shipped white-label header order, so mounting the suite with auth props * alone gives a complete banking page. Name the list to compose a narrower * page, or to order it differently. * * A section listed here is still hidden when the token does not earn it, so * this is the ceiling rather than a promise of what renders — which is also * why the default is safe: a section added to the registry reaches a host that * took the default, and a user who cannot see it still does not. */ sections?: readonly WidgetSuiteSectionId[]; /** * Which section is showing, for a host that owns navigation — a URL, a router, * its own state. * * Puts the menu in controlled mode for the lifetime of the mount, so supply it * with `onSectionChange` or the surface will not move when the user clicks. * * The suite is addressable at exactly this depth and no deeper: what a section * has open — an account, a card, a settings tab — belongs to the widget behind * it, so a host that needs to deep-link one of those mounts that widget itself. */ section?: WidgetSuiteSectionId; /** * Which section the suite opens on, for a host that wants a deep link but not * ownership. Read once per mount, and ignored when `section` is supplied. * * Defaults to the first entry in `sections`. */ defaultSection?: WidgetSuiteSectionId; /** * The section a person moved to, from a menu click or a dashboard affordance. * * Never fired for the entitlement fallback, and never fired on mount, so a * host mirroring this into its URL cannot overwrite the deep link it was just * handed. */ onSectionChange?: (section: WidgetSuiteSectionId) => void; /** * Every string the suite puts on screen, in one tree: the shell's own copy, * the menu names, the section heading, the disclosure states, and a group per * section carrying the copy of the widget that section mounts. * * Override any leaf and its siblings keep their defaults, at every depth. See * {@link WidgetSuiteLabels} for which groups the suite defaults and which it * forwards to a widget untouched. * * `WidgetProvider`'s own copy is not in here — it has its own `providerLabels` * prop, inherited from `WidgetProviderProps`. */ labels?: WidgetSuiteLabelOverrides; /** * Shows a heading above each section, named as its menu item is. * * Defaults to `true`: the suite owns its page, and a page with a menu but no * heading reads as a fragment of someone else's. Set `false` when the host * already renders a heading of its own above the suite. * * Every section gets one: no widget heads itself any more (embedded ADR * 0010), so the suite is the only thing that can name them. */ showSectionTitle?: boolean; } /** * A suite of widgets bound together by navigation. * * Unlike a widget — a content area an integrator drops onto a page they own — a * suite owns the page it is placed on, exists once per page, and decides which * widgets appear on it. * * One `/init` serves the whole surface: this provider owns the fetch, and every * composed widget is handed no auth props, so its own provider runs in * pass-through mode. See `sections/sectionIds.ts` for the two composition rules * that arrangement depends on. * * That one response also decides which state the suite is in before the shell * renders: placeholders while init has not settled, a closed retry state when * init fails before answering the disclosure flags, the acceptance surface * alone when the session owes the bank's disclosures, or the nav over its * sections. States rather than an overlay over a mounted shell — see * `WidgetSuiteSurface` for why each boundary sits where it does. * * Navigation is one value: which section is showing, published to the sections * through `WidgetSuiteProvider` and drivable by a host through `section` / * `defaultSection` / `onSectionChange`. Nothing deeper is addressable. Only the * open panel is mounted and every widget owns its own state, so leaving a * section and coming back shows it as it opens: the account list, the card * lists, the widget's own opening tab. A host that needs to deep-link into one * of those mounts that widget itself rather than reaching through the suite. */ declare function WidgetSuite({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: WidgetSuiteProps): React.JSX.Element; type PartialDeep$2 = { [K in keyof T]?: T[K] extends object ? PartialDeep$2 : 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 AcceptDisclosuresWidgetTestIds { root?: string; providerAttribution?: string; disclosureLinks?: string; agreeCheckbox?: string; agreementText?: string; acceptButton?: string; error?: 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$2; testIds?: AcceptDisclosuresWidgetTestIds; } type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage' | 'testIds'; type InnerProps = Omit & { /** * 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; }; 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 via the * widget-gateway proxy. A newer published version is refused rather than * accepted unseen. The POST activates the invitee (when they are still * invited) 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. The * widget token identifies the caller on both the disclosures lookup and * the accept; this widget does not take invite-link credentials. * * See `WidgetSuite`, which mounts it as its acceptance state. */ declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: AcceptDisclosuresWidgetProps): 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 AchFieldGroupLabels { accountHolderName: string; routingNumber: string; accountNumber: string; } type PartialDeep$1 = { [K in keyof T]?: T[K] extends object ? PartialDeep$1 : T[K]; }; 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; /** * @deprecated Superseded by `ach.accountHolderName`. Kept, and still * mapped in, so a consumer already shipping an override for this * already-published flat key doesn't silently lose it — this package is * published standalone, so removing a public field outright is a breaking * change even when nothing internal still reads it directly. */ accountHolderNameLabel?: string; /** @deprecated Superseded by `ach.routingNumber`. See `accountHolderNameLabel`. */ routingNumberLabel?: string; /** @deprecated Superseded by `ach.accountNumber`. See `accountHolderNameLabel`. */ accountNumberLabel?: string; addAddress: string; cancelButton: string; createButton: string; saveButton: string; address: AddressFieldGroupLabels; ach: AchFieldGroupLabels; } 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; } 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 NoPolicyBannerTestIds { root?: string; createRuleButton?: string; /** The disabled-reason wrapper shown in place of the button. */ createRuleBlocked?: 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; testIds?: NoPolicyBannerTestIds; } 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 GapCoverageAlertTestIds { root?: string; } interface GapCoverageAlertProps { gaps: GapRange[]; onSelectGap: (id: string) => void; disabled?: boolean; labels?: Partial; testIds?: GapCoverageAlertTestIds; } /** * 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; accountHolderNameRequired: 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; } /** * 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; } } type BillPayWidgetMoniteProps = MoniteRegionProviderProps & Omit & { pageTitleComponent?: PayablesProps['pageTitleComponent']; }; type BillPayWidgetProps = BillPayWidgetMoniteProps & { /** Bank shown as "Powered by {bank}" next to the source account when paying a bill. Native implementation only; ignored under `monite`. */ poweredByBankName?: string; }; /** * 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; /** * 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 { /** 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[]; /** * 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?: PartialDeep$1; 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, providerLabels, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element; interface Labels$3 { 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, providerLabels, ...innerProps }: ExpenseManagementWidgetProps): 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, providerLabels, isOpen, preSelectedReceiptIds, onClose, targetTransactionId, onSingleTransactionUpdate, }: ReceiptMatchWidgetProps): 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, providerLabels, }?: 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, providerLabels, }?: ExpenseRequirementsWidgetProps): 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. */ 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; /** 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, 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, providerLabels, 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, providerLabels, ...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, providerLabels, 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 { 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; sortByStatus: 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, providerLabels, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element; interface Labels$2 { 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$2 { 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, providerLabels, ...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, providerLabels, ...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 { 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, providerLabels, ...innerProps }: ProductsWidgetProps): React.JSX.Element; interface Labels$1 { 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$1 { 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, providerLabels, ...innerProps }: ProfileWidgetProps): 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 { 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, providerLabels, ...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 { /** 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; /** * 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, providerLabels, ...innerProps }: TeamWidgetProps): 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 CheckAmountAndDetailScreenLabels { title: string; backButton: string; customerLabel: string; invoiceLabel: string; invoicePlaceholder: string; invoiceNoneOption: string; clearInvoice: string; checkAmountLabel: string; currencyPrefix: string; continueButton: string; collectPaymentButton: string; } interface CheckAmountAndDetailScreenTestIds { backButton?: string; customerSelect?: string; invoiceSelect?: string; clearInvoiceButton?: string; amountInput?: string; continueButton?: string; } interface CheckAmountAndDetailScreenProps { labels?: Partial; testIds?: CheckAmountAndDetailScreenTestIds; customerOptions: string[]; selectedCustomerIndex: number | null; onCustomerSelect: (index: number) => void; invoiceOptions: string[]; selectedInvoiceIndex: number | null; onInvoiceSelect: (index: number) => void; onInvoiceClear: () => void; amount: string; onAmountChange: (value: string) => void; amountSourceHint?: string; limitsHint: string; onBack: () => void; onContinue: () => void; continueDisabled?: boolean; } type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | 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, CardDetailsWidget, ChartOfAccountsTable, ChartOfAccountsWidget, CounterpartsWidget, CreditCardsWidget, DebitCardsWidget, 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, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken }; export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccountDeleteDialogLabels, AccountDeleteDialogProps, Labels$5 as AccountDetailsWidgetLabels, AccountFormErrors, AccountFormMode, AccountFormSheetLabels, AccountFormSheetProps, AccountFormValues, ActivateCardPanelLabels, 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, CardsListLabels as CardsLabels, CardsPagination, ChartOfAccountsLabels, ChartOfAccountsMessageLabels, ChartOfAccountsTableProps, ChartOfAccountsWidgetLabelProps, ChartOfAccountsWidgetProps, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, ExpenseApprovalPoliciesWidgetProps, Labels$3 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseRequirementsWidgetProps, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, HelpWidgetLabels, HelpWidgetProps, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LedgerAccountRow, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$2 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetContent, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, FeatureLabels$1 as ProfileWidgetFeatureLabels, Labels$1 as ProfileWidgetLabels, ProfileWidgetProps, ReceiptMatchSummary, ReceiptMatchWidgetProps, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$4 as SettingsWidgetFeatureLabels, Labels$4 as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TagDeleteDialogLabels, TagFormSheetLabels, TagMessageLabels, TagsScreenLabels, TagsWidgetProps, FeatureLabels as TeamWidgetFeatureLabels, Labels as TeamWidgetLabels, TeamWidgetProps, FeatureLabels$3 as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };