@tesouro/embedded-components-react 0.5.115 → 0.5.117
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/index.css +3 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index10.js +25 -31
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index11.js +41 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index4.js +6 -15
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index5.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index6.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index7.js +14 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index8.js +43 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index9.js +3 -31
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +20 -23
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +20 -23
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index5.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index3.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index4.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +168 -168
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +44 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +81 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +31 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index10.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index11.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index2.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index4.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index9.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index3.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index5.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index6.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +22 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +87 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +44 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +36 -36
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index2.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index2.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/data-access/dist/index2.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/data-access/dist/index3.js +22 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index4.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index6.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index7.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index8.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index15.js +59 -59
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index19.js +41 -41
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index2.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index23.js +41 -41
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index3.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index4.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index5.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index6.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index7.js +73 -73
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index8.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index9.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +61 -61
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/queryKeys.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index2.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +63 -63
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +44 -44
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +35 -34
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js +22 -21
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useUpsertUserDataMutation.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/widgetTokenCacheId.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index2.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +14 -14
- 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 +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index11.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index12.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index6.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index7.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index8.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index3.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index7.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index8.js +11 -11
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index7.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { bulkUpdateDepartmentMembers as e, bulkUpdateLocationMembers as t, bulkUpdateRoleMembers as n, createUser as r, manageBankAccountAccess as i, updateUser as a } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getDepartmentQueryKey as o, getLocationQueryKey as s } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { invalidateAllClients as c } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
8
|
+
import { useEmbedApi as l } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as u } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
10
|
import "../../../../shared/data-access/dist/index.js";
|
|
11
11
|
import { teamMembersInvalidationKey as d } from "./index2.js";
|
|
12
12
|
import { accountAccessInvalidationKeyForSource as f } from "./index3.js";
|
|
@@ -18,88 +18,88 @@ import { useMutation as g } from "@tanstack/react-query";
|
|
|
18
18
|
function _(e) {
|
|
19
19
|
return e.map((e) => `${e.source}:${e.bankAccountId}`).sort().join(",");
|
|
20
20
|
}
|
|
21
|
-
async function v({ client:
|
|
22
|
-
let
|
|
21
|
+
async function v({ client: e, organizationId: t, departmentIds: n, locationIds: r, grantedBankAccounts: i = [] }) {
|
|
22
|
+
let a = u(t);
|
|
23
23
|
await Promise.all([
|
|
24
|
-
|
|
25
|
-
client:
|
|
26
|
-
organizationId:
|
|
24
|
+
c(d({
|
|
25
|
+
client: e,
|
|
26
|
+
organizationId: t
|
|
27
27
|
})),
|
|
28
|
-
|
|
29
|
-
client:
|
|
30
|
-
organizationId:
|
|
28
|
+
c(p({
|
|
29
|
+
client: e,
|
|
30
|
+
organizationId: t
|
|
31
31
|
})),
|
|
32
|
-
|
|
33
|
-
client:
|
|
34
|
-
organizationId:
|
|
32
|
+
c(m({
|
|
33
|
+
client: e,
|
|
34
|
+
organizationId: t
|
|
35
35
|
})),
|
|
36
|
-
...
|
|
37
|
-
client:
|
|
38
|
-
path: { departmentId:
|
|
39
|
-
headers:
|
|
36
|
+
...n.map((t) => c(o({
|
|
37
|
+
client: e,
|
|
38
|
+
path: { departmentId: t },
|
|
39
|
+
headers: a
|
|
40
40
|
}))),
|
|
41
|
-
...
|
|
42
|
-
client:
|
|
43
|
-
path: { locationId:
|
|
44
|
-
headers:
|
|
41
|
+
...r.map((t) => c(s({
|
|
42
|
+
client: e,
|
|
43
|
+
path: { locationId: t },
|
|
44
|
+
headers: a
|
|
45
45
|
}))),
|
|
46
|
-
...
|
|
47
|
-
client:
|
|
48
|
-
organizationId:
|
|
46
|
+
...i.map((n) => c(f({
|
|
47
|
+
client: e,
|
|
48
|
+
organizationId: t,
|
|
49
49
|
bankAccountId: n.bankAccountId,
|
|
50
50
|
source: n.source
|
|
51
51
|
})))
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
54
|
function y() {
|
|
55
|
-
let { client:
|
|
56
|
-
return g({ mutationFn: async ({ body:
|
|
57
|
-
let h = d.current?.email ===
|
|
55
|
+
let { client: o, organizationId: s } = l(), c = u(s), d = h(void 0);
|
|
56
|
+
return g({ mutationFn: async ({ body: l, roleId: u, departmentId: f, locationId: p, bankAccountAccess: m = [] }) => {
|
|
57
|
+
let h = d.current?.email === l.email ? d.current : void 0, g = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set(), b = [];
|
|
58
58
|
try {
|
|
59
59
|
if (!h) {
|
|
60
|
-
let { data:
|
|
61
|
-
client:
|
|
62
|
-
headers:
|
|
63
|
-
body:
|
|
60
|
+
let { data: e } = await r({
|
|
61
|
+
client: o,
|
|
62
|
+
headers: c,
|
|
63
|
+
body: l,
|
|
64
64
|
throwOnError: !0
|
|
65
65
|
});
|
|
66
66
|
h = {
|
|
67
|
-
email:
|
|
68
|
-
user:
|
|
69
|
-
createdReportingManagerUserId:
|
|
67
|
+
email: l.email,
|
|
68
|
+
user: e,
|
|
69
|
+
createdReportingManagerUserId: l.reportingManagerUserId ?? null
|
|
70
70
|
}, d.current = h;
|
|
71
71
|
}
|
|
72
|
-
let x = [h.user.id], S =
|
|
73
|
-
if (h.createdReportingManagerUserId !== S && (await
|
|
74
|
-
client:
|
|
75
|
-
headers:
|
|
72
|
+
let x = [h.user.id], S = l.reportingManagerUserId ?? null;
|
|
73
|
+
if (h.createdReportingManagerUserId !== S && (await a({
|
|
74
|
+
client: o,
|
|
75
|
+
headers: c,
|
|
76
76
|
path: { id: h.user.id },
|
|
77
77
|
body: { reportingManagerUserId: S },
|
|
78
78
|
throwOnError: !0
|
|
79
|
-
}), h.createdReportingManagerUserId = S), h.assignedRoleId !==
|
|
80
|
-
client:
|
|
81
|
-
headers:
|
|
79
|
+
}), h.createdReportingManagerUserId = S), h.assignedRoleId !== u && (h.assignedRoleId && (await n({
|
|
80
|
+
client: o,
|
|
81
|
+
headers: c,
|
|
82
82
|
path: { roleId: h.assignedRoleId },
|
|
83
83
|
body: {
|
|
84
84
|
type: "REMOVE",
|
|
85
85
|
userIds: x
|
|
86
86
|
},
|
|
87
87
|
throwOnError: !0
|
|
88
|
-
}), h.assignedRoleId = void 0), await
|
|
89
|
-
client:
|
|
90
|
-
headers:
|
|
91
|
-
path: { roleId:
|
|
88
|
+
}), h.assignedRoleId = void 0), await n({
|
|
89
|
+
client: o,
|
|
90
|
+
headers: c,
|
|
91
|
+
path: { roleId: u },
|
|
92
92
|
body: {
|
|
93
93
|
type: "ASSIGN",
|
|
94
94
|
userIds: x
|
|
95
95
|
},
|
|
96
96
|
throwOnError: !0
|
|
97
|
-
}), h.assignedRoleId =
|
|
97
|
+
}), h.assignedRoleId = u), h.assignedDepartmentId !== (f || void 0)) {
|
|
98
98
|
if (h.assignedDepartmentId) {
|
|
99
99
|
let t = h.assignedDepartmentId;
|
|
100
|
-
await
|
|
101
|
-
client:
|
|
102
|
-
headers:
|
|
100
|
+
await e({
|
|
101
|
+
client: o,
|
|
102
|
+
headers: c,
|
|
103
103
|
path: { departmentId: t },
|
|
104
104
|
body: {
|
|
105
105
|
type: "REMOVE",
|
|
@@ -108,9 +108,9 @@ function y() {
|
|
|
108
108
|
throwOnError: !0
|
|
109
109
|
}), g.add(t), h.assignedDepartmentId = void 0;
|
|
110
110
|
}
|
|
111
|
-
f && (await
|
|
112
|
-
client:
|
|
113
|
-
headers:
|
|
111
|
+
f && (await e({
|
|
112
|
+
client: o,
|
|
113
|
+
headers: c,
|
|
114
114
|
path: { departmentId: f },
|
|
115
115
|
body: {
|
|
116
116
|
type: "ASSIGN",
|
|
@@ -121,21 +121,21 @@ function y() {
|
|
|
121
121
|
}
|
|
122
122
|
if (h.assignedLocationId !== (p || void 0)) {
|
|
123
123
|
if (h.assignedLocationId) {
|
|
124
|
-
let
|
|
125
|
-
await
|
|
126
|
-
client:
|
|
127
|
-
headers:
|
|
128
|
-
path: { locationId:
|
|
124
|
+
let e = h.assignedLocationId;
|
|
125
|
+
await t({
|
|
126
|
+
client: o,
|
|
127
|
+
headers: c,
|
|
128
|
+
path: { locationId: e },
|
|
129
129
|
body: {
|
|
130
130
|
type: "REMOVE",
|
|
131
131
|
userIds: x
|
|
132
132
|
},
|
|
133
133
|
throwOnError: !0
|
|
134
|
-
}), y.add(
|
|
134
|
+
}), y.add(e), h.assignedLocationId = void 0;
|
|
135
135
|
}
|
|
136
|
-
p && (await
|
|
137
|
-
client:
|
|
138
|
-
headers:
|
|
136
|
+
p && (await t({
|
|
137
|
+
client: o,
|
|
138
|
+
headers: c,
|
|
139
139
|
path: { locationId: p },
|
|
140
140
|
body: {
|
|
141
141
|
type: "ASSIGN",
|
|
@@ -145,9 +145,9 @@ function y() {
|
|
|
145
145
|
}), y.add(p), h.assignedLocationId = p);
|
|
146
146
|
}
|
|
147
147
|
let C = _(m);
|
|
148
|
-
return m.length > 0 && h.grantedBankAccountAccessSignature !== C && (await
|
|
149
|
-
client:
|
|
150
|
-
headers:
|
|
148
|
+
return m.length > 0 && h.grantedBankAccountAccessSignature !== C && (await i({
|
|
149
|
+
client: o,
|
|
150
|
+
headers: c,
|
|
151
151
|
body: {
|
|
152
152
|
type: "GRANT",
|
|
153
153
|
userIds: x,
|
|
@@ -155,20 +155,20 @@ function y() {
|
|
|
155
155
|
},
|
|
156
156
|
throwOnError: !0
|
|
157
157
|
}), b.push(...m), h.grantedBankAccountAccessSignature = C), await v({
|
|
158
|
-
client:
|
|
159
|
-
organizationId:
|
|
158
|
+
client: o,
|
|
159
|
+
organizationId: s,
|
|
160
160
|
departmentIds: [...g],
|
|
161
161
|
locationIds: [...y],
|
|
162
162
|
grantedBankAccounts: b
|
|
163
163
|
}), d.current = void 0, h.user;
|
|
164
|
-
} catch (
|
|
164
|
+
} catch (e) {
|
|
165
165
|
throw h && await v({
|
|
166
|
-
client:
|
|
167
|
-
organizationId:
|
|
166
|
+
client: o,
|
|
167
|
+
organizationId: s,
|
|
168
168
|
departmentIds: [...g],
|
|
169
169
|
locationIds: [...y],
|
|
170
170
|
grantedBankAccounts: b
|
|
171
|
-
}),
|
|
171
|
+
}), e;
|
|
172
172
|
}
|
|
173
173
|
} });
|
|
174
174
|
}
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index8.js
CHANGED
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { createUser as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
10
|
import { teamMembersInvalidationKey as i } from "./index2.js";
|
|
11
11
|
import { useMutation as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index8.js
|
|
13
13
|
function o() {
|
|
14
|
-
let { client: o, organizationId: s } =
|
|
14
|
+
let { client: o, organizationId: s } = n(), c = r(s);
|
|
15
15
|
return a({
|
|
16
|
-
mutationFn: async ({ name:
|
|
17
|
-
await
|
|
16
|
+
mutationFn: async ({ name: t, email: n, redirectUri: r }) => {
|
|
17
|
+
await e({
|
|
18
18
|
client: o,
|
|
19
19
|
headers: c,
|
|
20
20
|
body: {
|
|
21
|
-
name:
|
|
22
|
-
email:
|
|
21
|
+
name: t,
|
|
22
|
+
email: n,
|
|
23
23
|
status: "INVITED",
|
|
24
24
|
permissionIds: [],
|
|
25
|
-
redirectUri:
|
|
25
|
+
redirectUri: r
|
|
26
26
|
},
|
|
27
27
|
throwOnError: !0
|
|
28
28
|
});
|
|
29
29
|
},
|
|
30
30
|
onSuccess: async () => {
|
|
31
|
-
await
|
|
31
|
+
await t(i({
|
|
32
32
|
client: o,
|
|
33
33
|
organizationId: s
|
|
34
34
|
}));
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index9.js
CHANGED
|
@@ -2,56 +2,56 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { manageBankAccountAccess as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
10
|
import { accountAccessInvalidationKeyForSource as i } from "./index3.js";
|
|
11
11
|
import { useMutation as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index9.js
|
|
13
|
-
async function o({ client:
|
|
14
|
-
await Promise.all(r.map((r) =>
|
|
15
|
-
client:
|
|
13
|
+
async function o({ client: e, organizationId: n, accounts: r }) {
|
|
14
|
+
await Promise.all(r.map((r) => t(i({
|
|
15
|
+
client: e,
|
|
16
16
|
organizationId: n,
|
|
17
17
|
bankAccountId: r.bankAccountId,
|
|
18
18
|
source: r.source
|
|
19
19
|
}))));
|
|
20
20
|
}
|
|
21
21
|
function s() {
|
|
22
|
-
let { client:
|
|
23
|
-
return a({ mutationFn: async ({ userIds:
|
|
22
|
+
let { client: t, organizationId: i } = n(), s = r(i);
|
|
23
|
+
return a({ mutationFn: async ({ userIds: n, grant: r, revoke: a }) => {
|
|
24
24
|
let c = [];
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
client:
|
|
26
|
+
n.length > 0 && r.length > 0 && (await e({
|
|
27
|
+
client: t,
|
|
28
28
|
headers: s,
|
|
29
29
|
body: {
|
|
30
30
|
type: "GRANT",
|
|
31
|
-
userIds:
|
|
32
|
-
bankAccounts:
|
|
31
|
+
userIds: n,
|
|
32
|
+
bankAccounts: r
|
|
33
33
|
},
|
|
34
34
|
throwOnError: !0
|
|
35
|
-
}), c.push(...
|
|
36
|
-
client:
|
|
35
|
+
}), c.push(...r)), n.length > 0 && a.length > 0 && (await e({
|
|
36
|
+
client: t,
|
|
37
37
|
headers: s,
|
|
38
38
|
body: {
|
|
39
39
|
type: "REVOKE",
|
|
40
|
-
userIds:
|
|
40
|
+
userIds: n,
|
|
41
41
|
bankAccounts: a
|
|
42
42
|
},
|
|
43
43
|
throwOnError: !0
|
|
44
44
|
}), c.push(...a)), await o({
|
|
45
|
-
client:
|
|
45
|
+
client: t,
|
|
46
46
|
organizationId: i,
|
|
47
47
|
accounts: c
|
|
48
48
|
});
|
|
49
|
-
} catch (
|
|
49
|
+
} catch (e) {
|
|
50
50
|
throw c.length > 0 && await o({
|
|
51
|
-
client:
|
|
51
|
+
client: t,
|
|
52
52
|
organizationId: i,
|
|
53
53
|
accounts: c
|
|
54
|
-
}),
|
|
54
|
+
}), e;
|
|
55
55
|
}
|
|
56
56
|
} });
|
|
57
57
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { getApprovalPolicies as e } from "../../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { deleteApprovalPoliciesIdMutation as t, getApprovalPoliciesOptions as n, patchApprovalPoliciesIdMutation as r, postApprovalPoliciesMutation as i } from "../../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as a } from "../../../../data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { invalidateAllClients as o, setAllClientsQueriesData as s } from "../../../../data-access/dist/lib/clientRegistry.js";
|
|
9
|
+
import { useEmbedApi as c } from "../../../../data-access/dist/lib/EmbedApiContext.js";
|
|
10
10
|
import { getAllPagesNextPaginationTokenParam as l, isAllPagesResolving as u, useAutoFetchNextPage as d } from "../../../../data-access/dist/lib/allPages.js";
|
|
11
11
|
import "../../../../data-access/dist/index.js";
|
|
12
12
|
import { ApprovalPolicyObjectType as f, approvalPoliciesInvalidationKey as p } from "./queryKeys.js";
|
|
@@ -14,9 +14,9 @@ import { useMemo as m } from "react";
|
|
|
14
14
|
import { useInfiniteQuery as h, useMutation as g, useQueryClient as _ } from "@tanstack/react-query";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js
|
|
16
16
|
var v = 100;
|
|
17
|
-
function y(e,
|
|
18
|
-
let
|
|
19
|
-
e.setQueriesData({ queryKey:
|
|
17
|
+
function y(e, t, n) {
|
|
18
|
+
let r = (e) => e && n(e);
|
|
19
|
+
e.setQueriesData({ queryKey: t }, r), s(t, r);
|
|
20
20
|
}
|
|
21
21
|
function b(e, t) {
|
|
22
22
|
return {
|
|
@@ -27,27 +27,27 @@ function b(e, t) {
|
|
|
27
27
|
}))
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function x({ objectType:
|
|
31
|
-
let { client: i, organizationId: o, widgetToken: s, authEpoch: p } =
|
|
30
|
+
function x({ objectType: t = f.Payable, enabled: r = !0 } = {}) {
|
|
31
|
+
let { client: i, organizationId: o, widgetToken: s, authEpoch: p } = c(), g = o, _ = !!(g && s) && r, y = { "x-organization-id": g ?? "" }, b = { object_type: t }, x = n({
|
|
32
32
|
client: i,
|
|
33
33
|
headers: y,
|
|
34
34
|
query: b
|
|
35
35
|
}), S = h({
|
|
36
|
-
queryKey: [...
|
|
36
|
+
queryKey: [...a(x, p).queryKey, "all"],
|
|
37
37
|
enabled: _,
|
|
38
38
|
initialPageParam: void 0,
|
|
39
|
-
queryFn: async ({ signal:
|
|
40
|
-
let { data:
|
|
39
|
+
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
40
|
+
let { data: r } = await e({
|
|
41
41
|
client: i,
|
|
42
42
|
headers: y,
|
|
43
|
-
query:
|
|
43
|
+
query: n ? { pagination_token: n } : {
|
|
44
44
|
...b,
|
|
45
45
|
limit: v
|
|
46
46
|
},
|
|
47
|
-
signal:
|
|
47
|
+
signal: t,
|
|
48
48
|
throwOnError: !0
|
|
49
49
|
});
|
|
50
|
-
return
|
|
50
|
+
return r;
|
|
51
51
|
},
|
|
52
52
|
getNextPageParam: l
|
|
53
53
|
});
|
|
@@ -59,72 +59,72 @@ function x({ objectType: e = f.Payable, enabled: t = !0 } = {}) {
|
|
|
59
59
|
isResolving: u(S)
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function S({ objectType:
|
|
63
|
-
let { client:
|
|
62
|
+
function S({ objectType: e = f.Payable } = {}) {
|
|
63
|
+
let { client: t, organizationId: n } = c(), r = _();
|
|
64
64
|
return g({
|
|
65
|
-
...
|
|
66
|
-
client:
|
|
67
|
-
headers: { "x-organization-id":
|
|
65
|
+
...i({
|
|
66
|
+
client: t,
|
|
67
|
+
headers: { "x-organization-id": n ?? "" }
|
|
68
68
|
}),
|
|
69
|
-
onSuccess: async (
|
|
70
|
-
y(
|
|
71
|
-
client:
|
|
72
|
-
organizationId:
|
|
73
|
-
objectType:
|
|
69
|
+
onSuccess: async (i) => {
|
|
70
|
+
y(r, p({
|
|
71
|
+
client: t,
|
|
72
|
+
organizationId: n,
|
|
73
|
+
objectType: e
|
|
74
74
|
}), (e) => {
|
|
75
|
-
if (e.pages.some((e) => e.data?.some((e) => e.id ===
|
|
75
|
+
if (e.pages.some((e) => e.data?.some((e) => e.id === i.id))) return b(e, (e) => e.map((e) => e.id === i.id ? i : e));
|
|
76
76
|
let t = e.pages.length - 1;
|
|
77
77
|
return t < 0 ? e : {
|
|
78
78
|
...e,
|
|
79
|
-
pages: e.pages.map((e,
|
|
79
|
+
pages: e.pages.map((e, n) => n === t ? {
|
|
80
80
|
...e,
|
|
81
|
-
data: [...e.data ?? [],
|
|
81
|
+
data: [...e.data ?? [], i]
|
|
82
82
|
} : e)
|
|
83
83
|
};
|
|
84
|
-
}), await
|
|
85
|
-
client:
|
|
86
|
-
organizationId:
|
|
87
|
-
objectType:
|
|
84
|
+
}), await o(p({
|
|
85
|
+
client: t,
|
|
86
|
+
organizationId: n,
|
|
87
|
+
objectType: e
|
|
88
88
|
}));
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function C({ objectType:
|
|
93
|
-
let { client:
|
|
92
|
+
function C({ objectType: e = f.Payable } = {}) {
|
|
93
|
+
let { client: t, organizationId: n } = c(), i = _();
|
|
94
94
|
return g({
|
|
95
|
-
...
|
|
96
|
-
client:
|
|
97
|
-
headers: { "x-organization-id":
|
|
95
|
+
...r({
|
|
96
|
+
client: t,
|
|
97
|
+
headers: { "x-organization-id": n ?? "" }
|
|
98
98
|
}),
|
|
99
|
-
onSuccess: async (
|
|
100
|
-
y(
|
|
101
|
-
client:
|
|
102
|
-
organizationId:
|
|
103
|
-
objectType:
|
|
104
|
-
}), (e) => b(e, (e) => e.map((e) => e.id ===
|
|
105
|
-
client:
|
|
106
|
-
organizationId:
|
|
107
|
-
objectType:
|
|
99
|
+
onSuccess: async (r) => {
|
|
100
|
+
y(i, p({
|
|
101
|
+
client: t,
|
|
102
|
+
organizationId: n,
|
|
103
|
+
objectType: e
|
|
104
|
+
}), (e) => b(e, (e) => e.map((e) => e.id === r.id ? r : e))), await o(p({
|
|
105
|
+
client: t,
|
|
106
|
+
organizationId: n,
|
|
107
|
+
objectType: e
|
|
108
108
|
}));
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function w({ objectType:
|
|
113
|
-
let { client:
|
|
112
|
+
function w({ objectType: e = f.Payable } = {}) {
|
|
113
|
+
let { client: n, organizationId: r } = c(), i = _();
|
|
114
114
|
return g({
|
|
115
|
-
...
|
|
116
|
-
client:
|
|
117
|
-
headers: { "x-organization-id":
|
|
115
|
+
...t({
|
|
116
|
+
client: n,
|
|
117
|
+
headers: { "x-organization-id": r ?? "" }
|
|
118
118
|
}),
|
|
119
|
-
onSuccess: async (
|
|
120
|
-
y(
|
|
121
|
-
client:
|
|
122
|
-
organizationId:
|
|
123
|
-
objectType:
|
|
124
|
-
}), (e) => b(e, (e) => e.filter((e) => e.id !==
|
|
125
|
-
client:
|
|
126
|
-
organizationId:
|
|
127
|
-
objectType:
|
|
119
|
+
onSuccess: async (t, a) => {
|
|
120
|
+
y(i, p({
|
|
121
|
+
client: n,
|
|
122
|
+
organizationId: r,
|
|
123
|
+
objectType: e
|
|
124
|
+
}), (e) => b(e, (e) => e.filter((e) => e.id !== a.path.approval_policy_id))), await o(p({
|
|
125
|
+
client: n,
|
|
126
|
+
organizationId: r,
|
|
127
|
+
objectType: e
|
|
128
128
|
}));
|
|
129
129
|
}
|
|
130
130
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getApprovalPoliciesQueryKey as e } from "../../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
+
import { organizationHeaders as t } from "../../../../data-access/dist/lib/organizationHeaders.js";
|
|
3
3
|
import "../../../../data-access/dist/index.js";
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/queryKeys.js
|
|
5
5
|
var n = {
|
|
6
6
|
Payable: "payable",
|
|
7
7
|
Transaction: "transaction"
|
|
8
|
-
}, r = ({ client: r, organizationId: i, objectType: a }) =>
|
|
8
|
+
}, r = ({ client: r, organizationId: i, objectType: a }) => e({
|
|
9
9
|
client: r,
|
|
10
|
-
headers:
|
|
10
|
+
headers: t(i),
|
|
11
11
|
query: { object_type: a ?? n.Payable }
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getCounterpartsIdAddressesQueryKey as e, getCounterpartsIdBankAccountsQueryKey as t, getCounterpartsIdQueryKey as n, getCounterpartsQueryKey as r } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
+
import { organizationHeaders as i } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
3
3
|
import "../../../data-access/dist/index.js";
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index2.js
|
|
5
|
-
var a = ({ client:
|
|
5
|
+
var a = ({ client: e, organizationId: t }) => r({
|
|
6
|
+
client: e,
|
|
7
|
+
headers: i(t)
|
|
8
|
+
}), o = ({ client: e, organizationId: t, counterpartId: r }) => n({
|
|
9
|
+
client: e,
|
|
10
|
+
headers: i(t),
|
|
11
|
+
path: { counterpart_id: r }
|
|
12
|
+
}), s = ({ client: e, organizationId: n, counterpartId: r }) => t({
|
|
13
|
+
client: e,
|
|
14
|
+
headers: i(n),
|
|
15
|
+
path: { counterpart_id: r }
|
|
16
|
+
}), c = ({ client: t, organizationId: n, counterpartId: r }) => e({
|
|
6
17
|
client: t,
|
|
7
|
-
headers:
|
|
8
|
-
|
|
9
|
-
client: t,
|
|
10
|
-
headers: e(n),
|
|
11
|
-
path: { counterpart_id: i }
|
|
12
|
-
}), s = ({ client: t, organizationId: r, counterpartId: i }) => n({
|
|
13
|
-
client: t,
|
|
14
|
-
headers: e(r),
|
|
15
|
-
path: { counterpart_id: i }
|
|
16
|
-
}), c = ({ client: n, organizationId: r, counterpartId: i }) => t({
|
|
17
|
-
client: n,
|
|
18
|
-
headers: e(r),
|
|
19
|
-
path: { counterpart_id: i }
|
|
18
|
+
headers: i(n),
|
|
19
|
+
path: { counterpart_id: r }
|
|
20
20
|
});
|
|
21
21
|
//#endregion
|
|
22
22
|
export { c as counterpartAddressesInvalidationKey, s as counterpartBankAccountsInvalidationKey, o as counterpartInvalidationKey, a as counterpartsInvalidationKey };
|