@tesouro/embedded-components-react 0.5.147 → 0.5.149
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/fixtures/index.d.ts +54 -1
- package/dist/fixtures/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index11.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +21 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +14 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +43 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +52 -49
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +30 -15
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index4.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +23 -17
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +12 -9
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +99 -98
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +139 -138
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +16 -13
- package/package.json +8 -1
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -42,6 +42,51 @@ type AmountOutput = {
|
|
|
42
42
|
*/
|
|
43
43
|
value: number | string;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* The status of a bank account.
|
|
47
|
+
*/
|
|
48
|
+
type BankAccountStatus = 'ACTIVE' | 'CLOSED';
|
|
49
|
+
/**
|
|
50
|
+
* Response model for a bank account with balance information.
|
|
51
|
+
*/
|
|
52
|
+
type BankAccountWithBalanceResponse = {
|
|
53
|
+
/**
|
|
54
|
+
* Unique identifier for the bank account.
|
|
55
|
+
*/
|
|
56
|
+
id: string;
|
|
57
|
+
/**
|
|
58
|
+
* Masked account number.
|
|
59
|
+
*/
|
|
60
|
+
accountNumber: string;
|
|
61
|
+
/**
|
|
62
|
+
* Current balance of the bank account in minor units (e.g. cents for USD).
|
|
63
|
+
*/
|
|
64
|
+
balance: AmountOutput;
|
|
65
|
+
/**
|
|
66
|
+
* Reference identifier associated with the bank account.
|
|
67
|
+
*/
|
|
68
|
+
bankAccountReference?: null | string;
|
|
69
|
+
/**
|
|
70
|
+
* The UTC timestamp when the bank account was created.
|
|
71
|
+
*/
|
|
72
|
+
createdDateTime: string;
|
|
73
|
+
/**
|
|
74
|
+
* Registered legal or DBA name on the bank account.
|
|
75
|
+
*/
|
|
76
|
+
nameOnAccount: string;
|
|
77
|
+
/**
|
|
78
|
+
* Nickname for the bank account.
|
|
79
|
+
*/
|
|
80
|
+
nickname?: null | string;
|
|
81
|
+
/**
|
|
82
|
+
* Bank routing number.
|
|
83
|
+
*/
|
|
84
|
+
routingNumber: string;
|
|
85
|
+
/**
|
|
86
|
+
* The status of the bank account.
|
|
87
|
+
*/
|
|
88
|
+
status: BankAccountStatus;
|
|
89
|
+
};
|
|
45
90
|
/**
|
|
46
91
|
* The card network (brand) an issued card runs on, such as Visa or Mastercard.
|
|
47
92
|
*/
|
|
@@ -241,5 +286,13 @@ declare const A_DEBIT_CARD: DebitCardDetailResponse;
|
|
|
241
286
|
declare const A_DEBIT_CARD_CREDENTIALS: DebitCardCredentialsResponse;
|
|
242
287
|
/** Debit counterpart of {@link A_PENDING_CREDIT_CARD}, and typed for the same reason. */
|
|
243
288
|
declare const A_PENDING_DEBIT_CARD: DebitCardDetailResponse;
|
|
289
|
+
/**
|
|
290
|
+
* The account {@link A_DEBIT_CARD} is drawn on.
|
|
291
|
+
*
|
|
292
|
+
* `id` matches that card's `bankAccountId` deliberately: a debit card carries
|
|
293
|
+
* only the id, so the Funding account column is resolved by a *second* read, and
|
|
294
|
+
* a fixture whose id did not match would render the em-dash and look like a bug.
|
|
295
|
+
*/
|
|
296
|
+
declare const A_BANK_ACCOUNT: BankAccountWithBalanceResponse;
|
|
244
297
|
|
|
245
|
-
export { A_CREDIT_CARD, A_DEBIT_CARD, A_DEBIT_CARD_CREDENTIALS, A_PENDING_CREDIT_CARD, A_PENDING_DEBIT_CARD, A_WIDGET_INIT };
|
|
298
|
+
export { A_BANK_ACCOUNT, A_CREDIT_CARD, A_DEBIT_CARD, A_DEBIT_CARD_CREDENTIALS, A_PENDING_CREDIT_CARD, A_PENDING_DEBIT_CARD, A_WIDGET_INIT };
|
package/dist/fixtures/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { e as
|
|
1
|
+
import { A_BANK_ACCOUNT as e, A_CREDIT_CARD as t, A_DEBIT_CARD as n, A_DEBIT_CARD_CREDENTIALS as r, A_PENDING_CREDIT_CARD as i, A_PENDING_DEBIT_CARD as a, A_WIDGET_INIT as o } from "../libs/tesouro-embedded-components-react/shared/data-access-mocks/dist/lib/fixtures.js";
|
|
2
|
+
export { e as A_BANK_ACCOUNT, t as A_CREDIT_CARD, n as A_DEBIT_CARD, r as A_DEBIT_CARD_CREDENTIALS, i as A_PENDING_CREDIT_CARD, a as A_PENDING_DEBIT_CARD, o as A_WIDGET_INIT };
|
|
@@ -18,23 +18,26 @@ var c = (e, t) => (n, r) => {
|
|
|
18
18
|
if (i !== void 0 && i.baseUrl === e && i.path?.id === t) return n;
|
|
19
19
|
};
|
|
20
20
|
function l(l, u) {
|
|
21
|
-
let { client: d, organizationId: f, widgetToken: p, authEpoch: m } = n();
|
|
21
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = n();
|
|
22
22
|
i(l, u);
|
|
23
|
-
let
|
|
23
|
+
let g = !!(p && l && u), _ = d.getConfig().baseUrl, v = o(() => c(_, l), [_, l]), y = s({
|
|
24
24
|
...t(e({
|
|
25
25
|
client: d,
|
|
26
26
|
path: { id: l ?? "" },
|
|
27
27
|
headers: r(f)
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
}), {
|
|
29
|
+
authEpoch: m,
|
|
30
|
+
organizationPending: h
|
|
31
|
+
}),
|
|
32
|
+
placeholderData: v,
|
|
33
|
+
enabled: g,
|
|
31
34
|
retry: 2,
|
|
32
35
|
retryDelay: 300
|
|
33
36
|
});
|
|
34
37
|
return {
|
|
35
|
-
application:
|
|
36
|
-
isResolved: !
|
|
37
|
-
isUnavailable:
|
|
38
|
+
application: y.data ?? null,
|
|
39
|
+
isResolved: !g || a(y),
|
|
40
|
+
isUnavailable: g && y.isError
|
|
38
41
|
};
|
|
39
42
|
}
|
|
40
43
|
//#endregion
|
|
@@ -10,13 +10,16 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js
|
|
12
12
|
function a({ id: a, enabled: o }) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(),
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = e({
|
|
14
14
|
client: s,
|
|
15
15
|
headers: r(c),
|
|
16
16
|
path: { id: a ?? "" }
|
|
17
17
|
});
|
|
18
18
|
return i({
|
|
19
|
-
...t(
|
|
19
|
+
...t(f, {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationPending: d
|
|
22
|
+
}),
|
|
20
23
|
enabled: !!(a && c && l) && (o === !0 || o === void 0)
|
|
21
24
|
});
|
|
22
25
|
}
|
|
@@ -10,14 +10,17 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { keepPreviousData as i, useQuery as a } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js
|
|
12
12
|
function o({ id: o, enabled: s, ...c }) {
|
|
13
|
-
let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = n(),
|
|
13
|
+
let { client: l, organizationId: u, widgetToken: d, authEpoch: f, organizationPending: p } = n(), m = e({
|
|
14
14
|
client: l,
|
|
15
15
|
headers: r(u),
|
|
16
16
|
path: { id: o ?? "" },
|
|
17
17
|
query: c
|
|
18
18
|
});
|
|
19
19
|
return a({
|
|
20
|
-
...t(
|
|
20
|
+
...t(m, {
|
|
21
|
+
authEpoch: f,
|
|
22
|
+
organizationPending: p
|
|
23
|
+
}),
|
|
21
24
|
enabled: !!(o && u && d) && (s === !0 || s === void 0),
|
|
22
25
|
placeholderData: i
|
|
23
26
|
});
|
|
@@ -10,14 +10,17 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js
|
|
12
12
|
function a({ id: a, enabled: o, ...s }) {
|
|
13
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = n(),
|
|
13
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = n(), p = e({
|
|
14
14
|
client: c,
|
|
15
15
|
headers: r(l),
|
|
16
16
|
path: { id: a ?? "" },
|
|
17
17
|
query: s
|
|
18
18
|
});
|
|
19
19
|
return i({
|
|
20
|
-
...t(
|
|
20
|
+
...t(p, {
|
|
21
|
+
authEpoch: d,
|
|
22
|
+
organizationPending: f
|
|
23
|
+
}),
|
|
21
24
|
enabled: !!(a && l && u) && (o === !0 || o === void 0)
|
|
22
25
|
});
|
|
23
26
|
}
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
CHANGED
|
@@ -13,17 +13,20 @@ import { useInfiniteQuery as s } from "@tanstack/react-query";
|
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
|
|
14
14
|
var c = 100, l = ["ACTIVE", "INVITED"];
|
|
15
15
|
function u(l, u, d) {
|
|
16
|
-
let { client: f, organizationId: p, authEpoch: m } = r(),
|
|
16
|
+
let { client: f, organizationId: p, authEpoch: m, organizationPending: h } = r(), g = i(p), _ = d?.length ? { Permissions: d } : {}, v = t({
|
|
17
17
|
client: f,
|
|
18
|
-
headers:
|
|
18
|
+
headers: g,
|
|
19
19
|
query: {
|
|
20
20
|
Status: l,
|
|
21
21
|
Limit: c,
|
|
22
|
-
...
|
|
22
|
+
..._
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
24
|
+
}), y = s({
|
|
25
25
|
queryKey: [
|
|
26
|
-
...n(
|
|
26
|
+
...n(v, {
|
|
27
|
+
authEpoch: m,
|
|
28
|
+
organizationPending: h
|
|
29
|
+
}).queryKey,
|
|
27
30
|
"all",
|
|
28
31
|
l
|
|
29
32
|
],
|
|
@@ -32,11 +35,11 @@ function u(l, u, d) {
|
|
|
32
35
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
33
36
|
let { data: r } = await e({
|
|
34
37
|
client: f,
|
|
35
|
-
headers:
|
|
38
|
+
headers: g,
|
|
36
39
|
query: {
|
|
37
40
|
Status: l,
|
|
38
41
|
Limit: c,
|
|
39
|
-
...
|
|
42
|
+
..._,
|
|
40
43
|
...n ? { PaginationToken: n } : {}
|
|
41
44
|
},
|
|
42
45
|
signal: t,
|
|
@@ -50,24 +53,24 @@ function u(l, u, d) {
|
|
|
50
53
|
}
|
|
51
54
|
});
|
|
52
55
|
a(() => {
|
|
53
|
-
u &&
|
|
56
|
+
u && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
|
|
54
57
|
}, [
|
|
55
58
|
u,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
y.hasNextPage,
|
|
60
|
+
y.isFetchingNextPage,
|
|
61
|
+
y.isError,
|
|
62
|
+
y.fetchNextPage
|
|
60
63
|
]);
|
|
61
|
-
let
|
|
62
|
-
if (
|
|
63
|
-
data:
|
|
64
|
+
let b = o(() => {
|
|
65
|
+
if (y.data) return {
|
|
66
|
+
data: y.data.pages.flatMap((e) => e.data ?? []),
|
|
64
67
|
nextPaginationToken: null,
|
|
65
68
|
prevPaginationToken: null
|
|
66
69
|
};
|
|
67
|
-
}, [
|
|
70
|
+
}, [y.data]);
|
|
68
71
|
return {
|
|
69
|
-
...
|
|
70
|
-
data:
|
|
72
|
+
...y,
|
|
73
|
+
data: b
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
76
|
function d({ enabled: e, permissions: t } = {}) {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
CHANGED
|
@@ -15,19 +15,22 @@ import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
|
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
|
|
16
16
|
var p = 100;
|
|
17
17
|
function m(t, { enabled: l } = {}) {
|
|
18
|
-
let { client: f, organizationId: m, widgetToken: h, authEpoch: g } = i(),
|
|
18
|
+
let { client: f, organizationId: m, widgetToken: h, authEpoch: g, organizationPending: _ } = i(), v = a(m), y = !!(m && h && t) && l !== !1, b = n({
|
|
19
19
|
client: f,
|
|
20
|
-
headers:
|
|
20
|
+
headers: v,
|
|
21
21
|
path: { payable_id: t ?? "" },
|
|
22
22
|
query: { limit: p }
|
|
23
|
-
}),
|
|
24
|
-
queryKey: [...r(
|
|
25
|
-
|
|
23
|
+
}), x = d({
|
|
24
|
+
queryKey: [...r(b, {
|
|
25
|
+
authEpoch: g,
|
|
26
|
+
organizationPending: _
|
|
27
|
+
}).queryKey, "all"],
|
|
28
|
+
enabled: y,
|
|
26
29
|
initialPageParam: void 0,
|
|
27
30
|
queryFn: async ({ signal: n, pageParam: r }) => {
|
|
28
31
|
let { data: i } = await e({
|
|
29
32
|
client: f,
|
|
30
|
-
headers:
|
|
33
|
+
headers: v,
|
|
31
34
|
path: { payable_id: t ?? "" },
|
|
32
35
|
query: {
|
|
33
36
|
limit: p,
|
|
@@ -40,12 +43,12 @@ function m(t, { enabled: l } = {}) {
|
|
|
40
43
|
},
|
|
41
44
|
getNextPageParam: o
|
|
42
45
|
});
|
|
43
|
-
c(
|
|
44
|
-
let
|
|
46
|
+
c(x, y);
|
|
47
|
+
let S = u(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
45
48
|
return {
|
|
46
|
-
...
|
|
47
|
-
lineItems:
|
|
48
|
-
isResolving: s(
|
|
49
|
+
...x,
|
|
50
|
+
lineItems: S,
|
|
51
|
+
isResolving: s(x)
|
|
49
52
|
};
|
|
50
53
|
}
|
|
51
54
|
function h() {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
CHANGED
|
@@ -14,25 +14,28 @@ import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
|
|
15
15
|
var u = 100;
|
|
16
16
|
function d(d, { enabled: f } = {}) {
|
|
17
|
-
let { client: p, organizationId: m, widgetToken: h, authEpoch: g } = r(),
|
|
17
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationPending: _ } = r(), v = i(m), y = !!(m && h && d) && f !== !1, b = {
|
|
18
18
|
limit: u,
|
|
19
19
|
object_id__in: d ? [d] : [],
|
|
20
20
|
order: "desc",
|
|
21
21
|
sort: "paid_at"
|
|
22
|
-
},
|
|
22
|
+
}, x = t({
|
|
23
23
|
client: p,
|
|
24
|
-
headers:
|
|
25
|
-
query:
|
|
26
|
-
}),
|
|
27
|
-
queryKey: [...n(
|
|
28
|
-
|
|
24
|
+
headers: v,
|
|
25
|
+
query: b
|
|
26
|
+
}), S = l({
|
|
27
|
+
queryKey: [...n(x, {
|
|
28
|
+
authEpoch: g,
|
|
29
|
+
organizationPending: _
|
|
30
|
+
}).queryKey, "all"],
|
|
31
|
+
enabled: y,
|
|
29
32
|
initialPageParam: void 0,
|
|
30
33
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
31
34
|
let { data: r } = await e({
|
|
32
35
|
client: p,
|
|
33
|
-
headers:
|
|
36
|
+
headers: v,
|
|
34
37
|
query: {
|
|
35
|
-
...
|
|
38
|
+
...b,
|
|
36
39
|
...n ? { pagination_token: n } : {}
|
|
37
40
|
},
|
|
38
41
|
signal: t,
|
|
@@ -42,12 +45,12 @@ function d(d, { enabled: f } = {}) {
|
|
|
42
45
|
},
|
|
43
46
|
getNextPageParam: a
|
|
44
47
|
});
|
|
45
|
-
s(
|
|
46
|
-
let
|
|
48
|
+
s(S, y);
|
|
49
|
+
let C = c(() => S.data?.pages.flatMap((e) => e.data ?? []) ?? [], [S.data]);
|
|
47
50
|
return {
|
|
48
|
-
...
|
|
49
|
-
paymentRecords:
|
|
50
|
-
isResolving:
|
|
51
|
+
...S,
|
|
52
|
+
paymentRecords: C,
|
|
53
|
+
isResolving: y && o(S)
|
|
51
54
|
};
|
|
52
55
|
}
|
|
53
56
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js
CHANGED
|
@@ -10,15 +10,18 @@ import { suspectedPayableDuplicates as r } from "./index7.js";
|
|
|
10
10
|
import { useQueries as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js
|
|
12
12
|
function a({ payableIds: a, enabled: o }) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = t(),
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = t(), f = !!(c && l) && (o === !0 || o === void 0);
|
|
14
14
|
return i({
|
|
15
15
|
queries: a.map((t) => ({
|
|
16
16
|
...e(n({
|
|
17
17
|
client: s,
|
|
18
18
|
organizationId: c,
|
|
19
19
|
payableId: t
|
|
20
|
-
}),
|
|
21
|
-
|
|
20
|
+
}), {
|
|
21
|
+
authEpoch: u,
|
|
22
|
+
organizationPending: d
|
|
23
|
+
}),
|
|
24
|
+
enabled: f && !!t
|
|
22
25
|
})),
|
|
23
26
|
combine: (e) => e.map((e, t) => ({
|
|
24
27
|
payableId: a[t],
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js
CHANGED
|
@@ -15,36 +15,39 @@ import { useMemo as f } from "react";
|
|
|
15
15
|
import { queryOptions as p, useQueries as m, useQuery as h } from "@tanstack/react-query";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js
|
|
17
17
|
function g({ enabled: e, pollWhileOcrProcessing: t = !1, ...n } = {}) {
|
|
18
|
-
let { client: i, organizationId: c, widgetToken: u, authEpoch: d } = o(),
|
|
18
|
+
let { client: i, organizationId: c, widgetToken: u, authEpoch: d, organizationPending: f } = o(), p = !!(c && u) && (e === !0 || e === void 0), m = r({
|
|
19
19
|
client: i,
|
|
20
20
|
headers: s(c),
|
|
21
21
|
query: n
|
|
22
22
|
});
|
|
23
23
|
return h({
|
|
24
|
-
...a(
|
|
25
|
-
|
|
24
|
+
...a(m, {
|
|
25
|
+
authEpoch: d,
|
|
26
|
+
organizationPending: f
|
|
27
|
+
}),
|
|
28
|
+
enabled: p,
|
|
26
29
|
...t ? { refetchInterval: (e) => (e.state.data?.data ?? []).some((e) => e.ocr_status === "processing") ? l : !1 } : {}
|
|
27
30
|
});
|
|
28
31
|
}
|
|
29
32
|
var _ = 100;
|
|
30
33
|
function v({ enabled: t } = {}) {
|
|
31
|
-
let { client: n, organizationId: r, widgetToken: c, authEpoch: l } = o(),
|
|
34
|
+
let { client: n, organizationId: r, widgetToken: c, authEpoch: l, organizationPending: u } = o(), d = s(r), f = {
|
|
32
35
|
duplicate_match_status: "suspected",
|
|
33
36
|
limit: _
|
|
34
|
-
},
|
|
37
|
+
}, m = p({
|
|
35
38
|
queryKey: [...i({
|
|
36
39
|
client: n,
|
|
37
|
-
headers:
|
|
38
|
-
query:
|
|
40
|
+
headers: d,
|
|
41
|
+
query: f
|
|
39
42
|
}), "all"],
|
|
40
43
|
queryFn: async ({ signal: t }) => {
|
|
41
44
|
let r = [], i = /* @__PURE__ */ new Set(), a;
|
|
42
45
|
do {
|
|
43
46
|
let { data: o } = await e({
|
|
44
47
|
client: n,
|
|
45
|
-
headers:
|
|
48
|
+
headers: d,
|
|
46
49
|
query: {
|
|
47
|
-
...
|
|
50
|
+
...f,
|
|
48
51
|
pagination_token: a
|
|
49
52
|
},
|
|
50
53
|
signal: t,
|
|
@@ -58,62 +61,74 @@ function v({ enabled: t } = {}) {
|
|
|
58
61
|
}
|
|
59
62
|
});
|
|
60
63
|
return h({
|
|
61
|
-
...a(
|
|
64
|
+
...a(m, {
|
|
65
|
+
authEpoch: l,
|
|
66
|
+
organizationPending: u
|
|
67
|
+
}),
|
|
62
68
|
enabled: !!(r && c) && t !== !1
|
|
63
69
|
});
|
|
64
70
|
}
|
|
65
71
|
function y({ enabled: e } = {}) {
|
|
66
|
-
let { client: n, organizationId: r, widgetToken: i, authEpoch: l } = o(),
|
|
72
|
+
let { client: n, organizationId: r, widgetToken: i, authEpoch: l, organizationPending: u } = o(), d = !!(r && i) && (e === !0 || e === void 0), f = t({
|
|
67
73
|
client: n,
|
|
68
74
|
headers: s(r),
|
|
69
75
|
query: c
|
|
70
76
|
});
|
|
71
77
|
return h({
|
|
72
|
-
...a(
|
|
73
|
-
|
|
78
|
+
...a(f, {
|
|
79
|
+
authEpoch: l,
|
|
80
|
+
organizationPending: u
|
|
81
|
+
}),
|
|
82
|
+
enabled: d,
|
|
74
83
|
select: (e) => ({ count: e.data[0]?.metric_value ?? 0 })
|
|
75
84
|
});
|
|
76
85
|
}
|
|
77
86
|
function b({ filters: e, enabled: n }) {
|
|
78
|
-
let { client: r, organizationId: i, widgetToken: l, authEpoch: u } = o(),
|
|
87
|
+
let { client: r, organizationId: i, widgetToken: l, authEpoch: u, organizationPending: d } = o(), p = s(i), h = !!(i && l) && (n === !0 || n === void 0), g = m({ queries: e.map((e) => ({
|
|
79
88
|
...a(t({
|
|
80
89
|
client: r,
|
|
81
|
-
headers:
|
|
90
|
+
headers: p,
|
|
82
91
|
query: {
|
|
83
92
|
...e,
|
|
84
93
|
...c
|
|
85
94
|
}
|
|
86
|
-
}),
|
|
87
|
-
|
|
95
|
+
}), {
|
|
96
|
+
authEpoch: u,
|
|
97
|
+
organizationPending: d
|
|
98
|
+
}),
|
|
99
|
+
enabled: h
|
|
88
100
|
})) });
|
|
89
|
-
return f(() =>
|
|
101
|
+
return f(() => g.map((e) => ({
|
|
90
102
|
count: e.data ? e.data.data[0]?.metric_value ?? 0 : void 0,
|
|
91
103
|
isError: e.isError
|
|
92
|
-
})), [
|
|
104
|
+
})), [g]);
|
|
93
105
|
}
|
|
94
106
|
function x(e, { enabled: t = !0, pollWhileOcrProcessing: r = !1, pollWhilePolicyAssignmentUnsettled: i = !1 } = {}) {
|
|
95
|
-
let { client: c, organizationId: l, widgetToken: f, authEpoch: p } = o(),
|
|
107
|
+
let { client: c, organizationId: l, widgetToken: f, authEpoch: p, organizationPending: m } = o(), g = !!(l && f && e) && t, _ = r ? u({
|
|
96
108
|
client: c,
|
|
97
109
|
organizationId: l,
|
|
98
110
|
payableId: e ?? ""
|
|
99
|
-
}) : void 0,
|
|
111
|
+
}) : void 0, v = i ? d({
|
|
100
112
|
client: c,
|
|
101
113
|
organizationId: l,
|
|
102
114
|
payableId: e ?? ""
|
|
103
|
-
}) : void 0,
|
|
115
|
+
}) : void 0, y = _ ?? v ?? n({
|
|
104
116
|
client: c,
|
|
105
117
|
headers: s(l),
|
|
106
118
|
path: { payable_id: e ?? "" }
|
|
107
|
-
}),
|
|
108
|
-
...
|
|
119
|
+
}), b = _ && v ? {
|
|
120
|
+
...y,
|
|
109
121
|
refetchInterval: (e) => {
|
|
110
|
-
let t = [
|
|
122
|
+
let t = [_.refetchInterval(e), v.refetchInterval(e)].filter((e) => e !== !1);
|
|
111
123
|
return t.length ? Math.min(...t) : !1;
|
|
112
124
|
}
|
|
113
|
-
} :
|
|
125
|
+
} : y;
|
|
114
126
|
return h({
|
|
115
|
-
...a(
|
|
116
|
-
|
|
127
|
+
...a(b, {
|
|
128
|
+
authEpoch: p,
|
|
129
|
+
organizationPending: m
|
|
130
|
+
}),
|
|
131
|
+
enabled: g
|
|
117
132
|
});
|
|
118
133
|
}
|
|
119
134
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js
CHANGED
|
@@ -11,19 +11,22 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
11
11
|
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js
|
|
13
13
|
function o(o, { enabled: s = !0 } = {}) {
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = n(),
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = n(), p = !!(l && u && o) && s, m = e({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: r(l),
|
|
17
17
|
path: { payable_id: o ?? "" }
|
|
18
|
-
}), { queryKey:
|
|
18
|
+
}), { queryKey: h, queryFn: g } = t(m, {
|
|
19
|
+
authEpoch: d,
|
|
20
|
+
organizationPending: f
|
|
21
|
+
});
|
|
19
22
|
return a({
|
|
20
|
-
queryKey:
|
|
21
|
-
enabled:
|
|
23
|
+
queryKey: h,
|
|
24
|
+
enabled: p,
|
|
22
25
|
retry: !1,
|
|
23
26
|
queryFn: async (e) => {
|
|
24
27
|
try {
|
|
25
|
-
if (typeof
|
|
26
|
-
return await
|
|
28
|
+
if (typeof g != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
|
|
29
|
+
return await g(e);
|
|
27
30
|
} catch (e) {
|
|
28
31
|
if (i(e)) return null;
|
|
29
32
|
throw e;
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js
CHANGED
|
@@ -13,7 +13,7 @@ import { beginApprovalRequestWatch as c, invalidateApprovalDecisionQueries as l,
|
|
|
13
13
|
import { useMutation as d, useQuery as f } from "@tanstack/react-query";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js
|
|
15
15
|
function p(e, { enabled: t } = {}) {
|
|
16
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = i(),
|
|
16
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: p } = i(), m = !!(l && u && e) && t !== !1, h = n({
|
|
17
17
|
client: c,
|
|
18
18
|
headers: a(l),
|
|
19
19
|
query: {
|
|
@@ -23,8 +23,11 @@ function p(e, { enabled: t } = {}) {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
return f({
|
|
26
|
-
...r(
|
|
27
|
-
|
|
26
|
+
...r(h, {
|
|
27
|
+
authEpoch: d,
|
|
28
|
+
organizationPending: p
|
|
29
|
+
}),
|
|
30
|
+
enabled: m
|
|
28
31
|
});
|
|
29
32
|
}
|
|
30
33
|
async function m({ client: e, organizationId: t, payableId: n, requestStatus: r }) {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js
CHANGED
|
@@ -11,7 +11,7 @@ import { useQuery as i } from "@tanstack/react-query";
|
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js
|
|
12
12
|
var a = 100;
|
|
13
13
|
function o(o, { enabled: s } = {}) {
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = n(),
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = n(), p = !!(l && u && o) && s !== !1, m = e({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: r(l),
|
|
17
17
|
path: { payable_id: o ?? "" },
|
|
@@ -22,8 +22,11 @@ function o(o, { enabled: s } = {}) {
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
return i({
|
|
25
|
-
...t(
|
|
26
|
-
|
|
25
|
+
...t(m, {
|
|
26
|
+
authEpoch: d,
|
|
27
|
+
organizationPending: f
|
|
28
|
+
}),
|
|
29
|
+
enabled: p
|
|
27
30
|
});
|
|
28
31
|
}
|
|
29
32
|
//#endregion
|