@tesouro/embedded-components-react 0.5.78 → 0.5.82

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.
package/dist/index.js CHANGED
@@ -36,7 +36,12 @@ import { TRANSFERS_WIDGET_LABELS_EN as G } from "./libs/tesouro-embedded-compone
36
36
  import { TransfersWidget as K } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js";
37
37
  import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as q } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js";
38
38
  import { AcceptDisclosuresWidget as J } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js";
39
- import { WidgetSuite as Y } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js";
39
+ import { ADDITIONAL_OWNERS_LABELS_EN as Y } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js";
40
+ import { BUSINESS_DETAILS_LABELS_EN as X } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js";
41
+ import { PERSONAL_DETAILS_LABELS_EN as Z } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js";
42
+ import { RESULT_LABELS_EN as Q } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js";
43
+ import { BankAccountOnboardingWidget as $ } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js";
44
+ import { WidgetSuite as ee } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js";
40
45
  import "./lib/WidgetSuite.js";
41
46
  import "./lib/AcceptDisclosuresWidget.js";
42
47
  import "./lib/BankAccountsWidget.js";
@@ -50,13 +55,8 @@ import "./lib/UploadReceiptWidget.js";
50
55
  import "./lib/BalancesWidget.js";
51
56
  import "./lib/InsightsWidget.js";
52
57
  import "./lib/InvoicingWidget.js";
53
- import { LinkedAccountsWidget as X } from "./libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js";
58
+ import { LinkedAccountsWidget as te } from "./libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js";
54
59
  import "./lib/LinkedAccountsWidget.js";
55
- import { ADDITIONAL_OWNERS_LABELS_EN as Z } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js";
56
- import { BUSINESS_DETAILS_LABELS_EN as Q } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js";
57
- import { PERSONAL_DETAILS_LABELS_EN as $ } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js";
58
- import { RESULT_LABELS_EN as ee } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js";
59
- import { BankAccountOnboardingWidget as te } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js";
60
60
  import "./lib/BankAccountOnboardingWidget.js";
61
61
  import { MARKETING_WIDGET_LABELS_EN as ne } from "./libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js";
62
62
  import { MarketingWidget as re } from "./libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index4.js";
@@ -68,4 +68,4 @@ import "./lib/SettingsWidget.js";
68
68
  import "./lib/TransfersWidget.js";
69
69
  import { WidgetProvider as ae } from "./lib/WidgetProviderPublic.js";
70
70
  import "./lib/WidgetProvider.js";
