@tesouro/embedded-components-react 0.3.34 → 0.3.35

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 (35) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +12 -11
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +26 -300
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +314 -12
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +13 -26
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +20 -40
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +39 -25
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +36 -0
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +5 -29
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +28 -102
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +115 -65
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +60 -16
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +18 -63
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +50 -29
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +39 -30
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +8 -8
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +9 -8
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +4 -4
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +3 -3
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +2 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
  33. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +6 -10
  34. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  35. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
1
  import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
2
2
  import "../../../shared/data-access/dist/index.js";
3
- import "./index3.js";
4
- import { useApprovePayableApprovalRequestMutation as t, usePayableApprovalRequestsQuery as n, useRejectPayableApprovalRequestMutation as r } from "./index5.js";
5
- import { usePayableHistoryQuery as i } from "./index6.js";
6
- import { useAllPayableLineItemsQuery as a, useReplacePayableLineItemsMutation as o } from "./index7.js";
7
- import { usePayablePaymentRecordsQuery as s } from "./index8.js";
8
- import { useSchedulePaymentMutation as c } from "./index9.js";
9
- import { useAttachPayableFileMutation as l, useCancelPayableMutation as u, useCancelPaymentRecordMutation as d, useCreatePayableMutation as f, useDeletePayableFileMutation as p, useDeletePayableMutation as m, useForceApprovePayableMutation as h, useForceRejectPayableMutation as g, useMarkPayableAsPaidMutation as _, useReopenPayableMutation as v, useSubmitPayableForApprovalMutation as y, useUpdatePayableMutation as b, useUploadPayableFromFileMutation as x, useValidatePayableMutation as S } from "./index10.js";
10
- import { usePayableOcrQueries as C } from "./index12.js";
11
- import { usePayableQuery as w, usePayablesQuery as T, usePayablesTotalCountQuery as E } from "./index13.js";
12
- import { usePayableSuggestionsQuery as D } from "./index14.js";
13
- export { a as useAllPayableLineItemsQuery, t as useApprovePayableApprovalRequestMutation, l as useAttachPayableFileMutation, u as useCancelPayableMutation, d as useCancelPaymentRecordMutation, f as useCreatePayableMutation, p as useDeletePayableFileMutation, m as useDeletePayableMutation, e as useEmbedApi, h as useForceApprovePayableMutation, g as useForceRejectPayableMutation, _ as useMarkPayableAsPaidMutation, n as usePayableApprovalRequestsQuery, i as usePayableHistoryQuery, C as usePayableOcrQueries, s as usePayablePaymentRecordsQuery, w as usePayableQuery, D as usePayableSuggestionsQuery, T as usePayablesQuery, E as usePayablesTotalCountQuery, r as useRejectPayableApprovalRequestMutation, v as useReopenPayableMutation, o as useReplacePayableLineItemsMutation, c as useSchedulePaymentMutation, y as useSubmitPayableForApprovalMutation, b as useUpdatePayableMutation, x as useUploadPayableFromFileMutation, S as useValidatePayableMutation };
3
+ import { isLiveScheduledPaymentRecord as t } from "./index3.js";
4
+ import "./index4.js";
5
+ import { useApprovePayableApprovalRequestMutation as n, usePayableApprovalRequestsQuery as r, useRejectPayableApprovalRequestMutation as i } from "./index6.js";
6
+ import { usePayableHistoryQuery as a } from "./index7.js";
7
+ import { useAllPayableLineItemsQuery as o, useReplacePayableLineItemsMutation as s } from "./index8.js";
8
+ import { usePayablePaymentRecordsQuery as c } from "./index9.js";
9
+ import { useSchedulePaymentMutation as l } from "./index10.js";
10
+ import { useAttachPayableFileMutation as u, useCancelPayableMutation as d, useCancelScheduledPaymentMutation as f, useCreatePayableMutation as p, useDeletePayableFileMutation as m, useDeletePayableMutation as h, useForceApprovePayableMutation as g, useForceRejectPayableMutation as _, useMarkPayableAsPaidMutation as v, useReopenPayableMutation as y, useSubmitPayableForApprovalMutation as b, useUpdatePayableMutation as x, useUploadPayableFromFileMutation as S, useValidatePayableMutation as C } from "./index11.js";
11
+ import { usePayableOcrQueries as w } from "./index13.js";
12
+ import { usePayableQuery as T, usePayablesQuery as E, usePayablesTotalCountQuery as D } from "./index14.js";
13
+ import { usePayableSuggestionsQuery as O } from "./index15.js";
14
+ export { t as isLiveScheduledPaymentRecord, o as useAllPayableLineItemsQuery, n as useApprovePayableApprovalRequestMutation, u as useAttachPayableFileMutation, d as useCancelPayableMutation, f as useCancelScheduledPaymentMutation, p as useCreatePayableMutation, m as useDeletePayableFileMutation, h as useDeletePayableMutation, e as useEmbedApi, g as useForceApprovePayableMutation, _ as useForceRejectPayableMutation, v as useMarkPayableAsPaidMutation, r as usePayableApprovalRequestsQuery, a as usePayableHistoryQuery, w as usePayableOcrQueries, c as usePayablePaymentRecordsQuery, T as usePayableQuery, O as usePayableSuggestionsQuery, E as usePayablesQuery, D as usePayablesTotalCountQuery, i as useRejectPayableApprovalRequestMutation, y as useReopenPayableMutation, s as useReplacePayableLineItemsMutation, l as useSchedulePaymentMutation, b as useSubmitPayableForApprovalMutation, x as useUpdatePayableMutation, S as useUploadPayableFromFileMutation, C as useValidatePayableMutation };
@@ -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 };