@tesouro/embedded-components-react 0.5.175 → 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.
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +47 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +36 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +17 -20
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +28 -30
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +20 -23
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +31 -33
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +29 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +36 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +29 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +36 -38
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -46
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +33 -33
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +27 -29
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -27
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +38 -37
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -32
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
CHANGED
|
@@ -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 {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
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
|
|
12
|
-
import { useInfiniteQuery as
|
|
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
|
|
15
|
-
function u
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
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:
|
|
21
|
-
Limit:
|
|
22
|
-
...
|
|
20
|
+
Status: u,
|
|
21
|
+
Limit: l,
|
|
22
|
+
...v
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
24
|
+
}), b = c({
|
|
25
25
|
queryKey: [
|
|
26
|
-
...
|
|
27
|
-
authEpoch:
|
|
28
|
-
organizationPending:
|
|
26
|
+
...r(y, {
|
|
27
|
+
authEpoch: h,
|
|
28
|
+
organizationPending: g
|
|
29
29
|
}).queryKey,
|
|
30
30
|
"all",
|
|
31
|
-
|
|
31
|
+
u
|
|
32
32
|
],
|
|
33
|
-
|
|
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:
|
|
38
|
-
headers:
|
|
38
|
+
client: p,
|
|
39
|
+
headers: _,
|
|
39
40
|
query: {
|
|
40
|
-
Status:
|
|
41
|
-
Limit:
|
|
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
|
-
|
|
56
|
-
|
|
56
|
+
o(() => {
|
|
57
|
+
d && b.hasNextPage && !b.isFetchingNextPage && !b.isError && b.fetchNextPage();
|
|
57
58
|
}, [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
d,
|
|
60
|
+
b.hasNextPage,
|
|
61
|
+
b.isFetchingNextPage,
|
|
62
|
+
b.isError,
|
|
63
|
+
b.fetchNextPage
|
|
63
64
|
]);
|
|
64
|
-
let
|
|
65
|
-
if (
|
|
66
|
-
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
|
-
}, [
|
|
71
|
+
}, [b.data]);
|
|
71
72
|
return {
|
|
72
|
-
...
|
|
73
|
-
data:
|
|
73
|
+
...b,
|
|
74
|
+
data: x
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
let { organizationId: n, widgetToken:
|
|
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
|
|
80
|
-
let n = t === "ACTIVE" ?
|
|
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
|
-
}, [
|
|
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
|
-
...
|
|
91
|
-
data:
|
|
91
|
+
...o,
|
|
92
|
+
data: l,
|
|
92
93
|
isLoading: f,
|
|
93
94
|
isFetchingNextPage: p,
|
|
94
95
|
hasNextPage: m,
|
|
95
96
|
isError: h,
|
|
96
|
-
isSuccess:
|
|
97
|
+
isSuccess: o.isSuccess && c.isSuccess
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
//#endregion
|
|
100
|
-
export {
|
|
101
|
+
export { f as useAllOrganizationUsersQuery };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
CHANGED
|
@@ -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 {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as
|
|
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
|
|
13
|
-
import { useMemo as
|
|
14
|
-
import { useInfiniteQuery as
|
|
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
|
|
17
|
-
function
|
|
18
|
-
let { client:
|
|
19
|
-
client:
|
|
20
|
-
headers:
|
|
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:
|
|
23
|
-
}),
|
|
24
|
-
queryKey: [...
|
|
25
|
-
authEpoch:
|
|
26
|
-
organizationPending:
|
|
22
|
+
query: { limit: m }
|
|
23
|
+
}), S = f({
|
|
24
|
+
queryKey: [...i(x, {
|
|
25
|
+
authEpoch: _,
|
|
26
|
+
organizationPending: v
|
|
27
27
|
}).queryKey, "all"],
|
|
28
|
-
|
|
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:
|
|
33
|
-
headers:
|
|
33
|
+
client: p,
|
|
34
|
+
headers: y,
|
|
34
35
|
path: { payable_id: t ?? "" },
|
|
35
36
|
query: {
|
|
36
|
-
limit:
|
|
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:
|
|
45
|
+
getNextPageParam: s
|
|
45
46
|
});
|
|
46
|
-
|
|
47
|
-
let
|
|
47
|
+
l(S, b);
|
|
48
|
+
let C = d(() => S.data?.pages.flatMap((e) => e.data ?? []) ?? [], [S.data]);
|
|
48
49
|
return {
|
|
49
|
-
...
|
|
50
|
-
lineItems:
|
|
51
|
-
isResolving:
|
|
50
|
+
...S,
|
|
51
|
+
lineItems: C,
|
|
52
|
+
isResolving: c(S)
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
let { client: e, organizationId: n } =
|
|
56
|
-
return
|
|
55
|
+
function g() {
|
|
56
|
+
let { client: e, organizationId: n } = a();
|
|
57
|
+
return p({
|
|
57
58
|
mutationFn: async ({ path: r, body: i }) => {
|
|
58
|
-
let { data:
|
|
59
|
+
let { data: a } = await t({
|
|
59
60
|
client: e,
|
|
60
|
-
headers:
|
|
61
|
+
headers: o(n),
|
|
61
62
|
path: r,
|
|
62
63
|
body: i,
|
|
63
64
|
throwOnError: !0
|
|
64
65
|
});
|
|
65
|
-
return
|
|
66
|
+
return a;
|
|
66
67
|
},
|
|
67
68
|
onSuccess: async (t, r) => {
|
|
68
|
-
await
|
|
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 {
|
|
79
|
+
export { h as useAllPayableLineItemsQuery, g as useReplacePayableLineItemsMutation };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
CHANGED
|
@@ -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 {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as
|
|
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
|
|
13
|
-
import { useInfiniteQuery as
|
|
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
|
|
16
|
-
function
|
|
17
|
-
let { client:
|
|
18
|
-
limit:
|
|
19
|
-
object_id__in:
|
|
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
|
-
},
|
|
23
|
-
client:
|
|
24
|
-
headers:
|
|
25
|
-
query:
|
|
26
|
-
}),
|
|
27
|
-
queryKey: [...
|
|
28
|
-
authEpoch:
|
|
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
|
-
|
|
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:
|
|
36
|
-
headers:
|
|
36
|
+
client: m,
|
|
37
|
+
headers: y,
|
|
37
38
|
query: {
|
|
38
|
-
...
|
|
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:
|
|
47
|
+
getNextPageParam: o
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
-
let
|
|
49
|
+
c(C, b);
|
|
50
|
+
let w = l(() => C.data?.pages.flatMap((e) => e.data ?? []) ?? [], [C.data]);
|
|
50
51
|
return {
|
|
51
|
-
...
|
|
52
|
-
paymentRecords:
|
|
53
|
-
isResolving:
|
|
52
|
+
...C,
|
|
53
|
+
paymentRecords: w,
|
|
54
|
+
isResolving: b && s(C)
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
57
|
//#endregion
|
|
57
|
-
export {
|
|
58
|
+
export { f as usePayablePaymentRecordsQuery };
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js
CHANGED
|
@@ -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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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 {
|
|
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 } =
|
|
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:
|
|
18
|
+
headers: h,
|
|
18
19
|
query: {
|
|
19
20
|
limit: c,
|
|
20
21
|
is_customer: !0
|
|
21
22
|
}
|
|
22
|
-
}).queryKey, "all"],
|
|
23
|
-
queryKey: [...
|
|
24
|
-
enabled:
|
|
25
|
-
placeholderData: (
|
|
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:
|
|
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:
|
|
42
|
+
getNextPageParam: a
|
|
46
43
|
});
|
|
47
|
-
|
|
48
|
-
let
|
|
44
|
+
o(v, g);
|
|
45
|
+
let y = v.data?.pages.flatMap((e) => e.data ?? []) ?? [];
|
|
49
46
|
return {
|
|
50
|
-
...
|
|
51
|
-
customers:
|
|
47
|
+
...v,
|
|
48
|
+
customers: y
|
|
52
49
|
};
|
|
53
50
|
}
|
|
54
51
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js
CHANGED
|
@@ -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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
|
12
|
-
import { useInfiniteQuery as
|
|
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
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
19
|
-
query: { limit:
|
|
20
|
-
}),
|
|
21
|
-
queryKey: [
|
|
22
|
-
|
|
23
|
-
|
|
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:
|
|
31
|
-
headers:
|
|
28
|
+
client: d,
|
|
29
|
+
headers: g,
|
|
32
30
|
query: {
|
|
33
|
-
limit:
|
|
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:
|
|
39
|
+
getNextPageParam: a
|
|
42
40
|
});
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
46
|
-
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
|
-
}, [
|
|
48
|
+
}, [y.data]);
|
|
51
49
|
return {
|
|
52
|
-
...
|
|
53
|
-
data:
|
|
50
|
+
...y,
|
|
51
|
+
data: b
|
|
54
52
|
};
|
|
55
53
|
}
|
|
56
54
|
//#endregion
|
|
57
|
-
export {
|
|
55
|
+
export { u as useAllDepositableBankAccountsQuery };
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js
CHANGED
|
@@ -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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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 {
|
|
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 } =
|
|
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
|
-
},
|
|
26
|
+
}, b = [...t({
|
|
26
27
|
client: f,
|
|
27
|
-
headers:
|
|
28
|
-
query:
|
|
29
|
-
}).queryKey, "all"],
|
|
30
|
-
queryKey: [...
|
|
31
|
-
enabled:
|
|
32
|
-
placeholderData: (
|
|
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:
|
|
38
|
+
headers: _,
|
|
42
39
|
query: {
|
|
43
|
-
...
|
|
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:
|
|
48
|
+
getNextPageParam: a
|
|
52
49
|
});
|
|
53
|
-
|
|
54
|
-
let
|
|
50
|
+
o(x, v);
|
|
51
|
+
let S = x.data?.pages.flatMap((e) => e.data.filter((e) => e.type === "invoice")) ?? [];
|
|
55
52
|
return {
|
|
56
|
-
...
|
|
57
|
-
invoices:
|
|
53
|
+
...x,
|
|
54
|
+
invoices: S
|
|
58
55
|
};
|
|
59
56
|
}
|
|
60
57
|
//#endregion
|