@tesouro/embedded-components-react 0.2.337 → 0.2.338

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 (63) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -5
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +103 -58
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +74 -37
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +25 -20
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +64 -48
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +4 -3
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +40 -50
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +51 -5
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -71
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +71 -48
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +46 -77
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +78 -33
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +33 -117
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +138 -67
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -200
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +194 -184
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +180 -50
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +64 -12
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +12 -46
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +46 -30
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +26 -158
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +159 -31
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +32 -98
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +102 -11
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +13 -224
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +243 -4
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +4 -29
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +27 -80
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +76 -126
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +137 -3
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -4
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +2 -43
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +45 -1
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +1 -8
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +6 -9
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +9 -92
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +94 -3
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +3 -9
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +7 -20
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +14 -51
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +59 -3
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +3 -110
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +107 -8
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +8 -40
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +40 -5
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +6 -98
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +91 -171
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +179 -4
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +5 -8
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +6 -113
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +115 -1
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +0 -24
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +25 -0
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +1 -0
  58. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +26 -26
  59. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/clientRegistry.js +11 -2
  60. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +94 -74
  61. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  62. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  63. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import "./lib/AcceptDisclosuresWidget.js";
16
16
  import { BankAccountsWidget as C } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
17
17
  import "./lib/BankAccountsWidget.js";
18
18
  import { CounterpartsWidget as w } from "./libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js";
19
- import { BillPayWidget as T } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js";
19
+ import { BillPayWidget as T } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js";
20
20
  import "./lib/BillPayWidget.js";
21
21
  import { CardDetailsWidget as E } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js";
22
22
  import { CardFormatValue as D } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index3.js";
@@ -1,3 +1,3 @@
1
- import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js";
1
+ import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js";
2
2
  import "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js";
3
3
  export { e as BillPayWidget };
@@ -6,8 +6,8 @@ import { usePayableHistoryQuery as i } from "./index6.js";
6
6
  import { useAllPayableLineItemsQuery as a, useReplacePayableLineItemsMutation as o } from "./index7.js";
7
7
  import { usePayablePaymentRecordsQuery as s } from "./index8.js";
8
8
  import { useSchedulePaymentMutation as c } from "./index9.js";