71
- export { q as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Z as ADDITIONAL_OWNERS_LABELS_EN, J as AcceptDisclosuresWidget, j as BALANCES_WIDGET_LABELS_EN, Q as BUSINESS_DETAILS_LABELS_EN, M as BalancesWidget, te as BankAccountOnboardingWidget, T as BankAccountsWidget, D as BillPayWidget, O as CardDetailsWidget, E as CounterpartsWidget, k as CreditCardsWidget, A as DebitCardsWidget, s as ERROR_STATE_ID, V as ExpenseManagementWidget, H as HELP_FAQ_EN, N as INSIGHTS_FEATURE_LABELS_EN, P as INSIGHTS_WIDGET_LABELS_EN, c as Implementation, I as InsightsWidget, L as InvoicingWidget, X as LinkedAccountsWidget, ne as MARKETING_WIDGET_LABELS_EN, re as MarketingWidget, $ as PERSONAL_DETAILS_LABELS_EN, ie as ProductsWidget, ee as RESULT_LABELS_EN, R as ReceivablesWidget, _ as RefreshingRootWidgetProvider, m as RootWidgetProvider, F as SINGLE_INSIGHT_LABELS_EN, z as SettingsSection, U as SettingsWidget, W as TRANSFERS_FEATURE_LABELS_EN, G as TRANSFERS_WIDGET_LABELS_EN, K as TransfersWidget, i as UIFramework, B as UploadReceiptWidget, t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, ae as WidgetProvider, Y as WidgetSuite, n as WidgetSuiteSectionId, h as WidgetTokenRefreshProvider, r as cloneEmbeddedClient, l as getGlobalWidgetConfig, f as getGlobalWidgetInitState, a as registerDesignSystemEnsurer, o as registerUIRenderers, u as setGlobalWidgetConfig, p as subscribeToGlobalWidgetInitState, d as updateGlobalWidgetConfig, v as useDisclosuresAcceptanceSurface, y as useOwnWidgetConfig, b as useRefetchWidget, x as useWidgetConfig, S as useWidgetError, C as useWidgetInitStaleForToken, w as useWidgetLoading, g as useWidgetToken };
71
+ export { q as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Y as ADDITIONAL_OWNERS_LABELS_EN, J as AcceptDisclosuresWidget, j as BALANCES_WIDGET_LABELS_EN, X as BUSINESS_DETAILS_LABELS_EN, M as BalancesWidget, $ as BankAccountOnboardingWidget, T as BankAccountsWidget, D as BillPayWidget, O as CardDetailsWidget, E as CounterpartsWidget, k as CreditCardsWidget, A as DebitCardsWidget, s as ERROR_STATE_ID, V as ExpenseManagementWidget, H as HELP_FAQ_EN, N as INSIGHTS_FEATURE_LABELS_EN, P as INSIGHTS_WIDGET_LABELS_EN, c as Implementation, I as InsightsWidget, L as InvoicingWidget, te as LinkedAccountsWidget, ne as MARKETING_WIDGET_LABELS_EN, re as MarketingWidget, Z as PERSONAL_DETAILS_LABELS_EN, ie as ProductsWidget, Q as RESULT_LABELS_EN, R as ReceivablesWidget, _ as RefreshingRootWidgetProvider, m as RootWidgetProvider, F as SINGLE_INSIGHT_LABELS_EN, z as SettingsSection, U as SettingsWidget, W as TRANSFERS_FEATURE_LABELS_EN, G as TRANSFERS_WIDGET_LABELS_EN, K as TransfersWidget, i as UIFramework, B as UploadReceiptWidget, t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, ae as WidgetProvider, ee as WidgetSuite, n as WidgetSuiteSectionId, h as WidgetTokenRefreshProvider, r as cloneEmbeddedClient, l as getGlobalWidgetConfig, f as getGlobalWidgetInitState, a as registerDesignSystemEnsurer, o as registerUIRenderers, u as setGlobalWidgetConfig, p as subscribeToGlobalWidgetInitState, d as updateGlobalWidgetConfig, v as useDisclosuresAcceptanceSurface, y as useOwnWidgetConfig, b as useRefetchWidget, x as useWidgetConfig, S as useWidgetError, C as useWidgetInitStaleForToken, w as useWidgetLoading, g as useWidgetToken };
@@ -641,6 +641,61 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
641
641
  providerLabels?: Partial<WidgetProviderLabels>;
642
642
  }
643
643
 
644
+ declare const USStateAbbreviation: {
645
+ readonly Alabama: "AL";
646
+ readonly Alaska: "AK";
647
+ readonly Arizona: "AZ";
648
+ readonly Arkansas: "AR";
649
+ readonly California: "CA";
650
+ readonly Colorado: "CO";
651
+ readonly Connecticut: "CT";
652
+ readonly Delaware: "DE";
653
+ readonly DistrictOfColumbia: "DC";
654
+ readonly Florida: "FL";
655
+ readonly Georgia: "GA";
656
+ readonly Hawaii: "HI";
657
+ readonly Idaho: "ID";
658
+ readonly Illinois: "IL";
659
+ readonly Indiana: "IN";
660
+ readonly Iowa: "IA";
661
+ readonly Kansas: "KS";
662
+ readonly Kentucky: "KY";
663
+ readonly Louisiana: "LA";
664
+ readonly Maine: "ME";
665
+ readonly Maryland: "MD";
666
+ readonly Massachusetts: "MA";
667
+ readonly Michigan: "MI";
668
+ readonly Minnesota: "MN";
669
+ readonly Mississippi: "MS";
670
+ readonly Missouri: "MO";
671
+ readonly Montana: "MT";
672
+ readonly Nebraska: "NE";
673
+ readonly Nevada: "NV";
674
+ readonly NewHampshire: "NH";
675
+ readonly NewJersey: "NJ";
676
+ readonly NewMexico: "NM";
677
+ readonly NewYork: "NY";
678
+ readonly NorthCarolina: "NC";
679
+ readonly NorthDakota: "ND";
680
+ readonly Ohio: "OH";
681
+ readonly Oklahoma: "OK";
682
+ readonly Oregon: "OR";
683
+ readonly Pennsylvania: "PA";
684
+ readonly RhodeIsland: "RI";
685
+ readonly SouthCarolina: "SC";
686
+ readonly SouthDakota: "SD";
687
+ readonly Tennessee: "TN";
688
+ readonly Texas: "TX";
689
+ readonly Utah: "UT";
690
+ readonly Vermont: "VT";
691
+ readonly Virginia: "VA";
692
+ readonly Washington: "WA";
693
+ readonly WestVirginia: "WV";
694
+ readonly Wisconsin: "WI";
695
+ readonly Wyoming: "WY";
696
+ };
697
+ type USStateAbbreviation = (typeof USStateAbbreviation)[keyof typeof USStateAbbreviation];
698
+
644
699
  /**
645
700
  * Which issuing product a card belongs to. A card list shows exactly one
646
701
  * program at a time, and the value selects the endpoint the data-access layer
@@ -682,6 +737,346 @@ type CardStatus = CreditCardStatus;
682
737
  */
