@tesouro/embedded-components-react 0.4.4 → 0.4.5

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 (37) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +8 -8
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +50 -29
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +39 -30
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +26 -311
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +326 -12
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +13 -27
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +28 -245
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +256 -92
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +86 -73
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +77 -14
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +18 -63
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +2 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +2 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -3
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -1
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -27
  36. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  37. package/package.json +1 -1
@@ -1,14 +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
3
  import { isLiveScheduledPaymentRecord as t } from "./index3.js";
4
- import "./index4.js";
5
- import { DuplicateVerdict as n, hasSuspectedPayableDuplicate as r, suspectedPayableDuplicates as i, useApplyDuplicateVerdictsMutation as a } from "./index6.js";
6
- import { useApprovePayableApprovalRequestMutation as o, usePayableApprovalRequestsQuery as s, useRejectPayableApprovalRequestMutation as c } from "./index7.js";
7
- import { usePayableHistoryQuery as l } from "./index8.js";
8
- import { useAllPayableLineItemsQuery as u, useReplacePayableLineItemsMutation as d } from "./index9.js";
9
- import { usePayablePaymentRecordsQuery as f } from "./index10.js";
10
- import { useSchedulePaymentMutation as p } from "./index11.js";
11
- import { useAttachPayableFileMutation as m, useCancelPayableMutation as h, useCancelScheduledPaymentMutation as g, useCreatePayableMutation as _, useDeletePayableFileMutation as v, useDeletePayableMutation as y, useForceApprovePayableMutation as b, useForceRejectPayableMutation as x, useMarkPayableAsPaidMutation as S, useReopenPayableMutation as C, useSubmitPayableForApprovalMutation as w, useUpdatePayableMutation as T, useUploadPayableFromFileMutation as E, useValidatePayableMutation as D } from "./index12.js";
4
+ import "./index5.js";
5
+ import { DuplicateVerdict as n, hasSuspectedPayableDuplicate as r, suspectedPayableDuplicates as i, useApplyDuplicateVerdictsMutation as a } from "./index7.js";
6
+ import { useApprovePayableApprovalRequestMutation as o, usePayableApprovalRequestsQuery as s, useRejectPayableApprovalRequestMutation as c } from "./index8.js";
7
+ import { usePayableHistoryQuery as l } from "./index9.js";
8
+ import { useAllPayableLineItemsQuery as u, useReplacePayableLineItemsMutation as d } from "./index10.js";
9
+ import { usePayablePaymentRecordsQuery as f } from "./index11.js";
10
+ import { useSchedulePaymentMutation as p } from "./index12.js";
11
+ import { useAttachPayableFileMutation as m, useCancelPayableMutation as h, useCancelScheduledPaymentMutation as g, useCreatePayableMutation as _, useDeletePayableFileMutation as v, useDeletePayableMutation as y, useForceApprovePayableMutation as b, useForceRejectPayableMutation as x, useMarkPayableAsPaidMutation as S, useReopenPayableMutation as C, useSubmitPayableForApprovalMutation as w, useUpdatePayableMutation as T, useUploadPayableFromFileMutation as E, useValidatePayableMutation as D } from "./index13.js";
12
12
  import { usePayableOcrQueries as O } from "./index14.js";
13
13
  import { useAllSuspectedDuplicatePayablesQuery as k, usePayableQuery as A, usePayablesQuery as j, usePayablesTotalCountQuery as M } from "./index15.js";
14
14
  import { usePayableSuggestionsQuery as N } from "./index16.js";
