@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.71

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 (126) hide show
  1. package/dist/Analytic-CnF_WeRZ.js +427 -0
  2. package/dist/{App-DalxIjTu.js → App-DJwSTuRa.js} +445 -420
  3. package/dist/AuditLogs-RarW2PHL.js +1886 -0
  4. package/dist/Bin-BaixTvHW.js +166 -0
  5. package/dist/{Broadcast-uMAvsC--.js → Broadcast-8DEAMhyM.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DPXoOupI.js} +6 -8
  7. package/dist/Card-DRwLZ-Mn.js +896 -0
  8. package/dist/Collections-WsPM9v03.js +459 -0
  9. package/dist/{Credit-QlnatflM.js → Credit-DMxRdTzt.js} +36 -34
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bcj6o4Xi.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-CuJ8curT.js} +49 -49
  14. package/dist/{Experience-Czy41ifp.js → Experience-B0BV4Tc_.js} +32 -30
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  16. package/dist/Game-Bu6kJJHx.js +278 -0
  17. package/dist/Index-CX-aPFQt.js +259 -0
  18. package/dist/Marketing-CiVFwl6S.js +20071 -0
  19. package/dist/Member-DZfTtt13.js +333 -0
  20. package/dist/MemberList-CscwsZnv.js +1598 -0
  21. package/dist/MemberTransactions-BWNs6bUm.js +45 -0
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-BrbRudIU.js} +134 -122
  23. package/dist/Mission-CyJ-9Qfl.js +296 -0
  24. package/dist/Overview-DLyt6VId.js +1078 -0
  25. package/dist/{Point-By6ogYy_.js → Point-Cc_0-RKm.js} +55 -53
  26. package/dist/Promotion-KqA8nev2.js +289 -0
  27. package/dist/Queue-i8--zps9.js +249 -0
  28. package/dist/Record-CLUO1JVc.js +340 -0
  29. package/dist/Reward-BEdUKQ3M.js +442 -0
  30. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-B9vnSbWj.js +150 -0
  31. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B8zw1TmO.js +1727 -0
  32. package/dist/Segment-B8sYajZG.js +568 -0
  33. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CmmI5Vwl.js +181 -0
  34. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIcXjbJG.js +186 -0
  35. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DY3FMuIf.js +147 -0
  36. package/dist/Setting-DT8dRb2A.js +1931 -0
  37. package/dist/Store-BhsPWRkR.js +1841 -0
  38. package/dist/StoreRewards-Cx2WDZ3p.js +423 -0
  39. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Byb7GOoh.js +1028 -0
  40. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cb-FGTO9.js} +1 -1
  41. package/dist/{Tier-DvAs0-yx.js → Tier-kQy1vGwo.js} +327 -318
  42. package/dist/{Title-B_Trr39o.js → Title-DKv8FqpX.js} +224 -209
  43. package/dist/{Transaction-DCJw-b3H.js → Transaction-CSLllOgl.js} +2 -2
  44. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CvpBdNBn.js +130 -0
  45. package/dist/Voucher-BP6fmSwu.js +354 -0
  46. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CxQEg_HW.js +419 -0
  47. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-aurdXO2X.js} +1 -1
  48. package/dist/app-B3qgrQOd.js +7079 -0
  49. package/dist/app-s3iL79De.js +33357 -0
  50. package/dist/app.js +1 -1
  51. package/dist/business-DG2w8U-i.js +79 -0
  52. package/dist/campaign-BP6Rz-AH.js +1810 -0
  53. package/dist/{campaign--0_yMbMV.js → campaign-WPRZ4BRF.js} +2 -2
  54. package/dist/campaign.enum-CoqrWNTZ.js +20 -0
  55. package/dist/campaign.fn-BRPigTOA.js +758 -0
  56. package/dist/collectible.enum-Dy4sxF43.js +19 -0
  57. package/dist/{collection.fn-3TwPe7aF.js → collection.fn-DGnLyYgV.js} +2 -2
  58. package/dist/dto-xZ9I6-Jr.js +214 -0
  59. package/dist/{effect-BeR0LK61.js → effect-C0XoYTus.js} +33 -16
  60. package/dist/email-addresses-CJ87c7W1.js +705 -0
  61. package/dist/{export-xeLLhqvh.js → export-qlV-AbEl.js} +5 -5
  62. package/dist/{helper-B5iqfKh8.js → helper-DzYe8aNx.js} +1 -1
  63. package/dist/{index-BOdtpNkP.js → index-4vdSri7m.js} +266 -173
  64. package/dist/{index-CU_d8jjU.js → index-BfSj7cUl.js} +1 -1
  65. package/dist/index-Bj0ULpXi.js +29556 -0
  66. package/dist/index-BnZ4yaMH.js +115 -0
  67. package/dist/index-Bo5DJXxs.js +54 -0
  68. package/dist/{index-Ct_wR519.js → index-BuvJH6SU.js} +24 -21
  69. package/dist/index-C2GEs8di.js +32 -0
  70. package/dist/{index-CyKZ-SsN.js → index-CJuOTcCE.js} +1 -1
  71. package/dist/index-CsaQJMAR.js +66 -0
  72. package/dist/{index-DP-dGMJC.js → index-DReysUPw.js} +2230 -871
  73. package/dist/{index-CAn5heDe.js → index-DgCjRb3o.js} +48 -4
  74. package/dist/index-IwITtvVu.js +56 -0
  75. package/dist/{index-Bh-uaaBG.js → index-n3wiQlbk.js} +1506 -1480
  76. package/dist/index-vh86FiIQ.js +10 -0
  77. package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CkJhTmme.js} +154 -154
  78. package/dist/loading-DwJdwl4G.js +71 -0
  79. package/dist/{membership-D0nqqWNZ.js → membership-DvPK3h8f.js} +54 -46
  80. package/dist/money-C_WIbr_x.js +15 -0
  81. package/dist/number-ZeVoGhzP.js +12 -0
  82. package/dist/objectid-8lkX6otO.js +145 -0
  83. package/dist/{loading-C-JDVajU.js → plugins-D20keyDW.js} +2990 -3062
  84. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  85. package/dist/reward-CqnMEq_w.js +36 -0
  86. package/dist/{rule-Dn_GgBCe.js → rule-D7htGgWz.js} +185 -178
  87. package/dist/{rule-builder-BXt29Es4.js → rule-builder-BbJpYQ0n.js} +1 -1
  88. package/dist/style.css +1 -1
  89. package/dist/{template-D2Oi3dxP.js → template-BWQCVHm7.js} +5 -5
  90. package/dist/trigger-DMuv0_O7.js +144 -0
  91. package/dist/user-C_v2C0qN.js +54 -0
  92. package/dist/vue-i18n-N8_TEEd0.js +2365 -0
  93. package/dist/{xlsx-CCRCidY2.js → xlsx-CsPDNSTo.js} +1 -1
  94. package/package.json +11 -7
  95. package/dist/Analytic-BMpS6jWb.js +0 -622
  96. package/dist/Card-DV8-g69L.js +0 -825
  97. package/dist/Collections-DRafEHT1.js +0 -453
  98. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TDoMehSB.js +0 -2813
  99. package/dist/Game-CD3zSitz.js +0 -255
  100. package/dist/Marketing-NNes8z6Q.js +0 -316
  101. package/dist/Member-CTqBgYuV.js +0 -69
  102. package/dist/MemberList-B99tS5ce.js +0 -1733
  103. package/dist/MemberTransactions-D1YCXPOg.js +0 -38
  104. package/dist/Mission-XbBVKBiE.js +0 -261
  105. package/dist/Promotion-DKcBr-RI.js +0 -247
  106. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D1ESqEFO.js +0 -1753
  107. package/dist/Segment-B8cszL-F.js +0 -437
  108. package/dist/Setting-aZYABlMW.js +0 -1901
  109. package/dist/Store-Bx2tyJwe.js +0 -1511
  110. package/dist/StoreRewards-DTp9G6gw.js +0 -401
  111. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2W7ly5Z.js +0 -890
  112. package/dist/Voucher-jqv3ji90.js +0 -490
  113. package/dist/app-WlcUVbFb.js +0 -5764
  114. package/dist/app-_w0hjM7u.js +0 -53428
  115. package/dist/business-BC4-i1cU.js +0 -78
  116. package/dist/dto-Ns2dLn1B.js +0 -2770
  117. package/dist/index-BWb9vRCi.js +0 -29193
  118. package/dist/index-CpU9aqyW.js +0 -206
  119. package/dist/index-CqO_ZvtD.js +0 -99
  120. package/dist/index-CuvNtC_M.js +0 -61
  121. package/dist/index-DsNsA2uX.js +0 -298
  122. package/dist/index-WAMr3npT.js +0 -762
  123. package/dist/money-hdbrblud.js +0 -15
  124. package/dist/number-CRWGOZaW.js +0 -12
  125. package/dist/user-Bm4KttFq.js +0 -37
  126. package/dist/vue-i18n-Dud8fvmw.js +0 -2365
