@tesouro/embedded-components-react 0.4.2 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/index.css +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +26 -311
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +326 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +13 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +28 -245
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +256 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +86 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +77 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -27
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +141 -138
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +33 -21
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -316,16 +316,16 @@ Details for one credit **or** debit card — status, form factor, program, maske
|
|
|
316
316
|
|
|
317
317
|
#### Props
|
|
318
318
|
|
|
319
|
-
| Prop | Type | Default | Description
|
|
320
|
-
| ---------------- | --------------------------------------- | -------------- |
|
|
321
|
-
| `cardId` | `string` | **Required** | Id of the card to show.
|
|
322
|
-
| `cardProgram` | `'credit' \| 'debit'` | **Required** | Which issuing program `cardId` belongs to. Selects the endpoint the card is fetched from.
|
|
323
|
-
| `onClose` | `() => void` | `undefined` | Called when the
|
|
324
|
-
| `labels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Overrides the panel's own copy — header, card face alt text, row headings, copy-button accessible names, the nickname editor, the lock control and its locked notice, and the loading/error/not-found screens.
|
|
325
|
-
| `activateLabels` | `PartialDeep<ActivateCardPanelLabels>` | English labels | Overrides the Activate Card form's copy — its heading, the two field labels, the security-code explanation, and the validation and status text.
|
|
326
|
-
| `featureLabels` | `PartialDeep<CardDetailsFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status, form-factor and program vocabulary, the copy-success and nickname-updated toasts, the activation, lock and nickname conflict toasts, and the refused-reveal sentence.
|
|
327
|
-
| `bankLogoSrc` | `string` | `undefined` | Bank logo for the card face. Omit and the face renders without a logo rather than with a placeholder.
|
|
328
|
-
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. Falls back to `labels.cardFace.bankLogoAlt`.
|
|
319
|
+
| Prop | Type | Default | Description |
|
|
320
|
+
| ---------------- | --------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
321
|
+
| `cardId` | `string` | **Required** | Id of the card to show. |
|
|
322
|
+
| `cardProgram` | `'credit' \| 'debit'` | **Required** | Which issuing program `cardId` belongs to. Selects the endpoint the card is fetched from. |
|
|
323
|
+
| `onClose` | `() => void` | `undefined` | Called when the reader is finished with the widget: the details panel's close control, and **Done** on the activation success screen. Omit it and neither is rendered. The activation form keeps its own close either way, which returns to the details. |
|
|
324
|
+
| `labels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Overrides the panel's own copy — header, card face alt text, row headings, copy-button accessible names, the nickname editor, the lock control and its locked notice, and the loading/error/not-found screens. |
|
|
325
|
+
| `activateLabels` | `PartialDeep<ActivateCardPanelLabels>` | English labels | Overrides the Activate Card form's copy — its heading, the two field labels, the security-code explanation, and the validation and status text. |
|
|
326
|
+
| `featureLabels` | `PartialDeep<CardDetailsFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status, form-factor and program vocabulary, the copy-success and nickname-updated toasts, the activation, lock and nickname conflict toasts, and the refused-reveal sentence. |
|
|
327
|
+
| `bankLogoSrc` | `string` | `undefined` | Bank logo for the card face. Omit and the face renders without a logo rather than with a placeholder. |
|
|
328
|
+
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. Falls back to `labels.cardFace.bankLogoAlt`. |
|
|
329
329
|
|
|
330
330
|
### CounterpartsWidget
|
|
331
331
|
|
package/dist/index.css
CHANGED
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
2
2
|
import "../../../shared/data-access/dist/index.js";
|
|
3
3
|
import { isLiveScheduledPaymentRecord as t } from "./index3.js";
|
|
4
|
-
import "./
|
|
5
|
-
import { DuplicateVerdict as n, hasSuspectedPayableDuplicate as r, suspectedPayableDuplicates as i, useApplyDuplicateVerdictsMutation as a } from "./
|
|
6
|
-
import { useApprovePayableApprovalRequestMutation as o, usePayableApprovalRequestsQuery as s, useRejectPayableApprovalRequestMutation as c } from "./
|
|
7
|
-
import { usePayableHistoryQuery as l } from "./
|
|
8
|
-
import { useAllPayableLineItemsQuery as u, useReplacePayableLineItemsMutation as d } from "./
|
|
9
|
-
import { usePayablePaymentRecordsQuery as f } from "./
|
|
10
|
-
import { useSchedulePaymentMutation as p } from "./
|
|
11
|
-
import { useAttachPayableFileMutation as m, useCancelPayableMutation as h, useCancelScheduledPaymentMutation as g, useCreatePayableMutation as _, useDeletePayableFileMutation as v, useDeletePayableMutation as y, useForceApprovePayableMutation as b, useForceRejectPayableMutation as x, useMarkPayableAsPaidMutation as S, useReopenPayableMutation as C, useSubmitPayableForApprovalMutation as w, useUpdatePayableMutation as T, useUploadPayableFromFileMutation as E, useValidatePayableMutation as D } from "./
|
|
4
|
+
import "./index5.js";
|
|
5
|
+
import { DuplicateVerdict as n, hasSuspectedPayableDuplicate as r, suspectedPayableDuplicates as i, useApplyDuplicateVerdictsMutation as a } from "./index7.js";
|
|
6
|
+
import { useApprovePayableApprovalRequestMutation as o, usePayableApprovalRequestsQuery as s, useRejectPayableApprovalRequestMutation as c } from "./index8.js";
|
|
7
|
+
import { usePayableHistoryQuery as l } from "./index9.js";
|
|
8
|
+
import { useAllPayableLineItemsQuery as u, useReplacePayableLineItemsMutation as d } from "./index10.js";
|
|
9
|
+
import { usePayablePaymentRecordsQuery as f } from "./index11.js";
|
|
10
|
+
import { useSchedulePaymentMutation as p } from "./index12.js";
|
|
11
|
+
import { useAttachPayableFileMutation as m, useCancelPayableMutation as h, useCancelScheduledPaymentMutation as g, useCreatePayableMutation as _, useDeletePayableFileMutation as v, useDeletePayableMutation as y, useForceApprovePayableMutation as b, useForceRejectPayableMutation as x, useMarkPayableAsPaidMutation as S, useReopenPayableMutation as C, useSubmitPayableForApprovalMutation as w, useUpdatePayableMutation as T, useUploadPayableFromFileMutation as E, useValidatePayableMutation as D } from "./index13.js";
|
|
12
12
|
import { usePayableOcrQueries as O } from "./index14.js";
|
|
13
13
|
import { useAllSuspectedDuplicatePayablesQuery as k, usePayableQuery as A, usePayablesQuery as j, usePayablesTotalCountQuery as M } from "./index15.js";
|
|
14
14
|
import { usePayableSuggestionsQuery as N } from "./index16.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
CHANGED
|
@@ -4,51 +4,72 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { withAuthEpoch as
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as
|
|
7
|
+
import { getPayablesIdLineItems as n, putPayablesIdLineItems as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getPayablesIdLineItemsOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
11
11
|
import "../../../shared/data-access/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { invalidatePayableQueries as l } from "./index6.js";
|
|
13
|
+
import { useMemo as u } from "react";
|
|
14
|
+
import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
|
|
14
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let { client:
|
|
18
|
-
|
|
19
|
-
object_id__in: d ? [d] : [],
|
|
20
|
-
order: "desc",
|
|
21
|
-
sort: "paid_at"
|
|
22
|
-
}, b = r({
|
|
23
|
-
client: p,
|
|
16
|
+
var p = 100;
|
|
17
|
+
function m(r, { enabled: l } = {}) {
|
|
18
|
+
let { client: f, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && r) && l !== !1, y = i({
|
|
19
|
+
client: f,
|
|
24
20
|
headers: _,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
path: { payable_id: r ?? "" },
|
|
22
|
+
query: { limit: p }
|
|
23
|
+
}), b = d({
|
|
24
|
+
queryKey: [...a(y, g).queryKey, "all"],
|
|
28
25
|
enabled: v,
|
|
29
26
|
initialPageParam: void 0,
|
|
30
27
|
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
31
|
-
let { data:
|
|
32
|
-
client:
|
|
28
|
+
let { data: i } = await n({
|
|
29
|
+
client: f,
|
|
33
30
|
headers: _,
|
|
31
|
+
path: { payable_id: r ?? "" },
|
|
34
32
|
query: {
|
|
35
|
-
|
|
33
|
+
limit: p,
|
|
36
34
|
...t ? { pagination_token: t } : {}
|
|
37
35
|
},
|
|
38
36
|
signal: e,
|
|
39
37
|
throwOnError: !0
|
|
40
38
|
});
|
|
41
|
-
return
|
|
39
|
+
return i;
|
|
42
40
|
},
|
|
43
|
-
getNextPageParam:
|
|
41
|
+
getNextPageParam: o
|
|
44
42
|
});
|
|
45
|
-
|
|
46
|
-
let
|
|
43
|
+
c(b, v);
|
|
44
|
+
let x = u(() => b.data?.pages.flatMap((e) => e.data ?? []) ?? [], [b.data]);
|
|
47
45
|
return {
|
|
48
|
-
...
|
|
49
|
-
|
|
50
|
-
isResolving:
|
|
46
|
+
...b,
|
|
47
|
+
lineItems: x,
|
|
48
|
+
isResolving: s(b)
|
|
51
49
|
};
|
|
52
50
|
}
|
|
51
|
+
function h() {
|
|
52
|
+
let { client: n, organizationId: i } = e();
|
|
53
|
+
return f({
|
|
54
|
+
mutationFn: async ({ path: e, body: a }) => {
|
|
55
|
+
let { data: o } = await r({
|
|
56
|
+
client: n,
|
|
57
|
+
headers: t(i),
|
|
58
|
+
path: e,
|
|
59
|
+
body: a,
|
|
60
|
+
throwOnError: !0
|
|
61
|
+
});
|
|
62
|
+
return o;
|
|
63
|
+
},
|
|
64
|
+
onSuccess: async (e, t) => {
|
|
65
|
+
await l({
|
|
66
|
+
client: n,
|
|
67
|
+
organizationId: i,
|
|
68
|
+
payableId: t.path.payable_id,
|
|
69
|
+
includeLineItems: !0
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
53
74
|
//#endregion
|
|
54
|
-
export {
|
|
75
|
+
export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
CHANGED
|
@@ -4,42 +4,51 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
7
|
+
import { getPaymentRecords as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getPaymentRecordsOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
8
11
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
12
|
+
import { useMemo as c } from "react";
|
|
13
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
11
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
var u = 100;
|
|
16
|
+
function d(d, { enabled: f } = {}) {
|
|
17
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && d) && f !== !1, y = {
|
|
18
|
+
limit: u,
|
|
19
|
+
object_id__in: d ? [d] : [],
|
|
20
|
+
order: "desc",
|
|
21
|
+
sort: "paid_at"
|
|
22
|
+
}, b = r({
|
|
23
|
+
client: p,
|
|
24
|
+
headers: _,
|
|
25
|
+
query: y
|
|
26
|
+
}), x = l({
|
|
27
|
+
queryKey: [...i(b, g).queryKey, "all"],
|
|
28
|
+
enabled: v,
|
|
29
|
+
initialPageParam: void 0,
|
|
30
|
+
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
31
|
+
let { data: r } = await n({
|
|
32
|
+
client: p,
|
|
33
|
+
headers: _,
|
|
34
|
+
query: {
|
|
35
|
+
...y,
|
|
36
|
+
...t ? { pagination_token: t } : {}
|
|
23
37
|
},
|
|
38
|
+
signal: e,
|
|
24
39
|
throwOnError: !0
|
|
25
40
|
});
|
|
26
|
-
return
|
|
41
|
+
return r;
|
|
27
42
|
},
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
await r({
|
|
31
|
-
client: o,
|
|
32
|
-
organizationId: s,
|
|
33
|
-
payableId: t.payableId
|
|
34
|
-
});
|
|
35
|
-
} catch {}
|
|
36
|
-
i({
|
|
37
|
-
client: o,
|
|
38
|
-
organizationId: s,
|
|
39
|
-
payableId: t.payableId
|
|
40
|
-
}).catch(() => {});
|
|
41
|
-
}
|
|
43
|
+
getNextPageParam: a
|
|
42
44
|
});
|
|
45
|
+
s(x, v);
|
|
46
|
+
let S = c(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
47
|
+
return {
|
|
48
|
+
...x,
|
|
49
|
+
paymentRecords: S,
|
|
50
|
+
isResolving: v && o(x)
|
|
51
|
+
};
|
|
43
52
|
}
|
|
44
53
|
//#endregion
|
|
45
|
-
export {
|
|
54
|
+
export { d as usePayablePaymentRecordsQuery };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js
CHANGED
|
@@ -4,327 +4,42 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
7
|
+
import { postPayablesIdSchedulePayment as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
8
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { useMutation as
|
|
9
|
+
import { invalidatePayableQueries as r, reconcileScheduledPaymentQueries as i } from "./index6.js";
|
|
10
|
+
import { useMutation as a } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js
|
|
12
|
-
function
|
|
13
|
-
let { client:
|
|
14
|
-
return
|
|
15
|
-
mutationFn: async ({
|
|
16
|
-
let { data:
|
|
17
|
-
client:
|
|
18
|
-
headers: t(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onSuccess: async () => {
|
|
25
|
-
await v({
|
|
26
|
-
client: n,
|
|
27
|
-
organizationId: r
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function C() {
|
|
33
|
-
let { client: n, organizationId: r } = e();
|
|
34
|
-
return x({
|
|
35
|
-
mutationFn: async ({ path: e, body: a }) => {
|
|
36
|
-
let { data: o } = await i({
|
|
37
|
-
client: n,
|
|
38
|
-
headers: t(r),
|
|
39
|
-
path: e,
|
|
40
|
-
body: a,
|
|
41
|
-
throwOnError: !0
|
|
42
|
-
});
|
|
43
|
-
return o;
|
|
44
|
-
},
|
|
45
|
-
onSuccess: async (e, t) => {
|
|
46
|
-
await v({
|
|
47
|
-
client: n,
|
|
48
|
-
organizationId: r,
|
|
49
|
-
payableId: t.path.payable_id
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function w() {
|
|
55
|
-
let { client: r, organizationId: i } = e();
|
|
56
|
-
return x({
|
|
57
|
-
mutationFn: async ({ path: e }) => {
|
|
58
|
-
await n({
|
|
59
|
-
client: r,
|
|
60
|
-
headers: t(i),
|
|
61
|
-
path: e,
|
|
62
|
-
throwOnError: !0
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
onSuccess: async (e, t) => {
|
|
66
|
-
await _({
|
|
67
|
-
client: r,
|
|
68
|
-
organizationId: i,
|
|
69
|
-
payableId: t.path.payable_id
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function T() {
|
|
75
|
-
let { client: n, organizationId: r } = e();
|
|
76
|
-
return x({
|
|
77
|
-
mutationFn: async ({ file: e }) => {
|
|
78
|
-
let { data: a } = await m({
|
|
79
|
-
client: n,
|
|
80
|
-
headers: t(r),
|
|
81
|
-
body: { file: e },
|
|
82
|
-
throwOnError: !0
|
|
83
|
-
});
|
|
84
|
-
if (a?.id && a.currency !== "USD") try {
|
|
85
|
-
return await i({
|
|
86
|
-
client: n,
|
|
87
|
-
headers: t(r),
|
|
88
|
-
path: { payable_id: a.id },
|
|
89
|
-
body: { currency: "USD" },
|
|
90
|
-
throwOnError: !0
|
|
91
|
-
}), {
|
|
92
|
-
...a,
|
|
93
|
-
currency: "USD"
|
|
94
|
-
};
|
|
95
|
-
} catch {}
|
|
96
|
-
return a;
|
|
97
|
-
},
|
|
98
|
-
onSuccess: async () => {
|
|
99
|
-
await v({
|
|
100
|
-
client: n,
|
|
101
|
-
organizationId: r
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
function E() {
|
|
107
|
-
let { client: n, organizationId: r } = e();
|
|
108
|
-
return x({
|
|
109
|
-
mutationFn: async ({ path: e, file: i }) => {
|
|
110
|
-
let { data: a } = await s({
|
|
111
|
-
client: n,
|
|
112
|
-
headers: t(r),
|
|
113
|
-
path: e,
|
|
114
|
-
body: { file: i },
|
|
12
|
+
function o() {
|
|
13
|
+
let { client: o, organizationId: s } = e();
|
|
14
|
+
return a({
|
|
15
|
+
mutationFn: async ({ payableId: e, paymentDate: r, sourceBankAccountId: i }) => {
|
|
16
|
+
let { data: a } = await n({
|
|
17
|
+
client: o,
|
|
18
|
+
headers: t(s),
|
|
19
|
+
path: { payable_id: e },
|
|
20
|
+
body: {
|
|
21
|
+
payment_date: r,
|
|
22
|
+
source_bank_account_id: i
|
|
23
|
+
},
|
|
115
24
|
throwOnError: !0
|
|
116
25
|
});
|
|
117
26
|
return a;
|
|
118
27
|
},
|
|
119
28
|
onSuccess: async (e, t) => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return x({
|
|
131
|
-
mutationFn: async ({ path: e }) => {
|
|
132
|
-
await r({
|
|
133
|
-
client: n,
|
|
134
|
-
headers: t(i),
|
|
135
|
-
path: e,
|
|
136
|
-
throwOnError: !0
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
onSuccess: async (e, t) => {
|
|
140
|
-
await v({
|
|
141
|
-
client: n,
|
|
142
|
-
organizationId: i,
|
|
143
|
-
payableId: t.path.payable_id
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function O() {
|
|
149
|
-
let { client: n, organizationId: r } = e();
|
|
150
|
-
return x({ mutationFn: async ({ path: e }) => {
|
|
151
|
-
let { data: i } = await p({
|
|
152
|
-
client: n,
|
|
153
|
-
headers: t(r),
|
|
154
|
-
path: e,
|
|
155
|
-
throwOnError: !0
|
|
156
|
-
});
|
|
157
|
-
return {
|
|
158
|
-
id: i.id,
|
|
159
|
-
validation_errors: i.validation_errors ?? []
|
|
160
|
-
};
|
|
161
|
-
} });
|
|
162
|
-
}
|
|
163
|
-
function k() {
|
|
164
|
-
let { client: n, organizationId: r } = e();
|
|
165
|
-
return x({
|
|
166
|
-
onMutate: async ({ path: e }) => g({
|
|
167
|
-
client: n,
|
|
168
|
-
organizationId: r,
|
|
169
|
-
payableId: e.payable_id
|
|
170
|
-
}, { requireRoundMarker: !0 }),
|
|
171
|
-
mutationFn: async ({ path: e }) => {
|
|
172
|
-
let { data: i } = await f({
|
|
173
|
-
client: n,
|
|
174
|
-
headers: t(r),
|
|
175
|
-
path: e,
|
|
176
|
-
throwOnError: !0
|
|
177
|
-
});
|
|
178
|
-
return i;
|
|
179
|
-
},
|
|
180
|
-
onSuccess: async (e, t, i) => {
|
|
181
|
-
let a = t.path.payable_id, o = e?.status === "approve_in_progress";
|
|
182
|
-
await v({
|
|
183
|
-
client: n,
|
|
184
|
-
organizationId: r,
|
|
185
|
-
payableId: a,
|
|
186
|
-
includeApprovalRequests: !0
|
|
187
|
-
}), !(!o || !i) && b({
|
|
188
|
-
client: n,
|
|
189
|
-
organizationId: r,
|
|
190
|
-
payableId: a,
|
|
191
|
-
watch: i
|
|
192
|
-
}).catch(() => {});
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
function A() {
|
|
197
|
-
let { client: n, organizationId: r } = e();
|
|
198
|
-
return x({
|
|
199
|
-
mutationFn: async ({ path: e }) => {
|
|
200
|
-
let { data: i } = await o({
|
|
201
|
-
client: n,
|
|
202
|
-
headers: t(r),
|
|
203
|
-
path: e,
|
|
204
|
-
throwOnError: !0
|
|
205
|
-
});
|
|
206
|
-
return i;
|
|
207
|
-
},
|
|
208
|
-
onSuccess: async (e, t) => {
|
|
209
|
-
await v({
|
|
210
|
-
client: n,
|
|
211
|
-
organizationId: r,
|
|
212
|
-
payableId: t.path.payable_id,
|
|
213
|
-
includeApprovalRequests: !0
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
function j() {
|
|
219
|
-
let { client: n, organizationId: r } = e();
|
|
220
|
-
return x({
|
|
221
|
-
mutationFn: async ({ path: e }) => {
|
|
222
|
-
let { data: i } = await u({
|
|
223
|
-
client: n,
|
|
224
|
-
headers: t(r),
|
|
225
|
-
path: e,
|
|
226
|
-
throwOnError: !0
|
|
227
|
-
});
|
|
228
|
-
return i;
|
|
229
|
-
},
|
|
230
|
-
onSuccess: async (e, t) => {
|
|
231
|
-
await v({
|
|
232
|
-
client: n,
|
|
233
|
-
organizationId: r,
|
|
234
|
-
payableId: t.path.payable_id,
|
|
235
|
-
includeApprovalRequests: !0
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
function M() {
|
|
241
|
-
let { client: n, organizationId: r } = e();
|
|
242
|
-
return x({
|
|
243
|
-
mutationFn: async ({ path: e }) => {
|
|
244
|
-
let { data: i } = await c({
|
|
245
|
-
client: n,
|
|
246
|
-
headers: t(r),
|
|
247
|
-
path: e,
|
|
248
|
-
throwOnError: !0
|
|
249
|
-
});
|
|
250
|
-
return i;
|
|
251
|
-
},
|
|
252
|
-
onSuccess: async (e, t) => {
|
|
253
|
-
await v({
|
|
254
|
-
client: n,
|
|
255
|
-
organizationId: r,
|
|
256
|
-
payableId: t.path.payable_id
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
function N() {
|
|
262
|
-
let { client: n, organizationId: r } = e();
|
|
263
|
-
return x({
|
|
264
|
-
mutationFn: async ({ path: e }) => {
|
|
265
|
-
let { data: i } = await h({
|
|
266
|
-
client: n,
|
|
267
|
-
headers: t(r),
|
|
268
|
-
path: e,
|
|
269
|
-
throwOnError: !0
|
|
270
|
-
});
|
|
271
|
-
return i;
|
|
272
|
-
},
|
|
273
|
-
onSuccess: async (e, t) => {
|
|
274
|
-
await v({
|
|
275
|
-
client: n,
|
|
276
|
-
organizationId: r,
|
|
277
|
-
payableId: t.payableId
|
|
278
|
-
}), y({
|
|
279
|
-
client: n,
|
|
280
|
-
organizationId: r,
|
|
29
|
+
try {
|
|
30
|
+
await r({
|
|
31
|
+
client: o,
|
|
32
|
+
organizationId: s,
|
|
33
|
+
payableId: t.payableId
|
|
34
|
+
});
|
|
35
|
+
} catch {}
|
|
36
|
+
i({
|
|
37
|
+
client: o,
|
|
38
|
+
organizationId: s,
|
|
281
39
|
payableId: t.payableId
|
|
282
40
|
}).catch(() => {});
|
|
283
41
|
}
|
|
284
42
|
});
|
|
285
43
|
}
|
|
286
|
-
function P() {
|
|
287
|
-
let { client: n, organizationId: r } = e();
|
|
288
|
-
return x({
|
|
289
|
-
mutationFn: async ({ path: e }) => {
|
|
290
|
-
let { data: i } = await d({
|
|
291
|
-
client: n,
|
|
292
|
-
headers: t(r),
|
|
293
|
-
path: e,
|
|
294
|
-
throwOnError: !0
|
|
295
|
-
});
|
|
296
|
-
return i;
|
|
297
|
-
},
|
|
298
|
-
onSuccess: async (e, t) => {
|
|
299
|
-
await v({
|
|
300
|
-
client: n,
|
|
301
|
-
organizationId: r,
|
|
302
|
-
payableId: t.path.payable_id
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
function F() {
|
|
308
|
-
let { client: n, organizationId: r } = e();
|
|
309
|
-
return x({
|
|
310
|
-
mutationFn: async ({ path: e, body: i }) => {
|
|
311
|
-
let { data: a } = await l({
|
|
312
|
-
client: n,
|
|
313
|
-
headers: t(r),
|
|
314
|
-
path: e,
|
|
315
|
-
body: i,
|
|
316
|
-
throwOnError: !0
|
|
317
|
-
});
|
|
318
|
-
return a;
|
|
319
|
-
},
|
|
320
|
-
onSuccess: async (e, t) => {
|
|
321
|
-
await v({
|
|
322
|
-
client: n,
|
|
323
|
-
organizationId: r,
|
|
324
|
-
payableId: t.path.payable_id
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
44
|
//#endregion
|
|
330
|
-
export {
|
|
45
|
+
export { o as useSchedulePaymentMutation };
|