@tesouro/embedded-components-react 0.3.35 → 0.3.37

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.
Files changed (23) hide show
  1. package/README.md +10 -10
  2. package/dist/index.d.ts +15 -0
  3. package/dist/lib/CardDetailsWidget.d.ts +15 -0
  4. package/dist/lib/CardsWidget.d.ts +15 -0
  5. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +33 -31
  6. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index6.js +5 -9
  7. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +98 -92
  8. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index.js +3 -2
  9. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index5.js +16 -9
  10. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +25 -0
  11. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index3.js +21 -2
  12. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index4.js +9 -2
  13. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index5.js +1 -0
  14. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +115 -59
  15. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +21 -19
  16. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/apiErrorStatus.js +26 -0
  17. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isApiForbiddenError.js +7 -0
  18. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isApiNotFoundError.js +4 -23
  19. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isUserDataNotFoundError.js +7 -6
  20. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +177 -166
  21. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +139 -127
  22. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  23. package/package.json +1 -1
@@ -14,7 +14,14 @@ function i(t) {
14
14
  function a({ programValidity: e, isNotFound: t, isError: n, hasCard: i }) {
15
15
  return e === r.Supported ? t ? "notFound" : i ? "loaded" : n ? "error" : "loading" : "error";
16
16
  }
17
- function o({ card: e, cardProgram: r, labels: i }) {
17
+ var o = "PENDING_ACTIVATION";
18
+ function s({ panelState: t, cardProgram: n, cardStatus: r }) {
19
+ return t !== "loaded" || n !== e.Debit || r === void 0 ? !1 : r !== o;
20
+ }
21
+ function c({ isRevealRequested: e, isError: t, hasCredentials: n }) {
22
+ return e ? t ? "errored" : n ? "revealed" : "revealing" : "hidden";
23
+ }
24
+ function l({ card: e, cardProgram: r, labels: i }) {
18
25
  let a = e.cardholderName.trim(), o = e.nickname?.trim();
19
26
  return {
20
27
  statusLabel: i.statusLabels[e.cardStatus],
@@ -27,4 +34,4 @@ function o({ card: e, cardProgram: r, labels: i }) {
27
34
  };
28
35
  }
29
36
  //#endregion
30
- export { r as CardProgramValidity, a as resolveCardDetailsPanelState, o as resolveCardDetailsPresentation, i as resolveCardProgramValidity };
37
+ export { r as CardProgramValidity, s as resolveCanRevealCredentials, a as resolveCardDetailsPanelState, l as resolveCardDetailsPresentation, c as resolveCardDetailsRevealState, i as resolveCardProgramValidity };
@@ -4,6 +4,7 @@ import "../../../shared/feature/dist/index.js";
4
4
  //#region ../../libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index5.js
5
5
  var r = {
6
6
  copySuccessToast: "Copied to clipboard",
7
+ revealNotPermittedDescription: "This card's details can't be shown for this session.",
7
8
  programLabels: {
8
9
  [e.Credit]: "Business credit",
9
10
  [e.Debit]: "Business debit"
@@ -12,79 +12,135 @@ import { CardProgram as o } from "../../../shared/feature/dist/lib/card/cardProg
12
12
  import "../../../shared/feature/dist/index.js";
13
13
  import { resolveCardDetailsFeatureLabels as s } from "./index5.js";
14
14
  import { CardDetailsWidgetAnalyticsEvent as c, WIDGET_NAME as l } from "./index2.js";
15
- import { copyTextToClipboard as u } from "./index3.js";
16
- import { CardProgramValidity as d, resolveCardDetailsPanelState as f, resolveCardDetailsPresentation as p, resolveCardProgramValidity as m } from "./index4.js";
17
- import { useCreditCardDetailsQuery as h } from "../../data-access/dist/index4.js";
18
- import { useDebitCardDetailsQuery as g } from "../../data-access/dist/index5.js";
15
+ import { copyTextToClipboard as u, formatCardNumber as d, formatExpirationDate as f } from "./index3.js";
16
+ import { CardProgramValidity as p, resolveCanRevealCredentials as m, resolveCardDetailsPanelState as h, resolveCardDetailsPresentation as ee, resolveCardDetailsRevealState as te, resolveCardProgramValidity as g } from "./index4.js";
17
+ import { useCreditCardDetailsQuery as _ } from "../../data-access/dist/index4.js";
18
+ import { useDebitCardCredentialsQuery as v } from "../../data-access/dist/index5.js";
19
+ import { useDebitCardDetailsQuery as y } from "../../data-access/dist/index6.js";
19
20
  import "../../data-access/dist/index.js";
20
- import { CardDetailsPanel as _ } from "../../ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js";
21
+ import { CardDetailsPanel as b } from "../../ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js";
21
22
  import "../../ui/dist/index.js";
22
- import { useCallback as v, useEffect as y, useMemo as b } from "react";
23
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
23
+ import { useCallback as x, useEffect as S, useMemo as C, useState as ne } from "react";
24
+ import { Fragment as w, jsx as T, jsxs as re } from "react/jsx-runtime";
24
25
  //#region ../../libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js
25
- function w({ cardId: r, cardProgram: l, onClose: w, labels: T, featureLabels: E, bankLogoSrc: D, bankLogoAlt: O }) {
26
- let k = n(), A = a(), j = i();
27
- y(() => {
28
- k(c.Mounted);
29
- }, [k]);
30
- let M = b(() => s(E), [E]), N = m(l), P = l === o.Credit, F = l === o.Debit, I = h({
26
+ function E({ cardId: r, cardProgram: l, onClose: E, labels: D, featureLabels: O, bankLogoSrc: k, bankLogoAlt: A }) {
27
+ let j = n(), M = a(), N = i();
28
+ S(() => {
29
+ j(c.Mounted);
30
+ }, [j]);
31
+ let P = C(() => s(O), [O]), F = g(l), I = l === o.Credit, L = l === o.Debit, R = _({
31
32
  cardId: r,
32
- enabled: P
33
- }), L = g({
33
+ enabled: I
34
+ }), z = y({
34
35
  cardId: r,
35
- enabled: F
36
- }), { data: R, isError: z, isNotFound: B, refetch: V } = P ? I : L, H = f({
37
- programValidity: N,
38
- isNotFound: B,
39
- isError: !!A || z,
40
- hasCard: !!R
36
+ enabled: L
37
+ }), { data: B, isError: V, isNotFound: H, refetch: U } = I ? R : z, W = h({
38
+ programValidity: F,
39
+ isNotFound: H,
40
+ isError: !!M || V,
41
+ hasCard: !!B
41
42
  });
42
- y(() => {
43
- if (N === d.Supported) return;
43
+ S(() => {
44
+ if (F === p.Supported) return;
44
45
  let e = `"${o.Credit}" or "${o.Debit}"`;
45
- console.error(N === d.Missing ? `[CardDetailsWidget] cardProgram is required and was not set. Pass ${e} — it selects which card program to read, so there is no default. No card was fetched.` : `[CardDetailsWidget] cardProgram must be ${e}, received ${JSON.stringify(l)}. No card was fetched.`);
46
- }, [l, N]);
47
- let U = b(() => H === "loaded" && R ? p({
48
- card: R,
46
+ console.error(F === p.Missing ? `[CardDetailsWidget] cardProgram is required and was not set. Pass ${e} — it selects which card program to read, so there is no default. No card was fetched.` : `[CardDetailsWidget] cardProgram must be ${e}, received ${JSON.stringify(l)}. No card was fetched.`);
47
+ }, [l, F]);
48
+ let [G, K] = ne(), q = G === r;
49
+ S(() => {
50
+ K(void 0);
51
+ }, [r]);
52
+ let J = m({
53
+ panelState: W,
49
54
  cardProgram: l,
50
- labels: M
55
+ cardStatus: B?.cardStatus
56
+ });
57
+ S(() => {
58
+ q && !J && K(void 0);
59
+ }, [q, J]);
60
+ let Y = v({
61
+ cardId: r,
62
+ enabled: J && q
63
+ }), X = te({
64
+ isRevealRequested: q,
65
+ isError: Y.isError,
66
+ hasCredentials: !!Y.data
67
+ }), Z = C(() => W === "loaded" && B ? ee({
68
+ card: B,
69
+ cardProgram: l,
70
+ labels: P
51
71
  }) : void 0, [
52
- R,
72
+ B,
53
73
  l,
54
- M,
55
- H
56
- ]), W = v(async (t) => {
57
- await u(t) && (e.success(M.copySuccessToast), k(c.ValueCopied));
58
- }, [M.copySuccessToast, k]), G = v(() => {
59
- if (A) {
60
- j();
74
+ P,
75
+ W
76
+ ]), ie = x(async (t) => {
77
+ await u(t) && (e.success(P.copySuccessToast), j(c.ValueCopied));
78
+ }, [P.copySuccessToast, j]), { refetch: Q } = Y, ae = x(() => {
79
+ if (q) {
80
+ Q();
81
+ return;
82
+ }
83
+ K(r);
84
+ }, [
85
+ r,
86
+ q,
87
+ Q
88
+ ]), oe = x(() => {
89
+ K(void 0);
90
+ }, []), se = x(() => {
91
+ K(void 0), E?.();
92
+ }, [E]), ce = C(() => Y.isForbidden ? {
93
+ ...D,
94
+ credentials: {
95
+ ...D?.credentials,
96
+ errorDescription: P.revealNotPermittedDescription
97
+ }
98
+ } : D, [
99
+ Y.isForbidden,
100
+ D,
101
+ P.revealNotPermittedDescription
102
+ ]), $ = C(() => {
103
+ if (!(X !== "revealed" || !Y.data)) return {
104
+ cardNumber: d(Y.data.pan),
105
+ expirationDate: f(Y.data.expirationDate),
106
+ securityCode: Y.data.cvv
107
+ };
108
+ }, [Y.data, X]), le = x(() => {
109
+ if (M) {
110
+ N();
61
111
  return;
62
112
  }
63
- V();
113
+ U();
64
114
  }, [
65
- V,
66
- j,
67
- A
115
+ U,
116
+ N,
117
+ M
68
118
  ]);
69
- return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(t, {}), /* @__PURE__ */ S(_, {
70
- labels: T,
71
- state: H,
72
- nickname: U?.nickname,
73
- statusLabel: U?.statusLabel,
74
- statusTone: U?.statusTone,
75
- formFactorLabel: U?.formFactorLabel,
76
- onClose: w,
77
- bankLogoSrc: D,
78
- bankLogoAlt: O,
79
- cardholderName: U?.cardholderName,
80
- maskedCardNumber: U?.maskedCardNumber,
81
- programLabel: U?.programLabel,
82
- onCopy: W,
83
- onRetry: N === d.Supported ? G : void 0
119
+ return /* @__PURE__ */ re(w, { children: [/* @__PURE__ */ T(t, {}), /* @__PURE__ */ T(b, {
120
+ labels: ce,
121
+ state: W,
122
+ nickname: Z?.nickname,
123
+ statusLabel: Z?.statusLabel,
124
+ statusTone: Z?.statusTone,
125
+ formFactorLabel: Z?.formFactorLabel,
126
+ onClose: E ? se : void 0,
127
+ bankLogoSrc: k,
128
+ bankLogoAlt: A,
129
+ cardholderName: Z?.cardholderName,
130
+ maskedCardNumber: Z?.maskedCardNumber,
131
+ programLabel: Z?.programLabel,
132
+ onCopy: ie,
133
+ onViewCard: J ? ae : void 0,
134
+ onHideCard: J ? oe : void 0,
135
+ revealState: X,
136
+ revealedCardNumber: $?.cardNumber,
137
+ revealedExpirationDate: $?.expirationDate,
138
+ revealedSecurityCode: $?.securityCode,
139
+ onRetry: F === p.Supported ? le : void 0
84
140
  })] });
85
141
  }
86
- function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
87
- return /* @__PURE__ */ S(r, {
142
+ function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
143
+ return /* @__PURE__ */ T(r, {
88
144
  widgetName: l,
89
145
  baseUrl: e,
90
146
  widgetToken: t,
@@ -99,8 +155,8 @@ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gat
99
155
  analytics: f,
100
156
  disclosuresAcceptance: p,
101
157
  providerLabels: m,
102
- children: /* @__PURE__ */ S(w, { ...h })
158
+ children: /* @__PURE__ */ T(E, { ...h })
103
159
  });
104
160
  }
105
161
  //#endregion
106
- export { T as CardDetailsWidget, T as default };
162
+ export { D as CardDetailsWidget, D as default };
@@ -8,25 +8,27 @@ import { optionalOrganizationHeaders as d, organizationHeaders as f } from "./li
8
8
  import { bulkUpdateDepartmentMembers as p, bulkUpdateLocationMembers as m, bulkUpdateRoleMembers as h, createDepartment as g, createLocation as _, createUser as v, deactivateDepartment as y, deactivateLocation as b, deleteCounterpartsId as x, deleteCounterpartsIdBankAccountsId as S, deleteMeasureUnitsId as C, deletePayablesId as w, deletePayablesIdFile as T, deleteProductsId as E, deleteReceivablesId as D, deleteTagsId as O, downloadBankAccountTransactions as k, getApplicationStatus as A, getApprovalPolicies as j, getBankAccountAccess as M, getDepartment as N, getExternalBankAccountAccess as P, getLocation as F, getPayablesId as I, getPayablesIdLineItems as L, getPaymentRecords as R, getUsers as z, listDepartments as B, listLocations as V, listRoles as H, manageBankAccountAccess as U, patchCounterpartsId as W, patchCounterpartsIdAddressesId as G, patchCounterpartsIdBankAccountsId as K, patchMeasureUnitsId as q, patchPayablesId as J, patchProductsId as Y, patchReceivablesId as X, patchTagsId as Z, postApprovalRequestsIdApprove as Q, postApprovalRequestsIdReject as $, postCounterparts as ee, postCounterpartsIdAddresses as te, postCounterpartsIdBankAccounts as ne, postCounterpartsIdBankAccountsIdMakeDefault as re, postMeasureUnits as ie, postPayables as ae, postPayablesIdApprovePaymentOperation as oe, postPayablesIdAttachFile as se, postPayablesIdCancel as ce, postPayablesIdMarkAsPaid as le, postPayablesIdReject as ue, postPayablesIdReopen as de, postPayablesIdSchedulePayment as fe, postPayablesIdSubmitForApproval as pe, postPayablesIdValidate as me, postPayablesUploadFromFile as he, postPaymentIntentsIdCancel as ge, postProducts as _e, postReceivables as ve, postReceivablesIdAccept as ye, postReceivablesIdCancel as be, postReceivablesIdClone as xe, postReceivablesIdDecline as Se, postReceivablesIdIssue as Ce, postReceivablesIdMarkAsPaid as we, postReceivablesIdMarkAsPartiallyPaid as Te, postReceivablesIdMarkAsUncollectible as Ee, postReceivablesIdSend as De, postTags as Oe, putPayablesIdLineItems as ke, putReceivablesIdLineItems as Ae, updateDepartment as je, updateLocation as Me, updateUser as Ne } from "./lib/rest/sdk.gen.js";
9
9
  import { fetchWidgetInit as Pe } from "./lib/fetchWidgetInit.js";
10
10
  import { hasAnyScope as Fe } from "./lib/hasAnyScope.js";
11
- import { connectExternalBankAccountMutation as Ie, createAchMoneyMovementMutation as Le, createApplicationMutation as Re, createBankAccountMutation as ze, createBookTransferMutation as Be, createDebitCardMutation as Ve, createVelocityControlMutation as He, deleteApprovalPoliciesIdMutation as Ue, deleteLedgerAccountsIdMutation as We, deleteReceiptsIdMutation as Ge, disableUserMutation as Ke, getAnalyticsPayablesOptions as qe, getAnalyticsReceivablesOptions as Je, getApplicationStatusOptions as Ye, getApprovalPoliciesOptions as Xe, getApprovalPoliciesQueryKey as Ze, getApprovalRequestsOptions as Qe, getApprovalRequestsQueryKey as $e, getBankAccountAccessQueryKey as et, getBankAccountOptions as tt, getBankAccountQueryKey as nt, getBankAccountTransactionsOptions as rt, getBankAccountTransfersOptions as it, getBankAccountTransfersQueryKey as at, getBankAccountsQueryKey as ot, getCounterpartsIdAddressesOptions as st, getCounterpartsIdAddressesQueryKey as ct, getCounterpartsIdBankAccountsOptions as lt, getCounterpartsIdBankAccountsQueryKey as ut, getCounterpartsIdOptions as dt, getCounterpartsIdQueryKey as ft, getCounterpartsOptions as pt, getCounterpartsQueryKey as mt, getCreditCardByIdOptions as ht, getCreditCardsOptions as gt, getDebitCardByIdOptions as _t, getDebitCardsOptions as vt, getDebitCardsQueryKey as yt, getDepartmentOptions as bt, getDepartmentQueryKey as xt, getEntitiesIdSettingsOptions as St, getEntitiesIdSettingsQueryKey as Ct, getEntitiesMeOptions as wt, getEntityUsersMyEntityOptions as Tt, getEntityUsersOptions as Et, getExternalBankAccountAccessQueryKey as Dt, getExternalBankAccountsOptions as Ot, getExternalBankAccountsQueryKey as kt, getLedgerAccountsQueryKey as At, getLocationOptions as jt, getLocationQueryKey as Mt, getMeasureUnitsOptions as Nt, getMeasureUnitsQueryKey as Pt, getOrganizationOptions as Ft, getPayablesAnalyticsOptions as It, getPayablesAnalyticsQueryKey as Lt, getPayablesIdHistoryOptions as Rt, getPayablesIdHistoryQueryKey as zt, getPayablesIdLineItemsOptions as Bt, getPayablesIdLineItemsQueryKey as Vt, getPayablesIdOptions as Ht, getPayablesIdQueryKey as Ut, getPayablesIdSuggestionsOptions as Wt, getPayablesOptions as Gt, getPayablesQueryKey as Kt, getPaymentRecordsOptions as qt, getPaymentRecordsQueryKey as Jt, getProductsIdOptions as Yt, getProductsIdQueryKey as Xt, getProductsOptions as Zt, getProductsQueryKey as Qt, getReceiptsIdQueryKey as $t, getReceiptsOptions as en, getReceiptsQueryKey as tn, getReceivablesIdHistoryOptions as nn, getReceivablesIdHistoryQueryKey as rn, getReceivablesIdMailsOptions as an, getReceivablesIdMailsQueryKey as on, getReceivablesIdOptions as sn, getReceivablesIdPdfLinkOptions as cn, getReceivablesIdPdfLinkQueryKey as ln, getReceivablesIdQueryKey as un, getReceivablesOptions as dn, getReceivablesQueryKey as fn, getTagsOptions as pn, getTagsQueryKey as mn, getTransactionsIdQueryKey as hn, getTransactionsOptions as gn, getTransactionsQueryKey as _n, getTransactionsValidationsOptions as vn, getTransactionsValidationsQueryKey as yn, getUsersOptions as bn, getUsersQueryKey as xn, getVelocityControlsQueryKey as Sn, grantBankAccountAccessMutation as Cn, grantExternalBankAccountAccessMutation as wn, linkExternalBankAccountMutation as Tn, listDepartmentsOptions as En, listDepartmentsQueryKey as Dn, listLocationsOptions as On, listLocationsQueryKey as kn, listRolesQueryKey as An, manageDebitCardAccessMutation as jn, patchApprovalPoliciesIdMutation as Mn, patchEntitiesIdSettingsMutation as Nn, patchLedgerAccountsIdMutation as Pn, patchReceiptsIdMutation as Fn, postApprovalPoliciesMutation as In, postLedgerAccountsMutation as Ln, putTransactionsValidationsMutation as Rn, submitApplicationMutation as zn, unlinkExternalBankAccountMutation as Bn, updateApplicationMutation as Vn, updateBankAccountMutation as Hn, updateExternalBankAccountMutation as Un, validateExternalBankAccountMutation as Wn } from "./lib/rest/@tanstack/react-query.gen.js";
11
+ import { connectExternalBankAccountMutation as Ie, createAchMoneyMovementMutation as Le, createApplicationMutation as Re, createBankAccountMutation as ze, createBookTransferMutation as Be, createDebitCardMutation as Ve, createVelocityControlMutation as He, deleteApprovalPoliciesIdMutation as Ue, deleteLedgerAccountsIdMutation as We, deleteReceiptsIdMutation as Ge, disableUserMutation as Ke, getAnalyticsPayablesOptions as qe, getAnalyticsReceivablesOptions as Je, getApplicationStatusOptions as Ye, getApprovalPoliciesOptions as Xe, getApprovalPoliciesQueryKey as Ze, getApprovalRequestsOptions as Qe, getApprovalRequestsQueryKey as $e, getBankAccountAccessQueryKey as et, getBankAccountOptions as tt, getBankAccountQueryKey as nt, getBankAccountTransactionsOptions as rt, getBankAccountTransfersOptions as it, getBankAccountTransfersQueryKey as at, getBankAccountsQueryKey as ot, getCounterpartsIdAddressesOptions as st, getCounterpartsIdAddressesQueryKey as ct, getCounterpartsIdBankAccountsOptions as lt, getCounterpartsIdBankAccountsQueryKey as ut, getCounterpartsIdOptions as dt, getCounterpartsIdQueryKey as ft, getCounterpartsOptions as pt, getCounterpartsQueryKey as mt, getCreditCardByIdOptions as ht, getCreditCardsOptions as gt, getDebitCardByIdOptions as _t, getDebitCardCredentialsOptions as vt, getDebitCardsOptions as yt, getDebitCardsQueryKey as bt, getDepartmentOptions as xt, getDepartmentQueryKey as St, getEntitiesIdSettingsOptions as Ct, getEntitiesIdSettingsQueryKey as wt, getEntitiesMeOptions as Tt, getEntityUsersMyEntityOptions as Et, getEntityUsersOptions as Dt, getExternalBankAccountAccessQueryKey as Ot, getExternalBankAccountsOptions as kt, getExternalBankAccountsQueryKey as At, getLedgerAccountsQueryKey as jt, getLocationOptions as Mt, getLocationQueryKey as Nt, getMeasureUnitsOptions as Pt, getMeasureUnitsQueryKey as Ft, getOrganizationOptions as It, getPayablesAnalyticsOptions as Lt, getPayablesAnalyticsQueryKey as Rt, getPayablesIdHistoryOptions as zt, getPayablesIdHistoryQueryKey as Bt, getPayablesIdLineItemsOptions as Vt, getPayablesIdLineItemsQueryKey as Ht, getPayablesIdOptions as Ut, getPayablesIdQueryKey as Wt, getPayablesIdSuggestionsOptions as Gt, getPayablesOptions as Kt, getPayablesQueryKey as qt, getPaymentRecordsOptions as Jt, getPaymentRecordsQueryKey as Yt, getProductsIdOptions as Xt, getProductsIdQueryKey as Zt, getProductsOptions as Qt, getProductsQueryKey as $t, getReceiptsIdQueryKey as en, getReceiptsOptions as tn, getReceiptsQueryKey as nn, getReceivablesIdHistoryOptions as rn, getReceivablesIdHistoryQueryKey as an, getReceivablesIdMailsOptions as on, getReceivablesIdMailsQueryKey as sn, getReceivablesIdOptions as cn, getReceivablesIdPdfLinkOptions as ln, getReceivablesIdPdfLinkQueryKey as un, getReceivablesIdQueryKey as dn, getReceivablesOptions as fn, getReceivablesQueryKey as pn, getTagsOptions as mn, getTagsQueryKey as hn, getTransactionsIdQueryKey as gn, getTransactionsOptions as _n, getTransactionsQueryKey as vn, getTransactionsValidationsOptions as yn, getTransactionsValidationsQueryKey as bn, getUsersOptions as xn, getUsersQueryKey as Sn, getVelocityControlsQueryKey as Cn, grantBankAccountAccessMutation as wn, grantExternalBankAccountAccessMutation as Tn, linkExternalBankAccountMutation as En, listDepartmentsOptions as Dn, listDepartmentsQueryKey as On, listLocationsOptions as kn, listLocationsQueryKey as An, listRolesQueryKey as jn, manageDebitCardAccessMutation as Mn, patchApprovalPoliciesIdMutation as Nn, patchEntitiesIdSettingsMutation as Pn, patchLedgerAccountsIdMutation as Fn, patchReceiptsIdMutation as In, postApprovalPoliciesMutation as Ln, postLedgerAccountsMutation as Rn, putTransactionsValidationsMutation as zn, submitApplicationMutation as Bn, unlinkExternalBankAccountMutation as Vn, updateApplicationMutation as Hn, updateBankAccountMutation as Un, updateExternalBankAccountMutation as Wn, validateExternalBankAccountMutation as Gn } from "./lib/rest/@tanstack/react-query.gen.js";
12
12
  import "./lib/queryKeys.js";
13
- import { withAuthEpoch as Gn } from "./lib/withAuthEpoch.js";
14
- import { useCurrentUserQuery as Kn } from "./lib/useCurrentUserQuery.js";
15
- import { isApiNotFoundError as qn } from "./lib/isApiNotFoundError.js";
13
+ import { withAuthEpoch as Kn } from "./lib/withAuthEpoch.js";
14
+ import { useCurrentUserQuery as qn } from "./lib/useCurrentUserQuery.js";
15
+ import "./lib/apiErrorStatus.js";
16
+ import { isApiForbiddenError as Jn } from "./lib/isApiForbiddenError.js";
17
+ import { isApiNotFoundError as Yn } from "./lib/isApiNotFoundError.js";
16
18
  import "./lib/isUserDataNotFoundError.js";
17
- import { useGetUserDataQuery as Jn } from "./lib/useGetUserDataQuery.js";
18
- import { useUpsertUserDataMutation as Yn } from "./lib/useUpsertUserDataMutation.js";
19
+ import { useGetUserDataQuery as Xn } from "./lib/useGetUserDataQuery.js";
20
+ import { useUpsertUserDataMutation as Zn } from "./lib/useUpsertUserDataMutation.js";
19
21
  import "./lib/rest/zod.gen.js";
20
- import { Scope as Xn } from "./lib/scopes.js";
21
- import { getAllPagesNextPageParam as Zn, getAllPagesNextPaginationTokenParam as Qn, isAllPagesResolving as $n, useAutoFetchNextPage as er } from "./lib/allPages.js";
22
- import { useAllBankAccountsQuery as tr } from "./lib/bank-account/useAllBankAccountsQuery.js";
23
- import { useAllExternalBankAccountsQuery as nr } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
24
- import { useAllMerchantCategoryGroupsQuery as rr } from "./lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js";
25
- import { useAllLedgerAccountsQuery as ir, useLedgerAccountsQuery as ar } from "./lib/reference-data/useLedgerAccountsQuery.js";
26
- import { usePaymentTermsQuery as or } from "./lib/reference-data/usePaymentTermsQuery.js";
27
- import { useAllOrganizationRolesQuery as sr } from "./lib/role/useAllOrganizationRolesQuery.js";
28
- import { useRolePermissionsQueries as cr } from "./lib/role/useRolePermissionsQueries.js";
29
- import { useAllOrganizationUsersQuery as lr } from "./lib/user/useAllOrganizationUsersQuery.js";
30
- import { useAcceptWidgetDisclosures as ur } from "./lib/disclosures/useAcceptWidgetDisclosures.js";
31
- import { useDisclosuresQuery as dr } from "./lib/disclosures/useDisclosuresQuery.js";
32
- export { l as EmbedApiProvider, Xn as Scope, p as bulkUpdateDepartmentMembers, m as bulkUpdateLocationMembers, h as bulkUpdateRoleMembers, e as cancelAllClients, o as cloneEmbeddedClient, Ie as connectExternalBankAccountMutation, Le as createAchMoneyMovementMutation, Re as createApplicationMutation, ze as createBankAccountMutation, Be as createBookTransferMutation, Ve as createDebitCardMutation, g as createDepartment, s as createEmbeddedClient, _ as createLocation, v as createUser, He as createVelocityControlMutation, y as deactivateDepartment, b as deactivateLocation, Ue as deleteApprovalPoliciesIdMutation, x as deleteCounterpartsId, S as deleteCounterpartsIdBankAccountsId, We as deleteLedgerAccountsIdMutation, C as deleteMeasureUnitsId, w as deletePayablesId, T as deletePayablesIdFile, E as deleteProductsId, Ge as deleteReceiptsIdMutation, D as deleteReceivablesId, O as deleteTagsId, Ke as disableUserMutation, k as downloadBankAccountTransactions, Pe as fetchWidgetInit, Zn as getAllPagesNextPageParam, Qn as getAllPagesNextPaginationTokenParam, qe as getAnalyticsPayablesOptions, Je as getAnalyticsReceivablesOptions, A as getApplicationStatus, Ye as getApplicationStatusOptions, j as getApprovalPolicies, Xe as getApprovalPoliciesOptions, Ze as getApprovalPoliciesQueryKey, Qe as getApprovalRequestsOptions, $e as getApprovalRequestsQueryKey, M as getBankAccountAccess, et as getBankAccountAccessQueryKey, tt as getBankAccountOptions, nt as getBankAccountQueryKey, rt as getBankAccountTransactionsOptions, it as getBankAccountTransfersOptions, at as getBankAccountTransfersQueryKey, ot as getBankAccountsQueryKey, st as getCounterpartsIdAddressesOptions, ct as getCounterpartsIdAddressesQueryKey, lt as getCounterpartsIdBankAccountsOptions, ut as getCounterpartsIdBankAccountsQueryKey, dt as getCounterpartsIdOptions, ft as getCounterpartsIdQueryKey, pt as getCounterpartsOptions, mt as getCounterpartsQueryKey, ht as getCreditCardByIdOptions, gt as getCreditCardsOptions, _t as getDebitCardByIdOptions, vt as getDebitCardsOptions, yt as getDebitCardsQueryKey, N as getDepartment, bt as getDepartmentOptions, xt as getDepartmentQueryKey, St as getEntitiesIdSettingsOptions, Ct as getEntitiesIdSettingsQueryKey, wt as getEntitiesMeOptions, Tt as getEntityUsersMyEntityOptions, Et as getEntityUsersOptions, P as getExternalBankAccountAccess, Dt as getExternalBankAccountAccessQueryKey, Ot as getExternalBankAccountsOptions, kt as getExternalBankAccountsQueryKey, At as getLedgerAccountsQueryKey, F as getLocation, jt as getLocationOptions, Mt as getLocationQueryKey, Nt as getMeasureUnitsOptions, Pt as getMeasureUnitsQueryKey, Ft as getOrganizationOptions, It as getPayablesAnalyticsOptions, Lt as getPayablesAnalyticsQueryKey, I as getPayablesId, Rt as getPayablesIdHistoryOptions, zt as getPayablesIdHistoryQueryKey, L as getPayablesIdLineItems, Bt as getPayablesIdLineItemsOptions, Vt as getPayablesIdLineItemsQueryKey, Ht as getPayablesIdOptions, Ut as getPayablesIdQueryKey, Wt as getPayablesIdSuggestionsOptions, Gt as getPayablesOptions, Kt as getPayablesQueryKey, R as getPaymentRecords, qt as getPaymentRecordsOptions, Jt as getPaymentRecordsQueryKey, Yt as getProductsIdOptions, Xt as getProductsIdQueryKey, Zt as getProductsOptions, Qt as getProductsQueryKey, $t as getReceiptsIdQueryKey, en as getReceiptsOptions, tn as getReceiptsQueryKey, nn as getReceivablesIdHistoryOptions, rn as getReceivablesIdHistoryQueryKey, an as getReceivablesIdMailsOptions, on as getReceivablesIdMailsQueryKey, sn as getReceivablesIdOptions, cn as getReceivablesIdPdfLinkOptions, ln as getReceivablesIdPdfLinkQueryKey, un as getReceivablesIdQueryKey, dn as getReceivablesOptions, fn as getReceivablesQueryKey, pn as getTagsOptions, mn as getTagsQueryKey, hn as getTransactionsIdQueryKey, gn as getTransactionsOptions, _n as getTransactionsQueryKey, vn as getTransactionsValidationsOptions, yn as getTransactionsValidationsQueryKey, z as getUsers, bn as getUsersOptions, xn as getUsersQueryKey, Sn as getVelocityControlsQueryKey, Cn as grantBankAccountAccessMutation, wn as grantExternalBankAccountAccessMutation, Fe as hasAnyScope, t as invalidateAllClients, $n as isAllPagesResolving, qn as isApiNotFoundError, c as isWidgetGatewayHost, Tn as linkExternalBankAccountMutation, B as listDepartments, En as listDepartmentsOptions, Dn as listDepartmentsQueryKey, V as listLocations, On as listLocationsOptions, kn as listLocationsQueryKey, H as listRoles, An as listRolesQueryKey, U as manageBankAccountAccess, jn as manageDebitCardAccessMutation, d as optionalOrganizationHeaders, f as organizationHeaders, Mn as patchApprovalPoliciesIdMutation, W as patchCounterpartsId, G as patchCounterpartsIdAddressesId, K as patchCounterpartsIdBankAccountsId, Nn as patchEntitiesIdSettingsMutation, Pn as patchLedgerAccountsIdMutation, q as patchMeasureUnitsId, J as patchPayablesId, Y as patchProductsId, Fn as patchReceiptsIdMutation, X as patchReceivablesId, Z as patchTagsId, In as postApprovalPoliciesMutation, Q as postApprovalRequestsIdApprove, $ as postApprovalRequestsIdReject, ee as postCounterparts, te as postCounterpartsIdAddresses, ne as postCounterpartsIdBankAccounts, re as postCounterpartsIdBankAccountsIdMakeDefault, Ln as postLedgerAccountsMutation, ie as postMeasureUnits, ae as postPayables, oe as postPayablesIdApprovePaymentOperation, se as postPayablesIdAttachFile, ce as postPayablesIdCancel, le as postPayablesIdMarkAsPaid, ue as postPayablesIdReject, de as postPayablesIdReopen, fe as postPayablesIdSchedulePayment, pe as postPayablesIdSubmitForApproval, me as postPayablesIdValidate, he as postPayablesUploadFromFile, ge as postPaymentIntentsIdCancel, _e as postProducts, ve as postReceivables, ye as postReceivablesIdAccept, be as postReceivablesIdCancel, xe as postReceivablesIdClone, Se as postReceivablesIdDecline, Ce as postReceivablesIdIssue, we as postReceivablesIdMarkAsPaid, Te as postReceivablesIdMarkAsPartiallyPaid, Ee as postReceivablesIdMarkAsUncollectible, De as postReceivablesIdSend, Oe as postTags, ke as putPayablesIdLineItems, Ae as putReceivablesIdLineItems, Rn as putTransactionsValidationsMutation, n as registerQueryClient, r as removeInactiveFromAllClients, i as setAllClientsQueriesData, zn as submitApplicationMutation, Bn as unlinkExternalBankAccountMutation, a as unregisterQueryClient, Vn as updateApplicationMutation, Hn as updateBankAccountMutation, je as updateDepartment, Un as updateExternalBankAccountMutation, Me as updateLocation, Ne as updateUser, ur as useAcceptWidgetDisclosures, tr as useAllBankAccountsQuery, nr as useAllExternalBankAccountsQuery, ir as useAllLedgerAccountsQuery, rr as useAllMerchantCategoryGroupsQuery, sr as useAllOrganizationRolesQuery, lr as useAllOrganizationUsersQuery, er as useAutoFetchNextPage, Kn as useCurrentUserQuery, dr as useDisclosuresQuery, u as useEmbedApi, Jn as useGetUserDataQuery, ar as useLedgerAccountsQuery, or as usePaymentTermsQuery, cr as useRolePermissionsQueries, Yn as useUpsertUserDataMutation, Wn as validateExternalBankAccountMutation, Gn as withAuthEpoch };
22
+ import { Scope as Qn } from "./lib/scopes.js";
23
+ import { getAllPagesNextPageParam as $n, getAllPagesNextPaginationTokenParam as er, isAllPagesResolving as tr, useAutoFetchNextPage as nr } from "./lib/allPages.js";
24
+ import { useAllBankAccountsQuery as rr } from "./lib/bank-account/useAllBankAccountsQuery.js";
25
+ import { useAllExternalBankAccountsQuery as ir } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
26
+ import { useAllMerchantCategoryGroupsQuery as ar } from "./lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js";
27
+ import { useAllLedgerAccountsQuery as or, useLedgerAccountsQuery as sr } from "./lib/reference-data/useLedgerAccountsQuery.js";
28
+ import { usePaymentTermsQuery as cr } from "./lib/reference-data/usePaymentTermsQuery.js";
29
+ import { useAllOrganizationRolesQuery as lr } from "./lib/role/useAllOrganizationRolesQuery.js";
30
+ import { useRolePermissionsQueries as ur } from "./lib/role/useRolePermissionsQueries.js";
31
+ import { useAllOrganizationUsersQuery as dr } from "./lib/user/useAllOrganizationUsersQuery.js";
32
+ import { useAcceptWidgetDisclosures as fr } from "./lib/disclosures/useAcceptWidgetDisclosures.js";
33
+ import { useDisclosuresQuery as pr } from "./lib/disclosures/useDisclosuresQuery.js";
34
+ export { l as EmbedApiProvider, Qn as Scope, p as bulkUpdateDepartmentMembers, m as bulkUpdateLocationMembers, h as bulkUpdateRoleMembers, e as cancelAllClients, o as cloneEmbeddedClient, Ie as connectExternalBankAccountMutation, Le as createAchMoneyMovementMutation, Re as createApplicationMutation, ze as createBankAccountMutation, Be as createBookTransferMutation, Ve as createDebitCardMutation, g as createDepartment, s as createEmbeddedClient, _ as createLocation, v as createUser, He as createVelocityControlMutation, y as deactivateDepartment, b as deactivateLocation, Ue as deleteApprovalPoliciesIdMutation, x as deleteCounterpartsId, S as deleteCounterpartsIdBankAccountsId, We as deleteLedgerAccountsIdMutation, C as deleteMeasureUnitsId, w as deletePayablesId, T as deletePayablesIdFile, E as deleteProductsId, Ge as deleteReceiptsIdMutation, D as deleteReceivablesId, O as deleteTagsId, Ke as disableUserMutation, k as downloadBankAccountTransactions, Pe as fetchWidgetInit, $n as getAllPagesNextPageParam, er as getAllPagesNextPaginationTokenParam, qe as getAnalyticsPayablesOptions, Je as getAnalyticsReceivablesOptions, A as getApplicationStatus, Ye as getApplicationStatusOptions, j as getApprovalPolicies, Xe as getApprovalPoliciesOptions, Ze as getApprovalPoliciesQueryKey, Qe as getApprovalRequestsOptions, $e as getApprovalRequestsQueryKey, M as getBankAccountAccess, et as getBankAccountAccessQueryKey, tt as getBankAccountOptions, nt as getBankAccountQueryKey, rt as getBankAccountTransactionsOptions, it as getBankAccountTransfersOptions, at as getBankAccountTransfersQueryKey, ot as getBankAccountsQueryKey, st as getCounterpartsIdAddressesOptions, ct as getCounterpartsIdAddressesQueryKey, lt as getCounterpartsIdBankAccountsOptions, ut as getCounterpartsIdBankAccountsQueryKey, dt as getCounterpartsIdOptions, ft as getCounterpartsIdQueryKey, pt as getCounterpartsOptions, mt as getCounterpartsQueryKey, ht as getCreditCardByIdOptions, gt as getCreditCardsOptions, _t as getDebitCardByIdOptions, vt as getDebitCardCredentialsOptions, yt as getDebitCardsOptions, bt as getDebitCardsQueryKey, N as getDepartment, xt as getDepartmentOptions, St as getDepartmentQueryKey, Ct as getEntitiesIdSettingsOptions, wt as getEntitiesIdSettingsQueryKey, Tt as getEntitiesMeOptions, Et as getEntityUsersMyEntityOptions, Dt as getEntityUsersOptions, P as getExternalBankAccountAccess, Ot as getExternalBankAccountAccessQueryKey, kt as getExternalBankAccountsOptions, At as getExternalBankAccountsQueryKey, jt as getLedgerAccountsQueryKey, F as getLocation, Mt as getLocationOptions, Nt as getLocationQueryKey, Pt as getMeasureUnitsOptions, Ft as getMeasureUnitsQueryKey, It as getOrganizationOptions, Lt as getPayablesAnalyticsOptions, Rt as getPayablesAnalyticsQueryKey, I as getPayablesId, zt as getPayablesIdHistoryOptions, Bt as getPayablesIdHistoryQueryKey, L as getPayablesIdLineItems, Vt as getPayablesIdLineItemsOptions, Ht as getPayablesIdLineItemsQueryKey, Ut as getPayablesIdOptions, Wt as getPayablesIdQueryKey, Gt as getPayablesIdSuggestionsOptions, Kt as getPayablesOptions, qt as getPayablesQueryKey, R as getPaymentRecords, Jt as getPaymentRecordsOptions, Yt as getPaymentRecordsQueryKey, Xt as getProductsIdOptions, Zt as getProductsIdQueryKey, Qt as getProductsOptions, $t as getProductsQueryKey, en as getReceiptsIdQueryKey, tn as getReceiptsOptions, nn as getReceiptsQueryKey, rn as getReceivablesIdHistoryOptions, an as getReceivablesIdHistoryQueryKey, on as getReceivablesIdMailsOptions, sn as getReceivablesIdMailsQueryKey, cn as getReceivablesIdOptions, ln as getReceivablesIdPdfLinkOptions, un as getReceivablesIdPdfLinkQueryKey, dn as getReceivablesIdQueryKey, fn as getReceivablesOptions, pn as getReceivablesQueryKey, mn as getTagsOptions, hn as getTagsQueryKey, gn as getTransactionsIdQueryKey, _n as getTransactionsOptions, vn as getTransactionsQueryKey, yn as getTransactionsValidationsOptions, bn as getTransactionsValidationsQueryKey, z as getUsers, xn as getUsersOptions, Sn as getUsersQueryKey, Cn as getVelocityControlsQueryKey, wn as grantBankAccountAccessMutation, Tn as grantExternalBankAccountAccessMutation, Fe as hasAnyScope, t as invalidateAllClients, tr as isAllPagesResolving, Jn as isApiForbiddenError, Yn as isApiNotFoundError, c as isWidgetGatewayHost, En as linkExternalBankAccountMutation, B as listDepartments, Dn as listDepartmentsOptions, On as listDepartmentsQueryKey, V as listLocations, kn as listLocationsOptions, An as listLocationsQueryKey, H as listRoles, jn as listRolesQueryKey, U as manageBankAccountAccess, Mn as manageDebitCardAccessMutation, d as optionalOrganizationHeaders, f as organizationHeaders, Nn as patchApprovalPoliciesIdMutation, W as patchCounterpartsId, G as patchCounterpartsIdAddressesId, K as patchCounterpartsIdBankAccountsId, Pn as patchEntitiesIdSettingsMutation, Fn as patchLedgerAccountsIdMutation, q as patchMeasureUnitsId, J as patchPayablesId, Y as patchProductsId, In as patchReceiptsIdMutation, X as patchReceivablesId, Z as patchTagsId, Ln as postApprovalPoliciesMutation, Q as postApprovalRequestsIdApprove, $ as postApprovalRequestsIdReject, ee as postCounterparts, te as postCounterpartsIdAddresses, ne as postCounterpartsIdBankAccounts, re as postCounterpartsIdBankAccountsIdMakeDefault, Rn as postLedgerAccountsMutation, ie as postMeasureUnits, ae as postPayables, oe as postPayablesIdApprovePaymentOperation, se as postPayablesIdAttachFile, ce as postPayablesIdCancel, le as postPayablesIdMarkAsPaid, ue as postPayablesIdReject, de as postPayablesIdReopen, fe as postPayablesIdSchedulePayment, pe as postPayablesIdSubmitForApproval, me as postPayablesIdValidate, he as postPayablesUploadFromFile, ge as postPaymentIntentsIdCancel, _e as postProducts, ve as postReceivables, ye as postReceivablesIdAccept, be as postReceivablesIdCancel, xe as postReceivablesIdClone, Se as postReceivablesIdDecline, Ce as postReceivablesIdIssue, we as postReceivablesIdMarkAsPaid, Te as postReceivablesIdMarkAsPartiallyPaid, Ee as postReceivablesIdMarkAsUncollectible, De as postReceivablesIdSend, Oe as postTags, ke as putPayablesIdLineItems, Ae as putReceivablesIdLineItems, zn as putTransactionsValidationsMutation, n as registerQueryClient, r as removeInactiveFromAllClients, i as setAllClientsQueriesData, Bn as submitApplicationMutation, Vn as unlinkExternalBankAccountMutation, a as unregisterQueryClient, Hn as updateApplicationMutation, Un as updateBankAccountMutation, je as updateDepartment, Wn as updateExternalBankAccountMutation, Me as updateLocation, Ne as updateUser, fr as useAcceptWidgetDisclosures, rr as useAllBankAccountsQuery, ir as useAllExternalBankAccountsQuery, or as useAllLedgerAccountsQuery, ar as useAllMerchantCategoryGroupsQuery, lr as useAllOrganizationRolesQuery, dr as useAllOrganizationUsersQuery, nr as useAutoFetchNextPage, qn as useCurrentUserQuery, pr as useDisclosuresQuery, u as useEmbedApi, Xn as useGetUserDataQuery, sr as useLedgerAccountsQuery, cr as usePaymentTermsQuery, ur as useRolePermissionsQueries, Zn as useUpsertUserDataMutation, Gn as validateExternalBankAccountMutation, Kn as withAuthEpoch };
@@ -0,0 +1,26 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/apiErrorStatus.js
2
+ function e(e) {
3
+ return typeof e == "object" && !!e;
4
+ }
5
+ var t = [
6
+ "error",
7
+ "data",
8
+ "body",
9
+ "cause"
10
+ ];
11
+ function n(t) {
12
+ if (!e(t)) return;
13
+ let n = t.status;
14
+ return typeof n == "number" || typeof n == "string" ? n : void 0;
15
+ }
16
+ function r(e, t) {
17
+ return e === t || e === String(t);
18
+ }
19
+ function i(i, a) {
20
+ if (r(n(i), a)) return !0;
21
+ if (!e(i)) return !1;
22
+ for (let e of t) if (r(n(i[e]), a)) return !0;
23
+ return !1;
24
+ }
25
+ //#endregion
26
+ export { i as hasApiStatus, e as isRecord };
@@ -0,0 +1,7 @@
1
+ import { hasApiStatus as e } from "./apiErrorStatus.js";
2
+ //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isApiForbiddenError.js
3
+ function t(t) {
4
+ return e(t, 403);
5
+ }
6
+ //#endregion
7
+ export { t as isApiForbiddenError };
@@ -1,26 +1,7 @@
1
+ import { hasApiStatus as e } from "./apiErrorStatus.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isApiNotFoundError.js
2
- function e(e) {
3
- return typeof e == "object" && !!e;
4
- }
5
- var t = [
6
- "error",
7
- "data",
8
- "body",
9
- "cause"
10
- ];
11
- function n(t) {
12
- if (!e(t)) return;
13
- let n = t.status;
14
- return typeof n == "number" || typeof n == "string" ? n : void 0;
15
- }
16
- function r(e) {
17
- return e === 404 || e === "404";
18
- }
19
- function i(i) {
20
- if (r(n(i))) return !0;
21
- if (!e(i)) return !1;
22
- for (let e of t) if (r(n(i[e]))) return !0;
23
- return !1;
3
+ function t(t) {
4
+ return e(t, 404);
24
5
  }
25
6
  //#endregion
26
- export { i as isApiNotFoundError, e as isRecord };
7
+ export { t as isApiNotFoundError };
@@ -1,13 +1,14 @@
1
- import { isApiNotFoundError as e, isRecord as t } from "./isApiNotFoundError.js";
1
+ import { isRecord as e } from "./apiErrorStatus.js";
2
+ import { isApiNotFoundError as t } from "./isApiNotFoundError.js";
2
3
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isUserDataNotFoundError.js
3
- function n(e) {
4
- if (!t(e)) return !1;
5
- let { detail: n } = e;
4
+ function n(t) {
5
+ if (!e(t)) return !1;
6
+ let { detail: n } = t;
6
7
  return typeof n == "string" && n.includes("No value stored under key");
7
8
  }
8
9
  function r(r) {
9
- if (e(r) || n(r)) return !0;
10
- if (!t(r)) return !1;
10
+ if (t(r) || n(r)) return !0;
11
+ if (!e(r)) return !1;
11
12
  for (let e of [
12
13
  r.error,
13
14
  r.data,