@@ -0,0 +1,115 @@
1
+ import { g as a, S as n, b as o } from "./index-Bj0ULpXi.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 syncAllPromotion() {
92
+ return a(
93
+ await t().post("/promotion/sync")
94
+ );
95
+ },
96
+ async readAllDeleted(e, s) {
97
+ const r = a(
98
+ await t().get("/bin", {
99
+ params: { ...e, ...s }
100
+ })
101
+ );
102
+ return {
103
+ meta: r.meta,
104
+ resources: r.resources
105
+ };
106
+ },
107
+ async restore(e) {
108
+ return a(
109
+ await t().post(`/${e}/restore`)
110
+ );
111
+ }
112
+ };
113
+ export {
114
+ i as c
115
+ };
@@ -0,0 +1,54 @@
1
+ import { F as o, e as t, g as a } from "./index-n3wiQlbk.js";
2
+ import { z as e, F as i, m as d } from "./plugins-D20keyDW.js";
3
+ import { F as c } from "./collectible.enum-Dy4sxF43.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
+ };
@@ -1,71 +1,74 @@
1
- import { g as n, S as I, u as C, b as _ } from "./index-BWb9vRCi.js";
2
- const c = () => {
1
+ import { g as t, S as I, u as C, b as w } from "./index-Bj0ULpXi.js";
2
+ const a = () => {
3
3
  if (!I.getBusinessId()) throw new Error("Invalid business ID");
4
4
  return C("users");
5
- }, a = () => {
5
+ }, c = () => {
6
6
  const e = I.getBusinessId();
7
7
  if (!e) throw new Error("Invalid business ID");
8
- return _(`businesses/${e}/membership`, {
8
+ return w(`businesses/${e}/membership`, {
9
9
  noIdRequired: !0
10
10
  });
11
11
  }, y = {
12
12
  async read(e) {
13
- const s = n(
14
- await c().get("", { params: e })
15
- ), t = s.resources.map((r) => {
16
- var i, o, d, l, u, p, m, b;
13
+ const s = t(
14
+ await a().get("", { params: e })
15
+ ), n = s.resources.map((r) => {
16
+ var i, o, d, l, p, u, m, b;
17
17
  return {
18
18
  ...r,
19
19
  collection_TIER_0_balance: ((o = (i = r.collection.TIER) == null ? void 0 : i[0]) == null ? void 0 : o.balance) ?? 0,
20
20
  collection_CREDIT_0_balance: ((l = (d = r.collection.CREDIT) == null ? void 0 : d[0]) == null ? void 0 : l.balance) ?? 0,
21
- collection_COIN_0_balance: ((p = (u = r.collection.COIN) == null ? void 0 : u[0]) == null ? void 0 : p.balance) ?? 0,
21
+ collection_COIN_0_balance: ((u = (p = r.collection.COIN) == null ? void 0 : p[0]) == null ? void 0 : u.balance) ?? 0,
22
22
  collection_TITLE_0_title: ((b = (m = r.collection.TITLE) == null ? void 0 : m[0]) == null ? void 0 : b.title) ?? ""
23
23
  };
24
24
  });
25
25
  return {
26
26
  meta: s.meta,
27
- resources: t
27
+ resources: n
28
28
  };
29
29
  },
30
30
  async readById(e) {
31
- return n(await c().get(`${e}`));
31
+ return t(await a().get(`${e}`));
32
32
  },
33
33
  async sendCredit(e, s) {
34
- return n(
35
- await a().post(
34
+ return t(
35
+ await c().post(
36
36
  `members/${e}/send-credit`,
37
37
  s
38
38
  )
39
39
  );
40
40
  },
41
41
  async deductCredit(e, s) {
42
- return n(
43
- await a().post(
42
+ return t(
43
+ await c().post(
44
44
  `members/${e}/deduct-credit`,
45
45
  s
46
46
  )
47
47
  );
48
48
  },
49
49
  async sendCoin(e, s) {
50
- return n(
51
- await a().post(
50
+ return t(
51
+ await c().post(
52
52
  `members/${e}/send-coin`,
53
53
  s
54
54
  )
55
55
  );
56
56
  },
57
57
  async deductCoin(e, s) {
58
- return n(
59
- await a().post(
58
+ return t(
59
+ await c().post(
60
60
  `members/${e}/deduct-coin`,
61
61
  s
62
62
  )
63
63
  );
64
64
  },
65
65
  async updateMember(e, s) {
66
- return n(
67
- await c().put(`${e}`, s)
66
+ return t(
67
+ await a().put(`${e}`, s)
68
68
  );
69
+ },
70
+ async import(e) {
71
+ return await a().post("import", e);
69
72
  }
70
73
  };
71
74
  export {
@@ -0,0 +1,32 @@
1
+ import { g as s, S as o, b as i } from "./index-Bj0ULpXi.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
+ };
@@ -1,3 +1,3 @@
1
1
  import "vue-router";
2
- import { R as o } from "./app-WlcUVbFb.js";
2
+ import { R as o } from "./app-B3qgrQOd.js";
3
3
  o["$connect-DASHBOARD"];
@@ -0,0 +1,66 @@
1
+ const d = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), R = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), C = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), A = /[^\p{L}\d]+/giu, n = "$1\0$2", L = "";
2
+ function h(r) {
3
+ let e = r.trim();
4
+ e = e.replace(d, n).replace(R, n), e = e.replace(A, "\0");
5
+ let c = 0, l = e.length;
6
+ for (; e.charAt(c) === "\0"; )
7
+ c++;
8
+ if (c === l)
9
+ return [];
10
+ for (; e.charAt(l - 1) === "\0"; )
11
+ l--;
12
+ return e.slice(c, l).split(/\0/g);
13
+ }
14
+ function w(r) {
15
+ const e = h(r);
16
+ for (let c = 0; c < e.length; c++) {
17
+ const l = e[c], t = C.exec(l);
18
+ if (t) {
19
+ const a = t.index + (t[1] ?? t[2]).length;
20
+ e.splice(c, 1, l.slice(0, a), l.slice(a));
21
+ }
22
+ }
23
+ return e;
24
+ }
25
+ function m(r, e) {
26
+ const [c, l, t] = P(r, e), a = i(e == null ? void 0 : e.locale), s = E(e == null ? void 0 : e.locale);
27
+ return c + l.map(x(a, s)).join((e == null ? void 0 : e.delimiter) ?? " ") + t;
28
+ }
29
+ function S(r, e) {
30
+ const [c, l, t] = P(r, e), a = i(e == null ? void 0 : e.locale), s = E(e == null ? void 0 : e.locale), f = x(a, s);
31
+ return c + l.map((u, _) => _ === 0 ? f(u) : a(u)).join((e == null ? void 0 : e.delimiter) ?? " ") + t;
32
+ }
33
+ function i(r) {
34
+ return r === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(r);
35
+ }
36
+ function E(r) {
37
+ return r === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(r);
38
+ }
39
+ function x(r, e) {
40
+ return (c) => `${e(c[0])}${r(c.slice(1))}`;
41
+ }
42
+ function P(r, e = {}) {
43
+ const c = e.split ?? (e.separateNumbers ? w : h), l = e.prefixCharacters ?? L, t = e.suffixCharacters ?? L;
44
+ let a = 0, s = r.length;
45
+ for (; a < r.length; ) {
46
+ const f = r.charAt(a);
47
+ if (!l.includes(f))
48
+ break;
49
+ a++;
50
+ }
51
+ for (; s > a; ) {
52
+ const f = s - 1, u = r.charAt(f);
53
+ if (!t.includes(u))
54
+ break;
55
+ s = f;
56
+ }
57
+ return [
58
+ r.slice(0, a),
59
+ c(r.slice(a, s)),
60
+ r.slice(s)
61
+ ];
62
+ }
63
+ export {
64
+ m as c,
65
+ S as s
66
+ };