@tesouro/embedded-components-react 0.5.116 → 0.5.118

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 (163) hide show
  1. package/README.md +6 -6
  2. package/dist/index.css +13 -6
  3. package/dist/index.d.ts +31 -4
  4. package/dist/index.js +5 -4
  5. package/dist/lib/MarketingWidget.d.ts +31 -4
  6. package/dist/lib/MarketingWidget.js +3 -2
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index.js +6 -6
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index10.js +25 -31
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index11.js +41 -0
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index4.js +6 -15
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index5.js +15 -11
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index6.js +7 -7
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index7.js +14 -37
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index8.js +43 -3
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index9.js +3 -31
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +6 -6
  17. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +7 -7
  18. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +7 -7
  19. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +8 -8
  20. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index5.js +10 -10
  21. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index3.js +8 -8
  22. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index4.js +6 -6
  23. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +13 -13
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +25 -25
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +12 -12
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +8 -8
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +168 -168
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +7 -7
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +4 -4
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +44 -44
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +7 -7
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +4 -4
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +24 -24
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +81 -81
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +17 -17
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +31 -31
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +7 -7
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +15 -15
  39. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index10.js +6 -6
  40. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index11.js +6 -6
  41. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index2.js +15 -15
  42. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index4.js +15 -15
  43. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +7 -7
  44. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +7 -7
  45. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +7 -7
  46. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index9.js +6 -6
  47. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index3.js +10 -10
  48. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index4.js +8 -8
  49. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index5.js +8 -8
  50. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index6.js +8 -8
  51. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +5 -5
  52. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +7 -7
  53. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +7 -7
  54. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +14 -14
  55. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +14 -14
  56. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +5 -5
  57. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +5 -5
  58. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +15 -15
  59. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +12 -12
  60. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +9 -9
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +22 -22
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +12 -12
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +87 -87
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +44 -44
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +36 -36
  66. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index2.js +6 -6
  67. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +7 -7
  68. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +3 -2
  69. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index3.js +1 -0
  70. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index4.js +27 -23
  71. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index.js +4 -3
  72. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js +3 -1
  73. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index3.js +8 -17
  74. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index4.js +10 -80
  75. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index5.js +16 -72
  76. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index6.js +45 -0
  77. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index7.js +109 -0
  78. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index8.js +88 -0
  79. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index2.js +21 -21
  80. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index3.js +13 -13
  81. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +9 -9
  82. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +9 -9
  83. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +10 -10
  84. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/data-access/dist/index2.js +4 -4
  85. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/data-access/dist/index3.js +22 -22
  86. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +7 -7
  87. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +7 -7
  88. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index4.js +7 -7
  89. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index5.js +11 -11
  90. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index6.js +13 -13
  91. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index7.js +11 -11
  92. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index8.js +11 -11
  93. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +7 -7
  94. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +7 -7
  95. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +7 -7
  96. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js +6 -6
  97. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js +11 -11
  98. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js +11 -11
  99. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js +10 -10
  100. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +5 -5
  101. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +5 -5
  102. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js +7 -7
  103. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +16 -16
  104. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +14 -14
  105. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +7 -7
  106. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +9 -9
  107. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index15.js +59 -59
  108. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +9 -9
  109. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +9 -9
  110. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index19.js +41 -41
  111. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index2.js +4 -4
  112. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +9 -9
  113. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +9 -9
  114. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index23.js +41 -41
  115. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index3.js +8 -8
  116. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index4.js +9 -9
  117. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index5.js +4 -4
  118. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index6.js +4 -4
  119. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index7.js +73 -73
  120. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index8.js +11 -11
  121. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index9.js +20 -20
  122. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +61 -61
  123. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/queryKeys.js +4 -4
  124. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index2.js +16 -16
  125. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +51 -51
  126. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +63 -63
  127. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +44 -44
  128. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +35 -34
  129. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +22 -0
  130. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +9 -9
  131. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js +8 -8
  132. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +8 -8
  133. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -7
  134. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +11 -11
  135. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +15 -15
  136. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +7 -7
  137. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +11 -11
  138. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +7 -7
  139. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +7 -7
  140. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +5 -5
  141. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js +22 -21
  142. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useUpsertUserDataMutation.js +7 -7
  143. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +11 -11
  144. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/widgetTokenCacheId.js +11 -0
  145. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index2.js +4 -4
  146. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +14 -14
  147. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  148. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js +11 -11
  149. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index11.js +11 -11
  150. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index12.js +11 -11
  151. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +7 -7
  152. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +7 -7
  153. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +11 -11
  154. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index5.js +11 -11
  155. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index6.js +13 -13
  156. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index7.js +10 -10
  157. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index8.js +7 -7
  158. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +7 -7
  159. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index3.js +11 -11
  160. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +7 -7
  161. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index7.js +12 -12
  162. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index8.js +11 -11
  163. package/package.json +1 -1
