@tesouro/embedded-components-react 0.4.4 → 0.4.6

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 (69) hide show
  1. package/README.md +37 -37
  2. package/dist/index.d.ts +14 -8
  3. package/dist/lib/CreditCardsWidget.d.ts +4 -2
  4. package/dist/lib/DebitCardsWidget.d.ts +4 -2
  5. package/dist/lib/WidgetSuite.d.ts +14 -8
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +8 -8
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +50 -29
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +39 -30
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +26 -311
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +326 -12
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +13 -27
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +28 -245
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +256 -92
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +86 -73
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +77 -14
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +18 -63
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -56
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +77 -48
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +47 -91
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +91 -33
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +33 -167
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +168 -75
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +75 -21
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -210
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +199 -203
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +198 -89
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +105 -13
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +12 -47
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +47 -31
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +27 -198
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +198 -30
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +30 -234
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +240 -18
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +19 -341
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +344 -4
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +4 -33
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -83
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +25 -25
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -1
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +2 -2
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +2 -0
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -3
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +152 -131
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -27
  64. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +84 -87
  65. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +0 -1
  66. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  67. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +2 -2
  68. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +12 -10
  69. package/package.json +1 -1
@@ -4,327 +4,42 @@
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 { 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";
7
+ import { postPayablesIdSchedulePayment as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
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";
9
+ import { invalidatePayableQueries as r, reconcileScheduledPaymentQueries as i } from "./index6.js";
10
+ import { useMutation as a } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js
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 },
12
+ function o() {
13
+ let { client: o, organizationId: s } = e();
14
+ return a({
15
+ mutationFn: async ({ payableId: e, paymentDate: r, sourceBankAccountId: i }) => {
16
+ let { data: a } = await n({
17
+ client: o,
18
+ headers: t(s),
19
+ path: { payable_id: e },
20
+ body: {
21
+ payment_date: r,
22
+ source_bank_account_id: i
23
+ },
115
24
  throwOnError: !0
116
25
  });
117
26
  return a;
118
27
  },
119
28
  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({
167
- client: n,
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,
29
+ try {
30
+ await r({
31
+ client: o,
32
+ organizationId: s,
33
+ payableId: t.payableId
34
+ });
35
+ } catch {}
36
+ i({
37
+ client: o,
38
+ organizationId: s,
281
39
  payableId: t.payableId
282
40
  }).catch(() => {});
283
41
  }
284
42
  });
285
43
  }
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
- });
328
- }
329
44
  //#endregion
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 };
45
+ export { o as useSchedulePaymentMutation };
@@ -1,17 +1,331 @@
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";
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, reconcileUploadedPayableOcr as x } from "./index6.js";
10
+ import { useMutation as S } from "@tanstack/react-query";
4
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js
5
- var n = 2500;
6
- function r({ client: n, organizationId: r, payableId: i }) {
7
- return {
8
- ...t({
12
+ function C() {
13
+ let { client: n, organizationId: r } = e();
14
+ return S({
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 w() {
33
+ let { client: n, organizationId: r } = e();
34
+ return S({
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 T() {
55
+ let { client: r, organizationId: i } = e();
56
+ return S({
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 E() {
75
+ let { client: n, organizationId: r } = e();
76
+ return S({
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 (e) => {
99
+ e?.id && x({
100
+ client: n,
101
+ organizationId: r,
102
+ payableId: e.id
103
+ }).catch(() => {});
104
+ }
105
+ });
106
+ }
107
+ function D() {
108
+ let { client: n, organizationId: r } = e();
109
+ return S({
110
+ mutationFn: async ({ path: e, file: i }) => {
111
+ let { data: a } = await s({
112
+ client: n,
113
+ headers: t(r),
114
+ path: e,
115
+ body: { file: i },
116
+ throwOnError: !0
117
+ });
118
+ return a;
119
+ },
120
+ onSuccess: async (e, t) => {
121
+ await v({
122
+ client: n,
123
+ organizationId: r,
124
+ payableId: t.path.payable_id
125
+ });
126
+ }
127
+ });
128
+ }
129
+ function O() {
130
+ let { client: n, organizationId: i } = e();
131
+ return S({
132
+ mutationFn: async ({ path: e }) => {
133
+ await r({
134
+ client: n,
135
+ headers: t(i),
136
+ path: e,
137
+ throwOnError: !0
138
+ });
139
+ },
140
+ onSuccess: async (e, t) => {
141
+ await v({
142
+ client: n,
143
+ organizationId: i,
144
+ payableId: t.path.payable_id
145
+ });
146
+ }
147
+ });
148
+ }
149
+ function k() {
150
+ let { client: n, organizationId: r } = e();
151
+ return S({ mutationFn: async ({ path: e }) => {
152
+ let { data: i } = await p({
153
+ client: n,
154
+ headers: t(r),
155
+ path: e,
156
+ throwOnError: !0
157
+ });
158
+ return {
159
+ id: i.id,
160
+ validation_errors: i.validation_errors ?? []
161
+ };
162
+ } });
163
+ }
164
+ function A() {
165
+ let { client: n, organizationId: r } = e();
166
+ return S({
167
+ onMutate: async ({ path: e }) => g({
9
168
  client: n,
10
- headers: e(r),
11
- path: { payable_id: i }
12
- }),
13
- refetchInterval: (e) => e.state.data?.ocr_status === "processing" && 2500
14
- };
169
+ organizationId: r,
170
+ payableId: e.payable_id
171
+ }, { requireRoundMarker: !0 }),
172
+ mutationFn: async ({ path: e }) => {
173
+ let { data: i } = await f({
174
+ client: n,
175
+ headers: t(r),
176
+ path: e,
177
+ throwOnError: !0
178
+ });
179
+ return i;
180
+ },
181
+ onSuccess: async (e, t, i) => {
182
+ let a = t.path.payable_id, o = e?.status === "approve_in_progress";
183
+ await v({
184
+ client: n,
185
+ organizationId: r,
186
+ payableId: a,
187
+ includeApprovalRequests: !0
188
+ }), !(!o || !i) && b({
189
+ client: n,
190
+ organizationId: r,
191
+ payableId: a,
192
+ watch: i
193
+ }).catch(() => {});
194
+ }
195
+ });
196
+ }
197
+ function j() {
198
+ let { client: n, organizationId: r } = e();
199
+ return S({
200
+ mutationFn: async ({ path: e }) => {
201
+ let { data: i } = await o({
202
+ client: n,
203
+ headers: t(r),
204
+ path: e,
205
+ throwOnError: !0
206
+ });
207
+ return i;
208
+ },
209
+ onSuccess: async (e, t) => {
210
+ await v({
211
+ client: n,
212
+ organizationId: r,
213
+ payableId: t.path.payable_id,
214
+ includeApprovalRequests: !0
215
+ });
216
+ }
217
+ });
218
+ }
219
+ function M() {
220
+ let { client: n, organizationId: r } = e();
221
+ return S({
222
+ mutationFn: async ({ path: e }) => {
223
+ let { data: i } = await u({
224
+ client: n,
225
+ headers: t(r),
226
+ path: e,
227
+ throwOnError: !0
228
+ });
229
+ return i;
230
+ },
231
+ onSuccess: async (e, t) => {
232
+ await v({
233
+ client: n,
234
+ organizationId: r,
235
+ payableId: t.path.payable_id,
236
+ includeApprovalRequests: !0
237
+ });
238
+ }
239
+ });
240
+ }
241
+ function N() {
242
+ let { client: n, organizationId: r } = e();
243
+ return S({
244
+ mutationFn: async ({ path: e }) => {
245
+ let { data: i } = await c({
246
+ client: n,
247
+ headers: t(r),
248
+ path: e,
249
+ throwOnError: !0
250
+ });
251
+ return i;
252
+ },
253
+ onSuccess: async (e, t) => {
254
+ await v({
255
+ client: n,
256
+ organizationId: r,
257
+ payableId: t.path.payable_id
258
+ });
259
+ }
260
+ });
261
+ }
262
+ function P() {
263
+ let { client: n, organizationId: r } = e();
264
+ return S({
265
+ mutationFn: async ({ path: e }) => {
266
+ let { data: i } = await h({
267
+ client: n,
268
+ headers: t(r),
269
+ path: e,
270
+ throwOnError: !0
271
+ });
272
+ return i;
273
+ },
274
+ onSuccess: async (e, t) => {
275
+ await v({
276
+ client: n,
277
+ organizationId: r,
278
+ payableId: t.payableId
279
+ }), y({
280
+ client: n,
281
+ organizationId: r,
282
+ payableId: t.payableId
283
+ }).catch(() => {});
284
+ }
285
+ });
286
+ }
287
+ function F() {
288
+ let { client: n, organizationId: r } = e();
289
+ return S({
290
+ mutationFn: async ({ path: e }) => {
291
+ let { data: i } = await d({
292
+ client: n,
293
+ headers: t(r),
294
+ path: e,
295
+ throwOnError: !0
296
+ });
297
+ return i;
298
+ },
299
+ onSuccess: async (e, t) => {
300
+ await v({
301
+ client: n,
302
+ organizationId: r,
303
+ payableId: t.path.payable_id
304
+ });
305
+ }
306
+ });
307
+ }
308
+ function I() {
309
+ let { client: n, organizationId: r } = e();
310
+ return S({
311
+ mutationFn: async ({ path: e, body: i }) => {
312
+ let { data: a } = await l({
313
+ client: n,
314
+ headers: t(r),
315
+ path: e,
316
+ body: i,
317
+ throwOnError: !0
318
+ });
319
+ return a;
320
+ },
321
+ onSuccess: async (e, t) => {
322
+ await v({
323
+ client: n,
324
+ organizationId: r,
325
+ payableId: t.path.payable_id
326
+ });
327
+ }
328
+ });
15
329
  }
16
330
  //#endregion
17
- export { n as OCR_POLL_INTERVAL_MS, r as payableOcrQueryOptions };
331
+ export { D as useAttachPayableFileMutation, N as useCancelPayableMutation, P as useCancelScheduledPaymentMutation, C as useCreatePayableMutation, O as useDeletePayableFileMutation, T as useDeletePayableMutation, j as useForceApprovePayableMutation, M as useForceRejectPayableMutation, I as useMarkPayableAsPaidMutation, F as useReopenPayableMutation, A as useSubmitPayableForApprovalMutation, w as useUpdatePayableMutation, E as useUploadPayableFromFileMutation, k as useValidatePayableMutation };
@@ -5,7 +5,7 @@
5
5
  import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
6
  import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
7
7
  import "../../../shared/data-access/dist/index.js";
8
- import { payableOcrQueryOptions as n } from "./index13.js";
8
+ import { payableOcrQueryOptions as n } from "./index4.js";
9
9
  import { useQueries as r } from "@tanstack/react-query";
10
10
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js
11
11
  function i({ payableIds: i, enabled: a }) {
@@ -8,7 +8,7 @@ import { getPayables as n } from "../../../shared/data-access/dist/lib/rest/sdk.
8
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
9
  import { withAuthEpoch as s } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
- import { payableOcrQueryOptions as c } from "./index13.js";
11
+ import { payableOcrQueryOptions as c } from "./index4.js";
12
12
  import { queryOptions as l, useQuery as u } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js
14
14
  function d({ enabled: n, ...r } = {}) {