683
738
  type CardType = CreditCardType;
684
739
 
740
+ /**
741
+ * Host-facing domain shapes for bank-account onboarding prefill and widget
742
+ * state. Owned by the feature layer so the published API does not re-export
743
+ * UI form view-models as the business contract.
744
+ */
745
+ type CompanyStructureValue = 'CORPORATION_PUBLIC' | 'CORPORATION_PRIVATE' | 'CORPORATION_NOT_FOR_PROFIT' | 'LLC' | 'LLP' | 'PARTNERSHIP' | 'SOLE_PROPRIETORSHIP' | 'GOVERNMENT' | 'COOPERATIVE' | 'ASSOCIATION' | 'OTHER';
746
+ interface BusinessDetailsValues {
747
+ companyLegalName: string;
748
+ companyDbaName: string;
749
+ businessAddress: string;
750
+ city: string;
751
+ state: string;
752
+ zipCode: string;
753
+ companyPhoneNumber: string;
754
+ companyStructure: CompanyStructureValue | '';
755
+ website: string;
756
+ taxId: string;
757
+ /**
758
+ * Set only when resuming. While present, a blank field means keep the stored
759
+ * tax id rather than missing, so the applicant need not retype it.
760
+ */
761
+ taxIdOnFileLast4?: string;
762
+ /**
763
+ * Structure the stored tax id was filed under. A change across the
764
+ * sole-proprietorship line changes its type, so it can no longer be kept.
765
+ */
766
+ taxIdOnFileStructure?: CompanyStructureValue;
767
+ naicsCode: string;
768
+ isAuthorized: boolean | null;
769
+ isCheckboxChecked: boolean;
770
+ }
771
+ interface PersonalDetailsValues {
772
+ firstName: string;
773
+ lastName: string;
774
+ dateOfBirth: Date | undefined;
775
+ ssn: string;
776
+ /**
777
+ * Set only when resuming. While present, a blank field means keep the stored
778
+ * SSN rather than missing, so the applicant need not retype it.
779
+ */
780
+ ssnOnFileLast4?: string;
781
+ homeAddress: string;
782
+ city: string;
783
+ state: string;
784
+ zipCode: string;
785
+ mobilePhoneNumber: string;
786
+ workEmail: string;
787
+ ownsOver25Percent: boolean | null;
788
+ ownershipPercentage: number | null;
789
+ }
790
+ interface AdditionalOwner {
791
+ /**
792
+ * Identifier of an owner already stored on the application. Present only on
793
+ * a resumed owner; omitted for one the applicant just added, which is what
794
+ * tells the server to create rather than update.
795
+ */
796
+ id?: string;
797
+ firstName: string;
798
+ lastName: string;
799
+ dateOfBirth: Date | undefined;
800
+ ssn: string;
801
+ /**
802
+ * Set only for a resumed owner carrying an `id`, which is what makes the write
803
+ * a merge. Blank then means keep. Without an id the write creates a new row,
804
+ * so an omitted identifier would store the owner without one.
805
+ */
806
+ ssnOnFileLast4?: string;
807
+ homeAddress: string;
808
+ city: string;
809
+ state: string;
810
+ zipCode: string;
811
+ mobilePhoneNumber: string;
812
+ ownsOver25Percent: boolean | null;
813
+ ownershipPercentage: number | null;
814
+ }
815
+
816
+ /**
817
+ * Legal disclosure URLs for the onboarding agreement step.
818
+ *
819
+ * Resolved by the host application (e.g. from white-label `onboardingTerms`
820
+ * or bank disclosure PDFs) and passed into the widget — the published package
821
+ * must not hard-code host/bank lookups.
822
+ */
823
+ interface DisclosureLinks {
824
+ termsHref?: string;
825
+ privacyHref?: string;
826
+ electronicCommunicationHref?: string;
827
+ patriotActHref?: string;
828
+ }
829
+
830
+ interface AdditionalOwnersLabels {
831
+ heading: string;
832
+ subheading: string;
833
+ primaryOwnerShareLabel: string;
834
+ emptyOwnersText: string;
835
+ addOwner: string;
836
+ edit: string;
837
+ remove: string;
838
+ cancel: string;
839
+ save: string;
840
+ close: string;
841
+ addOwnerSubmit: string;
842
+ saveOwnerSubmit: string;
843
+ ownerNameColumn: string;
844
+ ownerShareColumn: string;
845
+ ownerActionsColumn: string;
846
+ formHeadingAdd: string;
847
+ formHeadingEdit: string;
848
+ firstName: string;
849
+ lastName: string;
850
+ dateOfBirth: string;
851
+ dateOfBirthPlaceholder: string;
852
+ dateOfBirthMinAgeError: string;
853
+ ssn: string;
854
+ /** Shown when an SSN is already stored and need not be retyped. */
855
+ ssnOnFileTemplate: (last4: string) => string;
856
+ ssnInvalid: string;
857
+ ssnShow: string;
858
+ ssnHide: string;
859
+ homeAddress: string;
860
+ city: string;
861
+ state: string;
862
+ statePlaceholder: string;
863
+ zipCode: string;
864
+ mobilePhoneNumber: string;
865
+ mobilePhoneNumberInvalid: string;
866
+ ownershipPercentage: string;
867
+ ownershipPercentagePlaceholder: string;
868
+ ownershipPercentageMinError: string;
869
+ /** Required-field marker appended to field labels (e.g. ` *`). */
870
+ requiredFieldMarker: string;
871
+ /** Suffix shown after ownership percentage inputs (e.g. `%`). */
872
+ percentSuffix: string;
873
+ deleteOwnerHeading: string;
874
+ deleteOwnerPromptBeforeName: string;
875
+ deleteOwnerPromptAfterName: string;
876
+ deleteOwnerConfirm: string;
877
+ totalOwnershipExceedsTemplate: (total: number) => string;
878
+ stateTitles?: Partial<Record<USStateAbbreviation, string>>;
879
+ }
880
+
881
+ interface BusinessDetailsLabels {
882
+ heading: string;
883
+ subheading: string;
884
+ companyLegalName: string;
885
+ companyDbaName: string;
886
+ businessAddress: string;
887
+ city: string;
888
+ state: string;
889
+ statePlaceholder: string;
890
+ zipCode: string;
891
+ companyPhoneNumber: string;
892
+ companyPhoneNumberInvalid: string;
893
+ companyStructure: string;
894
+ companyStructurePlaceholder: string;
895
+ website: string;
896
+ websiteInvalid: string;
897
+ taxId: string;
898
+ taxIdInvalid: string;
899
+ /** Shown when a tax id is already stored and need not be retyped. */
900
+ taxIdOnFileTemplate: (last4: string) => string;
901
+ naicsCode: string;
902
+ naicsCodePlaceholder: string;
903
+ isAuthorizedQuestion: string;
904
+ isAuthorizedYes: string;
905
+ isAuthorizedNo: string;
906
+ /** Use `{bankName}` for the sponsoring bank (e.g. "Zenith Bank"). */
907
+ acceptDisclosuresPrefix: string;
908
+ termsOfUse: string;
909
+ privacyPolicy: string;
910
+ acceptDisclosuresTermsPrivacyJoin: string;
911
+ acceptDisclosuresAfterPrivacy: string;
912
+ electronicCommunication: string;
913
+ acceptDisclosuresAfterElectronic: string;
914
+ patriotAct: string;
915
+ companyStructureOptions: Record<'CORPORATION_PUBLIC' | 'CORPORATION_PRIVATE' | 'CORPORATION_NOT_FOR_PROFIT' | 'LLC' | 'LLP' | 'PARTNERSHIP' | 'SOLE_PROPRIETORSHIP' | 'GOVERNMENT' | 'COOPERATIVE' | 'ASSOCIATION' | 'OTHER', string>;
916
+ naicsTitles?: Record<string, string>;
917
+ stateTitles?: Partial<Record<USStateAbbreviation, string>>;
918
+ }
919
+
920
+ interface PersonalDetailsLabels {
921
+ heading: string;
922
+ subheading: string;
923
+ firstName: string;
924
+ lastName: string;
925
+ dateOfBirth: string;
926
+ dateOfBirthPlaceholder: string;
927
+ dateOfBirthMinAgeError: string;
928
+ ssn: string;
929
+ /** Shown when an SSN is already stored and need not be retyped. */
930
+ ssnOnFileTemplate: (last4: string) => string;
931
+ ssnInvalid: string;
932
+ ssnShow: string;
933
+ ssnHide: string;
934
+ homeAddress: string;
935
+ city: string;
936
+ state: string;
937
+ statePlaceholder: string;
938
+ zipCode: string;
939
+ mobilePhoneNumber: string;
940
+ mobilePhoneNumberInvalid: string;
941
+ workEmail: string;
942
+ ownsOver25Question: string;
943
+ ownsOver25SummaryLabel: string;
944
+ ownsOver25Yes: string;
945
+ ownsOver25No: string;
946
+ ownershipPercentage: string;
947
+ ownershipPercentagePlaceholder: string;
948
+ ownershipPercentageRangeError: string;
949
+ /** Suffix shown after ownership percentage inputs (e.g. `%`). */
950
+ percentSuffix: string;
951
+ stateTitles?: Partial<Record<USStateAbbreviation, string>>;
952
+ }
953
+
954
+ interface ResultLabels {
955
+ loadingMessage: string;
956
+ successHeadingLine1: string;
957
+ successBody: string;
958
+ pendingHeadingLine1: string;
959
+ pendingBody: string;
960
+ pendingEmailBoxLead: string;
961
+ navigateToDashboard: string;
962
+ /** Use `{bankName}` for the sponsoring bank (e.g. "Zenith Bank"). */
963
+ bankLogoAlt: string;
964
+ /** Use `{bankName}` for the sponsoring bank (e.g. "Zenith Bank"). */
965
+ fdicDisclaimer: string;
966
+ }
967
+
968
+ interface BankAccountOnboardingWidgetLabels {
969
+ stepIndicator: {
970
+ business: string;
971
+ personal: string;
972
+ ownership: string;
973
+ done: string;
974
+ };
975
+ businessDetails: PartialDeep<BusinessDetailsLabels>;
976
+ personalDetails: Partial<PersonalDetailsLabels>;
977
+ additionalOwners: Partial<AdditionalOwnersLabels>;
978
+ result: ResultLabels;
979
+ back: string;
980
+ cancel: string;
981
+ next: string;
982
+ submit: string;
983
+ businessReviewTitle: string;
984
+ businessReviewSubtitle: string;
985
+ personalReviewTitle: string;
986
+ personalReviewSubtitle: string;
987
+ /** Accessible title for the onboarding modal. */
988
+ modalTitle: string;
989
+ /** Thrown when submit returns without an application id. */
990
+ submitFailedError: string;
991
+ /** Fallback when an API error has no extractable message. */
992
+ genericRetryError: string;
993
+ /** Used when init has no bank name for disclaimers / result branding. */
994
+ fallbackBankName: string;
995
+ /**
996
+ * Shell footer disclaimer. Use `{bankName}` for the sponsoring bank
997
+ * (e.g. "Zenith Bank").
998
+ */
999
+ shellFdicDisclaimer: string;
1000
+ }
1001
+
1002
+ /**
1003
+ * Markers saying the server already holds an identifier. They make a blank
1004
+ * field valid and drop the identifier from the write, so a host that set one on
1005
+ * a fresh application would submit without an SSN or tax id.
1006
+ */
1007
+ declare const STORED_IDENTIFIER_MARKERS: readonly ["ssnOnFileLast4", "taxIdOnFileLast4", "taxIdOnFileStructure"];
1008
+ type StoredIdentifierMarker = (typeof STORED_IDENTIFIER_MARKERS)[number];
1009
+ /** Host-supplied initial values, which may never carry the markers. */
1010
+ type HostSupplied<T> = Omit<T, StoredIdentifierMarker>;
1011
+ /** Host-supplied owners, which may not carry an id either. */
1012
+ type HostSuppliedOwner = Omit<AdditionalOwner, StoredIdentifierMarker | 'id'>;
1013
+
1014
+ interface BankAccountOnboardingWidgetInnerProps {
1015
+ onEmbeddedOnboardingCompletedSuccessfully: () => void;
1016
+ onNavigateToDashboard: () => void;
1017
+ labels?: PartialDeep<BankAccountOnboardingWidgetLabels>;
1018
+ initialBusinessDetails?: Partial<BusinessDetailsValues>;
1019
+ initialPersonalDetails?: Partial<PersonalDetailsValues>;
1020
+ initialAdditionalOwners?: AdditionalOwner[];
1021
+ /**
1022
+ * The application this session is carrying on with, when the applicant
1023
+ * already started one. Set by the resume layer, not by hosts.
1024
+ */
1025
+ initialApplicationId?: string | null;
1026
+ /**
1027
+ * The token the resume read that produced `initialApplicationId` was made
1028
+ * under. Set by the resume layer, not by hosts.
1029
+ */
1030
+ initialBoundAuthEpoch?: number;
1031
+ /**
1032
+ * The application this session may still write to, with the auth epoch it
1033
+ * was bound under, or null once there is none. Reported up to the session
1034
+ * scope, not to hosts.
1035
+ */
1036
+ onEditableDraftChange?: (draft: {
1037
+ applicationId: string;
1038
+ authEpoch: number;
1039
+ } | null) => void;
1040
+ bankLogoSrc?: string;
1041
+ /**
1042
+ * Host-resolved disclosure URLs for the business-details agreement step.
1043
+ * The published widget does not look up white-label/bank maps itself.
1044
+ */
1045
+ disclosureLinks?: DisclosureLinks;
1046
+ /**
1047
+ * Controlled open state for the onboarding modal. When provided, the host
1048
+ * application owns the open/close state and must update it via
1049
+ * `onOpenChange`. Defaults to uncontrolled mode (`defaultOpen` is honoured).
1050
+ */
1051
+ open?: boolean;
1052
+ /**
1053
+ * Initial open state when uncontrolled. Defaults to `false` so the onboarding
1054
+ * modal stays hidden until the host opens it.
1055
+ */
1056
+ defaultOpen?: boolean;
1057
+ /**
1058
+ * Notified whenever the modal opens or closes — both from internal gestures
1059
+ * (overlay click, escape key, close button) and external state updates.
1060
+ * Also fires in uncontrolled mode (`open` omitted) so hosts can run analytics
1061
+ * or other side effects without owning the open state.
1062
+ */
1063
+ onOpenChange?: (open: boolean) => void;
1064
+ /**
1065
+ * Renders the widget inline — filling the width/height of its host
1066
+ * container — instead of in a modal dialog. `open`/`defaultOpen` play no
1067
+ * part in whether the widget's content is shown in this mode; the widget
1068
+ * always renders once mounted, and the host controls mounting instead.
1069
+ * `onOpenChange` still fires for gestures like Cancel, so hosts can react
1070
+ * to them (e.g. by unmounting the widget).
1071
+ */
1072
+ isFullScreenInline?: boolean;
1073
+ }
1074
+ type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange'> & {
1075
+ initialBusinessDetails?: Partial<HostSupplied<BusinessDetailsValues>>;
1076
+ initialPersonalDetails?: Partial<HostSupplied<PersonalDetailsValues>>;
1077
+ initialAdditionalOwners?: HostSuppliedOwner[];
1078
+ };
1079
+
685
1080
  interface BalancesWidgetLabels {
686
1081
  /** Card header title (e.g. next to the building icon) */
687
1082
  widgetTitle: string;
@@ -2070,6 +2465,32 @@ interface WidgetSuiteDisclosureLabels {
2070
2465
  retryButton: string;
2071
2466
  };
2072
2467
  }
