@tesouro/embedded-components-react 0.5.176 → 0.5.178

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 (20) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +47 -46
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +36 -35
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +31 -30
  4. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +17 -20
  5. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +28 -30
  6. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +20 -23
  7. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +31 -33
  8. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +29 -31
  9. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +36 -38
  10. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +29 -31
  11. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +36 -38
  12. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -46
  13. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +33 -33
  14. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +27 -29
  15. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -27
  16. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +38 -37
  17. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -30
  18. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -32
  19. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  20. package/package.json +1 -1
@@ -4,42 +4,43 @@
4
4
  "use client";
5
5
  import { getUsers as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getUsersOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
- import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
- import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { authEpochPlaceholder as n, withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
- import { useEffect as a, useMemo as o } from "react";
12
- import { useInfiniteQuery as s } from "@tanstack/react-query";
11
+ import { useEffect as o, useMemo as s } from "react";
12
+ import { useInfiniteQuery as c } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
14
- var c = 100, l = ["ACTIVE", "INVITED"];
15
- function u(l, u, d) {
16
- let { client: f, organizationId: p, authEpoch: m, organizationPending: h } = r(), g = i(p), _ = d?.length ? { Permissions: d } : {}, v = t({
17
- client: f,
18
- headers: g,
14
+ var l = 100, u = ["ACTIVE", "INVITED"];
15
+ function d(u, d, f) {
16
+ let { client: p, organizationId: m, authEpoch: h, organizationPending: g } = i(), _ = a(m), v = f?.length ? { Permissions: f } : {}, y = t({
17
+ client: p,
18
+ headers: _,
19
19
  query: {
20
- Status: l,
21
- Limit: c,
22
- ..._
20
+ Status: u,
21
+ Limit: l,
22
+ ...v
23
23
  }
24
- }), y = s({
24
+ }), b = c({
25
25
  queryKey: [
26
- ...n(v, {
27
- authEpoch: m,
28
- organizationPending: h
26
+ ...r(y, {
27
+ authEpoch: h,
28
+ organizationPending: g
29
29
  }).queryKey,
30
30
  "all",
31
- l
31
+ u
32
32
  ],
33
- enabled: u,
33
+ placeholderData: n(y.queryKey, g),
34
+ enabled: d,
34
35
  initialPageParam: void 0,
35
36
  queryFn: async ({ signal: t, pageParam: n }) => {
36
37
  let { data: r } = await e({
37
- client: f,
38
- headers: g,
38
+ client: p,
39
+ headers: _,
39
40
  query: {
40
- Status: l,
41
- Limit: c,
42
- ..._,
41
+ Status: u,
42
+ Limit: l,
43
+ ...v,
43
44
  ...n ? { PaginationToken: n } : {}
44
45
  },
45
46
  signal: t,
@@ -52,32 +53,32 @@ function u(l, u, d) {
52
53
  if (!(i === void 0 || r.includes(i))) return i;
53
54
  }
54
55
  });
55
- a(() => {
56
- u && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
56
+ o(() => {
57
+ d && b.hasNextPage && !b.isFetchingNextPage && !b.isError && b.fetchNextPage();
57
58
  }, [
58
- u,
59
- y.hasNextPage,
60
- y.isFetchingNextPage,
61
- y.isError,
62
- y.fetchNextPage
59
+ d,
60
+ b.hasNextPage,
61
+ b.isFetchingNextPage,
62
+ b.isError,
63
+ b.fetchNextPage
63
64
  ]);
64
- let b = o(() => {
65
- if (y.data) return {
66
- data: y.data.pages.flatMap((e) => e.data ?? []),
65
+ let x = s(() => {
66
+ if (b.data) return {
67
+ data: b.data.pages.flatMap((e) => e.data ?? []),
67
68
  nextPaginationToken: null,
68
69
  prevPaginationToken: null
69
70
  };
70
- }, [y.data]);
71
+ }, [b.data]);
71
72
  return {
72
- ...y,
73
- data: b
73
+ ...b,
74
+ data: x
74
75
  };
75
76
  }
76
- function d({ enabled: e, permissions: t } = {}) {
77
- let { organizationId: n, widgetToken: i } = r(), a = !!(n && i) && (e === !0 || e === void 0), s = u("ACTIVE", a, t), c = u("INVITED", a, t), d = o(() => {
77
+ function f({ enabled: e, permissions: t } = {}) {
78
+ let { organizationId: n, widgetToken: r } = i(), a = !!(n && r) && (e === !0 || e === void 0), o = d("ACTIVE", a, t), c = d("INVITED", a, t), l = s(() => {
78
79
  let e = /* @__PURE__ */ new Map();
79
- for (let t of l) {
80
- let n = t === "ACTIVE" ? s.data?.data ?? [] : c.data?.data ?? [];
80
+ for (let t of u) {
81
+ let n = t === "ACTIVE" ? o.data?.data ?? [] : c.data?.data ?? [];
81
82
  for (let t of n) e.set(t.id, t);
82
83
  }
83
84
  return {
@@ -85,16 +86,16 @@ function d({ enabled: e, permissions: t } = {}) {
85
86
  nextPaginationToken: null,
86
87
  prevPaginationToken: null
87
88
  };
88
- }, [s.data, c.data]), f = s.isLoading || c.isLoading, p = s.isFetchingNextPage || c.isFetchingNextPage, m = s.hasNextPage || c.hasNextPage, h = s.isError || c.isError;
89
+ }, [o.data, c.data]), f = o.isLoading || c.isLoading, p = o.isFetchingNextPage || c.isFetchingNextPage, m = o.hasNextPage || c.hasNextPage, h = o.isError || c.isError;
89
90
  return {
90
- ...s,
91
- data: d,
91
+ ...o,
92
+ data: l,
92
93
  isLoading: f,
93
94
  isFetchingNextPage: p,
94
95
  hasNextPage: m,
95
96
  isError: h,
96
- isSuccess: s.isSuccess && c.isSuccess
97
+ isSuccess: o.isSuccess && c.isSuccess
97
98
  };
98
99
  }
99
100
  //#endregion
100
- export { d as useAllOrganizationUsersQuery };
101
+ export { f as useAllOrganizationUsersQuery };
@@ -4,36 +4,37 @@
4
4
  "use client";
5
5
  import { getPayablesIdLineItems as e, putPayablesIdLineItems as t } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getPayablesIdLineItemsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
- import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
- import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
- import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
7
+ import { authEpochPlaceholder as r, withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as a } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as o } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
+ import { getAllPagesNextPaginationTokenParam as s, isAllPagesResolving as c, useAutoFetchNextPage as l } from "../../../shared/data-access/dist/lib/allPages.js";
11
11
  import "../../../shared/data-access/dist/index.js";
12
- import { invalidatePayableQueries as l } from "./index6.js";
13
- import { useMemo as u } from "react";
14
- import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
12
+ import { invalidatePayableQueries as u } from "./index6.js";
13
+ import { useMemo as d } from "react";
14
+ import { useInfiniteQuery as f, useMutation as p } from "@tanstack/react-query";
15
15
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
16
- var p = 100;
17
- function m(t, { enabled: l } = {}) {
18
- let { client: f, organizationId: m, widgetToken: h, authEpoch: g, organizationPending: _ } = i(), v = a(m), y = !!(m && h && t) && l !== !1, b = n({
19
- client: f,
20
- headers: v,
16
+ var m = 100;
17
+ function h(t, { enabled: u } = {}) {
18
+ let { client: p, organizationId: h, widgetToken: g, authEpoch: _, organizationPending: v } = a(), y = o(h), b = !!(h && g && t) && u !== !1, x = n({
19
+ client: p,
20
+ headers: y,
21
21
  path: { payable_id: t ?? "" },
22
- query: { limit: p }
23
- }), x = d({
24
- queryKey: [...r(b, {
25
- authEpoch: g,
26
- organizationPending: _
22
+ query: { limit: m }
23
+ }), S = f({
24
+ queryKey: [...i(x, {
25
+ authEpoch: _,
26
+ organizationPending: v
27
27
  }).queryKey, "all"],
28
- enabled: y,
28
+ placeholderData: r(x.queryKey, v),
29
+ enabled: b,
29
30
  initialPageParam: void 0,
30
31
  queryFn: async ({ signal: n, pageParam: r }) => {
31
32
  let { data: i } = await e({
32
- client: f,
33
- headers: v,
33
+ client: p,
34
+ headers: y,
34
35
  path: { payable_id: t ?? "" },
35
36
  query: {
36
- limit: p,
37
+ limit: m,
37
38
  ...r ? { pagination_token: r } : {}
38
39
  },
39
40
  signal: n,
@@ -41,31 +42,31 @@ function m(t, { enabled: l } = {}) {
41
42
  });
42
43
  return i;
43
44
  },
44
- getNextPageParam: o
45
+ getNextPageParam: s
45
46
  });
46
- c(x, y);
47
- let S = u(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
47
+ l(S, b);
48
+ let C = d(() => S.data?.pages.flatMap((e) => e.data ?? []) ?? [], [S.data]);
48
49
  return {
49
- ...x,
50
- lineItems: S,
51
- isResolving: s(x)
50
+ ...S,
51
+ lineItems: C,
52
+ isResolving: c(S)
52
53
  };
53
54
  }
54
- function h() {
55
- let { client: e, organizationId: n } = i();
56
- return f({
55
+ function g() {
56
+ let { client: e, organizationId: n } = a();
57
+ return p({
57
58
  mutationFn: async ({ path: r, body: i }) => {
58
- let { data: o } = await t({
59
+ let { data: a } = await t({
59
60
  client: e,
60
- headers: a(n),
61
+ headers: o(n),
61
62
  path: r,
62
63
  body: i,
63
64
  throwOnError: !0
64
65
  });
65
- return o;
66
+ return a;
66
67
  },
67
68
  onSuccess: async (t, r) => {
68
- await l({
69
+ await u({
69
70
  client: e,
70
71
  organizationId: n,
71
72
  payableId: r.path.payable_id,
@@ -75,4 +76,4 @@ function h() {
75
76
  });
76
77
  }
77
78
  //#endregion
78
- export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };
79
+ export { h as useAllPayableLineItemsQuery, g as useReplacePayableLineItemsMutation };
@@ -4,38 +4,39 @@
4
4
  "use client";
5
5
  import { getPaymentRecords as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getPaymentRecordsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
- import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
- import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
- import { getAllPagesNextPaginationTokenParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../../../shared/data-access/dist/lib/allPages.js";
7
+ import { authEpochPlaceholder as n, withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
+ import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
11
11
  import "../../../shared/data-access/dist/index.js";
12
- import { useMemo as c } from "react";
13
- import { useInfiniteQuery as l } from "@tanstack/react-query";
12
+ import { useMemo as l } from "react";
13
+ import { useInfiniteQuery as u } from "@tanstack/react-query";
14
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
15
- var u = 100;
16
- function d(d, { enabled: f } = {}) {
17
- let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationPending: _ } = r(), v = i(m), y = !!(m && h && d) && f !== !1, b = {
18
- limit: u,
19
- object_id__in: d ? [d] : [],
15
+ var d = 100;
16
+ function f(f, { enabled: p } = {}) {
17
+ let { client: m, organizationId: h, widgetToken: g, authEpoch: _, organizationPending: v } = i(), y = a(h), b = !!(h && g && f) && p !== !1, x = {
18
+ limit: d,
19
+ object_id__in: f ? [f] : [],
20
20
  order: "desc",
21
21
  sort: "paid_at"
22
- }, x = t({
23
- client: p,
24
- headers: v,
25
- query: b
26
- }), S = l({
27
- queryKey: [...n(x, {
28
- authEpoch: g,
29
- organizationPending: _
22
+ }, S = t({
23
+ client: m,
24
+ headers: y,
25
+ query: x
26
+ }), C = u({
27
+ queryKey: [...r(S, {
28
+ authEpoch: _,
29
+ organizationPending: v
30
30
  }).queryKey, "all"],
31
- enabled: y,
31
+ placeholderData: n(S.queryKey, v),
32
+ enabled: b,
32
33
  initialPageParam: void 0,
33
34
  queryFn: async ({ signal: t, pageParam: n }) => {
34
35
  let { data: r } = await e({
35
- client: p,
36
- headers: v,
36
+ client: m,
37
+ headers: y,
37
38
  query: {
38
- ...b,
39
+ ...x,
39
40
  ...n ? { pagination_token: n } : {}
40
41
  },
41
42
  signal: t,
@@ -43,15 +44,15 @@ function d(d, { enabled: f } = {}) {
43
44
  });
44
45
  return r;
45
46
  },
46
- getNextPageParam: a
47
+ getNextPageParam: o
47
48
  });
48
- s(S, y);
49
- let C = c(() => S.data?.pages.flatMap((e) => e.data ?? []) ?? [], [S.data]);
49
+ c(C, b);
50
+ let w = l(() => C.data?.pages.flatMap((e) => e.data ?? []) ?? [], [C.data]);
50
51
  return {
51
- ...S,
52
- paymentRecords: C,
53
- isResolving: y && o(S)
52
+ ...C,
53
+ paymentRecords: w,
54
+ isResolving: b && s(C)
54
55
  };
55
56
  }
56
57
  //#endregion
57
- export { d as usePayablePaymentRecordsQuery };
58
+ export { f as usePayablePaymentRecordsQuery };
@@ -4,34 +4,31 @@
4
4
  "use client";
5
5
  import { getCounterparts as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getCounterpartsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
9
- import { getAllPagesNextPaginationTokenParam as i, useAutoFetchNextPage as a } from "../../../shared/data-access/dist/lib/allPages.js";
7
+ import { authEpochPlaceholder as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
+ import { getAllPagesNextPaginationTokenParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
10
11
  import "../../../shared/data-access/dist/index.js";
11
- import { hashKey as o, useInfiniteQuery as s } from "@tanstack/react-query";
12
+ import { useInfiniteQuery as s } from "@tanstack/react-query";
12
13
  //#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js
13
14
  var c = 100;
14
15
  function l({ enabled: l } = {}) {
15
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(), m = r(d), h = !!(d && f) && (l === !0 || l === void 0), g = [...t({
16
+ let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationPending: m } = r(), h = i(d), g = !!(d && f) && (l === !0 || l === void 0), _ = [...t({
16
17
  client: u,
17
- headers: m,
18
+ headers: h,
18
19
  query: {
19
20
  limit: c,
20
21
  is_customer: !0
21
22
  }
22
- }).queryKey, "all"], _ = s({
23
- queryKey: [...g, { authEpoch: p }],
24
- enabled: h,
25
- placeholderData: (e, t) => {
26
- if (!t) return;
27
- let n = t.queryKey.slice(0, -1);
28
- return o(n) === o(g) ? e : void 0;
29
- },
23
+ }).queryKey, "all"], v = s({
24
+ queryKey: [..._, { authEpoch: p }],
25
+ enabled: g,
26
+ placeholderData: n(_, m),
30
27
  initialPageParam: void 0,
31
28
  queryFn: async ({ signal: t, pageParam: n }) => {
32
29
  let { data: r } = await e({
33
30
  client: u,
34
- headers: m,
31
+ headers: h,
35
32
  query: {
36
33
  limit: c,
37
34
  is_customer: !0,
@@ -42,13 +39,13 @@ function l({ enabled: l } = {}) {
42
39
  });
43
40
  return r;
44
41
  },
45
- getNextPageParam: i
42
+ getNextPageParam: a
46
43
  });
47
- a(_, h);
48
- let v = _.data?.pages.flatMap((e) => e.data ?? []) ?? [];
44
+ o(v, g);
45
+ let y = v.data?.pages.flatMap((e) => e.data ?? []) ?? [];
49
46
  return {
50
- ..._,
51
- customers: v
47
+ ...v,
48
+ customers: y
52
49
  };
53
50
  }
54
51
  //#endregion
@@ -4,33 +4,31 @@
4
4
  "use client";
5
5
  import { getDepositableBankAccounts as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getDepositableBankAccountsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
9
- import { getAllPagesNextPageParam as i, useAutoFetchNextPage as a } from "../../../shared/data-access/dist/lib/allPages.js";
7
+ import { authEpochPlaceholder as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
+ import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
10
11
  import "../../../shared/data-access/dist/index.js";
11
- import { useMemo as o } from "react";
12
- import { useInfiniteQuery as s } from "@tanstack/react-query";
12
+ import { useMemo as s } from "react";
13
+ import { useInfiniteQuery as c } from "@tanstack/react-query";
13
14
  //#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js
14
- var c = 100;
15
- function l({ enabled: l } = {}) {
16
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(), m = r(d), h = !!(d && f) && (l === !0 || l === void 0), g = t({
17
- client: u,
18
- headers: m,
19
- query: { limit: c }
20
- }), _ = s({
21
- queryKey: [
22
- ...g.queryKey,
23
- "all",
24
- { authEpoch: p }
25
- ],
26
- enabled: h,
15
+ var l = 100;
16
+ function u({ enabled: u } = {}) {
17
+ let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = [...t({
18
+ client: d,
19
+ headers: g,
20
+ query: { limit: l }
21
+ }).queryKey, "all"], y = c({
22
+ queryKey: [...v, { authEpoch: m }],
23
+ placeholderData: n(v, h),
24
+ enabled: _,
27
25
  initialPageParam: void 0,
28
26
  queryFn: async ({ signal: t, pageParam: n }) => {
29
27
  let { data: r } = await e({
30
- client: u,
31
- headers: m,
28
+ client: d,
29
+ headers: g,
32
30
  query: {
33
- limit: c,
31
+ limit: l,
34
32
  ...n ? { pagination_token: n } : {}
35
33
  },
36
34
  signal: t,
@@ -38,20 +36,20 @@ function l({ enabled: l } = {}) {
38
36
  });
39
37
  return r;
40
38
  },
41
- getNextPageParam: i
39
+ getNextPageParam: a
42
40
  });
43
- a(_, h);
44
- let v = o(() => {
45
- if (_.data) return {
46
- data: _.data.pages.flatMap((e) => e.data ?? []),
41
+ o(y, _);
42
+ let b = s(() => {
43
+ if (y.data) return {
44
+ data: y.data.pages.flatMap((e) => e.data ?? []),
47
45
  nextPaginationToken: null,
48
46
  prevPaginationToken: null
49
47
  };
50
- }, [_.data]);
48
+ }, [y.data]);
51
49
  return {
52
- ..._,
53
- data: v
50
+ ...y,
51
+ data: b
54
52
  };
55
53
  }
56
54
  //#endregion
57
- export { l as useAllDepositableBankAccountsQuery };
55
+ export { u as useAllDepositableBankAccountsQuery };
@@ -4,11 +4,12 @@
4
4
  "use client";
5
5
  import { getReceivables as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getReceivablesOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
9
- import { getAllPagesNextPaginationTokenParam as i, useAutoFetchNextPage as a } from "../../../shared/data-access/dist/lib/allPages.js";
7
+ import { authEpochPlaceholder as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
+ import { getAllPagesNextPaginationTokenParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
10
11
  import "../../../shared/data-access/dist/index.js";
11
- import { hashKey as o, useInfiniteQuery as s } from "@tanstack/react-query";
12
+ import { useInfiniteQuery as s } from "@tanstack/react-query";
12
13
  //#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js
13
14
  var c = 100, l = [
14
15
  "issued",
@@ -16,31 +17,27 @@ var c = 100, l = [
16
17
  "overdue"
17
18
  ];
18
19
  function u({ counterpartId: u, enabled: d } = {}) {
19
- let { client: f, organizationId: p, widgetToken: m, authEpoch: h } = n(), g = r(p), _ = !!(p && m && u) && (d === !0 || d === void 0), v = {
20
+ let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationPending: g } = r(), _ = i(p), v = !!(p && m && u) && (d === !0 || d === void 0), y = {
20
21
  type: "invoice",
21
22
  bank_account_type: "INTERNAL",
22
23
  limit: c,
23
24
  counterpart_id__in: u ? [u] : void 0,
24
25
  status__in: [...l]
25
- }, y = [...t({
26
+ }, b = [...t({
26
27
  client: f,
27
- headers: g,
28
- query: v
29
- }).queryKey, "all"], b = s({
30
- queryKey: [...y, { authEpoch: h }],
31
- enabled: _,
32
- placeholderData: (e, t) => {
33
- if (!t) return;
34
- let n = t.queryKey.slice(0, -1);
35
- return o(n) === o(y) ? e : void 0;
36
- },
28
+ headers: _,
29
+ query: y
30
+ }).queryKey, "all"], x = s({
31
+ queryKey: [...b, { authEpoch: h }],
32
+ enabled: v,
33
+ placeholderData: n(b, g),
37
34
  initialPageParam: void 0,
38
35
  queryFn: async ({ signal: t, pageParam: n }) => {
39
36
  let { data: r } = await e({
40
37
  client: f,
41
- headers: g,
38
+ headers: _,
42
39
  query: {
43
- ...v,
40
+ ...y,
44
41
  ...n ? { pagination_token: n } : {}
45
42
  },
46
43
  signal: t,
@@ -48,13 +45,13 @@ function u({ counterpartId: u, enabled: d } = {}) {
48
45
  });
49
46
  return r;
50
47
  },
51
- getNextPageParam: i
48
+ getNextPageParam: a
52
49
  });
53
- a(b, _);
54
- let x = b.data?.pages.flatMap((e) => e.data.filter((e) => e.type === "invoice")) ?? [];
50
+ o(x, v);
51
+ let S = x.data?.pages.flatMap((e) => e.data.filter((e) => e.type === "invoice")) ?? [];
55
52
  return {
56
- ...b,
57
- invoices: x
53
+ ...x,
54
+ invoices: S
58
55
  };
59
56
  }
60
57
  //#endregion