@feedmepos/mf-connect 0.1.38-beta.72 → 0.1.38-beta.73

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 (133) hide show
  1. package/dist/Analytic-gGjm5ome.js +761 -0
  2. package/dist/App-BDz9mw-6.js +4638 -0
  3. package/dist/AuditLogs-4x90ZjjY.js +1991 -0
  4. package/dist/Bin-Bby2f42O.js +166 -0
  5. package/dist/Broadcast-eYN2AqFC.js +267 -0
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-fO9-Hb.js +121 -0
  7. package/dist/Card-Cz-pLt7X.js +909 -0
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  9. package/dist/Collections-CgfXuVA1.js +540 -0
  10. package/dist/Credit-Lc6B2oQ9.js +261 -0
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  12. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bm7XTR7o.js +3167 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Cp5nSLEX.js +351 -0
  15. package/dist/Experience-Ca94IJBt.js +260 -0
  16. package/dist/FileSaver.min-BThLVsSf.js +74 -0
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/Game-BYLYDTU9.js +331 -0
  19. package/dist/GenerateMaterial-CUoG6uyI.js +589 -0
  20. package/dist/Grab-DZ_LkTly.js +301 -0
  21. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-CI4kP9ul.js +145 -0
  22. package/dist/Index-BZ2r8x0t.js +259 -0
  23. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  24. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-BLKlXW1b.js +18737 -0
  25. package/dist/MainLayout-BfGSSVMW.js +41 -0
  26. package/dist/Marketing-DYg0J1xG.js +145 -0
  27. package/dist/MarketingMaterialEdit-B--Kck7j.js +746 -0
  28. package/dist/Member-By5QEJxn.js +280 -0
  29. package/dist/MemberList-D49bMmGJ.js +1600 -0
  30. package/dist/MemberOverview-wL_ailso.js +58 -0
  31. package/dist/MemberTransactions-Cz9XENK1.js +45 -0
  32. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-IlFjM-Y5.js +60798 -0
  33. package/dist/Mission-Cvl-V7c8.js +335 -0
  34. package/dist/Overview-lu82lUJp.js +1078 -0
  35. package/dist/Point-C65YFhOB.js +263 -0
  36. package/dist/Promotion-DQCrKO6a.js +397 -0
  37. package/dist/Queue-DR5lfSMi.js +259 -0
  38. package/dist/Record-BCt42_VZ.js +341 -0
  39. package/dist/Reward-7aOnjmMm.js +442 -0
  40. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BPgjr91S.js +149 -0
  41. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Bp5jnlFr.js +1912 -0
  42. package/dist/Segment-DiYwfb8M.js +881 -0
  43. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-ydM5ypC0.js +181 -0
  44. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BRs7pw0l.js +188 -0
  45. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DU8AAPFD.js +147 -0
  46. package/dist/Setting-k6xShcs8.js +1999 -0
  47. package/dist/SettingAdvertisements-DQa_jXYM.js +263 -0
  48. package/dist/Store-B6lYBpsm.js +1995 -0
  49. package/dist/StoreRewards-Cqd399q8.js +534 -0
  50. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Wv_SHwmo.js +1128 -0
  51. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bi1o4YAz.js +7005 -0
  52. package/dist/Tier-CXXImaDx.js +969 -0
  53. package/dist/Title-CTxNCmBW.js +567 -0
  54. package/dist/Transaction-DonaHVzF.js +39 -0
  55. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DbRVYccO.js +130 -0
  56. package/dist/Voucher-Bso_Mjlg.js +422 -0
  57. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DNvmaJk9.js +421 -0
  58. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-KHZ3-THo.js +56 -0
  59. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  60. package/dist/app-DKrmktFJ.js +59071 -0
  61. package/dist/app-wDQR6dpb.js +39 -0
  62. package/dist/app.js +7 -0
  63. package/dist/business-Dd73TVX5.js +82 -0
  64. package/dist/campaign-BUQHH4KL.js +100 -0
  65. package/dist/campaign-CpzFl8Vr.js +4 -0
  66. package/dist/campaign-DkJOyF24.js +253 -0
  67. package/dist/campaign.enum-C8vJuDAq.js +26 -0
  68. package/dist/campaign.fn-DJSpfhZH.js +776 -0
  69. package/dist/collectible.enum-D3W0TwoJ.js +19 -0
  70. package/dist/collection.fn-YzgpOmG0.js +26 -0
  71. package/dist/dto-sceHHLGr.js +222 -0
  72. package/dist/duplicateCampaign-CDulKxgJ.js +51 -0
  73. package/dist/effect-BSgfR9iB.js +89 -0
  74. package/dist/email-addresses-D_fyxOof.js +705 -0
  75. package/dist/export-OxiqL1B7.js +96 -0
  76. package/dist/feedme.ico +0 -0
  77. package/dist/helper-CzurWUe4.js +86 -0
  78. package/dist/index-BF0hGAkO.js +32 -0
  79. package/dist/index-BGMhsZnB.js +124 -0
  80. package/dist/index-B_QGGlMD.js +54 -0
  81. package/dist/index-BbTHqh58.js +31 -0
  82. package/dist/index-BqQas5Sx.js +2428 -0
  83. package/dist/index-BtMmY44D.js +36 -0
  84. package/dist/index-CAUVTn1I.js +67 -0
  85. package/dist/index-Cg-sBBf_.js +3419 -0
  86. package/dist/index-CuvNtC_M.js +61 -0
  87. package/dist/index-Cyt6eKEF.js +8912 -0
  88. package/dist/index-Dw3ew6qN.js +85 -0
  89. package/dist/index-IBvUTxqC.js +30289 -0
  90. package/dist/index-pkwrUX33.js +28897 -0
  91. package/dist/index-tYmg4eyJ.js +3 -0
  92. package/dist/index-vh86FiIQ.js +10 -0
  93. package/dist/index.esm2017-5xGykkgL.js +3069 -0
  94. package/dist/loading-CvHPT80F.js +215 -0
  95. package/dist/lodash-Q-_FPkpI.js +3678 -0
  96. package/dist/membership-CU-wFWan.js +235 -0
  97. package/dist/moment-D7p2TMB-.js +2583 -0
  98. package/dist/money-CzlfhEoe.js +15 -0
  99. package/dist/number-Bee2M41N.js +12 -0
  100. package/dist/object-qECH92oz.js +26 -0
  101. package/dist/objectId-dwaoBfJX.js +7 -0
  102. package/dist/objectid-DRJQv7AY.js +145 -0
  103. package/dist/plugins-CAdlnev8.js +1817 -0
  104. package/dist/remy-D_Deb3ue.js +13 -0
  105. package/dist/reward-BhlYd0FB.js +36 -0
  106. package/dist/rule-Ccvu41A_.js +1969 -0
  107. package/dist/rule-builder-B968rIyS.js +102 -0
  108. package/dist/style.css +13 -0
  109. package/dist/template-OZfyPJVE.js +188 -0
  110. package/dist/tier-BJDhpH6X.js +4 -0
  111. package/dist/tiers/tier=1.png +0 -0
  112. package/dist/tiers/tier=2.png +0 -0
  113. package/dist/tiers/tier=3.png +0 -0
  114. package/dist/tiers/tier=4.png +0 -0
  115. package/dist/timezone-CopuRbDK.js +1154 -0
  116. package/dist/titles/type=diamond.png +0 -0
  117. package/dist/titles/type=drinks.png +0 -0
  118. package/dist/titles/type=food.png +0 -0
  119. package/dist/titles/type=heart.png +0 -0
  120. package/dist/titles/type=medal.png +0 -0
  121. package/dist/titles/type=spend.png +0 -0
  122. package/dist/titles/type=thank-you.png +0 -0
  123. package/dist/titles/type=thumbs-up.png +0 -0
  124. package/dist/titles/type=years.png +0 -0
  125. package/dist/trigger-BtQI81FL.js +213 -0
  126. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  127. package/dist/type_drinks-D6jnpvwV.js +4 -0
  128. package/dist/usePagination-Ciom38dd.js +266 -0
  129. package/dist/user-BOW0ixDK.js +55 -0
  130. package/dist/vue-i18n-jTYKTJq1.js +2365 -0
  131. package/dist/xlsx-YD3LYwip.js +15491 -0
  132. package/dist/zod-B_G9o5PC.js +91 -0
  133. package/package.json +1 -1