2468
+ /**
2469
+ * Copy for the suite's entry-point gate — which of onboarding, the "ask your
2470
+ * admin" message, or the normal suite a fresh (non-invited) session sees
2471
+ * before the menu ever renders. Sibling to `disclosure`, which covers the
2472
+ * acceptance half of that same gate; only the admin-message state needs copy
2473
+ * here, since the onboarding widget and the normal shell carry their own.
2474
+ */
2475
+ interface WidgetSuiteOnboardingGateLabels {
2476
+ /**
2477
+ * Shown instead of the onboarding widget when the organization's
2478
+ * bank-account application is already in progress under a different
2479
+ * member. The backend allows one application per organization, so this
2480
+ * session can neither start nor resume one — only that colleague, or an
2481
+ * org admin, can move it forward.
2482
+ */
2483
+ applicationInFlightState: {
2484
+ title: string;
2485
+ body: string;
2486
+ /**
2487
+ * The widget providers disable `refetchOnWindowFocus`, so nothing else
2488
+ * re-checks whether that colleague has since finished — this button is
2489
+ * the only way forward short of a reload.
2490
+ */
2491
+ retryButton: string;
2492
+ };
2493
+ }
2073
2494
  /**
2074
2495
  * A widget's whole copy surface: every label prop it accepts, spread onto it so
2075
2496
  * the props keep the names that widget's own doc gives them.
@@ -2082,6 +2503,7 @@ type WidgetLabelProps<T> = Omit<Pick<T, Extract<keyof T, 'labels' | `${string}La
2082
2503
  type WidgetSuiteBalancesLabels = WidgetLabelProps<BalancesWidgetProps>;
2083
2504
  type WidgetSuiteInsightsLabels = WidgetLabelProps<InsightsWidgetProps>;
2084
2505
  type WidgetSuiteAccountsLabels = WidgetLabelProps<BankAccountsWidgetProps>;
2506
+ type WidgetSuiteOnboardingLabels = WidgetLabelProps<BankAccountOnboardingWidgetProps>;
2085
2507
  type WidgetSuiteCreditCardsLabels = WidgetLabelProps<CreditCardsWidgetProps>;
2086
2508
  type WidgetSuiteDebitCardsLabels = WidgetLabelProps<DebitCardsWidgetProps>;
2087
2509
  type WidgetSuiteTransfersLabels = WidgetLabelProps<TransfersWidgetProps>;
@@ -2134,11 +2556,13 @@ interface WidgetSuiteSectionContentLabels {
2134
2556
  * it mounts. Two kinds of group, differing in who holds the default:
2135
2557
  *
2136
2558
  * - **Suite-owned** — `shell`, `menu`, `sectionTitle`, `disclosure`,
2137
- * `sections.expenses`, and the two card-list titles. Defaulted in
2138
- * {@link WIDGET_SUITE_LABELS_EN}, with an override merged over it.
2139
- * - **Forwarded** — every other key under `sections`. Handed down untouched for
2140
- * the widget to merge over its own defaults, so the suite carries no copy of a
2141
- * widget's strings and cannot go stale against one.
2559
+ * `onboardingGate`, `sections.expenses`, and the two card-list titles.
2560
+ * Defaulted in {@link WIDGET_SUITE_LABELS_EN}, with an override merged
2561
+ * over it.
2562
+ * - **Forwarded** — `onboarding`, and every other key under `sections`.
2563
+ * Handed down untouched for the widget to merge over its own defaults, so
2564
+ * the suite carries no copy of a widget's strings and cannot go stale
2565
+ * against one.
2142
2566
  *
2143
2567
  * `WidgetProvider`'s copy is deliberately absent: it is already reachable
2144
2568
  * through the inherited `providerLabels` prop, and two routes to one string
@@ -2150,18 +2574,23 @@ interface WidgetSuiteLabels {
2150
2574
  menu: WidgetSuiteMenuLabels;
2151
2575
  sectionTitle: WidgetSuiteSectionTitleLabels;
2152
2576
  disclosure: WidgetSuiteDisclosureLabels;
2577
+ onboardingGate: WidgetSuiteOnboardingGateLabels;
2578
+ /** Forwarded to the entry-point onboarding widget, untouched. No default. */
2579
+ onboarding?: WidgetSuiteOnboardingLabels;
2153
2580
  sections: WidgetSuiteSectionContentLabels;
