@tesouro/embedded-components-react 0.5.148 → 0.5.150

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 (64) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index11.js +11 -8
  2. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +5 -2
  3. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +5 -2
  4. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +5 -2
  5. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +21 -18
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +14 -11
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +17 -14
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +6 -3
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +43 -28
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +9 -6
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +6 -3
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +6 -3
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +52 -49
  14. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +7 -4
  15. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +10 -7
  16. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +7 -4
  17. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +5 -2
  18. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +5 -2
  19. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +5 -2
  20. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +12 -6
  21. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +12 -6
  22. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +6 -3
  23. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +6 -3
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +30 -15
  25. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +5 -2
  26. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +6 -3
  27. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +6 -3
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index4.js +6 -3
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +7 -4
  30. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +6 -3
  31. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +6 -3
  32. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +6 -3
  33. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +6 -3
  34. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +7 -4
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +5 -2
  36. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +16 -13
  37. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +12 -6
  38. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +6 -3
  39. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +12 -6
  40. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +9 -6
  41. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +4 -1
  42. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +14 -14
  43. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +15 -12
  44. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +17 -14
  45. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +23 -17
  46. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +6 -3
  47. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +3 -0
  48. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +17 -14
  49. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +19 -16
  50. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +6 -3
  51. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +12 -9
  52. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +19 -16
  53. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +11 -11
  54. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +6 -3
  55. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +99 -98
  56. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +139 -138
  57. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +11 -10
  58. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +6 -3
  60. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +6 -3
  61. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index8.js +6 -3
  62. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +6 -3
  63. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +16 -13
  64. package/package.json +7 -1
@@ -10,14 +10,17 @@ import "../../../../shared/data-access/dist/index.js";
10
10
  import { useQuery as i } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js
