@feedmepos/mf-connect 0.1.58-prod → 0.1.59-prod

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 (129) hide show
  1. package/dist/Analytic-1heLfSqq.js +427 -0
  2. package/dist/App-BOM2IfBO.js +4630 -0
  3. package/dist/Bin-BgYzSjrq.js +166 -0
  4. package/dist/Broadcast-DHeN_79K.js +233 -0
  5. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DFOIbmI6.js +121 -0
  6. package/dist/Card-CuJ7bMy5.js +911 -0
  7. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  8. package/dist/Collections-D1FRwIRi.js +458 -0
  9. package/dist/Credit-CeYpgCod.js +228 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B8lOyyAc.js +2194 -0
  12. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-De2lhmbT.js +348 -0
  13. package/dist/Experience-D-tJxul7.js +229 -0
  14. package/dist/FileSaver.min-NlMItPOc.js +74 -0
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  16. package/dist/Game-BOmYWwRj.js +284 -0
  17. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  18. package/dist/Index-CRBYEPFf.js +259 -0
  19. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  20. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
  21. package/dist/MainLayout-B1aJoR95.js +41 -0
  22. package/dist/Marketing-D7WunOsO.js +319 -0
  23. package/dist/Member-iYAPEdoQ.js +279 -0
  24. package/dist/MemberList-CtR-UjtG.js +1607 -0
  25. package/dist/MemberOverview-wL_ailso.js +58 -0
  26. package/dist/MemberTransactions-BMQOdkr2.js +45 -0
  27. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DhJlcYpw.js +60553 -0
  28. package/dist/Mission-DSBH4Di0.js +302 -0
  29. package/dist/Overview-C0KCN3fH.js +1079 -0
  30. package/dist/Point-AN7wmCXY.js +232 -0
  31. package/dist/Promotion-Cbf4W6Vh.js +289 -0
  32. package/dist/Queue-Bo_RtLpU.js +260 -0
  33. package/dist/Record-BphvsxDb.js +341 -0
  34. package/dist/Reward-CgHUAB5V.js +442 -0
  35. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-DaBRd_Kw.js +150 -0
  36. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-C_65qxpU.js +1763 -0
  37. package/dist/Segment-Cc0D6nPj.js +882 -0
  38. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BxUG7_bX.js +181 -0
  39. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-bqKHjikC.js +188 -0
  40. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DA7bevEn.js +147 -0
  41. package/dist/Setting-DjVTTqky.js +1918 -0
  42. package/dist/SettingAdvertisements-BL81KD_S.js +262 -0
  43. package/dist/Store-DqXIQ9EY.js +1842 -0
  44. package/dist/StoreRewards-xlzAHJkc.js +423 -0
  45. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-OphuWknh.js +995 -0
  46. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DGSjAbol.js +139 -0
  47. package/dist/Tier-DadaaAEc.js +895 -0
  48. package/dist/Title-BDBxQMEm.js +566 -0
  49. package/dist/Transaction-BRGCw9Va.js +39 -0
  50. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-qe26FZBo.js +130 -0
  51. package/dist/Voucher-CtvWJfVU.js +384 -0
  52. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dS7n6KJt.js +419 -0
  53. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-ndun9vf-.js +56 -0
  54. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  55. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  56. package/dist/app-9QTXPjre.js +57962 -0
  57. package/dist/app-UNZJVzly.js +7094 -0
  58. package/dist/app-wDQR6dpb.js +39 -0
  59. package/dist/app.js +6 -0
  60. package/dist/business-DtufpzhR.js +82 -0
  61. package/dist/campaign-63K4Xtsd.js +94 -0
  62. package/dist/campaign-CpzFl8Vr.js +4 -0
  63. package/dist/campaign-Dm85zK-z.js +1810 -0
  64. package/dist/campaign.enum-DBWgoidX.js +20 -0
  65. package/dist/campaign.fn-BpifzSGC.js +758 -0
  66. package/dist/collectible.enum-2_2_6r39.js +19 -0
  67. package/dist/collection.fn-B2rlSiv_.js +26 -0
  68. package/dist/dto-Df83CuN3.js +216 -0
  69. package/dist/effect-BUEqEGkq.js +78 -0
  70. package/dist/email-addresses-BUNKzO1f.js +705 -0
  71. package/dist/export-BzY3BDZJ.js +97 -0
  72. package/dist/feedme.ico +0 -0
  73. package/dist/helper-BaJdC23g.js +71 -0
  74. package/dist/index-BA5QwPCT.js +146 -0
  75. package/dist/index-BInlN52T.js +54 -0
  76. package/dist/index-BLjKPiBb.js +44 -0
  77. package/dist/index-BQTPw5fM.js +30076 -0
  78. package/dist/index-BSQCStAn.js +38 -0
  79. package/dist/index-Bzv6BHPk.js +32269 -0
  80. package/dist/index-C0XYFg_a.js +3077 -0
  81. package/dist/index-CuvNtC_M.js +61 -0
  82. package/dist/index-D_hUHpqX.js +31 -0
  83. package/dist/index-DlwtDkgr.js +32 -0
  84. package/dist/index-DrAbySpd.js +8859 -0
  85. package/dist/index-JxOM03oW.js +3 -0
  86. package/dist/index-X9YonBq5.js +76 -0
  87. package/dist/index-gvl1UKmI.js +2134 -0
  88. package/dist/index-vh86FiIQ.js +10 -0
  89. package/dist/index-zy0pOMPl.js +121 -0
  90. package/dist/index.esm2017-WVBFvkg-.js +3069 -0
  91. package/dist/loading-CKbcLJje.js +71 -0
  92. package/dist/lodash-B5I3zXaY.js +3678 -0
  93. package/dist/membership-BMv4jrI_.js +235 -0
  94. package/dist/moment-D7p2TMB-.js +2583 -0
  95. package/dist/money-iY-Nby0p.js +15 -0
  96. package/dist/number-CluL-GzZ.js +12 -0
  97. package/dist/object-qECH92oz.js +26 -0
  98. package/dist/objectId-dwaoBfJX.js +7 -0
  99. package/dist/objectid-sIFo0b00.js +145 -0
  100. package/dist/plugins-BlvUeMc1.js +208 -0
  101. package/dist/reward-CZlHuvJJ.js +36 -0
  102. package/dist/rule-DMH3fchR.js +1951 -0
  103. package/dist/rule-builder-BvBTYyZq.js +102 -0
  104. package/dist/style.css +4 -0
  105. package/dist/template-CzqV_mzm.js +190 -0
  106. package/dist/tier-BJDhpH6X.js +4 -0
  107. package/dist/tiers/tier=1.png +0 -0
  108. package/dist/tiers/tier=2.png +0 -0
  109. package/dist/tiers/tier=3.png +0 -0
  110. package/dist/tiers/tier=4.png +0 -0
  111. package/dist/timezone-Bo8HWoc4.js +1151 -0
  112. package/dist/titles/type=diamond.png +0 -0
  113. package/dist/titles/type=drinks.png +0 -0
  114. package/dist/titles/type=food.png +0 -0
  115. package/dist/titles/type=heart.png +0 -0
  116. package/dist/titles/type=medal.png +0 -0
  117. package/dist/titles/type=spend.png +0 -0
  118. package/dist/titles/type=thank-you.png +0 -0
  119. package/dist/titles/type=thumbs-up.png +0 -0
  120. package/dist/titles/type=years.png +0 -0
  121. package/dist/trigger-BGG22zoh.js +144 -0
  122. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  123. package/dist/type_drinks-D6jnpvwV.js +4 -0
  124. package/dist/usePagination-Ds-cuHop.js +223 -0
  125. package/dist/user-DesAMEEX.js +54 -0
  126. package/dist/vue-i18n-CN3WXgAO.js +2365 -0
  127. package/dist/xlsx-BKuxyTY9.js +15491 -0
  128. package/dist/zod-Bg2FbC-D.js +90 -0
  129. 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-BKuxyTY9.js";
