@tesouro/embedded-components-react 0.3.48 → 0.3.50

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 (134) hide show
  1. package/dist/index.css +8 -2
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -10
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +39 -30
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +26 -311
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +325 -12
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -26
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +20 -40
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +75 -24
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +36 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +80 -68
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +86 -73
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +77 -14
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +18 -63
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +50 -29
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +22 -18
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +82 -30
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -42
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +15 -159
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +23 -33
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +66 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +2 -50
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +3 -4
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +5 -14
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -14
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +31 -63
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +23 -18
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +37 -24
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +161 -61
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +29 -130
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +1 -25
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +47 -4
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +4 -41
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +12 -55
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -4
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -72
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +26 -49
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +23 -23
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +62 -93
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +133 -34
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +20 -163
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +4 -77
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +39 -21
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +5 -210
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +70 -211
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +47 -103
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +92 -12
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +34 -47
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +59 -62
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +163 -29
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +67 -181
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +20 -32
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +203 -94
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +214 -15
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +98 -312
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +16 -4
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +49 -31
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +29 -80
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +183 -156
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +9 -2
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +38 -3
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +102 -2
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -44
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +343 -1
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -8
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -8
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +79 -88
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +179 -3
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +3 -9
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +2 -20
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +4 -2
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +38 -51
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -2
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -126
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +9 -9
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +92 -44
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -23
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +123 -26
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +7 -82
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -48
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +45 -250
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +69 -5
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +21 -113
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +27 -208
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +86 -4
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +47 -5
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +244 -106
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +115 -1
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +201 -16
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -0
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +8 -0
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -0
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +44 -5
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -0
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +25 -0
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +94 -3
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -19
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +1 -0
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +28 -28
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -3
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -16
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +119 -16
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +24 -111
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +89 -2
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -7
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +5 -28
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +30 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -7
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +5 -32
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +34 -2
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -12
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -104
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +105 -1
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -17
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +15 -123
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +125 -2
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -18
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -6
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +7 -167
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +170 -2
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -14
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +11 -105
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +108 -2
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -10
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +8 -45
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +47 -2
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -0
  129. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +144 -130
  130. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
  131. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +87 -71
  132. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  133. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  134. package/package.json +1 -1
@@ -1,17 +1,330 @@
1
- import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
2
- import { getPayablesIdOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { deletePayablesId as n, deletePayablesIdFile as r, patchPayablesId as i, postPayables as a, postPayablesIdApprovePaymentOperation as o, postPayablesIdAttachFile as s, postPayablesIdCancel as c, postPayablesIdMarkAsPaid as l, postPayablesIdReject as u, postPayablesIdReopen as d, postPayablesIdSubmitForApproval as f, postPayablesIdValidate as p, postPayablesUploadFromFile as m, postPaymentIntentsIdCancel as h } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
3
8
  import "../../../shared/data-access/dist/index.js";
9
+ import { beginApprovalRequestWatch as g, invalidateDeletedPayableQueries as _, invalidatePayableQueries as v, reconcileCancelledPaymentQueries as y, reconcileSubmittedForApprovalQueries as b } from "./index5.js";
10
+ import { useMutation as x } from "@tanstack/react-query";
4
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js
5
- var n = 2500;
6
- function r({ client: n, organizationId: r, payableId: i }) {
7
- return {
8
- ...t({
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 },
115
+ throwOnError: !0
116
+ });
117
+ return a;
118
+ },
119
+ 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({
9
167
  client: n,
10
- headers: e(r),
11
- path: { payable_id: i }
12
- }),
13
- refetchInterval: (e) => e.state.data?.ocr_status === "processing" && 2500
14
- };
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,
281
+ payableId: t.payableId
282
+ }).catch(() => {});
283
+ }
284
+ });
285
+ }
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
+ });
15
328
  }
16
329
  //#endregion
17
- export { n as OCR_POLL_INTERVAL_MS, r as payableOcrQueryOptions };
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 };
@@ -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 "./index12.js";
9
- import { useQueries as r } from "@tanstack/react-query";
10
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.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 };
@@ -3,48 +3,28 @@
3
3
  "use client";
4
4
  "use client";
5
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 { getPayablesAnalyticsOptions as n, getPayablesIdOptions as r, getPayablesOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
- import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
6
+ import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
9
7
  import "../../../shared/data-access/dist/index.js";
10
- import { payableOcrQueryOptions as o } from "./index12.js";
11
- import { useQuery as s } from "@tanstack/react-query";
8
+ import { payableOcrQueryOptions as n } from "./index13.js";
9
+ import { useQueries as r } from "@tanstack/react-query";
12
10
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js
13
- function c({ enabled: n, ...r } = {}) {
14
- let { client: o, organizationId: c, widgetToken: l, authEpoch: u } = e(), d = !!(c && l) && (n === !0 || n === void 0), f = i({
15
- client: o,
16
- headers: t(c),
17
- query: r
18
- });
19
- return s({
20
- ...a(f, u),
21
- enabled: d
22
- });
23
- }
24
- function l({ enabled: r } = {}) {
25
- let { client: i, organizationId: o, widgetToken: c, authEpoch: l } = e(), u = !!(o && c) && (r === !0 || r === void 0), d = n({
26
- client: i,
27
- headers: t(o)
28
- });
29
- return s({
30
- ...a(d, l),
31
- enabled: u
32
- });
33
- }
34
- function u(n, { enabled: i = !0, pollWhileOcrProcessing: c = !1 } = {}) {
35
- let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = !!(u && d && n) && i, m = c ? o({
36
- client: l,
37
- organizationId: u,
38
- payableId: n ?? ""
39
- }) : r({
40
- client: l,
41
- headers: t(u),
42
- path: { payable_id: n ?? "" }
43
- });
44
- return s({
45
- ...a(m, f),
46
- enabled: p
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
+ }))
47
27
  });
