@feedmepos/mf-connect 0.1.0-beta.35 → 0.1.0-beta.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 (88) hide show
  1. package/dist/{Analytic-BMdB7x5F.js → Analytic-BfWknG6l.js} +18 -17
  2. package/dist/{App-AakWqQHx.js → App-BG_061Wg.js} +6 -6
  3. package/dist/{Broadcast-Bf5GOV7p.js → Broadcast-DdpNtoOo.js} +8 -8
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBTBapxi.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-od-JjpnA.js} +6 -7
  5. package/dist/{Card-DmxekNts.js → Card-Bnng5ta4.js} +21 -23
  6. package/dist/{Collections-CL7hOycU.js → Collections-DnD4xZ5L.js} +28 -34
  7. package/dist/{Credit-0eGxacBN.js → Credit-DwblaWn4.js} +8 -8
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLWeJ73S.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-COETiGQ4.js} +27 -27
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-q7qJ9Ec5.js → EffectSheet.vue_vue_type_style_index_0_lang-CtEk6tOC.js} +6 -6
  10. package/dist/{Experience-NjmDx3_p.js → Experience-Bkn57rfJ.js} +8 -8
  11. package/dist/{Game-q19qmf8t.js → Game-D0s7bZc-.js} +8 -8
  12. package/dist/{Index-BmzHphDm.js → Index-D7Zj0U5i.js} +9 -9
  13. package/dist/{Marketing-BgL2CqkH.js → Marketing-CLwzvII4.js} +5 -5
  14. package/dist/{Member-DXO7yer0.js → Member-D-JxENNb.js} +4 -4
  15. package/dist/MemberList-CMTSjTu-.js +1537 -0
  16. package/dist/MemberTransactions-BNcHZfcd.js +45 -0
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DFiCQcTe.js → MessageInput.vue_vue_type_script_setup_true_lang-B8x9NfzT.js} +2 -2
  18. package/dist/{Mission-DOdkoytR.js → Mission-B-JhXdXX.js} +8 -8
  19. package/dist/{Overview-Bizp0BGu.js → Overview-BZrK3ETv.js} +20 -21
  20. package/dist/{Point-Bvyg1zuh.js → Point-Njw7VSo9.js} +8 -8
  21. package/dist/{Promotion-B75LcnHm.js → Promotion-DjRs0X1X.js} +9 -9
  22. package/dist/Record-BnZXhR7W.js +337 -0
  23. package/dist/{Reward-l1gt8pwu.js → Reward-pD5qUCNJ.js} +14 -14
  24. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C76emk8A.js → RewardGroup.vue_vue_type_script_setup_true_lang-u8IT5N_z.js} +12 -13
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B4ak1Gem.js → RuleGroup.vue_vue_type_script_setup_true_lang-t7vrHFiH.js} +14 -15
  26. package/dist/{Segment-DJSkWWH8.js → Segment-XKjH6MDU.js} +17 -18
  27. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-ByqgSxPo.js → SelectItems.vue_vue_type_script_setup_true_lang-CqIHHNJg.js} +2 -2
  28. package/dist/{Setting-DTV24iE5.js → Setting-CjKbl-Em.js} +8 -8
  29. package/dist/{Store-C1obQwdr.js → Store-BXKK7Ys3.js} +19 -20
  30. package/dist/{StoreRewards-apMVv0Ca.js → StoreRewards-C8iQ2BTP.js} +12 -12
  31. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DBzA_4gb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JdPqalST.js} +330 -363
  32. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-PxZ5Au5X.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CwfgY4Ft.js} +1 -1
  33. package/dist/{Tier-DSvMUZJG.js → Tier-N95LJoLO.js} +20 -21
  34. package/dist/{Title-CWoqOkd2.js → Title-CpnvvVAV.js} +20 -21
  35. package/dist/{Transaction-CaCsXoB5.js → Transaction-BEN_EeUx.js} +2 -2
  36. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DaT8PyWl.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B3NgCEdV.js} +6 -6
  37. package/dist/{Voucher-BBtDXr9q.js → Voucher-DgxD3oco.js} +11 -11
  38. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BCSO2-oB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-D3c0M6ga.js} +10 -10
  39. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js → ZodTextField.vue_vue_type_script_setup_true_lang-BOJwFLp-.js} +1 -1
  40. package/dist/{app-D8kcy7_R.js → app-D5HD8YMV.js} +1 -1
  41. package/dist/{app-B8JBXu5M.js → app-DGplfyjK.js} +30 -29
  42. package/dist/app.js +1 -1
  43. package/dist/{business-DN4-BTel.js → business-CO2AZHIm.js} +1 -1
  44. package/dist/{dto-D94IgAXy.js → campaign-C6_Zmo0L.js} +610 -818
  45. package/dist/{campaign-Cf6jJz3e.js → campaign-DoM_vfA0.js} +2 -2
  46. package/dist/{campaign.enum-DVOwgVTa.js → campaign.enum-Bkgm7Eui.js} +1 -1
  47. package/dist/{campaign.fn-D8apF_YE.js → campaign.fn-P4ZkJWZ1.js} +30 -30
  48. package/dist/{collectible.enum-DPsEC03C.js → collectible.enum-BP3FWmgp.js} +1 -1
  49. package/dist/{collection.fn-CzeGWVx2.js → collection.fn-B5hTEOhD.js} +2 -2
  50. package/dist/dto-ao87-Ydo.js +214 -0
  51. package/dist/{effect-CDg44P_g.js → effect-BDo1bV-w.js} +1 -1
  52. package/dist/{email-addresses-CDozpvzz.js → email-addresses-B-oXjMbu.js} +1 -1
  53. package/dist/{export-DQLXrn4F.js → export-BJ93wKMJ.js} +3 -3
  54. package/dist/{helper-DJMf--V-.js → helper-DIBaFgT8.js} +1 -1
  55. package/dist/{index-CVV5I3bh.js → index-BBW2oNKe.js} +1 -1
  56. package/dist/index-BLNNEMcq.js +44 -0
  57. package/dist/{index-DvE5xL4s.js → index-BX4S_sse.js} +6 -6
  58. package/dist/{index-BbPavTej.js → index-BY9zfO2Y.js} +3 -3
  59. package/dist/{index-BgXfVzZF.js → index-BxpCMeMY.js} +71 -66
  60. package/dist/{index-BnbkejyF.js → index-C6RWHkGF.js} +1 -1
  61. package/dist/{index-B0n_PU3b.js → index-CFg7ea6S.js} +1 -1
  62. package/dist/{index-V6yWwXYr.js → index-CcIjFlvm.js} +22 -4
  63. package/dist/{index-Df84_Ww3.js → index-DDoUQHWH.js} +2057 -1010
  64. package/dist/{index-BUZR5Bkw.js → index-H_VNJAQv.js} +1 -1
  65. package/dist/index-KkaBP7vA.js +32 -0
  66. package/dist/{index-DrvefOT4.js → index-sx63iBdE.js} +3 -3
  67. package/dist/index-vh86FiIQ.js +10 -0
  68. package/dist/{index.esm2017-C90-ettH.js → index.esm2017-NXs90PMj.js} +1 -1
  69. package/dist/{loading-B56wz_ef.js → loading-Bnuw5L3Y.js} +4 -4
  70. package/dist/{membership-CF1jgR11.js → membership-CZ_y58_j.js} +3 -3
  71. package/dist/{money-BEEp2WdU.js → money-AY6EDrgr.js} +1 -1
  72. package/dist/{number-u7HbwLPt.js → number-BbJ6Kbwi.js} +1 -1
  73. package/dist/{objectid-S3_nH1F7.js → objectid-DUKoXb-Y.js} +5 -5
  74. package/dist/{reward-BUY77BiP.js → reward-CXtVKCBn.js} +1 -1
  75. package/dist/{rule-BdAPBN8_.js → rule-BMKyg1g0.js} +3 -3
  76. package/dist/{rule-builder-z51VUtHk.js → rule-builder-DqRZOJfw.js} +1 -1
  77. package/dist/{template-B_J4Q9D6.js → template-DJpPUC9p.js} +4 -4
  78. package/dist/{trigger-CGrv0M0q.js → trigger-Jo5dHemf.js} +6 -6
  79. package/dist/{xlsx-CL102mzm.js → usePagination-BJSz3wZu.js} +3183 -2962
  80. package/dist/{user-D02jOhtd.js → user-3cRqdGEW.js} +1 -1
  81. package/dist/{vue-i18n-rCSjqg2P.js → vue-i18n-DjADG98J.js} +169 -169
  82. package/package.json +1 -1
  83. package/dist/MemberList-WGMopz-y.js +0 -1044
  84. package/dist/MemberTransactions-DmQgrLdy.js +0 -38
  85. package/dist/Record-BjAbPbiI.js +0 -209
  86. package/dist/index-BmblCnlD.js +0 -38
  87. package/dist/index-DFbITElv.js +0 -1052
  88. package/dist/usePagination-BeF5K3M7.js +0 -223