@@ -2,11 +2,11 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
- import { getPayables as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
- import { getAnalyticsPayablesOptions as r, getPayablesIdOptions as i, getPayablesOptions as a, getPayablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
- import { withAuthEpoch as s } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
5
+ import { getPayables as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
+ import { getAnalyticsPayablesOptions as t, getPayablesIdOptions as n, getPayablesOptions as r, getPayablesQueryKey as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
+ import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as o } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as s } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
11
  import { PAYABLE_COUNT_ANALYTICS as c } from "./index5.js";
12
12
  import { OCR_POLL_INTERVAL_MS as l, payableOcrQueryOptions as u } from "./index4.js";
@@ -14,70 +14,70 @@ import { payablePolicyAssignmentQueryOptions as d } from "./index16.js";
14
14
  import { useMemo as f } from "react";
15
15
  import { queryOptions as p, useQueries as m, useQuery as h } from "@tanstack/react-query";
16
16
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js
17
- function g({ enabled: n, pollWhileOcrProcessing: r = !1, ...i } = {}) {
18
- let { client: o, organizationId: c, widgetToken: u, authEpoch: d } = e(), f = !!(c && u) && (n === !0 || n === void 0), p = a({
19
- client: o,
20
- headers: t(c),
21
- query: i
17
+ function g({ enabled: e, pollWhileOcrProcessing: t = !1, ...n } = {}) {
18
+ let { client: i, organizationId: c, widgetToken: u, authEpoch: d } = o(), f = !!(c && u) && (e === !0 || e === void 0), p = r({
19
+ client: i,
20
+ headers: s(c),
21
+ query: n
22
22
  });
23
23
  return h({
24
- ...s(p, d),
24
+ ...a(p, d),
25
25
  enabled: f,
26
- ...r ? { refetchInterval: (e) => (e.state.data?.data ?? []).some((e) => e.ocr_status === "processing") ? l : !1 } : {}
26
+ ...t ? { refetchInterval: (e) => (e.state.data?.data ?? []).some((e) => e.ocr_status === "processing") ? l : !1 } : {}
27
27
  });
28
28
  }
29
29
  var _ = 100;
30
- function v({ enabled: r } = {}) {
31
- let { client: i, organizationId: a, widgetToken: c, authEpoch: l } = e(), u = t(a), d = {
30
+ function v({ enabled: t } = {}) {
31
+ let { client: n, organizationId: r, widgetToken: c, authEpoch: l } = o(), u = s(r), d = {
32
32
  duplicate_match_status: "suspected",
33
33
  limit: _
34
34
  }, f = p({
35
- queryKey: [...o({
36
- client: i,
35
+ queryKey: [...i({
36
+ client: n,
37
37
  headers: u,
38
38
  query: d
39
39
  }), "all"],
40
- queryFn: async ({ signal: e }) => {
41
- let t = [], r = /* @__PURE__ */ new Set(), a;
40
+ queryFn: async ({ signal: t }) => {
41
+ let r = [], i = /* @__PURE__ */ new Set(), a;
42
42
  do {
43
- let { data: o } = await n({
44
- client: i,
43
+ let { data: o } = await e({
44
+ client: n,
45
45
  headers: u,
46
46
  query: {
47
47
  ...d,
48
48
  pagination_token: a
49
49
  },
50
- signal: e,
50
+ signal: t,
51
51
  throwOnError: !0
52
52
  });
53
- t.push(...o.data ?? []);
53
+ r.push(...o.data ?? []);
54
54
  let s = o.next_pagination_token ?? void 0;
55
- a = s && !r.has(s) ? (r.add(s), s) : void 0;
55
+ a = s && !i.has(s) ? (i.add(s), s) : void 0;
56
56
  } while (a);
57
- return { data: t };
57
+ return { data: r };
58
58
  }
59
59
  });
60
60
  return h({
61
- ...s(f, l),
62
- enabled: !!(a && c) && r !== !1
61
+ ...a(f, l),
62
+ enabled: !!(r && c) && t !== !1
63
63
  });
64
64
  }
65
- function y({ enabled: n } = {}) {
66
- let { client: i, organizationId: a, widgetToken: o, authEpoch: l } = e(), u = !!(a && o) && (n === !0 || n === void 0), d = r({
67
- client: i,
68
- headers: t(a),
65
+ function y({ enabled: e } = {}) {
66
+ let { client: n, organizationId: r, widgetToken: i, authEpoch: l } = o(), u = !!(r && i) && (e === !0 || e === void 0), d = t({
67
+ client: n,
68
+ headers: s(r),
69
69
  query: c
70
70
  });
71
71
  return h({
72
- ...s(d, l),
72
+ ...a(d, l),
73
73
  enabled: u,
74
74
  select: (e) => ({ count: e.data[0]?.metric_value ?? 0 })
75
75
  });
76
76
  }
77
- function b({ filters: n, enabled: i }) {
78
- let { client: a, organizationId: o, widgetToken: l, authEpoch: u } = e(), d = t(o), p = !!(o && l) && (i === !0 || i === void 0), h = m({ queries: n.map((e) => ({
79
- ...s(r({
80
- client: a,
77
+ function b({ filters: e, enabled: n }) {
78
+ let { client: r, organizationId: i, widgetToken: l, authEpoch: u } = o(), d = s(i), p = !!(i && l) && (n === !0 || n === void 0), h = m({ queries: e.map((e) => ({
79
+ ...a(t({
80
+ client: r,
81
81
  headers: d,
82
82
  query: {
83
83
  ...e,
@@ -91,19 +91,19 @@ function b({ filters: n, enabled: i }) {
91
91
  isError: e.isError
92
92
  })), [h]);
93
93
  }
94
- function x(n, { enabled: r = !0, pollWhileOcrProcessing: a = !1, pollWhilePolicyAssignmentUnsettled: o = !1 } = {}) {
95
- let { client: c, organizationId: l, widgetToken: f, authEpoch: p } = e(), m = !!(l && f && n) && r, g = a ? u({
94
+ function x(e, { enabled: t = !0, pollWhileOcrProcessing: r = !1, pollWhilePolicyAssignmentUnsettled: i = !1 } = {}) {
95
+ let { client: c, organizationId: l, widgetToken: f, authEpoch: p } = o(), m = !!(l && f && e) && t, g = r ? u({
96
96
  client: c,
97
97
  organizationId: l,
98
- payableId: n ?? ""
99
- }) : void 0, _ = o ? d({
98
+ payableId: e ?? ""
99
+ }) : void 0, _ = i ? d({
100
100
  client: c,
101
101
  organizationId: l,
102
- payableId: n ?? ""
103
- }) : void 0, v = g ?? _ ?? i({
102
+ payableId: e ?? ""
103
+ }) : void 0, v = g ?? _ ?? n({
104
104
  client: c,
105
- headers: t(l),
106
- path: { payable_id: n ?? "" }
105
+ headers: s(l),
106
+ path: { payable_id: e ?? "" }
107
107
  }), y = g && _ ? {
108
108
  ...v,
109
109
  refetchInterval: (e) => {
@@ -112,7 +112,7 @@ function x(n, { enabled: r = !0, pollWhileOcrProcessing: a = !1, pollWhilePolicy
112
112
  }
113
113
  } : v;
114
114
  return h({
115
- ...s(y, p),
115
+ ...a(y, p),
116
116
  enabled: m
117
117
  });
118
118
  }
@@ -2,20 +2,20 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
- import { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
- import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
5
+ import { getPayablesIdSuggestionsOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
6
+ import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.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 { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
11
  import { useQuery as a } from "@tanstack/react-query";
12
12
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js
13
13
  function o(o, { enabled: s = !0 } = {}) {
14
- let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
14
+ let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = n(), f = !!(l && u && o) && s, p = e({
15
15
  client: c,
16
- headers: t(l),
16
+ headers: r(l),
17
17
  path: { payable_id: o ?? "" }
18
- }), { queryKey: m, queryFn: h } = r(p, d);
18
+ }), { queryKey: m, queryFn: h } = t(p, d);
19
19
  return a({
20
20
  queryKey: m,
21
21
  enabled: f,
@@ -1,13 +1,13 @@
1
- import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
2
- import { getPayablesIdOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
1
+ import { getPayablesIdOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
2
+ import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
3
3
  import "../../../shared/data-access/dist/index.js";
4
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js
5
5
  var n = 2500;
6
6
  function r({ client: n, organizationId: r, payableId: i }) {
7
7
  return {
8
- ...t({
8
+ ...e({
9
9
  client: n,
10
- headers: e(r),
10
+ headers: t(r),
11
11
  path: { payable_id: i }
12
12
  }),
13
13
  refetchInterval: (e) => e.state.data?.ocr_status === "processing" && 2500
@@ -1,35 +1,35 @@
1
- import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
2
- import { getAnalyticsPayablesQueryKey as t, getApprovalRequestsQueryKey as n, getPayablesIdHistoryQueryKey as r, getPayablesIdLineItemsQueryKey as i, getPayablesIdQueryKey as a, getPayablesQueryKey as o, getPaymentRecordsQueryKey as s } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
1
+ import { getAnalyticsPayablesQueryKey as e, getApprovalRequestsQueryKey as t, getPayablesIdHistoryQueryKey as n, getPayablesIdLineItemsQueryKey as r, getPayablesIdQueryKey as i, getPayablesQueryKey as a, getPaymentRecordsQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
2
+ import { organizationHeaders as s } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
3
3
  import "../../../shared/data-access/dist/index.js";
4
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js
5
5
  var c = {
6
6
  metric: "id",
7
7
  aggregation_function: "count"
8
- }, l = ({ client: t, organizationId: n }) => o({
8
+ }, l = ({ client: e, organizationId: t }) => a({
9
+ client: e,
10
+ headers: s(t)
11
+ }), u = ({ client: e, organizationId: n }) => t({
12
+ client: e,
13
+ headers: s(n)
14
+ }), d = ({ client: t, organizationId: n }) => e({
9
15
  client: t,
10
- headers: e(n)
11
- }), u = ({ client: t, organizationId: r }) => n({
12
- client: t,
13
- headers: e(r)
14
- }), d = ({ client: n, organizationId: r }) => t({
15
- client: n,
16
- headers: e(r),
16
+ headers: s(n),
17
17
  query: c
18
- }), f = ({ client: t, organizationId: n, payableId: r }) => a({
19
- client: t,
20
- headers: e(n),
21
- path: { payable_id: r }
22
- }), p = ({ client: t, organizationId: n, payableId: i }) => r({
23
- client: t,
24
- headers: e(n),
25
- path: { payable_id: i }
26
- }), m = ({ client: t, organizationId: n, payableId: r }) => i({
27
- client: t,
28
- headers: e(n),
18
+ }), f = ({ client: e, organizationId: t, payableId: n }) => i({
19
+ client: e,
20
+ headers: s(t),
21
+ path: { payable_id: n }
22
+ }), p = ({ client: e, organizationId: t, payableId: r }) => n({
23
+ client: e,
24
+ headers: s(t),
29
25
  path: { payable_id: r }
30
- }), h = ({ client: t, organizationId: n }) => s({
31
- client: t,
32
- headers: e(n)
26
+ }), m = ({ client: e, organizationId: t, payableId: n }) => r({
27
+ client: e,
28
+ headers: s(t),
29
+ path: { payable_id: n }
30
+ }), h = ({ client: e, organizationId: t }) => o({
31
+ client: e,
32
+ headers: s(t)
33
33
  }), g = "payable", _ = "desc";
34
34
  //#endregion
35
35
  export { _ as NEWEST_REQUEST_FIRST, c as PAYABLE_COUNT_ANALYTICS, g as PAYABLE_OBJECT_TYPE, d as analyticsPayablesInvalidationKey, u as approvalRequestsInvalidationKey, p as payableHistoryInvalidationKey, f as payableInvalidationKey, m as payableLineItemsInvalidationKey, h as payablePaymentRecordsInvalidationKey, l as payablesInvalidationKey };
@@ -1,16 +1,16 @@
1
- import { cancelAllClients as e, invalidateAllClients as t, removeInactiveFromAllClients as n } from "../../../shared/data-access/dist/lib/clientRegistry.js";
2
- import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
3
- import { getApprovalRequests as i, getPayablesId as a, getPayablesIdHistory as o, getPaymentRecords as s } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
1
+ import { getApprovalRequests as e, getPayablesId as t, getPayablesIdHistory as n, getPaymentRecords as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
2
+ import { cancelAllClients as i, invalidateAllClients as a, removeInactiveFromAllClients as o } from "../../../shared/data-access/dist/lib/clientRegistry.js";
3
+ import { organizationHeaders as s } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
4
4
  import "../../../shared/data-access/dist/index.js";
5
5
  import { isLiveScheduledPaymentRecord as c } from "./index3.js";
6
6
  import { NEWEST_REQUEST_FIRST as l, PAYABLE_OBJECT_TYPE as u, analyticsPayablesInvalidationKey as d, approvalRequestsInvalidationKey as f, payableHistoryInvalidationKey as p, payableInvalidationKey as m, payableLineItemsInvalidationKey as h, payablePaymentRecordsInvalidationKey as g, payablesInvalidationKey as _ } from "./index5.js";
7
7
  import { OCR_POLL_INTERVAL_MS as v } from "./index4.js";
8
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
9
- async function y({ client: e, organizationId: n, payableId: r, payableIds: i, deletedPayableIds: a, includeLineItems: o, includeApprovalRequests: s }) {
9
+ async function y({ client: e, organizationId: t, payableId: n, payableIds: r, deletedPayableIds: i, includeLineItems: o, includeApprovalRequests: s }) {
10
10
  let c = {
11
11
  client: e,
12
- organizationId: n
13
- }, l = new Set(a ?? []), u = [.../* @__PURE__ */ new Set([...i ?? [], r])].filter((e) => !!e && !l.has(e)).map((e) => ({
12
+ organizationId: t
13
+ }, l = new Set(i ?? []), u = [.../* @__PURE__ */ new Set([...r ?? [], n])].filter((e) => !!e && !l.has(e)).map((e) => ({
14
14
  ...c,
15
15
  payableId: e
16
16
  })), v = [
@@ -24,61 +24,61 @@ async function y({ client: e, organizationId: n, payableId: r, payableIds: i, de
24
24
  ...o ? [h(e)] : []
25
25
  ])
26
26
  ];
27
- await Promise.all(v.map((e) => t(e))), await Promise.all([...l].map((t) => b({
27
+ await Promise.all(v.map((e) => a(e))), await Promise.all([...l].map((n) => b({
28
28
  client: e,
29
- organizationId: n,
30
- payableId: t
29
+ organizationId: t,
30
+ payableId: n
31
31
  })));
32
32
  }
33
- async function b({ client: t, organizationId: r, payableId: i }) {
34
- if (!i) return;
35
- let a = {
36
- client: t,
37
- organizationId: r,
38
- payableId: i
39
- }, o = [
40
- m(a),
41
- p(a),
42
- h(a)
33
+ async function b({ client: e, organizationId: t, payableId: n }) {
34
+ if (!n) return;
35
+ let r = {
36
+ client: e,
37
+ organizationId: t,
38
+ payableId: n
39
+ }, a = [
40
+ m(r),
41
+ p(r),
42
+ h(r)
43
43
  ];
44
- await Promise.all(o.map((t) => e(t))), o.forEach((e) => n(e));
44
+ await Promise.all(a.map((e) => i(e))), a.forEach((e) => o(e));
45
45
  }
46
- async function x({ client: e, organizationId: n, payableId: r }) {
47
- let i = {
46
+ async function x({ client: e, organizationId: t, payableId: n }) {
47
+ let r = {
48
48
  client: e,
49
- organizationId: n
49
+ organizationId: t
50
50
  };
51
- await Promise.all([t(_(i)), t(d(i))]), await b({
51
+ await Promise.all([a(_(r)), a(d(r))]), await b({
52
52
  client: e,
53
- organizationId: n,
54
- payableId: r
53
+ organizationId: t,
54
+ payableId: n
55
55
  });
56
56
  }
57
57
  var S = 2e4, C = 1e3, w = 1.5, T = 5e3, E = (e) => Math.min(e * w, T), D = /* @__PURE__ */ new Set(["new", "approve_in_progress"]), O = 6e4;
58
- async function k({ client: e, organizationId: n, payableId: r }) {
59
- await t(f({
58
+ async function k({ client: e, organizationId: t, payableId: n }) {
59
+ await a(f({
60
60
  client: e,
61
- organizationId: n
61
+ organizationId: t
62
62
  })), await y({
63
63
  client: e,
64
- organizationId: n,
65
- payableId: r
64
+ organizationId: t,
65
+ payableId: n
66
66
  });
67
67
  }
68
68
  var A = 100;
69
- async function j({ client: e, organizationId: t, payableId: n }) {
69
+ async function j({ client: t, organizationId: n, payableId: r }) {
70
70
  try {
71
- let { data: a } = await i({
72
- client: e,
73
- headers: r(t),
71
+ let { data: i } = await e({
72
+ client: t,
73
+ headers: s(n),
74
74
  query: {
75
- object_id: n,
75
+ object_id: r,
76
76
  object_type: u,
77
77
  order: l,
78
78
  limit: A
79
79
  }
80
80
  });
81
- return (a?.data ?? []).map((e) => `${e.id}:${e.status}`).sort().join(",");
81
+ return (i?.data ?? []).map((e) => `${e.id}:${e.status}`).sort().join(",");
82
82
  } catch {
83
83
  return;
84
84
  }
@@ -95,12 +95,12 @@ async function P(e) {
95
95
  }
96
96
  }
97
97
  var F = "submitted_for_approval", I = 100;
98
- async function L({ client: e, organizationId: t, payableId: n }) {
98
+ async function L({ client: e, organizationId: t, payableId: r }) {
99
99
  try {
100
- let { data: i } = await o({
100
+ let { data: i } = await n({
101
101
  client: e,
102
- headers: r(t),
103
- path: { payable_id: n },
102
+ headers: s(t),
103
+ path: { payable_id: r },
104
104
  query: {
105
105
  sort: "timestamp",
106
106
  order: "asc",
@@ -126,34 +126,34 @@ async function R(e, { requireRoundMarker: t = !1 } = {}) {
126
126
  return t !== void 0 && i === void 0 ? (i = t, o = !0, await a() ? "changed" : "resynced") : (t !== void 0 && t !== i && (o = !0), o && await a() ? "changed" : "unchanged");
127
127
  } };
128
128
  }
129
- async function z({ client: e, organizationId: t, payableId: n, watch: i }) {
130
- let o = Date.now() + O, s = C, c = !1;
131
- for (; !c && Date.now() < o;) {
129
+ async function z({ client: e, organizationId: n, payableId: r, watch: i }) {
130
+ let a = Date.now() + O, o = C, c = !1;
131
+ for (; !c && Date.now() < a;) {
132
132
  await new Promise((e) => {
133
- setTimeout(e, s);
134
- }), s = E(s);
133
+ setTimeout(e, o);
134
+ }), o = E(o);
135
135
  try {
136
- let { data: i } = await a({
136
+ let { data: i } = await t({
137
137
  client: e,
138
- headers: r(t),
139
- path: { payable_id: n }
138
+ headers: s(n),
139
+ path: { payable_id: r }
140
140
  });
141
141
  c = !!(i?.status && !D.has(i.status));
142
142
  } catch {}
143
143
  if (!c) {
144
- let r = await i.poll();
145
- c = r === "changed", r === "resynced" && await y({
144
+ let t = await i.poll();
145
+ c = t === "changed", t === "resynced" && await y({
146
146
  client: e,
147
- organizationId: t,
148
- payableId: n,
147
+ organizationId: n,
148
+ payableId: r,
149
149
  includeApprovalRequests: !0
150
150
  });
151
151
  }
152
152
  }
153
153
  return await y({
154
154
  client: e,
155
- organizationId: t,
156
- payableId: n,
155
+ organizationId: n,
156
+ payableId: r,
157
157
  includeApprovalRequests: !0
158
158
  }), c;
159
159
  }
@@ -199,9 +199,9 @@ async function G({ client: e, organizationId: t, payableId: n }) {
199
199
  let i = /* @__PURE__ */ new Set(), a;
200
200
  try {
201
201
  do {
202
- let { data: o } = await s({
202
+ let { data: o } = await r({
203
203
  client: e,
204
- headers: r(t),
204
+ headers: s(t),
205
205
  query: {
206
206
  limit: U,
207
207
  object_id__in: [n],
@@ -220,53 +220,53 @@ async function G({ client: e, organizationId: t, payableId: n }) {
220
220
  return;
221
221
  }
222
222
  }
223
- async function K({ client: e, organizationId: t, payableId: n }) {
224
- let i = Date.now() + S, o = !1;
225
- for (; !o && Date.now() < i;) {
223
+ async function K({ client: e, organizationId: n, payableId: r }) {
224
+ let i = Date.now() + S, a = !1;
225
+ for (; !a && Date.now() < i;) {
226
226
  await new Promise((e) => {
227
227
  setTimeout(e, C);
228
228
  });
229
229
  try {
230
- let { data: i } = await a({
230
+ let { data: i } = await t({
231
231
  client: e,
232
- headers: r(t),
233
- path: { payable_id: n }
232
+ headers: s(n),
233
+ path: { payable_id: r }
234
234
  });
235
- o = !i?.scheduled_payment_date && await G({
235
+ a = !i?.scheduled_payment_date && await G({
236
236
  client: e,
237
- organizationId: t,
238
- payableId: n
237
+ organizationId: n,
238
+ payableId: r
239
239
  }) === !1;
240
240
  } catch {}
241
241
  }
242
242
  return await y({
243
243
  client: e,
244
- organizationId: t,
245
- payableId: n
246
- }), o;
244
+ organizationId: n,
245
+ payableId: r
246
+ }), a;
247
247
  }
248
248
  var q = 9e4;
249
- async function J({ client: e, organizationId: t, payableId: n }) {
250
- let i = Date.now() + q, o = v, s = !1;
251
- for (; !s && Date.now() < i;) {
249
+ async function J({ client: e, organizationId: n, payableId: r }) {
250
+ let i = Date.now() + q, a = v, o = !1;
251
+ for (; !o && Date.now() < i;) {
252
252
  await new Promise((e) => {
253
- setTimeout(e, o);
254
- }), o = E(o);
253
+ setTimeout(e, a);
254
+ }), a = E(a);
255
255
  try {
256
- let { data: i } = await a({
256
+ let { data: i } = await t({
257
257
  client: e,
258
- headers: r(t),
259
- path: { payable_id: n }
258
+ headers: s(n),
259
+ path: { payable_id: r }
260
260
  });
261
- s = i?.ocr_status !== "processing";
261
+ o = i?.ocr_status !== "processing";
262
262
  } catch {}
263
263
  }
264
264
  return await y({
265
265
  client: e,
266
- organizationId: t,
267
- payableId: n,
266
+ organizationId: n,
267
+ payableId: r,
268
268
  includeLineItems: !0
269
- }), s;
269
+ }), o;
270
270
  }
271
271
  //#endregion
272
272
  export { R as beginApprovalRequestWatch, k as invalidateApprovalDecisionQueries, x as invalidateDeletedPayableQueries, y as invalidatePayableQueries, z as reconcileApprovalDecisionQueries, K as reconcileCancelledPaymentQueries, W as reconcileScheduledPaymentQueries, H as reconcileSubmittedForApprovalQueries, J as reconcileUploadedPayableOcr };
@@ -2,9 +2,9 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
- import { deletePayablesId as n, postPayablesIdCancel as r, postPayablesIdDuplicatesIdConfirm as i, postPayablesIdDuplicatesIdDismiss as a } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
5
+ import { deletePayablesId as e, postPayablesIdCancel as t, postPayablesIdDuplicatesIdConfirm as n, postPayablesIdDuplicatesIdDismiss as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
+ import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
+ import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
8
8
  import "../../../shared/data-access/dist/index.js";
9
9
  import { invalidatePayableQueries as o } from "./index6.js";
10
10
  import { useMutation as s } from "@tanstack/react-query";
@@ -41,35 +41,35 @@ function h(e) {
41
41
  return e.payableIds.length > 0 || e.deletedPayableIds.length > 0;
42
42
  }
43
43
  function g() {
44
- let { client: c, organizationId: l } = e();
44
+ let { client: c, organizationId: l } = i();
45
45
  return s({
46
- mutationFn: async ({ verdict: e, targets: o }) => {
47
- let s = t(l), u = [], d = [], f = () => o.filter((e) => e.matchedPayableId !== void 0 && d.includes(e.payableId) && !d.includes(e.matchedPayableId)).map((e) => e.matchedPayableId), h = () => ({
46
+ mutationFn: async ({ verdict: i, targets: o }) => {
47
+ let s = a(l), u = [], d = [], f = () => o.filter((e) => e.matchedPayableId !== void 0 && d.includes(e.payableId) && !d.includes(e.matchedPayableId)).map((e) => e.matchedPayableId), h = () => ({
48
48
  payableIds: [.../* @__PURE__ */ new Set([...u, ...f()])],
49
49
  deletedPayableIds: [...new Set(d)]
50
50
  });
51
51
  try {
52
- let t = /* @__PURE__ */ new Set();
53
- if (e === p.Remove) {
54
- for (let e of o) if (!t.has(e.payableId)) {
55
- if (t.add(e.payableId), e.removeBy === "delete") {
56
- await n({
52
+ let a = /* @__PURE__ */ new Set();
53
+ if (i === p.Remove) {
54
+ for (let n of o) if (!a.has(n.payableId)) {
55
+ if (a.add(n.payableId), n.removeBy === "delete") {
56
+ await e({
57
57
  client: c,
58
58
  headers: s,
59
- path: { payable_id: e.payableId },
59
+ path: { payable_id: n.payableId },
60
60
  throwOnError: !0
61
- }), d.push(e.payableId);
61
+ }), d.push(n.payableId);
62
62
  continue;
63
63
  }
64
- e.removeBy === "cancel" && (await r({
64
+ n.removeBy === "cancel" && (await t({
65
65
  client: c,
66
66
  headers: s,
67
- path: { payable_id: e.payableId },
67
+ path: { payable_id: n.payableId },
68
68
  throwOnError: !0
69
- }), u.push(e.payableId));
69
+ }), u.push(n.payableId));
70
70
  }
71
71
  }
72
- let l = /* @__PURE__ */ new Set(), f = e === p.Remove ? i : a;
72
+ let l = /* @__PURE__ */ new Set(), f = i === p.Remove ? n : r;
73
73
  for (let e of o) l.has(e.duplicateId) || d.includes(e.payableId) || e.matchedPayableId && d.includes(e.matchedPayableId) || (l.add(e.duplicateId), await f({
74
74
  client: c,
75
75
  headers: s,