5
+ import { u as h } from "./loading-CKbcLJje.js";
6
+ import { h as x } from "./moment-D7p2TMB-.js";
7
+ import { m as w } from "./index-BA5QwPCT.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,71 @@
1
+ import { o as i } from "./index-DrAbySpd.js";
2
+ function o(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 u(t) {
65
+ const { validAfter: e, validBefore: a } = t, { validForDay: s } = t, n = i(e).toDate(), r = i(a).toDate();
66
+ return e && a ? `${n.toLocaleDateString()} - ${r.toLocaleDateString()}` : e ? `Starts from ${n.toLocaleDateString()}` : a ? `Ends at ${r.toLocaleDateString()}` : s != null ? `Expires in ${s || "the same"} day${s > 1 ? "s" : ""} after claim` : "Always valid";
67
+ }
68
+ export {
69
+ o as i,
70
+ u as t
71
+ };
@@ -0,0 +1,146 @@
1
+ import { g as t, s as u, S as c, b as i } from "./index-BQTPw5fM.js";
2
+ const a = () => {
3
+ const e = c.getBusinessId();
4
+ if (!e) throw new Error("Invalid business ID");
5
+ return i(`businesses/${e}/membership`, {
6
+ noIdRequired: !0
7
+ });
8
+ }, o = {
9
+ async read() {
10
+ return t(await a().get(""));
11
+ },
12
+ async update(e) {
13
+ return t(await a().put("", e));
14
+ },
15
+ async createTier(e) {
16
+ return t(await a().post("tier", e));
17
+ },
18
+ async updateTiers(e) {
19
+ return t(await a().put("tiers", e));
20
+ },
21
+ async createTitle(e) {
22
+ return t(await a().post("titles", e));
23
+ },
24
+ async updateTitle(e, r) {
25
+ return t(
26
+ await a().put(`titles/${e}`, r)
27
+ );
28
+ },
29
+ async deleteTitle(e) {
30
+ return t(await a().delete(`titles/${e}`));
31
+ },
32
+ async readStore() {
33
+ return t(await a().get("store"));
34
+ },
35
+ async readPayoutAccount() {
36
+ return t(
37
+ await a().get("store/payout-account")
38
+ );
39
+ },
40
+ async updateStore(e) {
41
+ return t(await a().put("store", e));
42
+ },
43
+ async updateStoreBundle(e) {
44
+ return t(
45
+ await a().put("store/bundle", e)
46
+ );
47
+ },
48
+ async sendBundle(e) {
49
+ return t(
50
+ await a().post("store/bundle/send", e)
51
+ );
52
+ },
53
+ async refundStoreTransaction(e) {
54
+ return t(
55
+ await a().post("store/refund", e)
56
+ );
57
+ },
58
+ async readRewards() {
59
+ return t(await a().get("rewards"));
60
+ },
61
+ async readRewardById(e) {
62
+ return t(await a().get(`rewards/${e}`));
63
+ },
64
+ async readCollectionsByRewardId(e, r) {
65
+ const s = t(
66
+ await a().get(`/${e}/collections`, {
67
+ params: r
68
+ })
69
+ );
70
+ return {
71
+ meta: s.meta,
72
+ resources: s.resources
73
+ };
74
+ },
75
+ async createReward(e) {
76
+ return t(await a().post("rewards", e));
77
+ },
78
+ async readCards(e) {
79
+ const r = t(
80
+ await a().get("/cards", {
81
+ params: e
82
+ })
83
+ );
84
+ return {
85
+ meta: r.meta,
86
+ resources: r.resources
87
+ };
88
+ },
89
+ async createCards(e) {
90
+ return t(
91
+ await a().post("/cards", e)
92
+ );
93
+ },
94
+ async updateCard(e) {
95
+ return t(await a().put("cards", e));
96
+ },
97
+ async deleteCard(e) {
98
+ return t(await a().delete(`cards/${e}`));
99
+ },
100
+ async updateReward(e, r) {
101
+ return t(
102
+ await a().put(`rewards/${e}`, r)
103
+ );
104
+ },
105
+ async deleteReward(e) {
106
+ return t(await a().delete(`rewards/${e}`));
107
+ },
108
+ async getEmailAddresses() {
109
+ return t(await a().get("email-addresses"));
110
+ },
111
+ async getWhatsappNumbers() {
112
+ return t(
113
+ await u(`whatsappList/${c.getBusinessId()}`).get(
114
+ ""
115
+ )
116
+ );
117
+ },
118
+ async readCollectionCountByMemberId(e, r) {
119
+ return t(
120
+ await a().get(`/collections/count/${e}`, {
121
+ params: { type: r }
122
+ })
123
+ );
124
+ },
125
+ async readCollectionsByMemberId(e, r, s) {
126
+ const n = t(
127
+ await a().get(`/collections/${e}`, {
128
+ params: { ...r, ...s }
129
+ })
130
+ );
131
+ return {
132
+ meta: n.meta,
133
+ resources: n.resources
134
+ };
135
+ },
136
+ async readMissionCountByMemberId(e) {
137
+ return t(
138
+ await a().get(
139
+ `/collections/mission/count/${e}`
140
+ )
141
+ );
142
+ }
143
+ };
144
+ export {
145
+ o as m
146
+ };
@@ -0,0 +1,54 @@
1
+ import { F as o, e as t, g as a } from "./index-DrAbySpd.js";
2
+ import { z as e, F as i, m as d } from "./index-Bzv6BHPk.js";
3
+ import { F as c } from "./collectible.enum-2_2_6r39.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,44 @@
1
+ import { g as r, a as n, S as o, b as c } from "./index-BQTPw5fM.js";
2
+ const a = () => {
3
+ const e = o.getBusinessId();
4
+ if (!e) throw new Error("Invalid business ID");
5
+ return c(`businesses/${e}/transactions`, {
6
+ noIdRequired: !0
7
+ });
8
+ }, d = {
9
+ async readAll(e, t) {
10
+ const s = r(
11
+ await a().get("", {
12
+ params: { ...e, ...t }
13
+ })
14
+ );
15
+ return {
16
+ meta: s.meta,
17
+ resources: s.resources
18
+ };
19
+ },
20
+ async readStoreTransactions(e, t) {
21
+ const s = r(
22
+ await a().get("/store", {
23
+ params: { ...e, ...t }
24
+ })
25
+ );
26
+ return {
27
+ meta: s.meta,
28
+ resources: s.resources
29
+ };
30
+ },
31
+ async readBills(e, t, s) {
32
+ return (await n("").get(
33
+ `/restaurants/${e}/receipt?start=${t}&end=${s}`
34
+ )).data;
35
+ },
36
+ async readPurchaseCountByMember(e) {
37
+ return r(
38
+ await a().get(`/store/${e}`)
39
+ );
40
+ }
41
+ };
42
+ export {
43
+ d as t
44
+ };