@@ -1,10 +1,9 @@
1
- import { z as e, F as n, m as o } from "./loading-B56wz_ef.js";
2
- import { c as b } from "./index-DvE5xL4s.js";
3
- import { R as t } from "./rule-builder-z51VUtHk.js";
4
- import { i } from "./helper-DJMf--V-.js";
5
- import { g as v, h as E, i as p } from "./index-Df84_Ww3.js";
6
- import { q as O } from "./index-DFbITElv.js";
7
- import { F as c } from "./index-BbPavTej.js";
1
+ import { z as e, F as n, m as o } from "./loading-Bnuw5L3Y.js";
2
+ import { c as v } from "./index-BX4S_sse.js";
3
+ import { R as t } from "./rule-builder-DqRZOJfw.js";
4
+ import { i } from "./helper-DIBaFgT8.js";
5
+ import { x as E, y as O, z as I, A as p } from "./index-DDoUQHWH.js";
6
+ import { F as r } from "./index-BY9zfO2Y.js";
8
7
  const $ = {
9
8
  PROMOTION: {
10
9
  name: "Promotion Template",
@@ -1749,7 +1748,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1749
1748
  ({
1750
1749
  ...t.scaffoldGroup()
1751
1750
  });
1752
- const I = e.enum([
1751
+ const L = e.enum([
1753
1752
  "MEMBER_REWARD",
1754
1753
  "PAID_LOYALTY",
1755
1754
  "COLLECT_FEEDBACK",
@@ -1759,7 +1758,7 @@ const I = e.enum([
1759
1758
  "BROADCAST",
1760
1759
  "BIRTHDAY",
1761
1760
  "GAME"
1762
- ]), L = e.enum([
1761
+ ]), h = e.enum([
1763
1762
  "text",
1764
1763
  "number",
1765
1764
  "textarea",
@@ -1786,15 +1785,15 @@ const I = e.enum([
1786
1785
  "rule_feedback",
1787
1786
  "rule_birthday",
1788
1787
  "promotion_game_type"
1789
- ]), h = e.object({
1788
+ ]), R = e.object({
1790
1789
  label: e.string().optional(),
1791
1790
  property: e.string().or(e.any()),
1792
- type: L,
1791
+ type: h,
1793
1792
  extras: e.string().optional(),
1794
1793
  isRuleChildren: e.boolean().optional()
1795
- }), R = e.object({
1794
+ }), x = e.object({
1796
1795
  name: e.string().optional(),
1797
- fields: e.array(h),
1796
+ fields: e.array(R),
1798
1797
  condition: e.object({
1799
1798
  not: e.boolean().optional(),
1800
1799
  property: e.string(),
@@ -1802,17 +1801,17 @@ const I = e.enum([
1802
1801
  }).optional()
1803
1802
  }), C = e.object({
1804
1803
  name: e.string(),
1805
- groups: e.array(R)
1804
+ groups: e.array(x)
1806
1805
  });
1807
1806
  e.object({
1808
1807
  _id: n,
1809
1808
  name: e.string(),
1810
1809
  description: e.string().nullish(),
1811
1810
  steps: e.array(C).min(1),
1812
- intention: e.array(I),
1811
+ intention: e.array(L),
1813
1812
  defaultValue: e.any()
1814
1813
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1815
- const x = {
1814
+ const T = {
1816
1815
  collectionName: "Businesses",
1817
1816
  transform: {
1818
1817
  _id: "oid"
@@ -1824,20 +1823,20 @@ e.object({
1824
1823
  name: e.string(),
1825
1824
  credit: e.number(),
1826
1825
  forceSend: e.boolean().optional()
1827
- }).describe(o.describe(x));
1828
- const m = e.enum(["PHONE"]), T = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), D = e.enum(["PENDING", "COMPLETED", "FAILED"]), S = e.enum([
1826
+ }).describe(o.describe(T));
1827
+ const m = e.enum(["PHONE"]), D = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), S = e.enum(["PENDING", "COMPLETED", "FAILED"]), A = e.enum([
1829
1828
  "General",
1830
1829
  "Otp",
1831
1830
  "Marketing",
1832
1831
  "Ordering",
1833
1832
  "MemberInvitation"
1834
- ]), A = e.object({
1833
+ ]), M = e.object({
1835
1834
  type: m
1836
- }), s = A.extend({
1835
+ }), s = M.extend({
1837
1836
  type: e.literal(m.enum.PHONE),
1838
- provider: T,
1839
- usage: S.optional()
1840
- }), M = {
1837
+ provider: D,
1838
+ usage: A.optional()
1839
+ }), w = {
1841
1840
  collectionName: "Notifications",
1842
1841
  transform: { _id: "oid", business: "oid" }
1843
1842
  };
@@ -1848,9 +1847,9 @@ e.object({
1848
1847
  title: e.string().optional(),
1849
1848
  message: e.string(),
1850
1849
  option: s,
1851
- status: D,
1850
+ status: S,
1852
1851
  ref: e.string().optional()
1853
- }).describe(o.describe(M));
1852
+ }).describe(o.describe(w));
1854
1853
  e.object({
1855
1854
  target: e.string(),
1856
1855
  title: e.string().optional(),
@@ -1862,19 +1861,19 @@ e.object({
1862
1861
  phone: e.string(),
1863
1862
  message: e.string()
1864
1863
  });
1865
- const l = e.object({
1864
+ const c = e.object({
1866
1865
  name: e.string(),
1867
1866
  address: e.string()
1868
- }), w = e.object({
1867
+ }), N = e.object({
1869
1868
  filename: e.string(),
1870
1869
  content: e.instanceof(Uint8Array)
1871
1870
  });
1872
1871
  e.object({
1873
- from: l,
1874
- to: e.array(l),
1872
+ from: c,
1873
+ to: e.array(c),
1875
1874
  subject: e.string(),
1876
1875
  html: e.string().optional(),
1877
- attachments: e.array(w).optional()
1876
+ attachments: e.array(N).optional()
1878
1877
  });
1879
1878
  e.object({
1880
1879
  subject: e.string(),
@@ -1915,7 +1914,7 @@ e.enum(["quota"]);
1915
1914
  var d = /* @__PURE__ */ ((a) => (a.marketing = "business::marketing", a.campaign = "business::campaign", a.counter = "business::counter", a.permission = "business::permission", a.role = "business::role", a))(d || {});
1916
1915
  e.nativeEnum(d);
1917
1916
  e.enum(["restaurant"]);
1918
- const N = e.object({
1917
+ const U = e.object({
1919
1918
  label: e.string(),
1920
1919
  subject: e.union([e.string(), e.array(e.string())]),
1921
1920
  actions: e.union([e.string(), e.array(e.string())]),
@@ -1930,7 +1929,7 @@ e.object({
1930
1929
  userId: e.string(),
1931
1930
  email: e.string().nullish(),
1932
1931
  phoneNo: e.string().nullish(),
1933
- permissions: e.array(e.lazy(() => N))
1932
+ permissions: e.array(e.lazy(() => U))
1934
1933
  }).describe(
1935
1934
  o.describe({
1936
1935
  collectionName: "PermissionUsers",
@@ -1945,14 +1944,14 @@ const y = e.object({
1945
1944
  role: e.string().optional(),
1946
1945
  businessId: e.string().optional(),
1947
1946
  restaurantId: e.string().optional()
1948
- }), U = e.function().args(e.any(), y).returns(e.boolean()), F = e.function().args(y).returns(e.promise(e.array(e.any())));
1947
+ }), F = e.function().args(e.any(), y).returns(e.boolean()), P = e.function().args(y).returns(e.promise(e.array(e.any())));
1949
1948
  e.object({
1950
- isAdmin: U,
1951
- getRules: F
1949
+ isAdmin: F,
1950
+ getRules: P
1952
1951
  });
1953
1952
  e.object({
1954
- transactions: e.array(v),
1955
- collections: e.array(E)
1953
+ transactions: e.array(E),
1954
+ collections: e.array(O)
1956
1955
  });
1957
1956
  const u = e.enum([
1958
1957
  "ROCK_PAPER_SCISSOR"
@@ -1986,12 +1985,12 @@ e.object({
1986
1985
  phone: e.string().optional(),
1987
1986
  email: e.string().optional()
1988
1987
  });
1989
- const P = e.enum([
1988
+ const B = e.enum([
1990
1989
  "PENDING",
1991
1990
  "SUCCESS",
1992
1991
  "FAILED",
1993
1992
  "RETRYING"
1994
- ]), B = {
1993
+ ]), G = {
1995
1994
  collectionName: "WebhookLogs",
1996
1995
  transform: {
1997
1996
  _id: "oid",
@@ -2003,30 +2002,35 @@ e.object({
2003
2002
  business: n,
2004
2003
  type: e.string(),
2005
2004
  payload: e.record(e.any()),
2006
- status: P,
2005
+ status: B,
2007
2006
  response: e.any().optional(),
2008
2007
  error: e.string().optional()
2009
- }).describe(o.describe(B));
2010
- const G = e.enum(["AUTO", "MANUAL"]);
2008
+ }).describe(o.describe(G));
2009
+ const H = e.enum(["AUTO", "MANUAL"]);
2011
2010
  e.enum(["IN_PROGRESS", "COMPLETED"]);
2012
2011
  const f = e.object({
2013
2012
  _id: n,
2014
2013
  name: e.string().min(1, "Name is required").max(50),
2015
- type: G,
2016
- event: O.optional()
2017
- }), H = e.object({
2014
+ type: H,
2015
+ event: I.optional()
2016
+ }), V = e.object({
2018
2017
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2019
2018
  to: e.number().int("Must be integer").nullish()
2020
- }), V = e.object({
2021
- threshold: H,
2019
+ }).superRefine((a, b) => {
2020
+ a.from && a.to && a.from > a.to && b.addIssue({
2021
+ code: "custom",
2022
+ message: "Max referral count must be more than min referral count"
2023
+ });
2024
+ }), k = e.object({
2025
+ threshold: V,
2022
2026
  rewards: e.array(n),
2023
- pf_reward: e.array(c).optional()
2024
- }), r = e.object({
2027
+ pf_reward: e.array(r).optional()
2028
+ }), l = e.object({
2025
2029
  id: e.string(),
2026
2030
  name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2027
- rule: b.optional(),
2028
- rewards: e.array(V)
2029
- }), k = {
2031
+ rule: v.optional(),
2032
+ rewards: e.array(k)
2033
+ }), j = {
2030
2034
  collectionName: "ReferralRecords",
2031
2035
  transform: {
2032
2036
  _id: "oid",
@@ -2035,25 +2039,25 @@ const f = e.object({
2035
2039
  referee: "oid",
2036
2040
  refereeReward: "oid"
2037
2041
  }
2038
- }, j = e.object({
2042
+ }, Y = e.object({
2039
2043
  completedAt: e.coerce.date(),
2040
2044
  criteria: n,
2041
2045
  ref: e.string()
2042
- }), Y = e.object({
2046
+ }), K = e.object({
2043
2047
  _id: n,
2044
2048
  business: n,
2045
2049
  referer: n,
2046
2050
  referee: n,
2047
2051
  criteria: e.array(f),
2048
- reward: e.array(r),
2052
+ reward: e.array(l),
2049
2053
  refereeReward: e.array(n).optional(),
2050
- criteria_progress: e.array(j),
2054
+ criteria_progress: e.array(Y),
2051
2055
  status: e.string(),
2052
2056
  pf_referer: p.optional(),
2053
2057
  pf_referee: p.optional(),
2054
- pf_refereeReward: e.array(c).optional()
2055
- }).describe(o.describe(k));
2056
- Y.pick({
2058
+ pf_refereeReward: e.array(r).optional()
2059
+ }).describe(o.describe(j));
2060
+ K.pick({
2057
2061
  _id: !0,
2058
2062
  business: !0,
2059
2063
  referer: !0,
@@ -2068,7 +2072,7 @@ Y.pick({
2068
2072
  photoUrl: !0
2069
2073
  })
2070
2074
  });
2071
- const K = {
2075
+ const W = {
2072
2076
  collectionName: "ReferralProgram",
2073
2077
  transform: {
2074
2078
  _id: "oid",
@@ -2079,9 +2083,9 @@ const K = {
2079
2083
  business: n,
2080
2084
  term_and_condition: e.string().optional(),
2081
2085
  refereeReward: e.array(n).optional(),
2082
- reward: e.array(r),
2086
+ reward: e.array(l),
2083
2087
  criteria: e.array(f)
2084
- }).describe(o.describe(K));
2088
+ }).describe(o.describe(W));
2085
2089
  e.object({
2086
2090
  referer: n,
2087
2091
  referee: n,
@@ -2093,7 +2097,8 @@ e.object({
2093
2097
  business: !0,
2094
2098
  term_and_condition: !0
2095
2099
  }).extend({
2096
- reward: r.optional()
2100
+ reward: l.optional(),
2101
+ pf_refereeReward: e.array(r).optional()
2097
2102
  }),
2098
2103
  referralCount: e.number(),
2099
2104
  successReferralCount: e.number(),
@@ -2108,9 +2113,9 @@ _.extend({
2108
2113
  updateReferralRecord: e.boolean().optional()
2109
2114
  });
2110
2115
  export {
2111
- I as F,
2116
+ L as F,
2112
2117
  $ as T,
2113
- V as a,
2118
+ k as a,
2114
2119
  f as b,
2115
- r as c
2120
+ l as c
2116
2121
  };
@@ -1,4 +1,4 @@
1
- import { g as n, S as I, u as C, b as _ } from "./index-DrvefOT4.js";
1
+ import { g as n, S as I, u as C, b as _ } from "./index-sx63iBdE.js";
2
2
  const c = () => {
3
3
  if (!I.getBusinessId()) throw new Error("Invalid business ID");
4
4
  return C("users");
@@ -1,4 +1,4 @@
1
- import { z as t, F as e, m as i } from "./loading-B56wz_ef.js";
1
+ import { z as t, F as e, m as i } from "./loading-Bnuw5L3Y.js";
2
2
  const n = t.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]), s = {
3
3
  collectionName: "MarketingMaterials",
4
4
  transform: {
@@ -1,11 +1,11 @@
1
- import { g as t, S as n, b as u } from "./index-DrvefOT4.js";
1
+ import { g as t, S as c, b as u } from "./index-sx63iBdE.js";
2
2
  const a = () => {
3
- const e = n.getBusinessId();
3
+ const e = c.getBusinessId();
4
4
  if (!e) throw new Error("Invalid business ID");
5
5
  return u(`businesses/${e}/membership`, {
6
6
  noIdRequired: !0
7
7
  });
8
- }, c = {
8
+ }, i = {
9
9
  async read() {
10
10
  return t(await a().get(""));
11
11
  },
@@ -100,8 +100,26 @@ const a = () => {
100
100
  },
101
101
  async deleteReward(e) {
102
102
  return t(await a().delete(`rewards/${e}`));
103
+ },
104
+ async readCollectionCountByMemberId(e, r) {
105
+ return t(
106
+ await a().get(`/collections/count/${e}`, {
107
+ params: { type: r }
108
+ })
109
+ );
110
+ },
111
+ async readCollectionsByMemberId(e, r, s) {
112
+ const n = t(
113
+ await a().get(`/collections/${e}`, {
114
+ params: { ...r, ...s }
115
+ })
116
+ );
117
+ return {
118
+ meta: n.meta,
119
+ resources: n.resources
120
+ };
103
121
  }
104
122
  };
105
123
  export {
106
- c as m
124
+ i as m
107
125
  };