@tesouro/embedded-components-react 0.3.34 → 0.3.36

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 (38) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +33 -31
  2. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index6.js +5 -9
  3. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +98 -92
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +12 -11
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +26 -300
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +314 -12
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +13 -26
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +20 -40
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +39 -25
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +36 -0
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +5 -29
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +28 -102
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +115 -65
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +60 -16
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +18 -63
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +50 -29
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +39 -30
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +2 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +8 -8
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +9 -8
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +2 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +4 -4
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +3 -3
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +2 -2
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
  36. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +6 -10
  37. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  38. package/package.json +1 -1
@@ -4,316 +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, postPaymentRecordsIdCancel 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 { invalidateDeletedPayableQueries as g, invalidatePayableQueries as _, reconcileCancelledPaymentQueries as v } from "./index4.js";
10
- import { useMutation as y } from "@tanstack/react-query";
9
+ import { invalidatePayableQueries as r, reconcileScheduledPaymentQueries as i } from "./index5.js";
10
+ import { useMutation as a } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
12
- function b() {
13
- let { client: n, organizationId: r } = e();
14
- return y({
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 _({
26
- client: n,
27
- organizationId: r
28
- });
29
- }
30
- });
31
- }
32
- function x() {
33
- let { client: n, organizationId: r } = e();
34
- return y({
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 _({
47
- client: n,
48
- organizationId: r,
49
- payableId: t.path.payable_id
50
- });
51
- }
52
- });
53
- }
54
- function S() {
55
- let { client: r, organizationId: i } = e();
56
- return y({
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 g({
67
- client: r,
68
- organizationId: i,
69
- payableId: t.path.payable_id
70
- });
71
- }
72
- });
73
- }
74
- function C() {
75
- let { client: n, organizationId: r } = e();
76
- return y({
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 _({
100
- client: n,
101
- organizationId: r
102
- });
103
- }
104
- });
105
- }
106
- function w() {
107
- let { client: n, organizationId: r } = e();
108
- return y({
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 _({
121
- client: n,
122
- organizationId: r,
123
- payableId: t.path.payable_id
124
- });
125
- }
126
- });
127
- }
128
- function T() {
129
- let { client: n, organizationId: i } = e();
130
- return y({
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 _({
141
- client: n,
142
- organizationId: i,
143
- payableId: t.path.payable_id
144
- });
145
- }
146
- });
147
- }
148
- function E() {
149
- let { client: n, organizationId: r } = e();
150
- return y({ 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 D() {
164
- let { client: n, organizationId: r } = e();
165
- return y({
166
- mutationFn: async ({ path: e }) => {
167
- let { data: i } = await f({
168
- client: n,
169
- headers: t(r),
170
- path: e,
171
- throwOnError: !0
172
- });
173
- return i;
174
- },
175
- onSuccess: async (e, t) => {
176
- await _({
177
- client: n,
178
- organizationId: r,
179
- payableId: t.path.payable_id,
180
- includeApprovalRequests: !0
181
- });
182
- }
183
- });
184
- }
185
- function O() {
186
- let { client: n, organizationId: r } = e();
187
- return y({
188
- mutationFn: async ({ path: e }) => {
189
- let { data: i } = await o({
190
- client: n,
191
- headers: t(r),
192
- path: e,
193
- throwOnError: !0
194
- });
195
- return i;
196
- },
197
- onSuccess: async (e, t) => {
198
- await _({
199
- client: n,
200
- organizationId: r,
201
- payableId: t.path.payable_id,
202
- includeApprovalRequests: !0
203
- });
204
- }
205
- });
206
- }
207
- function k() {
208
- let { client: n, organizationId: r } = e();
209
- return y({
210
- mutationFn: async ({ path: e }) => {
211
- let { data: i } = await u({
212
- client: n,
213
- headers: t(r),
214
- path: e,
215
- throwOnError: !0
216
- });
217
- return i;
218
- },
219
- onSuccess: async (e, t) => {
220
- await _({
221
- client: n,
222
- organizationId: r,
223
- payableId: t.path.payable_id,
224
- includeApprovalRequests: !0
225
- });
226
- }
227
- });
228
- }
229
- function A() {
230
- let { client: n, organizationId: r } = e();
231
- return y({
232
- mutationFn: async ({ path: e }) => {
233
- let { data: i } = await c({
234
- client: n,
235
- headers: t(r),
236
- path: e,
237
- throwOnError: !0
238
- });
239
- return i;
240
- },
241
- onSuccess: async (e, t) => {
242
- await _({
243
- client: n,
244
- organizationId: r,
245
- payableId: t.path.payable_id
246
- });
247
- }
248
- });
249
- }
250
- function j() {
251
- let { client: n, organizationId: r } = e();
252
- return y({
253
- mutationFn: async ({ path: e }) => {
254
- let { data: i } = await h({
255
- client: n,
256
- headers: t(r),
257
- path: e,
258
- throwOnError: !0
259
- });
260
- return i;
261
- },
262
- onSuccess: async (e, t) => {
263
- await _({
264
- client: n,
265
- organizationId: r,
266
- payableId: t.payableId
267
- }), v({
268
- client: n,
269
- 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,
270
39
  payableId: t.payableId
271
40
  }).catch(() => {});
272
41
  }
273
42
  });
274
43
  }
275
- function M() {
276
- let { client: n, organizationId: r } = e();
277
- return y({
278
- mutationFn: async ({ path: e }) => {
279
- let { data: i } = await d({
280
- client: n,
281
- headers: t(r),
282
- path: e,
283
- throwOnError: !0
284
- });
285
- return i;
286
- },
287
- onSuccess: async (e, t) => {
288
- await _({
289
- client: n,
290
- organizationId: r,
291
- payableId: t.path.payable_id
292
- });
293
- }
294
- });
295
- }
296
- function N() {
297
- let { client: n, organizationId: r } = e();
298
- return y({
299
- mutationFn: async ({ path: e, body: i }) => {
300
- let { data: a } = await l({
301
- client: n,
302
- headers: t(r),
303
- path: e,
304
- body: i,
305
- throwOnError: !0
306
- });
307
- return a;
308
- },
309
- onSuccess: async (e, t) => {
310
- await _({
311
- client: n,
312
- organizationId: r,
313
- payableId: t.path.payable_id
314
- });
315
- }
316
- });
317
- }
318
44
  //#endregion
319
- export { w as useAttachPayableFileMutation, A as useCancelPayableMutation, j as useCancelPaymentRecordMutation, b as useCreatePayableMutation, T as useDeletePayableFileMutation, S as useDeletePayableMutation, O as useForceApprovePayableMutation, k as useForceRejectPayableMutation, N as useMarkPayableAsPaidMutation, M as useReopenPayableMutation, D as useSubmitPayableForApprovalMutation, x as useUpdatePayableMutation, C as useUploadPayableFromFileMutation, E as useValidatePayableMutation };
45
+ export { o as useSchedulePaymentMutation };
@@ -1,17 +1,319 @@
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 { invalidateDeletedPayableQueries as g, invalidatePayableQueries as _, reconcileCancelledPaymentQueries as v } from "./index5.js";
10
+ import { useMutation as y } from "@tanstack/react-query";
4
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
5
- var n = 2500;
6
- function r({ client: n, organizationId: r, payableId: i }) {
7
- return {
8
- ...t({
12
+ function b() {
13
+ let { client: n, organizationId: r } = e();
14
+ return y({
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 _({
26
+ client: n,
27
+ organizationId: r
28
+ });
29
+ }
30
+ });
31
+ }
32
+ function x() {
33
+ let { client: n, organizationId: r } = e();
34
+ return y({
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 _({
47
+ client: n,
48
+ organizationId: r,
49
+ payableId: t.path.payable_id
50
+ });
51
+ }
52
+ });
53
+ }
54
+ function S() {
55
+ let { client: r, organizationId: i } = e();
56
+ return y({
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 g({
67
+ client: r,
68
+ organizationId: i,
69
+ payableId: t.path.payable_id
70
+ });
71
+ }
72
+ });
73
+ }
74
+ function C() {
75
+ let { client: n, organizationId: r } = e();
76
+ return y({
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 _({
100
+ client: n,
101
+ organizationId: r
102
+ });
103
+ }
104
+ });
105
+ }
106
+ function w() {
107
+ let { client: n, organizationId: r } = e();
108
+ return y({
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 _({
121
+ client: n,
122
+ organizationId: r,
123
+ payableId: t.path.payable_id
124
+ });
125
+ }
126
+ });
127
+ }
128
+ function T() {
129
+ let { client: n, organizationId: i } = e();
130
+ return y({
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 _({
141
+ client: n,
142
+ organizationId: i,
143
+ payableId: t.path.payable_id
144
+ });
145
+ }
146
+ });
147
+ }
148
+ function E() {
149
+ let { client: n, organizationId: r } = e();
150
+ return y({ mutationFn: async ({ path: e }) => {
151
+ let { data: i } = await p({
9
152
  client: n,
10
- headers: e(r),
11
- path: { payable_id: i }
12
- }),
13
- refetchInterval: (e) => e.state.data?.ocr_status === "processing" && 2500
14
- };
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 D() {
164
+ let { client: n, organizationId: r } = e();
165
+ return y({
166
+ mutationFn: async ({ path: e }) => {
167
+ let { data: i } = await f({
168
+ client: n,
169
+ headers: t(r),
170
+ path: e,
171
+ throwOnError: !0
172
+ });
173
+ return i;
174
+ },
175
+ onSuccess: async (e, t) => {
176
+ await _({
177
+ client: n,
178
+ organizationId: r,
179
+ payableId: t.path.payable_id,
180
+ includeApprovalRequests: !0
181
+ });
182
+ }
183
+ });
184
+ }
185
+ function O() {
186
+ let { client: n, organizationId: r } = e();
187
+ return y({
188
+ mutationFn: async ({ path: e }) => {
189
+ let { data: i } = await o({
190
+ client: n,
191
+ headers: t(r),
192
+ path: e,
193
+ throwOnError: !0
194
+ });
195
+ return i;
196
+ },
197
+ onSuccess: async (e, t) => {
198
+ await _({
199
+ client: n,
200
+ organizationId: r,
201
+ payableId: t.path.payable_id,
202
+ includeApprovalRequests: !0
203
+ });
204
+ }
205
+ });
206
+ }
207
+ function k() {
208
+ let { client: n, organizationId: r } = e();
209
+ return y({
210
+ mutationFn: async ({ path: e }) => {
211
+ let { data: i } = await u({
212
+ client: n,
213
+ headers: t(r),
214
+ path: e,
215
+ throwOnError: !0
216
+ });
217
+ return i;
218
+ },
219
+ onSuccess: async (e, t) => {
220
+ await _({
221
+ client: n,
222
+ organizationId: r,
223
+ payableId: t.path.payable_id,
224
+ includeApprovalRequests: !0
225
+ });
226
+ }
227
+ });
228
+ }
229
+ function A() {
230
+ let { client: n, organizationId: r } = e();
231
+ return y({
232
+ mutationFn: async ({ path: e }) => {
233
+ let { data: i } = await c({
234
+ client: n,
235
+ headers: t(r),
236
+ path: e,
237
+ throwOnError: !0
238
+ });
239
+ return i;
240
+ },
241
+ onSuccess: async (e, t) => {
242
+ await _({
243
+ client: n,
244
+ organizationId: r,
245
+ payableId: t.path.payable_id
246
+ });
247
+ }
248
+ });
249
+ }
250
+ function j() {
251
+ let { client: n, organizationId: r } = e();
252
+ return y({
253
+ mutationFn: async ({ path: e }) => {
254
+ let { data: i } = await h({
255
+ client: n,
256
+ headers: t(r),
257
+ path: e,
258
+ throwOnError: !0
259
+ });
260
+ return i;
261
+ },
262
+ onSuccess: async (e, t) => {
263
+ await _({
264
+ client: n,
265
+ organizationId: r,
266
+ payableId: t.payableId
267
+ }), v({
268
+ client: n,
269
+ organizationId: r,
270
+ payableId: t.payableId
271
+ }).catch(() => {});
272
+ }
273
+ });
274
+ }
275
+ function M() {
276
+ let { client: n, organizationId: r } = e();
277
+ return y({
278
+ mutationFn: async ({ path: e }) => {
279
+ let { data: i } = await d({
280
+ client: n,
281
+ headers: t(r),
282
+ path: e,
283
+ throwOnError: !0
284
+ });
285
+ return i;
286
+ },
287
+ onSuccess: async (e, t) => {
288
+ await _({
289
+ client: n,
290
+ organizationId: r,
291
+ payableId: t.path.payable_id
292
+ });
293
+ }
294
+ });
295
+ }
296
+ function N() {
297
+ let { client: n, organizationId: r } = e();
298
+ return y({
299
+ mutationFn: async ({ path: e, body: i }) => {
300
+ let { data: a } = await l({
301
+ client: n,
302
+ headers: t(r),
303
+ path: e,
304
+ body: i,
305
+ throwOnError: !0
306
+ });
307
+ return a;
308
+ },
309
+ onSuccess: async (e, t) => {
310
+ await _({
311
+ client: n,
312
+ organizationId: r,
313
+ payableId: t.path.payable_id
314
+ });
315
+ }
316
+ });
15
317
  }
16
318
  //#endregion
17
- export { n as OCR_POLL_INTERVAL_MS, r as payableOcrQueryOptions };
319
+ export { w as useAttachPayableFileMutation, A as useCancelPayableMutation, j as useCancelScheduledPaymentMutation, b as useCreatePayableMutation, T as useDeletePayableFileMutation, S as useDeletePayableMutation, O as useForceApprovePayableMutation, k as useForceRejectPayableMutation, N as useMarkPayableAsPaidMutation, M as useReopenPayableMutation, D as useSubmitPayableForApprovalMutation, x as useUpdatePayableMutation, C as useUploadPayableFromFileMutation, E as useValidatePayableMutation };
@@ -1,30 +1,17 @@
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 { 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 "./index11.js";
9
- import { useQueries as r } from "@tanstack/react-query";
10
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js
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
- }))
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 { i as usePayableOcrQueries };
17
+ export { n as OCR_POLL_INTERVAL_MS, r as payableOcrQueryOptions };