48
28
  }
49
29
  //#endregion
50
- export { u as usePayableQuery, c as usePayablesQuery, l as usePayablesTotalCountQuery };
30
+ export { i as usePayableOcrQueries };
@@ -4,33 +4,84 @@
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 { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
- import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
9
- import { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
7
+ import { getPayables as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
+ import { getPayablesAnalyticsOptions as r, getPayablesIdOptions as i, getPayablesOptions as a, getPayablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
+ import { withAuthEpoch as s } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
- import { useQuery as a } from "@tanstack/react-query";
11
+ import { payableOcrQueryOptions as c } from "./index13.js";
12
+ import { queryOptions as l, useQuery as u } from "@tanstack/react-query";
12
13
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js
13
- function o(o, { enabled: s = !0 } = {}) {
14
- let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
15
- client: c,
14
+ function d({ enabled: n, ...r } = {}) {
15
+ let { client: i, organizationId: o, widgetToken: c, authEpoch: l } = e(), d = !!(o && c) && (n === !0 || n === void 0), f = a({
16
+ client: i,
17
+ headers: t(o),
18
+ query: r
19
+ });
20
+ return u({
21
+ ...s(f, l),
22
+ enabled: d
23
+ });
24
+ }
25
+ var f = 100;
26
+ function p({ enabled: r } = {}) {
27
+ let { client: i, organizationId: a, widgetToken: c, authEpoch: d } = e(), p = t(a), m = {
28
+ duplicate_match_status: "suspected",
29
+ limit: f
30
+ }, h = l({
31
+ queryKey: [...o({
32
+ client: i,
33
+ headers: p,
34
+ query: m
35
+ }), "all"],
36
+ queryFn: async ({ signal: e }) => {
37
+ let t = [], r = /* @__PURE__ */ new Set(), a;
38
+ do {
39
+ let { data: o } = await n({
40
+ client: i,
41
+ headers: p,
42
+ query: {
43
+ ...m,
44
+ pagination_token: a
45
+ },
46
+ signal: e,
47
+ throwOnError: !0
48
+ });
49
+ t.push(...o.data ?? []);
50
+ let s = o.next_pagination_token ?? void 0;
51
+ a = s && !r.has(s) ? (r.add(s), s) : void 0;
52
+ } while (a);
53
+ return { data: t };
54
+ }
55
+ });
56
+ return u({
57
+ ...s(h, d),
58
+ enabled: !!(a && c) && r !== !1
59
+ });
60
+ }
61
+ function m({ enabled: n } = {}) {
62
+ let { client: i, organizationId: a, widgetToken: o, authEpoch: c } = e(), l = !!(a && o) && (n === !0 || n === void 0), d = r({
63
+ client: i,
64
+ headers: t(a)
65
+ });
66
+ return u({
67
+ ...s(d, c),
68
+ enabled: l
69
+ });
70
+ }
71
+ function h(n, { enabled: r = !0, pollWhileOcrProcessing: a = !1 } = {}) {
72
+ let { client: o, organizationId: l, widgetToken: d, authEpoch: f } = e(), p = !!(l && d && n) && r, m = a ? c({
73
+ client: o,
74
+ organizationId: l,
75
+ payableId: n ?? ""
76
+ }) : i({
77
+ client: o,
16
78
  headers: t(l),
17
- path: { payable_id: o ?? "" }
18
- }), { queryKey: m, queryFn: h } = r(p, d);
19
- return a({
20
- queryKey: m,
21
- enabled: f,
22
- retry: !1,
23
- queryFn: async (e) => {
24
- try {
25
- if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
26
- return await h(e);
27
- } catch (e) {
28
- if (i(e)) return null;
29
- throw e;
30
- }
31
- },
32
- select: (e) => e ?? void 0
79
+ path: { payable_id: n ?? "" }
80
+ });
81
+ return u({
82
+ ...s(m, f),
83
+ enabled: p
33
84
  });
34
85
  }
35
86
  //#endregion
36
- export { o as usePayableSuggestionsQuery };
87
+ export { p as useAllSuspectedDuplicatePayablesQuery, h as usePayableQuery, d as usePayablesQuery, m as usePayablesTotalCountQuery };
@@ -0,0 +1,36 @@
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 { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
+ import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
9
+ import { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
10
+ import "../../../shared/data-access/dist/index.js";
11
+ import { useQuery as a } from "@tanstack/react-query";
12
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js
13
+ function o(o, { enabled: s = !0 } = {}) {
14
+ let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
15
+ client: c,
16
+ headers: t(l),
17
+ path: { payable_id: o ?? "" }
18
+ }), { queryKey: m, queryFn: h } = r(p, d);
19
+ return a({
20
+ queryKey: m,
21
+ enabled: f,
22
+ retry: !1,
23
+ queryFn: async (e) => {
24
+ try {
25
+ if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
26
+ return await h(e);
27
+ } catch (e) {
28
+ if (i(e)) return null;
29
+ throw e;
30
+ }
31
+ },
32
+ select: (e) => e ?? void 0
33
+ });
34
+ }
35
+ //#endregion
36
+ export { o as usePayableSuggestionsQuery };