@tesouro/embedded-components-react 0.2.249 → 0.2.252

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/README.md CHANGED
@@ -183,17 +183,26 @@ listed here.
183
183
 
184
184
  ### AcceptDisclosuresWidget
185
185
 
186
- A self-contained widget for reviewing and accepting required banking disclosures. Renders an inline bordered card with disclosure links, an agreement checkbox, and an Accept action. You supply the four bank-issued document URLs via `disclosureLinks`; the provider attribution and agreement copy come from the widget init tenant identity. Accepting records the acceptance for the signed-in user and then hides the card.
186
+ A self-contained widget for reviewing and accepting required banking disclosures during the **pre-auth invite flow**. Renders an inline bordered card with disclosure links, an agreement checkbox, and an Accept action. You supply the four bank-issued document URLs via `disclosureLinks`; the provider attribution and agreement copy come from the widget init tenant identity.
187
+
188
+ Accept posts `POST /api/widget-gateway/disclosure-acceptance` after reading the disclosure version in force from `GET /identity/v1/disclosures` (hosts rewrite that onto `/api/widget-gateway/proxy/identity/v1/disclosures` the same way as other identity calls — do not call the generated catch-all proxy helper, which percent-encodes path slashes and surfaces as a browser CORS error). `version` may be `null` when the org's requirement is `NOT_REQUIRED`; that value is posted through and ignored by the gateway so invitees in those orgs can still activate. Pass `invitationToken` and `userId` so the disclosures lookup can reject a revoked/expired invite before activation. The accept is one transaction: it activates the invitee and records disclosure acceptance together, so a failed second hop cannot leave an `ACTIVE` user with no acceptance on record. After accept succeeds, the widget awaits any async `onAccepted` continuation, then kicks a widget-init refresh so host gates keyed on `INVITED` can clear. Accept and `onAccepted` failures are handled separately — a rejected host continuation does not look like (or re-run) a failed gateway accept. The refresh is fire-and-forget and runs only after `onAccepted` settles — hosts that unmount this widget when status leaves `INVITED` would otherwise hide a rejected continuation. Auth uses the normal `widgetToken` provider contract — **never** pass an application (APP) / M2M bearer as `widgetToken`. The host must pass `invitationToken` and `userId` from the invite link — this widget does not read URL search params.
187
189
 
188
190
  The widget carries no document URLs of its own — disclosures are bank-issued legal instruments whose hosting is yours to control, and an embeddable library must not depend on infrastructure your content-security policy cannot see. It renders nothing until `disclosureLinks` is supplied and init resolves a `bankName`; it never substitutes another tenant's legal copy. If init omits `vspName`, provider attribution falls back to the bank name so the sentence remains complete.
189
191
 
192
+ Once the atomic accept _and_ any async `onAccepted` continuation succeed, the checkbox and Accept control stay disabled, so a legal acceptance is never posted twice even if the host does not navigate away. A failed accept or rejected `onAccepted` shows an inline error and leaves the control usable for a retry; a successful accept is skipped on retry after a later failure. Init refresh is kicked only after `onAccepted` succeeds.
193
+
190
194
  #### Props
191
195
 
192
- | Prop | Type | Default | Description |
193
- | ----------------- | ---------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------- |
194
- | `disclosureLinks` | `AcceptDisclosuresLinks` | — | URLs of the four disclosure documents. Required to render the widget ships none of its own. |
195
- | `labels` | `Partial<AcceptDisclosuresWidgetLabels>` | — | Override shell copy (title, Accept, link labels, attribution/agreement templates). |
196
- | `onAccept` | `() => Promise<void> \| void` | Built-in request | Records the acceptance instead of the built-in request. Reject to keep the card up for retry. |
196
+ | Prop | Type | Default | Description |
197
+ | ----------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
198
+ | `invitationToken` | `string` | — | **Required.** Invitation token from the invite link (`code` query param). Bound into the disclosures lookup before activation. |
199
+ | `userId` | `string` | — | **Required.** Invited user id from the invite link (`userId` query param). Paired with `invitationToken`. |
200
+
201
+ | Prop | Type | Default | Description |
202
+ | ----------------- | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
203
+ | `disclosureLinks` | `AcceptDisclosuresLinks` | — | URLs of the four disclosure documents. Required to render — the widget ships none of its own. |
204
+ | `labels` | `Partial<AcceptDisclosuresWidgetLabels>` | — | Override shell copy (title, Accept, link labels, attribution/agreement templates). |
205
+ | `onAccepted` | `() => void \| Promise<void>` | — | Called after the atomic accept succeeds and before init refresh; awaited before the widget locks. Reject to surface an error and keep Accept retryable. |
197
206
 
198
207
  ### BankAccountsWidget
199
208
 
package/dist/index.d.ts CHANGED
@@ -10,6 +10,8 @@ interface AcceptDisclosuresWidgetLabels {
10
10
  title: string;
11
11
  acceptButton: string;
12
12
  agreementCheckboxAriaLabel: string;
13
+ /** Fallback when the accept API fails without a usable message. */
14
+ acceptErrorFallback: string;
13
15
  /** Use `{bankName}` as the bank display-name placeholder. */
14
16
  agreementTextTemplate: string;
15
17
  providerAttributionPrefix: string;
@@ -41,6 +43,15 @@ interface AcceptDisclosuresWidgetProps$1 {
41
43
  isAgreed: boolean;
42
44
  onAgreedChange: (checked: boolean) => void;
43
45
  onAccept: () => void;
46
+ /** Disables the checkbox and Accept control while a submit is in flight. */
47
+ isSubmitting?: boolean;
48
+ /**
49
+ * Keeps the checkbox and Accept control disabled once acceptance is done.
50
+ * Separate from {@link isSubmitting} so `aria-busy` only means "in flight".
51
+ */
52
+ isAccepted?: boolean;
53
+ /** Inline error shown under Accept; omit or empty when there is no error. */
54
+ errorMessage?: string;
44
55
  labels?: PartialDeep$5<AcceptDisclosuresWidgetLabels>;
45
56
  }
46
57
 
@@ -1338,8 +1349,19 @@ interface AcceptDisclosuresLinks {
1338
1349
  usaPatriotActUrl: string;
1339
1350
  }
1340
1351
 
1341
- type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept';
1352
+ type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage';
1342
1353
  type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
1354
+ /**
1355
+ * Invitation token from the invite link. Bound into the disclosures lookup
1356
+ * before activation, and used to remount consent state when the invite
1357
+ * changes. This widget does not read URL search params.
1358
+ */
1359
+ invitationToken: string;
1360
+ /**
1361
+ * Invited user id from the invite link. Required with {@link invitationToken}
1362
+ * for the disclosures lookup and remount identity.
1363
+ */
1364
+ userId: string;
1343
1365
  /**
1344
1366
  * URLs of the four bank-issued disclosure documents. Required to render along
1345
1367
  * with a bank name from widget init: the widget carries no document URLs of its
@@ -1348,23 +1370,22 @@ type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
1348
1370
  */
1349
1371
  disclosureLinks?: AcceptDisclosuresLinks;
1350
1372
  /**
1351
- * Records the acceptance instead of the built-in call. Reject to keep the
1352
- * agreement on screen for a retry.
1353
- *
1354
- * Escape hatch for a host that must complete an invitee's acceptance today:
1355
- * the built-in call targets the authenticated-user endpoint, which the gateway
1356
- * refuses for a user who is not active yet ("User must be active to access
1357
- * this resource") — and an invitee is precisely that. Such a host has to go
1358
- * through the invite-token endpoints server-side, which the published package
1359
- * cannot do. Expected to become unnecessary with EMBD-4525, which moves
1360
- * acceptance in-process in the gateway and lifts the active-user gate.
1373
+ * Called after the atomic accept succeeds and before init refresh is kicked.
1374
+ * May return a promise the widget awaits it before locking controls and
1375
+ * refreshing init, so a rejected continuation surfaces as an error and leaves
1376
+ * Accept retryable (and the host gate stays mounted).
1361
1377
  */
1362
- onAccept?: () => Promise<void> | void;
1378
+ onAccepted?: () => void | Promise<void>;
1363
1379
  };
