@tesouro/embedded-components-react 0.5.226 → 0.5.227
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/balances-widget/feature/dist/index3.js +41 -39
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +150 -147
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +46 -51
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +130 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +31 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +36 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index2.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +154 -150
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +151 -149
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +89 -87
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +133 -130
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +36 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +40 -39
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +209 -207
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +10 -5
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +10 -5
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +30 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +294 -292
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +58 -58
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -48
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +14 -13
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/allPages.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +16 -15
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -29
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +26 -27
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -32
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -34
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +33 -22
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +43 -32
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +138 -127
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +1 -1
- 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/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +60 -58
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ function t(e) {
|
|
|
12
12
|
}
|
|
13
13
|
var n = t((e) => e.nextPaginationToken), r = t((e) => e.next_pagination_token);
|
|
14
14
|
function i(e) {
|
|
15
|
-
return !e.isError && (e.isLoading || e.isFetchingNextPage || !!e.hasNextPage);
|
|
15
|
+
return !e.isError && (e.isLoading || e.isPlaceholderData || e.isFetchingNextPage || !!e.hasNextPage);
|
|
16
16
|
}
|
|
17
17
|
function a(t, n) {
|
|
18
18
|
e(() => {
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { getApplicationStatusOptions as e } from "./rest/@tanstack/react-query.gen.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { OrganizationStatus as t } from "./organizationStatus.js";
|
|
3
|
+
import { withAuthEpoch as n } from "./withAuthEpoch.js";
|
|
4
|
+
import { widgetTokenCacheId as r } from "./widgetTokenCacheId.js";
|
|
4
5
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js
|
|
5
|
-
var
|
|
6
|
-
function
|
|
6
|
+
var i = 1e4;
|
|
7
|
+
function a({ client: t }) {
|
|
7
8
|
return e({ client: t }).queryKey;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
let { queryFn:
|
|
11
|
-
authEpoch:
|
|
12
|
-
|
|
10
|
+
function o({ client: a, widgetToken: o, authEpoch: s }) {
|
|
11
|
+
let { queryFn: c, queryKey: l } = e({ client: a }), { placeholderData: u } = n({ queryKey: l }, {
|
|
12
|
+
authEpoch: s,
|
|
13
|
+
organizationStatus: t.Known
|
|
13
14
|
});
|
|
14
15
|
return {
|
|
15
16
|
queryKey: [
|
|
16
|
-
|
|
17
|
-
{ authEpoch:
|
|
18
|
-
{ widgetTokenId:
|
|
17
|
+
l[0],
|
|
18
|
+
{ authEpoch: s },
|
|
19
|
+
{ widgetTokenId: r(o) }
|
|
19
20
|
],
|
|
20
|
-
queryFn:
|
|
21
|
-
placeholderData:
|
|
21
|
+
queryFn: c,
|
|
22
|
+
placeholderData: u,
|
|
22
23
|
retry: 2,
|
|
23
24
|
retryDelay: 300,
|
|
24
|
-
staleTime:
|
|
25
|
+
staleTime: i
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
//#endregion
|
|
28
|
-
export {
|
|
29
|
+
export { a as applicationStatusInvalidationKey, o as applicationStatusQueryOptions };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getBankAccounts as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { getBankAccountsOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../withAuthEpoch.js";
|
|
8
8
|
import { useEmbedApi as r } from "../EmbedApiContext.js";
|
|
9
9
|
import { organizationHeaders as i } from "../organizationHeaders.js";
|
|
10
10
|
import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../allPages.js";
|
|
@@ -13,13 +13,15 @@ import { useInfiniteQuery as c } from "@tanstack/react-query";
|
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js
|
|
14
14
|
var l = 100;
|
|
15
15
|
function u({ enabled: u } = {}) {
|
|
16
|
-
let { client: d, organizationId: f, widgetToken: p, authEpoch: m,
|
|
16
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = t({
|
|
17
17
|
client: d,
|
|
18
18
|
headers: g,
|
|
19
19
|
query: { limit: l }
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
}), y = c({
|
|
21
|
+
...n(v.queryKey, {
|
|
22
|
+
authEpoch: m,
|
|
23
|
+
organizationStatus: h
|
|
24
|
+
}, { suffix: ["all"] }),
|
|
23
25
|
enabled: _,
|
|
24
26
|
initialPageParam: void 0,
|
|
25
27
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getDebitCards as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { getDebitCardsOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../withAuthEpoch.js";
|
|
8
8
|
import { useEmbedApi as r } from "../EmbedApiContext.js";
|
|
9
9
|
import { organizationHeaders as i } from "../organizationHeaders.js";
|
|
10
10
|
import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../allPages.js";
|
|
@@ -13,13 +13,15 @@ import { useInfiniteQuery as c } from "@tanstack/react-query";
|
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js
|
|
14
14
|
var l = 100;
|
|
15
15
|
function u({ enabled: u } = {}) {
|
|
16
|
-
let { client: d, organizationId: f, widgetToken: p, authEpoch: m,
|
|
16
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = t({
|
|
17
17
|
client: d,
|
|
18
18
|
headers: g,
|
|
19
19
|
query: { limit: l }
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
}), y = c({
|
|
21
|
+
...n(v.queryKey, {
|
|
22
|
+
authEpoch: m,
|
|
23
|
+
organizationStatus: h
|
|
24
|
+
}, { suffix: ["all"] }),
|
|
23
25
|
enabled: _,
|
|
24
26
|
initialPageParam: void 0,
|
|
25
27
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
@@ -13,7 +13,7 @@ function i(e) {
|
|
|
13
13
|
return (t >>> 0).toString(16);
|
|
14
14
|
}
|
|
15
15
|
function a({ invitationToken: a, userId: o, enabled: s } = {}) {
|
|
16
|
-
let { client: c, widgetToken: l, authEpoch: u,
|
|
16
|
+
let { client: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = a && o ? {
|
|
17
17
|
invitationToken: a,
|
|
18
18
|
userId: o
|
|
19
19
|
} : void 0, p = async ({ signal: t }) => {
|
|
@@ -35,7 +35,7 @@ function a({ invitationToken: a, userId: o, enabled: s } = {}) {
|
|
|
35
35
|
queryFn: p
|
|
36
36
|
}, {
|
|
37
37
|
authEpoch: u,
|
|
38
|
-
|
|
38
|
+
organizationStatus: d
|
|
39
39
|
});
|
|
40
40
|
return r({
|
|
41
41
|
queryKey: h,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getExternalBankAccounts as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { getExternalBankAccountsOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../withAuthEpoch.js";
|
|
8
8
|
import { useEmbedApi as r } from "../EmbedApiContext.js";
|
|
9
9
|
import { getAllPagesNextPageParam as i, useAutoFetchNextPage as a } from "../allPages.js";
|
|
10
10
|
import { useMemo as o } from "react";
|
|
@@ -12,13 +12,15 @@ import { useInfiniteQuery as s } from "@tanstack/react-query";
|
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js
|
|
13
13
|
var c = 100;
|
|
14
14
|
function l({ enabled: l } = {}) {
|
|
15
|
-
let { client: u, organizationId: d, widgetToken: f, authEpoch: p,
|
|
15
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationStatus: m } = r(), h = { "x-organization-id": d ?? "" }, g = !!(d && f) && (l === !0 || l === void 0), _ = t({
|
|
16
16
|
client: u,
|
|
17
17
|
headers: h,
|
|
18
18
|
query: { limit: c }
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
}), v = s({
|
|
20
|
+
...n(_.queryKey, {
|
|
21
|
+
authEpoch: p,
|
|
22
|
+
organizationStatus: m
|
|
23
|
+
}, { suffix: ["all"] }),
|
|
22
24
|
enabled: g,
|
|
23
25
|
initialPageParam: void 0,
|
|
24
26
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
@@ -4,30 +4,29 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getMerchantCategoryGroups as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { getMerchantCategoryGroupsOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPageParam as
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useInfiniteQuery as
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPageParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../allPages.js";
|
|
11
|
+
import { useMemo as c } from "react";
|
|
12
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js
|
|
14
|
-
function
|
|
15
|
-
let { client:
|
|
16
|
-
client:
|
|
17
|
-
headers:
|
|
14
|
+
function u({ enabled: u } = {}) {
|
|
15
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = t({
|
|
16
|
+
client: d,
|
|
17
|
+
headers: g,
|
|
18
18
|
query: { active: !0 }
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
authEpoch:
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
enabled: v,
|
|
19
|
+
}), y = l({
|
|
20
|
+
...n(v.queryKey, {
|
|
21
|
+
authEpoch: m,
|
|
22
|
+
organizationStatus: h
|
|
23
|
+
}, { suffix: ["all"] }),
|
|
24
|
+
enabled: _,
|
|
26
25
|
initialPageParam: void 0,
|
|
27
26
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
28
27
|
let { data: r } = await e({
|
|
29
|
-
client:
|
|
30
|
-
headers:
|
|
28
|
+
client: d,
|
|
29
|
+
headers: g,
|
|
31
30
|
query: {
|
|
32
31
|
active: !0,
|
|
33
32
|
...n ? { pagination_token: n } : {}
|
|
@@ -37,21 +36,21 @@ function d({ enabled: d } = {}) {
|
|
|
37
36
|
});
|
|
38
37
|
return r;
|
|
39
38
|
},
|
|
40
|
-
getNextPageParam:
|
|
39
|
+
getNextPageParam: a
|
|
41
40
|
});
|
|
42
|
-
|
|
43
|
-
let
|
|
44
|
-
if (
|
|
45
|
-
data:
|
|
41
|
+
s(y, _);
|
|
42
|
+
let b = c(() => {
|
|
43
|
+
if (y.data) return {
|
|
44
|
+
data: y.data.pages.flatMap((e) => e.data ?? []),
|
|
46
45
|
nextPaginationToken: null,
|
|
47
46
|
prevPaginationToken: null
|
|
48
47
|
};
|
|
49
|
-
}, [
|
|
48
|
+
}, [y.data]);
|
|
50
49
|
return {
|
|
51
|
-
...
|
|
52
|
-
data:
|
|
53
|
-
isResolving:
|
|
50
|
+
...y,
|
|
51
|
+
data: b,
|
|
52
|
+
isResolving: o(y)
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
55
|
//#endregion
|
|
57
|
-
export {
|
|
56
|
+
export { u as useAllMerchantCategoryGroupsQuery };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js
|
|
2
|
+
var e = {
|
|
3
|
+
Known: "known",
|
|
4
|
+
Rotating: "rotating",
|
|
5
|
+
Pending: "pending",
|
|
6
|
+
None: "none",
|
|
7
|
+
Failed: "failed"
|
|
8
|
+
}, t = (t) => t === e.Rotating || t === e.Pending;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as OrganizationStatus, t as isOrganizationOnItsWay };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getLedgerAccounts as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { getLedgerAccountsOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withAuthEpoch as n, withAuthEpochInfinite as r } from "../withAuthEpoch.js";
|
|
8
8
|
import { useEmbedApi as i } from "../EmbedApiContext.js";
|
|
9
9
|
import { organizationHeaders as a } from "../organizationHeaders.js";
|
|
10
10
|
import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../allPages.js";
|
|
@@ -12,37 +12,36 @@ import { useMemo as l } from "react";
|
|
|
12
12
|
import { useInfiniteQuery as u, useQuery as d } from "@tanstack/react-query";
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js
|
|
14
14
|
var f = 250;
|
|
15
|
-
function p({ enabled: e, ...
|
|
16
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l,
|
|
15
|
+
function p({ enabled: e, ...r } = {}) {
|
|
16
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: u } = i(), f = !!(s && c) && (e === !0 || e === void 0), p = t({
|
|
17
17
|
client: o,
|
|
18
18
|
headers: a(s),
|
|
19
|
-
query:
|
|
19
|
+
query: r
|
|
20
20
|
});
|
|
21
21
|
return d({
|
|
22
|
-
...
|
|
22
|
+
...n(p, {
|
|
23
23
|
authEpoch: l,
|
|
24
|
-
|
|
24
|
+
organizationStatus: u
|
|
25
25
|
}),
|
|
26
26
|
enabled: f
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
function m({ enabled:
|
|
30
|
-
let { client:
|
|
31
|
-
client:
|
|
32
|
-
headers:
|
|
29
|
+
function m({ enabled: n } = {}) {
|
|
30
|
+
let { client: d, organizationId: p, widgetToken: m, authEpoch: h, organizationStatus: g } = i(), _ = a(p), v = !!(p && m) && (n === !0 || n === void 0), y = t({
|
|
31
|
+
client: d,
|
|
32
|
+
headers: _,
|
|
33
33
|
query: { limit: f }
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
authEpoch:
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
enabled: y,
|
|
34
|
+
}), b = u({
|
|
35
|
+
...r(y.queryKey, {
|
|
36
|
+
authEpoch: h,
|
|
37
|
+
organizationStatus: g
|
|
38
|
+
}, { suffix: ["all"] }),
|
|
39
|
+
enabled: v,
|
|
41
40
|
initialPageParam: void 0,
|
|
42
41
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
43
42
|
let { data: r } = await e({
|
|
44
|
-
client:
|
|
45
|
-
headers:
|
|
43
|
+
client: d,
|
|
44
|
+
headers: _,
|
|
46
45
|
query: {
|
|
47
46
|
limit: f,
|
|
48
47
|
...n ? { pagination_token: n } : {}
|
|
@@ -54,18 +53,18 @@ function m({ enabled: d } = {}) {
|
|
|
54
53
|
},
|
|
55
54
|
getNextPageParam: o
|
|
56
55
|
});
|
|
57
|
-
c(
|
|
58
|
-
let
|
|
59
|
-
if (
|
|
60
|
-
data:
|
|
56
|
+
c(b, v);
|
|
57
|
+
let x = l(() => {
|
|
58
|
+
if (b.data) return {
|
|
59
|
+
data: b.data.pages.flatMap((e) => e.data ?? []),
|
|
61
60
|
next_pagination_token: void 0,
|
|
62
61
|
prev_pagination_token: void 0
|
|
63
62
|
};
|
|
64
|
-
}, [
|
|
63
|
+
}, [b.data]);
|
|
65
64
|
return {
|
|
66
|
-
...
|
|
67
|
-
data:
|
|
68
|
-
isResolving: s(
|
|
65
|
+
...b,
|
|
66
|
+
data: x,
|
|
67
|
+
isResolving: s(b)
|
|
69
68
|
};
|
|
70
69
|
}
|
|
71
70
|
//#endregion
|
|
@@ -9,14 +9,14 @@ import { organizationHeaders as r } from "../organizationHeaders.js";
|
|
|
9
9
|
import { useQuery as i } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js
|
|
11
11
|
function a({ enabled: a } = {}) {
|
|
12
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l,
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: u } = n(), d = !!(s && c) && (a === !0 || a === void 0), f = e({
|
|
13
13
|
client: o,
|
|
14
14
|
headers: r(s)
|
|
15
15
|
});
|
|
16
16
|
return i({
|
|
17
17
|
...t(f, {
|
|
18
18
|
authEpoch: l,
|
|
19
|
-
|
|
19
|
+
organizationStatus: u
|
|
20
20
|
}),
|
|
21
21
|
enabled: d
|
|
22
22
|
});
|
|
@@ -4,33 +4,32 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { listRoles as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { listRolesOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPageParam as
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useInfiniteQuery as
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPageParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../allPages.js";
|
|
11
|
+
import { useMemo as c } from "react";
|
|
12
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
19
|
-
query: { limit:
|
|
20
|
-
}),
|
|
21
|
-
|
|
22
|
-
authEpoch:
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
enabled: y,
|
|
14
|
+
var u = 100;
|
|
15
|
+
function d({ enabled: d } = {}) {
|
|
16
|
+
let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationStatus: g } = r(), _ = i(p), v = !!(p && m) && (d === !0 || d === void 0), y = t({
|
|
17
|
+
client: f,
|
|
18
|
+
headers: _,
|
|
19
|
+
query: { limit: u }
|
|
20
|
+
}), b = l({
|
|
21
|
+
...n(y.queryKey, {
|
|
22
|
+
authEpoch: h,
|
|
23
|
+
organizationStatus: g
|
|
24
|
+
}, { suffix: ["all"] }),
|
|
25
|
+
enabled: v,
|
|
27
26
|
initialPageParam: void 0,
|
|
28
27
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
29
28
|
let { data: r } = await e({
|
|
30
|
-
client:
|
|
31
|
-
headers:
|
|
29
|
+
client: f,
|
|
30
|
+
headers: _,
|
|
32
31
|
query: {
|
|
33
|
-
limit:
|
|
32
|
+
limit: u,
|
|
34
33
|
...n ? { paginationToken: n } : {}
|
|
35
34
|
},
|
|
36
35
|
signal: t,
|
|
@@ -38,21 +37,21 @@ function f({ enabled: f } = {}) {
|
|
|
38
37
|
});
|
|
39
38
|
return r;
|
|
40
39
|
},
|
|
41
|
-
getNextPageParam:
|
|
40
|
+
getNextPageParam: a
|
|
42
41
|
});
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
46
|
-
data:
|
|
42
|
+
s(b, v);
|
|
43
|
+
let x = c(() => {
|
|
44
|
+
if (b.data) return {
|
|
45
|
+
data: b.data.pages.flatMap((e) => e.data ?? []),
|
|
47
46
|
nextPaginationToken: null,
|
|
48
47
|
prevPaginationToken: null
|
|
49
48
|
};
|
|
50
|
-
}, [
|
|
49
|
+
}, [b.data]);
|
|
51
50
|
return {
|
|
52
|
-
...
|
|
53
|
-
data:
|
|
54
|
-
isResolving:
|
|
51
|
+
...b,
|
|
52
|
+
data: x,
|
|
53
|
+
isResolving: o(b)
|
|
55
54
|
};
|
|
56
55
|
}
|
|
57
56
|
//#endregion
|
|
58
|
-
export {
|
|
57
|
+
export { d as useAllOrganizationRolesQuery };
|
|
@@ -10,14 +10,14 @@ import { useCallback as i, useMemo as a, useRef as o } from "react";
|
|
|
10
10
|
import { useQueries as s } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js
|
|
12
12
|
function c({ roleIds: c, enabled: l }) {
|
|
13
|
-
let { client: u, organizationId: d, widgetToken: f, authEpoch: p,
|
|
13
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationStatus: m } = n(), h = r(d), g = !!(d && f) && (l === !0 || l === void 0), _ = a(() => [...new Set(c)].sort(), [c]), v = s({ queries: _.map((n) => ({
|
|
14
14
|
...t(e({
|
|
15
15
|
client: u,
|
|
16
16
|
headers: h,
|
|
17
17
|
path: { roleId: n }
|
|
18
18
|
}), {
|
|
19
19
|
authEpoch: p,
|
|
20
|
-
|
|
20
|
+
organizationStatus: m
|
|
21
21
|
}),
|
|
22
22
|
enabled: g
|
|
23
23
|
})) }), y = o(v);
|
|
@@ -9,14 +9,14 @@ import { organizationHeaders as r } from "./organizationHeaders.js";
|
|
|
9
9
|
import { useQuery as i } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js
|
|
11
11
|
function a({ enabled: a } = {}) {
|
|
12
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l,
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: u } = n(), d = !!(s && c) && (a === !0 || a === void 0);
|
|
13
13
|
return i({
|
|
14
14
|
...t(e({
|
|
15
15
|
client: o,
|
|
16
16
|
headers: r(s)
|
|
17
17
|
}), {
|
|
18
18
|
authEpoch: l,
|
|
19
|
-
|
|
19
|
+
organizationStatus: u
|
|
20
20
|
}),
|
|
21
21
|
enabled: d,
|
|
22
22
|
staleTime: Infinity,
|
|
@@ -9,12 +9,12 @@ import { isUserDataNotFoundError as r } from "./isUserDataNotFoundError.js";
|
|
|
9
9
|
import { useQuery as i } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js
|
|
11
11
|
function a({ key: a, enabled: o, defaultWhenNotFound: s }) {
|
|
12
|
-
let { client: c, widgetToken: l, authEpoch: u,
|
|
12
|
+
let { client: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(l && a) && o !== !1, p = e({
|
|
13
13
|
client: c,
|
|
14
14
|
path: { key: a }
|
|
15
15
|
}), m = p.queryFn, h = t(p, {
|
|
16
16
|
authEpoch: u,
|
|
17
|
-
|
|
17
|
+
organizationStatus: d
|
|
18
18
|
});
|
|
19
19
|
return i(s !== void 0 && m ? {
|
|
20
20
|
...h,
|
package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js
CHANGED
|
@@ -9,13 +9,13 @@ import { organizationHeaders as r } from "./organizationHeaders.js";
|
|
|
9
9
|
import { useQuery as i } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js
|
|
11
11
|
function a({ relatedObjectType: a, enabled: o }) {
|
|
12
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u,
|
|
12
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l) && (o === !0 || o === void 0), p = i({
|
|
13
13
|
...t(e({
|
|
14
14
|
client: s,
|
|
15
15
|
headers: r(c)
|
|
16
16
|
}), {
|
|
17
17
|
authEpoch: u,
|
|
18
|
-
|
|
18
|
+
organizationStatus: d
|
|
19
19
|
}),
|
|
20
20
|
enabled: f
|
|
21
21
|
});
|
package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js
CHANGED
|
@@ -9,14 +9,14 @@ import { organizationHeaders as r } from "./organizationHeaders.js";
|
|
|
9
9
|
import { useQuery as i } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js
|
|
11
11
|
function a({ enabled: a } = {}) {
|
|
12
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l,
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: u } = n(), d = !!(s && c) && (a === !0 || a === void 0), f = e({
|
|
13
13
|
client: o,
|
|
14
14
|
headers: r(s)
|
|
15
15
|
});
|
|
16
16
|
return i({
|
|
17
17
|
...t(f, {
|
|
18
18
|
authEpoch: l,
|
|
19
|
-
|
|
19
|
+
organizationStatus: u
|
|
20
20
|
}),
|
|
21
21
|
enabled: d
|
|
22
22
|
});
|
|
@@ -4,39 +4,38 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getUsers as e } from "../rest/sdk.gen.js";
|
|
6
6
|
import { getUsersOptions as t } from "../rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useEmbedApi as
|
|
9
|
-
import { organizationHeaders as
|
|
10
|
-
import { getAllPagesNextPageParam as
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useInfiniteQuery as
|
|
7
|
+
import { withAuthEpochInfinite as n } from "../withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPageParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../allPages.js";
|
|
11
|
+
import { useMemo as c } from "react";
|
|
12
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
14
|
+
var u = 100;
|
|
15
|
+
function d({ enabled: d, permissions: f } = {}) {
|
|
16
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g, organizationStatus: _ } = r(), v = i(m), y = !!(m && h) && (d === !0 || d === void 0), b = f?.length ? { Permissions: f } : {}, x = t({
|
|
17
|
+
client: p,
|
|
18
|
+
headers: v,
|
|
19
19
|
query: {
|
|
20
20
|
Status: "ACTIVE",
|
|
21
|
-
Limit:
|
|
22
|
-
...
|
|
21
|
+
Limit: u,
|
|
22
|
+
...b
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
authEpoch:
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
enabled: b,
|
|
24
|
+
}), S = l({
|
|
25
|
+
...n(x.queryKey, {
|
|
26
|
+
authEpoch: g,
|
|
27
|
+
organizationStatus: _
|
|
28
|
+
}, { suffix: ["all"] }),
|
|
29
|
+
enabled: y,
|
|
31
30
|
initialPageParam: void 0,
|
|
32
31
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
33
32
|
let { data: r } = await e({
|
|
34
|
-
client:
|
|
35
|
-
headers:
|
|
33
|
+
client: p,
|
|
34
|
+
headers: v,
|
|
36
35
|
query: {
|
|
37
36
|
Status: "ACTIVE",
|
|
38
|
-
Limit:
|
|
39
|
-
...
|
|
37
|
+
Limit: u,
|
|
38
|
+
...b,
|
|
40
39
|
...n ? { PaginationToken: n } : {}
|
|
41
40
|
},
|
|
42
41
|
signal: t,
|
|
@@ -44,21 +43,21 @@ function f({ enabled: f, permissions: p } = {}) {
|
|
|
44
43
|
});
|
|
45
44
|
return r;
|
|
46
45
|
},
|
|
47
|
-
getNextPageParam:
|
|
46
|
+
getNextPageParam: a
|
|
48
47
|
});
|
|
49
|
-
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
52
|
-
data:
|
|
48
|
+
s(S, y);
|
|
49
|
+
let C = c(() => {
|
|
50
|
+
if (S.data) return {
|
|
51
|
+
data: S.data.pages.flatMap((e) => e.data ?? []),
|
|
53
52
|
nextPaginationToken: null,
|
|
54
53
|
prevPaginationToken: null
|
|
55
54
|
};
|
|
56
|
-
}, [
|
|
55
|
+
}, [S.data]);
|
|
57
56
|
return {
|
|
58
|
-
...
|
|
59
|
-
data:
|
|
60
|
-
isResolving:
|
|
57
|
+
...S,
|
|
58
|
+
data: C,
|
|
59
|
+
isResolving: o(S)
|
|
61
60
|
};
|
|
62
61
|
}
|
|
63
62
|
//#endregion
|
|
64
|
-
export {
|
|
63
|
+
export { d as useAllOrganizationUsersQuery };
|