@feedmepos/mf-connect 0.1.98-beta.15 → 0.1.98-beta.16

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 (138) hide show
  1. package/dist/App-DNXDhULP.js +4782 -0
  2. package/dist/AuditLogs-BNS27IJT.js +2013 -0
  3. package/dist/Bin-Dkjyrbz-.js +166 -0
  4. package/dist/Broadcast-B-fpjVzY.js +266 -0
  5. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-qBcG-vPM.js +120 -0
  6. package/dist/Card-BvVHO8kN.js +910 -0
  7. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  8. package/dist/Collections-BLxPSOJl.js +540 -0
  9. package/dist/Credit-DU-stilH.js +260 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bqnb00zk.js +3377 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CTSfEq5N.js +351 -0
  14. package/dist/Experience-C3tB8hTp.js +259 -0
  15. package/dist/FileSaver.min-EIworvUf.js +74 -0
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  18. package/dist/Game-Dq1ms2fA.js +330 -0
  19. package/dist/Grab-DnSO2oLx.js +300 -0
  20. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-n1r2bgOE.js +145 -0
  21. package/dist/Index-BFIHgW9W.js +259 -0
  22. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-Do7CJZuh.js +48 -0
  24. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-vpJmHgKM.js +18737 -0
  25. package/dist/LoyaltyDashboard-CcBogXzl.js +1082 -0
  26. package/dist/MainLayout-CPNiL_et.js +41 -0
  27. package/dist/Marketing-Bzb1VaVA.js +235 -0
  28. package/dist/MarketingMaterialEdit-8UQNx3mV.js +1035 -0
  29. package/dist/Member-Drb_NVrb.js +280 -0
  30. package/dist/MemberList-wa3JxCVr.js +1601 -0
  31. package/dist/MemberOverview-wL_ailso.js +58 -0
  32. package/dist/MemberTransactions-8qlm-T67.js +45 -0
  33. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BHicaUXs.js +60802 -0
  34. package/dist/Mission-DmWbQmOv.js +334 -0
  35. package/dist/Overview-COEFtf12.js +1079 -0
  36. package/dist/Overview-D7ki-aBA.js +969 -0
  37. package/dist/Point-B0W-BcPA.js +262 -0
  38. package/dist/Promotion-CY16SjmK.js +397 -0
  39. package/dist/Queue-hMur40Xc.js +260 -0
  40. package/dist/Record-Bj7GQP1r.js +342 -0
  41. package/dist/Review-Z1XD6bJK.js +45 -0
  42. package/dist/ReviewFacebookCallback-DirGtKLX.js +248 -0
  43. package/dist/ReviewGoogleCallback-CVC6741e.js +213 -0
  44. package/dist/Reward-DDB5Usau.js +442 -0
  45. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-B-OnKAbx.js +149 -0
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DDHM8NLi.js +1911 -0
  47. package/dist/Segment-Bl0k9fvJ.js +1014 -0
  48. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C33DPiN6.js +181 -0
  49. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-YMpQ-IiW.js +188 -0
  50. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang--Rtf3gRa.js +226 -0
  51. package/dist/Setting-CpD98E2N.js +2047 -0
  52. package/dist/SettingAdvertisements-BZFQu_HI.js +264 -0
  53. package/dist/Settings-CRqlKNsc.js +228 -0
  54. package/dist/Store-CDG2_iqc.js +1996 -0
  55. package/dist/StoreRewards-DIU5hPXv.js +540 -0
  56. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B82RH_ZC.js +1133 -0
  57. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DKGCmk5y.js +7007 -0
  58. package/dist/Tier-BXgIdYDa.js +969 -0
  59. package/dist/Title-DgHxyV8p.js +566 -0
  60. package/dist/Transaction-iDacnm6Y.js +39 -0
  61. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-RUbR6pdK.js +130 -0
  62. package/dist/Voucher-C-I8JK4F.js +421 -0
  63. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BUpYZxij.js +421 -0
  64. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-LhG5jJq3.js +56 -0
  65. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  66. package/dist/app-CyNzTZOx.js +59950 -0
  67. package/dist/app-wDQR6dpb.js +39 -0
  68. package/dist/app.js +7 -0
  69. package/dist/business-o_sAO_33.js +82 -0
  70. package/dist/campaign--IUcyI8h.js +219 -0
  71. package/dist/campaign-CpzFl8Vr.js +4 -0
  72. package/dist/campaign-zLKyql03.js +277 -0
  73. package/dist/campaign.enum-CEbNgaGZ.js +26 -0
  74. package/dist/campaign.fn-BVT0m6Uy.js +776 -0
  75. package/dist/collectible.enum-2y8KIQLL.js +19 -0
  76. package/dist/duplicateCampaign-DIzdQf0e.js +51 -0
  77. package/dist/effect-B6gKaH4T.js +89 -0
  78. package/dist/email-addresses-CO9GNnUN.js +705 -0
  79. package/dist/export-DdDpRFVg.js +97 -0
  80. package/dist/feedme.ico +0 -0
  81. package/dist/google-BQK68wbe.js +5 -0
  82. package/dist/helper-DqypCsTm.js +86 -0
  83. package/dist/index-BK0OmX3R.js +85 -0
  84. package/dist/index-Bc7JXl59.js +54 -0
  85. package/dist/index-BgiIGrLb.js +32 -0
  86. package/dist/index-C-TiT9bf.js +1157 -0
  87. package/dist/index-COXmoOd1.js +3678 -0
  88. package/dist/index-CT6uJJ9y.js +151 -0
  89. package/dist/index-Ci2gFCfD.js +61 -0
  90. package/dist/index-CtJ0MQQ1.js +3 -0
  91. package/dist/index-CuvNtC_M.js +61 -0
  92. package/dist/index-D41Xq5qY.js +8910 -0
  93. package/dist/index-DBD_e_yR.js +31 -0
  94. package/dist/index-DDpz9LmI.js +67 -0
  95. package/dist/index-Dh2apeby.js +2819 -0
  96. package/dist/index-DiDmMG_M.js +28900 -0
  97. package/dist/index-pjXQwa0j.js +30289 -0
  98. package/dist/index-vh86FiIQ.js +10 -0
  99. package/dist/index.esm2017-Cd4FhecE.js +3069 -0
  100. package/dist/loading-D-RglDMV.js +72 -0
  101. package/dist/lodash-cggYhL9V.js +3678 -0
  102. package/dist/membership-DTfMyKwP.js +255 -0
  103. package/dist/moment-D7p2TMB-.js +2583 -0
  104. package/dist/money-fGZfbdgV.js +15 -0
  105. package/dist/number-BOalh3ZH.js +12 -0
  106. package/dist/object-BYyQ0PZp.js +18 -0
  107. package/dist/objectId-dwaoBfJX.js +7 -0
  108. package/dist/objectid-zPJFVngY.js +145 -0
  109. package/dist/plugins-CbpvMMOJ.js +1788 -0
  110. package/dist/reward-DkVAHEq2.js +36 -0
  111. package/dist/rule-EzWg2u8d.js +1969 -0
  112. package/dist/string-Gcy5IM_H.js +32 -0
  113. package/dist/style.css +4 -0
  114. package/dist/template-BfVFq4on.js +188 -0
  115. package/dist/tier-BJDhpH6X.js +4 -0
  116. package/dist/tiers/tier=1.png +0 -0
  117. package/dist/tiers/tier=2.png +0 -0
  118. package/dist/tiers/tier=3.png +0 -0
  119. package/dist/tiers/tier=4.png +0 -0
  120. package/dist/titles/type=diamond.png +0 -0
  121. package/dist/titles/type=drinks.png +0 -0
  122. package/dist/titles/type=food.png +0 -0
  123. package/dist/titles/type=heart.png +0 -0
  124. package/dist/titles/type=medal.png +0 -0
  125. package/dist/titles/type=spend.png +0 -0
  126. package/dist/titles/type=thank-you.png +0 -0
  127. package/dist/titles/type=thumbs-up.png +0 -0
  128. package/dist/titles/type=years.png +0 -0
  129. package/dist/trigger-es-_uiSg.js +213 -0
  130. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  131. package/dist/type_drinks-D6jnpvwV.js +4 -0
  132. package/dist/useMarketingMaterialActions-CpiIKMmG.js +107 -0
  133. package/dist/usePagination-SYsXgU6x.js +220 -0
  134. package/dist/user-DUe40u3g.js +55 -0
  135. package/dist/vue-i18n-Dn9zxRuv.js +2365 -0
  136. package/dist/xlsx-DugGi7dB.js +15491 -0
  137. package/dist/zod-Dw8_B6RC.js +91 -0
  138. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ var g = Object.defineProperty;
2
+ var b = (s, e, o) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
+ var d = (s, e, o) => b(s, typeof e != "symbol" ? e + "" : e, o);
4
+ import { u as a, w as f } from "./xlsx-DugGi7dB.js";
5
+ import { u as h } from "./loading-D-RglDMV.js";
6
+ import { h as x } from "./moment-D7p2TMB-.js";
7
+ import { m as w } from "./index-CT6uJJ9y.js";
8
+ class y {
9
+ constructor() {
10
+ d(this, "records", []);
11
+ }
12
+ addRecord(e) {
13
+ this.records.push(e);
14
+ }
15
+ addRecords(e) {
16
+ this.records.push(...e);
17
+ }
18
+ buildExcel() {
19
+ const e = a.json_to_sheet(this.records), o = a.book_new();
20
+ return a.book_append_sheet(o, e, "Sheet1"), o;
21
+ }
22
+ }
23
+ class k extends y {
24
+ }
25
+ const r = {
26
+ sortBy: "_id",
27
+ descending: !1,
28
+ rowsPerPage: 1e3,
29
+ page: 1,
30
+ rowsNumber: 0
31
+ }, { minor: _ } = h;
32
+ async function S({
33
+ exporter: s,
34
+ readFunction: e,
35
+ transformRecord: o,
36
+ filename: t
37
+ }) {
38
+ const c = (await e({
39
+ limit: 1,
40
+ skip: 0,
41
+ sortBy: r.sortBy,
42
+ descending: r.descending
43
+ })).meta.totalResources ?? 0, n = r.rowsPerPage;
44
+ await _(
45
+ async () => {
46
+ for (let i = 0; i < c; i += n) {
47
+ const m = {
48
+ ...r,
49
+ limit: n,
50
+ skip: r.page - 1,
51
+ sortBy: r.sortBy,
52
+ descending: r.descending
53
+ }, p = await e(m);
54
+ for (const l of p.resources) {
55
+ const u = o(l);
56
+ s.addRecord(u);
57
+ }
58
+ r.page++;
59
+ }
60
+ await f(
61
+ s.buildExcel(),
62
+ `${t}-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
63
+ {
64
+ bookType: "xlsx",
65
+ bookSST: !1,
66
+ type: "array"
67
+ }
68
+ ), r.page = 1;
69
+ },
70
+ {
71
+ message: `Exporting ${t}...`,
72
+ successMessage: `${t} exported successfully`
73
+ }
74
+ );
75
+ }
76
+ async function E() {
77
+ return S({
78
+ exporter: new k(),
79
+ readFunction: w.readCards,
80
+ transformRecord: (s) => {
81
+ var e, o;
82
+ return {
83
+ CardNumber: s.serialNumber || "",
84
+ MemberId: ((e = s.pf_member) == null ? void 0 : e._id.toString()) || "",
85
+ Phone: ((o = s.pf_member) == null ? void 0 : o.phoneNumber) || "",
86
+ RedeemedAt: s.redeemedAt ? x(s.redeemedAt).format("DD/MM/YYYY") : ""
87
+ };
88
+ },
89
+ filename: "cards"
90
+ });
91
+ }
92
+ export {
93
+ y as B,
94
+ k as C,
95
+ E as a,
96
+ S as e
97
+ };
Binary file
@@ -0,0 +1,5 @@
1
+ const c = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%231877F2'%3e%3cpath%20d='M24%2012.073c0-6.627-5.373-12-12-12s-12%205.373-12%2012c0%205.99%204.388%2010.954%2010.125%2011.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007%201.792-4.669%204.533-4.669%201.312%200%202.686.235%202.686.235v2.953H15.83c-1.491%200-1.956.925-1.956%201.874v2.25h3.328l-.532%203.47h-2.796v8.385C19.612%2023.027%2024%2018.062%2024%2012.073z'/%3e%3c/svg%3e", l = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3e%3cpath%20fill='%23EA4335'%20d='M24%209.5c3.14%200%205.95%201.08%208.17%202.86l6.08-6.08C34.46%203.1%2029.5%201%2024%201%2014.82%201%206.96%206.48%203.22%2014.44l7.08%205.5C12.08%2013.66%2017.58%209.5%2024%209.5z'/%3e%3cpath%20fill='%234285F4'%20d='M46.52%2024.5c0-1.64-.15-3.22-.42-4.74H24v8.98h12.7c-.55%202.96-2.2%205.46-4.68%207.14l7.18%205.58C43.18%2037.36%2046.52%2031.38%2046.52%2024.5z'/%3e%3cpath%20fill='%23FBBC05'%20d='M10.3%2028.56A14.56%2014.56%200%200%201%209.5%2024c0-1.58.27-3.1.76-4.52l-7.08-5.5A23.94%2023.94%200%200%200%200%2024c0%203.86.92%207.5%202.56%2010.72l7.74-6.16z'/%3e%3cpath%20fill='%2334A853'%20d='M24%2047c5.5%200%2010.12-1.82%2013.48-4.94l-7.18-5.58c-1.82%201.22-4.14%201.94-6.3%201.94-6.42%200-11.92-4.16-13.7-9.86l-7.74%206.16C6.96%2041.52%2014.82%2047%2024%2047z'/%3e%3cpath%20fill='none'%20d='M0%200h48v48H0z'/%3e%3c/svg%3e";
2
+ export {
3
+ c as f,
4
+ l as g
5
+ };
@@ -0,0 +1,86 @@
1
+ import { k as l } from "./index-D41Xq5qY.js";
2
+ function u(t, e) {
3
+ switch (t) {
4
+ case "COIN":
5
+ case "CREDIT":
6
+ case "POINT":
7
+ case "TIER":
8
+ case "TITLE":
9
+ return {
10
+ business: e.business,
11
+ name: e.name || "",
12
+ stackable: !0,
13
+ type: t,
14
+ options: {}
15
+ };
16
+ case "GAME":
17
+ return {
18
+ business: e.business,
19
+ name: e.name || "",
20
+ stackable: !1,
21
+ type: t,
22
+ options: {},
23
+ extras: {
24
+ gameType: "FORTUNE_WHEEL"
25
+ }
26
+ };
27
+ case "VOUCHER":
28
+ return {
29
+ business: e.business,
30
+ name: e.name || "",
31
+ stackable: !1,
32
+ type: "VOUCHER",
33
+ options: {
34
+ enableTransfer: !1,
35
+ maxPerUser: null,
36
+ maxReceive: null,
37
+ maxUse: 1,
38
+ cooldown: 0,
39
+ validityOption: {}
40
+ },
41
+ extras: {
42
+ effect: null,
43
+ targetLocation: null
44
+ },
45
+ noCampaign: e.noCampaign === !0
46
+ };
47
+ case "STAMP":
48
+ return {
49
+ business: e.business,
50
+ name: e.name || "STAMP",
51
+ stackable: !0,
52
+ type: "STAMP",
53
+ options: {
54
+ maxPerUser: 1,
55
+ validityOption: {
56
+ followFirstReceive: !0
57
+ }
58
+ }
59
+ };
60
+ default:
61
+ throw new Error("Invalid collectible type");
62
+ }
63
+ }
64
+ function c(t) {
65
+ const { validAfter: e, validBefore: s } = t, { validForDay: a } = t, n = l(e).toDate(), r = l(s).toDate();
66
+ return e && s ? `${n.toLocaleDateString()} - ${r.toLocaleDateString()}` : e ? `Starts from ${n.toLocaleDateString()}` : s ? `Ends at ${r.toLocaleDateString()}` : a != null ? `Expires in ${a || "the same"} day${a > 1 ? "s" : ""} after claim` : "Always valid";
67
+ }
68
+ function i(t, e, s, a = !0) {
69
+ if (!t) return a;
70
+ const n = t[e];
71
+ return n ? n[s] ?? a : a;
72
+ }
73
+ function E(t, e) {
74
+ return t ? i(t, e, "selectable", !1) : e === "STORE_BUNDLE:DEFAULT";
75
+ }
76
+ const b = {
77
+ "STORE_BUNDLE:DEFAULT": { selectable: !1 },
78
+ "STORE_BUNDLE:FEEDVIBE": { selectable: !0, editable: !1, deletable: !1 }
79
+ };
80
+ export {
81
+ b as F,
82
+ E as a,
83
+ i as h,
84
+ u as i,
85
+ c as t
86
+ };
@@ -0,0 +1,85 @@
1
+ import { g as n, S as w, u as _, b as y } from "./index-DiDmMG_M.js";
2
+ const r = () => {
3
+ if (!w.getBusinessId()) throw new Error("Invalid business ID");
4
+ return _("users");
5
+ }, a = () => {
6
+ const e = w.getBusinessId();
7
+ if (!e) throw new Error("Invalid business ID");
8
+ return y(`businesses/${e}/membership`, {
9
+ noIdRequired: !0
10
+ });
11
+ }, C = (e) => {
12
+ var s, t, c, o, i, u, p, m, d, l, b, I;
13
+ return {
14
+ ...e,
15
+ collection_TIER_0_balance: ((c = (t = (s = e.collection) == null ? void 0 : s.TIER) == null ? void 0 : t[0]) == null ? void 0 : c.balance) ?? 0,
16
+ collection_CREDIT_0_balance: ((u = (i = (o = e.collection) == null ? void 0 : o.CREDIT) == null ? void 0 : i[0]) == null ? void 0 : u.balance) ?? 0,
17
+ collection_COIN_0_balance: ((d = (m = (p = e.collection) == null ? void 0 : p.COIN) == null ? void 0 : m[0]) == null ? void 0 : d.balance) ?? 0,
18
+ collection_TITLE_0_title: ((I = (b = (l = e.collection) == null ? void 0 : l.TITLE) == null ? void 0 : b[0]) == null ? void 0 : I.title) ?? ""
19
+ };
20
+ }, E = {
21
+ async read(e) {
22
+ const s = n(
23
+ await r().get("", { params: e })
24
+ ), t = s.resources.map(C);
25
+ return {
26
+ meta: s.meta,
27
+ resources: t
28
+ };
29
+ },
30
+ async readCursor(e) {
31
+ const s = n(
32
+ await r().get("cursor", { params: e })
33
+ ), t = s.resources.map(C);
34
+ return {
35
+ meta: s.meta,
36
+ resources: t
37
+ };
38
+ },
39
+ async readById(e) {
40
+ return n(await r().get(`${e}`));
41
+ },
42
+ async sendCredit(e, s) {
43
+ return n(
44
+ await a().post(
45
+ `members/${e}/send-credit`,
46
+ s
47
+ )
48
+ );
49
+ },
50
+ async deductCredit(e, s) {
51
+ return n(
52
+ await a().post(
53
+ `members/${e}/deduct-credit`,
54
+ s
55
+ )
56
+ );
57
+ },
58
+ async sendCoin(e, s) {
59
+ return n(
60
+ await a().post(
61
+ `members/${e}/send-coin`,
62
+ s
63
+ )
64
+ );
65
+ },
66
+ async deductCoin(e, s) {
67
+ return n(
68
+ await a().post(
69
+ `members/${e}/deduct-coin`,
70
+ s
71
+ )
72
+ );
73
+ },
74
+ async updateMember(e, s) {
75
+ return n(
76
+ await r().put(`${e}`, s)
77
+ );
78
+ },
79
+ async import(e) {
80
+ return await r().post("import", e);
81
+ }
82
+ };
83
+ export {
84
+ E as m
85
+ };
@@ -0,0 +1,54 @@
1
+ import { F as o, e as t, f as a } from "./index-D41Xq5qY.js";
2
+ import { z as e, F as i, m as d } from "./index-pjXQwa0j.js";
3
+ import { F as c } from "./collectible.enum-2y8KIQLL.js";
4
+ const l = e.enum(["VOUCHER", "LOYALTY"]), n = e.object({
5
+ type: e.literal(l.enum.VOUCHER),
6
+ collectible: i,
7
+ collectibleConfig: e.lazy(() => o._def.right.options[0]),
8
+ earningOption: e.lazy(() => t)
9
+ }), s = e.object({
10
+ type: e.literal(l.enum.LOYALTY),
11
+ collectibleType: c,
12
+ collectible: i,
13
+ earningOption: e.lazy(() => t),
14
+ validityOption: e.lazy(() => a)
15
+ }), r = e.discriminatedUnion("type", [
16
+ n,
17
+ s
18
+ ]), p = e.discriminatedUnion("type", [
19
+ n.extend({
20
+ collectible: i.nullish(),
21
+ business: i.nullish()
22
+ }),
23
+ s.extend({
24
+ collectible: i.nullish(),
25
+ collectibleConfig: o.nullish(),
26
+ business: i.nullish()
27
+ })
28
+ ]), m = {
29
+ collectionName: "RewardTemplates",
30
+ transform: {
31
+ _id: "oid",
32
+ business: "oid",
33
+ deletedAt: "date"
34
+ }
35
+ }, b = e.object({
36
+ _id: i,
37
+ business: i,
38
+ name: e.string(),
39
+ option: r,
40
+ deletedAt: e.date().optional(),
41
+ collectibleConfig: e.lazy(() => o.nullish())
42
+ }).describe(d.describe(m)), u = b.extend({
43
+ _id: i.nullish(),
44
+ business: i.nullish(),
45
+ option: p,
46
+ name: e.string().min(1, { message: "Name is required" })
47
+ });
48
+ u.extend({
49
+ updateCollection: e.boolean().optional()
50
+ });
51
+ export {
52
+ u as F,
53
+ b as a
54
+ };
@@ -0,0 +1,32 @@
1
+ import { g as s, S as o, b as i } from "./index-DiDmMG_M.js";
2
+ const a = () => {
3
+ const r = o.getBusinessId();
4
+ if (!r) throw new Error("Invalid business ID");
5
+ return i(`businesses/${r}/referral`, {
6
+ noIdRequired: !0
7
+ });
8
+ }, u = {
9
+ async read() {
10
+ return s(await a().get(""));
11
+ },
12
+ async update(r) {
13
+ return s(await a().put("", r));
14
+ },
15
+ async readRecords(r) {
16
+ const e = s(
17
+ await a().get("records", { params: r })
18
+ ), t = e.resources.map((n) => ({
19
+ ...n
20
+ }));
21
+ return {
22
+ meta: e.meta,
23
+ resources: t
24
+ };
25
+ },
26
+ async updateCriteriaProgress(r, e) {
27
+ return s(await a().post(`/records/${r}/progress`, e));
28
+ }
29
+ };
30
+ export {
31
+ u as r
32
+ };