@@ -0,0 +1,96 @@
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 h } from "./xlsx-YD3LYwip.js";
5
+ import { m as x, u as f } from "./loading-CvHPT80F.js";
6
+ import { h as w } from "./moment-D7p2TMB-.js";
7
+ class y {
8
+ constructor() {
9
+ d(this, "records", []);
10
+ }
11
+ addRecord(e) {
12
+ this.records.push(e);
13
+ }
14
+ addRecords(e) {
15
+ this.records.push(...e);
16
+ }
17
+ buildExcel() {
18
+ const e = a.json_to_sheet(this.records), o = a.book_new();
19
+ return a.book_append_sheet(o, e, "Sheet1"), o;
20
+ }
21
+ }
22
+ class k extends y {
23
+ }
24
+ const r = {
25
+ sortBy: "_id",
26
+ descending: !1,
27
+ rowsPerPage: 1e3,
28
+ page: 1,
29
+ rowsNumber: 0
30
+ }, { minor: _ } = f;
31
+ async function S({
32
+ exporter: s,
33
+ readFunction: e,
34
+ transformRecord: o,
35
+ filename: t
36
+ }) {
37
+ const c = (await e({
38
+ limit: 1,
39
+ skip: 0,
40
+ sortBy: r.sortBy,
41
+ descending: r.descending
42
+ })).meta.totalResources ?? 0, n = r.rowsPerPage;
43
+ await _(
44
+ async () => {
45
+ for (let i = 0; i < c; i += n) {
46
+ const m = {
47
+ ...r,
48
+ limit: n,
49
+ skip: r.page - 1,
50
+ sortBy: r.sortBy,
51
+ descending: r.descending
52
+ }, p = await e(m);
53
+ for (const l of p.resources) {
54
+ const u = o(l);
55
+ s.addRecord(u);
56
+ }
57
+ r.page++;
58
+ }
59
+ await h(
60
+ s.buildExcel(),
61
+ `${t}-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
62
+ {
63
+ bookType: "xlsx",
64
+ bookSST: !1,
65
+ type: "array"
66
+ }
67
+ ), r.page = 1;
68
+ },
69
+ {
70
+ message: `Exporting ${t}...`,
71
+ successMessage: `${t} exported successfully`
72
+ }
73
+ );
74
+ }
75
+ async function C() {
76
+ return S({
77
+ exporter: new k(),
78
+ readFunction: x.readCards,
79
+ transformRecord: (s) => {
80
+ var e, o;
81
+ return {
82
+ CardNumber: s.serialNumber || "",
83
+ MemberId: ((e = s.pf_member) == null ? void 0 : e._id.toString()) || "",
84
+ Phone: ((o = s.pf_member) == null ? void 0 : o.phoneNumber) || "",
85
+ RedeemedAt: s.redeemedAt ? w(s.redeemedAt).format("DD/MM/YYYY") : ""
86
+ };
87
+ },
88
+ filename: "cards"
89
+ });
90
+ }
91
+ export {
92
+ y as B,
93
+ k as C,
94
+ C as a,
95
+ S as e
96
+ };
Binary file
@@ -0,0 +1,86 @@
1
+ import { k as l } from "./index-Cyt6eKEF.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,32 @@
1
+ import { g as s, S as o, b as i } from "./index-pkwrUX33.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
+ };
@@ -0,0 +1,124 @@
1
+ import { g as a, S as n, b as o } from "./index-pkwrUX33.js";
2
+ const t = () => {
3
+ const e = n.getBusinessId();
4
+ if (!e) throw new Error("Invalid business ID");
5
+ return o(`businesses/${e}/campaigns`, {
6
+ // url: 'http://localhost:3000/portal/',
7
+ });
8
+ }, i = {
9
+ async readAllGrouped(e) {
10
+ const s = a(
11
+ await t().get("grouped", { params: e })
12
+ );
13
+ return {
14
+ meta: s.meta,
15
+ resources: s.resources
16
+ };
17
+ },
18
+ async readAll(e, s) {
19
+ const r = a(
20
+ await t().get("", {
21
+ params: { ...e, ...s }
22
+ })
23
+ );
24
+ return {
25
+ meta: r.meta,
26
+ resources: r.resources
27
+ };
28
+ },
29
+ async readById(e) {
30
+ return a(await t().get(`/${e}`));
31
+ },
32
+ async create(e) {
33
+ return a(await t().post("", e));
34
+ },
35
+ async update(e, s) {
36
+ return a(await t().put(e, s));
37
+ },
38
+ async delete(e) {
39
+ return a(await t().delete(e));
40
+ },
41
+ async readCollectionsByCampaignId(e, s) {
42
+ const r = a(
43
+ await t().get(`/${e}/collections`, {
44
+ params: s
45
+ })
46
+ );
47
+ return {
48
+ meta: r.meta,
49
+ resources: r.resources
50
+ };
51
+ },
52
+ async readTransactions(e) {
53
+ return a(
54
+ await t().get(
55
+ `/${e}/collections/transactions`
56
+ )
57
+ );
58
+ },
59
+ async createCollectionByCampaignId(e, s) {
60
+ return a(
61
+ await t().post(`/${e}/collections`, s)
62
+ );
63
+ },
64
+ async readGroups() {
65
+ return a(await t().get("/groups")) ?? [];
66
+ },
67
+ async readStats(e) {
68
+ return a(
69
+ await t().get("/stats", { params: e })
70
+ );
71
+ },
72
+ async createGroup(e) {
73
+ return a(await t().post("/groups", e));
74
+ },
75
+ async updateGroup(e, s) {
76
+ return a(
77
+ await t().put(`/groups/${e}`, s)
78
+ );
79
+ },
80
+ async deleteGroup(e) {
81
+ return a(await t().delete(`/groups/${e}`));
82
+ },
83
+ async sendCollection(e, s) {
84
+ return a(
85
+ await t().post(
86
+ `/${e}/collections/send`,
87
+ s
88
+ )
89
+ );
90
+ },
91
+ async sendStamp(e, s) {
92
+ return a(
93
+ await t().post(
94
+ `/${e}/collections/send-stamp`,
95
+ s
96
+ )
97
+ );
98
+ },
99
+ async syncAllPromotion() {
100
+ return a(await t().post("/promotion/sync"));
101
+ },
102
+ async readAllDeleted(e, s) {
103
+ const r = a(
104
+ await t().get("/bin", {
105
+ params: { ...e, ...s }
106
+ })
107
+ );
108
+ return {
109
+ meta: r.meta,
110
+ resources: r.resources
111
+ };
112
+ },
113
+ async restore(e) {
114
+ return a(
115
+ await t().post(`/${e}/restore`)
116
+ );
117
+ },
118
+ async getPromotionQueue() {
119
+ return a(await t().get("/promotion/queue"));
120
+ }
121
+ };
122
+ export {
123
+ i as c
124
+ };
@@ -0,0 +1,54 @@
1
+ import { F as o, e as t, f as a } from "./index-Cyt6eKEF.js";
2
+ import { z as e, F as i, m as d } from "./index-IBvUTxqC.js";
3
+ import { F as c } from "./collectible.enum-D3W0TwoJ.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,31 @@
1
+ import { j as p } from "./index-Cyt6eKEF.js";
2
+ function g(r) {
3
+ return r.toLowerCase();
4
+ }
5
+ var m = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], _ = /[^A-Z0-9]+/gi;
6
+ function A(r, e) {
7
+ e === void 0 && (e = {});
8
+ for (var t = e.splitRegexp, i = t === void 0 ? m : t, a = e.stripRegexp, o = a === void 0 ? _ : a, u = e.transform, d = u === void 0 ? g : u, f = e.delimiter, v = f === void 0 ? " " : f, n = l(l(r, i, "$1\0$2"), o, "\0"), s = 0, c = n.length; n.charAt(s) === "\0"; )
9
+ s++;
10
+ for (; n.charAt(c - 1) === "\0"; )
11
+ c--;
12
+ return n.slice(s, c).split("\0").map(d).join(v);
13
+ }
14
+ function l(r, e, t) {
15
+ return e instanceof RegExp ? r.replace(e, t) : e.reduce(function(i, a) {
16
+ return i.replace(a, t);
17
+ }, r);
18
+ }
19
+ function C(r) {
20
+ return r.charAt(0).toUpperCase() + r.substr(1);
21
+ }
22
+ function R(r, e) {
23
+ var t = r.toLowerCase();
24
+ return e === 0 ? C(t) : t;
25
+ }
26
+ function h(r, e) {
27
+ return e === void 0 && (e = {}), A(r, p({ delimiter: " ", transform: R }, e));
28
+ }
29
+ export {
30
+ h as s
31
+ };