@tesouro/embedded-components-react 0.5.214 → 0.5.216

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 (123) hide show
  1. package/dist/index.d.ts +144 -3
  2. package/dist/index.js +14 -13
  3. package/dist/lib/BankAccountOnboardingWidget.d.ts +56 -2
  4. package/dist/lib/BankAccountOnboardingWidget.js +4 -3
  5. package/dist/lib/MarketingWidget.js +1 -1
  6. package/dist/lib/ReceivablesWidget.d.ts +88 -1
  7. package/dist/lib/ReceivablesWidget.js +1 -1
  8. package/dist/lib/WidgetSuite.d.ts +53 -0
  9. package/dist/libs/shared/util-validation/dist/index5.js +7 -0
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +72 -72
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -1
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +15 -15
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +60 -60
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +12 -12
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +16 -16
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +11 -11
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +8 -8
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +71 -5
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +95 -33
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +6 -17
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +16 -616
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +669 -0
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +15 -13
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +52 -37
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +31 -37
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +33 -89
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -12
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +98 -2
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +14 -4
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -185
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +4 -30
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +183 -21
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +26 -66
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +21 -233
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +66 -27
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +233 -26
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +27 -72
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +26 -85
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +74 -8
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +83 -55
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +6 -7
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +37 -42
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +11 -0
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +64 -0
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +7 -33
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +63 -67
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +160 -1
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +6 -0
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +32 -25
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +25 -200
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +175 -1
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +1 -101
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +92 -71
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +44 -100
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +93 -421
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +442 -112
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +166 -157
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +150 -204
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +202 -31
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +32 -145
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +145 -37
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +44 -58
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +113 -87
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +58 -116
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +83 -357
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +111 -65
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +449 -99
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +68 -281
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +115 -0
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +314 -0
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +34 -23
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +444 -92
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +113 -52
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +18 -14
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -92
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +95 -3
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +3 -24
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +24 -1
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -3
  84. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +1 -1
  85. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +3 -18
  86. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +18 -1
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +0 -3
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +0 -8
  89. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +11 -0
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +1 -264
  91. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +258 -42
  92. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +38 -62
  93. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +61 -463
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +457 -89
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +91 -234
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +89 -82
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +22 -338
  98. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +236 -0
  99. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +26 -204
  100. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +3 -0
  101. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +249 -0
  102. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +93 -0
  103. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +344 -0
  104. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +208 -32
  105. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +29 -202
  106. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +183 -137
  107. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +157 -12
  108. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +10 -19
  109. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +23 -2
  110. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +1 -1
  111. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +16 -19
  112. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +157 -16
  113. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
  114. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js +3 -1
  115. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +167 -156
  116. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -34
  117. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +2 -1
  118. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  119. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/application/bankAccountApplication.js +26 -0
  120. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
  121. package/dist/packages/shared-ui-shadcn/dist/index.js +13 -13
  122. package/package.json +1 -1
  123. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +0 -161
@@ -1,211 +1,36 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { deleteReceivablesId as e, patchReceivablesId as t, postReceivables as n, postReceivablesIdAccept as r, postReceivablesIdCancel as i, postReceivablesIdClone as a, postReceivablesIdDecline as o, postReceivablesIdIssue as s } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
- import { invalidateAllClients as c } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
- import { useEmbedApi as l } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as u } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
1
+ import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
9
2
  import "../../../shared/data-access/dist/index.js";