1364
1380
  type AcceptDisclosuresWidgetProps = WidgetProviderProps & InnerProps;
1365
1381
  /**
1366
- * Self-contained AcceptDisclosures widget. Wraps the presentational UI in
1367
- * {@link WidgetProvider}; acceptance mutations land in follow-up work.
1382
+ * Self-contained AcceptDisclosures widget for the pre-auth invite flow.
1383
+ * Posts `POST /api/widget-gateway/disclosure-acceptance` (after reading the
1384
+ * disclosure version in force via the widget-gateway proxy), which activates
1385
+ * the invitee and records acceptance in one transaction, then awaits any
1386
+ * `onAccepted` continuation and kicks a widget-init refresh so host gates
1387
+ * keyed on `INVITED` can clear. Auth uses the normal WidgetToken provider
1388
+ * contract — never an APP/M2M bearer.
1368
1389
  */
1369
1390
  declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
1370
1391
 
@@ -9,6 +9,8 @@ interface AcceptDisclosuresWidgetLabels {
9
9
  title: string;
10
10
  acceptButton: string;
11
11
  agreementCheckboxAriaLabel: string;
12
+ /** Fallback when the accept API fails without a usable message. */
13
+ acceptErrorFallback: string;
12
14
  /** Use `{bankName}` as the bank display-name placeholder. */
13
15
  agreementTextTemplate: string;
14
16
  providerAttributionPrefix: string;
@@ -40,6 +42,15 @@ interface AcceptDisclosuresWidgetProps$1 {
40
42
  isAgreed: boolean;
41
43
  onAgreedChange: (checked: boolean) => void;
42
44
  onAccept: () => void;
45
+ /** Disables the checkbox and Accept control while a submit is in flight. */
46
+ isSubmitting?: boolean;
47
+ /**
48
+ * Keeps the checkbox and Accept control disabled once acceptance is done.
49
+ * Separate from {@link isSubmitting} so `aria-busy` only means "in flight".
50
+ */
51
+ isAccepted?: boolean;
52
+ /** Inline error shown under Accept; omit or empty when there is no error. */
53
+ errorMessage?: string;
43
54
  labels?: PartialDeep<AcceptDisclosuresWidgetLabels>;
44
55
  }
45
56
 
@@ -624,8 +635,19 @@ interface AcceptDisclosuresLinks {
624
635
  usaPatriotActUrl: string;
625
636
  }
626
637
 
627
- type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept';
638
+ type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage';
628
639
  type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
640
+ /**
641
+ * Invitation token from the invite link. Bound into the disclosures lookup
642
+ * before activation, and used to remount consent state when the invite
643
+ * changes. This widget does not read URL search params.
644
+ */
645
+ invitationToken: string;
646
+ /**
647
+ * Invited user id from the invite link. Required with {@link invitationToken}
648
+ * for the disclosures lookup and remount identity.
649
+ */
650
+ userId: string;
629
651
  /**
630
652
  * URLs of the four bank-issued disclosure documents. Required to render along
631
653
  * with a bank name from widget init: the widget carries no document URLs of its
@@ -634,23 +656,22 @@ type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
634
656
  */
635
657
  disclosureLinks?: AcceptDisclosuresLinks;
636
658
  /**
637
- * Records the acceptance instead of the built-in call. Reject to keep the
638
- * agreement on screen for a retry.
639
- *
640
- * Escape hatch for a host that must complete an invitee's acceptance today:
641
- * the built-in call targets the authenticated-user endpoint, which the gateway
642
- * refuses for a user who is not active yet ("User must be active to access
643
- * this resource") — and an invitee is precisely that. Such a host has to go
644
- * through the invite-token endpoints server-side, which the published package
645
- * cannot do. Expected to become unnecessary with EMBD-4525, which moves
646
- * acceptance in-process in the gateway and lifts the active-user gate.
659
+ * Called after the atomic accept succeeds and before init refresh is kicked.
660
+ * May return a promise the widget awaits it before locking controls and
661
+ * refreshing init, so a rejected continuation surfaces as an error and leaves
662
+ * Accept retryable (and the host gate stays mounted).
647
663
  */
648
- onAccept?: () => Promise<void> | void;
664
+ onAccepted?: () => void | Promise<void>;
649
665
  };
650
666
  type AcceptDisclosuresWidgetProps = WidgetProviderProps & InnerProps;
651
667
  /**
652
- * Self-contained AcceptDisclosures widget. Wraps the presentational UI in
653
- * {@link WidgetProvider}; acceptance mutations land in follow-up work.
668
+ * Self-contained AcceptDisclosures widget for the pre-auth invite flow.
669
+ * Posts `POST /api/widget-gateway/disclosure-acceptance` (after reading the
670
+ * disclosure version in force via the widget-gateway proxy), which activates
671
+ * the invitee and records acceptance in one transaction, then awaits any
672
+ * `onAccepted` continuation and kicks a widget-init refresh so host gates
673
+ * keyed on `INVITED` can clear. Auth uses the normal WidgetToken provider
674
+ * contract — never an APP/M2M bearer.
654
675
  */
655
676
  declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
656
677
 
