@tesouro/embedded-components-react 0.11.277 → 0.11.278
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.
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +8 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +169 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +46 -176
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +94 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +5 -103
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +91 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +189 -70
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +19 -202
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +64 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +28 -66
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +34 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useRecurringSeriesTable.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index17.js +0 -28
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js
CHANGED
|
@@ -5,13 +5,12 @@ import { useAllCustomersQuery as t } from "./index3.js";
|
|
|
5
5
|
import { useAllReceivableHistoryQuery as n } from "./index4.js";
|
|
6
6
|
import { useEntityPaymentMethodsQuery as r, useEntitySettingsQuery as i } from "./index5.js";
|
|
7
7
|
import { useCreateEntityBankAccountMutation as a, usePaymentAccountQuery as o, usePaymentAccountsQuery as s } from "./index6.js";
|
|
8
|
-
import "./index7.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useReceivablesAnalyticsQuery as z } from "./index17.js";
|
|
8
|
+
import { useDeleteReceivableAttachmentMutation as c, useUploadReceivableAttachmentMutation as l } from "./index7.js";
|
|
9
|
+
import { useSendReceivableEmailMutation as u } from "./index9.js";
|
|
10
|
+
import { useAcceptReceivableMutation as d, useCancelReceivableMutation as f, useCloneReceivableMutation as p, useCreateReceivableMutation as m, useDeclineReceivableMutation as h, useDeleteReceivableMutation as g, useIssueReceivableMutation as _, useUpdateReceivableMutation as v } from "./index10.js";
|
|
11
|
+
import { useReceivablePaymentRecordsQuery as y } from "./index11.js";
|
|
12
|
+
import { useCreateReceivablePaymentRecordMutation as b, useMarkReceivablePaidMutation as x, useMarkReceivableUncollectibleMutation as S } from "./index12.js";
|
|
13
|
+
import { useReceivablePdfLinkQuery as C, useReceivableQuery as w, useReceivableRequiredFieldsQuery as T, useReceivablesByIdQueries as E, useReceivablesQuery as D } from "./index14.js";
|
|
14
|
+
import { useCancelRecurrenceMutation as O, useCreateOverdueReminderMutation as k, useCreatePaymentReminderMutation as A, useCreateRecurrenceMutation as j, useOverdueRemindersQuery as M, usePauseRecurrenceMutation as N, usePaymentRemindersQuery as P, useRecurrenceQuery as F, useRecurrencesQuery as I, useResumeRecurrenceMutation as L, useUpdateRecurrenceMutation as R } from "./index15.js";
|
|
15
|
+
import { useReceivablesAnalyticsQuery as z } from "./index16.js";
|
|
17
16
|
export { d as useAcceptReceivableMutation, t as useAllCustomersQuery, n as useAllReceivableHistoryQuery, f as useCancelReceivableMutation, O as useCancelRecurrenceMutation, p as useCloneReceivableMutation, a as useCreateEntityBankAccountMutation, k as useCreateOverdueReminderMutation, A as useCreatePaymentReminderMutation, m as useCreateReceivableMutation, b as useCreateReceivablePaymentRecordMutation, j as useCreateRecurrenceMutation, h as useDeclineReceivableMutation, c as useDeleteReceivableAttachmentMutation, g as useDeleteReceivableMutation, r as useEntityPaymentMethodsQuery, i as useEntitySettingsQuery, _ as useIssueReceivableMutation, x as useMarkReceivablePaidMutation, S as useMarkReceivableUncollectibleMutation, M as useOverdueRemindersQuery, N as usePauseRecurrenceMutation, o as usePaymentAccountQuery, s as usePaymentAccountsQuery, P as usePaymentRemindersQuery, e as usePaymentTermsQuery, y as useReceivablePaymentRecordsQuery, C as useReceivablePdfLinkQuery, w as useReceivableQuery, T as useReceivableRequiredFieldsQuery, z as useReceivablesAnalyticsQuery, E as useReceivablesByIdQueries, D as useReceivablesQuery, F as useRecurrenceQuery, I as useRecurrencesQuery, L as useResumeRecurrenceMutation, u as useSendReceivableEmailMutation, v as useUpdateReceivableMutation, R as useUpdateRecurrenceMutation, l as useUploadReceivableAttachmentMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js
CHANGED
|
@@ -2,36 +2,181 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
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";
|
|
9
8
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { useMutation as o } from "@tanstack/react-query";
|
|
9
|
+
import { invalidateReceivable as u } from "./index8.js";
|
|
10
|
+
import { useMutation as d } from "@tanstack/react-query";
|
|
13
11
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js
|
|
14
|
-
function
|
|
15
|
-
let { client:
|
|
16
|
-
return
|
|
17
|
-
mutationFn: async ({
|
|
18
|
-
let { data: i } = await
|
|
19
|
-
client:
|
|
20
|
-
headers:
|
|
21
|
-
|
|
22
|
-
body: n,
|
|
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,
|
|
23
20
|
throwOnError: !0
|
|
24
21
|
});
|
|
25
22
|
return i;
|
|
26
23
|
},
|
|
27
|
-
onSuccess: async (
|
|
28
|
-
|
|
29
|
-
client:
|
|
30
|
-
organizationId:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
+
resetPdf: !0
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function m() {
|
|
56
|
+
let { client: t, organizationId: n } = c();
|
|
57
|
+
return d({
|
|
58
|
+
mutationFn: async ({ path: r }) => {
|
|
59
|
+
await e({
|
|
60
|
+
client: t,
|
|
61
|
+
headers: l(n),
|
|
62
|
+
path: r,
|
|
63
|
+
throwOnError: !0
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
onSuccess: async (e, r) => {
|
|
67
|
+
await u({
|
|
68
|
+
client: t,
|
|
69
|
+
organizationId: n,
|
|
70
|
+
receivableId: r.path.receivable_id
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function h() {
|
|
76
|
+
let { client: e, organizationId: t } = c();
|
|
77
|
+
return d({
|
|
78
|
+
mutationFn: async ({ path: n }) => {
|
|
79
|
+
let { data: r } = await s({
|
|
80
|
+
client: e,
|
|
81
|
+
headers: l(t),
|
|
82
|
+
path: n,
|
|
83
|
+
throwOnError: !0
|
|
84
|
+
});
|
|
85
|
+
return r;
|
|
86
|
+
},
|
|
87
|
+
onSuccess: async (n, r) => {
|
|
88
|
+
await u({
|
|
89
|
+
client: e,
|
|
90
|
+
organizationId: t,
|
|
91
|
+
receivableId: r.path.receivable_id,
|
|
92
|
+
resetPdf: !0
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function g() {
|
|
98
|
+
let { client: e, organizationId: t } = c();
|
|
99
|
+
return d({
|
|
100
|
+
mutationFn: async ({ path: n }) => {
|
|
101
|
+
await i({
|
|
102
|
+
client: e,
|
|
103
|
+
headers: l(t),
|
|
104
|
+
path: n,
|
|
105
|
+
throwOnError: !0
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
onSuccess: async (n, r) => {
|
|
109
|
+
await u({
|
|
110
|
+
client: e,
|
|
111
|
+
organizationId: t,
|
|
112
|
+
receivableId: r.path.receivable_id
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function _() {
|
|
118
|
+
let { client: e, organizationId: t } = c();
|
|
119
|
+
return d({
|
|
120
|
+
mutationFn: async ({ path: n }) => {
|
|
121
|
+
let { data: r } = await a({
|
|
122
|
+
client: e,
|
|
123
|
+
headers: l(t),
|
|
124
|
+
path: n,
|
|
125
|
+
throwOnError: !0
|
|
126
|
+
});
|
|
127
|
+
return r;
|
|
128
|
+
},
|
|
129
|
+
onSuccess: async (n, r) => {
|
|
130
|
+
await u({
|
|
131
|
+
client: e,
|
|
132
|
+
organizationId: t,
|
|
133
|
+
receivableId: r.path.receivable_id
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function v() {
|
|
139
|
+
let { client: e, organizationId: t } = c();
|
|
140
|
+
return d({
|
|
141
|
+
mutationFn: async ({ path: n, body: i }) => {
|
|
142
|
+
let { data: a } = await r({
|
|
143
|
+
client: e,
|
|
144
|
+
headers: l(t),
|
|
145
|
+
path: n,
|
|
146
|
+
body: i,
|
|
147
|
+
throwOnError: !0
|
|
148
|
+
});
|
|
149
|
+
return a;
|
|
150
|
+
},
|
|
151
|
+
onSuccess: async (n, r) => {
|
|
152
|
+
await u({
|
|
153
|
+
client: e,
|
|
154
|
+
organizationId: t,
|
|
155
|
+
receivableId: r.path.receivable_id
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function y() {
|
|
161
|
+
let { client: e, organizationId: t } = c();
|
|
162
|
+
return d({
|
|
163
|
+
mutationFn: async ({ path: n, body: r }) => {
|
|
164
|
+
let { data: i } = await o({
|
|
165
|
+
client: e,
|
|
166
|
+
headers: l(t),
|
|
167
|
+
path: n,
|
|
168
|
+
body: r,
|
|
169
|
+
throwOnError: !0
|
|
170
|
+
});
|
|
171
|
+
return i;
|
|
172
|
+
},
|
|
173
|
+
onSuccess: async (n, r) => {
|
|
174
|
+
await u({
|
|
175
|
+
client: e,
|
|
176
|
+
organizationId: t,
|
|
177
|
+
receivableId: r.path.receivable_id
|
|
178
|
+
});
|
|
34
179
|
}
|
|
35
180
|
});
|
|
36
181
|
}
|
|
37
|
-
export {
|
|
182
|
+
export { v as useAcceptReceivableMutation, g as useCancelReceivableMutation, _ as useCloneReceivableMutation, f as useCreateReceivableMutation, y as useDeclineReceivableMutation, m as useDeleteReceivableMutation, h as useIssueReceivableMutation, p as useUpdateReceivableMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
CHANGED
|
@@ -2,181 +2,51 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { getPaymentRecords as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getPaymentRecordsQueryKey as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
10
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { useMutation as d } from "@tanstack/react-query";
|
|
11
|
+
import { queryOptions as a, useQuery as o } from "@tanstack/react-query";
|
|
11
12
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function m() {
|
|
56
|
-
let { client: t, organizationId: n } = c();
|
|
57
|
-
return d({
|
|
58
|
-
mutationFn: async ({ path: r }) => {
|
|
59
|
-
await e({
|
|
60
|
-
client: t,
|
|
61
|
-
headers: l(n),
|
|
62
|
-
path: r,
|
|
63
|
-
throwOnError: !0
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
onSuccess: async (e, r) => {
|
|
67
|
-
await u({
|
|
68
|
-
client: t,
|
|
69
|
-
organizationId: n,
|
|
70
|
-
receivableId: r.path.receivable_id
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function h() {
|
|
76
|
-
let { client: e, organizationId: t } = c();
|
|
77
|
-
return d({
|
|
78
|
-
mutationFn: async ({ path: n }) => {
|
|
79
|
-
let { data: r } = await s({
|
|
80
|
-
client: e,
|
|
81
|
-
headers: l(t),
|
|
82
|
-
path: n,
|
|
83
|
-
throwOnError: !0
|
|
84
|
-
});
|
|
85
|
-
return r;
|
|
86
|
-
},
|
|
87
|
-
onSuccess: async (n, r) => {
|
|
88
|
-
await u({
|
|
89
|
-
client: e,
|
|
90
|
-
organizationId: t,
|
|
91
|
-
receivableId: r.path.receivable_id,
|
|
92
|
-
resetPdf: !0
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
function g() {
|
|
98
|
-
let { client: e, organizationId: t } = c();
|
|
99
|
-
return d({
|
|
100
|
-
mutationFn: async ({ path: n }) => {
|
|
101
|
-
await i({
|
|
102
|
-
client: e,
|
|
103
|
-
headers: l(t),
|
|
104
|
-
path: n,
|
|
105
|
-
throwOnError: !0
|
|
106
|
-
});
|
|
107
|
-
},
|
|
108
|
-
onSuccess: async (n, r) => {
|
|
109
|
-
await u({
|
|
110
|
-
client: e,
|
|
111
|
-
organizationId: t,
|
|
112
|
-
receivableId: r.path.receivable_id
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function _() {
|
|
118
|
-
let { client: e, organizationId: t } = c();
|
|
119
|
-
return d({
|
|
120
|
-
mutationFn: async ({ path: n }) => {
|
|
121
|
-
let { data: r } = await a({
|
|
122
|
-
client: e,
|
|
123
|
-
headers: l(t),
|
|
124
|
-
path: n,
|
|
125
|
-
throwOnError: !0
|
|
126
|
-
});
|
|
127
|
-
return r;
|
|
128
|
-
},
|
|
129
|
-
onSuccess: async (n, r) => {
|
|
130
|
-
await u({
|
|
131
|
-
client: e,
|
|
132
|
-
organizationId: t,
|
|
133
|
-
receivableId: r.path.receivable_id
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
function v() {
|
|
139
|
-
let { client: e, organizationId: t } = c();
|
|
140
|
-
return d({
|
|
141
|
-
mutationFn: async ({ path: n, body: i }) => {
|
|
142
|
-
let { data: a } = await r({
|
|
143
|
-
client: e,
|
|
144
|
-
headers: l(t),
|
|
145
|
-
path: n,
|
|
146
|
-
body: i,
|
|
147
|
-
throwOnError: !0
|
|
148
|
-
});
|
|
149
|
-
return a;
|
|
150
|
-
},
|
|
151
|
-
onSuccess: async (n, r) => {
|
|
152
|
-
await u({
|
|
153
|
-
client: e,
|
|
154
|
-
organizationId: t,
|
|
155
|
-
receivableId: r.path.receivable_id
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function y() {
|
|
161
|
-
let { client: e, organizationId: t } = c();
|
|
162
|
-
return d({
|
|
163
|
-
mutationFn: async ({ path: n, body: r }) => {
|
|
164
|
-
let { data: i } = await o({
|
|
165
|
-
client: e,
|
|
166
|
-
headers: l(t),
|
|
167
|
-
path: n,
|
|
168
|
-
body: r,
|
|
169
|
-
throwOnError: !0
|
|
170
|
-
});
|
|
171
|
-
return i;
|
|
172
|
-
},
|
|
173
|
-
onSuccess: async (n, r) => {
|
|
174
|
-
await u({
|
|
175
|
-
client: e,
|
|
176
|
-
organizationId: t,
|
|
177
|
-
receivableId: r.path.receivable_id
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
export { v as useAcceptReceivableMutation, g as useCancelReceivableMutation, _ as useCloneReceivableMutation, f as useCreateReceivableMutation, y as useDeclineReceivableMutation, m as useDeleteReceivableMutation, h as useIssueReceivableMutation, p as useUpdateReceivableMutation };
|
|
13
|
+
var s = 100;
|
|
14
|
+
function c(c, { enabled: l = !0 } = {}) {
|
|
15
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationStatus: m } = r(), h = i(d), g = {
|
|
16
|
+
object_id: c ?? "",
|
|
17
|
+
limit: s
|
|
18
|
+
}, _ = a({
|
|
19
|
+
queryKey: [...t({
|
|
20
|
+
client: u,
|
|
21
|
+
headers: h,
|
|
22
|
+
query: g
|
|
23
|
+
}), "all"],
|
|
24
|
+
queryFn: async ({ signal: t }) => {
|
|
25
|
+
let n = [], r = /* @__PURE__ */ new Set(), i;
|
|
26
|
+
do {
|
|
27
|
+
let { data: a } = await e({
|
|
28
|
+
client: u,
|
|
29
|
+
headers: h,
|
|
30
|
+
query: {
|
|
31
|
+
...g,
|
|
32
|
+
...i ? { pagination_token: i } : {}
|
|
33
|
+
},
|
|
34
|
+
signal: t,
|
|
35
|
+
throwOnError: !0
|
|
36
|
+
});
|
|
37
|
+
n.push(...a.data ?? []);
|
|
38
|
+
let o = a.next_pagination_token ?? void 0;
|
|
39
|
+
i = o && !r.has(o) ? o : void 0, i && r.add(i);
|
|
40
|
+
} while (i);
|
|
41
|
+
return { data: n };
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return o({
|
|
45
|
+
...n(_, {
|
|
46
|
+
authEpoch: p,
|
|
47
|
+
organizationStatus: m
|
|
48
|
+
}),
|
|
49
|
+
enabled: !!(d && f && c) && l
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export { c as useReceivablePaymentRecordsQuery };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js
CHANGED
|
@@ -2,51 +2,103 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
5
|
+
import { postPaymentRecords as e, postReceivablesIdMarkAsPaid 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";
|
|
10
9
|
import "../../../shared/data-access/dist/index.js";
|
|
11
|
-
import {
|
|
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
12
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
client:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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: e, organizationId: n } = i();
|
|
41
|
+
return d({
|
|
42
|
+
mutationFn: async ({ path: r, body: i }) => {
|
|
43
|
+
let { data: o } = await t({
|
|
44
|
+
client: e,
|
|
45
|
+
headers: a(n),
|
|
46
|
+
path: r,
|
|
47
|
+
body: i,
|
|
48
|
+
throwOnError: !0
|
|
49
|
+
});
|
|
50
|
+
return o;
|
|
51
|
+
},
|
|
52
|
+
onSuccess: async (t, r) => {
|
|
53
|
+
await f({
|
|
54
|
+
client: e,
|
|
55
|
+
organizationId: n,
|
|
56
|
+
receivableId: r.path.receivable_id
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function m() {
|
|
62
|
+
let { client: t, organizationId: n } = i();
|
|
63
|
+
return d({
|
|
64
|
+
mutationFn: async ({ body: r }) => {
|
|
65
|
+
let { data: i } = await e({
|
|
66
|
+
client: t,
|
|
67
|
+
headers: a(n),
|
|
68
|
+
body: r,
|
|
69
|
+
throwOnError: !0
|
|
70
|
+
});
|
|
71
|
+
return i;
|
|
72
|
+
},
|
|
73
|
+
onSuccess: async (e, r) => {
|
|
74
|
+
await f({
|
|
75
|
+
client: t,
|
|
76
|
+
organizationId: n,
|
|
77
|
+
receivableId: r.body.object.id
|
|
78
|
+
});
|
|
42
79
|
}
|
|
43
80
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
49
|
-
|
|
81
|
+
}
|
|
82
|
+
function h() {
|
|
83
|
+
let { client: e, organizationId: t } = i();
|
|
84
|
+
return d({
|
|
85
|
+
mutationFn: async ({ path: r, body: i }) => {
|
|
86
|
+
let { data: o } = await n({
|
|
87
|
+
client: e,
|
|
88
|
+
headers: a(t),
|
|
89
|
+
path: r,
|
|
90
|
+
body: i,
|
|
91
|
+
throwOnError: !0
|
|
92
|
+
});
|
|
93
|
+
return o;
|
|
94
|
+
},
|
|
95
|
+
onSuccess: async (n, r) => {
|
|
96
|
+
await f({
|
|
97
|
+
client: e,
|
|
98
|
+
organizationId: t,
|
|
99
|
+
receivableId: r.path.receivable_id
|
|
100
|
+
});
|
|
101
|
+
}
|
|
50
102
|
});
|
|
51
103
|
}
|
|
52
|
-
export {
|
|
104
|
+
export { m as useCreateReceivablePaymentRecordMutation, p as useMarkReceivablePaidMutation, h as useMarkReceivableUncollectibleMutation };
|