10
- import { receivableHistoryInvalidationKey as d, receivableInvalidationKey as f, receivablePdfInvalidationKey as p, receivablesAnalyticsInvalidationKey as m, receivablesInvalidationKey as h } from "./index2.js";
11
- import { useMutation as g } from "@tanstack/react-query";
3
+ import { receivableHistoryInvalidationKey as t, receivableInvalidationKey as n, receivablePdfInvalidationKey as r, receivablesAnalyticsInvalidationKey as i, receivablesInvalidationKey as a } from "./index2.js";
12
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
13
- async function _({ client: e, organizationId: t, receivableId: n }) {
14
- let r = [
15
- h({
16
- client: e,
17
- organizationId: t
5
+ async function o({ client: o, organizationId: s, receivableId: c }) {
6
+ let l = [
7
+ a({
8
+ client: o,
9
+ organizationId: s
18
10
  }),
19
- m({
20
- client: e,
21
- organizationId: t
11
+ i({
12
+ client: o,
13
+ organizationId: s
22
14
  }),
23
- ...n ? [
24
- f({
25
- client: e,
26
- organizationId: t,
27
- receivableId: n
15
+ ...c ? [
16
+ n({
17
+ client: o,
18
+ organizationId: s,
19
+ receivableId: c
28
20
  }),
29
- d({
30
- client: e,
31
- organizationId: t,
32
- receivableId: n
21
+ t({
22
+ client: o,
23
+ organizationId: s,
24
+ receivableId: c
33
25
  }),
34
- p({
35
- client: e,
36
- organizationId: t,
37
- receivableId: n
26
+ r({
27
+ client: o,
28
+ organizationId: s,
29
+ receivableId: c
38
30
  })
39
31
  ] : []
40
32
  ];
41
- await Promise.all(r.map((e) => c(e)));
42
- }
43
- function v() {
44
- let { client: e, organizationId: t } = l();
45
- return g({
46
- mutationFn: async ({ body: r }) => {
47
- let { data: i } = await n({
48
- client: e,
49
- headers: u(t),
50
- body: r,
51
- throwOnError: !0
52
- });
53
- return i;
54
- },
55
- onSuccess: async () => {
56
- await _({
57
- client: e,
58
- organizationId: t
59
- });
60
- }
61
- });
62
- }
63
- function y() {
64
- let { client: e, organizationId: n } = l();
65
- return g({
66
- mutationFn: async ({ path: r, body: i }) => {
67
- let { data: a } = await t({
68
- client: e,
69
- headers: u(n),
70
- path: r,
71
- body: i,
72
- throwOnError: !0
73
- });
74
- return a;
75
- },
76
- onSuccess: async (t, r) => {
77
- await _({
78
- client: e,
79
- organizationId: n,
80
- receivableId: r.path.receivable_id
81
- });
82
- }
83
- });
84
- }
85
- function b() {
86
- let { client: t, organizationId: n } = l();
87
- return g({
88
- mutationFn: async ({ path: r }) => {
89
- await e({
90
- client: t,
91
- headers: u(n),
92
- path: r,
93
- throwOnError: !0
94
- });
95
- },
96
- onSuccess: async (e, r) => {
97
- await _({
98
- client: t,
99
- organizationId: n,
100
- receivableId: r.path.receivable_id
101
- });
102
- }
103
- });
104
- }
105
- function x() {
106
- let { client: e, organizationId: t } = l();
107
- return g({
108
- mutationFn: async ({ path: n }) => {
109
- let { data: r } = await s({
110
- client: e,
111
- headers: u(t),
112
- path: n,
113
- throwOnError: !0
114
- });
115
- return r;
116
- },
117
- onSuccess: async (n, r) => {
118
- await _({
119
- client: e,
120
- organizationId: t,
121
- receivableId: r.path.receivable_id
122
- });
123
- }
124
- });
125
- }
126
- function S() {
127
- let { client: e, organizationId: t } = l();
128
- return g({
129
- mutationFn: async ({ path: n }) => {
130
- await i({
131
- client: e,
132
- headers: u(t),
133
- path: n,
134
- throwOnError: !0
135
- });
136
- },
137
- onSuccess: async (n, r) => {
138
- await _({
139
- client: e,
140
- organizationId: t,
141
- receivableId: r.path.receivable_id
142
- });
143
- }
144
- });
145
- }
146
- function C() {
147
- let { client: e, organizationId: t } = l();
148
- return g({
149
- mutationFn: async ({ path: n }) => {
150
- let { data: r } = await a({
151
- client: e,
152
- headers: u(t),
153
- path: n,
154
- throwOnError: !0
155
- });
156
- return r;
157
- },
158
- onSuccess: async () => {
159
- await _({
160
- client: e,
161
- organizationId: t
162
- });
163
- }
164
- });
165
- }
166
- function w() {
167
- let { client: e, organizationId: t } = l();
168
- return g({
169
- mutationFn: async ({ path: n, body: i }) => {
170
- let { data: a } = await r({
171
- client: e,
172
- headers: u(t),
173
- path: n,
174
- body: i,
175
- throwOnError: !0
176
- });
177
- return a;
178
- },
179
- onSuccess: async (n, r) => {
180
- await _({
181
- client: e,
182
- organizationId: t,
183
- receivableId: r.path.receivable_id
184
- });
185
- }
186
- });
187
- }
188
- function T() {
189
- let { client: e, organizationId: t } = l();
190
- return g({
191
- mutationFn: async ({ path: n, body: r }) => {
192
- let { data: i } = await o({
193
- client: e,
194
- headers: u(t),
195
- path: n,
196
- body: r,
197
- throwOnError: !0
198
- });
199
- return i;
200
- },
201
- onSuccess: async (n, r) => {
202
- await _({
203
- client: e,
204
- organizationId: t,
205
- receivableId: r.path.receivable_id
206
- });
207
- }
208
- });
33
+ await Promise.all(l.map((t) => e(t)));
209
34
  }
210
35
  //#endregion
211
- export { w as useAcceptReceivableMutation, S as useCancelReceivableMutation, C as useCloneReceivableMutation, v as useCreateReceivableMutation, T as useDeclineReceivableMutation, b as useDeleteReceivableMutation, x as useIssueReceivableMutation, y as useUpdateReceivableMutation };
36
+ export { o as invalidateReceivable };
@@ -2,5 +2,179 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
+ import { deleteReceivablesId as e, patchReceivablesId as t, postReceivables as n, postReceivablesIdAccept as r, postReceivablesIdCancel as i, postReceivablesIdClone as a, postReceivablesIdDecline as o, postReceivablesIdIssue as s } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
+ import { useEmbedApi as c } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
+ import { organizationHeaders as l } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
5
8
  import "../../../shared/data-access/dist/index.js";
6
- import "@tanstack/react-query";
9
+ import { invalidateReceivable as u } from "./index6.js";
10
+ import { useMutation as d } from "@tanstack/react-query";
11
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
12
+ function f() {
13
+ let { client: e, organizationId: t } = c();
14
+ return d({
15
+ mutationFn: async ({ body: r }) => {
16
+ let { data: i } = await n({
17
+ client: e,
18
+ headers: l(t),
19
+ body: r,
20
+ throwOnError: !0
21
+ });
22
+ return i;
23
+ },
24
+ onSuccess: async () => {
25
+ await u({
26
+ client: e,
27
+ organizationId: t
28
+ });
29
+ }
30
+ });
31
+ }
32
+ function p() {
33
+ let { client: e, organizationId: n } = c();
34
+ return d({
35
+ mutationFn: async ({ path: r, body: i }) => {
36
+ let { data: a } = await t({
37
+ client: e,
38
+ headers: l(n),
39
+ path: r,
40
+ body: i,
41
+ throwOnError: !0
42
+ });
43
+ return a;
44
+ },
45
+ onSuccess: async (t, r) => {
46
+ await u({
47
+ client: e,
48
+ organizationId: n,
49
+ receivableId: r.path.receivable_id
50
+ });
51
+ }
52
+ });
53
+ }
54
+ function m() {
55
+ let { client: t, organizationId: n } = c();
56
+ return d({
57
+ mutationFn: async ({ path: r }) => {
58
+ await e({
59
+ client: t,
60
+ headers: l(n),
61
+ path: r,
62
+ throwOnError: !0
63
+ });
64
+ },
65
+ onSuccess: async (e, r) => {
66
+ await u({
67
+ client: t,
68
+ organizationId: n,
69
+ receivableId: r.path.receivable_id
70
+ });
71
+ }
72
+ });
73
+ }
74
+ function h() {
75
+ let { client: e, organizationId: t } = c();
76
+ return d({
77
+ mutationFn: async ({ path: n }) => {
78
+ let { data: r } = await s({
79
+ client: e,
80
+ headers: l(t),
81
+ path: n,
82
+ throwOnError: !0
83
+ });
84
+ return r;
85
+ },
86
+ onSuccess: async (n, r) => {
87
+ await u({
88
+ client: e,
89
+ organizationId: t,
90
+ receivableId: r.path.receivable_id
91
+ });
92
+ }
93
+ });
94
+ }
95
+ function g() {
96
+ let { client: e, organizationId: t } = c();
97
+ return d({
98
+ mutationFn: async ({ path: n }) => {
99
+ await i({
100
+ client: e,
101
+ headers: l(t),
102
+ path: n,
103
+ throwOnError: !0
104
+ });
105
+ },
106
+ onSuccess: async (n, r) => {
107
+ await u({
108
+ client: e,
109
+ organizationId: t,
110
+ receivableId: r.path.receivable_id
111
+ });
112
+ }
113
+ });
114
+ }
115
+ function _() {
116
+ let { client: e, organizationId: t } = c();
117
+ return d({
118
+ mutationFn: async ({ path: n }) => {
119
+ let { data: r } = await a({
120
+ client: e,
121
+ headers: l(t),
122
+ path: n,
123
+ throwOnError: !0
124
+ });
125
+ return r;
126
+ },
127
+ onSuccess: async () => {
128
+ await u({
129
+ client: e,
130
+ organizationId: t
131
+ });
132
+ }
133
+ });
134
+ }
135
+ function v() {
136
+ let { client: e, organizationId: t } = c();
137
+ return d({
138
+ mutationFn: async ({ path: n, body: i }) => {
139
+ let { data: a } = await r({
140
+ client: e,
141
+ headers: l(t),
142
+ path: n,
143
+ body: i,
144
+ throwOnError: !0
145
+ });
146
+ return a;
147
+ },
148
+ onSuccess: async (n, r) => {
149
+ await u({
150
+ client: e,
151
+ organizationId: t,
152
+ receivableId: r.path.receivable_id
153
+ });
154
+ }
155
+ });
156
+ }
157
+ function y() {
158
+ let { client: e, organizationId: t } = c();
159
+ return d({
160
+ mutationFn: async ({ path: n, body: r }) => {
161
+ let { data: i } = await o({
162
+ client: e,
163
+ headers: l(t),
164
+ path: n,
165
+ body: r,
166
+ throwOnError: !0
167
+ });
168
+ return i;
169
+ },
170
+ onSuccess: async (n, r) => {
171
+ await u({
172
+ client: e,
173
+ organizationId: t,
174
+ receivableId: r.path.receivable_id
175
+ });
176
+ }
177
+ });
178
+ }
179
+ //#endregion
180
+ export { v as useAcceptReceivableMutation, g as useCancelReceivableMutation, _ as useCloneReceivableMutation, f as useCreateReceivableMutation, y as useDeclineReceivableMutation, m as useDeleteReceivableMutation, h as useIssueReceivableMutation, p as useUpdateReceivableMutation };
@@ -2,105 +2,5 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { postReceivablesIdMarkAsPaid as e, postReceivablesIdMarkAsPartiallyPaid as t, postReceivablesIdMarkAsUncollectible as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
- import { invalidateAllClients as r } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
- import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
9
5
  import "../../../shared/data-access/dist/index.js";
10
- import { paymentRecordsInvalidationKey as o, receivableHistoryInvalidationKey as s, receivableInvalidationKey as c, receivablesAnalyticsInvalidationKey as l, receivablesInvalidationKey as u } from "./index2.js";
11
- import { useMutation as d } from "@tanstack/react-query";
12
- //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js
13
- async function f({ client: e, organizationId: t, receivableId: n }) {
14
- await Promise.all([
15
- r(u({
16
- client: e,
17
- organizationId: t
18
- })),
19
- r(c({
20
- client: e,
21
- organizationId: t,
22
- receivableId: n
23
- })),
24
- r(s({
25
- client: e,
26
- organizationId: t,
27
- receivableId: n
28
- })),
29
- r(l({
30
- client: e,
31
- organizationId: t
32
- })),
33
- r(o({
34
- client: e,
35
- organizationId: t
36
- }))
37
- ]);
38
- }
39
- function p() {
40
- let { client: t, organizationId: n } = i();
41
- return d({
42
- mutationFn: async ({ path: r, body: i }) => {
43
- let { data: o } = await e({
44
- client: t,
45
- headers: a(n),
46
- path: r,
47
- body: i,
48
- throwOnError: !0
49
- });
50
- return o;
51
- },
52
- onSuccess: async (e, r) => {
53
- await f({
54
- client: t,
55
- organizationId: n,
56
- receivableId: r.path.receivable_id
57
- });
58
- }
59
- });
60
- }
61
- function m() {
62
- let { client: e, organizationId: n } = i();
63
- return d({
64
- mutationFn: async ({ path: r, body: i }) => {
65
- let { data: o } = await t({
66
- client: e,
67
- headers: a(n),
68
- path: r,
69
- body: i,
70
- throwOnError: !0
71
- });
72
- return o;
73
- },
74
- onSuccess: async (t, r) => {
75
- await f({
76
- client: e,
77
- organizationId: n,
78
- receivableId: r.path.receivable_id
79
- });
80
- }
81
- });
82
- }
83
- function h() {
84
- let { client: e, organizationId: t } = i();
85
- return d({
86
- mutationFn: async ({ path: r, body: i }) => {
87
- let { data: o } = await n({
88
- client: e,
89
- headers: a(t),
90
- path: r,
91
- body: i,
92
- throwOnError: !0
93
- });
94
- return o;
95
- },
96
- onSuccess: async (n, r) => {
97
- await f({
98
- client: e,
99
- organizationId: t,
100
- receivableId: r.path.receivable_id
101
- });
102
- }
103
- });
104
- }
105
- //#endregion
106
- export { p as useMarkReceivablePaidMutation, m as useMarkReceivablePartiallyPaidMutation, h as useMarkReceivableUncollectibleMutation };
6
+ import "@tanstack/react-query";
@@ -2,84 +2,105 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { getReceivablesIdHistoryOptions as e, getReceivablesIdMailsOptions as t, getReceivablesIdOptions as n, getReceivablesIdPdfLinkOptions as r, getReceivablesOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
6
- import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
7
- import { useEmbedApi as o } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as s } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
5
+ import { postReceivablesIdMarkAsPaid as e, postReceivablesIdMarkAsPartiallyPaid as t, postReceivablesIdMarkAsUncollectible as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
+ import { invalidateAllClients as r } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
+ import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
+ import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
9
9
  import "../../../shared/data-access/dist/index.js";
10
- import { useQuery as c } from "@tanstack/react-query";
10
+ import { paymentRecordsInvalidationKey as o, receivableHistoryInvalidationKey as s, receivableInvalidationKey as c, receivablesAnalyticsInvalidationKey as l, receivablesInvalidationKey as u } from "./index2.js";
11
+ import { useMutation as d } from "@tanstack/react-query";
11
12
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js
12
- function l({ enabled: e, ...t } = {}) {
13
- let { client: n, organizationId: r, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(r && l) && (e === !0 || e === void 0), p = i({
14
- client: n,
15
- headers: s(r),
16
- query: t
17
- });
18
- return c({
19
- ...a(p, {
20
- authEpoch: u,
21
- organizationPending: d
22
- }, { carryWithinOrg: !0 }),
23
- enabled: f
24
- });
25
- }
26
- function u(e, { enabled: t = !0 } = {}) {
27
- let { client: r, organizationId: i, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(i && l && e) && t, p = n({
28
- client: r,
29
- headers: s(i),
30
- path: { receivable_id: e ?? "" }
31
- });
32
- return c({
33
- ...a(p, {
34
- authEpoch: u,
35
- organizationPending: d
36
- }),
37
- enabled: f
38
- });
13
+ async function f({ client: e, organizationId: t, receivableId: n }) {
14
+ await Promise.all([
15
+ r(u({
16
+ client: e,
17
+ organizationId: t
18
+ })),
19
+ r(c({
20
+ client: e,
21
+ organizationId: t,
22
+ receivableId: n
23
+ })),
24
+ r(s({
25
+ client: e,
26
+ organizationId: t,
27
+ receivableId: n
28
+ })),
29
+ r(l({
30
+ client: e,
31
+ organizationId: t
32
+ })),
33
+ r(o({
34
+ client: e,
35
+ organizationId: t
36
+ }))
37
+ ]);
39
38
  }
40
- function d(t, { enabled: n, ...r } = {}) {
41
- let { client: i, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = o(), p = !!(l && u && t) && (n === !0 || n === void 0), m = e({
42
- client: i,
43
- headers: s(l),
44
- path: { receivable_id: t ?? "" },
45
- query: r
46
- });
47
- return c({
48
- ...a(m, {
49
- authEpoch: d,
50
- organizationPending: f
51
- }),
52
- enabled: p
39
+ function p() {
40
+ let { client: t, organizationId: n } = i();
41
+ return d({
42
+ mutationFn: async ({ path: r, body: i }) => {
43
+ let { data: o } = await e({
44
+ client: t,
45
+ headers: a(n),
46
+ path: r,
47
+ body: i,
48
+ throwOnError: !0
49
+ });
50
+ return o;
51
+ },
52
+ onSuccess: async (e, r) => {
53
+ await f({
54
+ client: t,
55
+ organizationId: n,
56
+ receivableId: r.path.receivable_id
57
+ });
58
+ }
53
59
  });
54
60
  }
55
- function f(e, { enabled: n, ...r } = {}) {
56
- let { client: i, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = o(), p = !!(l && u && e) && (n === !0 || n === void 0), m = t({
57
- client: i,
58
- headers: s(l),
59
- path: { receivable_id: e ?? "" },
60
- query: r
61
- });
62
- return c({
63
- ...a(m, {
64
- authEpoch: d,
65
- organizationPending: f
66
- }),
67
- enabled: p
61
+ function m() {
62
+ let { client: e, organizationId: n } = i();
63
+ return d({
64
+ mutationFn: async ({ path: r, body: i }) => {
65
+ let { data: o } = await t({
66
+ client: e,
67
+ headers: a(n),
68
+ path: r,
69
+ body: i,
70
+ throwOnError: !0
71
+ });
72
+ return o;
73
+ },
74
+ onSuccess: async (t, r) => {
75
+ await f({
76
+ client: e,
77
+ organizationId: n,
78
+ receivableId: r.path.receivable_id
79
+ });
80
+ }
68
81
  });
69
82
  }
70
- function p(e, { enabled: t = !0 } = {}) {
71
- let { client: n, organizationId: i, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(i && l && e) && t, p = r({
72
- client: n,
73
- headers: s(i),
74
- path: { receivable_id: e ?? "" }
75
- });
76
- return c({
77
- ...a(p, {
78
- authEpoch: u,
79
- organizationPending: d
80
- }),
81
- enabled: f
83
+ function h() {
84
+ let { client: e, organizationId: t } = i();
85
+ return d({
86
+ mutationFn: async ({ path: r, body: i }) => {
87
+ let { data: o } = await n({
88
+ client: e,
89
+ headers: a(t),
90
+ path: r,
91
+ body: i,
92
+ throwOnError: !0
93
+ });
94
+ return o;
95
+ },
96
+ onSuccess: async (n, r) => {
97
+ await f({
98
+ client: e,
99
+ organizationId: t,
100
+ receivableId: r.path.receivable_id
101
+ });
102
+ }
82
103
  });
83
104
  }
84
105
  //#endregion
85
- export { d as useReceivableHistoryQuery, f as useReceivableMailsQuery, p as useReceivablePdfLinkQuery, u as useReceivableQuery, l as useReceivablesQuery };
106
+ export { p as useMarkReceivablePaidMutation, m as useMarkReceivablePartiallyPaidMutation, h as useMarkReceivableUncollectibleMutation };