@@ -1,2 +1,2 @@
1
- import { useAcceptDisclosures as e } from "./index2.js";
2
- export { e as useAcceptDisclosures };
1
+ import { useAcceptWidgetDisclosures as e } from "./index2.js";
2
+ export { e as useAcceptWidgetDisclosures };
@@ -3,13 +3,32 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { acceptDisclosuresMutation as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
6
+ import { getDisclosures as t, postApiWidgetGatewayDisclosureAcceptance as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
7
7
  import "../../../shared/data-access/dist/index.js";
8
- import { useMutation as n } from "@tanstack/react-query";
8
+ import { useMutation as r } from "@tanstack/react-query";
9
9
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index2.js
10
- function r() {
11
- let { client: r } = e();
12
- return n({ ...t({ client: r }) });
10
+ function i() {
11
+ let { client: i, widgetToken: a } = e();
12
+ return r({ mutationFn: async ({ invitationToken: e, userId: r }) => {
13
+ if (!a) throw Error("Widget token is required to accept disclosures");
14
+ let { data: o } = await t({
15
+ client: i,
16
+ headers: { "X-Widget-Token": a },
17
+ query: {
18
+ invitationToken: e,
19
+ userId: r
20
+ },
21
+ throwOnError: !0
22
+ });
23
+ if (!o) throw Error("Unexpected disclosures response from widget gateway");
24
+ let { data: s } = await n({
25
+ client: i,
26
+ headers: { "X-Widget-Token": a },
27
+ body: { version: o.version },
28
+ throwOnError: !0
29
+ });
30
+ return s;
31
+ } });
13
32
  }
14
33
  //#endregion
15
- export { r as useAcceptDisclosures };
34
+ export { i as useAcceptWidgetDisclosures };
@@ -7,16 +7,17 @@ import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as n } from "../../ui/dist/index2.j
7
7
  import { AcceptDisclosuresWidget as r } from "../../ui/dist/index3.js";
8
8
  import "../../ui/dist/index.js";
9
9
  import { resolveAcceptDisclosuresContent as i } from "./index3.js";
10
- import { useAcceptDisclosures as a } from "../../data-access/dist/index2.js";
10
+ import { useAcceptWidgetDisclosures as a } from "../../data-access/dist/index2.js";
11
11
  import "../../data-access/dist/index.js";
12
12
  import { useAnalyticsTrack as o } from "../../../shared/feature/dist/lib/analytics/hooks.js";
13
13
  import { WidgetProvider as s } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
14
- import { useRefetchWidget as c, useWidgetConfig as l } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
14
+ import { extractApiErrorMessage as c } from "../../../shared/util/dist/index14.js";
15
+ import { useRefetchWidget as l, useWidgetConfig as u } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
15
16
  import "../../../shared/feature/dist/index.js";
16
- import { useEffect as u, useState as d } from "react";
17
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
17
+ import { useCallback as d, useEffect as f, useRef as p, useState as m } from "react";
18
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
18
19
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
19
- function h(e) {
20
+ function v(e) {
20
21
  return {
21
22
  ...n,
22
23
  ...e,
@@ -26,58 +27,92 @@ function h(e) {
26
27
  }
27
28
  };
28
29
  }
29
- function g(e, t, n) {
30
- return /* @__PURE__ */ m(f, { children: [
30
+ function y(e, t, n) {
31
+ return /* @__PURE__ */ _(h, { children: [
31
32
  n.providerAttributionPrefix,
32
- /* @__PURE__ */ p("strong", { children: e }),
33
+ /* @__PURE__ */ g("strong", { children: e }),
33
34
  n.providerAttributionMiddle,
34
35
  t,
35
36
  n.providerAttributionSuffix
36
37
  ] });
37
38
  }
38
- function _({ disclosureLinks: t, labels: n, onAccept: r }) {
39
- let a = o(), { initResponse: s } = l(), c = h(n), [f, m] = d(!1);
40
- u(() => {
41
- a(e.Mounted);
42
- }, [a]);
43
- let g = i({
44
- disclosureLinks: t,
45
- vspName: s?.vspName,
46
- bankName: s?.bankName,
47
- labels: n
39
+ function b({ invitationToken: t, userId: n, disclosureLinks: r, labels: a, onAccepted: s }) {
40
+ let c = o(), { initResponse: l } = u(), d = v(a);
41
+ f(() => {
42
+ c(e.Mounted);
43
+ }, [c]);
44
+ let p = i({
45
+ disclosureLinks: r,
46
+ vspName: l?.vspName,
47
+ bankName: l?.bankName,
48
+ labels: a
48
49
  });
49
- if (f || !g) return null;
50
- let _ = `${g.vspName}:${g.bankName}:${g.agreementText}:${g.disclosureLinks.map((e) => e.href).join("|")}`;
51
- return /* @__PURE__ */ p(v, {
52
- labelOverrides: n,
53
- content: g,
54
- labels: c,
55
- onAccept: r,
56
- onAccepted: () => m(!0)
57
- }, _);
50
+ if (!p) return null;
51
+ let m = `${t}:${n}:${p.vspName}:${p.bankName}:${p.agreementText}:${p.disclosureLinks.map((e) => e.href).join("|")}`;
52
+ return /* @__PURE__ */ g(x, {
53
+ invitationToken: t,
54
+ userId: n,
55
+ labelOverrides: a,
56
+ content: p,
57
+ labels: d,
58
+ onAccepted: s
59
+ }, m);
58
60
  }
59
- function v({ labelOverrides: e, content: t, labels: n, onAccept: i, onAccepted: o }) {
60
- let [s, l] = d(!1), u = a(), f = c();
61
- return /* @__PURE__ */ p(r, {
62
- labels: e,
63
- providerAttribution: g(t.vspName, t.bankName, n),
64
- agreementText: t.agreementText,
65
- disclosureLinks: t.disclosureLinks,
66
- isAgreed: s,
67
- onAgreedChange: l,
68
- onAccept: async () => {
61
+ function x({ invitationToken: e, userId: t, labelOverrides: n, content: i, labels: o, onAccepted: s }) {
62
+ let [u, f] = m(!1), [h, _] = m(), [v, b] = m(!1), [x, S] = m(!1), C = p(!1), { mutateAsync: w } = a(), T = l(), E = d((e) => {
63
+ _(void 0), f(e);
64
+ }, []), D = d(async () => {
65
+ if (!(!u || v || x)) {
66
+ _(void 0), b(!0);
69
67
  try {
70
- i ? await i() : await u.mutateAsync({});
71
- } catch (e) {
72
- console.error("[accept-disclosures] acceptance failed", e);
73
- return;
68
+ if (!C.current) try {
69
+ await w({
70
+ invitationToken: e,
71
+ userId: t
72
+ }), C.current = !0;
73
+ } catch (e) {
74
+ _(c(e) ?? o.acceptErrorFallback);
75
+ return;
76
+ }
77
+ try {
78
+ await s?.();
79
+ } catch (e) {
80
+ _(c(e) ?? o.acceptErrorFallback);
81
+ return;
82
+ }
83
+ T(), S(!0);
84
+ } finally {
85
+ b(!1);
74
86
  }
75
- o(), f();
76
87
  }
88
+ }, [
89
+ w,
90
+ x,
91
+ e,
92
+ u,
93
+ v,
94
+ o.acceptErrorFallback,
95
+ s,
96
+ T,
97
+ t
98
+ ]);
99
+ return /* @__PURE__ */ g(r, {
100
+ labels: n,
101
+ providerAttribution: y(i.vspName, i.bankName, o),
102
+ agreementText: i.agreementText,
103
+ disclosureLinks: i.disclosureLinks,
104
+ isAgreed: u,
105
+ onAgreedChange: E,
106
+ onAccept: () => {
107
+ D();
108
+ },
109
+ isSubmitting: v,
110
+ isAccepted: x,
111
+ errorMessage: h
77
112
  });
78
113
  }
79
- function y({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, linkComponent: a, implementation: o, uiFramework: c, errorFallback: l, onError: u, analytics: d, ...f }) {
80
- return /* @__PURE__ */ p(s, {
114
+ function S({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, linkComponent: a, implementation: o, uiFramework: c, errorFallback: l, onError: u, analytics: d, ...f }) {
115
+ return /* @__PURE__ */ g(s, {
81
116
  widgetName: t,
82
117
  baseUrl: e,
83
118
  widgetToken: n,
@@ -89,8 +124,8 @@ function y({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, lin
89
124
  errorFallback: l,
90
125
  onError: u,
91
126
  analytics: d,
92
- children: /* @__PURE__ */ p(_, { ...f })
127
+ children: /* @__PURE__ */ g(b, { ...f })
93
128
  });
94
129
  }
95
130
  //#endregion
96
- export { y as AcceptDisclosuresWidget };
131
+ export { S as AcceptDisclosuresWidget };
@@ -3,6 +3,7 @@ var e = {
3
3
  title: "Review and accept these banking disclosures",
4
4
  acceptButton: "Accept",
5
5
  agreementCheckboxAriaLabel: "Agree to banking disclosures",
6
+ acceptErrorFallback: "Failed to accept disclosures",
6
7
  agreementTextTemplate: "I agree to {bankName}'s Terms of Use and Privacy Policy, consent to receive electronic communications about my accounts and services, and acknowledge receipt of the USA PATRIOT Act Disclosure.",
7
8
  providerAttributionPrefix: "Banking services for ",
8
9
  providerAttributionMiddle: " are provided by ",
@@ -3,22 +3,22 @@ import { Button as t, Checkbox as n } from "../../../../../packages/shared-ui-sh
3
3
  import { useId as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index3.js
6
- function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgreed: l, onAgreedChange: u, onAccept: d, labels: f }) {
7
- let p = {
6
+ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgreed: l, onAgreedChange: u, onAccept: d, isSubmitting: f = !1, isAccepted: p = !1, errorMessage: m, labels: h }) {
7
+ let g = f || p, _ = {
8
8
  ...e,
9
- ...f,
9
+ ...h,
10
10
  linkLabels: {
11
11
  ...e.linkLabels,
12
- ...f?.linkLabels
12
+ ...h?.linkLabels
13
13
  }
14
- }, m = r(), h = `${m}-agree`, g = `${m}-agree-description`;
14
+ }, v = r(), y = `${v}-agree`, b = `${v}-agree-description`, x = `${v}-accept-error`;
15
15
  return /* @__PURE__ */ a("div", {
16
16
  "data-testid": "accept-disclosures-widget-root",
17
17
  className: "ttw:block ttw:w-full ttw:rounded-lg ttw:border ttw:border-border ttw:bg-background ttw:p-6",
18
18
  children: [
19
19
  /* @__PURE__ */ i("h2", {
20
20
  className: "ttw:mb-2 ttw:text-lg ttw:font-semibold ttw:text-foreground",
21
- children: p.title
21
+ children: _.title
22
22
  }),
23
23
  /* @__PURE__ */ i("p", {
24
24
  "data-testid": "accept-disclosures-provider-attribution",
@@ -42,15 +42,16 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
42
42
  /* @__PURE__ */ a("div", {
43
43
  className: "ttw:mb-4 ttw:flex ttw:items-start ttw:gap-3",
44
44
  children: [/* @__PURE__ */ i(n, {
45
- id: h,
45
+ id: y,
46
46
  "data-testid": "accept-disclosures-agree-checkbox",
47
47
  checked: l,
48
+ disabled: g,
48
49
  onCheckedChange: (e) => u(e === !0),
49
- "aria-label": p.agreementCheckboxAriaLabel,
50
- "aria-describedby": g,
50
+ "aria-label": _.agreementCheckboxAriaLabel,
51
+ "aria-describedby": b,
51
52
  className: "ttw:mt-1 ttw:shrink-0"
52
53
  }), /* @__PURE__ */ i("p", {
53
- id: g,
54
+ id: b,
54
55
  "data-testid": "accept-disclosures-agreement-text",
55
56
  className: "ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
56
57
  children: s
@@ -59,10 +60,19 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
59
60
  /* @__PURE__ */ i(t, {
60
61
  type: "button",
61
62
  "data-testid": "accept-disclosures-accept-button",
62
- disabled: !l,
63
+ disabled: !l || g,
64
+ "aria-busy": f || void 0,
65
+ "aria-describedby": m ? x : void 0,
63
66
  onClick: d,
64
- children: p.acceptButton
65
- })
67
+ children: _.acceptButton
68
+ }),
69
+ m ? /* @__PURE__ */ i("p", {
70
+ id: x,
71
+ "data-testid": "accept-disclosures-error",
72
+ role: "alert",
73
+ className: "ttw:mt-3 ttw:text-sm ttw:text-destructive",
74
+ children: m
75
+ }) : null
66
76
  ]
67
77
  });
68
78
  }
@@ -4,25 +4,25 @@ import { cloneEmbeddedClient as i, createEmbeddedClient as a } from "./lib/creat
4
4
  import "./lib/rest/client.gen.js";
5
5
  import { EmbedApiProvider as o, useEmbedApi as s } from "./lib/EmbedApiContext.js";
6
6
  import { optionalOrganizationHeaders as c, organizationHeaders as l } from "./lib/organizationHeaders.js";
7
- import { bulkUpdateDepartmentMembers as u, bulkUpdateLocationMembers as d, bulkUpdateRoleMembers as f, createDepartment as p, createLocation as m, createUser as h, deactivateDepartment as g, deactivateLocation as _, deleteCounterpartsId as v, deleteCounterpartsIdBankAccountsId as y, deleteMeasureUnitsId as b, deleteProductsId as x, deleteReceivablesId as S, deleteTagsId as C, downloadBankAccountTransactions as w, getApplicationStatus as T, getApprovalPolicies as E, getBankAccountAccess as D, getDepartment as O, getExternalBankAccountAccess as k, getLocation as A, getUsers as j, listDepartments as M, listLocations as N, listRoles as P, manageBankAccountAccess as F, patchCounterpartsId as I, patchCounterpartsIdAddressesId as L, patchCounterpartsIdBankAccountsId as R, patchMeasureUnitsId as z, patchProductsId as B, patchReceivablesId as V, patchTagsId as H, postCounterparts as U, postCounterpartsIdAddresses as W, postCounterpartsIdBankAccounts as G, postCounterpartsIdBankAccountsIdMakeDefault as K, postMeasureUnits as q, postProducts as J, postReceivables as Y, postReceivablesIdAccept as X, postReceivablesIdCancel as Z, postReceivablesIdClone as Q, postReceivablesIdDecline as $, postReceivablesIdIssue as ee, postReceivablesIdMarkAsPaid as te, postReceivablesIdMarkAsPartiallyPaid as ne, postReceivablesIdMarkAsUncollectible as re, postReceivablesIdSend as ie, postTags as ae, putReceivablesIdLineItems as oe, updateDepartment as se, updateLocation as ce, updateUser as le } from "./lib/rest/sdk.gen.js";
8
- import { fetchWidgetInit as ue } from "./lib/fetchWidgetInit.js";
9
- import { hasAnyScope as de } from "./lib/hasAnyScope.js";
10
- import { acceptDisclosuresMutation as fe, connectExternalBankAccountMutation as pe, createAchMoneyMovementMutation as me, createApplicationMutation as he, createBankAccountMutation as ge, createBookTransferMutation as _e, deleteApprovalPoliciesIdMutation as ve, deleteLedgerAccountsIdMutation as ye, deleteReceiptsIdMutation as be, disableUserMutation as xe, getAnalyticsPayablesOptions as Se, getAnalyticsReceivablesOptions as Ce, getApplicationStatusOptions as we, getApprovalPoliciesOptions as Te, getApprovalPoliciesQueryKey as Ee, getBankAccountAccessQueryKey as De, getBankAccountOptions as Oe, getBankAccountQueryKey as ke, getBankAccountTransactionsOptions as Ae, getBankAccountTransfersOptions as je, getBankAccountTransfersQueryKey as Me, getBankAccountsQueryKey as Ne, getCounterpartsIdAddressesOptions as Pe, getCounterpartsIdAddressesQueryKey as Fe, getCounterpartsIdBankAccountsOptions as Ie, getCounterpartsIdBankAccountsQueryKey as Le, getCounterpartsIdOptions as Re, getCounterpartsIdQueryKey as ze, getCounterpartsOptions as Be, getCounterpartsQueryKey as Ve, getCreditCardByIdOptions as He, getCreditCardsOptions as Ue, getDebitCardByIdOptions as We, getDebitCardsOptions as Ge, getDepartmentOptions as Ke, getDepartmentQueryKey as qe, getEntitiesIdSettingsOptions as Je, getEntitiesIdSettingsQueryKey as Ye, getEntitiesMeOptions as Xe, getEntityUsersMyEntityOptions as Ze, getEntityUsersOptions as Qe, getExternalBankAccountAccessQueryKey as $e, getExternalBankAccountsOptions as et, getExternalBankAccountsQueryKey as tt, getLedgerAccountsQueryKey as nt, getLocationOptions as rt, getLocationQueryKey as it, getMeasureUnitsOptions as at, getMeasureUnitsQueryKey as ot, getPayablesOptions as st, getProductsIdOptions as ct, getProductsIdQueryKey as lt, getProductsOptions as ut, getProductsQueryKey as dt, getReceiptsIdQueryKey as ft, getReceiptsOptions as pt, getReceiptsQueryKey as mt, getReceivablesIdHistoryOptions as ht, getReceivablesIdHistoryQueryKey as gt, getReceivablesIdMailsOptions as _t, getReceivablesIdMailsQueryKey as vt, getReceivablesIdOptions as yt, getReceivablesIdPdfLinkOptions as bt, getReceivablesIdPdfLinkQueryKey as xt, getReceivablesIdQueryKey as St, getReceivablesOptions as Ct, getReceivablesQueryKey as wt, getTagsOptions as Tt, getTagsQueryKey as Et, getTransactionsIdQueryKey as Dt, getTransactionsOptions as Ot, getTransactionsQueryKey as kt, getTransactionsValidationsOptions as At, getTransactionsValidationsQueryKey as jt, getUsersOptions as Mt, getUsersQueryKey as Nt, grantBankAccountAccessMutation as Pt, grantExternalBankAccountAccessMutation as Ft, linkExternalBankAccountMutation as It, listDepartmentsOptions as Lt, listDepartmentsQueryKey as Rt, listLocationsOptions as zt, listLocationsQueryKey as Bt, listRolesQueryKey as Vt, patchApprovalPoliciesIdMutation as Ht, patchEntitiesIdSettingsMutation as Ut, patchLedgerAccountsIdMutation as Wt, patchReceiptsIdMutation as Gt, postApprovalPoliciesMutation as Kt, postLedgerAccountsMutation as qt, putTransactionsValidationsMutation as Jt, submitApplicationMutation as Yt, unlinkExternalBankAccountMutation as Xt, updateApplicationMutation as Zt, updateBankAccountMutation as Qt, updateExternalBankAccountMutation as $t, validateExternalBankAccountMutation as en } from "./lib/rest/@tanstack/react-query.gen.js";
7
+ import { bulkUpdateDepartmentMembers as u, bulkUpdateLocationMembers as d, bulkUpdateRoleMembers as f, createDepartment as p, createLocation as m, createUser as h, deactivateDepartment as g, deactivateLocation as _, deleteCounterpartsId as v, deleteCounterpartsIdBankAccountsId as y, deleteMeasureUnitsId as b, deleteProductsId as x, deleteReceivablesId as S, deleteTagsId as C, downloadBankAccountTransactions as w, getApplicationStatus as T, getApprovalPolicies as E, getBankAccountAccess as D, getDepartment as O, getDisclosures as k, getExternalBankAccountAccess as A, getLocation as j, getUsers as M, listDepartments as N, listLocations as P, listRoles as F, manageBankAccountAccess as I, patchCounterpartsId as L, patchCounterpartsIdAddressesId as R, patchCounterpartsIdBankAccountsId as z, patchMeasureUnitsId as B, patchProductsId as V, patchReceivablesId as H, patchTagsId as U, postApiWidgetGatewayDisclosureAcceptance as W, postCounterparts as G, postCounterpartsIdAddresses as K, postCounterpartsIdBankAccounts as q, postCounterpartsIdBankAccountsIdMakeDefault as J, postMeasureUnits as Y, postProducts as X, postReceivables as Z, postReceivablesIdAccept as Q, postReceivablesIdCancel as $, postReceivablesIdClone as ee, postReceivablesIdDecline as te, postReceivablesIdIssue as ne, postReceivablesIdMarkAsPaid as re, postReceivablesIdMarkAsPartiallyPaid as ie, postReceivablesIdMarkAsUncollectible as ae, postReceivablesIdSend as oe, postTags as se, putReceivablesIdLineItems as ce, updateDepartment as le, updateLocation as ue, updateUser as de } from "./lib/rest/sdk.gen.js";
8
+ import { fetchWidgetInit as fe } from "./lib/fetchWidgetInit.js";
9
+ import { hasAnyScope as pe } from "./lib/hasAnyScope.js";
10
+ import { connectExternalBankAccountMutation as me, createAchMoneyMovementMutation as he, createApplicationMutation as ge, createBankAccountMutation as _e, createBookTransferMutation as ve, deleteApprovalPoliciesIdMutation as ye, deleteLedgerAccountsIdMutation as be, deleteReceiptsIdMutation as xe, disableUserMutation as Se, getAnalyticsPayablesOptions as Ce, getAnalyticsReceivablesOptions as we, getApplicationStatusOptions as Te, getApprovalPoliciesOptions as Ee, getApprovalPoliciesQueryKey as De, getBankAccountAccessQueryKey as Oe, getBankAccountOptions as ke, getBankAccountQueryKey as Ae, getBankAccountTransactionsOptions as je, getBankAccountTransfersOptions as Me, getBankAccountTransfersQueryKey as Ne, getBankAccountsQueryKey as Pe, getCounterpartsIdAddressesOptions as Fe, getCounterpartsIdAddressesQueryKey as Ie, getCounterpartsIdBankAccountsOptions as Le, getCounterpartsIdBankAccountsQueryKey as Re, getCounterpartsIdOptions as ze, getCounterpartsIdQueryKey as Be, getCounterpartsOptions as Ve, getCounterpartsQueryKey as He, getCreditCardByIdOptions as Ue, getCreditCardsOptions as We, getDebitCardByIdOptions as Ge, getDebitCardsOptions as Ke, getDepartmentOptions as qe, getDepartmentQueryKey as Je, getEntitiesIdSettingsOptions as Ye, getEntitiesIdSettingsQueryKey as Xe, getEntitiesMeOptions as Ze, getEntityUsersMyEntityOptions as Qe, getEntityUsersOptions as $e, getExternalBankAccountAccessQueryKey as et, getExternalBankAccountsOptions as tt, getExternalBankAccountsQueryKey as nt, getLedgerAccountsQueryKey as rt, getLocationOptions as it, getLocationQueryKey as at, getMeasureUnitsOptions as ot, getMeasureUnitsQueryKey as st, getPayablesOptions as ct, getProductsIdOptions as lt, getProductsIdQueryKey as ut, getProductsOptions as dt, getProductsQueryKey as ft, getReceiptsIdQueryKey as pt, getReceiptsOptions as mt, getReceiptsQueryKey as ht, getReceivablesIdHistoryOptions as gt, getReceivablesIdHistoryQueryKey as _t, getReceivablesIdMailsOptions as vt, getReceivablesIdMailsQueryKey as yt, getReceivablesIdOptions as bt, getReceivablesIdPdfLinkOptions as xt, getReceivablesIdPdfLinkQueryKey as St, getReceivablesIdQueryKey as Ct, getReceivablesOptions as wt, getReceivablesQueryKey as Tt, getTagsOptions as Et, getTagsQueryKey as Dt, getTransactionsIdQueryKey as Ot, getTransactionsOptions as kt, getTransactionsQueryKey as At, getTransactionsValidationsOptions as jt, getTransactionsValidationsQueryKey as Mt, getUsersOptions as Nt, getUsersQueryKey as Pt, grantBankAccountAccessMutation as Ft, grantExternalBankAccountAccessMutation as It, linkExternalBankAccountMutation as Lt, listDepartmentsOptions as Rt, listDepartmentsQueryKey as zt, listLocationsOptions as Bt, listLocationsQueryKey as Vt, listRolesQueryKey as Ht, patchApprovalPoliciesIdMutation as Ut, patchEntitiesIdSettingsMutation as Wt, patchLedgerAccountsIdMutation as Gt, patchReceiptsIdMutation as Kt, postApprovalPoliciesMutation as qt, postLedgerAccountsMutation as Jt, putTransactionsValidationsMutation as Yt, submitApplicationMutation as Xt, unlinkExternalBankAccountMutation as Zt, updateApplicationMutation as Qt, updateBankAccountMutation as $t, updateExternalBankAccountMutation as en, validateExternalBankAccountMutation as tn } from "./lib/rest/@tanstack/react-query.gen.js";
11
11
  import "./lib/queryKeys.js";
12
- import { withAuthEpoch as tn } from "./lib/withAuthEpoch.js";
13
- import { useCurrentUserQuery as nn } from "./lib/useCurrentUserQuery.js";
14
- import { isApiNotFoundError as rn } from "./lib/isApiNotFoundError.js";
12
+ import { withAuthEpoch as nn } from "./lib/withAuthEpoch.js";
13
+ import { useCurrentUserQuery as rn } from "./lib/useCurrentUserQuery.js";
14
+ import { isApiNotFoundError as an } from "./lib/isApiNotFoundError.js";
15
15
  import "./lib/isUserDataNotFoundError.js";
16
- import { useGetUserDataQuery as an } from "./lib/useGetUserDataQuery.js";
17
- import { useUpsertUserDataMutation as on } from "./lib/useUpsertUserDataMutation.js";
16
+ import { useGetUserDataQuery as on } from "./lib/useGetUserDataQuery.js";
17
+ import { useUpsertUserDataMutation as sn } from "./lib/useUpsertUserDataMutation.js";
18
18
  import "./lib/rest/zod.gen.js";
19
- import { Scope as sn } from "./lib/scopes.js";
20
- import { getAllPagesNextPageParam as cn, getAllPagesNextPaginationTokenParam as ln, isAllPagesResolving as un, useAutoFetchNextPage as dn } from "./lib/allPages.js";
21
- import { useAllBankAccountsQuery as fn } from "./lib/bank-account/useAllBankAccountsQuery.js";
22
- import { useAllExternalBankAccountsQuery as pn } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
23
- import { useLedgerAccountsQuery as mn } from "./lib/reference-data/useLedgerAccountsQuery.js";
24
- import { usePaymentTermsQuery as hn } from "./lib/reference-data/usePaymentTermsQuery.js";
25
- import { useAllOrganizationRolesQuery as gn } from "./lib/role/useAllOrganizationRolesQuery.js";
26
- import { useRolePermissionsQueries as _n } from "./lib/role/useRolePermissionsQueries.js";
27
- import { useAllOrganizationUsersQuery as vn } from "./lib/user/useAllOrganizationUsersQuery.js";
28
- export { o as EmbedApiProvider, sn as Scope, fe as acceptDisclosuresMutation, u as bulkUpdateDepartmentMembers, d as bulkUpdateLocationMembers, f as bulkUpdateRoleMembers, i as cloneEmbeddedClient, pe as connectExternalBankAccountMutation, me as createAchMoneyMovementMutation, he as createApplicationMutation, ge as createBankAccountMutation, _e as createBookTransferMutation, p as createDepartment, a as createEmbeddedClient, m as createLocation, h as createUser, g as deactivateDepartment, _ as deactivateLocation, ve as deleteApprovalPoliciesIdMutation, v as deleteCounterpartsId, y as deleteCounterpartsIdBankAccountsId, ye as deleteLedgerAccountsIdMutation, b as deleteMeasureUnitsId, x as deleteProductsId, be as deleteReceiptsIdMutation, S as deleteReceivablesId, C as deleteTagsId, xe as disableUserMutation, w as downloadBankAccountTransactions, ue as fetchWidgetInit, cn as getAllPagesNextPageParam, ln as getAllPagesNextPaginationTokenParam, Se as getAnalyticsPayablesOptions, Ce as getAnalyticsReceivablesOptions, T as getApplicationStatus, we as getApplicationStatusOptions, E as getApprovalPolicies, Te as getApprovalPoliciesOptions, Ee as getApprovalPoliciesQueryKey, D as getBankAccountAccess, De as getBankAccountAccessQueryKey, Oe as getBankAccountOptions, ke as getBankAccountQueryKey, Ae as getBankAccountTransactionsOptions, je as getBankAccountTransfersOptions, Me as getBankAccountTransfersQueryKey, Ne as getBankAccountsQueryKey, Pe as getCounterpartsIdAddressesOptions, Fe as getCounterpartsIdAddressesQueryKey, Ie as getCounterpartsIdBankAccountsOptions, Le as getCounterpartsIdBankAccountsQueryKey, Re as getCounterpartsIdOptions, ze as getCounterpartsIdQueryKey, Be as getCounterpartsOptions, Ve as getCounterpartsQueryKey, He as getCreditCardByIdOptions, Ue as getCreditCardsOptions, We as getDebitCardByIdOptions, Ge as getDebitCardsOptions, O as getDepartment, Ke as getDepartmentOptions, qe as getDepartmentQueryKey, Je as getEntitiesIdSettingsOptions, Ye as getEntitiesIdSettingsQueryKey, Xe as getEntitiesMeOptions, Ze as getEntityUsersMyEntityOptions, Qe as getEntityUsersOptions, k as getExternalBankAccountAccess, $e as getExternalBankAccountAccessQueryKey, et as getExternalBankAccountsOptions, tt as getExternalBankAccountsQueryKey, nt as getLedgerAccountsQueryKey, A as getLocation, rt as getLocationOptions, it as getLocationQueryKey, at as getMeasureUnitsOptions, ot as getMeasureUnitsQueryKey, st as getPayablesOptions, ct as getProductsIdOptions, lt as getProductsIdQueryKey, ut as getProductsOptions, dt as getProductsQueryKey, ft as getReceiptsIdQueryKey, pt as getReceiptsOptions, mt as getReceiptsQueryKey, ht as getReceivablesIdHistoryOptions, gt as getReceivablesIdHistoryQueryKey, _t as getReceivablesIdMailsOptions, vt as getReceivablesIdMailsQueryKey, yt as getReceivablesIdOptions, bt as getReceivablesIdPdfLinkOptions, xt as getReceivablesIdPdfLinkQueryKey, St as getReceivablesIdQueryKey, Ct as getReceivablesOptions, wt as getReceivablesQueryKey, Tt as getTagsOptions, Et as getTagsQueryKey, Dt as getTransactionsIdQueryKey, Ot as getTransactionsOptions, kt as getTransactionsQueryKey, At as getTransactionsValidationsOptions, jt as getTransactionsValidationsQueryKey, j as getUsers, Mt as getUsersOptions, Nt as getUsersQueryKey, Pt as grantBankAccountAccessMutation, Ft as grantExternalBankAccountAccessMutation, de as hasAnyScope, e as invalidateAllClients, un as isAllPagesResolving, rn as isApiNotFoundError, It as linkExternalBankAccountMutation, M as listDepartments, Lt as listDepartmentsOptions, Rt as listDepartmentsQueryKey, N as listLocations, zt as listLocationsOptions, Bt as listLocationsQueryKey, P as listRoles, Vt as listRolesQueryKey, F as manageBankAccountAccess, c as optionalOrganizationHeaders, l as organizationHeaders, Ht as patchApprovalPoliciesIdMutation, I as patchCounterpartsId, L as patchCounterpartsIdAddressesId, R as patchCounterpartsIdBankAccountsId, Ut as patchEntitiesIdSettingsMutation, Wt as patchLedgerAccountsIdMutation, z as patchMeasureUnitsId, B as patchProductsId, Gt as patchReceiptsIdMutation, V as patchReceivablesId, H as patchTagsId, Kt as postApprovalPoliciesMutation, U as postCounterparts, W as postCounterpartsIdAddresses, G as postCounterpartsIdBankAccounts, K as postCounterpartsIdBankAccountsIdMakeDefault, qt as postLedgerAccountsMutation, q as postMeasureUnits, J as postProducts, Y as postReceivables, X as postReceivablesIdAccept, Z as postReceivablesIdCancel, Q as postReceivablesIdClone, $ as postReceivablesIdDecline, ee as postReceivablesIdIssue, te as postReceivablesIdMarkAsPaid, ne as postReceivablesIdMarkAsPartiallyPaid, re as postReceivablesIdMarkAsUncollectible, ie as postReceivablesIdSend, ae as postTags, oe as putReceivablesIdLineItems, Jt as putTransactionsValidationsMutation, t as registerQueryClient, n as setAllClientsQueriesData, Yt as submitApplicationMutation, Xt as unlinkExternalBankAccountMutation, r as unregisterQueryClient, Zt as updateApplicationMutation, Qt as updateBankAccountMutation, se as updateDepartment, $t as updateExternalBankAccountMutation, ce as updateLocation, le as updateUser, fn as useAllBankAccountsQuery, pn as useAllExternalBankAccountsQuery, gn as useAllOrganizationRolesQuery, vn as useAllOrganizationUsersQuery, dn as useAutoFetchNextPage, nn as useCurrentUserQuery, s as useEmbedApi, an as useGetUserDataQuery, mn as useLedgerAccountsQuery, hn as usePaymentTermsQuery, _n as useRolePermissionsQueries, on as useUpsertUserDataMutation, en as validateExternalBankAccountMutation, tn as withAuthEpoch };
19
+ import { Scope as cn } from "./lib/scopes.js";
20
+ import { getAllPagesNextPageParam as ln, getAllPagesNextPaginationTokenParam as un, isAllPagesResolving as dn, useAutoFetchNextPage as fn } from "./lib/allPages.js";
21
+ import { useAllBankAccountsQuery as pn } from "./lib/bank-account/useAllBankAccountsQuery.js";
22
+ import { useAllExternalBankAccountsQuery as mn } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
23
+ import { useLedgerAccountsQuery as hn } from "./lib/reference-data/useLedgerAccountsQuery.js";
24
+ import { usePaymentTermsQuery as gn } from "./lib/reference-data/usePaymentTermsQuery.js";
25
+ import { useAllOrganizationRolesQuery as _n } from "./lib/role/useAllOrganizationRolesQuery.js";
26
+ import { useRolePermissionsQueries as vn } from "./lib/role/useRolePermissionsQueries.js";
27
+ import { useAllOrganizationUsersQuery as yn } from "./lib/user/useAllOrganizationUsersQuery.js";
28
+ export { o as EmbedApiProvider, cn as Scope, u as bulkUpdateDepartmentMembers, d as bulkUpdateLocationMembers, f as bulkUpdateRoleMembers, i as cloneEmbeddedClient, me as connectExternalBankAccountMutation, he as createAchMoneyMovementMutation, ge as createApplicationMutation, _e as createBankAccountMutation, ve as createBookTransferMutation, p as createDepartment, a as createEmbeddedClient, m as createLocation, h as createUser, g as deactivateDepartment, _ as deactivateLocation, ye as deleteApprovalPoliciesIdMutation, v as deleteCounterpartsId, y as deleteCounterpartsIdBankAccountsId, be as deleteLedgerAccountsIdMutation, b as deleteMeasureUnitsId, x as deleteProductsId, xe as deleteReceiptsIdMutation, S as deleteReceivablesId, C as deleteTagsId, Se as disableUserMutation, w as downloadBankAccountTransactions, fe as fetchWidgetInit, ln as getAllPagesNextPageParam, un as getAllPagesNextPaginationTokenParam, Ce as getAnalyticsPayablesOptions, we as getAnalyticsReceivablesOptions, T as getApplicationStatus, Te as getApplicationStatusOptions, E as getApprovalPolicies, Ee as getApprovalPoliciesOptions, De as getApprovalPoliciesQueryKey, D as getBankAccountAccess, Oe as getBankAccountAccessQueryKey, ke as getBankAccountOptions, Ae as getBankAccountQueryKey, je as getBankAccountTransactionsOptions, Me as getBankAccountTransfersOptions, Ne as getBankAccountTransfersQueryKey, Pe as getBankAccountsQueryKey, Fe as getCounterpartsIdAddressesOptions, Ie as getCounterpartsIdAddressesQueryKey, Le as getCounterpartsIdBankAccountsOptions, Re as getCounterpartsIdBankAccountsQueryKey, ze as getCounterpartsIdOptions, Be as getCounterpartsIdQueryKey, Ve as getCounterpartsOptions, He as getCounterpartsQueryKey, Ue as getCreditCardByIdOptions, We as getCreditCardsOptions, Ge as getDebitCardByIdOptions, Ke as getDebitCardsOptions, O as getDepartment, qe as getDepartmentOptions, Je as getDepartmentQueryKey, k as getDisclosures, Ye as getEntitiesIdSettingsOptions, Xe as getEntitiesIdSettingsQueryKey, Ze as getEntitiesMeOptions, Qe as getEntityUsersMyEntityOptions, $e as getEntityUsersOptions, A as getExternalBankAccountAccess, et as getExternalBankAccountAccessQueryKey, tt as getExternalBankAccountsOptions, nt as getExternalBankAccountsQueryKey, rt as getLedgerAccountsQueryKey, j as getLocation, it as getLocationOptions, at as getLocationQueryKey, ot as getMeasureUnitsOptions, st as getMeasureUnitsQueryKey, ct as getPayablesOptions, lt as getProductsIdOptions, ut as getProductsIdQueryKey, dt as getProductsOptions, ft as getProductsQueryKey, pt as getReceiptsIdQueryKey, mt as getReceiptsOptions, ht as getReceiptsQueryKey, gt as getReceivablesIdHistoryOptions, _t as getReceivablesIdHistoryQueryKey, vt as getReceivablesIdMailsOptions, yt as getReceivablesIdMailsQueryKey, bt as getReceivablesIdOptions, xt as getReceivablesIdPdfLinkOptions, St as getReceivablesIdPdfLinkQueryKey, Ct as getReceivablesIdQueryKey, wt as getReceivablesOptions, Tt as getReceivablesQueryKey, Et as getTagsOptions, Dt as getTagsQueryKey, Ot as getTransactionsIdQueryKey, kt as getTransactionsOptions, At as getTransactionsQueryKey, jt as getTransactionsValidationsOptions, Mt as getTransactionsValidationsQueryKey, M as getUsers, Nt as getUsersOptions, Pt as getUsersQueryKey, Ft as grantBankAccountAccessMutation, It as grantExternalBankAccountAccessMutation, pe as hasAnyScope, e as invalidateAllClients, dn as isAllPagesResolving, an as isApiNotFoundError, Lt as linkExternalBankAccountMutation, N as listDepartments, Rt as listDepartmentsOptions, zt as listDepartmentsQueryKey, P as listLocations, Bt as listLocationsOptions, Vt as listLocationsQueryKey, F as listRoles, Ht as listRolesQueryKey, I as manageBankAccountAccess, c as optionalOrganizationHeaders, l as organizationHeaders, Ut as patchApprovalPoliciesIdMutation, L as patchCounterpartsId, R as patchCounterpartsIdAddressesId, z as patchCounterpartsIdBankAccountsId, Wt as patchEntitiesIdSettingsMutation, Gt as patchLedgerAccountsIdMutation, B as patchMeasureUnitsId, V as patchProductsId, Kt as patchReceiptsIdMutation, H as patchReceivablesId, U as patchTagsId, W as postApiWidgetGatewayDisclosureAcceptance, qt as postApprovalPoliciesMutation, G as postCounterparts, K as postCounterpartsIdAddresses, q as postCounterpartsIdBankAccounts, J as postCounterpartsIdBankAccountsIdMakeDefault, Jt as postLedgerAccountsMutation, Y as postMeasureUnits, X as postProducts, Z as postReceivables, Q as postReceivablesIdAccept, $ as postReceivablesIdCancel, ee as postReceivablesIdClone, te as postReceivablesIdDecline, ne as postReceivablesIdIssue, re as postReceivablesIdMarkAsPaid, ie as postReceivablesIdMarkAsPartiallyPaid, ae as postReceivablesIdMarkAsUncollectible, oe as postReceivablesIdSend, se as postTags, ce as putReceivablesIdLineItems, Yt as putTransactionsValidationsMutation, t as registerQueryClient, n as setAllClientsQueriesData, Xt as submitApplicationMutation, Zt as unlinkExternalBankAccountMutation, r as unregisterQueryClient, Qt as updateApplicationMutation, $t as updateBankAccountMutation, le as updateDepartment, en as updateExternalBankAccountMutation, ue as updateLocation, de as updateUser, pn as useAllBankAccountsQuery, mn as useAllExternalBankAccountsQuery, _n as useAllOrganizationRolesQuery, yn as useAllOrganizationUsersQuery, fn as useAutoFetchNextPage, rn as useCurrentUserQuery, s as useEmbedApi, on as useGetUserDataQuery, hn as useLedgerAccountsQuery, gn as usePaymentTermsQuery, vn as useRolePermissionsQueries, sn as useUpsertUserDataMutation, tn as validateExternalBankAccountMutation, nn as withAuthEpoch };