@tesouro/embedded-components-react 0.3.49 → 0.3.51
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/index.css +8 -2
- package/dist/index.js +2 -2
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/LinkedAccountsWidget.js +1 -1
- package/dist/libs/shared/util-validation/dist/{index22.js → index23.js} +1 -1
- package/dist/libs/shared/util-validation/dist/index7.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +26 -311
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +325 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +80 -68
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +86 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +77 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +82 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +15 -159
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +23 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +66 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +2 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +5 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +31 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +37 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +161 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +29 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +1 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +12 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +26 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +62 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +133 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +20 -163
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +4 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +39 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +5 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +70 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +47 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +92 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +34 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +59 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +163 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +67 -181
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +20 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +203 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +214 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +98 -312
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +16 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +49 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +29 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +183 -156
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +38 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +102 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +343 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +79 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +179 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +2 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +38 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +92 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +123 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +7 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +45 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +21 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +27 -208
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +86 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +47 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +244 -106
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +201 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +44 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +119 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +24 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index8.js +95 -94
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index7.js +18 -55
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index8.js +46 -265
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +273 -34
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApproverOptions.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +87 -71
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js
CHANGED
|
@@ -1,17 +1,330 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { deletePayablesId as n, deletePayablesIdFile as r, patchPayablesId as i, postPayables as a, postPayablesIdApprovePaymentOperation as o, postPayablesIdAttachFile as s, postPayablesIdCancel as c, postPayablesIdMarkAsPaid as l, postPayablesIdReject as u, postPayablesIdReopen as d, postPayablesIdSubmitForApproval as f, postPayablesIdValidate as p, postPayablesUploadFromFile as m, postPaymentIntentsIdCancel as h } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
3
8
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { beginApprovalRequestWatch as g, invalidateDeletedPayableQueries as _, invalidatePayableQueries as v, reconcileCancelledPaymentQueries as y, reconcileSubmittedForApprovalQueries as b } from "./index5.js";
|
|
10
|
+
import { useMutation as x } from "@tanstack/react-query";
|
|
4
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return {
|
|
8
|
-
|
|
12
|
+
function S() {
|
|
13
|
+
let { client: n, organizationId: r } = e();
|
|
14
|
+
return x({
|
|
15
|
+
mutationFn: async ({ body: e }) => {
|
|
16
|
+
let { data: i } = await a({
|
|
17
|
+
client: n,
|
|
18
|
+
headers: t(r),
|
|
19
|
+
body: e,
|
|
20
|
+
throwOnError: !0
|
|
21
|
+
});
|
|
22
|
+
return i;
|
|
23
|
+
},
|
|
24
|
+
onSuccess: async () => {
|
|
25
|
+
await v({
|
|
26
|
+
client: n,
|
|
27
|
+
organizationId: r
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function C() {
|
|
33
|
+
let { client: n, organizationId: r } = e();
|
|
34
|
+
return x({
|
|
35
|
+
mutationFn: async ({ path: e, body: a }) => {
|
|
36
|
+
let { data: o } = await i({
|
|
37
|
+
client: n,
|
|
38
|
+
headers: t(r),
|
|
39
|
+
path: e,
|
|
40
|
+
body: a,
|
|
41
|
+
throwOnError: !0
|
|
42
|
+
});
|
|
43
|
+
return o;
|
|
44
|
+
},
|
|
45
|
+
onSuccess: async (e, t) => {
|
|
46
|
+
await v({
|
|
47
|
+
client: n,
|
|
48
|
+
organizationId: r,
|
|
49
|
+
payableId: t.path.payable_id
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function w() {
|
|
55
|
+
let { client: r, organizationId: i } = e();
|
|
56
|
+
return x({
|
|
57
|
+
mutationFn: async ({ path: e }) => {
|
|
58
|
+
await n({
|
|
59
|
+
client: r,
|
|
60
|
+
headers: t(i),
|
|
61
|
+
path: e,
|
|
62
|
+
throwOnError: !0
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
onSuccess: async (e, t) => {
|
|
66
|
+
await _({
|
|
67
|
+
client: r,
|
|
68
|
+
organizationId: i,
|
|
69
|
+
payableId: t.path.payable_id
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function T() {
|
|
75
|
+
let { client: n, organizationId: r } = e();
|
|
76
|
+
return x({
|
|
77
|
+
mutationFn: async ({ file: e }) => {
|
|
78
|
+
let { data: a } = await m({
|
|
79
|
+
client: n,
|
|
80
|
+
headers: t(r),
|
|
81
|
+
body: { file: e },
|
|
82
|
+
throwOnError: !0
|
|
83
|
+
});
|
|
84
|
+
if (a?.id && a.currency !== "USD") try {
|
|
85
|
+
return await i({
|
|
86
|
+
client: n,
|
|
87
|
+
headers: t(r),
|
|
88
|
+
path: { payable_id: a.id },
|
|
89
|
+
body: { currency: "USD" },
|
|
90
|
+
throwOnError: !0
|
|
91
|
+
}), {
|
|
92
|
+
...a,
|
|
93
|
+
currency: "USD"
|
|
94
|
+
};
|
|
95
|
+
} catch {}
|
|
96
|
+
return a;
|
|
97
|
+
},
|
|
98
|
+
onSuccess: async () => {
|
|
99
|
+
await v({
|
|
100
|
+
client: n,
|
|
101
|
+
organizationId: r
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function E() {
|
|
107
|
+
let { client: n, organizationId: r } = e();
|
|
108
|
+
return x({
|
|
109
|
+
mutationFn: async ({ path: e, file: i }) => {
|
|
110
|
+
let { data: a } = await s({
|
|
111
|
+
client: n,
|
|
112
|
+
headers: t(r),
|
|
113
|
+
path: e,
|
|
114
|
+
body: { file: i },
|
|
115
|
+
throwOnError: !0
|
|
116
|
+
});
|
|
117
|
+
return a;
|
|
118
|
+
},
|
|
119
|
+
onSuccess: async (e, t) => {
|
|
120
|
+
await v({
|
|
121
|
+
client: n,
|
|
122
|
+
organizationId: r,
|
|
123
|
+
payableId: t.path.payable_id
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function D() {
|
|
129
|
+
let { client: n, organizationId: i } = e();
|
|
130
|
+
return x({
|
|
131
|
+
mutationFn: async ({ path: e }) => {
|
|
132
|
+
await r({
|
|
133
|
+
client: n,
|
|
134
|
+
headers: t(i),
|
|
135
|
+
path: e,
|
|
136
|
+
throwOnError: !0
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
onSuccess: async (e, t) => {
|
|
140
|
+
await v({
|
|
141
|
+
client: n,
|
|
142
|
+
organizationId: i,
|
|
143
|
+
payableId: t.path.payable_id
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function O() {
|
|
149
|
+
let { client: n, organizationId: r } = e();
|
|
150
|
+
return x({ mutationFn: async ({ path: e }) => {
|
|
151
|
+
let { data: i } = await p({
|
|
152
|
+
client: n,
|
|
153
|
+
headers: t(r),
|
|
154
|
+
path: e,
|
|
155
|
+
throwOnError: !0
|
|
156
|
+
});
|
|
157
|
+
return {
|
|
158
|
+
id: i.id,
|
|
159
|
+
validation_errors: i.validation_errors ?? []
|
|
160
|
+
};
|
|
161
|
+
} });
|
|
162
|
+
}
|
|
163
|
+
function k() {
|
|
164
|
+
let { client: n, organizationId: r } = e();
|
|
165
|
+
return x({
|
|
166
|
+
onMutate: async ({ path: e }) => g({
|
|
9
167
|
client: n,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}),
|
|
13
|
-
|
|
14
|
-
|
|
168
|
+
organizationId: r,
|
|
169
|
+
payableId: e.payable_id
|
|
170
|
+
}, { requireRoundMarker: !0 }),
|
|
171
|
+
mutationFn: async ({ path: e }) => {
|
|
172
|
+
let { data: i } = await f({
|
|
173
|
+
client: n,
|
|
174
|
+
headers: t(r),
|
|
175
|
+
path: e,
|
|
176
|
+
throwOnError: !0
|
|
177
|
+
});
|
|
178
|
+
return i;
|
|
179
|
+
},
|
|
180
|
+
onSuccess: async (e, t, i) => {
|
|
181
|
+
let a = t.path.payable_id, o = e?.status === "approve_in_progress";
|
|
182
|
+
await v({
|
|
183
|
+
client: n,
|
|
184
|
+
organizationId: r,
|
|
185
|
+
payableId: a,
|
|
186
|
+
includeApprovalRequests: !0
|
|
187
|
+
}), !(!o || !i) && b({
|
|
188
|
+
client: n,
|
|
189
|
+
organizationId: r,
|
|
190
|
+
payableId: a,
|
|
191
|
+
watch: i
|
|
192
|
+
}).catch(() => {});
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function A() {
|
|
197
|
+
let { client: n, organizationId: r } = e();
|
|
198
|
+
return x({
|
|
199
|
+
mutationFn: async ({ path: e }) => {
|
|
200
|
+
let { data: i } = await o({
|
|
201
|
+
client: n,
|
|
202
|
+
headers: t(r),
|
|
203
|
+
path: e,
|
|
204
|
+
throwOnError: !0
|
|
205
|
+
});
|
|
206
|
+
return i;
|
|
207
|
+
},
|
|
208
|
+
onSuccess: async (e, t) => {
|
|
209
|
+
await v({
|
|
210
|
+
client: n,
|
|
211
|
+
organizationId: r,
|
|
212
|
+
payableId: t.path.payable_id,
|
|
213
|
+
includeApprovalRequests: !0
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function j() {
|
|
219
|
+
let { client: n, organizationId: r } = e();
|
|
220
|
+
return x({
|
|
221
|
+
mutationFn: async ({ path: e }) => {
|
|
222
|
+
let { data: i } = await u({
|
|
223
|
+
client: n,
|
|
224
|
+
headers: t(r),
|
|
225
|
+
path: e,
|
|
226
|
+
throwOnError: !0
|
|
227
|
+
});
|
|
228
|
+
return i;
|
|
229
|
+
},
|
|
230
|
+
onSuccess: async (e, t) => {
|
|
231
|
+
await v({
|
|
232
|
+
client: n,
|
|
233
|
+
organizationId: r,
|
|
234
|
+
payableId: t.path.payable_id,
|
|
235
|
+
includeApprovalRequests: !0
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function M() {
|
|
241
|
+
let { client: n, organizationId: r } = e();
|
|
242
|
+
return x({
|
|
243
|
+
mutationFn: async ({ path: e }) => {
|
|
244
|
+
let { data: i } = await c({
|
|
245
|
+
client: n,
|
|
246
|
+
headers: t(r),
|
|
247
|
+
path: e,
|
|
248
|
+
throwOnError: !0
|
|
249
|
+
});
|
|
250
|
+
return i;
|
|
251
|
+
},
|
|
252
|
+
onSuccess: async (e, t) => {
|
|
253
|
+
await v({
|
|
254
|
+
client: n,
|
|
255
|
+
organizationId: r,
|
|
256
|
+
payableId: t.path.payable_id
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
function N() {
|
|
262
|
+
let { client: n, organizationId: r } = e();
|
|
263
|
+
return x({
|
|
264
|
+
mutationFn: async ({ path: e }) => {
|
|
265
|
+
let { data: i } = await h({
|
|
266
|
+
client: n,
|
|
267
|
+
headers: t(r),
|
|
268
|
+
path: e,
|
|
269
|
+
throwOnError: !0
|
|
270
|
+
});
|
|
271
|
+
return i;
|
|
272
|
+
},
|
|
273
|
+
onSuccess: async (e, t) => {
|
|
274
|
+
await v({
|
|
275
|
+
client: n,
|
|
276
|
+
organizationId: r,
|
|
277
|
+
payableId: t.payableId
|
|
278
|
+
}), y({
|
|
279
|
+
client: n,
|
|
280
|
+
organizationId: r,
|
|
281
|
+
payableId: t.payableId
|
|
282
|
+
}).catch(() => {});
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
function P() {
|
|
287
|
+
let { client: n, organizationId: r } = e();
|
|
288
|
+
return x({
|
|
289
|
+
mutationFn: async ({ path: e }) => {
|
|
290
|
+
let { data: i } = await d({
|
|
291
|
+
client: n,
|
|
292
|
+
headers: t(r),
|
|
293
|
+
path: e,
|
|
294
|
+
throwOnError: !0
|
|
295
|
+
});
|
|
296
|
+
return i;
|
|
297
|
+
},
|
|
298
|
+
onSuccess: async (e, t) => {
|
|
299
|
+
await v({
|
|
300
|
+
client: n,
|
|
301
|
+
organizationId: r,
|
|
302
|
+
payableId: t.path.payable_id
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
function F() {
|
|
308
|
+
let { client: n, organizationId: r } = e();
|
|
309
|
+
return x({
|
|
310
|
+
mutationFn: async ({ path: e, body: i }) => {
|
|
311
|
+
let { data: a } = await l({
|
|
312
|
+
client: n,
|
|
313
|
+
headers: t(r),
|
|
314
|
+
path: e,
|
|
315
|
+
body: i,
|
|
316
|
+
throwOnError: !0
|
|
317
|
+
});
|
|
318
|
+
return a;
|
|
319
|
+
},
|
|
320
|
+
onSuccess: async (e, t) => {
|
|
321
|
+
await v({
|
|
322
|
+
client: n,
|
|
323
|
+
organizationId: r,
|
|
324
|
+
payableId: t.path.payable_id
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
});
|
|
15
328
|
}
|
|
16
329
|
//#endregion
|
|
17
|
-
export {
|
|
330
|
+
export { E as useAttachPayableFileMutation, M as useCancelPayableMutation, N as useCancelScheduledPaymentMutation, S as useCreatePayableMutation, D as useDeletePayableFileMutation, w as useDeletePayableMutation, A as useForceApprovePayableMutation, j as useForceRejectPayableMutation, F as useMarkPayableAsPaidMutation, P as useReopenPayableMutation, k as useSubmitPayableForApprovalMutation, C as useUpdatePayableMutation, T as useUploadPayableFromFileMutation, O as useValidatePayableMutation };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js
CHANGED
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
-
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
1
|
+
import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
|
+
import { getPayablesIdOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
3
|
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import { payableOcrQueryOptions as n } from "./index12.js";
|
|
9
|
-
import { useQueries as r } from "@tanstack/react-query";
|
|
10
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})),
|
|
22
|
-
combine: (e) => e.map((e, t) => ({
|
|
23
|
-
payableId: i[t],
|
|
24
|
-
ocrStatus: e.data?.ocr_status,
|
|
25
|
-
isError: e.isError
|
|
26
|
-
}))
|
|
27
|
-
});
|
|
5
|
+
var n = 2500;
|
|
6
|
+
function r({ client: n, organizationId: r, payableId: i }) {
|
|
7
|
+
return {
|
|
8
|
+
...t({
|
|
9
|
+
client: n,
|
|
10
|
+
headers: e(r),
|
|
11
|
+
path: { payable_id: i }
|
|
12
|
+
}),
|
|
13
|
+
refetchInterval: (e) => e.state.data?.ocr_status === "processing" && 2500
|
|
14
|
+
};
|
|
28
15
|
}
|
|
29
16
|
//#endregion
|
|
30
|
-
export {
|
|
17
|
+
export { n as OCR_POLL_INTERVAL_MS, r as payableOcrQueryOptions };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js
CHANGED
|
@@ -3,48 +3,28 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
-
import {
|
|
7
|
-
import { getPayablesAnalyticsOptions as n, getPayablesIdOptions as r, getPayablesOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
-
import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
7
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { payableOcrQueryOptions as
|
|
11
|
-
import {
|
|
8
|
+
import { payableOcrQueryOptions as n } from "./index13.js";
|
|
9
|
+
import { useQueries as r } from "@tanstack/react-query";
|
|
12
10
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js
|
|
13
|
-
function
|
|
14
|
-
let { client: o, organizationId:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return s({
|
|
30
|
-
...a(d, l),
|
|
31
|
-
enabled: u
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function u(n, { enabled: i = !0, pollWhileOcrProcessing: c = !1 } = {}) {
|
|
35
|
-
let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = !!(u && d && n) && i, m = c ? o({
|
|
36
|
-
client: l,
|
|
37
|
-
organizationId: u,
|
|
38
|
-
payableId: n ?? ""
|
|
39
|
-
}) : r({
|
|
40
|
-
client: l,
|
|
41
|
-
headers: t(u),
|
|
42
|
-
path: { payable_id: n ?? "" }
|
|
43
|
-
});
|
|
44
|
-
return s({
|
|
45
|
-
...a(m, f),
|
|
46
|
-
enabled: p
|
|
11
|
+
function i({ payableIds: i, enabled: a }) {
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = e(), u = !!(s && c) && (a === !0 || a === void 0);
|
|
13
|
+
return r({
|
|
14
|
+
queries: i.map((e) => ({
|
|
15
|
+
...t(n({
|
|
16
|
+
client: o,
|
|
17
|
+
organizationId: s,
|
|
18
|
+
payableId: e
|
|
19
|
+
}), l),
|
|
20
|
+
enabled: u && !!e
|
|
21
|
+
})),
|
|
22
|
+
combine: (e) => e.map((e, t) => ({
|
|
23
|
+
payableId: i[t],
|
|
24
|
+
ocrStatus: e.data?.ocr_status,
|
|
25
|
+
isError: e.isError
|
|
26
|
+
}))
|
|
47
27
|
});
|
|
48
28
|
}
|
|
49
29
|
//#endregion
|
|
50
|
-
export {
|
|
30
|
+
export { i as usePayableOcrQueries };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js
CHANGED
|
@@ -4,33 +4,84 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { getPayables as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getPayablesAnalyticsOptions as r, getPayablesIdOptions as i, getPayablesOptions as a, getPayablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { withAuthEpoch as s } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
10
|
import "../../../shared/data-access/dist/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import { payableOcrQueryOptions as c } from "./index13.js";
|
|
12
|
+
import { queryOptions as l, useQuery as u } from "@tanstack/react-query";
|
|
12
13
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js
|
|
13
|
-
function
|
|
14
|
-
let { client:
|
|
15
|
-
client:
|
|
14
|
+
function d({ enabled: n, ...r } = {}) {
|
|
15
|
+
let { client: i, organizationId: o, widgetToken: c, authEpoch: l } = e(), d = !!(o && c) && (n === !0 || n === void 0), f = a({
|
|
16
|
+
client: i,
|
|
17
|
+
headers: t(o),
|
|
18
|
+
query: r
|
|
19
|
+
});
|
|
20
|
+
return u({
|
|
21
|
+
...s(f, l),
|
|
22
|
+
enabled: d
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
var f = 100;
|
|
26
|
+
function p({ enabled: r } = {}) {
|
|
27
|
+
let { client: i, organizationId: a, widgetToken: c, authEpoch: d } = e(), p = t(a), m = {
|
|
28
|
+
duplicate_match_status: "suspected",
|
|
29
|
+
limit: f
|
|
30
|
+
}, h = l({
|
|
31
|
+
queryKey: [...o({
|
|
32
|
+
client: i,
|
|
33
|
+
headers: p,
|
|
34
|
+
query: m
|
|
35
|
+
}), "all"],
|
|
36
|
+
queryFn: async ({ signal: e }) => {
|
|
37
|
+
let t = [], r = /* @__PURE__ */ new Set(), a;
|
|
38
|
+
do {
|
|
39
|
+
let { data: o } = await n({
|
|
40
|
+
client: i,
|
|
41
|
+
headers: p,
|
|
42
|
+
query: {
|
|
43
|
+
...m,
|
|
44
|
+
pagination_token: a
|
|
45
|
+
},
|
|
46
|
+
signal: e,
|
|
47
|
+
throwOnError: !0
|
|
48
|
+
});
|
|
49
|
+
t.push(...o.data ?? []);
|
|
50
|
+
let s = o.next_pagination_token ?? void 0;
|
|
51
|
+
a = s && !r.has(s) ? (r.add(s), s) : void 0;
|
|
52
|
+
} while (a);
|
|
53
|
+
return { data: t };
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return u({
|
|
57
|
+
...s(h, d),
|
|
58
|
+
enabled: !!(a && c) && r !== !1
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function m({ enabled: n } = {}) {
|
|
62
|
+
let { client: i, organizationId: a, widgetToken: o, authEpoch: c } = e(), l = !!(a && o) && (n === !0 || n === void 0), d = r({
|
|
63
|
+
client: i,
|
|
64
|
+
headers: t(a)
|
|
65
|
+
});
|
|
66
|
+
return u({
|
|
67
|
+
...s(d, c),
|
|
68
|
+
enabled: l
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function h(n, { enabled: r = !0, pollWhileOcrProcessing: a = !1 } = {}) {
|
|
72
|
+
let { client: o, organizationId: l, widgetToken: d, authEpoch: f } = e(), p = !!(l && d && n) && r, m = a ? c({
|
|
73
|
+
client: o,
|
|
74
|
+
organizationId: l,
|
|
75
|
+
payableId: n ?? ""
|
|
76
|
+
}) : i({
|
|
77
|
+
client: o,
|
|
16
78
|
headers: t(l),
|
|
17
|
-
path: { payable_id:
|
|
18
|
-
})
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
enabled:
|
|
22
|
-
retry: !1,
|
|
23
|
-
queryFn: async (e) => {
|
|
24
|
-
try {
|
|
25
|
-
if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
|
|
26
|
-
return await h(e);
|
|
27
|
-
} catch (e) {
|
|
28
|
-
if (i(e)) return null;
|
|
29
|
-
throw e;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
select: (e) => e ?? void 0
|
|
79
|
+
path: { payable_id: n ?? "" }
|
|
80
|
+
});
|
|
81
|
+
return u({
|
|
82
|
+
...s(m, f),
|
|
83
|
+
enabled: p
|
|
33
84
|
});
|
|
34
85
|
}
|
|
35
86
|
//#endregion
|
|
36
|
-
export {
|
|
87
|
+
export { p as useAllSuspectedDuplicatePayablesQuery, h as usePayableQuery, d as usePayablesQuery, m as usePayablesTotalCountQuery };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
|
|
10
|
+
import "../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js
|
|
13
|
+
function o(o, { enabled: s = !0 } = {}) {
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
|
|
15
|
+
client: c,
|
|
16
|
+
headers: t(l),
|
|
17
|
+
path: { payable_id: o ?? "" }
|
|
18
|
+
}), { queryKey: m, queryFn: h } = r(p, d);
|
|
19
|
+
return a({
|
|
20
|
+
queryKey: m,
|
|
21
|
+
enabled: f,
|
|
22
|
+
retry: !1,
|
|
23
|
+
queryFn: async (e) => {
|
|
24
|
+
try {
|
|
25
|
+
if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
|
|
26
|
+
return await h(e);
|
|
27
|
+
} catch (e) {
|
|
28
|
+
if (i(e)) return null;
|
|
29
|
+
throw e;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
select: (e) => e ?? void 0
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as usePayableSuggestionsQuery };
|