@feedmepos/mf-connect 0.1.98-beta.45 → 0.1.98-beta.47

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 (115) hide show
  1. package/dist/{App-BX2UE7QI.js → App-JFPlzU0L.js} +8 -8
  2. package/dist/{AuditLogs-Crhi9QVp.js → AuditLogs-Bk6QCZgp.js} +10 -10
  3. package/dist/{Bin-xPurvadn.js → Bin-CHi79olc.js} +8 -8
  4. package/dist/{Broadcast-CUYyGJY-.js → Broadcast-DSicPemE.js} +11 -11
  5. package/dist/{CampaignAnalytic-BfUdUO6Y.js → CampaignAnalytic-B3czdnvb.js} +6 -6
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoXhFyzX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CkC0A-ix.js} +7 -7
  7. package/dist/{Card-CISdGnSl.js → Card-Begf7uD_.js} +20 -20
  8. package/dist/{Collections-N7QyYqC-.js → Collections-BSmTzG4a.js} +8 -8
  9. package/dist/{Credit-DpgSuzmF.js → Credit-BqZ9lr6S.js} +12 -12
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ber_smZ-.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-qMqks3fR.js} +32 -32
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CoJVTW3E.js → EffectSheet.vue_vue_type_style_index_0_lang-Ck2PxSye.js} +6 -6
  12. package/dist/{Experience-DO7c3BW8.js → Experience-i0bu7uAI.js} +12 -12
  13. package/dist/{FileSaver.min-Bjq1OZ_L.js → FileSaver.min-Ck6lXfKM.js} +1 -1
  14. package/dist/{Game-BHtJD6LM.js → Game-Be02GnjR.js} +13 -13
  15. package/dist/GiftCardSetup-DPN3NhND.js +662 -0
  16. package/dist/{Grab-BOMxmAcZ.js → Grab-BKIYI2d-.js} +9 -9
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-bEHeJol7.js → ImageInput.vue_vue_type_script_setup_true_lang-BqylTCHX.js} +1 -1
  18. package/dist/{Index-S2H2GVM8.js → Index-BD_l8T_M.js} +10 -10
  19. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-cgXkx7R_.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cch5RizQ.js} +1 -1
  20. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CQQJuVCF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D3psJutm.js} +1 -1
  21. package/dist/{LoyaltyDashboard-CbwiKazp.js → LoyaltyDashboard-D0eq0Gaw.js} +7 -7
  22. package/dist/{MainLayout-CPS8NNOv.js → MainLayout-C96xSNND.js} +3 -3
  23. package/dist/{Marketing-zIfCm74o.js → Marketing-Bg6DFKg5.js} +4 -4
  24. package/dist/{MarketingMaterialEdit-D8Gj0bOa.js → MarketingMaterialEdit-BYbWgB2R.js} +6 -6
  25. package/dist/Member-B4NAFx8G.js +573 -0
  26. package/dist/MemberImportHistory-Bw-M3Zx-.js +185 -0
  27. package/dist/{MemberList-CzLYfaf5.js → MemberList-DXpa6_Rb.js} +26 -26
  28. package/dist/{MemberTransactions-CeaEuCte.js → MemberTransactions-DEzFrc9e.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BDqO9M6_.js → MessageInput.vue_vue_type_script_setup_true_lang-CFpMazFG.js} +9 -9
  30. package/dist/{Mission-B4UV0vB0.js → Mission-CWeWfTdC.js} +13 -13
  31. package/dist/{Overview-Ddua14pp.js → Overview-CPMN5kuM.js} +3 -3
  32. package/dist/{Overview-DIX5ot1i.js → Overview-De06lJt0.js} +19 -19
  33. package/dist/{Point-CIFEhEU0.js → Point-XfVYDIbj.js} +12 -12
  34. package/dist/{Promotion-DJRRCgsu.js → Promotion-Q646p6RE.js} +13 -13
  35. package/dist/{Queue-PxS_JYvd.js → Queue-BNfc0ySV.js} +11 -11
  36. package/dist/{Record-DbOoWfsG.js → Record-Dx5pZmpm.js} +9 -9
  37. package/dist/{Review-BmUzIF6a.js → Review-BX5Z5ivr.js} +2 -2
  38. package/dist/{ReviewFacebookCallback-ABDk27W_.js → ReviewFacebookCallback-B6GFP04-.js} +5 -5
  39. package/dist/{ReviewGoogleCallback-JiGhuvNs.js → ReviewGoogleCallback-BWgxTbuf.js} +5 -5
  40. package/dist/{Reward-C9JJh35t.js → Reward-DOImZVUL.js} +16 -16
  41. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CoHS8BGv.js → RewardGroup.vue_vue_type_script_setup_true_lang-8fuZmrBK.js} +12 -12
  42. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CH_hNR0X.js → RuleGroup.vue_vue_type_script_setup_true_lang-C9kWB5Zw.js} +15 -15
  43. package/dist/{Segment-BDF6homc.js → Segment-BndDCfLd.js} +25 -25
  44. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CotltnlA.js → SelectItems.vue_vue_type_script_setup_true_lang-DV1X7e-_.js} +2 -2
  45. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dm1Rm5yj.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-O9ohGQxg.js} +13 -13
  46. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Bu3TFRAU.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2knZbHq.js} +4 -4
  47. package/dist/{Setting-I1UmwNUM.js → Setting-DPm0lJmq.js} +14 -14
  48. package/dist/{SettingAdvertisements-BTSCR7Ca.js → SettingAdvertisements-DdPGyRNI.js} +12 -12
  49. package/dist/{Settings-F8t7rjZL.js → Settings-BQPDUWyz.js} +5 -5
  50. package/dist/{Store-DH9SeWMt.js → Store-Cw-c2Wgl.js} +24 -24
  51. package/dist/{StoreRewards-EkAXltsf.js → StoreRewards-CYkHL-h6.js} +15 -15
  52. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CXQyU9vZ.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DClGeare.js} +21 -21
  53. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-lnEbqNTU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DekQ8_F8.js} +2 -2
  54. package/dist/{Tier-DuKpa1Ma.js → Tier-B7QmbFn8.js} +25 -25
  55. package/dist/{Title-DlupKRiB.js → Title-CRM_l4YE.js} +22 -22
  56. package/dist/{Transaction-jCh6b6-e.js → Transaction-C1jXS8Le.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DOvKneyI.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-yPF04Hth.js} +6 -6
  58. package/dist/{Voucher-QOyU02Mg.js → Voucher-Cfh_Wudx.js} +14 -14
  59. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DH3SHPmi.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BkiXzbFh.js} +12 -12
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DA98LDj7.js → ZodTextField.vue_vue_type_script_setup_true_lang-BEFynSZm.js} +2 -2
  61. package/dist/{app-CNi4ejgf.js → app-CEWVaJEZ.js} +502 -447
  62. package/dist/app.js +1 -1
  63. package/dist/{business-D_DxmzRi.js → business-DWLMb2lG.js} +5 -5
  64. package/dist/{campaign-CQOgVXhK.js → campaign-DRJO5ydK.js} +2 -2
  65. package/dist/{campaign-DgLtIuZl.js → campaign-DwYJGuSz.js} +7 -7
  66. package/dist/{campaign.fn-DaygvaVk.js → campaign.fn-CPfN51jT.js} +38 -38
  67. package/dist/{collection.fn-C2FPUyIL.js → collection.fn-j4_hDjjy.js} +2 -2
  68. package/dist/{duplicateCampaign-C1GvaB0K.js → duplicateCampaign-CQ-yfh9b.js} +2 -2
  69. package/dist/{effect-CZW6UzGQ.js → effect-DU8lcl8m.js} +1 -1
  70. package/dist/{email-addresses-C0rpNk69.js → email-addresses-DUpMDrGS.js} +2 -2
  71. package/dist/{export-BljjhGlT.js → export-BFMh5l4w.js} +3 -3
  72. package/dist/{helper-BNVm1awI.js → helper-DSvUKuiG.js} +1 -1
  73. package/dist/{index-BTMG_CZc.js → index--mkEqsYz.js} +5 -4
  74. package/dist/{index-B3VxErFJ.js → index-B-tBxRw2.js} +1 -1
  75. package/dist/{index-_RZ5EbvD.js → index-BVWwOMHO.js} +7 -7
  76. package/dist/{index-ChPTYhTe.js → index-C69TnizM.js} +1 -1
  77. package/dist/{index-BLcxRCDQ.js → index-CDyGueuB.js} +13 -13
  78. package/dist/{index-Bl2Io2q7.js → index-CWEtTfxy.js} +2 -2
  79. package/dist/index-CWbvBvE3.js +137 -0
  80. package/dist/{index-ClMqJYPu.js → index-CrKfbYDf.js} +1194 -1150
  81. package/dist/{index--l25G-H2.js → index-CuyxKvmh.js} +2 -2
  82. package/dist/{index-jN921Dx6.js → index-CvVrgPmm.js} +3 -3
  83. package/dist/{index-CuSyySq9.js → index-CvaF2wtX.js} +1 -1
  84. package/dist/{index-CP9JOHTI.js → index-D-swy6qD.js} +1 -1
  85. package/dist/{index-CTDIDrHN.js → index-D8_jwrSU.js} +14 -14
  86. package/dist/{index-20y5ETqa.js → index-DCbCuJXP.js} +1 -1
  87. package/dist/{index-C41OQn3b.js → index-DD3Jlx01.js} +1 -1
  88. package/dist/{index-IL6JQ0Uk.js → index-DLZ_cPwd.js} +1 -1
  89. package/dist/{index-aRRiC6b9.js → index-rZdY3BW8.js} +7 -7
  90. package/dist/{index.esm2017-D2J5P0Jx.js → index.esm2017-B2wpsz6n.js} +1 -1
  91. package/dist/{loading-fSLeqKr_.js → loading-BHHf9MeD.js} +1 -1
  92. package/dist/{lodash-CanxPAR4.js → lodash-zHycpMIs.js} +1 -1
  93. package/dist/member-import-MTwvl8TG.js +143 -0
  94. package/dist/{membership-BrdyfO2y.js → membership-Ctqa96gd.js} +2 -2
  95. package/dist/{money-W_YTwyxP.js → money-C9m7TfMA.js} +1 -1
  96. package/dist/{number-j1vVuQpy.js → number-ng88zCwj.js} +1 -1
  97. package/dist/{objectid-DhwxE2Ct.js → objectid-BTsufz4u.js} +6 -6
  98. package/dist/{plugins-2XgEvjxm.js → plugins-MY2whJpz.js} +3 -3
  99. package/dist/{reward-Bk3FZbGj.js → reward-DiiV8MQE.js} +1 -1
  100. package/dist/{rule-M9AijHS0.js → rule-C31n55fZ.js} +3 -3
  101. package/dist/{rule-builder-C4yj8l-c.js → rule-builder-BVEerrEc.js} +1 -1
  102. package/dist/{template-BguoWqRC.js → template-CtcRYRZb.js} +6 -6
  103. package/dist/{timezone-DdkTIxnK.js → timezone-Ck4iMIrt.js} +1 -1
  104. package/dist/{transaction.fn-BpfxFtTu.js → transaction.fn-BI0-LgQG.js} +1 -1
  105. package/dist/{trigger-C7MXRREg.js → trigger-_5hAtyky.js} +5 -5
  106. package/dist/{useMarketingMaterialActions-CgJpHDNv.js → useMarketingMaterialActions-CX9qJp_O.js} +3 -3
  107. package/dist/{usePagination-Csc19YZ0.js → usePagination-DZKDMzEh.js} +1 -1
  108. package/dist/{user-DCwNBNr2.js → user-C-Db5JiY.js} +1 -1
  109. package/dist/{vue-i18n-BIpsBqfV.js → vue-i18n-BbF7bmsx.js} +204 -204
  110. package/dist/{xlsx-Esg-74Jx.js → xlsx-CzpvTfCU.js} +1 -1
  111. package/dist/{zod-D9ri6sIU.js → zod-HtL78lno.js} +1 -1
  112. package/package.json +1 -1
  113. package/dist/GiftCardSetup-Dg-kNVsD.js +0 -633
  114. package/dist/Member-Wf4LUqGi.js +0 -281
  115. package/dist/index-sBl1JAut.js +0 -85