2154
2581
  }
2155
2582
  /**
2156
2583
  * The `labels` prop: a deep partial of {@link WidgetSuiteLabels}.
2157
2584
  *
2158
- * `sections` is exempted from `PartialDeep` on purpose — every group under it is
2159
- * already the exact override its widget accepts, so deepening it again would
2160
- * admit a shape the suite cannot forward and would flatten a non-plain member
2161
- * (`PartialDeep` maps a function-valued label to `{}`). The two suite-owned
2162
- * groups under it are made partial one level for the same reason.
2585
+ * `sections` and `onboarding` are exempted from `PartialDeep` on purpose —
2586
+ * each group under them is already the exact override its widget accepts,
2587
+ * so deepening it again would admit a shape the suite cannot forward and
2588
+ * would flatten a non-plain member (`PartialDeep` maps a function-valued
2589
+ * label to `{}`). The two suite-owned groups under `sections` are made
2590
+ * partial one level for the same reason.
2163
2591
  */
2164
- type WidgetSuiteLabelOverrides = PartialDeep<Omit<WidgetSuiteLabels, 'sections'>> & {
2592
+ type WidgetSuiteLabelOverrides = PartialDeep<Omit<WidgetSuiteLabels, 'sections' | 'onboarding'>> & {
2593
+ onboarding?: WidgetSuiteOnboardingLabels;
2165
2594
  sections?: Partial<Omit<WidgetSuiteSectionContentLabels, 'cards' | 'expenses'>> & {
2166
2595
  cards?: Partial<WidgetSuiteCardsLabels>;
2167
2596
  expenses?: Partial<WidgetSuiteExpensesLabels>;
@@ -2235,6 +2664,15 @@ interface WidgetSuiteProps extends WidgetProviderProps {
2235
2664
  * 0010), so the suite is the only thing that can name them.
2236
2665
  */
2237
2666
  showSectionTitle?: boolean;
2667
+ /**
2668
+ * Legal disclosure URLs (Terms, Privacy, Electronic Communication, Patriot
2669
+ * Act) for the entry-point onboarding widget's business-details agreement
2670
+ * step. Host-resolved and tenant-specific, so the suite takes it as a prop
2671
+ * rather than looking it up itself — same rule as every other legal
2672
+ * document link or asset URL in this directory. Omitted fields render as
2673
+ * plain (non-clickable) text in that step, same as the widget's own default.
2674
+ */
2675
+ onboardingDisclosureLinks?: DisclosureLinks;
2238
2676
  }
2239
2677
  /**
2240
2678
  * A suite of widgets bound together by navigation.
@@ -2248,12 +2686,20 @@ interface WidgetSuiteProps extends WidgetProviderProps {
2248
2686
  * pass-through mode. See `sections/sectionIds.ts` for the two composition rules
2249
2687
  * that arrangement depends on.
2250
2688
  *
2251
- * That one response also decides which state the suite is in before the shell
2252
- * renders: placeholders while init has not settled, a closed retry state when
2253
- * init fails before answering the disclosure flags, the acceptance surface
2254
- * alone when the session owes the bank's disclosures, or the nav over its
2255
- * sections. States rather than an overlay over a mounted shell — see
2256
- * `WidgetSuiteSurface` for why each boundary sits where it does.
2689
+ * That one response, plus an org-scoped read of the organization's
2690
+ * bank-account application status, decides which state the suite is in
2691
+ * before the shell renders: placeholders while either has not settled, a
2692
+ * closed retry state when init fails before answering the disclosure flags,
2693
+ * the acceptance surface alone when the session owes the bank's disclosures,
2694
+ * full-screen onboarding for a session whose organization has no application
2695
+ * yet, an "ask your admin" message when a teammate's is already in flight, or
2696
+ * the nav over its sections. An invited session, or one this init already
2697
+ * reports ACTIVE/INACTIVE, skips the application question entirely and goes
2698
+ * straight to the disclosure gate — which also means neither a failed
2699
+ * status read nor a teammate's in-flight application can blank the suite for
2700
+ * a user this init already vouches for. States rather than an overlay over a
2701
+ * mounted shell — see `WidgetSuiteSurface` for why each boundary sits where
2702
+ * it does.
2257
2703
  *
2258
2704
  * Navigation is one value: which section is showing, published to the sections
2259
2705
  * through `WidgetSuiteProvider` and drivable by a host through `section` /
@@ -2266,4 +2712,4 @@ interface WidgetSuiteProps extends WidgetProviderProps {
2266
2712
  declare function WidgetSuite({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: WidgetSuiteProps): React.JSX.Element;
2267
2713
 
2268
2714
  export { WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetSuite, WidgetSuiteSectionId };
2269
- export type { WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels };
2715
+ export type { WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels };