@tesouro/embedded-components-react 0.3.43 → 0.3.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +18 -2
  2. package/dist/experimental/index.d.ts +1 -975
  3. package/dist/experimental/index.js +0 -6
  4. package/dist/index.css +10 -0
  5. package/dist/index.d.ts +1730 -1425
  6. package/dist/index.js +65 -61
  7. package/dist/lib/WidgetProvider.js +7 -7
  8. package/dist/lib/WidgetSuite.d.ts +2081 -0
  9. package/dist/lib/WidgetSuite.js +5 -0
  10. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +60 -60
  11. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +6 -6
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +18 -18
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +16 -16
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +10 -10
  15. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +45 -45
  16. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +18 -18
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +118 -118
  18. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js +6 -5
  20. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index10.js +33 -0
  21. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +23 -0
  22. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index12.js +19 -0
  23. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index13.js +16 -0
  24. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js +21 -0
  25. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index15.js +22 -0
  26. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +116 -0
  27. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +46 -23
  28. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +20 -88
  29. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +31 -34
  30. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +12 -132
  31. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +11 -137
  32. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +33 -0
  33. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +12 -12
  34. package/dist/packages/shared-ui-shadcn/dist/index.js +113 -113
  35. package/package.json +1 -1
  36. package/dist/experimental/WidgetSuite.d.ts +0 -976
  37. package/dist/experimental/WidgetSuite.js +0 -6
package/dist/index.d.ts CHANGED
@@ -1,133 +1,8 @@
1
1
  import * as React from 'react';
2
- import { ReactNode, ComponentType, AnchorHTMLAttributes, PropsWithChildren, ErrorInfo, ReactElement } from 'react';
2
+ import { ComponentType, AnchorHTMLAttributes, ReactNode, PropsWithChildren, ErrorInfo, ReactElement } from 'react';
3
3
  import { FallbackProps } from 'react-error-boundary';
4
4
  import { SortingState, OnChangeFn } from '@tanstack/react-table';
5
5
 
6
- type PartialDeep$6<T> = {
7
- [K in keyof T]?: T[K] extends object ? PartialDeep$6<T[K]> : T[K];
8
- };
9
- interface AcceptDisclosuresWidgetLabels {
10
- title: string;
11
- acceptButton: string;
12
- agreementCheckboxAriaLabel: string;
13
- /** Fallback when the accept API fails without a usable message. */
14
- acceptErrorFallback: string;
15
- /**
16
- * Use `{bankName}` for the bank display name and `{documents}` for the
17
- * conjunction list of titles the backend returned (same order as the links).
18
- * A legacy override that omits `{documents}` still has those titles appended
19
- * so consent copy cannot disagree with the linked documents.
20
- */
21
- agreementTextTemplate: string;
22
- providerAttributionPrefix: string;
23
- providerAttributionMiddle: string;
24
- providerAttributionSuffix: string;
25
- /**
26
- * @deprecated Ignored. Document titles come from
27
- * `GET /identity/v1/disclosures`. Kept so hosts that implement the full
28
- * published `AcceptDisclosuresWidgetLabels` interface continue to typecheck.
29
- */
30
- linkLabels: {
31
- termsOfUse: string;
32
- privacyPolicy: string;
33
- electronicCommunications: string;
34
- patriotAct: string;
35
- };
36
- /** Title when the backend returned no documents (`NOT_REQUIRED`). */
37
- noDocumentsTitle?: string;
38
- /** Use `{bankName}` when the backend returned no documents. */
39
- noDocumentsAgreementTextTemplate?: string;
40
- /**
41
- * Checkbox `aria-label` when the backend returned no documents. Use
42
- * `{bankName}`. Must not say the user is agreeing to disclosures.
43
- */
44
- noDocumentsAgreementCheckboxAriaLabel?: string;
45
- /**
46
- * Two-item document list. Use `{first}` and `{second}` for the titles.
47
- */
48
- documentListPairTemplate?: string;
49
- /** Separator between titles in a list of three or more (before the last). */
50
- documentListSeparator?: string;
51
- /** Conjunction before the last title in a list of three or more. */
52
- documentListLastConjunction?: string;
53
- /** Heading when the disclosures query fails. */
54
- loadErrorTitle?: string;
55
- /** Fallback when the disclosures query fails without a usable message. */
56
- loadErrorFallback?: string;
57
- /** Retry control on the disclosures-query error surface. */
58
- loadErrorRetryLabel?: string;
59
- /**
60
- * Shown when accept is refused because a newer disclosure version is in
61
- * force than the documents the invitee agreed to.
62
- */
63
- disclosuresUpdatedFallback?: string;
64
- }
65
- declare const ACCEPT_DISCLOSURES_WIDGET_LABELS_EN: {
66
- title: string;
67
- acceptButton: string;
68
- agreementCheckboxAriaLabel: string;
69
- acceptErrorFallback: string;
70
- agreementTextTemplate: string;
71
- providerAttributionPrefix: string;
72
- providerAttributionMiddle: string;
73
- providerAttributionSuffix: string;
74
- linkLabels: {
75
- termsOfUse: string;
76
- privacyPolicy: string;
77
- electronicCommunications: string;
78
- patriotAct: string;
79
- };
80
- noDocumentsTitle: string;
81
- noDocumentsAgreementTextTemplate: string;
82
- noDocumentsAgreementCheckboxAriaLabel: string;
83
- documentListPairTemplate: string;
84
- documentListSeparator: string;
85
- documentListLastConjunction: string;
86
- loadErrorTitle: string;
87
- loadErrorFallback: string;
88
- loadErrorRetryLabel: string;
89
- disclosuresUpdatedFallback: string;
90
- };
91
-
92
- interface DisclosureLink {
93
- label: string;
94
- href: string;
95
- }
96
-
97
- interface AcceptDisclosuresWidgetTestIds {
98
- root?: string;
99
- providerAttribution?: string;
100
- disclosureLinks?: string;
101
- agreeCheckbox?: string;
102
- agreementText?: string;
103
- acceptButton?: string;
104
- error?: string;
105
- }
106
- interface AcceptDisclosuresWidgetProps$1 {
107
- /**
108
- * Attribution line under the title (e.g. “Banking services for Nail It! are
109
- * provided by Zenith Bank, Member FDIC.”). Caller supplies emphasis (bold VSP).
110
- */
111
- providerAttribution: ReactNode;
112
- /** Plain agreement copy rendered next to the checkbox. */
113
- agreementText: string;
114
- disclosureLinks: DisclosureLink[];
115
- isAgreed: boolean;
116
- onAgreedChange: (checked: boolean) => void;
117
- onAccept: () => void;
118
- /** Disables the checkbox and Accept control while a submit is in flight. */
119
- isSubmitting?: boolean;
120
- /**
121
- * Keeps the checkbox and Accept control disabled once acceptance is done.
122
- * Separate from {@link isSubmitting} so `aria-busy` only means "in flight".
123
- */
124
- isAccepted?: boolean;
125
- /** Inline error shown under Accept; omit or empty when there is no error. */
126
- errorMessage?: string;
127
- labels?: PartialDeep$6<AcceptDisclosuresWidgetLabels>;
128
- testIds?: AcceptDisclosuresWidgetTestIds;
129
- }
130
-
131
6
  type AuthToken = string | undefined;
132
7
  interface Auth {
133
8
  /**
@@ -1500,37 +1375,41 @@ type CardStatus = CreditCardStatus;
1500
1375
  */
1501
1376
  type CardType = CreditCardType;
1502
1377
 
1503
- type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage' | 'testIds';
1504
- type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
1378
+ interface BalancesWidgetLabels {
1379
+ /** Card header title (e.g. next to the building icon) */
1380
+ widgetTitle: string;
1381
+ /** Shown under the total amount */
1382
+ totalAvailableBalance: string;
1383
+ /** Full explanation shown in the info tooltip */
1384
+ totalAvailableBalanceTooltip: string;
1385
+ /** Short label for the info control (e.g. `aria-label`) */
1386
+ totalAvailableBalanceInfoAriaLabel: string;
1387
+ /** CTA to open the full accounts list */
1388
+ viewAllAccounts: string;
1389
+ /** Shown when there are no balances to list */
1390
+ noBalancesFound: string;
1391
+ /** Shown when the bank account request failed */
1392
+ loadErrorTitle: string;
1393
+ loadErrorDescription: string;
1394
+ /** Label for retry after a failed load */
1395
+ loadErrorRetry: string;
1396
+ }
1397
+ declare const BALANCES_WIDGET_LABELS_EN: BalancesWidgetLabels;
1398
+
1399
+ interface BalancesWidgetWithContextProps {
1505
1400
  /**
1506
- * Called after the atomic accept succeeds and before init refresh is kicked.
1507
- * May return a promise — the widget awaits it before locking controls and
1508
- * refreshing init, so a rejected continuation surfaces as an error and leaves
1509
- * Accept retryable (and the host gate stays mounted).
1401
+ * Maximum number of account rows to render in-card. Anything beyond this
1402
+ * cap is reachable only via the View-all CTA. Default 5.
1510
1403
  */
1511
- onAccepted?: () => void | Promise<void>;
1512
- };
1513
- type AcceptDisclosuresWidgetProps = WidgetProviderProps & InnerProps;
1514
- /**
1515
- * Self-contained AcceptDisclosures widget. Fetches the caller's disclosure
1516
- * document set (title/url pairs, in presentation order) from
1517
- * `GET /identity/v1/disclosures` and renders it directly — the host supplies
1518
- * no document URLs. An empty document list (`NOT_REQUIRED`) still renders
1519
- * Accept so those invitees can activate. Posts
1520
- * `POST /api/widget-gateway/disclosure-acceptance` with the version that was
1521
- * on screen after confirming that version is still in force via the
1522
- * widget-gateway proxy. A newer published version is refused rather than
1523
- * accepted unseen. The POST activates the invitee (when they are still
1524
- * invited) and records acceptance in one transaction, then awaits any
1525
- * `onAccepted` continuation and kicks a widget-init refresh so host gates
1526
- * keyed on `INVITED` — or on the disclosure flags — can clear. Auth uses
1527
- * the normal WidgetToken provider contract — never an APP/M2M bearer. The
1528
- * widget token identifies the caller on both the disclosures lookup and
1529
- * the accept; this widget does not take invite-link credentials.
1530
- *
1531
- * See `WidgetSuite`, which mounts it as its acceptance state.
1532
- */
1533
- declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
1404
+ maxAccounts?: number;
1405
+ labels?: Partial<BalancesWidgetLabels>;
1406
+ onBalanceRowClick?: (accountId: string) => void;
1407
+ onViewAllAccountsClick?: () => void;
1408
+ }
1409
+ type BalancesWidgetPassthroughProps = Pick<BalancesWidgetWithContextProps, 'maxAccounts' | 'labels' | 'onBalanceRowClick' | 'onViewAllAccountsClick'>;
1410
+ interface BalancesWidgetProps extends WidgetProviderProps, BalancesWidgetPassthroughProps {
1411
+ }
1412
+ declare function BalancesWidget({ maxAccounts, labels, onBalanceRowClick, onViewAllAccountsClick, ...widgetProviderProps }: BalancesWidgetProps): React.JSX.Element;
1534
1413
 
1535
1414
  interface Labels$6 {
1536
1415
  bankingTaglinePrefix: string;
@@ -1668,1076 +1547,1841 @@ interface BankAccountsWidgetProps extends WidgetProviderProps {
1668
1547
  }
1669
1548
  declare function BankAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: BankAccountsWidgetProps): React.JSX.Element;
1670
1549
 
1671
- interface AddressFieldGroupLabels {
1672
- line1: string;
1673
- line2: string;
1674
- city: string;
1675
- state: string;
1676
- statePlaceholder: string;
1677
- postalCode: string;
1678
- country: string;
1679
- /** Fixed country display value (US-only locale in v1). */
1680
- countryValue: string;
1550
+ /**
1551
+ * Every key of `T` optional, recursively, so a consumer can override one nested
1552
+ * label without restating its siblings. Defined locally because the repo has no
1553
+ * shared deep-partial type and does not depend on `type-fest`.
1554
+ */
1555
+ type PartialDeep$7<T> = {
1556
+ [K in keyof T]?: T[K] extends object ? PartialDeep$7<T[K]> : T[K];
1557
+ };
1558
+ interface CardsListColumnHeaderLabels {
1559
+ cardName: string;
1560
+ fundingAccount: string;
1561
+ cardholder: string;
1562
+ status: string;
1563
+ limit: string;
1681
1564
  }
1682
- interface AchFieldGroupLabels {
1683
- accountHolderName: string;
1684
- routingNumber: string;
1685
- accountNumber: string;
1565
+ /**
1566
+ * Screen-reader-only copy naming the details sheet a row click opens.
1567
+ *
1568
+ * Both strings are invisible by design: the sheet's visible header belongs to
1569
+ * whatever the owner slots into it (`CardDetailsPanel`, via `CardsWidget`), and a
1570
+ * second visible title would duplicate it. They exist because the sheet is a
1571
+ * dialog, and a dialog without an accessible name is announced as nothing.
1572
+ */
1573
+ interface CardsListDetailsSheetLabels {
1574
+ /** Accessible name for the sheet. */
1575
+ title: string;
1576
+ /** Accessible description, announced after the name. */
1577
+ description: string;
1686
1578
  }
1687
- type PartialDeep$5<T> = {
1688
- [K in keyof T]?: T[K] extends object ? PartialDeep$5<T[K]> : T[K];
1689
- };
1690
- interface CounterpartFormSheetLabels {
1691
- createTitleOrganization: string;
1692
- createTitleIndividual: string;
1693
- editTitleOrganization: string;
1694
- editTitleIndividual: string;
1695
- createTitleCustomer: string;
1696
- createTitleVendor: string;
1697
- editTitleCustomer: string;
1698
- editTitleVendor: string;
1699
- createDescriptionCustomer: string;
1700
- createDescriptionVendor: string;
1701
- customerTypeHeading: string;
1702
- vendorTypeHeading: string;
1703
- businessTypeOption: string;
1704
- businessTypeHint: string;
1705
- personTypeOption: string;
1706
- personTypeHint: string;
1707
- profileHeading: string;
1708
- addressHeading: string;
1709
- customerAddressDescription: string;
1710
- legalNameLabel: string;
1711
- businessNameLabel: string;
1712
- firstNameLabel: string;
1713
- lastNameLabel: string;
1714
- titleLabel: string;
1715
- emailLabel: string;
1716
- phoneLabel: string;
1717
- taxIdLabel: string;
1718
- customerTaxIdHelp: string;
1719
- vendorTaxIdHelp: string;
1720
- paymentRemindersLabel: string;
1721
- paymentRemindersDescription: string;
1722
- paymentMethodsHeading: string;
1723
- paymentMethodsDescription: string;
1724
- /**
1725
- * @deprecated Superseded by `ach.accountHolderName`. Kept, and still
1726
- * mapped in, so a consumer already shipping an override for this
1727
- * already-published flat key doesn't silently lose it — this package is
1728
- * published standalone, so removing a public field outright is a breaking
1729
- * change even when nothing internal still reads it directly.
1730
- */
1731
- accountHolderNameLabel?: string;
1732
- /** @deprecated Superseded by `ach.routingNumber`. See `accountHolderNameLabel`. */
1733
- routingNumberLabel?: string;
1734
- /** @deprecated Superseded by `ach.accountNumber`. See `accountHolderNameLabel`. */
1735
- accountNumberLabel?: string;
1736
- addAddress: string;
1737
- cancelButton: string;
1738
- createButton: string;
1739
- saveButton: string;
1740
- address: AddressFieldGroupLabels;
1741
- ach: AchFieldGroupLabels;
1742
- }
1743
- interface BankAccountFormSheetLabels {
1744
- createTitle: string;
1745
- editTitle: string;
1746
- nameLabel: string;
1747
- accountHolderNameLabel: string;
1748
- accountNumberLabel: string;
1749
- routingNumberLabel: string;
1750
- ibanLabel: string;
1751
- bicLabel: string;
1752
- sortCodeLabel: string;
1753
- currencyLabel: string;
1754
- currencyPlaceholder: string;
1755
- countryLabel: string;
1756
- countryValue: string;
1757
- isDefaultLabel: string;
1758
- cancelButton: string;
1759
- createButton: string;
1760
- saveButton: string;
1761
- }
1762
- interface AddressFormSheetLabels {
1579
+ /**
1580
+ * Every user-facing string the cards list renders, including screen-reader-only
1581
+ * copy and the decorative separators.
1582
+ *
1583
+ * There is intentionally **no** card-type or card-status map here: the row
1584
+ * arrives with `typeLabel` and `statusLabel` already resolved, so the
1585
+ * `DIGITAL`/`PHYSICAL` and `PENDING_ACTIVATION`/`ACTIVE`/`LOCKED`/`CLOSED` maps
1586
+ * live in `shared/feature` keyed on the generated types (EMBD-4404 amendment;
1587
+ * see `statusBadge.ts`). That is also where the "label keys carry the code term,
1588
+ * values carry the copy" rule applies — `digital`, never `virtual`, so a later
1589
+ * wording change is not a breaking rename.
1590
+ */
1591
+ interface CardsListLabels {
1763
1592
  title: string;
1764
- cancelButton: string;
1765
- saveButton: string;
1766
- address: AddressFieldGroupLabels;
1767
- }
1768
- interface ConfirmDeleteDialogLabels {
1769
- confirmButton: string;
1770
- cancelButton: string;
1771
- }
1772
-
1773
- interface NoPolicyBannerLabels {
1774
- Title: string;
1775
- Body: string;
1776
- /**
1777
- * Heading for an org that *has* rules, none of which this editor can show. The
1778
- * plain `Title` would contradict the notice sitting directly above it, which
1779
- * has just said how many rules exist.
1780
- */
1781
- TitleWithUnlistedRules: string;
1782
- /** Body for that case. The notice above already explains the why. */
1783
- BodyWithUnlistedRules: string;
1784
- CreateRule: string;
1785
- }
1786
-
1787
- interface NoPolicyBannerTestIds {
1788
- root?: string;
1789
- createRuleButton?: string;
1790
- /** The disabled-reason wrapper shown in place of the button. */
1791
- createRuleBlocked?: string;
1792
- }
1793
- interface NoPolicyBannerProps {
1794
- onCreateRule: () => void;
1795
- disabled?: boolean;
1593
+ /** Accessible name for the list region. */
1594
+ regionLabel: string;
1595
+ columnHeaders: CardsListColumnHeaderLabels;
1596
+ /** Screen-reader name for the unheaded trailing row-actions column. */
1597
+ rowActionsColumn: string;
1598
+ showMyCardsToggle: string;
1599
+ createCardButton: string;
1600
+ activateButton: string;
1601
+ /** Accessible name for a row's Activate button; the card name is appended. */
1602
+ activateButtonForCard: string;
1603
+ /** Accessible name for a row's open-details control; card name appended. */
1604
+ selectCardButton: string;
1605
+ /** Separator between a card's nickname and its last four digits. */
1606
+ cardNameSeparator: string;
1607
+ /** Stands in for the limit when a card has none set. */
1608
+ noLimit: string;
1609
+ /** Announced while a page of cards is loading. */
1610
+ loadingLabel: string;
1611
+ emptyTitle: string;
1612
+ emptyDescription: string;
1613
+ errorTitle: string;
1614
+ errorDescription: string;
1615
+ retryButton: string;
1616
+ pagination: PaginationFooterLabels;
1796
1617
  /**
1797
- * Why Create rule is off, shown on hover and on keyboard focus. Omit it for the
1798
- * transient reasons that explain themselves on screen (a write in flight).
1618
+ * Copy for the details sheet a row click opens. Rendered by
1619
+ * `CardsListDetailsSheet` rather than by the table, but part of this surface
1620
+ * because it is one screen and one `labels` prop — the same reason `pagination`
1621
+ * sits here for a footer that lives in `shared/ui`.
1799
1622
  */
1800
- createRuleDisabledReason?: string;
1623
+ detailsSheet: CardsListDetailsSheetLabels;
1801
1624
  /**
1802
- * Whether the org has rules that simply are not shown here. Switches the copy
1803
- * off the "none created yet" claim, which would contradict the notice that
1804
- * sits above this banner and has just counted them.
1625
+ * Screen-reader copy for the same sheet when Create card is slotted in, rather
1626
+ * than a selected card's details. Same chrome, different accessible name.
1805
1627
  */
1806
- hasUnlistedRules?: boolean;
1807
- labels?: Partial<NoPolicyBannerLabels>;
1808
- testIds?: NoPolicyBannerTestIds;
1628
+ createSheet: CardsListDetailsSheetLabels;
1809
1629
  }
1810
1630
 
1811
- interface GapCoverageAlertLabels {
1812
- Title: string;
1813
- Footer: string;
1631
+ /** Accessible copy for the panel header's controls. */
1632
+ interface CardDetailsHeaderLabels {
1633
+ /** Fallback title when the card has no nickname. */
1634
+ untitledCard: string;
1635
+ /** Accessible name for the kebab that opens the card actions menu. */
1636
+ menuTriggerAriaLabel: string;
1637
+ /** Accessible name for the close (X) control. */
1638
+ closeAriaLabel: string;
1814
1639
  }
1815
-
1816
- /**
1817
- * One uncovered bill-amount range. `label` is pre-formatted by the caller
1818
- * (e.g. "$10.01 to $99.99" or "$500.01 or more") — this component renders it
1819
- * as-is rather than composing range/currency copy itself.
1820
- */
1821
- interface GapRange {
1822
- id: string;
1823
- label: string;
1824
- /**
1825
- * Why a new rule cannot take this range, for the link's tooltip. A range can be
1826
- * uncovered today and still be spoken for — a rule whose schedule has not
1827
- * started covers nothing yet but claims its range — in which case starting a
1828
- * rule here only ever ends in a rejected save. Omit for a range that is free.
1829
- */
1830
- blockedReason?: string;
1640
+ /** Accessible copy for the simplified card face. */
1641
+ interface CardDetailsCardFaceLabels {
1642
+ /** Alt text for the bank logo when the caller supplies no `bankLogoAlt`. */
1643
+ bankLogoAlt: string;
1831
1644
  }
1832
- interface GapCoverageAlertTestIds {
1833
- root?: string;
1645
+ /** Row headings and per-row copy affordance names for the details table. */
1646
+ interface CardDetailsFieldLabels {
1647
+ cardholder: string;
1648
+ nickname: string;
1649
+ billingAddress: string;
1650
+ /** Sub-header over the merchant categories / velocity control rows. */
1651
+ cardControlsHeading: string;
1652
+ allowedCategories: string;
1653
+ spendLimit: string;
1654
+ perTransactionMax: string;
1655
+ /** Stands in for a row whose value the card does not carry. */
1656
+ emptyValue: string;
1657
+ copyCardholderAriaLabel: string;
1658
+ copyNicknameAriaLabel: string;
1659
+ copyBillingAddressAriaLabel: string;
1834
1660
  }
1835
- interface GapCoverageAlertProps {
1836
- gaps: GapRange[];
1837
- onSelectGap: (id: string) => void;
1838
- disabled?: boolean;
1839
- labels?: Partial<GapCoverageAlertLabels>;
1840
- testIds?: GapCoverageAlertTestIds;
1661
+ /** Copy for the controls the owner can switch on alongside the details. */
1662
+ interface CardDetailsActionLabels {
1663
+ /** Primary control that opens the Activate Card form. */
1664
+ activateCard: string;
1665
+ /** Secondary control that asks the owner to reveal the card's credentials. */
1666
+ viewCard: string;
1667
+ /** The same control, once the credentials are on screen. */
1668
+ hideCard: string;
1841
1669
  }
1842
-
1843
1670
  /**
1844
- * Overridable validation / error messages produced by the counterparts feature
1845
- * layer and surfaced through each form's `errors` prop. Consumers override via
1846
- * the widget's `messageLabels` prop, merged over {@link COUNTERPART_MESSAGE_LABELS_EN}.
1671
+ * Copy for the revealed card credentials. The values themselves never have a
1672
+ * default here — the panel is handed them or renders the field blank.
1847
1673
  */
1848
- interface CounterpartMessageLabels {
1849
- legalNameRequired: string;
1850
- firstNameRequired: string;
1851
- lastNameRequired: string;
1852
- emailRequired: string;
1853
- emailInvalid: string;
1854
- addressLine1Required: string;
1855
- cityRequired: string;
1856
- stateRequired: string;
1857
- postalCodeRequired: string;
1858
- bankAccountNameRequired: string;
1859
- bankAccountIdentifierRequired: string;
1860
- bankAccountCurrencyRequired: string;
1861
- accountHolderNameRequired: string;
1862
- routingNumberInvalid: string;
1863
- accountNumberInvalid: string;
1864
- vatIdValueRequired: string;
1865
- /** Shown for a non-field-specific submit failure. */
1866
- genericError: string;
1867
- /** Delete confirmation title; `{name}` is replaced with the entity name. */
1868
- deleteTitle: string;
1869
- deleteCounterpartMessage: string;
1870
- deleteSubEntityMessage: string;
1674
+ interface CardDetailsCredentialsLabels {
1675
+ cardNumber: string;
1676
+ expirationDate: string;
1677
+ securityCode: string;
1678
+ copyCardNumberAriaLabel: string;
1679
+ copyExpirationDateAriaLabel: string;
1680
+ copySecurityCodeAriaLabel: string;
1681
+ /** Shown next to the control when the reveal failed. */
1682
+ errorDescription: string;
1683
+ }
1684
+ /** Copy for the three non-loaded screens. */
1685
+ interface CardDetailsStatusScreenLabels {
1686
+ /** Accessible name announced while the panel is loading. */
1687
+ loadingAriaLabel: string;
1688
+ errorTitle: string;
1689
+ errorDescription: string;
1690
+ errorRetry: string;
1691
+ notFoundTitle: string;
1692
+ notFoundDescription: string;
1693
+ }
1694
+ interface CardDetailsPanelLabels {
1695
+ header: CardDetailsHeaderLabels;
1696
+ cardFace: CardDetailsCardFaceLabels;
1697
+ fields: CardDetailsFieldLabels;
1698
+ actions: CardDetailsActionLabels;
1699
+ credentials: CardDetailsCredentialsLabels;
1700
+ status: CardDetailsStatusScreenLabels;
1871
1701
  }
1872
1702
 
1873
1703
  /**
1874
- * Action handlers for custom payment flows in payable operations.
1704
+ * Deep partial for label overrides.
1875
1705
  *
1876
- * These handlers provide fine-grained control over payment workflows, allowing customers to:
1877
- * - Integrate external payment providers
1878
- * - Implement custom approval processes or multi-step authentication
1879
- * - Add specialized banking solutions or enterprise payment workflows
1880
- * - Control UI feedback and data refresh timing after payment completion
1881
- *
1882
- * @example Custom payment provider integration:
1883
- * ```typescript
1884
- * const onPay = (id: string, _data?: unknown, actions?: PayActionHandlers) => {
1885
- * // Start custom payment flow
1886
- * initiatePayment(id)
1887
- * .then(() => {
1888
- * // Payment successful - update SDK state and show success message
1889
- * actions?.resolve({ showToast: true });
1890
- * })
1891
- * .catch((error) => {
1892
- * // Payment failed - update SDK state and show error message
1893
- * actions?.reject(error, { showToast: true });
1894
- * });
1895
- * };
1896
- * ```
1706
+ * Both label surfaces this widget exposes have nested groups, and a shallow
1707
+ * `Partial` would let a consumer who overrides one nested string drop the rest
1708
+ * of that group. The repo has no shared `PartialDeep` and does not depend on
1709
+ * `type-fest`, so each labels module defines its own — `card-details-widget/ui`
1710
+ * has an identical one for the panel's labels, and this declaration also types
1711
+ * that prop here so the widget carries one such helper rather than two.
1897
1712
  */
1898
- type PayActionHandlers = {
1899
- /**
1900
- * Call when a custom payment flow has been successfully initiated/completed.
1901
- * This triggers SDK's built-in state management: refreshes payable data,
1902
- * payment records, and optionally displays success feedback to the user.
1903
- *
1904
- * @param options.showToast - Whether to display a success toast notification
1905
- */
1906
- resolve: (options?: {
1907
- showToast?: boolean;
1908
- }) => void;
1909
- /**
1910
- * Call when a custom payment flow failed or was cancelled by the user.
1911
- * This triggers SDK's built-in state management: refreshes payable data,
1912
- * payment records, and optionally displays error feedback to the user.
1913
- *
1914
- * @param error - Optional error details from the failed payment attempt
1915
- * @param options.showToast - Whether to display an error toast notification
1916
- */
1917
- reject: (error?: unknown, options?: {
1918
- showToast?: boolean;
1919
- }) => void;
1713
+ type PartialDeep$6<T> = {
1714
+ [K in keyof T]?: T[K] extends object ? PartialDeep$6<T[K]> : T[K];
1920
1715
  };
1921
-
1922
- type UsePayableDetailsProps = {
1923
- /**
1924
- * The ID of the payable
1925
- */
1926
- id?: string;
1927
- /** when provided it takes precedence over component settings */
1928
- enableGLCodes?: boolean;
1929
- /** when provided it makes the payable open in edit mode */
1930
- shouldOpenInEditMode?: boolean;
1931
- /**
1932
- * Callback function that is called when the payable is saved
1933
- *
1934
- * @param {string} id - The ID of the payable
1935
- *
1936
- * @returns {void}
1937
- */
1938
- onSaved?: (id: string) => void;
1716
+ /**
1717
+ * Copy the **feature** layer owns, as opposed to the panel's own
1718
+ * `CardDetailsPanelLabels`.
1719
+ *
1720
+ * The split follows where the string is resolved, not where it is painted. A
1721
+ * status badge word is chosen by mapping a generated `cardStatus` enum member,
1722
+ * which is a data-access-typed decision the presentational layer is not allowed
1723
+ * to make — so it is overridable here even though the panel renders it. The
1724
+ * panel's own labels stay with the panel.
1725
+ */
1726
+ interface CardDetailsFeatureLabels {
1727
+ /** Confirmation toast after a copy affordance writes to the clipboard. */
1728
+ copySuccessToast: string;
1939
1729
  /**
1940
- * Callback function that is called when the payable is canceled
1730
+ * Replaces the panel's generic reveal error when the credentials call was
1731
+ * refused (HTTP 403).
1941
1732
  *
1942
- * @param {string} id - The ID of the payable
1733
+ * It lives here rather than on the panel because deciding that a failure was a
1734
+ * refusal means reading the error, which is this layer's job — the panel is
1735
+ * handed one already-chosen sentence either way, and its own
1736
+ * `credentials.errorDescription` still covers every other failure.
1943
1737
  *
1944
- * @returns {void}
1738
+ * The wording deliberately does not tell the reader to ask for a permission.
1739
+ * Reading a debit card and reading its credentials take the same scope, so a
1740
+ * reader looking at this panel already holds it; a 403 here means the call was
1741
+ * refused for this session, which asking an admin for a role will not fix.
1945
1742
  */
1946
- onCanceled?: (id: string) => void;
1743
+ revealNotPermittedDescription: string;
1744
+ /** Program wording on the card face, keyed on the widget's `cardProgram`. */
1745
+ programLabels: Record<CardProgram, string>;
1746
+ /** Status badge wording, keyed on the generated card status. */
1747
+ statusLabels: Record<CardStatus, string>;
1748
+ /** Form-factor subtitle wording, keyed on the generated card type. */
1749
+ formFactorLabels: Record<CardType, string>;
1947
1750
  /**
1948
- * Callback function that is called when the payable is submitted
1949
- *
1950
- * @param {string} id - The ID of the payable
1951
- *
1952
- * @returns {void}
1751
+ * A velocity control's reset-period wording, keyed on the generated
1752
+ * `velocityWindow`. Used to build the spend limit row, e.g. "$500 / month".
1753
+ * `TRANSACTION` is unused there (it drives the separate per-transaction max
1754
+ * row instead) but is still a real enum member, so it stays in the map.
1953
1755
  */
1954
- onSubmitted?: (id: string) => void;
1756
+ velocityWindowLabels: Record<VelocityWindow, string>;
1757
+ }
1758
+
1759
+ interface CardDetailsWidgetProps extends WidgetProviderProps {
1760
+ /** Id of the card to show. */
1761
+ cardId: string;
1955
1762
  /**
1956
- * Callback function that is called when the payable is rejected
1763
+ * Which issuing product `cardId` belongs to. **Required, with no default** —
1764
+ * it selects the endpoint the card is fetched from, and a wrong guess would
1765
+ * 404 a card that exists. `CardsWidget` publishes the same required prop, so
1766
+ * one value configures a list and its detail panel together.
1957
1767
  *
1958
- * @param {string} id - The ID of the payable
1768
+ * A JavaScript consumer, or a host passing a route param straight through, can
1769
+ * still get a value past the type. **There is no catch-all and no default:**
1770
+ * anything that is not explicitly one of the two programs fetches nothing and
1771
+ * renders the panel's error state with no retry, and the reason is named on the
1772
+ * console. That covers an absent prop (`undefined` / `null`) as well as an
1773
+ * unrecognised one (`'prepaid'`, a case-wrong `'Credit'`), because the widget
1774
+ * cannot know which product to ask about in either case.
1959
1775
  *
1960
- * @returns {void}
1776
+ * A host that resolves the program asynchronously should gate its own render on
1777
+ * it rather than mounting this widget without it — an absent program is not
1778
+ * read as "still loading".
1961
1779
  */
1962
- onRejected?: (id: string) => void;
1780
+ cardProgram: CardProgram;
1963
1781
  /**
1964
- * Callback function that is called when the payable is approved
1965
- *
1966
- * @param {string} id - The ID of the payable
1967
- *
1968
- * @returns {void}
1969
- */
1970
- onApproved?: (id: string) => void;
1971
- /** Callback function that is called when the payable is reopened
1972
- *
1973
- * @param {string} id - The ID of the payable
1974
- *
1975
- * @returns {void}
1976
- */
1977
- onReopened?: (id: string) => void;
1978
- /** Callback function that is called when the payable is deleted
1979
- *
1980
- * @param {string} id - The ID of the payable
1981
- *
1982
- * @returns {void}
1782
+ * Called when the header's close control is pressed. Omitting it renders no
1783
+ * close control at all: a standalone card page has nothing to close back to,
1784
+ * while a host rendering the panel in a drawer supplies this and suppresses
1785
+ * its own chrome's close button so the two do not sit side by side.
1983
1786
  */
1984
- onDeleted?: (id: string) => void;
1787
+ onClose?: () => void;
1788
+ /** Overrides for the panel's own copy. */
1789
+ labels?: PartialDeep$6<CardDetailsPanelLabels>;
1790
+ /** Overrides for the copy this layer resolves — see `CardDetailsFeatureLabels`. */
1791
+ featureLabels?: PartialDeep$6<CardDetailsFeatureLabels>;
1985
1792
  /**
1986
- * Callback function that is called when the user press the Pay button
1987
- *
1988
- * @param {string} id - The ID of the payable
1989
- *
1990
- * @returns {void}
1793
+ * Bank logo for the card face. The widget ships no bank artwork of its own and
1794
+ * resolves none from the init response: an embeddable library must not depend
1795
+ * on a Tesouro-hosted asset a host page's content-security policy can block,
1796
+ * and a bundled bank-name→URL table would put internal CDN links in the
1797
+ * published package (PLAT-1179, embedded ADR 0005). Omit it and the card face
1798
+ * renders without a logo rather than with a placeholder.
1991
1799
  */
1992
- onPay?: (id: string, _data?: unknown, actions?: PayActionHandlers) => void;
1800
+ bankLogoSrc?: string;
1801
+ bankLogoAlt?: string;
1802
+ }
1803
+ /**
1804
+ * Read-only details for one card, standalone-capable.
1805
+ *
1806
+ * Provides its own `WidgetProvider`, so it renders with nothing above it — a
1807
+ * partner can mount it on a real `/cards/[id]` page. Nested inside another
1808
+ * widget's provider with no auth props of its own, it inherits that init
1809
+ * response and `QueryClient` instead, costing no second `/init` call and sharing
1810
+ * one cache with the list that opened it. Do not forward `baseUrl` or
1811
+ * `widgetToken` into it from a parent widget: either one flips this provider into
1812
+ * fetch mode and buys a redundant init request per open.
1813
+ *
1814
+ * Both placements are covered by specs, because they take different code paths
1815
+ * through the provider and this export exists for the standalone one.
1816
+ */
1817
+ declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element;
1818
+
1819
+ /**
1820
+ * Reset-period tab labels and notice copy are deliberately absent: the owner
1821
+ * supplies those through `spendLimitPeriodOptions` / `spendLimitPeriodNotices`,
1822
+ * so declaring them here would give consumers override keys that no component
1823
+ * ever reads.
1824
+ */
1825
+ interface CardControlsLabels {
1826
+ currencySymbol: string;
1827
+ spendLimit: {
1828
+ title: string;
1829
+ description: string;
1830
+ amountPlaceholder: string;
1831
+ amountAriaLabel: string;
1832
+ };
1833
+ merchantCategories: {
1834
+ title: string;
1835
+ description: string;
1836
+ };
1837
+ perTransactionMaximum: {
1838
+ title: string;
1839
+ description: string;
1840
+ amountPlaceholder: string;
1841
+ amountAriaLabel: string;
1842
+ };
1843
+ }
1844
+
1845
+ type PartialDeep$5<T> = {
1846
+ [K in keyof T]?: T[K] extends object ? PartialDeep$5<T[K]> : T[K];
1993
1847
  };
1848
+ interface CreateCardWidgetLabels {
1849
+ header: {
1850
+ title: string;
1851
+ closeAriaLabel: string;
1852
+ };
1853
+ cardArtAlt: string;
1854
+ setup: {
1855
+ sectionTitle: string;
1856
+ cardholderLabel: string;
1857
+ cardholderPlaceholder: string;
1858
+ cardFormatLabel: string;
1859
+ cardFormatPlaceholder: string;
1860
+ cardFormatVirtual: string;
1861
+ cardFormatPhysical: string;
1862
+ fundingAccountLabel: string;
1863
+ fundingAccountPlaceholder: string;
1864
+ };
1865
+ mailing: {
1866
+ sectionTitle: string;
1867
+ sectionDescription: string;
1868
+ businessTitle: string;
1869
+ businessDescription: string;
1870
+ customTitle: string;
1871
+ customDescription: string;
1872
+ };
1873
+ manualAddress: {
1874
+ streetLabel: string;
1875
+ cityLabel: string;
1876
+ stateLabel: string;
1877
+ statePlaceholder: string;
1878
+ zipLabel: string;
1879
+ };
1880
+ cardControls: CardControlsLabels;
1881
+ preparing: {
1882
+ title: string;
1883
+ description: string;
1884
+ };
1885
+ success: {
1886
+ title: string;
1887
+ description: string;
1888
+ createAnother: string;
1889
+ viewCard: string;
1890
+ };
1891
+ footer: {
1892
+ cancel: string;
1893
+ createCard: string;
1894
+ };
1895
+ cardholderError: {
1896
+ title: string;
1897
+ description: string;
1898
+ retry: string;
1899
+ };
1900
+ fundingAccountError: {
1901
+ title: string;
1902
+ description: string;
1903
+ retry: string;
1904
+ };
1905
+ }
1906
+
1907
+ interface CreateCardFeatureLabels {
1908
+ toast: {
1909
+ creating: string;
1910
+ success: string;
1911
+ error: string;
1912
+ /**
1913
+ * Card issued but a follow-up velocity-control POST failed. The card
1914
+ * already exists; this must not read as a create failure.
1915
+ */
1916
+ controlsWarning: string;
1917
+ /**
1918
+ * Card issued but granting company admins access to it failed. The card
1919
+ * already exists; this must not read as a create failure.
1920
+ */
1921
+ companyAdminAccessWarning: string;
1922
+ /**
1923
+ * Card issued, but BOTH the velocity-control POST(s) and the company-admin
1924
+ * access grant failed. Distinct from the two single-failure warnings above
1925
+ * so an issuer who hits both is told about both, not just whichever this
1926
+ * code checks first.
1927
+ */
1928
+ controlsAndAccessWarning: string;
1929
+ /**
1930
+ * The roster of users to grant access to a new card failed to load.
1931
+ * Shown with a retry action; Create stays disabled until it resolves so
1932
+ * a card is never issued without its required admin grants.
1933
+ */
1934
+ debitCardIssuersError: string;
1935
+ retry: string;
1936
+ };
1937
+ untitledFundingAccount: string;
1938
+ /**
1939
+ * API-required `name` on a velocity control. Not shown in this widget;
1940
+ * may surface on a later controls list.
1941
+ */
1942
+ velocityControlNames: {
1943
+ spendLimit: string;
1944
+ perTransactionMaximum: string;
1945
+ };
1946
+ /**
1947
+ * Spend-limit reset-period tab labels and notices. Owned here (not UI
1948
+ * labels) because the feature layer decides what each opaque period value
1949
+ * means.
1950
+ */
1951
+ spendLimit: {
1952
+ periodOneTime: string;
1953
+ periodDaily: string;
1954
+ periodMonthly: string;
1955
+ oneTimeWarningTitle: string;
1956
+ oneTimeWarningDescription: string;
1957
+ dailyResetNotice: string;
1958
+ monthlyResetNotice: string;
1959
+ };
1960
+ /**
1961
+ * Success-screen copy chosen from the create response's `cardStatus`.
1962
+ * Active/ready wording lives on the UI defaults; these cover statuses that
1963
+ * must not claim the card is already usable.
1964
+ */
1965
+ success: {
1966
+ pendingActivationTitle: string;
1967
+ pendingActivationDescription: string;
1968
+ createdTitle: string;
1969
+ createdDescription: string;
1970
+ };
1971
+ }
1972
+ declare const CREATE_CARD_FEATURE_LABELS_EN: CreateCardFeatureLabels;
1973
+ declare function resolveCreateCardFeatureLabels(overrides?: Partial<{
1974
+ toast: Partial<CreateCardFeatureLabels['toast']>;
1975
+ untitledFundingAccount: string;
1976
+ velocityControlNames: Partial<CreateCardFeatureLabels['velocityControlNames']>;
1977
+ spendLimit: Partial<CreateCardFeatureLabels['spendLimit']>;
1978
+ success: Partial<CreateCardFeatureLabels['success']>;
1979
+ }>): CreateCardFeatureLabels;
1980
+
1981
+ type CreateCardWidgetProps = WidgetProviderProps & {
1982
+ /** Static card plastic image URL (no overlays). Host / white-label supplied. */
1983
+ cardArtSrc: string;
1984
+ labels?: PartialDeep$5<CreateCardWidgetLabels>;
1985
+ featureLabels?: Partial<{
1986
+ toast: Partial<CreateCardFeatureLabels['toast']>;
1987
+ untitledFundingAccount: string;
1988
+ velocityControlNames: Partial<CreateCardFeatureLabels['velocityControlNames']>;
1989
+ spendLimit: Partial<CreateCardFeatureLabels['spendLimit']>;
1990
+ success: Partial<CreateCardFeatureLabels['success']>;
1991
+ }>;
1992
+ className?: string;
1993
+ onClose?: () => void;
1994
+ onCancel?: () => void;
1995
+ /** Fired with the new debit card id after a successful create. */
1996
+ onViewCard?: (cardId: string) => void;
1997
+ };
1998
+ /**
1999
+ * Self-contained Create Card widget. Issues a debit card via the Embed API and
2000
+ * drives setup → preparing → success with sonner toasts for the mutation.
2001
+ */
2002
+ declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
2003
+
2004
+ /** Opaque UI format values — mapped to API `DebitCardType` in the feature. */
2005
+ declare const CardFormatValue: {
2006
+ readonly Virtual: "virtual";
2007
+ readonly Physical: "physical";
2008
+ };
2009
+ type CardFormatValue = (typeof CardFormatValue)[keyof typeof CardFormatValue];
2010
+
2011
+ /**
2012
+ * Every key of `T` optional, recursively, so a consumer can override one nested
2013
+ * label without restating its siblings. Defined locally because the repo has no
2014
+ * shared deep-partial type and does not depend on `type-fest` — same helper the
2015
+ * two card `ui` libs declare.
2016
+ */
2017
+ type PartialDeep$4<T> = {
2018
+ [K in keyof T]?: T[K] extends object ? PartialDeep$4<T[K]> : T[K];
2019
+ };
2020
+ /**
2021
+ * Strings this layer produces rather than passes through.
2022
+ *
2023
+ * They are separate from `CardsListLabels` (the `ui` lib's) because the cells
2024
+ * reaching that library are already formatted: the em-dash, the nickname
2025
+ * fallback and the "Viewing" prefix are all written *here*, so the UI lib has
2026
+ * no key to override them with. `bank-accounts-widget`'s `featureLabels` is the
2027
+ * precedent for the split.
2028
+ *
2029
+ * The status and form-factor maps live here for the same reason. EMBD-4503's
2030
+ * amendment put them in `shared/feature` keyed on the generated unions, and the
2031
+ * row arrives with `statusLabel` / `typeLabel` resolved — so this is the only
2032
+ * layer a consumer could reach them through.
2033
+ */
2034
+ interface CardsFeatureLabels {
2035
+ /**
2036
+ * Stands in for a cell the card program carries no value for — credit has no
2037
+ * funding account, and a debit card's funding account is unresolvable without
2038
+ * the bank-account read scope.
2039
+ */
2040
+ emptyValue: string;
2041
+ /** Name shown for a card with no nickname set. */
2042
+ untitledCard: string;
2043
+ /**
2044
+ * Last-resort name for a funding account with neither a nickname nor an
2045
+ * account number to mask. An account with no nickname shows `••••1234`
2046
+ * instead, so that two unnamed accounts stay distinguishable — this is only
2047
+ * for the case where there is nothing at all to show.
2048
+ */
2049
+ untitledFundingAccount: string;
2050
+ /** Display copy per card lifecycle status; keys are the generated code terms. */
2051
+ cardStatus: Record<CardStatus, string>;
2052
+ /** Display copy per card form factor; keys are the generated code terms. */
2053
+ cardType: Record<CardType, string>;
2054
+ }
2055
+
2056
+ interface CardsWidgetPagination {
2057
+ /** Cursor for the page on screen. Omit for the first page. */
2058
+ paginationToken?: string;
2059
+ /** Number of rows requested per page. */
2060
+ pageSize: number;
2061
+ }
2062
+ interface CardsWidgetPaginationInput {
2063
+ paginationToken?: string;
2064
+ pageSize?: number;
2065
+ }
2066
+
2067
+ interface CardsWidgetProps extends WidgetProviderProps {
2068
+ /**
2069
+ * Which issuing program the list shows — `'credit'` or `'debit'`.
2070
+ *
2071
+ * **Required, with no default.** A cards list shows exactly one program, and
2072
+ * the value selects the endpoint that is read as well as which scopes gate the
2073
+ * affordances. Defaulting it would make the choice invisible at the call site
2074
+ * and would silently pick a program for a host that meant the other one.
2075
+ */
2076
+ cardProgram: CardProgram;
2077
+ /**
2078
+ * Controlled cursor/page-size metadata. Supply with `onPaginationChange` when
2079
+ * a host owns the list position, e.g. URL-backed pagination.
2080
+ */
2081
+ pagination?: CardsWidgetPaginationInput;
2082
+ /**
2083
+ * Initial cursor/page-size metadata for uncontrolled usage. Omit for first
2084
+ * page with the default page size. Ignored when `pagination` is supplied.
2085
+ */
2086
+ defaultPagination?: CardsWidgetPaginationInput;
2087
+ /**
2088
+ * Called whenever the widget changes its cursor/page-size pair through pagination
2089
+ * controls or a cursor-invalidating reset such as page-size changes. Hosts that
2090
+ * persist list position should store this whole object, not the token alone.
2091
+ */
2092
+ onPaginationChange?: (pagination: CardsWidgetPagination) => void;
2093
+ /**
2094
+ * Overrides for the list's own copy, merged per nested group. Typed with the
2095
+ * `ui` lib's own deep-partial helper (each labels module declares one — the
2096
+ * repo has no shared version) so this prop follows that library's contract.
2097
+ */
2098
+ labels?: PartialDeep$7<CardsListLabels>;
2099
+ /**
2100
+ * Overrides for the copy this layer produces rather than passes through — the
2101
+ * status and form-factor vocabulary, the empty-cell placeholder, the nickname
2102
+ * fallbacks, and the pagination range prefix. Separate from `labels` because
2103
+ * the list library receives those values already formatted and so has no key
2104
+ * for them; `BankAccountsWidget.featureLabels` is the same split.
2105
+ */
2106
+ featureLabels?: PartialDeep$4<CardsFeatureLabels>;
2107
+ /**
2108
+ * The card whose details panel is open. Supply with `onSelectedCardIdChange`
2109
+ * when the host owns that state — a deep-linked `/cards/[id]`, say. `null`
2110
+ * closes the panel; omit the prop for uncontrolled behaviour.
2111
+ *
2112
+ * Pinning it to `null` and navigating from `onSelectedCardIdChange` is how a
2113
+ * host suppresses the built-in panel entirely and owns navigation itself: the
2114
+ * click is still reported, and because the value never comes back non-null,
2115
+ * nothing ever opens.
2116
+ */
2117
+ selectedCardId?: string | null;
2118
+ /** Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. */
2119
+ defaultSelectedCardId?: string | null;
2120
+ /**
2121
+ * Called whenever the open card changes, including on close (`null`).
2122
+ *
2123
+ * Supplying it does **not** change what renders — a host can observe row clicks
2124
+ * for analytics, or mirror the selection into a query param, and still get the
2125
+ * built-in panel. (The removed `onCardSelect` could not: its presence
2126
+ * suppressed the panel, so those two intents were unexpressible together.)
2127
+ */
2128
+ onSelectedCardIdChange?: (cardId: string | null) => void;
2129
+ /**
2130
+ * Label overrides forwarded into the nested card details panel, mirroring
2131
+ * `BankAccountsWidgetProps.accountDetailsLabels`.
2132
+ *
2133
+ * Derived from the receiving prop rather than restated, so the forwarded and
2134
+ * received types cannot drift. Naming the panel's labels type directly is not
2135
+ * an option anyway: a cross-widget `type:ui` import is banned by
2136
+ * `EMBEDDED_DEP_CONSTRAINTS`, and this indexed access reaches it through the
2137
+ * sanctioned feature → feature edge without re-exporting anything. It already
2138
+ * carries `card-details-widget`'s own deep partial, so no wrapper here.
2139
+ */
2140
+ cardDetailsLabels?: CardDetailsWidgetProps['labels'];
2141
+ /**
2142
+ * Overrides for the copy the panel's *feature* layer resolves — its status
2143
+ * vocabulary, form-factor wording, program label and copy-success toast.
2144
+ *
2145
+ * Distinct from `featureLabels`, which covers the list's own vocabulary.
2146
+ * Without this prop the panel is unreachable for that copy, so a host that
2147
+ * renames a status in the list would still read the default inside the panel.
2148
+ */
2149
+ cardDetailsFeatureLabels?: CardDetailsWidgetProps['featureLabels'];
2150
+ /**
2151
+ * Bank logo for the details panel's card face. Forwarded verbatim; the panel
2152
+ * renders no logo without it, so omitting these leaves the built-in sheet
2153
+ * showing a logo-less card rather than a placeholder.
2154
+ *
2155
+ * These stay props because the package ships no bank artwork and resolves none
2156
+ * from the init response (PLAT-1179, embedded ADR 0005).
2157
+ */
2158
+ bankLogoSrc?: string;
2159
+ bankLogoAlt?: string;
2160
+ /**
2161
+ * Plastic art for the built-in debit create sheet. Forwarded verbatim into
2162
+ * nested `CreateCardWidget`. Required for that sheet: omitting it (with no
2163
+ * host `onCreateCard`) hides Create card rather than opening a panel that
2164
+ * cannot render. Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package
2165
+ * ships no card artwork.
2166
+ */
2167
+ cardArtSrc?: string;
2168
+ /**
2169
+ * Label overrides forwarded into the nested create-card panel. Indexed off
2170
+ * `CreateCardWidgetProps` so the forwarded and received types cannot drift,
2171
+ * the same feature → feature edge as `cardDetailsLabels`.
2172
+ */
2173
+ createCardLabels?: CreateCardWidgetProps['labels'];
2174
+ /**
2175
+ * Overrides for the copy the create panel's *feature* layer resolves — mutation
2176
+ * toasts, the untitled funding-account fallback, and pending-activation success
2177
+ * copy.
2178
+ */
2179
+ createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
2180
+ /**
2181
+ * Called when Create card is clicked. When supplied, the host owns the
2182
+ * gesture: the built-in debit sheet does **not** open. Omit it on a debit list
2183
+ * with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
2184
+ * no in-package issuance widget, so credit Create card still requires this
2185
+ * callback — omitting it hides the button rather than offering a control that
2186
+ * does nothing.
2187
+ */
2188
+ onCreateCard?: () => void;
2189
+ /**
2190
+ * Called with the card's id when a row's Activate button is clicked. The button
2191
+ * renders only on cards in `PENDING_ACTIVATION`, and only when the widget token
2192
+ * also holds the program's activate scope.
2193
+ *
2194
+ * Host-owned for the same reason as `onCreateCard`: EMBD-4398 designs no
2195
+ * activation flow, and `POST /debit-cards/{id}/activate` does not exist even
2196
+ * though `debit_card:activate:org` does — so a built-in flow could serve only
2197
+ * one of the two programs.
2198
+ */
2199
+ onActivateCard?: (cardId: string) => void;
2200
+ }
2201
+ /**
2202
+ * The cards list widget: one page of an organization's credit or debit cards,
2203
+ * with scope-gated Show my cards, Create card and per-row Activate affordances.
2204
+ *
2205
+ * Selecting a row opens that card's read-only details in a sheet, composed from
2206
+ * `CardDetailsWidget` over the sanctioned feature → feature edge. Which card is
2207
+ * open is a controllable value (`selectedCardId` / `defaultSelectedCardId` /
2208
+ * `onSelectedCardIdChange`) so a host can deep-link into it, mirror it into a
2209
+ * query param, or take navigation over entirely — the widget itself reads no
2210
+ * router and no search params.
2211
+ *
2212
+ * On a debit list with `cardArtSrc`, Create card opens the same sheet with
2213
+ * nested `CreateCardWidget`. A host `onCreateCard` still takes over that
2214
+ * gesture (credit, or a custom debit flow). The two panels are mutually
2215
+ * exclusive: opening one closes the other. Success **View card** selects the
2216
+ * new debit card so its details open.
2217
+ *
2218
+ * A pure provider wrapper — every hook lives in `CardsWidgetInner` so it runs
2219
+ * inside `WidgetProvider`'s subtree, which is what the data-access hooks read
2220
+ * their client, org and token from.
2221
+ */
2222
+ declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CardsWidgetProps): React.JSX.Element;
2223
+
2224
+ interface InsightsWidgetLabels {
2225
+ widgetTitle: string;
2226
+ activeTab: string;
2227
+ dismissedTab: string;
2228
+ noInsightsFound: string;
2229
+ loadErrorTitle: string;
2230
+ loadErrorDescription: string;
2231
+ loadErrorRetry: string;
2232
+ }
2233
+ declare const INSIGHTS_WIDGET_LABELS_EN: InsightsWidgetLabels;
2234
+
2235
+ /**
2236
+ * Presentational model for one insight row — screen-shaped only (no domain ids or types).
2237
+ */
2238
+ interface InsightRowView {
2239
+ displayText: string;
2240
+ createdDate: string;
2241
+ badgeLabel: string;
2242
+ badgeIcon: ReactElement;
2243
+ showDismissButton: boolean;
2244
+ showToggle: boolean;
2245
+ toggleLabel?: string;
2246
+ /** Required when `onToggle` is set — owner-controlled switch state. */
2247
+ toggleChecked?: boolean;
2248
+ onToggle?: (checked: boolean) => void;
2249
+ navigationLinkText?: string;
2250
+ onNavigationClick?: () => void;
2251
+ actionText?: string;
2252
+ onActionClick?: () => void;
2253
+ }
2254
+
2255
+ interface SingleInsightLabels {
2256
+ dismissInsightAriaLabel: string;
2257
+ }
2258
+ declare const SINGLE_INSIGHT_LABELS_EN: SingleInsightLabels;
2259
+
2260
+ interface InsightsFeatureLabels {
2261
+ onboardingBadgeLabel: string;
2262
+ routingOnboardingText: string;
2263
+ enableRoutingToggle: string;
2264
+ createAccountText: string;
2265
+ connectExternalText: string;
2266
+ linkAccountAction: string;
2267
+ verifyExternalAccountText: (nickname: string) => string;
2268
+ }
2269
+ declare const INSIGHTS_FEATURE_LABELS_EN: InsightsFeatureLabels;
2270
+
2271
+ /** Domain model for one generated insight — stays in the feature layer only. */
2272
+ interface InsightItem {
2273
+ id: string;
2274
+ isDismissed: boolean;
2275
+ showToggle: boolean;
2276
+ canDismiss: boolean;
2277
+ displayText: string;
2278
+ toggleLabel?: string;
2279
+ toggleChecked?: boolean;
2280
+ onToggle?: (checked: boolean) => void;
2281
+ actionText?: string;
2282
+ onActionClick?: () => void;
2283
+ }
2284
+
2285
+ declare function mapInsightToRowView(insight: InsightItem, labels: InsightsFeatureLabels, createdDate: string): InsightRowView;
2286
+
2287
+ interface SingleInsightProps {
2288
+ insight: InsightItem;
2289
+ createdDate: string;
2290
+ featureLabels: Parameters<typeof mapInsightToRowView>[1];
2291
+ onDismissClick: (id: string) => void;
2292
+ labels?: Partial<SingleInsightLabels>;
2293
+ }
2294
+ declare const SingleInsight: ({ insight, createdDate, featureLabels, onDismissClick, labels, }: SingleInsightProps) => React.JSX.Element;
2295
+
2296
+ interface InsightsWidgetInternalProps {
2297
+ labels?: Partial<InsightsWidgetLabels>;
2298
+ singleInsightLabels?: Parameters<typeof SingleInsight>[0]['labels'];
2299
+ }
2300
+ interface InsightsWidgetWithContextProps {
2301
+ labels?: Partial<InsightsWidgetLabels>;
2302
+ singleInsightLabels?: InsightsWidgetInternalProps['singleInsightLabels'];
2303
+ featureLabels?: Partial<InsightsFeatureLabels>;
2304
+ routingEnabled?: boolean;
2305
+ onRoutingToggleChange?: (enabled: boolean) => void;
2306
+ onLinkExternalAccountClick?: () => void;
2307
+ }
2308
+ type InsightsWidgetPassthroughProps = Pick<InsightsWidgetWithContextProps, 'labels' | 'singleInsightLabels' | 'featureLabels' | 'routingEnabled' | 'onRoutingToggleChange' | 'onLinkExternalAccountClick'>;
2309
+ interface InsightsWidgetProps extends WidgetProviderProps, InsightsWidgetPassthroughProps {
2310
+ }
2311
+ declare function InsightsWidget({ labels, singleInsightLabels, featureLabels, routingEnabled, onRoutingToggleChange, onLinkExternalAccountClick, ...widgetProviderProps }: InsightsWidgetProps): React.JSX.Element;
2312
+
2313
+ interface Labels$4 {
2314
+ description?: string;
2315
+ }
2316
+
2317
+ interface SettingsWidgetSection {
2318
+ id: string;
2319
+ label: string;
2320
+ content: ReactNode;
2321
+ }
2322
+
2323
+ interface FinopsThemeColors {
2324
+ primary?: string;
2325
+ primaryForeground?: string;
2326
+ }
2327
+ interface MoniteWrapperProps {
2328
+ finopsThemeColors?: FinopsThemeColors;
2329
+ }
2330
+
2331
+ type MoniteRegionProviderProps = WidgetProviderProps & MoniteWrapperProps;
2332
+
2333
+ interface FeatureLabels$4 {
2334
+ profileSection: string;
2335
+ teamSection: string;
2336
+ invoiceSection: string;
2337
+ billPaySection: string;
2338
+ accountingSection: string;
2339
+ tagsSection: string;
2340
+ expenseSection: string;
2341
+ helpSection: string;
2342
+ expenseApprovalsTab: string;
2343
+ expenseRequirementsTab: string;
2344
+ }
2345
+
2346
+ /**
2347
+ * The sections this widget renders itself. These ids are the public vocabulary
2348
+ * a host uses to deep-link into a section, so they are part of the package's
2349
+ * API surface — renaming one is a breaking change.
2350
+ */
2351
+ declare const SettingsSection: {
2352
+ readonly Profile: "profile";
2353
+ readonly Team: "team";
2354
+ readonly Invoice: "invoice";
2355
+ readonly Expense: "expense";
2356
+ readonly BillPay: "bill-pay";
2357
+ readonly Accounting: "accounting";
2358
+ readonly Tags: "tags";
2359
+ readonly Help: "help";
2360
+ };
2361
+ type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection];
2362
+ /**
2363
+ * A selectable section id: one of the built-ins, or the id of a host-supplied
2364
+ * {@link SettingsWidgetAdditionalSection}. The `string & {}` arm keeps the
2365
+ * built-in literals visible to editor autocomplete while still accepting a
2366
+ * host's own id.
2367
+ */
2368
+ type SettingsWidgetSectionId = SettingsSection | (string & {});
2369
+ /**
2370
+ * A section contributed by the host, rendered alongside the built-in ones.
2371
+ *
2372
+ * This exists for surfaces the published package cannot own — the white-label
2373
+ * dashboard's password management, for instance, which is an app-auth concern
2374
+ * rather than an embedded one. Prefer the `*Content` props when replacing the
2375
+ * content of a section that already exists.
2376
+ */
2377
+ interface SettingsWidgetAdditionalSection extends SettingsWidgetSection {
2378
+ /**
2379
+ * Place this section immediately after the named built-in one. Sections with
2380
+ * no `after` — and those whose anchor is hidden by scope gating — are
2381
+ * appended to the end of the list.
2382
+ */
2383
+ after?: SettingsSection;
2384
+ }
2385
+
2386
+ interface SettingsWidgetProps extends MoniteRegionProviderProps {
2387
+ labels?: Partial<Labels$4>;
2388
+ featureLabels?: Partial<FeatureLabels$4>;
2389
+ /** Forwarded to the embedded Team section's {@link TeamWidget} — the
2390
+ * allowlisted URL invite emails link to. Defaults to
2391
+ * `${window.location.origin}/accept-invite`; set it when the host app's
2392
+ * registered landing route differs from that default, or the origin is
2393
+ * not on the OIDC redirect-URI allowlist (preview/localhost). */
2394
+ acceptInviteRedirectUri?: string;
2395
+ /** Forwarded to the embedded Help section's {@link HelpWidget} — where its
2396
+ * "Contact Us" line links (a support page URL or a `mailto:`). The line is
2397
+ * hidden entirely when unset, since the package has no tenant-agnostic
2398
+ * support address to fall back on. The bank name in that line comes from
2399
+ * widget init, so this is the only value a host needs to supply. */
2400
+ helpContactUrl?: string;
2401
+ /** Forwarded to the embedded Profile section's {@link ProfileWidget} — where
2402
+ * its "to change this information, contact your bank" line links. The line
2403
+ * falls back to a plain, unlinked sentence when unset, for the same reason
2404
+ * {@link SettingsWidgetProps.helpContactUrl} does. */
2405
+ profileContactUrl?: string;
2406
+ /** The section to show. Leave unset to let the widget own the selection;
2407
+ * supply it (with {@link SettingsWidgetProps.onSelectedSectionChange}) to
2408
+ * drive navigation from a route, a search param, or host state. A section
2409
+ * hidden by the user's scopes falls back to the first visible one. */
2410
+ selectedSection?: SettingsWidgetSectionId;
2411
+ /** The section to open on, for a host that wants a deep link without taking
2412
+ * ownership of the selection. Ignored when
2413
+ * {@link SettingsWidgetProps.selectedSection} is supplied; defaults to the
2414
+ * first visible section. Scopes arrive with the init response, so a section
2415
+ * this names opens as soon as it becomes visible, and one the user's scopes
2416
+ * never grant leaves the first visible section on screen. */
2417
+ defaultSelectedSection?: SettingsWidgetSectionId;
2418
+ /** Called with the id of the section the user selected. Fires whether or not
2419
+ * {@link SettingsWidgetProps.selectedSection} is supplied, so a host can mirror
2420
+ * the selection into its URL without taking ownership of it. */
2421
+ onSelectedSectionChange?: (section: SettingsWidgetSectionId) => void;
2422
+ /** Host-owned sections rendered alongside the built-in ones. */
2423
+ additionalSections?: SettingsWidgetAdditionalSection[];
2424
+ profileContent?: ReactNode;
2425
+ teamContent?: ReactNode;
2426
+ billPayContent?: ReactNode;
2427
+ helpContent?: ReactNode;
2428
+ expenseContent?: ReactNode;
2429
+ accountingContent?: ReactNode;
2430
+ tagsContent?: ReactNode;
2431
+ invoiceContent?: ReactNode;
2432
+ }
2433
+ declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
2434
+
2435
+ interface TransfersWidgetLabels {
2436
+ widgetTitle: string;
2437
+ transferMoneyCta: string;
2438
+ /** Tooltip when the transfer CTA is disabled for insufficient eligible accounts. */
2439
+ transferMoneyCtaDisabledTooltip: string;
2440
+ /** Fallback when an account has no nickname in lists or options. */
2441
+ accountFallbackName: string;
2442
+ /** Mask prefix before last four digits on account options. */
2443
+ embeddedAccountMaskPrefix: string;
2444
+ /** Prefix before full account number on review cards (e.g. "Account #:"). */
2445
+ modalReviewAccountNumberPrefix: string;
2446
+ /** Separator between from and to account names in the route line. */
2447
+ listAccountsSeparator: string;
2448
+ loadErrorTitle: string;
2449
+ loadErrorDescription: string;
2450
+ loadErrorRetry: string;
2451
+ emptyTitle: string;
2452
+ emptyDescription: string;
2453
+ modalTitle: string;
2454
+ /** Shown under the title on the accounts step (e.g. ACH timing). */
2455
+ modalAccountsSubtitle: string;
2456
+ /** Placeholder inside the From account select on the accounts step. */
2457
+ modalFromAccountPlaceholder: string;
2458
+ /** Placeholder inside the To account select on the accounts step. */
2459
+ modalToAccountPlaceholder: string;
2460
+ /** Primary action on the accounts step (legacy: full-width Confirm). */
2461
+ modalAccountsConfirm: string;
2462
+ modalStepAccounts: string;
2463
+ modalStepAmount: string;
2464
+ modalStepReview: string;
2465
+ modalStepResult: string;
2466
+ modalFromLabel: string;
2467
+ modalToLabel: string;
2468
+ modalAmountLabel: string;
2469
+ /** Placeholder for the amount input (e.g. "0.00"). */
2470
+ modalAmountPlaceholder: string;
2471
+ modalContinue: string;
2472
+ modalBack: string;
2473
+ modalSubmit: string;
2474
+ modalClose: string;
2475
+ modalReviewHeading: string;
2476
+ modalReviewFromAccountLabel: string;
2477
+ modalReviewToAccountLabel: string;
2478
+ modalAvailableBalanceCaption: string;
2479
+ modalConfirmTransfer: string;
2480
+ modalGoBack: string;
2481
+ modalSuccessTitle: string;
2482
+ modalSuccessDescription: string;
2483
+ modalResultSuccessTitle: string;
2484
+ modalResultErrorTitle: string;
2485
+ modalResultTransferMessagePrefix: string;
2486
+ modalResultSuccessMessageSuffix: string;
2487
+ modalResultErrorMessageSuffix: string;
2488
+ modalBackToTransfers: string;
2489
+ modalSelectPlaceholder: string;
2490
+ rowStatusCompleted: string;
2491
+ rowStatusPending: string;
2492
+ rowStatusFailed: string;
2493
+ rowTypeInternal: string;
2494
+ rowTypeToExternal: string;
2495
+ rowTypeFromExternal: string;
2496
+ modalAmountInvalidError: string;
2497
+ /** Shown under the amount field when the from (embedded) balance is too low. */
2498
+ modalInsufficientFundsError: string;
2499
+ /** Resets from, to, and amount on the accounts step. */
2500
+ modalClearSelections: string;
2501
+ modalUnsupportedPairError: string;
2502
+ modalSubmitFailedError: string;
2503
+ }
2504
+ declare const TRANSFERS_WIDGET_LABELS_EN: TransfersWidgetLabels;
2505
+
2506
+ interface FeatureLabels$3 {
2507
+ unavailableLabel: string;
2508
+ routeSeparator: string;
2509
+ defaultCurrencyCode: string;
2510
+ defaultSecCode: string;
2511
+ }
2512
+ declare const DEFAULT_FEATURE_LABELS: FeatureLabels$3;
1994
2513
 
1995
- type PayablesProps = {
1996
- pageTitleComponent: (children: ReactNode) => ReactNode;
2514
+ interface TransfersWidgetPassthroughProps {
2515
+ labels?: Partial<TransfersWidgetLabels>;
2516
+ featureLabels?: Partial<FeatureLabels$3>;
1997
2517
  /**
1998
- * Enable GL code selection for payable line items.
1999
- * When true, users can assign GL codes to individual line items.
2000
- * GL codes are fetched from the connected accounting system.
2518
+ * Whether the transfer money modal is showing. Supplying it makes the modal
2519
+ * controlled: the widget reports every open and close through
2520
+ * `onTransferMoneyOpenChange` and changes nothing on screen until the host
2521
+ * supplies a new value. Omit to let the widget own it.
2001
2522
  */
2002
- enableGLCodes?: boolean;
2003
- /** Arrival prop: 'create' opens the create-bill dialog on mount. */
2004
- initialView?: 'create';
2005
- /** Arrival prop: preselects this counterpart in the create-bill form. */
2006
- initialCounterpartId?: string;
2007
- } & Partial<Pick<UsePayableDetailsProps, 'onSaved' | 'onCanceled' | 'onSubmitted' | 'onRejected' | 'onApproved' | 'onReopened' | 'onDeleted' | 'onPay'>>;
2008
-
2009
- type ReceivablesProps = {
2010
- pageTitleComponent: (children: ReactNode) => ReactNode;
2523
+ isTransferMoneyOpen?: boolean;
2524
+ /** The modal's state on first render, for a host that only wants to seed it. */
2525
+ defaultIsTransferMoneyOpen?: boolean;
2011
2526
  /**
2012
- * Display name of the sponsor bank that powers embedded bank accounts, e.g.
2013
- * "Zenith Bank". Shown next to embedded accounts as "Powered by
2014
- * {embeddedBankName}" in the invoice payment account picker, on both the
2015
- * create and the edit form.
2527
+ * Called on every open and close — the CTA, the modal's own dismissals, and
2528
+ * the close that follows a completed transfer — whether or not the modal is
2529
+ * controlled.
2016
2530
  */
2017
- embeddedBankName?: string;
2018
- /** Arrival prop: 'create' opens the create-invoice dialog on mount. */
2019
- initialView?: 'create';
2020
- /** Arrival prop: preselects this counterpart in the create-invoice form. */
2021
- initialCounterpartId?: string;
2022
- };
2023
-
2024
- type ALIGN_DIALOG_TYPES = 'left' | 'right';
2025
- declare module '@mui/material/transitions' {
2026
- interface TransitionProps {
2027
- alignDialog?: ALIGN_DIALOG_TYPES;
2028
- }
2029
- }
2030
-
2031
- interface FinopsThemeColors {
2032
- primary?: string;
2033
- primaryForeground?: string;
2531
+ onTransferMoneyOpenChange?: (open: boolean) => void;
2034
2532
  }
2035
- interface MoniteWrapperProps {
2036
- finopsThemeColors?: FinopsThemeColors;
2533
+ interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps {
2037
2534
  }
2535
+ declare function TransfersWidget({ labels, featureLabels, isTransferMoneyOpen, defaultIsTransferMoneyOpen, onTransferMoneyOpenChange, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
2038
2536
 
2039
- type MoniteRegionProviderProps = WidgetProviderProps & MoniteWrapperProps;
2040
-
2041
- type BillPayWidgetMoniteProps = MoniteRegionProviderProps & Omit<PayablesProps, 'pageTitleComponent'> & {
2042
- pageTitleComponent?: PayablesProps['pageTitleComponent'];
2537
+ /**
2538
+ * Copy the shell owns. The section names are deliberately absent: they arrive on
2539
+ * each `SuiteSection`, because whoever decides which sections exist is also the
2540
+ * only layer that can name them.
2541
+ */
2542
+ interface WidgetSuiteShellLabels {
2543
+ /** Names the section menu for assistive technology. */
2544
+ navAriaLabel: string;
2545
+ /**
2546
+ * Announces the placeholder shell while the caller resolves which sections
2547
+ * exist. Read out in place of the menu, which has no items yet to name.
2548
+ */
2549
+ loadingAriaLabel: string;
2550
+ /** Shown in place of the menu when the caller supplies no sections. */
2551
+ emptyState: {
2552
+ title: string;
2553
+ body: string;
2554
+ };
2555
+ }
2556
+ /**
2557
+ * `Labels` has a nested group, so a shallow `{ ...defaults, ...overrides }`
2558
+ * would let a consumer overriding one `emptyState` string drop the other. The
2559
+ * repo has no shared deep-partial type, so each labels module declares its own.
2560
+ */
2561
+ type PartialDeep$3<T> = {
2562
+ [K in keyof T]?: T[K] extends object ? PartialDeep$3<T[K]> : T[K];
2043
2563
  };
2044
2564
 
2045
- type BillPayWidgetProps = BillPayWidgetMoniteProps & {
2046
- /** Bank shown as "Powered by {bank}" next to the source account when paying a bill. Native implementation only; ignored under `monite`. */
2047
- poweredByBankName?: string;
2048
- };
2049
2565
  /**
2050
- * BillPay widget entry point — selects the rendering implementation.
2051
- *
2052
- * BillPay is deliberately **pinned to `monite`** until the Tesouro-native
2053
- * (shadcn) build reaches parity (epic EMBD-2171;
2054
- * `docs/billpay-usification-shadcn/technical-design.md` §2). `native` is the
2055
- * global default across widgets, so BillPay applies its own `monite` fallback
2056
- * whenever *nothing* selects an implementation — this is what keeps the native
2057
- * build off by default.
2566
+ * The section id vocabulary, and the shape of a registry entry.
2058
2567
  *
2059
- * An explicit selection is still honored, whether it comes from this widget's
2060
- * `implementation` prop or from the provider/global cascade
2061
- * (`RootWidgetProvider implementation="native"`, `setGlobalWidgetConfig`). We
2062
- * read the *raw* cascade value (undefined when unset) rather than the resolved
2063
- * one so the global `native` default does not leak past the pin. The cutover is
2064
- * a one-line change: drop the `monite` fallback once native is at parity.
2568
+ * A leaf module on purpose: it imports no widget feature library and never
2569
+ * reaches the provider, so `labels.ts` and `WidgetSuiteProvider.tsx` can take
2570
+ * the ids from here without sitting downstream of the eight widgets the registry
2571
+ * pulls in.
2065
2572
  */
2066
- declare function BillPayWidget({ implementation, ...props }: BillPayWidgetProps): React.JSX.Element;
2067
-
2068
2573
  /**
2069
- * Every key of `T` optional, recursively, so a consumer can override one nested
2070
- * label without restating its siblings. Defined locally because the repo has no
2071
- * shared deep-partial type and does not depend on `type-fest`.
2574
+ * The sections the suite can offer, declared in the default menu order. Order
2575
+ * here is documentation only — the suite renders whatever order its `sections`
2576
+ * prop lists.
2072
2577
  */
2073
- type PartialDeep$4<T> = {
2074
- [K in keyof T]?: T[K] extends object ? PartialDeep$4<T[K]> : T[K];
2578
+ declare const WidgetSuiteSectionId: {
2579
+ readonly Dashboard: "dashboard";
2580
+ readonly Accounts: "accounts";
2581
+ readonly Cards: "cards";
2582
+ readonly Transfers: "transfers";
2583
+ readonly BillPay: "bill-pay";
2584
+ readonly Invoicing: "invoicing";
2585
+ readonly Expenses: "expenses";
2586
+ readonly Settings: "settings";
2075
2587
  };
2076
- interface CardsListColumnHeaderLabels {
2077
- cardName: string;
2078
- fundingAccount: string;
2079
- cardholder: string;
2080
- status: string;
2081
- limit: string;
2082
- }
2588
+ type WidgetSuiteSectionId = (typeof WidgetSuiteSectionId)[keyof typeof WidgetSuiteSectionId];
2083
2589
  /**
2084
- * Screen-reader-only copy naming the details sheet a row click opens.
2590
+ * The whole surface in the shipped white-label header order
2591
+ * (`useDashboardLayout.tsx`): its banking group, then its finops group, then
2592
+ * Settings, which white label keeps in the avatar menu rather than the header.
2085
2593
  *
2086
- * Both strings are invisible by design: the sheet's visible header belongs to
2087
- * whatever the owner slots into it (`CardDetailsPanel`, via `CardsWidget`), and a
2088
- * second visible title would duplicate it. They exist because the sheet is a
2089
- * dialog, and a dialog without an accessible name is announced as nothing.
2594
+ * This is what `sections` defaults to, and it is exported as well so a host can
2595
+ * spread it and edit the list — dropping a section, or reordering one — without
2596
+ * writing the whole thing out.
2090
2597
  */
2091
- interface CardsListDetailsSheetLabels {
2092
- /** Accessible name for the sheet. */
2093
- title: string;
2094
- /** Accessible description, announced after the name. */
2095
- description: string;
2598
+ declare const WIDGET_SUITE_DEFAULT_SECTIONS: readonly ["dashboard", "accounts", "cards", "transfers", "bill-pay", "invoicing", "expenses", "settings"];
2599
+
2600
+ /**
2601
+ * The section names in the suite menu.
2602
+ *
2603
+ * Keyed by section id rather than hand-listed, so adding a section to the
2604
+ * registry fails the build here until it is named — the menu can never render a
2605
+ * section with no label. The ids come from the leaf `sectionIds` module, so this
2606
+ * reaches neither the registry nor the widgets behind it.
2607
+ */
2608
+ type WidgetSuiteMenuLabels = Record<WidgetSuiteSectionId, string>;
2609
+ /** Copy for the heading above a section, as opposed to its menu item. */
2610
+ interface WidgetSuiteSectionTitleLabels {
2611
+ /**
2612
+ * The bank attribution beneath the heading. `{bankName}` is replaced with the
2613
+ * bank `/init` names, so a translation can put it anywhere in the sentence
2614
+ * rather than after a fixed lead-in. An override that drops the placeholder
2615
+ * shows no name.
2616
+ */
2617
+ bankTagline: string;
2096
2618
  }
2097
2619
  /**
2098
- * Every user-facing string the cards list renders, including screen-reader-only
2099
- * copy and the decorative separators.
2620
+ * Copy for the states where the suite cannot prove it may show normal content.
2100
2621
  *
2101
- * There is intentionally **no** card-type or card-status map here: the row
2102
- * arrives with `typeLabel` and `statusLabel` already resolved, so the
2103
- * `DIGITAL`/`PHYSICAL` and `PENDING_ACTIVATION`/`ACTIVE`/`LOCKED`/`CLOSED` maps
2104
- * live in `shared/feature` keyed on the generated types (EMBD-4404 amendment;
2105
- * see `statusBadge.ts`). That is also where the "label keys carry the code term,
2106
- * values carry the copy" rule applies — `digital`, never `virtual`, so a later
2107
- * wording change is not a breaking rename.
2622
+ * Both are places the gate cannot proceed, and neither is reachable by a correct
2623
+ * integration against a healthy API.
2108
2624
  */
2109
- interface CardsListLabels {
2110
- title: string;
2111
- /** Accessible name for the list region. */
2112
- regionLabel: string;
2113
- columnHeaders: CardsListColumnHeaderLabels;
2114
- /** Screen-reader name for the unheaded trailing row-actions column. */
2115
- rowActionsColumn: string;
2116
- showMyCardsToggle: string;
2117
- createCardButton: string;
2118
- activateButton: string;
2119
- /** Accessible name for a row's Activate button; the card name is appended. */
2120
- activateButtonForCard: string;
2121
- /** Accessible name for a row's open-details control; card name appended. */
2122
- selectCardButton: string;
2123
- /** Separator between a card's nickname and its last four digits. */
2124
- cardNameSeparator: string;
2125
- /** Stands in for the limit when a card has none set. */
2126
- noLimit: string;
2127
- /** Announced while a page of cards is loading. */
2128
- loadingLabel: string;
2129
- emptyTitle: string;
2130
- emptyDescription: string;
2131
- errorTitle: string;
2132
- errorDescription: string;
2133
- retryButton: string;
2134
- pagination: PaginationFooterLabels;
2625
+ interface WidgetSuiteDisclosureLabels {
2135
2626
  /**
2136
- * Copy for the details sheet a row click opens. Rendered by
2137
- * `CardsListDetailsSheet` rather than by the table, but part of this surface
2138
- * because it is one screen and one `labels` prop — the same reason `pagination`
2139
- * sits here for a footer that lives in `shared/ui`.
2627
+ * The first init fetch failed before the disclosure flags were known. The suite
2628
+ * must fail closed here, because an unknown requirement is not permission to
2629
+ * show ungated sections.
2140
2630
  */
2141
- detailsSheet: CardsListDetailsSheetLabels;
2631
+ initFailedState: {
2632
+ title: string;
2633
+ body: string;
2634
+ retryButton: string;
2635
+ };
2142
2636
  /**
2143
- * Screen-reader copy for the same sheet when Create card is slotted in, rather
2144
- * than a selected card's details. Same chrome, different accessible name.
2637
+ * The acceptance was recorded and the init refresh that clears the gate
2638
+ * failed, so only our view of it is stale.
2639
+ *
2640
+ * The failure is the title and the reassurance is the body, in that order on
2641
+ * purpose: `ErrorState` puts a destructive-toned glyph above the title, so
2642
+ * leading with "accepted" reads at a glance as the acceptance having failed —
2643
+ * the one thing this state must not imply, since a user who believes that will
2644
+ * try to accept again.
2145
2645
  */
2146
- createSheet: CardsListDetailsSheetLabels;
2147
- }
2148
-
2149
- /** Accessible copy for the panel header's controls. */
2150
- interface CardDetailsHeaderLabels {
2151
- /** Fallback title when the card has no nickname. */
2152
- untitledCard: string;
2153
- /** Accessible name for the kebab that opens the card actions menu. */
2154
- menuTriggerAriaLabel: string;
2155
- /** Accessible name for the close (X) control. */
2156
- closeAriaLabel: string;
2157
- }
2158
- /** Accessible copy for the simplified card face. */
2159
- interface CardDetailsCardFaceLabels {
2160
- /** Alt text for the bank logo when the caller supplies no `bankLogoAlt`. */
2161
- bankLogoAlt: string;
2162
- }
2163
- /** Row headings and per-row copy affordance names for the details table. */
2164
- interface CardDetailsFieldLabels {
2165
- cardholder: string;
2166
- nickname: string;
2167
- billingAddress: string;
2168
- /** Sub-header over the merchant categories / velocity control rows. */
2169
- cardControlsHeading: string;
2170
- allowedCategories: string;
2171
- spendLimit: string;
2172
- perTransactionMax: string;
2173
- /** Stands in for a row whose value the card does not carry. */
2174
- emptyValue: string;
2175
- copyCardholderAriaLabel: string;
2176
- copyNicknameAriaLabel: string;
2177
- copyBillingAddressAriaLabel: string;
2178
- }
2179
- /** Copy for the controls the owner can switch on alongside the details. */
2180
- interface CardDetailsActionLabels {
2181
- /** Primary control that opens the Activate Card form. */
2182
- activateCard: string;
2183
- /** Secondary control that asks the owner to reveal the card's credentials. */
2184
- viewCard: string;
2185
- /** The same control, once the credentials are on screen. */
2186
- hideCard: string;
2646
+ refreshFailedState: {
2647
+ title: string;
2648
+ body: string;
2649
+ retryButton: string;
2650
+ };
2187
2651
  }
2188
2652
  /**
2189
- * Copy for the revealed card credentials. The values themselves never have a
2190
- * default here — the panel is handed them or renders the field blank.
2653
+ * A widget's whole copy surface: every label prop it accepts, spread onto it so
2654
+ * the props keep the names that widget's own doc gives them.
2655
+ *
2656
+ * Derived rather than hand-listed: `CardsWidget` alone has six, so a written-out
2657
+ * list goes stale the next time one grows a panel. `providerLabels` is excluded
2658
+ * because the suite addresses the provider once, at the top level.
2191
2659
  */
2192
- interface CardDetailsCredentialsLabels {
2193
- cardNumber: string;
2194
- expirationDate: string;
2195
- securityCode: string;
2196
- copyCardNumberAriaLabel: string;
2197
- copyExpirationDateAriaLabel: string;
2198
- copySecurityCodeAriaLabel: string;
2199
- /** Shown next to the control when the reveal failed. */
2200
- errorDescription: string;
2660
+ type WidgetLabelProps<T> = Omit<Pick<T, Extract<keyof T, 'labels' | `${string}Labels`>>, 'providerLabels'>;
2661
+ type WidgetSuiteBalancesLabels = WidgetLabelProps<BalancesWidgetProps>;
2662
+ type WidgetSuiteInsightsLabels = WidgetLabelProps<InsightsWidgetProps>;
2663
+ type WidgetSuiteAccountsLabels = WidgetLabelProps<BankAccountsWidgetProps>;
2664
+ type WidgetSuiteCardsListLabels = WidgetLabelProps<CardsWidgetProps>;
2665
+ type WidgetSuiteTransfersLabels = WidgetLabelProps<TransfersWidgetProps>;
2666
+ type WidgetSuiteSettingsLabels = WidgetLabelProps<SettingsWidgetProps>;
2667
+ /** The two widgets the Dashboard section pairs, each taking its own copy. */
2668
+ interface WidgetSuiteDashboardLabels {
2669
+ balances?: WidgetSuiteBalancesLabels;
2670
+ insights?: WidgetSuiteInsightsLabels;
2201
2671
  }
2202
- /** Copy for the three non-loaded screens. */
2203
- interface CardDetailsStatusScreenLabels {
2204
- /** Accessible name announced while the panel is loading. */
2205
- loadingAriaLabel: string;
2206
- errorTitle: string;
2207
- errorDescription: string;
2208
- errorRetry: string;
2209
- notFoundTitle: string;
2210
- notFoundDescription: string;
2672
+ /**
2673
+ * The two card lists.
2674
+ *
2675
+ * `labels.title` is the one leaf the suite defaults anywhere under `sections`:
2676
+ * `CardsList` titles itself "Cards", and two instances stack in this section, so
2677
+ * each is retitled by program.
2678
+ */
2679
+ interface WidgetSuiteCardsLabels {
2680
+ creditCards: WidgetSuiteCardsListLabels;
2681
+ debitCards: WidgetSuiteCardsListLabels;
2211
2682
  }
2212
- interface CardDetailsPanelLabels {
2213
- header: CardDetailsHeaderLabels;
2214
- cardFace: CardDetailsCardFaceLabels;
2215
- fields: CardDetailsFieldLabels;
2216
- actions: CardDetailsActionLabels;
2217
- credentials: CardDetailsCredentialsLabels;
2218
- status: CardDetailsStatusScreenLabels;
2683
+ /** Expenses is only a placeholder until the suite wires a read/self surface. */
2684
+ interface WidgetSuiteExpensesLabels {
2685
+ expensesUnavailable: string;
2219
2686
  }
2220
-
2221
2687
  /**
2222
- * Deep partial for label overrides.
2688
+ * Copy the suite puts *inside* a section's panel, one group per section.
2223
2689
  *
2224
- * Both label surfaces this widget exposes have nested groups, and a shallow
2225
- * `Partial` would let a consumer who overrides one nested string drop the rest
2226
- * of that group. The repo has no shared `PartialDeep` and does not depend on
2227
- * `type-fest`, so each labels module defines its own — `card-details-widget/ui`
2228
- * has an identical one for the panel's labels, and this declaration also types
2229
- * that prop here so the widget carries one such helper rather than two.
2690
+ * A group is shaped as the override its widget accepts, so it is handed down by
2691
+ * reference rather than remapped key by key.
2692
+ *
2693
+ * Two sections have no group: Bill Pay and Invoicing both mount a Monite
2694
+ * surface, which carries its own copy and takes no label props at all. They get
2695
+ * one when the native builds replace them, and adding a group to an
2696
+ * already-optional tree breaks nobody.
2230
2697
  */
2231
- type PartialDeep$3<T> = {
2232
- [K in keyof T]?: T[K] extends object ? PartialDeep$3<T[K]> : T[K];
2233
- };
2698
+ interface WidgetSuiteSectionContentLabels {
2699
+ dashboard: WidgetSuiteDashboardLabels;
2700
+ accounts?: WidgetSuiteAccountsLabels;
2701
+ cards: WidgetSuiteCardsLabels;
2702
+ transfers?: WidgetSuiteTransfersLabels;
2703
+ expenses: WidgetSuiteExpensesLabels;
2704
+ settings?: WidgetSuiteSettingsLabels;
2705
+ }
2706
+ /**
2707
+ * Every string the suite puts on screen, including the copy inside the widgets
2708
+ * it mounts. Two kinds of group, differing in who holds the default:
2709
+ *
2710
+ * - **Suite-owned** — `shell`, `menu`, `sectionTitle`, `disclosure`,
2711
+ * `sections.expenses`, and the two card-list titles. Defaulted in
2712
+ * {@link WIDGET_SUITE_LABELS_EN}, with an override merged over it.
2713
+ * - **Forwarded** — every other key under `sections`. Handed down untouched for
2714
+ * the widget to merge over its own defaults, so the suite carries no copy of a
2715
+ * widget's strings and cannot go stale against one.
2716
+ *
2717
+ * `WidgetProvider`'s copy is deliberately absent: it is already reachable
2718
+ * through the inherited `providerLabels` prop, and two routes to one string
2719
+ * could disagree.
2720
+ */
2721
+ interface WidgetSuiteLabels {
2722
+ /** The shell's own copy — the nav landmark name, the empty state. */
2723
+ shell: WidgetSuiteShellLabels;
2724
+ menu: WidgetSuiteMenuLabels;
2725
+ sectionTitle: WidgetSuiteSectionTitleLabels;
2726
+ disclosure: WidgetSuiteDisclosureLabels;
2727
+ sections: WidgetSuiteSectionContentLabels;
2728
+ }
2234
2729
  /**
2235
- * Copy the **feature** layer owns, as opposed to the panel's own
2236
- * `CardDetailsPanelLabels`.
2730
+ * The `labels` prop: a deep partial of {@link WidgetSuiteLabels}.
2237
2731
  *
2238
- * The split follows where the string is resolved, not where it is painted. A
2239
- * status badge word is chosen by mapping a generated `cardStatus` enum member,
2240
- * which is a data-access-typed decision the presentational layer is not allowed
2241
- * to make — so it is overridable here even though the panel renders it. The
2242
- * panel's own labels stay with the panel.
2732
+ * `sections` is exempted from `PartialDeep` on purpose — every group under it is
2733
+ * already the exact override its widget accepts, so deepening it again would
2734
+ * admit a shape the suite cannot forward and would flatten a non-plain member
2735
+ * (`PartialDeep` maps a function-valued label to `{}`). The two suite-owned
2736
+ * groups under it are made partial one level for the same reason.
2243
2737
  */
2244
- interface CardDetailsFeatureLabels {
2245
- /** Confirmation toast after a copy affordance writes to the clipboard. */
2246
- copySuccessToast: string;
2738
+ type WidgetSuiteLabelOverrides = PartialDeep$3<Omit<WidgetSuiteLabels, 'sections'>> & {
2739
+ sections?: Partial<Omit<WidgetSuiteSectionContentLabels, 'cards' | 'expenses'>> & {
2740
+ cards?: Partial<WidgetSuiteCardsLabels>;
2741
+ expenses?: Partial<WidgetSuiteExpensesLabels>;
2742
+ };
2743
+ };
2744
+ declare const WIDGET_SUITE_LABELS_EN: WidgetSuiteLabels;
2745
+
2746
+ interface WidgetSuiteProps extends WidgetProviderProps {
2247
2747
  /**
2248
- * Replaces the panel's generic reveal error when the credentials call was
2249
- * refused (HTTP 403).
2748
+ * Which sections the suite offers, in menu order.
2250
2749
  *
2251
- * It lives here rather than on the panel because deciding that a failure was a
2252
- * refusal means reading the error, which is this layer's job — the panel is
2253
- * handed one already-chosen sentence either way, and its own
2254
- * `credentials.errorDescription` still covers every other failure.
2750
+ * Defaults to {@link WIDGET_SUITE_DEFAULT_SECTIONS}, the whole surface in the
2751
+ * shipped white-label header order, so mounting the suite with auth props
2752
+ * alone gives a complete banking page. Name the list to compose a narrower
2753
+ * page, or to order it differently.
2255
2754
  *
2256
- * The wording deliberately does not tell the reader to ask for a permission.
2257
- * Reading a debit card and reading its credentials take the same scope, so a
2258
- * reader looking at this panel already holds it; a 403 here means the call was
2259
- * refused for this session, which asking an admin for a role will not fix.
2755
+ * A section listed here is still hidden when the token does not earn it, so
2756
+ * this is the ceiling rather than a promise of what renders — which is also
2757
+ * why the default is safe: a section added to the registry reaches a host that
2758
+ * took the default, and a user who cannot see it still does not.
2260
2759
  */
2261
- revealNotPermittedDescription: string;
2262
- /** Program wording on the card face, keyed on the widget's `cardProgram`. */
2263
- programLabels: Record<CardProgram, string>;
2264
- /** Status badge wording, keyed on the generated card status. */
2265
- statusLabels: Record<CardStatus, string>;
2266
- /** Form-factor subtitle wording, keyed on the generated card type. */
2267
- formFactorLabels: Record<CardType, string>;
2760
+ sections?: readonly WidgetSuiteSectionId[];
2268
2761
  /**
2269
- * A velocity control's reset-period wording, keyed on the generated
2270
- * `velocityWindow`. Used to build the spend limit row, e.g. "$500 / month".
2271
- * `TRANSACTION` is unused there (it drives the separate per-transaction max
2272
- * row instead) but is still a real enum member, so it stays in the map.
2762
+ * Which section is showing, for a host that owns navigation — a URL, a router,
2763
+ * its own state.
2764
+ *
2765
+ * Puts the menu in controlled mode for the lifetime of the mount, so supply it
2766
+ * with `onSectionChange` or the surface will not move when the user clicks.
2767
+ *
2768
+ * The suite is addressable at exactly this depth and no deeper: what a section
2769
+ * has open — an account, a card, a settings tab — belongs to the widget behind
2770
+ * it, so a host that needs to deep-link one of those mounts that widget itself.
2273
2771
  */
2274
- velocityWindowLabels: Record<VelocityWindow, string>;
2275
- }
2276
-
2277
- interface CardDetailsWidgetProps extends WidgetProviderProps {
2278
- /** Id of the card to show. */
2279
- cardId: string;
2772
+ section?: WidgetSuiteSectionId;
2280
2773
  /**
2281
- * Which issuing product `cardId` belongs to. **Required, with no default** —
2282
- * it selects the endpoint the card is fetched from, and a wrong guess would
2283
- * 404 a card that exists. `CardsWidget` publishes the same required prop, so
2284
- * one value configures a list and its detail panel together.
2774
+ * Which section the suite opens on, for a host that wants a deep link but not
2775
+ * ownership. Read once per mount, and ignored when `section` is supplied.
2285
2776
  *
2286
- * A JavaScript consumer, or a host passing a route param straight through, can
2287
- * still get a value past the type. **There is no catch-all and no default:**
2288
- * anything that is not explicitly one of the two programs fetches nothing and
2289
- * renders the panel's error state with no retry, and the reason is named on the
2290
- * console. That covers an absent prop (`undefined` / `null`) as well as an
2291
- * unrecognised one (`'prepaid'`, a case-wrong `'Credit'`), because the widget
2292
- * cannot know which product to ask about in either case.
2777
+ * Defaults to the first entry in `sections`.
2778
+ */
2779
+ defaultSection?: WidgetSuiteSectionId;
2780
+ /**
2781
+ * The section a person moved to, from a menu click or a dashboard affordance.
2293
2782
  *
2294
- * A host that resolves the program asynchronously should gate its own render on
2295
- * it rather than mounting this widget without it — an absent program is not
2296
- * read as "still loading".
2783
+ * Never fired for the entitlement fallback, and never fired on mount, so a
2784
+ * host mirroring this into its URL cannot overwrite the deep link it was just
2785
+ * handed.
2297
2786
  */
2298
- cardProgram: CardProgram;
2787
+ onSectionChange?: (section: WidgetSuiteSectionId) => void;
2299
2788
  /**
2300
- * Called when the header's close control is pressed. Omitting it renders no
2301
- * close control at all: a standalone card page has nothing to close back to,
2302
- * while a host rendering the panel in a drawer supplies this and suppresses
2303
- * its own chrome's close button so the two do not sit side by side.
2789
+ * Every string the suite puts on screen, in one tree: the shell's own copy,
2790
+ * the menu names, the section heading, the disclosure states, and a group per
2791
+ * section carrying the copy of the widget that section mounts.
2792
+ *
2793
+ * Override any leaf and its siblings keep their defaults, at every depth. See
2794
+ * {@link WidgetSuiteLabels} for which groups the suite defaults and which it
2795
+ * forwards to a widget untouched.
2796
+ *
2797
+ * `WidgetProvider`'s own copy is not in here — it has its own `providerLabels`
2798
+ * prop, inherited from `WidgetProviderProps`.
2304
2799
  */
2305
- onClose?: () => void;
2306
- /** Overrides for the panel's own copy. */
2307
- labels?: PartialDeep$3<CardDetailsPanelLabels>;
2308
- /** Overrides for the copy this layer resolves — see `CardDetailsFeatureLabels`. */
2309
- featureLabels?: PartialDeep$3<CardDetailsFeatureLabels>;
2800
+ labels?: WidgetSuiteLabelOverrides;
2310
2801
  /**
2311
- * Bank logo for the card face. The widget ships no bank artwork of its own and
2312
- * resolves none from the init response: an embeddable library must not depend
2313
- * on a Tesouro-hosted asset a host page's content-security policy can block,
2314
- * and a bundled bank-name→URL table would put internal CDN links in the
2315
- * published package (PLAT-1179, embedded ADR 0005). Omit it and the card face
2316
- * renders without a logo rather than with a placeholder.
2802
+ * Shows a heading above each section, named as its menu item is.
2803
+ *
2804
+ * Defaults to `true`: the suite owns its page, and a page with a menu but no
2805
+ * heading reads as a fragment of someone else's. Set `false` when the host
2806
+ * already renders a heading of its own above the suite.
2807
+ *
2808
+ * Every section gets one: no widget heads itself any more (embedded ADR
2809
+ * 0010), so the suite is the only thing that can name them.
2317
2810
  */
2318
- bankLogoSrc?: string;
2319
- bankLogoAlt?: string;
2811
+ showSectionTitle?: boolean;
2320
2812
  }
2321
2813
  /**
2322
- * Read-only details for one card, standalone-capable.
2814
+ * A suite of widgets bound together by navigation.
2323
2815
  *
2324
- * Provides its own `WidgetProvider`, so it renders with nothing above it — a
2325
- * partner can mount it on a real `/cards/[id]` page. Nested inside another
2326
- * widget's provider with no auth props of its own, it inherits that init
2327
- * response and `QueryClient` instead, costing no second `/init` call and sharing
2328
- * one cache with the list that opened it. Do not forward `baseUrl` or
2329
- * `widgetToken` into it from a parent widget: either one flips this provider into
2330
- * fetch mode and buys a redundant init request per open.
2816
+ * Unlike a widget — a content area an integrator drops onto a page they own — a
2817
+ * suite owns the page it is placed on, exists once per page, and decides which
2818
+ * widgets appear on it.
2331
2819
  *
2332
- * Both placements are covered by specs, because they take different code paths
2333
- * through the provider and this export exists for the standalone one.
2334
- */
2335
- declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element;
2336
-
2337
- /**
2338
- * Reset-period tab labels and notice copy are deliberately absent: the owner
2339
- * supplies those through `spendLimitPeriodOptions` / `spendLimitPeriodNotices`,
2340
- * so declaring them here would give consumers override keys that no component
2341
- * ever reads.
2820
+ * One `/init` serves the whole surface: this provider owns the fetch, and every
2821
+ * composed widget is handed no auth props, so its own provider runs in
2822
+ * pass-through mode. See `sections/sectionIds.ts` for the two composition rules
2823
+ * that arrangement depends on.
2824
+ *
2825
+ * That one response also decides which state the suite is in before the shell
2826
+ * renders: placeholders while init has not settled, a closed retry state when
2827
+ * init fails before answering the disclosure flags, the acceptance surface
2828
+ * alone when the session owes the bank's disclosures, or the nav over its
2829
+ * sections. States rather than an overlay over a mounted shell — see
2830
+ * `WidgetSuiteSurface` for why each boundary sits where it does.
2831
+ *
2832
+ * Navigation is one value: which section is showing, published to the sections
2833
+ * through `WidgetSuiteProvider` and drivable by a host through `section` /
2834
+ * `defaultSection` / `onSectionChange`. Nothing deeper is addressable. Only the
2835
+ * open panel is mounted and every widget owns its own state, so leaving a
2836
+ * section and coming back shows it as it opens: the account list, the card
2837
+ * lists, the widget's own opening tab. A host that needs to deep-link into one
2838
+ * of those mounts that widget itself rather than reaching through the suite.
2342
2839
  */
2343
- interface CardControlsLabels {
2344
- currencySymbol: string;
2345
- spendLimit: {
2346
- title: string;
2347
- description: string;
2348
- amountPlaceholder: string;
2349
- amountAriaLabel: string;
2350
- };
2351
- merchantCategories: {
2352
- title: string;
2353
- description: string;
2354
- };
2355
- perTransactionMaximum: {
2356
- title: string;
2357
- description: string;
2358
- amountPlaceholder: string;
2359
- amountAriaLabel: string;
2360
- };
2361
- }
2840
+ declare function WidgetSuite({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: WidgetSuiteProps): React.JSX.Element;
2362
2841
 
2363
2842
  type PartialDeep$2<T> = {
2364
2843
  [K in keyof T]?: T[K] extends object ? PartialDeep$2<T[K]> : T[K];
2365
2844
  };
2366
- interface CreateCardWidgetLabels {
2367
- header: {
2368
- title: string;
2369
- closeAriaLabel: string;
2370
- };
2371
- cardArtAlt: string;
2372
- setup: {
2373
- sectionTitle: string;
2374
- cardholderLabel: string;
2375
- cardholderPlaceholder: string;
2376
- cardFormatLabel: string;
2377
- cardFormatPlaceholder: string;
2378
- cardFormatVirtual: string;
2379
- cardFormatPhysical: string;
2380
- fundingAccountLabel: string;
2381
- fundingAccountPlaceholder: string;
2382
- };
2383
- mailing: {
2384
- sectionTitle: string;
2385
- sectionDescription: string;
2386
- businessTitle: string;
2387
- businessDescription: string;
2388
- customTitle: string;
2389
- customDescription: string;
2390
- };
2391
- manualAddress: {
2392
- streetLabel: string;
2393
- cityLabel: string;
2394
- stateLabel: string;
2395
- statePlaceholder: string;
2396
- zipLabel: string;
2397
- };
2398
- cardControls: CardControlsLabels;
2399
- preparing: {
2400
- title: string;
2401
- description: string;
2402
- };
2403
- success: {
2404
- title: string;
2405
- description: string;
2406
- createAnother: string;
2407
- viewCard: string;
2408
- };
2409
- footer: {
2410
- cancel: string;
2411
- createCard: string;
2412
- };
2413
- cardholderError: {
2414
- title: string;
2415
- description: string;
2416
- retry: string;
2417
- };
2418
- fundingAccountError: {
2419
- title: string;
2420
- description: string;
2421
- retry: string;
2422
- };
2423
- }
2424
-
2425
- interface CreateCardFeatureLabels {
2426
- toast: {
2427
- creating: string;
2428
- success: string;
2429
- error: string;
2430
- /**
2431
- * Card issued but a follow-up velocity-control POST failed. The card
2432
- * already exists; this must not read as a create failure.
2433
- */
2434
- controlsWarning: string;
2435
- /**
2436
- * Card issued but granting company admins access to it failed. The card
2437
- * already exists; this must not read as a create failure.
2438
- */
2439
- companyAdminAccessWarning: string;
2440
- /**
2441
- * Card issued, but BOTH the velocity-control POST(s) and the company-admin
2442
- * access grant failed. Distinct from the two single-failure warnings above
2443
- * so an issuer who hits both is told about both, not just whichever this
2444
- * code checks first.
2445
- */
2446
- controlsAndAccessWarning: string;
2447
- /**
2448
- * The roster of users to grant access to a new card failed to load.
2449
- * Shown with a retry action; Create stays disabled until it resolves so
2450
- * a card is never issued without its required admin grants.
2451
- */
2452
- debitCardIssuersError: string;
2453
- retry: string;
2845
+ interface AcceptDisclosuresWidgetLabels {
2846
+ title: string;
2847
+ acceptButton: string;
2848
+ agreementCheckboxAriaLabel: string;
2849
+ /** Fallback when the accept API fails without a usable message. */
2850
+ acceptErrorFallback: string;
2851
+ /**
2852
+ * Use `{bankName}` for the bank display name and `{documents}` for the
2853
+ * conjunction list of titles the backend returned (same order as the links).
2854
+ * A legacy override that omits `{documents}` still has those titles appended
2855
+ * so consent copy cannot disagree with the linked documents.
2856
+ */
2857
+ agreementTextTemplate: string;
2858
+ providerAttributionPrefix: string;
2859
+ providerAttributionMiddle: string;
2860
+ providerAttributionSuffix: string;
2861
+ /**
2862
+ * @deprecated Ignored. Document titles come from
2863
+ * `GET /identity/v1/disclosures`. Kept so hosts that implement the full
2864
+ * published `AcceptDisclosuresWidgetLabels` interface continue to typecheck.
2865
+ */
2866
+ linkLabels: {
2867
+ termsOfUse: string;
2868
+ privacyPolicy: string;
2869
+ electronicCommunications: string;
2870
+ patriotAct: string;
2454
2871
  };
2455
- untitledFundingAccount: string;
2872
+ /** Title when the backend returned no documents (`NOT_REQUIRED`). */
2873
+ noDocumentsTitle?: string;
2874
+ /** Use `{bankName}` when the backend returned no documents. */
2875
+ noDocumentsAgreementTextTemplate?: string;
2876
+ /**
2877
+ * Checkbox `aria-label` when the backend returned no documents. Use
2878
+ * `{bankName}`. Must not say the user is agreeing to disclosures.
2879
+ */
2880
+ noDocumentsAgreementCheckboxAriaLabel?: string;
2881
+ /**
2882
+ * Two-item document list. Use `{first}` and `{second}` for the titles.
2883
+ */
2884
+ documentListPairTemplate?: string;
2885
+ /** Separator between titles in a list of three or more (before the last). */
2886
+ documentListSeparator?: string;
2887
+ /** Conjunction before the last title in a list of three or more. */
2888
+ documentListLastConjunction?: string;
2889
+ /** Heading when the disclosures query fails. */
2890
+ loadErrorTitle?: string;
2891
+ /** Fallback when the disclosures query fails without a usable message. */
2892
+ loadErrorFallback?: string;
2893
+ /** Retry control on the disclosures-query error surface. */
2894
+ loadErrorRetryLabel?: string;
2456
2895
  /**
2457
- * API-required `name` on a velocity control. Not shown in this widget;
2458
- * may surface on a later controls list.
2896
+ * Shown when accept is refused because a newer disclosure version is in
2897
+ * force than the documents the invitee agreed to.
2459
2898
  */
2460
- velocityControlNames: {
2461
- spendLimit: string;
2462
- perTransactionMaximum: string;
2899
+ disclosuresUpdatedFallback?: string;
2900
+ }
2901
+ declare const ACCEPT_DISCLOSURES_WIDGET_LABELS_EN: {
2902
+ title: string;
2903
+ acceptButton: string;
2904
+ agreementCheckboxAriaLabel: string;
2905
+ acceptErrorFallback: string;
2906
+ agreementTextTemplate: string;
2907
+ providerAttributionPrefix: string;
2908
+ providerAttributionMiddle: string;
2909
+ providerAttributionSuffix: string;
2910
+ linkLabels: {
2911
+ termsOfUse: string;
2912
+ privacyPolicy: string;
2913
+ electronicCommunications: string;
2914
+ patriotAct: string;
2463
2915
  };
2916
+ noDocumentsTitle: string;
2917
+ noDocumentsAgreementTextTemplate: string;
2918
+ noDocumentsAgreementCheckboxAriaLabel: string;
2919
+ documentListPairTemplate: string;
2920
+ documentListSeparator: string;
2921
+ documentListLastConjunction: string;
2922
+ loadErrorTitle: string;
2923
+ loadErrorFallback: string;
2924
+ loadErrorRetryLabel: string;
2925
+ disclosuresUpdatedFallback: string;
2926
+ };
2927
+
2928
+ interface DisclosureLink {
2929
+ label: string;
2930
+ href: string;
2931
+ }
2932
+
2933
+ interface AcceptDisclosuresWidgetTestIds {
2934
+ root?: string;
2935
+ providerAttribution?: string;
2936
+ disclosureLinks?: string;
2937
+ agreeCheckbox?: string;
2938
+ agreementText?: string;
2939
+ acceptButton?: string;
2940
+ error?: string;
2941
+ }
2942
+ interface AcceptDisclosuresWidgetProps$1 {
2464
2943
  /**
2465
- * Spend-limit reset-period tab labels and notices. Owned here (not UI
2466
- * labels) because the feature layer decides what each opaque period value
2467
- * means.
2944
+ * Attribution line under the title (e.g. “Banking services for Nail It! are
2945
+ * provided by Zenith Bank, Member FDIC.”). Caller supplies emphasis (bold VSP).
2468
2946
  */
2469
- spendLimit: {
2470
- periodOneTime: string;
2471
- periodDaily: string;
2472
- periodMonthly: string;
2473
- oneTimeWarningTitle: string;
2474
- oneTimeWarningDescription: string;
2475
- dailyResetNotice: string;
2476
- monthlyResetNotice: string;
2477
- };
2947
+ providerAttribution: ReactNode;
2948
+ /** Plain agreement copy rendered next to the checkbox. */
2949
+ agreementText: string;
2950
+ disclosureLinks: DisclosureLink[];
2951
+ isAgreed: boolean;
2952
+ onAgreedChange: (checked: boolean) => void;
2953
+ onAccept: () => void;
2954
+ /** Disables the checkbox and Accept control while a submit is in flight. */
2955
+ isSubmitting?: boolean;
2478
2956
  /**
2479
- * Success-screen copy chosen from the create response's `cardStatus`.
2480
- * Active/ready wording lives on the UI defaults; these cover statuses that
2481
- * must not claim the card is already usable.
2957
+ * Keeps the checkbox and Accept control disabled once acceptance is done.
2958
+ * Separate from {@link isSubmitting} so `aria-busy` only means "in flight".
2482
2959
  */
2483
- success: {
2484
- pendingActivationTitle: string;
2485
- pendingActivationDescription: string;
2486
- createdTitle: string;
2487
- createdDescription: string;
2488
- };
2960
+ isAccepted?: boolean;
2961
+ /** Inline error shown under Accept; omit or empty when there is no error. */
2962
+ errorMessage?: string;
2963
+ labels?: PartialDeep$2<AcceptDisclosuresWidgetLabels>;
2964
+ testIds?: AcceptDisclosuresWidgetTestIds;
2489
2965
  }
2490
- declare const CREATE_CARD_FEATURE_LABELS_EN: CreateCardFeatureLabels;
2491
- declare function resolveCreateCardFeatureLabels(overrides?: Partial<{
2492
- toast: Partial<CreateCardFeatureLabels['toast']>;
2493
- untitledFundingAccount: string;
2494
- velocityControlNames: Partial<CreateCardFeatureLabels['velocityControlNames']>;
2495
- spendLimit: Partial<CreateCardFeatureLabels['spendLimit']>;
2496
- success: Partial<CreateCardFeatureLabels['success']>;
2497
- }>): CreateCardFeatureLabels;
2498
2966
 
2499
- type CreateCardWidgetProps = WidgetProviderProps & {
2500
- /** Static card plastic image URL (no overlays). Host / white-label supplied. */
2501
- cardArtSrc: string;
2502
- labels?: PartialDeep$2<CreateCardWidgetLabels>;
2503
- featureLabels?: Partial<{
2504
- toast: Partial<CreateCardFeatureLabels['toast']>;
2505
- untitledFundingAccount: string;
2506
- velocityControlNames: Partial<CreateCardFeatureLabels['velocityControlNames']>;
2507
- spendLimit: Partial<CreateCardFeatureLabels['spendLimit']>;
2508
- success: Partial<CreateCardFeatureLabels['success']>;
2509
- }>;
2510
- className?: string;
2511
- onClose?: () => void;
2512
- onCancel?: () => void;
2513
- /** Fired with the new debit card id after a successful create. */
2514
- onViewCard?: (cardId: string) => void;
2967
+ type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage' | 'testIds';
2968
+ type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
2969
+ /**
2970
+ * Called after the atomic accept succeeds and before init refresh is kicked.
2971
+ * May return a promise — the widget awaits it before locking controls and
2972
+ * refreshing init, so a rejected continuation surfaces as an error and leaves
2973
+ * Accept retryable (and the host gate stays mounted).
2974
+ */
2975
+ onAccepted?: () => void | Promise<void>;
2515
2976
  };
2977
+ type AcceptDisclosuresWidgetProps = WidgetProviderProps & InnerProps;
2516
2978
  /**
2517
- * Self-contained Create Card widget. Issues a debit card via the Embed API and
2518
- * drives setup → preparing → success with sonner toasts for the mutation.
2979
+ * Self-contained AcceptDisclosures widget. Fetches the caller's disclosure
2980
+ * document set (title/url pairs, in presentation order) from
2981
+ * `GET /identity/v1/disclosures` and renders it directly — the host supplies
2982
+ * no document URLs. An empty document list (`NOT_REQUIRED`) still renders
2983
+ * Accept so those invitees can activate. Posts
2984
+ * `POST /api/widget-gateway/disclosure-acceptance` with the version that was
2985
+ * on screen after confirming that version is still in force via the
2986
+ * widget-gateway proxy. A newer published version is refused rather than
2987
+ * accepted unseen. The POST activates the invitee (when they are still
2988
+ * invited) and records acceptance in one transaction, then awaits any
2989
+ * `onAccepted` continuation and kicks a widget-init refresh so host gates
2990
+ * keyed on `INVITED` — or on the disclosure flags — can clear. Auth uses
2991
+ * the normal WidgetToken provider contract — never an APP/M2M bearer. The
2992
+ * widget token identifies the caller on both the disclosures lookup and
2993
+ * the accept; this widget does not take invite-link credentials.
2994
+ *
2995
+ * See `WidgetSuite`, which mounts it as its acceptance state.
2519
2996
  */
2520
- declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
2521
-
2522
- /** Opaque UI format values — mapped to API `DebitCardType` in the feature. */
2523
- declare const CardFormatValue: {
2524
- readonly Virtual: "virtual";
2525
- readonly Physical: "physical";
2526
- };
2527
- type CardFormatValue = (typeof CardFormatValue)[keyof typeof CardFormatValue];
2997
+ declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
2528
2998
 
2529
- /**
2530
- * Every key of `T` optional, recursively, so a consumer can override one nested
2531
- * label without restating its siblings. Defined locally because the repo has no
2532
- * shared deep-partial type and does not depend on `type-fest` — same helper the
2533
- * two card `ui` libs declare.
2534
- */
2999
+ interface AddressFieldGroupLabels {
3000
+ line1: string;
3001
+ line2: string;
3002
+ city: string;
3003
+ state: string;
3004
+ statePlaceholder: string;
3005
+ postalCode: string;
3006
+ country: string;
3007
+ /** Fixed country display value (US-only locale in v1). */
3008
+ countryValue: string;
3009
+ }
3010
+ interface AchFieldGroupLabels {
3011
+ accountHolderName: string;
3012
+ routingNumber: string;
3013
+ accountNumber: string;
3014
+ }
2535
3015
  type PartialDeep$1<T> = {
2536
3016
  [K in keyof T]?: T[K] extends object ? PartialDeep$1<T[K]> : T[K];
2537
3017
  };
2538
- /**
2539
- * Strings this layer produces rather than passes through.
2540
- *
2541
- * They are separate from `CardsListLabels` (the `ui` lib's) because the cells
2542
- * reaching that library are already formatted: the em-dash, the nickname
2543
- * fallback and the "Viewing" prefix are all written *here*, so the UI lib has
2544
- * no key to override them with. `bank-accounts-widget`'s `featureLabels` is the
2545
- * precedent for the split.
2546
- *
2547
- * The status and form-factor maps live here for the same reason. EMBD-4503's
2548
- * amendment put them in `shared/feature` keyed on the generated unions, and the
2549
- * row arrives with `statusLabel` / `typeLabel` resolved — so this is the only
2550
- * layer a consumer could reach them through.
2551
- */
2552
- interface CardsFeatureLabels {
2553
- /**
2554
- * Stands in for a cell the card program carries no value for — credit has no
2555
- * funding account, and a debit card's funding account is unresolvable without
2556
- * the bank-account read scope.
2557
- */
2558
- emptyValue: string;
2559
- /** Name shown for a card with no nickname set. */
2560
- untitledCard: string;
3018
+ interface CounterpartFormSheetLabels {
3019
+ createTitleOrganization: string;
3020
+ createTitleIndividual: string;
3021
+ editTitleOrganization: string;
3022
+ editTitleIndividual: string;
3023
+ createTitleCustomer: string;
3024
+ createTitleVendor: string;
3025
+ editTitleCustomer: string;
3026
+ editTitleVendor: string;
3027
+ createDescriptionCustomer: string;
3028
+ createDescriptionVendor: string;
3029
+ customerTypeHeading: string;
3030
+ vendorTypeHeading: string;
3031
+ businessTypeOption: string;
3032
+ businessTypeHint: string;
3033
+ personTypeOption: string;
3034
+ personTypeHint: string;
3035
+ profileHeading: string;
3036
+ addressHeading: string;
3037
+ customerAddressDescription: string;
3038
+ legalNameLabel: string;
3039
+ businessNameLabel: string;
3040
+ firstNameLabel: string;
3041
+ lastNameLabel: string;
3042
+ titleLabel: string;
3043
+ emailLabel: string;
3044
+ phoneLabel: string;
3045
+ taxIdLabel: string;
3046
+ customerTaxIdHelp: string;
3047
+ vendorTaxIdHelp: string;
3048
+ paymentRemindersLabel: string;
3049
+ paymentRemindersDescription: string;
3050
+ paymentMethodsHeading: string;
3051
+ paymentMethodsDescription: string;
2561
3052
  /**
2562
- * Last-resort name for a funding account with neither a nickname nor an
2563
- * account number to mask. An account with no nickname shows `••••1234`
2564
- * instead, so that two unnamed accounts stay distinguishable — this is only
2565
- * for the case where there is nothing at all to show.
3053
+ * @deprecated Superseded by `ach.accountHolderName`. Kept, and still
3054
+ * mapped in, so a consumer already shipping an override for this
3055
+ * already-published flat key doesn't silently lose it — this package is
3056
+ * published standalone, so removing a public field outright is a breaking
3057
+ * change even when nothing internal still reads it directly.
2566
3058
  */
2567
- untitledFundingAccount: string;
2568
- /** Display copy per card lifecycle status; keys are the generated code terms. */
2569
- cardStatus: Record<CardStatus, string>;
2570
- /** Display copy per card form factor; keys are the generated code terms. */
2571
- cardType: Record<CardType, string>;
3059
+ accountHolderNameLabel?: string;
3060
+ /** @deprecated Superseded by `ach.routingNumber`. See `accountHolderNameLabel`. */
3061
+ routingNumberLabel?: string;
3062
+ /** @deprecated Superseded by `ach.accountNumber`. See `accountHolderNameLabel`. */
3063
+ accountNumberLabel?: string;
3064
+ addAddress: string;
3065
+ cancelButton: string;
3066
+ createButton: string;
3067
+ saveButton: string;
3068
+ address: AddressFieldGroupLabels;
3069
+ ach: AchFieldGroupLabels;
3070
+ }
3071
+ interface BankAccountFormSheetLabels {
3072
+ createTitle: string;
3073
+ editTitle: string;
3074
+ nameLabel: string;
3075
+ accountHolderNameLabel: string;
3076
+ accountNumberLabel: string;
3077
+ routingNumberLabel: string;
3078
+ ibanLabel: string;
3079
+ bicLabel: string;
3080
+ sortCodeLabel: string;
3081
+ currencyLabel: string;
3082
+ currencyPlaceholder: string;
3083
+ countryLabel: string;
3084
+ countryValue: string;
3085
+ isDefaultLabel: string;
3086
+ cancelButton: string;
3087
+ createButton: string;
3088
+ saveButton: string;
2572
3089
  }
2573
-
2574
- interface CardsWidgetPagination {
2575
- /** Cursor for the page on screen. Omit for the first page. */
2576
- paginationToken?: string;
2577
- /** Number of rows requested per page. */
2578
- pageSize: number;
3090
+ interface AddressFormSheetLabels {
3091
+ title: string;
3092
+ cancelButton: string;
3093
+ saveButton: string;
3094
+ address: AddressFieldGroupLabels;
2579
3095
  }
2580
- interface CardsWidgetPaginationInput {
2581
- paginationToken?: string;
2582
- pageSize?: number;
3096
+ interface ConfirmDeleteDialogLabels {
3097
+ confirmButton: string;
3098
+ cancelButton: string;
2583
3099
  }
2584
3100
 
2585
- interface CardsWidgetProps extends WidgetProviderProps {
3101
+ interface NoPolicyBannerLabels {
3102
+ Title: string;
3103
+ Body: string;
2586
3104
  /**
2587
- * Which issuing program the list shows — `'credit'` or `'debit'`.
2588
- *
2589
- * **Required, with no default.** A cards list shows exactly one program, and
2590
- * the value selects the endpoint that is read as well as which scopes gate the
2591
- * affordances. Defaulting it would make the choice invisible at the call site
2592
- * and would silently pick a program for a host that meant the other one.
3105
+ * Heading for an org that *has* rules, none of which this editor can show. The
3106
+ * plain `Title` would contradict the notice sitting directly above it, which
3107
+ * has just said how many rules exist.
2593
3108
  */
2594
- cardProgram: CardProgram;
3109
+ TitleWithUnlistedRules: string;
3110
+ /** Body for that case. The notice above already explains the why. */
3111
+ BodyWithUnlistedRules: string;
3112
+ CreateRule: string;
3113
+ }
3114
+
3115
+ interface NoPolicyBannerTestIds {
3116
+ root?: string;
3117
+ createRuleButton?: string;
3118
+ /** The disabled-reason wrapper shown in place of the button. */
3119
+ createRuleBlocked?: string;
3120
+ }
3121
+ interface NoPolicyBannerProps {
3122
+ onCreateRule: () => void;
3123
+ disabled?: boolean;
2595
3124
  /**
2596
- * Controlled cursor/page-size metadata. Supply with `onPaginationChange` when
2597
- * a host owns the list position, e.g. URL-backed pagination.
3125
+ * Why Create rule is off, shown on hover and on keyboard focus. Omit it for the
3126
+ * transient reasons that explain themselves on screen (a write in flight).
2598
3127
  */
2599
- pagination?: CardsWidgetPaginationInput;
3128
+ createRuleDisabledReason?: string;
2600
3129
  /**
2601
- * Initial cursor/page-size metadata for uncontrolled usage. Omit for first
2602
- * page with the default page size. Ignored when `pagination` is supplied.
3130
+ * Whether the org has rules that simply are not shown here. Switches the copy
3131
+ * off the "none created yet" claim, which would contradict the notice that
3132
+ * sits above this banner and has just counted them.
2603
3133
  */
2604
- defaultPagination?: CardsWidgetPaginationInput;
3134
+ hasUnlistedRules?: boolean;
3135
+ labels?: Partial<NoPolicyBannerLabels>;
3136
+ testIds?: NoPolicyBannerTestIds;
3137
+ }
3138
+
3139
+ interface GapCoverageAlertLabels {
3140
+ Title: string;
3141
+ Footer: string;
3142
+ }
3143
+
3144
+ /**
3145
+ * One uncovered bill-amount range. `label` is pre-formatted by the caller
3146
+ * (e.g. "$10.01 to $99.99" or "$500.01 or more") — this component renders it
3147
+ * as-is rather than composing range/currency copy itself.
3148
+ */
3149
+ interface GapRange {
3150
+ id: string;
3151
+ label: string;
2605
3152
  /**
2606
- * Called whenever the widget changes its cursor/page-size pair through pagination
2607
- * controls or a cursor-invalidating reset such as page-size changes. Hosts that
2608
- * persist list position should store this whole object, not the token alone.
3153
+ * Why a new rule cannot take this range, for the link's tooltip. A range can be
3154
+ * uncovered today and still be spoken for — a rule whose schedule has not
3155
+ * started covers nothing yet but claims its range — in which case starting a
3156
+ * rule here only ever ends in a rejected save. Omit for a range that is free.
2609
3157
  */
2610
- onPaginationChange?: (pagination: CardsWidgetPagination) => void;
3158
+ blockedReason?: string;
3159
+ }
3160
+ interface GapCoverageAlertTestIds {
3161
+ root?: string;
3162
+ }
3163
+ interface GapCoverageAlertProps {
3164
+ gaps: GapRange[];
3165
+ onSelectGap: (id: string) => void;
3166
+ disabled?: boolean;
3167
+ labels?: Partial<GapCoverageAlertLabels>;
3168
+ testIds?: GapCoverageAlertTestIds;
3169
+ }
3170
+
3171
+ /**
3172
+ * Overridable validation / error messages produced by the counterparts feature
3173
+ * layer and surfaced through each form's `errors` prop. Consumers override via
3174
+ * the widget's `messageLabels` prop, merged over {@link COUNTERPART_MESSAGE_LABELS_EN}.
3175
+ */
3176
+ interface CounterpartMessageLabels {
3177
+ legalNameRequired: string;
3178
+ firstNameRequired: string;
3179
+ lastNameRequired: string;
3180
+ emailRequired: string;
3181
+ emailInvalid: string;
3182
+ addressLine1Required: string;
3183
+ cityRequired: string;
3184
+ stateRequired: string;
3185
+ postalCodeRequired: string;
3186
+ bankAccountNameRequired: string;
3187
+ bankAccountIdentifierRequired: string;
3188
+ bankAccountCurrencyRequired: string;
3189
+ accountHolderNameRequired: string;
3190
+ routingNumberInvalid: string;
3191
+ accountNumberInvalid: string;
3192
+ vatIdValueRequired: string;
3193
+ /** Shown for a non-field-specific submit failure. */
3194
+ genericError: string;
3195
+ /** Delete confirmation title; `{name}` is replaced with the entity name. */
3196
+ deleteTitle: string;
3197
+ deleteCounterpartMessage: string;
3198
+ deleteSubEntityMessage: string;
3199
+ }
3200
+
3201
+ /**
3202
+ * Action handlers for custom payment flows in payable operations.
3203
+ *
3204
+ * These handlers provide fine-grained control over payment workflows, allowing customers to:
3205
+ * - Integrate external payment providers
3206
+ * - Implement custom approval processes or multi-step authentication
3207
+ * - Add specialized banking solutions or enterprise payment workflows
3208
+ * - Control UI feedback and data refresh timing after payment completion
3209
+ *
3210
+ * @example Custom payment provider integration:
3211
+ * ```typescript
3212
+ * const onPay = (id: string, _data?: unknown, actions?: PayActionHandlers) => {
3213
+ * // Start custom payment flow
3214
+ * initiatePayment(id)
3215
+ * .then(() => {
3216
+ * // Payment successful - update SDK state and show success message
3217
+ * actions?.resolve({ showToast: true });
3218
+ * })
3219
+ * .catch((error) => {
3220
+ * // Payment failed - update SDK state and show error message
3221
+ * actions?.reject(error, { showToast: true });
3222
+ * });
3223
+ * };
3224
+ * ```
3225
+ */
3226
+ type PayActionHandlers = {
2611
3227
  /**
2612
- * Overrides for the list's own copy, merged per nested group. Typed with the
2613
- * `ui` lib's own deep-partial helper (each labels module declares one — the
2614
- * repo has no shared version) so this prop follows that library's contract.
3228
+ * Call when a custom payment flow has been successfully initiated/completed.
3229
+ * This triggers SDK's built-in state management: refreshes payable data,
3230
+ * payment records, and optionally displays success feedback to the user.
3231
+ *
3232
+ * @param options.showToast - Whether to display a success toast notification
2615
3233
  */
2616
- labels?: PartialDeep$4<CardsListLabels>;
3234
+ resolve: (options?: {
3235
+ showToast?: boolean;
3236
+ }) => void;
2617
3237
  /**
2618
- * Overrides for the copy this layer produces rather than passes through — the
2619
- * status and form-factor vocabulary, the empty-cell placeholder, the nickname
2620
- * fallbacks, and the pagination range prefix. Separate from `labels` because
2621
- * the list library receives those values already formatted and so has no key
2622
- * for them; `BankAccountsWidget.featureLabels` is the same split.
3238
+ * Call when a custom payment flow failed or was cancelled by the user.
3239
+ * This triggers SDK's built-in state management: refreshes payable data,
3240
+ * payment records, and optionally displays error feedback to the user.
3241
+ *
3242
+ * @param error - Optional error details from the failed payment attempt
3243
+ * @param options.showToast - Whether to display an error toast notification
2623
3244
  */
2624
- featureLabels?: PartialDeep$1<CardsFeatureLabels>;
3245
+ reject: (error?: unknown, options?: {
3246
+ showToast?: boolean;
3247
+ }) => void;
3248
+ };
3249
+
3250
+ type UsePayableDetailsProps = {
2625
3251
  /**
2626
- * The card whose details panel is open. Supply with `onSelectedCardIdChange`
2627
- * when the host owns that state — a deep-linked `/cards/[id]`, say. `null`
2628
- * closes the panel; omit the prop for uncontrolled behaviour.
2629
- *
2630
- * Pinning it to `null` and navigating from `onSelectedCardIdChange` is how a
2631
- * host suppresses the built-in panel entirely and owns navigation itself: the
2632
- * click is still reported, and because the value never comes back non-null,
2633
- * nothing ever opens.
3252
+ * The ID of the payable
2634
3253
  */
2635
- selectedCardId?: string | null;
2636
- /** Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. */
2637
- defaultSelectedCardId?: string | null;
3254
+ id?: string;
3255
+ /** when provided it takes precedence over component settings */
3256
+ enableGLCodes?: boolean;
3257
+ /** when provided it makes the payable open in edit mode */
3258
+ shouldOpenInEditMode?: boolean;
2638
3259
  /**
2639
- * Called whenever the open card changes, including on close (`null`).
3260
+ * Callback function that is called when the payable is saved
2640
3261
  *
2641
- * Supplying it does **not** change what renders — a host can observe row clicks
2642
- * for analytics, or mirror the selection into a query param, and still get the
2643
- * built-in panel. (The removed `onCardSelect` could not: its presence
2644
- * suppressed the panel, so those two intents were unexpressible together.)
3262
+ * @param {string} id - The ID of the payable
3263
+ *
3264
+ * @returns {void}
2645
3265
  */
2646
- onSelectedCardIdChange?: (cardId: string | null) => void;
3266
+ onSaved?: (id: string) => void;
2647
3267
  /**
2648
- * Label overrides forwarded into the nested card details panel, mirroring
2649
- * `BankAccountsWidgetProps.accountDetailsLabels`.
3268
+ * Callback function that is called when the payable is canceled
2650
3269
  *
2651
- * Derived from the receiving prop rather than restated, so the forwarded and
2652
- * received types cannot drift. Naming the panel's labels type directly is not
2653
- * an option anyway: a cross-widget `type:ui` import is banned by
2654
- * `EMBEDDED_DEP_CONSTRAINTS`, and this indexed access reaches it through the
2655
- * sanctioned feature → feature edge without re-exporting anything. It already
2656
- * carries `card-details-widget`'s own deep partial, so no wrapper here.
3270
+ * @param {string} id - The ID of the payable
3271
+ *
3272
+ * @returns {void}
2657
3273
  */
2658
- cardDetailsLabels?: CardDetailsWidgetProps['labels'];
3274
+ onCanceled?: (id: string) => void;
2659
3275
  /**
2660
- * Overrides for the copy the panel's *feature* layer resolves — its status
2661
- * vocabulary, form-factor wording, program label and copy-success toast.
3276
+ * Callback function that is called when the payable is submitted
2662
3277
  *
2663
- * Distinct from `featureLabels`, which covers the list's own vocabulary.
2664
- * Without this prop the panel is unreachable for that copy, so a host that
2665
- * renames a status in the list would still read the default inside the panel.
3278
+ * @param {string} id - The ID of the payable
3279
+ *
3280
+ * @returns {void}
2666
3281
  */
2667
- cardDetailsFeatureLabels?: CardDetailsWidgetProps['featureLabels'];
3282
+ onSubmitted?: (id: string) => void;
2668
3283
  /**
2669
- * Bank logo for the details panel's card face. Forwarded verbatim; the panel
2670
- * renders no logo without it, so omitting these leaves the built-in sheet
2671
- * showing a logo-less card rather than a placeholder.
3284
+ * Callback function that is called when the payable is rejected
3285
+ *
3286
+ * @param {string} id - The ID of the payable
2672
3287
  *
2673
- * These stay props because the package ships no bank artwork and resolves none
2674
- * from the init response (PLAT-1179, embedded ADR 0005).
3288
+ * @returns {void}
2675
3289
  */
2676
- bankLogoSrc?: string;
2677
- bankLogoAlt?: string;
3290
+ onRejected?: (id: string) => void;
2678
3291
  /**
2679
- * Plastic art for the built-in debit create sheet. Forwarded verbatim into
2680
- * nested `CreateCardWidget`. Required for that sheet: omitting it (with no
2681
- * host `onCreateCard`) hides Create card rather than opening a panel that
2682
- * cannot render. Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package
2683
- * ships no card artwork.
3292
+ * Callback function that is called when the payable is approved
3293
+ *
3294
+ * @param {string} id - The ID of the payable
3295
+ *
3296
+ * @returns {void}
2684
3297
  */
2685
- cardArtSrc?: string;
2686
- /**
2687
- * Label overrides forwarded into the nested create-card panel. Indexed off
2688
- * `CreateCardWidgetProps` so the forwarded and received types cannot drift,
2689
- * the same feature → feature edge as `cardDetailsLabels`.
3298
+ onApproved?: (id: string) => void;
3299
+ /** Callback function that is called when the payable is reopened
3300
+ *
3301
+ * @param {string} id - The ID of the payable
3302
+ *
3303
+ * @returns {void}
2690
3304
  */
2691
- createCardLabels?: CreateCardWidgetProps['labels'];
3305
+ onReopened?: (id: string) => void;
3306
+ /** Callback function that is called when the payable is deleted
3307
+ *
3308
+ * @param {string} id - The ID of the payable
3309
+ *
3310
+ * @returns {void}
3311
+ */
3312
+ onDeleted?: (id: string) => void;
2692
3313
  /**
2693
- * Overrides for the copy the create panel's *feature* layer resolves — mutation
2694
- * toasts, the untitled funding-account fallback, and pending-activation success
2695
- * copy.
3314
+ * Callback function that is called when the user press the Pay button
3315
+ *
3316
+ * @param {string} id - The ID of the payable
3317
+ *
3318
+ * @returns {void}
2696
3319
  */
2697
- createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
3320
+ onPay?: (id: string, _data?: unknown, actions?: PayActionHandlers) => void;
3321
+ };
3322
+
3323
+ type PayablesProps = {
3324
+ pageTitleComponent: (children: ReactNode) => ReactNode;
2698
3325
  /**
2699
- * Called when Create card is clicked. When supplied, the host owns the
2700
- * gesture: the built-in debit sheet does **not** open. Omit it on a debit list
2701
- * with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
2702
- * no in-package issuance widget, so credit Create card still requires this
2703
- * callback — omitting it hides the button rather than offering a control that
2704
- * does nothing.
3326
+ * Enable GL code selection for payable line items.
3327
+ * When true, users can assign GL codes to individual line items.
3328
+ * GL codes are fetched from the connected accounting system.
2705
3329
  */
2706
- onCreateCard?: () => void;
3330
+ enableGLCodes?: boolean;
3331
+ /** Arrival prop: 'create' opens the create-bill dialog on mount. */
3332
+ initialView?: 'create';
3333
+ /** Arrival prop: preselects this counterpart in the create-bill form. */
3334
+ initialCounterpartId?: string;
3335
+ } & Partial<Pick<UsePayableDetailsProps, 'onSaved' | 'onCanceled' | 'onSubmitted' | 'onRejected' | 'onApproved' | 'onReopened' | 'onDeleted' | 'onPay'>>;
3336
+
3337
+ type ReceivablesProps = {
3338
+ pageTitleComponent: (children: ReactNode) => ReactNode;
2707
3339
  /**
2708
- * Called with the card's id when a row's Activate button is clicked. The button
2709
- * renders only on cards in `PENDING_ACTIVATION`, and only when the widget token
2710
- * also holds the program's activate scope.
2711
- *
2712
- * Host-owned for the same reason as `onCreateCard`: EMBD-4398 designs no
2713
- * activation flow, and `POST /debit-cards/{id}/activate` does not exist even
2714
- * though `debit_card:activate:org` does — so a built-in flow could serve only
2715
- * one of the two programs.
3340
+ * Display name of the sponsor bank that powers embedded bank accounts, e.g.
3341
+ * "Zenith Bank". Shown next to embedded accounts as "Powered by
3342
+ * {embeddedBankName}" in the invoice payment account picker, on both the
3343
+ * create and the edit form.
2716
3344
  */
2717
- onActivateCard?: (cardId: string) => void;
3345
+ embeddedBankName?: string;
3346
+ /** Arrival prop: 'create' opens the create-invoice dialog on mount. */
3347
+ initialView?: 'create';
3348
+ /** Arrival prop: preselects this counterpart in the create-invoice form. */
3349
+ initialCounterpartId?: string;
3350
+ };
3351
+
3352
+ type ALIGN_DIALOG_TYPES = 'left' | 'right';
3353
+ declare module '@mui/material/transitions' {
3354
+ interface TransitionProps {
3355
+ alignDialog?: ALIGN_DIALOG_TYPES;
3356
+ }
2718
3357
  }
3358
+
3359
+ type BillPayWidgetMoniteProps = MoniteRegionProviderProps & Omit<PayablesProps, 'pageTitleComponent'> & {
3360
+ pageTitleComponent?: PayablesProps['pageTitleComponent'];
3361
+ };
3362
+
3363
+ type BillPayWidgetProps = BillPayWidgetMoniteProps & {
3364
+ /** Bank shown as "Powered by {bank}" next to the source account when paying a bill. Native implementation only; ignored under `monite`. */
3365
+ poweredByBankName?: string;
3366
+ };
2719
3367
  /**
2720
- * The cards list widget: one page of an organization's credit or debit cards,
2721
- * with scope-gated Show my cards, Create card and per-row Activate affordances.
2722
- *
2723
- * Selecting a row opens that card's read-only details in a sheet, composed from
2724
- * `CardDetailsWidget` over the sanctioned feature → feature edge. Which card is
2725
- * open is a controllable value (`selectedCardId` / `defaultSelectedCardId` /
2726
- * `onSelectedCardIdChange`) so a host can deep-link into it, mirror it into a
2727
- * query param, or take navigation over entirely — the widget itself reads no
2728
- * router and no search params.
3368
+ * BillPay widget entry point — selects the rendering implementation.
2729
3369
  *
2730
- * On a debit list with `cardArtSrc`, Create card opens the same sheet with
2731
- * nested `CreateCardWidget`. A host `onCreateCard` still takes over that
2732
- * gesture (credit, or a custom debit flow). The two panels are mutually
2733
- * exclusive: opening one closes the other. Success **View card** selects the
2734
- * new debit card so its details open.
3370
+ * BillPay is deliberately **pinned to `monite`** until the Tesouro-native
3371
+ * (shadcn) build reaches parity (epic EMBD-2171;
3372
+ * `docs/billpay-usification-shadcn/technical-design.md` §2). `native` is the
3373
+ * global default across widgets, so BillPay applies its own `monite` fallback
3374
+ * whenever *nothing* selects an implementation — this is what keeps the native
3375
+ * build off by default.
2735
3376
  *
2736
- * A pure provider wrapper — every hook lives in `CardsWidgetInner` so it runs
2737
- * inside `WidgetProvider`'s subtree, which is what the data-access hooks read
2738
- * their client, org and token from.
3377
+ * An explicit selection is still honored, whether it comes from this widget's
3378
+ * `implementation` prop or from the provider/global cascade
3379
+ * (`RootWidgetProvider implementation="native"`, `setGlobalWidgetConfig`). We
3380
+ * read the *raw* cascade value (undefined when unset) rather than the resolved
3381
+ * one so the global `native` default does not leak past the pin. The cutover is
3382
+ * a one-line change: drop the `monite` fallback once native is at parity.
2739
3383
  */
2740
- declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CardsWidgetProps): React.JSX.Element;
3384
+ declare function BillPayWidget({ implementation, ...props }: BillPayWidgetProps): React.JSX.Element;
2741
3385
 
2742
3386
  /**
2743
3387
  * Co-located user-facing strings for the counterparts widget UI. Each component
@@ -2859,7 +3503,7 @@ interface CounterpartsWidgetOwnProps {
2859
3503
  */
2860
3504
  onViewAllDocuments?: () => void;
2861
3505
  screenLabels?: Partial<CounterpartsScreenLabels>;
2862
- formLabels?: PartialDeep$5<CounterpartFormSheetLabels>;
3506
+ formLabels?: PartialDeep$1<CounterpartFormSheetLabels>;
2863
3507
  detailsLabels?: Partial<CounterpartDetailsSheetLabels>;
2864
3508
  bankAccountLabels?: Partial<BankAccountFormSheetLabels>;
2865
3509
  addressLabels?: Partial<AddressFormSheetLabels>;
@@ -2889,7 +3533,7 @@ type CounterpartsWidgetProps = WidgetProviderProps & CounterpartsWidgetOwnProps;
2889
3533
  */
2890
3534
  declare function CounterpartsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element;
2891
3535
 
2892
- interface Labels$4 {
3536
+ interface Labels$3 {
2893
3537
  description: string;
2894
3538
  receiptsTab: string;
2895
3539
  matchingTab: string;
@@ -2923,7 +3567,7 @@ interface UploadReceiptWidgetProps {
2923
3567
  declare function UploadReceiptWidget({ emailAddress, onFileUpload, onAwaitMatching, isUploading, }: UploadReceiptWidgetProps): React.JSX.Element;
2924
3568
 
2925
3569
  interface ExpenseManagementWidgetProps extends WidgetProviderProps {
2926
- labels?: Partial<Labels$4>;
3570
+ labels?: Partial<Labels$3>;
2927
3571
  receiptUpload?: UploadReceiptWidgetProps;
2928
3572
  receiptsContent?: ReactNode;
2929
3573
  matchingContent?: ReactNode;
@@ -2949,138 +3593,13 @@ type ExpenseApprovalPoliciesWidgetProps = WidgetProviderProps & {
2949
3593
  };
2950
3594
  declare function ExpenseApprovalPoliciesWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, providerLabels, }?: ExpenseApprovalPoliciesWidgetProps): React.JSX.Element;
2951
3595
 
2952
- type ExpenseRequirementsWidgetProps = WidgetProviderProps & {
2953
- /** @deprecated Use `widgetToken` instead */
2954
- token?: string | null;
2955
- /** @deprecated Use `organizationId` instead */
2956
- orgId?: string | null;
2957
- };
2958
- declare function ExpenseRequirementsWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, providerLabels, }?: ExpenseRequirementsWidgetProps): React.JSX.Element;
2959
-
2960
- interface BalancesWidgetLabels {
2961
- /** Card header title (e.g. next to the building icon) */
2962
- widgetTitle: string;
2963
- /** Shown under the total amount */
2964
- totalAvailableBalance: string;
2965
- /** Full explanation shown in the info tooltip */
2966
- totalAvailableBalanceTooltip: string;
2967
- /** Short label for the info control (e.g. `aria-label`) */
2968
- totalAvailableBalanceInfoAriaLabel: string;
2969
- /** CTA to open the full accounts list */
2970
- viewAllAccounts: string;
2971
- /** Shown when there are no balances to list */
2972
- noBalancesFound: string;
2973
- /** Shown when the bank account request failed */
2974
- loadErrorTitle: string;
2975
- loadErrorDescription: string;
2976
- /** Label for retry after a failed load */
2977
- loadErrorRetry: string;
2978
- }
2979
- declare const BALANCES_WIDGET_LABELS_EN: BalancesWidgetLabels;
2980
-
2981
- interface BalancesWidgetWithContextProps {
2982
- /**
2983
- * Maximum number of account rows to render in-card. Anything beyond this
2984
- * cap is reachable only via the View-all CTA. Default 5.
2985
- */
2986
- maxAccounts?: number;
2987
- labels?: Partial<BalancesWidgetLabels>;
2988
- onBalanceRowClick?: (accountId: string) => void;
2989
- onViewAllAccountsClick?: () => void;
2990
- }
2991
- type BalancesWidgetPassthroughProps = Pick<BalancesWidgetWithContextProps, 'maxAccounts' | 'labels' | 'onBalanceRowClick' | 'onViewAllAccountsClick'>;
2992
- interface BalancesWidgetProps extends WidgetProviderProps, BalancesWidgetPassthroughProps {
2993
- }
2994
- declare function BalancesWidget({ maxAccounts, labels, onBalanceRowClick, onViewAllAccountsClick, ...widgetProviderProps }: BalancesWidgetProps): React.JSX.Element;
2995
-
2996
- interface InsightsWidgetLabels {
2997
- widgetTitle: string;
2998
- activeTab: string;
2999
- dismissedTab: string;
3000
- noInsightsFound: string;
3001
- loadErrorTitle: string;
3002
- loadErrorDescription: string;
3003
- loadErrorRetry: string;
3004
- }
3005
- declare const INSIGHTS_WIDGET_LABELS_EN: InsightsWidgetLabels;
3006
-
3007
- /**
3008
- * Presentational model for one insight row — screen-shaped only (no domain ids or types).
3009
- */
3010
- interface InsightRowView {
3011
- displayText: string;
3012
- createdDate: string;
3013
- badgeLabel: string;
3014
- badgeIcon: ReactElement;
3015
- showDismissButton: boolean;
3016
- showToggle: boolean;
3017
- toggleLabel?: string;
3018
- /** Required when `onToggle` is set — owner-controlled switch state. */
3019
- toggleChecked?: boolean;
3020
- onToggle?: (checked: boolean) => void;
3021
- navigationLinkText?: string;
3022
- onNavigationClick?: () => void;
3023
- actionText?: string;
3024
- onActionClick?: () => void;
3025
- }
3026
-
3027
- interface SingleInsightLabels {
3028
- dismissInsightAriaLabel: string;
3029
- }
3030
- declare const SINGLE_INSIGHT_LABELS_EN: SingleInsightLabels;
3031
-
3032
- interface InsightsFeatureLabels {
3033
- onboardingBadgeLabel: string;
3034
- routingOnboardingText: string;
3035
- enableRoutingToggle: string;
3036
- createAccountText: string;
3037
- connectExternalText: string;
3038
- linkAccountAction: string;
3039
- verifyExternalAccountText: (nickname: string) => string;
3040
- }
3041
- declare const INSIGHTS_FEATURE_LABELS_EN: InsightsFeatureLabels;
3042
-
3043
- /** Domain model for one generated insight — stays in the feature layer only. */
3044
- interface InsightItem {
3045
- id: string;
3046
- isDismissed: boolean;
3047
- showToggle: boolean;
3048
- canDismiss: boolean;
3049
- displayText: string;
3050
- toggleLabel?: string;
3051
- toggleChecked?: boolean;
3052
- onToggle?: (checked: boolean) => void;
3053
- actionText?: string;
3054
- onActionClick?: () => void;
3055
- }
3056
-
3057
- declare function mapInsightToRowView(insight: InsightItem, labels: InsightsFeatureLabels, createdDate: string): InsightRowView;
3058
-
3059
- interface SingleInsightProps {
3060
- insight: InsightItem;
3061
- createdDate: string;
3062
- featureLabels: Parameters<typeof mapInsightToRowView>[1];
3063
- onDismissClick: (id: string) => void;
3064
- labels?: Partial<SingleInsightLabels>;
3065
- }
3066
- declare const SingleInsight: ({ insight, createdDate, featureLabels, onDismissClick, labels, }: SingleInsightProps) => React.JSX.Element;
3067
-
3068
- interface InsightsWidgetInternalProps {
3069
- labels?: Partial<InsightsWidgetLabels>;
3070
- singleInsightLabels?: Parameters<typeof SingleInsight>[0]['labels'];
3071
- }
3072
- interface InsightsWidgetWithContextProps {
3073
- labels?: Partial<InsightsWidgetLabels>;
3074
- singleInsightLabels?: InsightsWidgetInternalProps['singleInsightLabels'];
3075
- featureLabels?: Partial<InsightsFeatureLabels>;
3076
- routingEnabled?: boolean;
3077
- onRoutingToggleChange?: (enabled: boolean) => void;
3078
- onLinkExternalAccountClick?: () => void;
3079
- }
3080
- type InsightsWidgetPassthroughProps = Pick<InsightsWidgetWithContextProps, 'labels' | 'singleInsightLabels' | 'featureLabels' | 'routingEnabled' | 'onRoutingToggleChange' | 'onLinkExternalAccountClick'>;
3081
- interface InsightsWidgetProps extends WidgetProviderProps, InsightsWidgetPassthroughProps {
3082
- }
3083
- declare function InsightsWidget({ labels, singleInsightLabels, featureLabels, routingEnabled, onRoutingToggleChange, onLinkExternalAccountClick, ...widgetProviderProps }: InsightsWidgetProps): React.JSX.Element;
3596
+ type ExpenseRequirementsWidgetProps = WidgetProviderProps & {
3597
+ /** @deprecated Use `widgetToken` instead */
3598
+ token?: string | null;
3599
+ /** @deprecated Use `organizationId` instead */
3600
+ orgId?: string | null;
3601
+ };
3602
+ declare function ExpenseRequirementsWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, providerLabels, }?: ExpenseRequirementsWidgetProps): React.JSX.Element;
3084
3603
 
3085
3604
  /**
3086
3605
  * Co-located user-facing strings for every chart-of-accounts surface: the table,
@@ -3846,7 +4365,7 @@ type ReceivablesWidgetProps = WidgetProviderProps & ReceivablesWidgetOwnProps;
3846
4365
 
3847
4366
  declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
3848
4367
 
3849
- interface Labels$3 {
4368
+ interface Labels$2 {
3850
4369
  title: string;
3851
4370
  connectButton: string;
3852
4371
  verifyCtaButton: string;
@@ -3914,7 +4433,7 @@ interface Labels$3 {
3914
4433
  emptyDescription: string;
3915
4434
  }
3916
4435
 
3917
- interface FeatureLabels$4 {
4436
+ interface FeatureLabels$2 {
3918
4437
  accountFallback: string;
3919
4438
  accountLabel: string;
3920
4439
  pendingStatus: string;
@@ -3923,8 +4442,8 @@ interface FeatureLabels$4 {
3923
4442
  }
3924
4443
 
3925
4444
  interface LinkedAccountsWidgetProps extends WidgetProviderProps {
3926
- labels?: Partial<Labels$3>;
3927
- featureLabels?: Partial<FeatureLabels$4>;
4445
+ labels?: Partial<Labels$2>;
4446
+ featureLabels?: Partial<FeatureLabels$2>;
3928
4447
  }
3929
4448
  declare function LinkedAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: LinkedAccountsWidgetProps): React.JSX.Element;
3930
4449
 
@@ -4329,7 +4848,7 @@ type ProductsWidgetProps = WidgetProviderProps & ProductsWidgetOwnProps;
4329
4848
  */
4330
4849
  declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ProductsWidgetProps): React.JSX.Element;
4331
4850
 
4332
- interface Labels$2 {
4851
+ interface Labels$1 {
4333
4852
  loadingLabel: string;
4334
4853
  errorLabel: string;
4335
4854
  /**
@@ -4342,7 +4861,7 @@ interface Labels$2 {
4342
4861
  contactLinkText: string;
4343
4862
  }
4344
4863
 
4345
- interface FeatureLabels$3 {
4864
+ interface FeatureLabels$1 {
4346
4865
  personalTab: string;
4347
4866
  businessTab: string;
4348
4867
  subtitle: string;
@@ -4357,8 +4876,8 @@ interface FeatureLabels$3 {
4357
4876
  }
4358
4877
 
4359
4878
  interface ProfileWidgetProps extends WidgetProviderProps {
4360
- labels?: Partial<Labels$2>;
4361
- featureLabels?: Partial<FeatureLabels$3>;
4879
+ labels?: Partial<Labels$1>;
4880
+ featureLabels?: Partial<FeatureLabels$1>;
4362
4881
  /**
4363
4882
  * Where the "to change this information, contact your bank" line links (a
4364
4883
  * support page URL or a `mailto:`). Left unset, the card shows the plain
@@ -4370,118 +4889,6 @@ interface ProfileWidgetProps extends WidgetProviderProps {
4370
4889
  }
4371
4890
  declare function ProfileWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ProfileWidgetProps): React.JSX.Element;
4372
4891
 
4373
- interface Labels$1 {
4374
- description?: string;
4375
- }
4376
-
4377
- interface SettingsWidgetSection {
4378
- id: string;
4379
- label: string;
4380
- content: ReactNode;
4381
- }
4382
-
4383
- interface FeatureLabels$2 {
4384
- profileSection: string;
4385
- teamSection: string;
4386
- invoiceSection: string;
4387
- billPaySection: string;
4388
- accountingSection: string;
4389
- tagsSection: string;
4390
- expenseSection: string;
4391
- helpSection: string;
4392
- expenseApprovalsTab: string;
4393
- expenseRequirementsTab: string;
4394
- }
4395
-
4396
- /**
4397
- * The sections this widget renders itself. These ids are the public vocabulary
4398
- * a host uses to deep-link into a section, so they are part of the package's
4399
- * API surface — renaming one is a breaking change.
4400
- */
4401
- declare const SettingsSection: {
4402
- readonly Profile: "profile";
4403
- readonly Team: "team";
4404
- readonly Invoice: "invoice";
4405
- readonly Expense: "expense";
4406
- readonly BillPay: "bill-pay";
4407
- readonly Accounting: "accounting";
4408
- readonly Tags: "tags";
4409
- readonly Help: "help";
4410
- };
4411
- type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection];
4412
- /**
4413
- * A selectable section id: one of the built-ins, or the id of a host-supplied
4414
- * {@link SettingsWidgetAdditionalSection}. The `string & {}` arm keeps the
4415
- * built-in literals visible to editor autocomplete while still accepting a
4416
- * host's own id.
4417
- */
4418
- type SettingsWidgetSectionId = SettingsSection | (string & {});
4419
- /**
4420
- * A section contributed by the host, rendered alongside the built-in ones.
4421
- *
4422
- * This exists for surfaces the published package cannot own — the white-label
4423
- * dashboard's password management, for instance, which is an app-auth concern
4424
- * rather than an embedded one. Prefer the `*Content` props when replacing the
4425
- * content of a section that already exists.
4426
- */
4427
- interface SettingsWidgetAdditionalSection extends SettingsWidgetSection {
4428
- /**
4429
- * Place this section immediately after the named built-in one. Sections with
4430
- * no `after` — and those whose anchor is hidden by scope gating — are
4431
- * appended to the end of the list.
4432
- */
4433
- after?: SettingsSection;
4434
- }
4435
-
4436
- interface SettingsWidgetProps extends MoniteRegionProviderProps {
4437
- labels?: Partial<Labels$1>;
4438
- featureLabels?: Partial<FeatureLabels$2>;
4439
- /** Forwarded to the embedded Team section's {@link TeamWidget} — the
4440
- * allowlisted URL invite emails link to. Defaults to
4441
- * `${window.location.origin}/accept-invite`; set it when the host app's
4442
- * registered landing route differs from that default, or the origin is
4443
- * not on the OIDC redirect-URI allowlist (preview/localhost). */
4444
- acceptInviteRedirectUri?: string;
4445
- /** Forwarded to the embedded Help section's {@link HelpWidget} — where its
4446
- * "Contact Us" line links (a support page URL or a `mailto:`). The line is
4447
- * hidden entirely when unset, since the package has no tenant-agnostic
4448
- * support address to fall back on. The bank name in that line comes from
4449
- * widget init, so this is the only value a host needs to supply. */
4450
- helpContactUrl?: string;
4451
- /** Forwarded to the embedded Profile section's {@link ProfileWidget} — where
4452
- * its "to change this information, contact your bank" line links. The line
4453
- * falls back to a plain, unlinked sentence when unset, for the same reason
4454
- * {@link SettingsWidgetProps.helpContactUrl} does. */
4455
- profileContactUrl?: string;
4456
- /** The section to show. Leave unset to let the widget own the selection;
4457
- * supply it (with {@link SettingsWidgetProps.onSelectedSectionChange}) to
4458
- * drive navigation from a route, a search param, or host state. A section
4459
- * hidden by the user's scopes falls back to the first visible one. */
4460
- selectedSection?: SettingsWidgetSectionId;
4461
- /** The section to open on, for a host that wants a deep link without taking
4462
- * ownership of the selection. Ignored when
4463
- * {@link SettingsWidgetProps.selectedSection} is supplied; defaults to the
4464
- * first visible section. Scopes arrive with the init response, so a section
4465
- * this names opens as soon as it becomes visible, and one the user's scopes
4466
- * never grant leaves the first visible section on screen. */
4467
- defaultSelectedSection?: SettingsWidgetSectionId;
4468
- /** Called with the id of the section the user selected. Fires whether or not
4469
- * {@link SettingsWidgetProps.selectedSection} is supplied, so a host can mirror
4470
- * the selection into its URL without taking ownership of it. */
4471
- onSelectedSectionChange?: (section: SettingsWidgetSectionId) => void;
4472
- /** Host-owned sections rendered alongside the built-in ones. */
4473
- additionalSections?: SettingsWidgetAdditionalSection[];
4474
- profileContent?: ReactNode;
4475
- teamContent?: ReactNode;
4476
- billPayContent?: ReactNode;
4477
- helpContent?: ReactNode;
4478
- expenseContent?: ReactNode;
4479
- accountingContent?: ReactNode;
4480
- tagsContent?: ReactNode;
4481
- invoiceContent?: ReactNode;
4482
- }
4483
- declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
4484
-
4485
4892
  /**
4486
4893
  * Co-located user-facing strings for the tags widget UI. Each component takes a
4487
4894
  * `labels?: Partial<…Labels>` prop merged over the matching `*_LABELS_EN` default.
@@ -4694,7 +5101,7 @@ interface Labels {
4694
5101
  }
4695
5102
 
4696
5103
  /** Strings the feature layer bakes into the display-ready view models. */
4697
- interface FeatureLabels$1 {
5104
+ interface FeatureLabels {
4698
5105
  /** Placeholder for fields the API has no value for (role, department, ...). */
4699
5106
  notAvailable: string;
4700
5107
  /** Last sign-in value for members who have never signed in. */
@@ -4802,7 +5209,7 @@ interface FeatureLabels$1 {
4802
5209
 
4803
5210
  interface TeamWidgetProps extends WidgetProviderProps {
4804
5211
  labels?: Partial<Labels>;
4805
- featureLabels?: Partial<FeatureLabels$1>;
5212
+ featureLabels?: Partial<FeatureLabels>;
4806
5213
  /**
4807
5214
  * Absolute URL the accept-invite link in invitation emails points at (sent
4808
5215
  * as `redirectUri` on the identity create-user call, for both invite and
@@ -4817,108 +5224,6 @@ interface TeamWidgetProps extends WidgetProviderProps {
4817
5224
  }
4818
5225
  declare function TeamWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: TeamWidgetProps): React.JSX.Element;
4819
5226
 
4820
- interface TransfersWidgetLabels {
4821
- widgetTitle: string;
4822
- transferMoneyCta: string;
4823
- /** Tooltip when the transfer CTA is disabled for insufficient eligible accounts. */
4824
- transferMoneyCtaDisabledTooltip: string;
4825
- /** Fallback when an account has no nickname in lists or options. */
4826
- accountFallbackName: string;
4827
- /** Mask prefix before last four digits on account options. */
4828
- embeddedAccountMaskPrefix: string;
4829
- /** Prefix before full account number on review cards (e.g. "Account #:"). */
4830
- modalReviewAccountNumberPrefix: string;
4831
- /** Separator between from and to account names in the route line. */
4832
- listAccountsSeparator: string;
4833
- loadErrorTitle: string;
4834
- loadErrorDescription: string;
4835
- loadErrorRetry: string;
4836
- emptyTitle: string;
4837
- emptyDescription: string;
4838
- modalTitle: string;
4839
- /** Shown under the title on the accounts step (e.g. ACH timing). */
4840
- modalAccountsSubtitle: string;
4841
- /** Placeholder inside the From account select on the accounts step. */
4842
- modalFromAccountPlaceholder: string;
4843
- /** Placeholder inside the To account select on the accounts step. */
4844
- modalToAccountPlaceholder: string;
4845
- /** Primary action on the accounts step (legacy: full-width Confirm). */
4846
- modalAccountsConfirm: string;
4847
- modalStepAccounts: string;
4848
- modalStepAmount: string;
4849
- modalStepReview: string;
4850
- modalStepResult: string;
4851
- modalFromLabel: string;
4852
- modalToLabel: string;
4853
- modalAmountLabel: string;
4854
- /** Placeholder for the amount input (e.g. "0.00"). */
4855
- modalAmountPlaceholder: string;
4856
- modalContinue: string;
4857
- modalBack: string;
4858
- modalSubmit: string;
4859
- modalClose: string;
4860
- modalReviewHeading: string;
4861
- modalReviewFromAccountLabel: string;
4862
- modalReviewToAccountLabel: string;
4863
- modalAvailableBalanceCaption: string;
4864
- modalConfirmTransfer: string;
4865
- modalGoBack: string;
4866
- modalSuccessTitle: string;
4867
- modalSuccessDescription: string;
4868
- modalResultSuccessTitle: string;
4869
- modalResultErrorTitle: string;
4870
- modalResultTransferMessagePrefix: string;
4871
- modalResultSuccessMessageSuffix: string;
4872
- modalResultErrorMessageSuffix: string;
4873
- modalBackToTransfers: string;
4874
- modalSelectPlaceholder: string;
4875
- rowStatusCompleted: string;
4876
- rowStatusPending: string;
4877
- rowStatusFailed: string;
4878
- rowTypeInternal: string;
4879
- rowTypeToExternal: string;
4880
- rowTypeFromExternal: string;
4881
- modalAmountInvalidError: string;
4882
- /** Shown under the amount field when the from (embedded) balance is too low. */
4883
- modalInsufficientFundsError: string;
4884
- /** Resets from, to, and amount on the accounts step. */
4885
- modalClearSelections: string;
4886
- modalUnsupportedPairError: string;
4887
- modalSubmitFailedError: string;
4888
- }
4889
- declare const TRANSFERS_WIDGET_LABELS_EN: TransfersWidgetLabels;
4890
-
4891
- interface FeatureLabels {
4892
- unavailableLabel: string;
4893
- routeSeparator: string;
4894
- defaultCurrencyCode: string;
4895
- defaultSecCode: string;
4896
- }
4897
- declare const DEFAULT_FEATURE_LABELS: FeatureLabels;
4898
-
4899
- interface TransfersWidgetPassthroughProps {
4900
- labels?: Partial<TransfersWidgetLabels>;
4901
- featureLabels?: Partial<FeatureLabels>;
4902
- /**
4903
- * Whether the transfer money modal is showing. Supplying it makes the modal
4904
- * controlled: the widget reports every open and close through
4905
- * `onTransferMoneyOpenChange` and changes nothing on screen until the host
4906
- * supplies a new value. Omit to let the widget own it.
4907
- */
4908
- isTransferMoneyOpen?: boolean;
4909
- /** The modal's state on first render, for a host that only wants to seed it. */
4910
- defaultIsTransferMoneyOpen?: boolean;
4911
- /**
4912
- * Called on every open and close — the CTA, the modal's own dismissals, and
4913
- * the close that follows a completed transfer — whether or not the modal is
4914
- * controlled.
4915
- */
4916
- onTransferMoneyOpenChange?: (open: boolean) => void;
4917
- }
4918
- interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps {
4919
- }
4920
- declare function TransfersWidget({ labels, featureLabels, isTransferMoneyOpen, defaultIsTransferMoneyOpen, onTransferMoneyOpenChange, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
4921
-
4922
5227
  /**
4923
5228
  * Public {@link WidgetProvider} — the integrator-facing provider.
4924
5229
  *
@@ -4979,5 +5284,5 @@ interface CheckAmountAndDetailScreenProps {
4979
5284
 
4980
5285
  type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
4981
5286
 
4982
- export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ACCOUNT_DELETE_DIALOG_LABELS_EN, ACCOUNT_FORM_SHEET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, AccountDeleteDialog, AccountFormSheet, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CHART_OF_ACCOUNTS_LABELS_EN, CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, CREATE_CARD_FEATURE_LABELS_EN, CardDetailsWidget, CardFormatValue, CardsWidget, ChartOfAccountsTable, ChartOfAccountsWidget, CounterpartsWidget, CreateCardWidget, ERROR_STATE_ID, ExpenseApprovalPoliciesWidget, ExpenseManagementWidget, ExpenseRequirementsWidget, HELP_FAQ_EN, HELP_WIDGET_LABELS_EN, HelpWidget, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, ProfileWidget, RESULT_LABELS_EN, ReceiptMatchWidget, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TagsWidget, TeamWidget, TransfersWidget, UIFramework, UploadReceiptWidget, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, resolveCreateCardFeatureLabels, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken };
4983
- export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccountDeleteDialogLabels, AccountDeleteDialogProps, Labels$5 as AccountDetailsWidgetLabels, AccountFormErrors, AccountFormMode, AccountFormSheetLabels, AccountFormSheetProps, AccountFormValues, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$5 as BankAccountsWidgetFeatureLabels, Labels$6 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels as CardsWidgetFeatureLabels, CardsListLabels as CardsWidgetLabels, CardsWidgetPagination, CardsWidgetProps, ChartOfAccountsLabels, ChartOfAccountsMessageLabels, ChartOfAccountsTableProps, ChartOfAccountsWidgetLabelProps, ChartOfAccountsWidgetProps, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreateCardFeatureLabels, CreateCardWidgetLabels, CreateCardWidgetProps, DisclosureLinks, EmbeddedClient, ExpenseApprovalPoliciesWidgetProps, Labels$4 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseRequirementsWidgetProps, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, HelpWidgetLabels, HelpWidgetProps, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LedgerAccountRow, LinkComponent, LinkComponentProps, FeatureLabels$4 as LinkedAccountsWidgetFeatureLabels, Labels$3 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetContent, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, FeatureLabels$3 as ProfileWidgetFeatureLabels, Labels$2 as ProfileWidgetLabels, ProfileWidgetProps, ReceiptMatchSummary, ReceiptMatchWidgetProps, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$2 as SettingsWidgetFeatureLabels, Labels$1 as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TagDeleteDialogLabels, TagFormSheetLabels, TagMessageLabels, TagsScreenLabels, TagsWidgetProps, FeatureLabels$1 as TeamWidgetFeatureLabels, Labels as TeamWidgetLabels, TeamWidgetProps, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
5287
+ export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ACCOUNT_DELETE_DIALOG_LABELS_EN, ACCOUNT_FORM_SHEET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, AccountDeleteDialog, AccountFormSheet, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CHART_OF_ACCOUNTS_LABELS_EN, CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, CREATE_CARD_FEATURE_LABELS_EN, CardDetailsWidget, CardFormatValue, CardsWidget, ChartOfAccountsTable, ChartOfAccountsWidget, CounterpartsWidget, CreateCardWidget, ERROR_STATE_ID, ExpenseApprovalPoliciesWidget, ExpenseManagementWidget, ExpenseRequirementsWidget, HELP_FAQ_EN, HELP_WIDGET_LABELS_EN, HelpWidget, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, ProfileWidget, RESULT_LABELS_EN, ReceiptMatchWidget, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TagsWidget, TeamWidget, TransfersWidget, UIFramework, UploadReceiptWidget, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, resolveCreateCardFeatureLabels, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken };
5288
+ export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccountDeleteDialogLabels, AccountDeleteDialogProps, Labels$5 as AccountDetailsWidgetLabels, AccountFormErrors, AccountFormMode, AccountFormSheetLabels, AccountFormSheetProps, AccountFormValues, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$5 as BankAccountsWidgetFeatureLabels, Labels$6 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels as CardsWidgetFeatureLabels, CardsListLabels as CardsWidgetLabels, CardsWidgetPagination, CardsWidgetProps, ChartOfAccountsLabels, ChartOfAccountsMessageLabels, ChartOfAccountsTableProps, ChartOfAccountsWidgetLabelProps, ChartOfAccountsWidgetProps, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreateCardFeatureLabels, CreateCardWidgetLabels, CreateCardWidgetProps, DisclosureLinks, EmbeddedClient, ExpenseApprovalPoliciesWidgetProps, Labels$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 };