@@ -1,281 +0,0 @@
1
- import { defineComponent as L, ref as F, watch as P, resolveComponent as m, openBlock as x, createElementBlock as C, Fragment as R, createElementVNode as b, createVNode as u, unref as n, withCtx as M, renderList as $, createBlock as D, toDisplayString as O, normalizeClass as U, computed as Y, createCommentVNode as q } from "vue";
2
- import "./index-C41OQn3b.js";
3
- import { useDialogChild as H, FmButtonVariant as S, useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
4
- import { u as N } from "./vue-i18n-BIpsBqfV.js";
5
- import "./index-_RZ5EbvD.js";
6
- import "./index-ClMqJYPu.js";
7
- import "./index-Bl2Io2q7.js";
8
- import "./index-jN921Dx6.js";
9
- import { a as A } from "./index-BLcxRCDQ.js";
10
- import "./index--l25G-H2.js";
11
- import { u as g, w as j } from "./xlsx-Esg-74Jx.js";
12
- import { F as z } from "./FileSaver.min-Bjq1OZ_L.js";
13
- import { useCoreStore as G } from "@feedmepos/mf-common";
14
- import { useRouter as W } from "vue-router";
15
- import { m as I } from "./index-sBl1JAut.js";
16
- import { R as E } from "./app-CNi4ejgf.js";
17
- const K = { class: "space-y-8 mb-10" }, X = { class: "flex justify-end" }, Z = {
18
- key: 1,
19
- class: /* @__PURE__ */ U([
20
- "flex items-center",
21
- "border border-fm-color-neutral-gray-300",
22
- "p-16 space-x-16 rounded-md"
23
- ])
24
- }, ee = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, te = /* @__PURE__ */ L({
25
- __name: "ImportMemberDialog",
26
- setup(V) {
27
- const { t: a } = N(), { emitData: v } = H(), c = F(null), _ = F(null), w = F({
28
- resetCollectionExpiryBalance: !0
29
- }), s = [
30
- "Id",
31
- "Name",
32
- "Phone",
33
- "Email",
34
- "Gender",
35
- "CardNo",
36
- "Birthday",
37
- "Credit",
38
- "CreditExpiryDate",
39
- "Exp",
40
- "Point",
41
- "Tier",
42
- "Titles",
43
- "TotalTransaction",
44
- "AvgSpent",
45
- "TotalSpent",
46
- "LastVisit",
47
- "Feedback",
48
- "LastSeasonTierEarned",
49
- "LastSeasonPointEarned",
50
- "JoinedAt",
51
- "JoinedAtLocation",
52
- "VisitFrequency"
53
- ], p = [
54
- {
55
- label: "CSV",
56
- icon: "csv",
57
- value: "csv"
58
- /* csv */
59
- },
60
- {
61
- label: "Excel",
62
- icon: "description",
63
- value: "xlsx"
64
- /* xlsx */
65
- }
66
- ];
67
- async function d(i) {
68
- var t, f;
69
- c.value = ((f = (t = i.target) == null ? void 0 : t.files) == null ? void 0 : f[0]) ?? null;
70
- }
71
- async function y(i) {
72
- switch (i) {
73
- case "csv":
74
- T();
75
- break;
76
- case "xlsx":
77
- h();
78
- break;
79
- }
80
- }
81
- function T() {
82
- const i = new Blob([s.join(",")], {
83
- type: "text/csv;charset=utf-8;"
84
- });
85
- z.saveAs(i, "ImportMemberTemplate.csv");
86
- }
87
- function h() {
88
- const i = g.aoa_to_sheet([s]), t = g.book_new();
89
- g.book_append_sheet(t, i, "Sheet1"), j(t, "ImportMemberTemplate.xlsx");
90
- }
91
- return P(c, () => {
92
- v({ file: c.value, config: w.value });
93
- }), (i, t) => {
94
- const f = m("FmSwitch"), k = m("FmButton"), o = m("FmMenuItem"), l = m("FmMenu"), r = m("FmDropField");
95
- return x(), C(R, null, [
96
- b("div", K, [
97
- t[3] || (t[3] = b("div", { class: "fm-typo-en-body-lg-600" }, "Advanced Setting", -1)),
98
- u(f, {
99
- "model-value": n(w).resetCollectionExpiryBalance ?? !0,
100
- "onUpdate:modelValue": t[0] || (t[0] = (e) => n(w).resetCollectionExpiryBalance = e),
101
- label: "Replace Existing Free Credit",
102
- sublabel: "When enabled, this will clear existing free credit and replace with new values from the import.",
103
- "label-placement": "right"
104
- }, null, 8, ["model-value"])
105
- ]),
106
- b("div", X, [
107
- u(l, null, {
108
- "menu-button": M(() => [
109
- u(k, {
110
- variant: "tertiary",
111
- icon: "download",
112
- label: "Download Template"
113
- })
114
- ]),
115
- default: M(() => [
116
- (x(), C(R, null, $(p, (e) => u(o, {
117
- key: e.value,
118
- icon: e.icon,
119
- label: e.label,
120
- onClick: (B) => y(e.value),
121
- selectable: ""
122
- }, null, 8, ["icon", "label", "onClick"])), 64))
123
- ]),
124
- _: 1
125
- })
126
- ]),
127
- n(c) ? (x(), C("div", Z, [
128
- u(k, {
129
- variant: n(S).Tertiary,
130
- "prepend-icon": "attach_file"
131
- }, null, 8, ["variant"]),
132
- b("p", ee, O(n(c).name), 1),
133
- b("label", {
134
- ref_key: "fileLabelRef",
135
- ref: _,
136
- htmlFor: "file"
137
- }, [
138
- u(k, {
139
- variant: n(S).Plain,
140
- label: n(a)("Replace File"),
141
- onClick: t[2] || (t[2] = () => {
142
- var e;
143
- return (e = n(_)) == null ? void 0 : e.click();
144
- })
145
- }, null, 8, ["variant", "label"]),
146
- b("input", {
147
- id: "file",
148
- accept: ".csv, .xlsx",
149
- class: "hidden",
150
- type: "file",
151
- multiple: "",
152
- onChange: d
153
- }, null, 32)
154
- ], 512)
155
- ])) : (x(), D(r, {
156
- key: 0,
157
- onFileUpload: t[1] || (t[1] = (e) => c.value = e),
158
- accept: ".csv, .xlsx",
159
- "max-file-size": 5e6
160
- }))
161
- ], 64);
162
- };
163
- }
164
- }), ne = { class: "px-24 flex flex-col gap-y-16 pb-24" }, ke = /* @__PURE__ */ L({
165
- __name: "Member",
166
- setup(V) {
167
- var t, f, k;
168
- const a = W(), { t: v } = N(), c = J(), _ = Q(), w = G();
169
- v("connect.loyalty.member.import"), v("connect.navigation.queue");
170
- const s = [
171
- {
172
- label: v("connect.loyalty.member.tabs.member_list"),
173
- value: E["$connect-LOYALTY_MEMBER_LIST"],
174
- actions: (k = (f = (t = w.sessionUser) == null ? void 0 : t.value) == null ? void 0 : f.role) != null && k.isAdmin ? [] : []
175
- }
176
- ], p = Y(() => {
177
- var l, r, e;
178
- return a.currentRoute.value.name != E["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
179
- title: d.value.label,
180
- actions: d.value.actions,
181
- description: void 0
182
- } : (d.value = s[1], {
183
- backButton: !0,
184
- title: v("connect.loyalty.member.title"),
185
- actions: [],
186
- description: `${(l = y.value) == null ? void 0 : l.name} (${(r = y.value) == null ? void 0 : r._id}) (${(e = y.value) == null ? void 0 : e.phoneNumber})`,
187
- onBackButton: async () => {
188
- await a.push({ name: E["$connect-LOYALTY_MEMBER_LIST"] });
189
- }
190
- });
191
- }), d = F(
192
- s.find((o) => o.value === a.currentRoute.value.name) ?? s[0]
193
- ), y = F();
194
- async function T(o) {
195
- await a.push({ name: o });
196
- }
197
- async function h() {
198
- c.open({
199
- title: "Upload File",
200
- closeButton: !0,
201
- dismissAway: !1,
202
- contentComponent: te,
203
- primaryActions: { text: "Import", close: !1 }
204
- }).onPrimary(async (o) => {
205
- if (!o) {
206
- _.open({
207
- type: "error",
208
- title: "Please upload a file"
209
- });
210
- return;
211
- }
212
- const { file: l, config: r } = o;
213
- if (!l)
214
- _.open({
215
- type: "error",
216
- title: "Please upload a file"
217
- });
218
- else {
219
- const e = new FormData();
220
- e.append("file", l), e.append("config", JSON.stringify(r)), await I.import(e), _.open({
221
- type: "info",
222
- title: "Import begins soon. Check Queue for updates.",
223
- action: "View",
224
- onAction: async () => {
225
- await a.push({
226
- name: E["$connect-QUEUE"],
227
- query: { type: [A.enum.MEMBER_IMPORTED] }
228
- });
229
- }
230
- }), c.close();
231
- }
232
- });
233
- }
234
- function i(o) {
235
- switch (o) {
236
- case "import":
237
- h();
238
- break;
239
- case "queue":
240
- a.push({
241
- name: E["$connect-QUEUE"],
242
- query: { type: [A.enum.MEMBER_IMPORTED] }
243
- });
244
- break;
245
- }
246
- }
247
- return P(
248
- () => a.currentRoute.value.name,
249
- async (o) => {
250
- d.value = s.find((r) => r.value === o) ?? s[0];
251
- const l = a.currentRoute.value.params.id;
252
- l && (y.value = await I.readById(l));
253
- },
254
- { immediate: !0 }
255
- ), (o, l) => {
256
- const r = m("FmPageHead"), e = m("FmTabs"), B = m("RouterView");
257
- return x(), C(R, null, [
258
- u(r, {
259
- actions: n(p).actions,
260
- title: n(p).title,
261
- description: n(p).description,
262
- "back-button": n(p).backButton,
263
- "onClick:back": n(p).onBackButton,
264
- "onClick:action": i
265
- }, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
266
- b("div", ne, [
267
- n(a).currentRoute.value.name != n(E)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (x(), D(e, {
268
- key: 0,
269
- "model-value": n(d).value,
270
- items: s,
271
- "onUpdate:modelValue": T
272
- }, null, 8, ["model-value"])) : q("", !0),
273
- u(B)
274
- ])
275
- ], 64);
276
- };
277
- }
278
- });
279
- export {
280
- ke as default
281
- };
@@ -1,85 +0,0 @@
1
- import { g as n, S as w, u as _, b as y } from "./index-BTMG_CZc.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
- };