@@ -4,51 +4,72 @@
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 { getPaymentRecords as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
- import { getPaymentRecordsOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
- import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
- import { getAllPagesNextPaginationTokenParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../../../shared/data-access/dist/lib/allPages.js";
7
+ import { getPayablesIdLineItems as n, putPayablesIdLineItems as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
+ import { getPayablesIdLineItemsOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
+ import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
+ import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
11
11
  import "../../../shared/data-access/dist/index.js";
12
- import { useMemo as c } from "react";
13
- import { useInfiniteQuery as l } from "@tanstack/react-query";
12
+ import { invalidatePayableQueries as l } from "./index6.js";
13
+ import { useMemo as u } from "react";
14
+ import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
14
15
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
15
- var u = 100;
16
- function d(d, { enabled: f } = {}) {
17
- let { client: p, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && d) && f !== !1, y = {
18
- limit: u,
19
- object_id__in: d ? [d] : [],
20
- order: "desc",
21
- sort: "paid_at"
22
- }, b = r({
23
- client: p,
16
+ var p = 100;
17
+ function m(r, { enabled: l } = {}) {
18
+ let { client: f, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && r) && l !== !1, y = i({
19
+ client: f,
24
20
  headers: _,
25
- query: y
26
- }), x = l({
27
- queryKey: [...i(b, g).queryKey, "all"],
21
+ path: { payable_id: r ?? "" },
22
+ query: { limit: p }
23
+ }), b = d({
24
+ queryKey: [...a(y, g).queryKey, "all"],
28
25
  enabled: v,
29
26
  initialPageParam: void 0,
30
27
  queryFn: async ({ signal: e, pageParam: t }) => {
31
- let { data: r } = await n({
32
- client: p,
28
+ let { data: i } = await n({
29
+ client: f,
33
30
  headers: _,
31
+ path: { payable_id: r ?? "" },
34
32
  query: {
35
- ...y,
33
+ limit: p,
36
34
  ...t ? { pagination_token: t } : {}
37
35
  },
38
36
  signal: e,
39
37
  throwOnError: !0
40
38
  });
41
- return r;
39
+ return i;
42
40
  },
43
- getNextPageParam: a
41
+ getNextPageParam: o
44
42
  });
45
- s(x, v);
46
- let S = c(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
43
+ c(b, v);
44
+ let x = u(() => b.data?.pages.flatMap((e) => e.data ?? []) ?? [], [b.data]);
47
45
  return {
48
- ...x,
49
- paymentRecords: S,
50
- isResolving: v && o(x)
46
+ ...b,
47
+ lineItems: x,
48
+ isResolving: s(b)
51
49
  };
52
50
  }
51
+ function h() {
52
+ let { client: n, organizationId: i } = e();
53
+ return f({
54
+ mutationFn: async ({ path: e, body: a }) => {
55
+ let { data: o } = await r({
56
+ client: n,
57
+ headers: t(i),
58
+ path: e,
59
+ body: a,
60
+ throwOnError: !0
61
+ });
62
+ return o;
63
+ },
64
+ onSuccess: async (e, t) => {
65
+ await l({
66
+ client: n,
67
+ organizationId: i,
68
+ payableId: t.path.payable_id,
69
+ includeLineItems: !0
70
+ });
71
+ }
72
+ });
73
+ }
53
74
  //#endregion
54
- export { d as usePayablePaymentRecordsQuery };
75
+ export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };
@@ -4,42 +4,51 @@
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 { postPayablesIdSchedulePayment as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
7
+ import { getPaymentRecords as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
+ import { getPaymentRecordsOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
+ import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
+ import { getAllPagesNextPaginationTokenParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../../../shared/data-access/dist/lib/allPages.js";
8
11
  import "../../../shared/data-access/dist/index.js";
9
- import { invalidatePayableQueries as r, reconcileScheduledPaymentQueries as i } from "./index5.js";
10
- import { useMutation as a } from "@tanstack/react-query";
12
+ import { useMemo as c } from "react";
13
+ import { useInfiniteQuery as l } from "@tanstack/react-query";
11
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
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
15
+ var u = 100;
16
+ function d(d, { enabled: f } = {}) {
17
+ let { client: p, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && d) && f !== !1, y = {
18
+ limit: u,
19
+ object_id__in: d ? [d] : [],
20
+ order: "desc",
21
+ sort: "paid_at"
22
+ }, b = r({
23
+ client: p,
24
+ headers: _,
25
+ query: y
26
+ }), x = l({
27
+ queryKey: [...i(b, g).queryKey, "all"],
28
+ enabled: v,
29
+ initialPageParam: void 0,
30
+ queryFn: async ({ signal: e, pageParam: t }) => {
31
+ let { data: r } = await n({
32
+ client: p,
33
+ headers: _,
34
+ query: {
35
+ ...y,
36
+ ...t ? { pagination_token: t } : {}
23
37
  },
38
+ signal: e,
24
39
  throwOnError: !0
25
40
  });
26
- return a;
41
+ return r;
27
42
  },
28
- onSuccess: async (e, t) => {
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,
39
- payableId: t.payableId
40
- }).catch(() => {});
41
- }
43
+ getNextPageParam: a
42
44
  });
45
+ s(x, v);
46
+ let S = c(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
47
+ return {
48
+ ...x,
49
+ paymentRecords: S,
50
+ isResolving: v && o(x)
51
+ };
43
52
  }
44
53
  //#endregion
45
- export { o as useSchedulePaymentMutation };
54
+ export { d as usePayablePaymentRecordsQuery };
@@ -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 };