9
- import { useAttachPayableFileMutation as l, useCancelPayableMutation as u, useCreatePayableMutation as d, useDeletePayableFileMutation as f, useForceApprovePayableMutation as p, useForceRejectPayableMutation as m, useMarkPayableAsPaidMutation as h, useReopenPayableMutation as g, useSubmitPayableForApprovalMutation as _, useUpdatePayableMutation as v, useUploadPayableFromFileMutation as y, useValidatePayableMutation as b } from "./index10.js";
10
- import { usePayableOcrQueries as x } from "./index12.js";
11
- import { usePayableQuery as S, usePayablesQuery as C, usePayablesTotalCountQuery as w } from "./index13.js";
12
- import { usePayableSuggestionsQuery as T } from "./index14.js";
13
- export { a as useAllPayableLineItemsQuery, t as useApprovePayableApprovalRequestMutation, l as useAttachPayableFileMutation, u as useCancelPayableMutation, d as useCreatePayableMutation, f as useDeletePayableFileMutation, e as useEmbedApi, p as useForceApprovePayableMutation, m as useForceRejectPayableMutation, h as useMarkPayableAsPaidMutation, n as usePayableApprovalRequestsQuery, i as usePayableHistoryQuery, x as usePayableOcrQueries, s as usePayablePaymentRecordsQuery, S as usePayableQuery, T as usePayableSuggestionsQuery, C as usePayablesQuery, w as usePayablesTotalCountQuery, r as useRejectPayableApprovalRequestMutation, g as useReopenPayableMutation, o as useReplacePayableLineItemsMutation, c as useSchedulePaymentMutation, _ as useSubmitPayableForApprovalMutation, v as useUpdatePayableMutation, y as useUploadPayableFromFileMutation, b as useValidatePayableMutation };
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 };
@@ -4,38 +4,38 @@
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 { deleteFilesId as n, patchPayablesId as r, postPayables as i, postPayablesIdApprovePaymentOperation as a, postPayablesIdAttachFile as o, postPayablesIdCancel as s, postPayablesIdMarkAsPaid as c, postPayablesIdReject as l, postPayablesIdReopen as u, postPayablesIdSubmitForApproval as d, postPayablesIdValidate as f, postPayablesUploadFromFile as p } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
7
+ import { deleteFilesId as n, deletePayablesId 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";
8
8
  import "../../../shared/data-access/dist/index.js";
9
- import { invalidatePayableQueries as m } from "./index4.js";
10
- import { useMutation as h } from "@tanstack/react-query";
9
+ import { invalidateDeletedPayableQueries as g, invalidatePayableQueries as _, reconcileCancelledPaymentQueries as v } from "./index4.js";
10
+ import { useMutation as y } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
12
- function g() {
12
+ function b() {
13
13
  let { client: n, organizationId: r } = e();
14
- return h({
14
+ return y({
15
15
  mutationFn: async ({ body: e }) => {
16
- let { data: a } = await i({
16
+ let { data: i } = await a({
17
17
  client: n,
18
18
  headers: t(r),
19
19
  body: e,
20
20
  throwOnError: !0
21
21
  });
22
- return a;
22
+ return i;
23
23
  },
24
24
  onSuccess: async () => {
25
- await m({
25
+ await _({
26
26
  client: n,
27
27
  organizationId: r
28
28
  });
29
29
  }
30
30
  });
31
31
  }
32
- function _() {
33
- let { client: n, organizationId: i } = e();
34
- return h({
32
+ function x() {
33
+ let { client: n, organizationId: r } = e();
34
+ return y({
35
35
  mutationFn: async ({ path: e, body: a }) => {
36
- let { data: o } = await r({
36
+ let { data: o } = await i({
37
37
  client: n,
38
- headers: t(i),
38
+ headers: t(r),
39
39
  path: e,
40
40
  body: a,
41
41
  throwOnError: !0
@@ -43,28 +43,48 @@ function _() {
43
43
  return o;
44
44
  },
45
45
  onSuccess: async (e, t) => {
46
- await m({
46
+ await _({
47
47
  client: n,
48
- organizationId: i,
48
+ organizationId: r,
49
49
  payableId: t.path.payable_id
50
50
  });
51
51
  }
52
52
  });
53
53
  }
54
- function v() {
54
+ function S() {
55
55
  let { client: n, organizationId: i } = e();
56
- return h({
57
- mutationFn: async ({ file: e }) => {
58
- let { data: a } = await p({
56
+ return y({
57
+ mutationFn: async ({ path: e }) => {
58
+ await r({
59
59
  client: n,
60
60
  headers: t(i),
61
+ path: e,
62
+ throwOnError: !0
63
+ });
64
+ },
65
+ onSuccess: async (e, t) => {
66
+ await g({
67
+ client: n,
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),
61
81
  body: { file: e },
62
82
  throwOnError: !0
63
83
  });
64
84
  if (a?.id && a.currency !== "USD") try {
65
- return await r({
85
+ return await i({
66
86
  client: n,
67
- headers: t(i),
87
+ headers: t(r),
68
88
  path: { payable_id: a.id },
69
89
  body: { currency: "USD" },
70
90
  throwOnError: !0
@@ -76,18 +96,18 @@ function v() {
76
96
  return a;
77
97
  },
78
98
  onSuccess: async () => {
79
- await m({
99
+ await _({
80
100
  client: n,
81
- organizationId: i
101
+ organizationId: r
82
102
  });
83
103
  }
84
104
  });
85
105
  }
86
- function y() {
106
+ function w() {
87
107
  let { client: n, organizationId: r } = e();
88
- return h({
108
+ return y({
89
109
  mutationFn: async ({ path: e, file: i }) => {
90
- let { data: a } = await o({
110
+ let { data: a } = await s({
91
111
  client: n,
92
112
  headers: t(r),
93
113
  path: e,
@@ -97,7 +117,7 @@ function y() {
97
117
  return a;
98
118
  },
99
119
  onSuccess: async (e, t) => {
100
- await m({
120
+ await _({
101
121
  client: n,
102
122
  organizationId: r,
103
123
  payableId: t.path.payable_id
@@ -105,9 +125,9 @@ function y() {
105
125
  }
106
126
  });
107
127
  }
108
- function b() {
128
+ function T() {
109
129
  let { client: r, organizationId: i } = e();
110
- return h({
130
+ return y({
111
131
  mutationFn: async ({ path: e }) => {
112
132
  await n({
113
133
  client: r,
@@ -117,7 +137,7 @@ function b() {
117
137
  });
118
138
  },
119
139
  onSuccess: async (e, t) => {
120
- await m({
140
+ await _({
121
141
  client: r,
122
142
  organizationId: i,
123
143
  payableId: t.payableId
@@ -125,10 +145,10 @@ function b() {
125
145
  }
126
146
  });
127
147
  }
128
- function x() {
148
+ function E() {
129
149
  let { client: n, organizationId: r } = e();
130
- return h({ mutationFn: async ({ path: e }) => {
131
- let { data: i } = await f({
150
+ return y({ mutationFn: async ({ path: e }) => {
151
+ let { data: i } = await p({
132
152
  client: n,
133
153
  headers: t(r),
134
154
  path: e,
@@ -140,11 +160,11 @@ function x() {
140
160
  };
141
161
  } });
142
162
  }
143
- function S() {
163
+ function D() {
144
164
  let { client: n, organizationId: r } = e();
145
- return h({
165
+ return y({
146
166
  mutationFn: async ({ path: e }) => {
147
- let { data: i } = await d({
167
+ let { data: i } = await f({
148
168
  client: n,
149
169
  headers: t(r),
150
170
  path: e,
@@ -153,7 +173,7 @@ function S() {
153
173
  return i;
154
174
  },
155
175
  onSuccess: async (e, t) => {
156
- await m({
176
+ await _({
157
177
  client: n,
158
178
  organizationId: r,
159
179
  payableId: t.path.payable_id,
@@ -162,11 +182,11 @@ function S() {
162
182
  }
163
183
  });
164
184
  }
165
- function C() {
185
+ function O() {
166
186
  let { client: n, organizationId: r } = e();
167
- return h({
187
+ return y({
168
188
  mutationFn: async ({ path: e }) => {
169
- let { data: i } = await a({
189
+ let { data: i } = await o({
170
190
  client: n,
171
191
  headers: t(r),
172
192
  path: e,
@@ -175,7 +195,7 @@ function C() {
175
195
  return i;
176
196
  },
177
197
  onSuccess: async (e, t) => {
178
- await m({
198
+ await _({
179
199
  client: n,
180
200
  organizationId: r,
181
201
  payableId: t.path.payable_id,
@@ -184,11 +204,11 @@ function C() {
184
204
  }
185
205
  });
186
206
  }
187
- function w() {
207
+ function k() {
188
208
  let { client: n, organizationId: r } = e();
189
- return h({
209
+ return y({
190
210
  mutationFn: async ({ path: e }) => {
191
- let { data: i } = await l({
211
+ let { data: i } = await u({
192
212
  client: n,
193
213
  headers: t(r),
194
214
  path: e,
@@ -197,7 +217,7 @@ function w() {
197
217
  return i;
198
218
  },
199
219
  onSuccess: async (e, t) => {
200
- await m({
220
+ await _({
201
221
  client: n,
202
222
  organizationId: r,
203
223
  payableId: t.path.payable_id,
@@ -206,11 +226,11 @@ function w() {
206
226
  }
207
227
  });
208
228
  }
209
- function T() {
229
+ function A() {
210
230
  let { client: n, organizationId: r } = e();
211
- return h({
231
+ return y({
212
232
  mutationFn: async ({ path: e }) => {
213
- let { data: i } = await s({
233
+ let { data: i } = await c({
214
234
  client: n,
215
235
  headers: t(r),
216
236
  path: e,
@@ -219,7 +239,7 @@ function T() {
219
239
  return i;
220
240
  },
221
241
  onSuccess: async (e, t) => {
222
- await m({
242
+ await _({
223
243
  client: n,
224
244
  organizationId: r,
225
245
  payableId: t.path.payable_id
@@ -227,11 +247,36 @@ function T() {
227
247
  }
228
248
  });
229
249
  }
230
- function E() {
250
+ function j() {
231
251
  let { client: n, organizationId: r } = e();
232
- return h({
252
+ return y({
233
253
  mutationFn: async ({ path: e }) => {
234
- let { data: i } = await u({
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({
235
280
  client: n,
236
281
  headers: t(r),
237
282
  path: e,
@@ -240,7 +285,7 @@ function E() {
240
285
  return i;
241
286
  },
242
287
  onSuccess: async (e, t) => {
243
- await m({
288
+ await _({
244
289
  client: n,
245
290
  organizationId: r,
246
291
  payableId: t.path.payable_id
@@ -248,11 +293,11 @@ function E() {
248
293
  }
249
294
  });
250
295
  }
251
- function D() {
296
+ function N() {
252
297
  let { client: n, organizationId: r } = e();
253
- return h({
298
+ return y({
254
299
  mutationFn: async ({ path: e, body: i }) => {
255
- let { data: a } = await c({
300
+ let { data: a } = await l({
256
301
  client: n,
257
302
  headers: t(r),
258
303
  path: e,
@@ -262,7 +307,7 @@ function D() {
262
307
  return a;
263
308
  },
264
309
  onSuccess: async (e, t) => {
265
- await m({
310
+ await _({
266
311
  client: n,
267
312
  organizationId: r,
268
313
  payableId: t.path.payable_id
@@ -271,4 +316,4 @@ function D() {
271
316
  });
272
317
  }
273
318
  //#endregion
274
- export { y as useAttachPayableFileMutation, T as useCancelPayableMutation, g as useCreatePayableMutation, b as useDeletePayableFileMutation, C as useForceApprovePayableMutation, w as useForceRejectPayableMutation, D as useMarkPayableAsPaidMutation, E as useReopenPayableMutation, S as useSubmitPayableForApprovalMutation, _ as useUpdatePayableMutation, v as useUploadPayableFromFileMutation, x as useValidatePayableMutation };
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 };
@@ -1,68 +1,105 @@
1
- import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
2
- import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
3
- import { getPaymentRecords as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
1
+ import { cancelAllClients as e, invalidateAllClients as t, removeInactiveFromAllClients as n } from "../../../shared/data-access/dist/lib/clientRegistry.js";
2
+ import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
3
+ import { getPayablesId as i, getPaymentRecords as a } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
4
4
  import "../../../shared/data-access/dist/index.js";
5
- import { approvalRequestsInvalidationKey as r, payableHistoryInvalidationKey as i, payableInvalidationKey as a, payableLineItemsInvalidationKey as o, payablePaymentRecordsInvalidationKey as s, payablesAnalyticsInvalidationKey as c, payablesInvalidationKey as l } from "./index3.js";
5
+ import { approvalRequestsInvalidationKey as o, payableHistoryInvalidationKey as s, payableInvalidationKey as c, payableLineItemsInvalidationKey as l, payablePaymentRecordsInvalidationKey as u, payablesAnalyticsInvalidationKey as d, payablesInvalidationKey as f } from "./index3.js";
6
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js
7
- async function u({ client: t, organizationId: n, payableId: u, includeLineItems: d, includeApprovalRequests: f }) {
7
+ async function p({ client: e, organizationId: n, payableId: r, includeLineItems: i, includeApprovalRequests: a }) {
8
8
  let p = {
9
- client: t,
9
+ client: e,
10
10
  organizationId: n
11
- }, m = u ? {
11
+ }, m = r ? {
12
12
  ...p,
13
- payableId: u
13
+ payableId: r
14
14
  } : void 0, h = [
15
- l(p),
16
- c(p),
17
- ...f ? [r(p)] : [],
15
+ f(p),
16
+ d(p),
17
+ ...a ? [o(p)] : [],
18
18
  ...m ? [
19
- a(m),
20
- i(m),
21
- s(m)
19
+ c(m),
20
+ s(m),
21
+ u(m)
22
22
  ] : [],
23
- ...m && d ? [o(m)] : []
23
+ ...m && i ? [l(m)] : []
24
+ ];
25
+ await Promise.all(h.map((e) => t(e)));
26
+ }
27
+ async function m({ client: r, organizationId: i, payableId: a }) {
28
+ let o = {
29
+ client: r,
30
+ organizationId: i
31
+ };
32
+ if (await Promise.all([t(f(o)), t(d(o))]), !a) return;
33
+ let u = {
34
+ ...o,
35
+ payableId: a
36
+ }, p = [
37
+ c(u),
38
+ s(u),
39
+ l(u)
24
40
  ];
25
- await Promise.all(h.map((t) => e(t)));
41
+ await Promise.all(p.map((t) => e(t))), p.forEach((e) => n(e));
26
42
  }
27
- var d = 500;
28
- async function f({ client: t, organizationId: n, payableId: i }) {
29
- await e(r({
30
- client: t,
43
+ var h = 500;
44
+ async function g({ client: e, organizationId: n, payableId: r }) {
45
+ await t(o({
46
+ client: e,
31
47
  organizationId: n
32
48
  })), await new Promise((e) => {
33
- setTimeout(e, d);
34
- }), await u({
35
- client: t,
49
+ setTimeout(e, h);
50
+ }), await p({
51
+ client: e,
36
52
  organizationId: n,
37
- payableId: i
53
+ payableId: r
38
54
  });
39
55
  }
40
- var p = 2e4, m = 1e3, h = /* @__PURE__ */ new Set(["created", "processing"]);
41
- async function g({ client: e, organizationId: r, payableId: i }) {
42
- let a = Date.now() + p, o = !1;
43
- for (; !o && Date.now() < a;) {
56
+ var _ = 2e4, v = 1e3, y = /* @__PURE__ */ new Set(["created", "processing"]);
57
+ async function b({ client: e, organizationId: t, payableId: n }) {
58
+ let i = Date.now() + _, o = !1;
59
+ for (; !o && Date.now() < i;) {
44
60
  await new Promise((e) => {
45
- setTimeout(e, m);
61
+ setTimeout(e, v);
46
62
  });
47
63
  try {
48
- let { data: a } = await n({
64
+ let { data: i } = await a({
49
65
  client: e,
50
- headers: t(r),
66
+ headers: r(t),
51
67
  query: {
52
68
  limit: 100,
53
- object_id__in: [i],
69
+ object_id__in: [n],
54
70
  order: "desc",
55
71
  sort: "paid_at"
56
72
  }
57
73
  });
58
- o = (a?.data ?? []).some((e) => !!e.status && h.has(e.status));
74
+ o = (i?.data ?? []).some((e) => !!e.status && y.has(e.status));
75
+ } catch {}
76
+ }
77
+ return await p({
78
+ client: e,
79
+ organizationId: t,
80
+ payableId: n
81
+ }), o;
82
+ }
83
+ async function x({ client: e, organizationId: t, payableId: n }) {
84
+ let a = Date.now() + _, o = !1;
85
+ for (; !o && Date.now() < a;) {
86
+ await new Promise((e) => {
87
+ setTimeout(e, v);
88
+ });
89
+ try {
90
+ let { data: a } = await i({
91
+ client: e,
92
+ headers: r(t),
93
+ path: { payable_id: n }
94
+ });
95
+ o = !a?.scheduled_payment_date;
59
96
  } catch {}
60
97
  }
61
- return await u({
98
+ return await p({
62
99
  client: e,
63
- organizationId: r,
64
- payableId: i
100
+ organizationId: t,
101
+ payableId: n
65
102
  }), o;
66
103
  }
67
104
  //#endregion
68
- export { f as invalidateApprovalDecisionQueries, u as invalidatePayableQueries, g as reconcileScheduledPaymentQueries };
105
+ export { g as invalidateApprovalDecisionQueries, m as invalidateDeletedPayableQueries, p as invalidatePayableQueries, x as reconcileCancelledPaymentQueries, b as reconcileScheduledPaymentQueries };
@@ -1,16 +1,15 @@
1
1
  import "./index10.js";
2
2
  import "./index11.js";
3
- import "./index20.js";
4
- import "./index26.js";
5
- import "./index34.js";
6
- import "./index36.js";
7
- import "./index38.js";
3
+ import "./index21.js";
4
+ import "./index27.js";
5
+ import "./index35.js";
6
+ import "./index37.js";
8
7
  import "./index39.js";
9
8
  import "./index40.js";
10
9
  import "./index41.js";
11
10
  import "./index42.js";
12
11
  import "./index43.js";
13
- import "./index47.js";
12
+ import "./index44.js";
14
13
  import "./index48.js";
15
14
  import "./index49.js";
16
15
  import "./index50.js";
@@ -19,10 +18,11 @@ import "./index52.js";
19
18
  import "./index53.js";
20
19
  import "./index54.js";
21
20
  import "./index55.js";
22
- import "./index57.js";
21
+ import "./index56.js";
23
22
  import "./index58.js";
24
23
  import "./index59.js";
25
24
  import "./index60.js";
26
25
  import "./index61.js";
27
- import { BillPayWidget as e } from "./index65.js";
26
+ import "./index62.js";
27
+ import { BillPayWidget as e } from "./index66.js";
28
28
  export { e as BillPayWidget };
@@ -2,51 +2,56 @@ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnySco
2
2
  import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
3
3
  import "../../../shared/data-access/dist/index.js";
4
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js
5
- function n({ status: n, scopes: r, canDecideApprovalRequest: i, hasScheduledPayment: a, isPolicyApprover: o, hasWaitingRequest: s, labels: c }) {
6
- let l = e(r, [t.PayablePayOrg]), u = e(r, [t.BankAccountReadOrg]), d = e(r, [t.PaymentRailAch]), f = e(r, [t.PayableWriteOrg]), p = e(r, [t.PayableApproveOrg]), m = [];
7
- n === "approve_in_progress" && i && (m.push({
5
+ function n({ status: n, scopes: r, canDecideApprovalRequest: i, hasScheduledPayment: a, scheduledPaymentRecordId: o, isPolicyApprover: s, hasWaitingRequest: c, labels: l }) {
6
+ let u = e(r, [t.PayablePayOrg]), d = e(r, [t.BankAccountReadOrg]), f = e(r, [t.PaymentRailAch]), p = e(r, [t.PayableWriteOrg]), m = e(r, [t.PaymentRecordWriteOrg]), h = e(r, [t.PayableApproveOrg]), g = [];
7
+ n === "approve_in_progress" && i && (g.push({
8
8
  id: "approve",
9
- label: c.approve,
9
+ label: l.approve,
10
10
  variant: "default",
11
11
  surface: "row"
12
- }), m.push({
12
+ }), g.push({
13
13
  id: "reject",
14
- label: c.reject,
14
+ label: l.reject,
15
15
  variant: "ghost",
16
16
  surface: "row"
17
- })), n === "approve_in_progress" && s && p && !o && (m.push({
17
+ })), n === "approve_in_progress" && c && h && !s && (g.push({
18
18
  id: "forceApprove",
19
- label: c.forceApprove,
19
+ label: l.forceApprove,
20
20
  variant: "ghost",
21
21
  surface: "menu"
22
- }), m.push({
22
+ }), g.push({
23
23
  id: "forceReject",
24
- label: c.forceReject,
24
+ label: l.forceReject,
25
25
  variant: "ghost",
26
26
  surface: "menu"
27
27
  }));
28
- let h = (n === "waiting_to_be_paid" || n === "partially_paid") && l && !a, g = n === "waiting_to_be_paid" && l && u && d && !a;
29
- return h && m.push({
28
+ let _ = (n === "waiting_to_be_paid" || n === "partially_paid") && u && !a, v = n === "waiting_to_be_paid" && u && d && f && !a;
29
+ return _ && g.push({
30
30
  id: "markAsPaid",
31
- label: c.markAsPaid,
31
+ label: l.markAsPaid,
32
32
  variant: "outline",
33
33
  surface: "row"
34
- }), g && m.push({
34
+ }), v && g.push({
35
35
  id: "payBill",
36
- label: c.payBill,
36
+ label: l.payBill,
37
37
  variant: "default",
38
38
  surface: "row"
39
- }), (n === "new" || n === "waiting_to_be_paid" && !a) && f && m.push({
39
+ }), n === "new" && p && g.push({
40
40
  id: "cancel",
41
- label: c.cancel,
41
+ label: l.cancel,
42
42
  variant: "ghost",
43
43
  surface: "menu"
44
- }), (n === "rejected" || n === "waiting_to_be_paid" && !a) && f && m.push({
44
+ }), (n === "rejected" || n === "waiting_to_be_paid" && !a) && p && g.push({
45
45
  id: "reopen",
46
- label: c.reopen,
46
+ label: l.reopen,
47
47
  variant: "ghost",
48
48
  surface: "menu"
49
- }), m;
49
+ }), n === "waiting_to_be_paid" && a && o && m && g.push({
50
+ id: "cancelScheduledPayment",
51
+ label: l.cancelScheduledPayment,
52
+ variant: "ghost",
53
+ surface: "menu"
54
+ }), g;
50
55
  }
51
56
  //#endregion
52
57
  export { n as getBillDetailActions };