12
12
  function a({ enabled: a, ...o } = {}) {
13
- let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(), d = !!(c && l) && (a === !0 || a === void 0), f = e({
13
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l) && (a === !0 || a === void 0), p = e({
14
14
  query: o,
15
15
  client: s,
16
16
  headers: r(c)
17
17
  });
18
18
  return i({
19
- ...t(f, u, { carryWithinOrg: !0 }),
20
- enabled: d
19
+ ...t(p, {
20
+ authEpoch: u,
21
+ organizationPending: d
22
+ }, { carryWithinOrg: !0 }),
23
+ enabled: f
21
24
  });
22
25
  }
23
26
  //#endregion
@@ -9,10 +9,13 @@ import "../../../../shared/data-access/dist/index.js";
9
9
  import { useQuery as r } from "@tanstack/react-query";
10
10
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js
11
11
  function i() {
12
- let { client: i, organizationId: a, widgetToken: o, authEpoch: s } = n(), c = !!(a && o), l = e({ client: i });
12
+ let { client: i, organizationId: a, widgetToken: o, authEpoch: s, organizationPending: c } = n(), l = !!(a && o), u = e({ client: i });
13
13
  return r({
14
- ...t(l, s),
15
- enabled: c
14
+ ...t(u, {
15
+ authEpoch: s,
16
+ organizationPending: c
17
+ }),
18
+ enabled: l
16
19
  });
17
20
  }
18
21
  //#endregion
@@ -9,13 +9,16 @@ import "../../../../shared/data-access/dist/index.js";
9
9
  import { useQuery as r } from "@tanstack/react-query";
10
10
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js
11
11
  function i(i) {
12
- let { client: a, organizationId: o, widgetToken: s, authEpoch: c } = n(), l = !!(o && s && i), u = e({
12
+ let { client: a, organizationId: o, widgetToken: s, authEpoch: c, organizationPending: l } = n(), u = !!(o && s && i), d = e({
13
13
  client: a,
14
14
  path: { entity_id: i ?? "" }
15
15
  });
16
16
  return r({
17
- ...t(u, c),
18
- enabled: l
17
+ ...t(d, {
18
+ authEpoch: c,
19
+ organizationPending: l
20
+ }),
21
+ enabled: u
19
22
  });
20
23
  }
21
24
  //#endregion
@@ -12,10 +12,10 @@ import { queryOptions as a, useQuery as o } from "@tanstack/react-query";
12
12
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js
13
13
  var s = 100;
14
14
  function c({ enabled: c } = {}) {
15
- let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = r(), p = i(u), m = a({
15
+ let { client: l, organizationId: u, widgetToken: d, authEpoch: f, organizationPending: p } = r(), m = i(u), h = a({
16
16
  queryKey: [...t({
17
17
  client: l,
18
- headers: p,
18
+ headers: m,
19
19
  query: { limit: s }
20
20
  }), "all"],
21
21
  queryFn: async ({ signal: t }) => {
@@ -23,7 +23,7 @@ function c({ enabled: c } = {}) {
23
23
  do {
24
24
  let { data: a } = await e({
25
25
  client: l,
26
- headers: p,
26
+ headers: m,
27
27
  query: {
28
28
  limit: s,
29
29
  paginationToken: i
@@ -39,7 +39,10 @@ function c({ enabled: c } = {}) {
39
39
  }
40
40
  });
41
41
  return o({
42
- ...n(m, f),
42
+ ...n(h, {
43
+ authEpoch: f,
44
+ organizationPending: p
45
+ }),
43
46
  enabled: !!(u && d) && (c === !0 || c === void 0)
44
47
  });
45
48
  }
@@ -10,13 +10,16 @@ import "../../../../shared/data-access/dist/index.js";
10
10
  import { useQuery as i } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js
12
12
  function a({ enabled: a, ...o } = {}) {
13
- let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(), d = e({
13
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = e({
14
14
  query: o,
15
15
  client: s,
16
16
  headers: r(c)
17
17
  });
18
18
  return i({
19
- ...t(d, u, { carryWithinOrg: !0 }),
19
+ ...t(f, {
20
+ authEpoch: u,
21
+ organizationPending: d
22
+ }, { carryWithinOrg: !0 }),
20
23
  enabled: !!(c && l) && (a === !0 || a === void 0)
21
24
  });
22
25
  }
@@ -28,20 +28,23 @@ function b(e, t) {
28
28
  };
29
29
  }
30
30
  function x({ objectType: t = f.Payable, enabled: r = !0 } = {}) {
31
- let { client: i, organizationId: o, widgetToken: s, authEpoch: p } = c(), g = o, _ = !!(g && s) && r, y = { "x-organization-id": g ?? "" }, b = { object_type: t }, x = n({
31
+ let { client: i, organizationId: o, widgetToken: s, authEpoch: p, organizationPending: g } = c(), _ = o, y = !!(_ && s) && r, b = { "x-organization-id": _ ?? "" }, x = { object_type: t }, S = n({
32
32
  client: i,
33
- headers: y,
34
- query: b
35
- }), S = h({
36
- queryKey: [...a(x, p).queryKey, "all"],
37
- enabled: _,
33
+ headers: b,
34
+ query: x
35
+ }), C = h({
36
+ queryKey: [...a(S, {
37
+ authEpoch: p,
38
+ organizationPending: g
39
+ }).queryKey, "all"],
40
+ enabled: y,
38
41
  initialPageParam: void 0,
39
42
  queryFn: async ({ signal: t, pageParam: n }) => {
40
43
  let { data: r } = await e({
41
44
  client: i,
42
- headers: y,
45
+ headers: b,
43
46
  query: n ? { pagination_token: n } : {
44
- ...b,
47
+ ...x,
45
48
  limit: v
46
49
  },
47
50
  signal: t,
@@ -51,12 +54,12 @@ function x({ objectType: t = f.Payable, enabled: r = !0 } = {}) {
51
54
  },
52
55
  getNextPageParam: l
53
56
  });
54
- d(S, _);
55
- let C = m(() => S.data ? { data: S.data.pages.flatMap((e) => e.data ?? []) } : void 0, [S.data]);
57
+ d(C, y);
58
+ let w = m(() => C.data ? { data: C.data.pages.flatMap((e) => e.data ?? []) } : void 0, [C.data]);
56
59
  return {
57
- ...S,
58
- data: C,
59
- isResolving: u(S)
60
+ ...C,
61
+ data: w,
62
+ isResolving: u(C)
60
63
  };
61
64
  }
62
65
  function S({ objectType: e = f.Payable } = {}) {
@@ -14,25 +14,31 @@ import { useMemo as d } from "react";
14
14
  import { useMutation as f, useQuery as p } from "@tanstack/react-query";
15
15
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js
16
16
  function m({ enabled: e, ...t } = {}) {
17
- let { client: n, organizationId: r, widgetToken: o, authEpoch: l } = s(), u = !!(r && o) && (e === !0 || e === void 0), d = i({
17
+ let { client: n, organizationId: r, widgetToken: o, authEpoch: l, organizationPending: u } = s(), d = !!(r && o) && (e === !0 || e === void 0), f = i({
18
18
  query: t,
19
19
  client: n,
20
20
  headers: c(r)
21
21
  });
22
22
  return p({
23
- ...a(d, l, { carryWithinOrg: !0 }),
24
- enabled: u
23
+ ...a(f, {
24
+ authEpoch: l,
25
+ organizationPending: u
26
+ }, { carryWithinOrg: !0 }),
27
+ enabled: d
25
28
  });
26
29
  }
27
30
  function h(e) {
28
- let { client: t, organizationId: n, widgetToken: i, authEpoch: o } = s(), l = !!(n && i && e), u = r({
31
+ let { client: t, organizationId: n, widgetToken: i, authEpoch: o, organizationPending: l } = s(), u = !!(n && i && e), d = r({
29
32
  client: t,
30
33
  headers: c(n),
31
34
  path: { counterpart_id: e ?? "" }
32
35
  });
33
36
  return p({
34
- ...a(u, o),
35
- enabled: l
37
+ ...a(d, {
38
+ authEpoch: o,
39
+ organizationPending: l
40
+ }),
41
+ enabled: u
36
42
  });
37
43
  }
38
44
  function g() {
@@ -13,14 +13,17 @@ import { counterpartBankAccountsInvalidationKey as l, counterpartInvalidationKey
13
13
  import { useMutation as d, useQuery as f } from "@tanstack/react-query";
14
14
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js
15
15
  function p(e, { enabled: t = !0 } = {}) {
16
- let { client: n, organizationId: r, widgetToken: o, authEpoch: l } = s(), u = !!(t && r && o && e), d = i({
16
+ let { client: n, organizationId: r, widgetToken: o, authEpoch: l, organizationPending: u } = s(), d = !!(t && r && o && e), p = i({
17
17
  client: n,
18
18
  headers: c(r),
19
19
  path: { counterpart_id: e ?? "" }
20
20
  });
21
21
  return f({
22
- ...a(d, l),
23
- enabled: u
22
+ ...a(p, {
23
+ authEpoch: l,
24
+ organizationPending: u
25
+ }),
26
+ enabled: d
24
27
  });
25
28
  }
26
29
  function m() {
@@ -13,25 +13,31 @@ import { counterpartAddressesInvalidationKey as s, counterpartInvalidationKey as
13
13
  import { useMutation as l, useQueries as u, useQuery as d } from "@tanstack/react-query";
14
14
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js
15
15
  function f(e) {
16
- let { client: t, organizationId: i, widgetToken: s, authEpoch: c } = a(), l = !!(i && s && e), u = n({
16
+ let { client: t, organizationId: i, widgetToken: s, authEpoch: c, organizationPending: l } = a(), u = !!(i && s && e), f = n({
17
17
  client: t,
18
18
  headers: o(i),
19
19
  path: { counterpart_id: e ?? "" }
20
20
  });
21
21
  return d({
22
- ...r(u, c),
23
- enabled: l
22
+ ...r(f, {
23
+ authEpoch: c,
24
+ organizationPending: l
25
+ }),
26
+ enabled: u
24
27
  });
25
28
  }
26
29
  function p({ counterpartIds: e, enabled: t }) {
27
- let { client: i, organizationId: s, widgetToken: c, authEpoch: l } = a(), d = !!(s && c) && e.length > 0 && (t === !0 || t === void 0);
30
+ let { client: i, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: d } = a(), f = !!(s && c) && e.length > 0 && (t === !0 || t === void 0);
28
31
  return u({ queries: e.map((e) => ({
29
32
  ...r(n({
30
33
  client: i,
31
34
  headers: o(s),
32
35
  path: { counterpart_id: e }
33
- }), l),
34
- enabled: d && !!e
36
+ }), {
37
+ authEpoch: l,
38
+ organizationPending: d
39
+ }),
40
+ enabled: f && !!e
35
41
  })) });
36
42
  }
37
43
  function m() {
@@ -8,24 +8,27 @@ import { jsx as i } from "react/jsx-runtime";
8
8
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js
9
9
  var a = t({
10
10
  client: e,
11
- authEpoch: 0
11
+ authEpoch: 0,
12
+ organizationPending: !1
12
13
  });
13
- function o({ children: e, client: t, widgetToken: n, organizationId: o, installClientSecret: s, authEpoch: c }) {
14
- let l = r(() => ({
14
+ function o({ children: e, client: t, widgetToken: n, organizationId: o, installClientSecret: s, authEpoch: c, organizationPending: l }) {
15
+ let u = r(() => ({
15
16
  client: t,
16
17
  organizationId: o,
17
18
  widgetToken: n,
18
19
  installClientSecret: s,
19
- authEpoch: c
20
+ authEpoch: c,
21
+ organizationPending: l
20
22
  }), [
21
23
  t,
22
24
  o,
23
25
  n,
24
26
  s,
25
- c
27
+ c,
28
+ l
26
29
  ]);
27
30
  return /* @__PURE__ */ i(a.Provider, {
28
- value: l,
31
+ value: u,
29
32
  children: e
30
33
  });
31
34
  }
@@ -7,7 +7,10 @@ function i({ client: t }) {
7
7
  return e({ client: t }).queryKey;
8
8
  }
9
9
  function a({ client: i, widgetToken: a, authEpoch: o }) {
10
- let { queryFn: s, queryKey: c } = e({ client: i }), { placeholderData: l } = t({ queryKey: c }, o);
10
+ let { queryFn: s, queryKey: c } = e({ client: i }), { placeholderData: l } = t({ queryKey: c }, {
11
+ authEpoch: o,
12
+ organizationPending: !1
13
+ });
11
14
  return {
12
15
  queryKey: [
13
16
  c[0],
@@ -13,19 +13,19 @@ import { useInfiniteQuery as c } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js
14
14
  var l = 100;
15
15
  function u({ enabled: u } = {}) {
16
- let { client: d, organizationId: f, widgetToken: p, authEpoch: m } = r(), h = i(f), g = !!(f && p) && (u === !0 || u === void 0), _ = [...t({
16
+ let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = [...t({
17
17
  client: d,
18
- headers: h,
18
+ headers: g,
19
19
  query: { limit: l }
20
- }).queryKey, "all"], v = c({
21
- queryKey: [..._, { authEpoch: m }],
22
- placeholderData: n(_),
23
- enabled: g,
20
+ }).queryKey, "all"], y = c({
21
+ queryKey: [...v, { authEpoch: m }],
22
+ placeholderData: n(v, h),
23
+ enabled: _,
24
24
  initialPageParam: void 0,
25
25
  queryFn: async ({ signal: t, pageParam: n }) => {
26
26
  let { data: r } = await e({
27
27
  client: d,
28
- headers: h,
28
+ headers: g,
29
29
  query: {
30
30
  limit: l,
31
31
  ...n ? { pagination_token: n } : {}
@@ -37,17 +37,17 @@ function u({ enabled: u } = {}) {
37
37
  },
38
38
  getNextPageParam: a
39
39
  });
40
- o(v, g);
41
- let y = s(() => {
42
- if (v.data) return {
43
- data: v.data.pages.flatMap((e) => e.data ?? []),
40
+ o(y, _);
41
+ let b = s(() => {
42
+ if (y.data) return {
43
+ data: y.data.pages.flatMap((e) => e.data ?? []),
44
44
  nextPaginationToken: null,
45
45
  prevPaginationToken: null
46
46
  };
47
- }, [v.data]);
47
+ }, [y.data]);
48
48
  return {
49
- ...v,
50
- data: y
49
+ ...y,
50
+ data: b
51
51
  };
52
52
  }
53
53
  //#endregion
@@ -13,31 +13,34 @@ function i(e) {
13
13
  return (t >>> 0).toString(16);
14
14
  }
15
15
  function a({ invitationToken: a, userId: o, enabled: s } = {}) {
16
- let { client: c, widgetToken: l, authEpoch: u } = n(), d = a && o ? {
16
+ let { client: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = a && o ? {
17
17
  invitationToken: a,
18
18
  userId: o
19
- } : void 0, f = async ({ signal: t }) => {
19
+ } : void 0, p = async ({ signal: t }) => {
20
20
  let { data: n } = await e({
21
21
  client: c,
22
22
  headers: { "X-Widget-Token": l ?? "" },
23
- ...d ? { query: d } : {},
23
+ ...f ? { query: f } : {},
24
24
  signal: t,
25
25
  throwOnError: !0
26
26
  });
27
27
  if (!n) throw Error("Unexpected disclosures response from widget gateway");
28
28
  return n;
29
- }, p = ["getDisclosures", {
29
+ }, m = ["getDisclosures", {
30
30
  baseUrl: c.getConfig().baseUrl,
31
31
  ...o ? { userId: o } : {},
32
- ...d ? { invitationTokenFingerprint: i(d.invitationToken) } : {}
33
- }], { queryKey: m, placeholderData: h } = t({
34
- queryKey: p,
35
- queryFn: f
36
- }, u);
37
- return r({
32
+ ...f ? { invitationTokenFingerprint: i(f.invitationToken) } : {}
33
+ }], { queryKey: h, placeholderData: g } = t({
38
34
  queryKey: m,
39
- queryFn: f,
40
- placeholderData: h,
35
+ queryFn: p
36
+ }, {
37
+ authEpoch: u,
38
+ organizationPending: d
39
+ });
40
+ return r({
41
+ queryKey: h,
42
+ queryFn: p,
43
+ placeholderData: g,
41
44
  enabled: !!l && (s === !0 || s === void 0)
42
45
  });
43
46
  }
@@ -12,18 +12,21 @@ import { useMemo as c } from "react";
12
12
  import { useInfiniteQuery as l } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js
14
14
  function u({ enabled: u } = {}) {
15
- let { client: d, organizationId: f, widgetToken: p, authEpoch: m } = r(), h = i(f), g = !!(f && p) && (u === !0 || u === void 0), _ = t({
15
+ let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = t({
16
16
  client: d,
17
- headers: h,
17
+ headers: g,
18
18
  query: { active: !0 }
19
- }), v = l({
20
- queryKey: [...n(_, m).queryKey, "all"],
21
- enabled: g,
19
+ }), y = l({
20
+ queryKey: [...n(v, {
21
+ authEpoch: m,
22
+ organizationPending: h
23
+ }).queryKey, "all"],
24
+ enabled: _,
22
25
  initialPageParam: void 0,
23
26
  queryFn: async ({ signal: t, pageParam: n }) => {
24
27
  let { data: r } = await e({
25
28
  client: d,
26
- headers: h,
29
+ headers: g,
27
30
  query: {
28
31
  active: !0,
29
32
  ...n ? { pagination_token: n } : {}
@@ -35,18 +38,18 @@ function u({ enabled: u } = {}) {
35
38
  },
36
39
  getNextPageParam: a
37
40
  });
38
- s(v, g);
39
- let y = c(() => {
40
- if (v.data) return {
41
- data: v.data.pages.flatMap((e) => e.data ?? []),
41
+ s(y, _);
42
+ let b = c(() => {
43
+ if (y.data) return {
44
+ data: y.data.pages.flatMap((e) => e.data ?? []),
42
45
  nextPaginationToken: null,
43
46
  prevPaginationToken: null
44
47
  };
45
- }, [v.data]);
48
+ }, [y.data]);
46
49
  return {
47
- ...v,
48
- data: y,
49
- isResolving: o(v)
50
+ ...y,
51
+ data: b,
52
+ isResolving: o(y)
50
53
  };
51
54
  }
52
55
  //#endregion
@@ -13,29 +13,35 @@ import { useInfiniteQuery as l, useQuery as u } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js
14
14
  var d = 250;
15
15
  function f({ enabled: e, ...a } = {}) {
16
- let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = r(), d = !!(s && c) && (e === !0 || e === void 0), f = t({
16
+ let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: d } = r(), f = !!(s && c) && (e === !0 || e === void 0), p = t({
17
17
  client: o,
18
18
  headers: i(s),
19
19
  query: a
20
20
  });
21
21
  return u({
22
- ...n(f, l),
23
- enabled: d
22
+ ...n(p, {
23
+ authEpoch: l,
24
+ organizationPending: d
25
+ }),
26
+ enabled: f
24
27
  });
25
28
  }
26
29
  function p({ enabled: u } = {}) {
27
- let { client: f, organizationId: p, widgetToken: m, authEpoch: h } = r(), g = i(p), _ = !!(p && m) && (u === !0 || u === void 0), v = t({
30
+ let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationPending: g } = r(), _ = i(p), v = !!(p && m) && (u === !0 || u === void 0), y = t({
28
31
  client: f,
29
- headers: g,
32
+ headers: _,
30
33
  query: { limit: d }
31
- }), y = l({
32
- queryKey: [...n(v, h).queryKey, "all"],
33
- enabled: _,
34
+ }), b = l({
35
+ queryKey: [...n(y, {
36
+ authEpoch: h,
37
+ organizationPending: g
38
+ }).queryKey, "all"],
39
+ enabled: v,
34
40
  initialPageParam: void 0,
35
41
  queryFn: async ({ signal: t, pageParam: n }) => {
36
42
  let { data: r } = await e({
37
43
  client: f,
38
- headers: g,
44
+ headers: _,
39
45
  query: {
40
46
  limit: d,
41
47
  ...n ? { pagination_token: n } : {}
@@ -47,18 +53,18 @@ function p({ enabled: u } = {}) {
47
53
  },
48
54
  getNextPageParam: a
49
55
  });
50
- s(y, _);
51
- let b = c(() => {
52
- if (y.data) return {
53
- data: y.data.pages.flatMap((e) => e.data ?? []),
56
+ s(b, v);
57
+ let x = c(() => {
58
+ if (b.data) return {
59
+ data: b.data.pages.flatMap((e) => e.data ?? []),
54
60
  next_pagination_token: void 0,
55
61
  prev_pagination_token: void 0
56
62
  };
57
- }, [y.data]);
63
+ }, [b.data]);
58
64
  return {
59
- ...y,
60
- data: b,
61
- isResolving: o(y)
65
+ ...b,
66
+ data: x,
67
+ isResolving: o(b)
62
68
  };
63
69
  }
64
70
  //#endregion
@@ -9,13 +9,16 @@ import { organizationHeaders as r } from "../organizationHeaders.js";
9
9
  import { useQuery as i } from "@tanstack/react-query";
10
10
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js
11
11
  function a({ enabled: a } = {}) {
12
- let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = n(), u = !!(s && c) && (a === !0 || a === void 0), d = e({
12
+ let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c) && (a === !0 || a === void 0), f = e({
13
13
  client: o,
14
14
  headers: r(s)
15
15
  });
16
16
  return i({
17
- ...t(d, l),
18
- enabled: u
17
+ ...t(f, {
18
+ authEpoch: l,
19
+ organizationPending: u
20
+ }),
21
+ enabled: d
19
22
  });
20
23
  }
21
24
  //#endregion
@@ -363,7 +363,10 @@ var Fe = e.object({
363
363
  "CANCELED",
364
364
  "DENIED"
365
365
  ]), ze = e.object({
366
+ canceled: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
366
367
  complete: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
368
+ deleted: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
369
+ denied: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
367
370
  draft: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
368
371
  submitted: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
369
372
  total: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional()
@@ -13,18 +13,21 @@ import { useInfiniteQuery as l } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js
14
14
  var u = 100;
15
15
  function d({ enabled: d } = {}) {
16
- let { client: f, organizationId: p, widgetToken: m, authEpoch: h } = r(), g = i(p), _ = !!(p && m) && (d === !0 || d === void 0), v = t({
16
+ let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationPending: g } = r(), _ = i(p), v = !!(p && m) && (d === !0 || d === void 0), y = t({
17
17
  client: f,
18
- headers: g,
18
+ headers: _,
19
19
  query: { limit: u }
20
- }), y = l({
21
- queryKey: [...n(v, h).queryKey, "all"],
22
- enabled: _,
20
+ }), b = l({
21
+ queryKey: [...n(y, {
22
+ authEpoch: h,
23
+ organizationPending: g
24
+ }).queryKey, "all"],
25
+ enabled: v,
23
26
  initialPageParam: void 0,
24
27
  queryFn: async ({ signal: t, pageParam: n }) => {
25
28
  let { data: r } = await e({
26
29
  client: f,
27
- headers: g,
30
+ headers: _,
28
31
  query: {
29
32
  limit: u,
30
33
  ...n ? { paginationToken: n } : {}
@@ -36,18 +39,18 @@ function d({ enabled: d } = {}) {
36
39
  },
37
40
  getNextPageParam: a
38
41
  });
39
- s(y, _);
40
- let b = c(() => {
41
- if (y.data) return {
42
- data: y.data.pages.flatMap((e) => e.data ?? []),
42
+ s(b, v);
43
+ let x = c(() => {
44
+ if (b.data) return {
45
+ data: b.data.pages.flatMap((e) => e.data ?? []),
43
46
  nextPaginationToken: null,
44
47
  prevPaginationToken: null
45
48
  };
46
- }, [y.data]);
49
+ }, [b.data]);
47
50
  return {
48
- ...y,
49
- data: b,
50
- isResolving: o(y)
51
+ ...b,
52
+ data: x,
53
+ isResolving: o(b)
51
54
  };
52
55
  }
53
56
  //#endregion