@tesouro/embedded-components-react 0.11.86 → 0.11.88
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/fixtures/index.d.ts +243 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index10.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index11.js +5 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index13.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index14.js +13 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index15.js +30 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index16.js +23 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index17.js +26 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +12 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +48 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index20.js +35 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +13 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +31 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js +26 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index24.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +8 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index5.js +60 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index6.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index7.js +12 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index8.js +20 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index9.js +16 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +126 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,57 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import "
|
|
12
|
-
import
|
|
13
|
-
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
14
|
-
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js
|
|
15
|
-
var u = 100;
|
|
16
|
-
function d(d, { enabled: f } = {}) {
|
|
17
|
-
let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationStatus: _ } = r(), v = i(m), y = !!(m && h && d) && f !== !1, b = {
|
|
18
|
-
limit: u,
|
|
19
|
-
object_id__in: d ? [d] : [],
|
|
20
|
-
order: "desc",
|
|
21
|
-
sort: "paid_at"
|
|
22
|
-
}, x = t({
|
|
23
|
-
client: p,
|
|
24
|
-
headers: v,
|
|
25
|
-
query: b
|
|
26
|
-
}), S = l({
|
|
27
|
-
...n(x.queryKey, {
|
|
28
|
-
authEpoch: g,
|
|
29
|
-
organizationStatus: _
|
|
30
|
-
}, { suffix: ["all"] }),
|
|
31
|
-
enabled: y,
|
|
32
|
-
staleTime: 3e4,
|
|
33
|
-
initialPageParam: void 0,
|
|
34
|
-
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
35
|
-
let { data: r } = await e({
|
|
36
|
-
client: p,
|
|
37
|
-
headers: v,
|
|
38
|
-
query: {
|
|
39
|
-
...b,
|
|
40
|
-
...n ? { pagination_token: n } : {}
|
|
41
|
-
},
|
|
42
|
-
signal: t,
|
|
43
|
-
throwOnError: !0
|
|
44
|
-
});
|
|
45
|
-
return r;
|
|
46
|
-
},
|
|
47
|
-
getNextPageParam: a
|
|
48
|
-
});
|
|
49
|
-
s(S, y);
|
|
50
|
-
let C = c(() => S.data?.pages.flatMap((e) => e.data ?? []) ?? [], [S.data]);
|
|
51
|
-
return {
|
|
52
|
-
...S,
|
|
53
|
-
paymentRecords: C,
|
|
54
|
-
isResolving: y && o(S)
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export { d as usePayablePaymentRecordsQuery };
|
|
1
|
+
import "./index6.js";
|
|
2
|
+
import "./index7.js";
|
|
3
|
+
import "./index8.js";
|
|
4
|
+
import "./index9.js";
|
|
5
|
+
import "./index10.js";
|
|
6
|
+
import "./index11.js";
|
|
7
|
+
import "./index12.js";
|
|
8
|
+
import "./index13.js";
|
|
9
|
+
import "./index14.js";
|
|
10
|
+
import "./index15.js";
|
|
11
|
+
import "./index16.js";
|
|
12
|
+
import "./index17.js";
|
|
@@ -2,37 +2,56 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { getPaymentRecords as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getPaymentRecordsOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpochInfinite 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";
|
|
10
11
|
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
+
import { useMemo as c } from "react";
|
|
13
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
12
14
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
15
|
+
var u = 100;
|
|
16
|
+
function d(d, { enabled: f } = {}) {
|
|
17
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationStatus: _ } = r(), v = i(m), y = !!(m && h && d) && f !== !1, b = {
|
|
18
|
+
limit: u,
|
|
19
|
+
object_id__in: d ? [d] : [],
|
|
20
|
+
order: "desc",
|
|
21
|
+
sort: "paid_at"
|
|
22
|
+
}, x = t({
|
|
23
|
+
client: p,
|
|
24
|
+
headers: v,
|
|
25
|
+
query: b
|
|
26
|
+
}), S = l({
|
|
27
|
+
...n(x.queryKey, {
|
|
28
|
+
authEpoch: g,
|
|
29
|
+
organizationStatus: _
|
|
30
|
+
}, { suffix: ["all"] }),
|
|
31
|
+
enabled: y,
|
|
32
|
+
staleTime: 3e4,
|
|
33
|
+
initialPageParam: void 0,
|
|
34
|
+
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
35
|
+
let { data: r } = await e({
|
|
36
|
+
client: p,
|
|
37
|
+
headers: v,
|
|
38
|
+
query: {
|
|
39
|
+
...b,
|
|
40
|
+
...n ? { pagination_token: n } : {}
|
|
41
|
+
},
|
|
42
|
+
signal: t,
|
|
43
|
+
throwOnError: !0
|
|
44
|
+
});
|
|
45
|
+
return r;
|
|
34
46
|
},
|
|
35
|
-
|
|
47
|
+
getNextPageParam: a
|
|
36
48
|
});
|
|
49
|
+
s(S, y);
|
|
50
|
+
let C = c(() => S.data?.pages.flatMap((e) => e.data ?? []) ?? [], [S.data]);
|
|
51
|
+
return {
|
|
52
|
+
...S,
|
|
53
|
+
paymentRecords: C,
|
|
54
|
+
isResolving: y && o(S)
|
|
55
|
+
};
|
|
37
56
|
}
|
|
38
|
-
export {
|
|
57
|
+
export { d as usePayablePaymentRecordsQuery };
|
|
@@ -1,19 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getPayablesIdSuggestionsOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.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 { isApiNotFoundError as i } from "../../../../shared/data-access/dist/lib/isApiNotFoundError.js";
|
|
3
10
|
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
4
12
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index20.js
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
function o(o, { enabled: s = !0 } = {}) {
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationStatus: f } = n(), p = !!(l && u && o) && s, m = e({
|
|
15
|
+
client: c,
|
|
16
|
+
headers: r(l),
|
|
17
|
+
path: { payable_id: o ?? "" }
|
|
18
|
+
}), { queryKey: h, queryFn: g } = t(m, {
|
|
19
|
+
authEpoch: d,
|
|
20
|
+
organizationStatus: f
|
|
21
|
+
});
|
|
22
|
+
return a({
|
|
23
|
+
queryKey: h,
|
|
24
|
+
enabled: p,
|
|
25
|
+
retry: !1,
|
|
26
|
+
queryFn: async (e) => {
|
|
27
|
+
try {
|
|
28
|
+
if (typeof g != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
|
|
29
|
+
return await g(e);
|
|
30
|
+
} catch (e) {
|
|
31
|
+
if (i(e)) return null;
|
|
32
|
+
throw e;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
select: (e) => e ?? void 0
|
|
36
|
+
});
|
|
18
37
|
}
|
|
19
|
-
export {
|
|
38
|
+
export { o as usePayableSuggestionsQuery };
|
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
1
|
import { getPayablesIdOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
-
import {
|
|
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";
|
|
2
|
+
import { organizationHeaders as t } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
3
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { payableOcrQueryOptions as i } from "../../../data-access/dist/lib/payableOcrQueryOptions.js";
|
|
11
|
-
import "../../../data-access/dist/invalidation.js";
|
|
12
|
-
import { payablePolicyAssignmentQueryOptions as a } from "./index20.js";
|
|
13
|
-
import { useQuery as o } from "@tanstack/react-query";
|
|
14
4
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
payableId: s ?? ""
|
|
24
|
-
}) : void 0, y = _ ?? v ?? e({
|
|
25
|
-
client: d,
|
|
26
|
-
headers: r(f),
|
|
27
|
-
path: { payable_id: s ?? "" }
|
|
28
|
-
}), b = _ && v ? {
|
|
29
|
-
...y,
|
|
5
|
+
var n = 1e3;
|
|
6
|
+
function r({ client: r, organizationId: i, payableId: a }) {
|
|
7
|
+
return {
|
|
8
|
+
...e({
|
|
9
|
+
client: r,
|
|
10
|
+
headers: t(i),
|
|
11
|
+
path: { payable_id: a }
|
|
12
|
+
}),
|
|
30
13
|
refetchInterval: (e) => {
|
|
31
|
-
let t =
|
|
32
|
-
return t.
|
|
14
|
+
let t = e.state.data;
|
|
15
|
+
return !t || t.approval_policy_id || t.status !== "approve_in_progress" || !t.updated_at ? !1 : Date.now() - new Date(t.updated_at).getTime() < 1e4 && n;
|
|
33
16
|
}
|
|
34
|
-
}
|
|
35
|
-
return o({
|
|
36
|
-
...t(b, {
|
|
37
|
-
authEpoch: m,
|
|
38
|
-
organizationStatus: h
|
|
39
|
-
}),
|
|
40
|
-
enabled: g
|
|
41
|
-
});
|
|
17
|
+
};
|
|
42
18
|
}
|
|
43
|
-
export {
|
|
19
|
+
export { r as payablePolicyAssignmentQueryOptions };
|
|
@@ -7,20 +7,37 @@ import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/with
|
|
|
7
7
|
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
10
|
+
import { payableOcrQueryOptions as i } from "../../../data-access/dist/lib/payableOcrQueryOptions.js";
|
|
11
|
+
import "../../../data-access/dist/invalidation.js";
|
|
12
|
+
import { payablePolicyAssignmentQueryOptions as a } from "./index21.js";
|
|
13
|
+
import { useQuery as o } from "@tanstack/react-query";
|
|
11
14
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js
|
|
12
|
-
function
|
|
13
|
-
let { client:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
function s(s, { enabled: c = !0, pollWhileOcrProcessing: l = !1, pollWhilePolicyAssignmentUnsettled: u = !1 } = {}) {
|
|
16
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = n(), g = !!(f && p && s) && c, _ = l ? i({
|
|
17
|
+
client: d,
|
|
18
|
+
organizationId: f,
|
|
19
|
+
payableId: s ?? ""
|
|
20
|
+
}) : void 0, v = u ? a({
|
|
21
|
+
client: d,
|
|
22
|
+
organizationId: f,
|
|
23
|
+
payableId: s ?? ""
|
|
24
|
+
}) : void 0, y = _ ?? v ?? e({
|
|
25
|
+
client: d,
|
|
26
|
+
headers: r(f),
|
|
27
|
+
path: { payable_id: s ?? "" }
|
|
28
|
+
}), b = _ && v ? {
|
|
29
|
+
...y,
|
|
30
|
+
refetchInterval: (e) => {
|
|
31
|
+
let t = [_.refetchInterval(e), v.refetchInterval(e)].filter((e) => e !== !1);
|
|
32
|
+
return t.length ? Math.min(...t) : !1;
|
|
33
|
+
}
|
|
34
|
+
} : y;
|
|
35
|
+
return o({
|
|
36
|
+
...t(b, {
|
|
37
|
+
authEpoch: m,
|
|
38
|
+
organizationStatus: h
|
|
22
39
|
}),
|
|
23
|
-
enabled:
|
|
24
|
-
})
|
|
40
|
+
enabled: g
|
|
41
|
+
});
|
|
25
42
|
}
|
|
26
|
-
export {
|
|
43
|
+
export { s as usePayableQuery };
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getPayablesIdOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.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 "../../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { useQueries as i } from "@tanstack/react-query";
|
|
11
|
+
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js
|
|
12
|
+
function a(a, { enabled: o = !0 } = {}) {
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l) && o, p = r(c);
|
|
14
|
+
return i({ queries: a.map((n) => ({
|
|
15
|
+
...t(e({
|
|
16
|
+
client: s,
|
|
17
|
+
headers: p,
|
|
18
|
+
path: { payable_id: n }
|
|
19
|
+
}), {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationStatus: d
|
|
22
|
+
}),
|
|
23
|
+
enabled: f
|
|
24
|
+
})) });
|
|
25
|
+
}
|
|
26
|
+
export { a as usePayablesByIdsQueries };
|
|
@@ -1,78 +1,10 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { getPayablesIdLineItems as e, putPayablesIdLineItems as t } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { getPayablesIdLineItemsOptions as n } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import { withAuthEpochInfinite 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
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
12
|
-
import { invalidatePayableQueries as l } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
13
|
-
import "../../../data-access/dist/invalidation.js";
|
|
14
|
-
import { useMemo as u } from "react";
|
|
15
|
-
import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
|
|
16
1
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}), x = d({
|
|
25
|
-
...r(b.queryKey, {
|
|
26
|
-
authEpoch: g,
|
|
27
|
-
organizationStatus: _
|
|
28
|
-
}, { suffix: ["all"] }),
|
|
29
|
-
enabled: y,
|
|
30
|
-
initialPageParam: void 0,
|
|
31
|
-
queryFn: async ({ signal: n, pageParam: r }) => {
|
|
32
|
-
let { data: i } = await e({
|
|
33
|
-
client: f,
|
|
34
|
-
headers: v,
|
|
35
|
-
path: { payable_id: t ?? "" },
|
|
36
|
-
query: {
|
|
37
|
-
limit: p,
|
|
38
|
-
...r ? { pagination_token: r } : {}
|
|
39
|
-
},
|
|
40
|
-
signal: n,
|
|
41
|
-
throwOnError: !0
|
|
42
|
-
});
|
|
43
|
-
return i;
|
|
44
|
-
},
|
|
45
|
-
getNextPageParam: o
|
|
46
|
-
});
|
|
47
|
-
c(x, y);
|
|
48
|
-
let S = u(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
49
|
-
return {
|
|
50
|
-
...x,
|
|
51
|
-
lineItems: S,
|
|
52
|
-
isResolving: s(x)
|
|
53
|
-
};
|
|
2
|
+
async function e(e) {
|
|
3
|
+
let { data: t, error: n, response: r } = await e;
|
|
4
|
+
if (n === void 0) return t;
|
|
5
|
+
throw r && typeof n == "object" && n ? {
|
|
6
|
+
...n,
|
|
7
|
+
status: r.status
|
|
8
|
+
} : n;
|
|
54
9
|
}
|
|
55
|
-
|
|
56
|
-
let { client: e, organizationId: n } = i();
|
|
57
|
-
return f({
|
|
58
|
-
mutationFn: async ({ path: r, body: i }) => {
|
|
59
|
-
let { data: o } = await t({
|
|
60
|
-
client: e,
|
|
61
|
-
headers: a(n),
|
|
62
|
-
path: r,
|
|
63
|
-
body: i,
|
|
64
|
-
throwOnError: !0
|
|
65
|
-
});
|
|
66
|
-
return o;
|
|
67
|
-
},
|
|
68
|
-
onSuccess: async (t, r) => {
|
|
69
|
-
await l({
|
|
70
|
-
client: e,
|
|
71
|
-
organizationId: n,
|
|
72
|
-
payableId: r.path.payable_id,
|
|
73
|
-
includeLineItems: !0
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };
|
|
10
|
+
export { e as dataOrThrowWithStatus };
|
|
@@ -2,34 +2,75 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { getPayablesIdLineItems as e, putPayablesIdLineItems as t } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getPayablesIdLineItemsOptions as n } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpochInfinite 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";
|
|
8
11
|
import "../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { invalidatePayableQueries as
|
|
12
|
+
import { invalidatePayableQueries as l } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
10
13
|
import "../../../data-access/dist/invalidation.js";
|
|
11
|
-
import {
|
|
14
|
+
import { dataOrThrowWithStatus as u } from "./index4.js";
|
|
15
|
+
import { useMemo as d } from "react";
|
|
16
|
+
import { useInfiniteQuery as f, useMutation as p } from "@tanstack/react-query";
|
|
12
17
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index5.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
var m = 100;
|
|
19
|
+
function h(t, { enabled: l } = {}) {
|
|
20
|
+
let { client: u, organizationId: p, widgetToken: h, authEpoch: g, organizationStatus: _ } = i(), v = a(p), y = !!(p && h && t) && l !== !1, b = n({
|
|
21
|
+
client: u,
|
|
22
|
+
headers: v,
|
|
23
|
+
path: { payable_id: t ?? "" },
|
|
24
|
+
query: { limit: m }
|
|
25
|
+
}), x = f({
|
|
26
|
+
...r(b.queryKey, {
|
|
27
|
+
authEpoch: g,
|
|
28
|
+
organizationStatus: _
|
|
29
|
+
}, { suffix: ["all"] }),
|
|
30
|
+
enabled: y,
|
|
31
|
+
initialPageParam: void 0,
|
|
32
|
+
queryFn: async ({ signal: n, pageParam: r }) => {
|
|
17
33
|
let { data: i } = await e({
|
|
18
|
-
client:
|
|
19
|
-
headers:
|
|
20
|
-
path: t,
|
|
21
|
-
|
|
34
|
+
client: u,
|
|
35
|
+
headers: v,
|
|
36
|
+
path: { payable_id: t ?? "" },
|
|
37
|
+
query: {
|
|
38
|
+
limit: m,
|
|
39
|
+
...r ? { pagination_token: r } : {}
|
|
40
|
+
},
|
|
41
|
+
signal: n,
|
|
22
42
|
throwOnError: !0
|
|
23
43
|
});
|
|
24
44
|
return i;
|
|
25
45
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
getNextPageParam: o
|
|
47
|
+
});
|
|
48
|
+
c(x, y);
|
|
49
|
+
let S = d(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
50
|
+
return {
|
|
51
|
+
...x,
|
|
52
|
+
lineItems: S,
|
|
53
|
+
isResolving: s(x)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function g() {
|
|
57
|
+
let { client: e, organizationId: n } = i();
|
|
58
|
+
return p({
|
|
59
|
+
mutationFn: async ({ path: r, body: i }) => u(t({
|
|
60
|
+
client: e,
|
|
61
|
+
headers: a(n),
|
|
62
|
+
path: r,
|
|
63
|
+
body: i,
|
|
64
|
+
throwOnError: !1
|
|
65
|
+
})),
|
|
66
|
+
onSuccess: async (t, r) => {
|
|
67
|
+
await l({
|
|
68
|
+
client: e,
|
|
69
|
+
organizationId: n,
|
|
70
|
+
payableId: r.path.payable_id,
|
|
71
|
+
includeLineItems: !0
|
|
31
72
|
});
|
|
32
73
|
}
|
|
33
74
|
});
|
|
34
75
|
}
|
|
35
|
-
export {
|
|
76
|
+
export { h as useAllPayableLineItemsQuery, g as useReplacePayableLineItemsMutation };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { postPayablesIdAttachFile as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
@@ -13,14 +13,15 @@ import { useMutation as i } from "@tanstack/react-query";
|
|
|
13
13
|
function a() {
|
|
14
14
|
let { client: a, organizationId: o } = t();
|
|
15
15
|
return i({
|
|
16
|
-
mutationFn: async ({ path: t }) => {
|
|
17
|
-
let { data:
|
|
16
|
+
mutationFn: async ({ path: t, file: r }) => {
|
|
17
|
+
let { data: i } = await e({
|
|
18
18
|
client: a,
|
|
19
19
|
headers: n(o),
|
|
20
20
|
path: t,
|
|
21
|
+
body: { file: r },
|
|
21
22
|
throwOnError: !0
|
|
22
23
|
});
|
|
23
|
-
return
|
|
24
|
+
return i;
|
|
24
25
|
},
|
|
25
26
|
onSuccess: async (e, t) => {
|
|
26
27
|
await r({
|
|
@@ -31,4 +32,4 @@ function a() {
|
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
export { a as
|
|
35
|
+
export { a as useAttachPayableFileMutation };
|
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { postPayablesIdCancel as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
9
9
|
import { invalidatePayableQueries as r } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
10
|
-
import { reconcileCancelledPaymentQueries as i } from "../../../data-access/dist/lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js";
|
|
11
10
|
import "../../../data-access/dist/invalidation.js";
|
|
12
|
-
import { useMutation as
|
|
11
|
+
import { useMutation as i } from "@tanstack/react-query";
|
|
13
12
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index7.js
|
|
14
|
-
function
|
|
15
|
-
let { client:
|
|
16
|
-
return
|
|
13
|
+
function a() {
|
|
14
|
+
let { client: a, organizationId: o } = t();
|
|
15
|
+
return i({
|
|
17
16
|
mutationFn: async ({ path: t }) => {
|
|
18
17
|
let { data: r } = await e({
|
|
19
|
-
client:
|
|
20
|
-
headers: n(
|
|
18
|
+
client: a,
|
|
19
|
+
headers: n(o),
|
|
21
20
|
path: t,
|
|
22
21
|
throwOnError: !0
|
|
23
22
|
});
|
|
@@ -25,15 +24,11 @@ function o() {
|
|
|
25
24
|
},
|
|
26
25
|
onSuccess: async (e, t) => {
|
|
27
26
|
await r({
|
|
28
|
-
client:
|
|
29
|
-
organizationId:
|
|
30
|
-
payableId: t.
|
|
31
|
-
})
|
|
32
|
-
client: o,
|
|
33
|
-
organizationId: s,
|
|
34
|
-
payableId: t.payableId
|
|
35
|
-
}).catch(() => {});
|
|
27
|
+
client: a,
|
|
28
|
+
organizationId: o,
|
|
29
|
+
payableId: t.path.payable_id
|
|
30
|
+
});
|
|
36
31
|
}
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
|
-
export {
|
|
34
|
+
export { a as useCancelPayableMutation };
|