@feedmepos/mf-connect 0.0.10-prod → 0.0.11-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 (65) hide show
  1. package/dist/{Analytic-BFeicKpw.js → Analytic-CpXLcGWV.js} +7 -7
  2. package/dist/{Broadcast-D0NyeAPC.js → Broadcast-CEMQS5PI.js} +7 -7
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DAUidvXJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0Kvpl_V.js} +8 -8
  4. package/dist/{Card-DsFHDP5R.js → Card-BqX-aRK9.js} +177 -182
  5. package/dist/{Collections-mc47YFfd.js → Collections-SRmluAj0.js} +102 -84
  6. package/dist/{Credit-TQYanlxz.js → Credit-DdBKFsII.js} +7 -7
  7. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYNpBySQ.js +2600 -0
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-kA-uGqCI.js → EffectSheet.vue_vue_type_style_index_0_lang-admNNBWu.js} +1864 -1830
  9. package/dist/{Experience-CyASWXXY.js → Experience-CSfRrWqI.js} +7 -7
  10. package/dist/Game-BV--qn0e.js +250 -0
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-D-wHmyMe.js → ImageInput.vue_vue_type_script_setup_true_lang-DpYjrT3G.js} +1 -1
  12. package/dist/{MainLayout-zw-S_EV5.js → MainLayout-B_ZXQrMD.js} +1 -1
  13. package/dist/{Marketing-BcmbBw-5.js → Marketing-Bac3EbOu.js} +4 -4
  14. package/dist/{Member-DWRIIPj-.js → Member-CGMRVEuI.js} +2 -2
  15. package/dist/{MemberList-DNG0mNej.js → MemberList-CSyb4bNE.js} +196 -195
  16. package/dist/{MemberTransactions-xdm0zGuQ.js → MemberTransactions-BdraBHg6.js} +2 -2
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bqs3tfs_.js → MessageInput.vue_vue_type_script_setup_true_lang-BvAFOoym.js} +2 -2
  18. package/dist/Mission-D8-D99g-.js +248 -0
  19. package/dist/Point-BOI4mT-K.js +220 -0
  20. package/dist/{Promotion-DlxqsZFt.js → Promotion-D0MLMo9m.js} +8 -8
  21. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DcLK4o-E.js → RuleGroup.vue_vue_type_script_setup_true_lang-1L68zx5t.js} +58 -58
  22. package/dist/Segment-BeUbkVj7.js +444 -0
  23. package/dist/{Setting-CWftoE15.js → Setting-uM4iKdyM.js} +386 -379
  24. package/dist/{Store-jqibjN4j.js → Store-BkccNTnM.js} +432 -413
  25. package/dist/{StoreRewards-DWbp79R_.js → StoreRewards-BLgP6Mfv.js} +9 -9
  26. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-b21Sy462.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Z0nqQyi8.js} +39 -38
  27. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BUOfEY4s.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C771jjYx.js} +1 -1
  28. package/dist/{Tier-lymEcCqJ.js → Tier-DwKAfz6f.js} +17 -16
  29. package/dist/{Title-CYkql8-l.js → Title-B1_yd9pC.js} +16 -15
  30. package/dist/{Transaction-Ca_AVh3S.js → Transaction-DcVCMUY4.js} +1 -1
  31. package/dist/{Voucher-DX70cORv.js → Voucher-Djvai5vL.js} +9 -9
  32. package/dist/{app-Bpd1FsZZ.js → app-BvizV9z5.js} +2757 -2743
  33. package/dist/app.js +1 -1
  34. package/dist/{campaign-CfsRf50J.js → campaign-BdSwq7MJ.js} +31 -27
  35. package/dist/dto-CkH5Zama.js +1150 -0
  36. package/dist/{effect-CiUKauPm.js → effect-DT4ivttr.js} +1 -1
  37. package/dist/{export-oV5_2WhN.js → export-BAJL8_2G.js} +3 -3
  38. package/dist/{helper-dCIRT9Az.js → helper-CiIZ1pUo.js} +21 -8
  39. package/dist/{index-Qqifr9f8.js → index-7uOMMdXt.js} +245 -184
  40. package/dist/{index-BL_KPUtI.js → index-8nrxC9d5.js} +1 -1
  41. package/dist/{index-De3pocAb.js → index-B5gJ6P15.js} +269 -21
  42. package/dist/{index-DL_XK8dd.js → index-BLWw_MlC.js} +1363 -1341
  43. package/dist/{index-D9opigZA.js → index-C5N8jeJ1.js} +1 -1
  44. package/dist/{index-Dd41k099.js → index-C8dIiNQb.js} +1 -1
  45. package/dist/{index-XTz7nzez.js → index-Ccn7PGoB.js} +268 -267
  46. package/dist/{index-BYvX1Aa7.js → index-CjZxaXvZ.js} +69 -64
  47. package/dist/{index-BgPP5w8f.js → index-DCs4-zXS.js} +7 -17
  48. package/dist/{index-C8kJRh0b.js → index-DMyaEjMn.js} +26 -20
  49. package/dist/{loading-Baon-6K7.js → loading-C1IzY-n2.js} +1312 -1312
  50. package/dist/{lodash-C7zZd2mb.js → lodash-BMQ4xbjY.js} +1 -1
  51. package/dist/membership-D3I4udu3.js +221 -0
  52. package/dist/{money-CI5RX_Uc.js → money-BQEcWGhZ.js} +1 -1
  53. package/dist/{number-BD3GORAT.js → number-DGx2QPUy.js} +1 -1
  54. package/dist/{rule-BnlZjqSN.js → rule-CvlhLEGy.js} +2 -2
  55. package/dist/{rule-builder-Qvpo2dS_.js → rule-builder-Di3qiIBb.js} +1 -1
  56. package/dist/{template-CG_Y7BYa.js → template-D6Abrya4.js} +5 -5
  57. package/dist/{usePagination-BHEEnWBL.js → usePagination-MhbjQgN7.js} +1 -1
  58. package/dist/{xlsx-DQZIpY73.js → xlsx-mL_3T1k3.js} +226 -226
  59. package/package.json +2 -2
  60. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtEHnivB.js +0 -2002
  61. package/dist/Game-Tek__-5h.js +0 -242
  62. package/dist/Point-C1mfq_Fd.js +0 -211
  63. package/dist/Segment-BLMz7i-L.js +0 -407
  64. package/dist/dto-COz9T0F3.js +0 -1092
  65. package/dist/membership-Cg82yybg.js +0 -210
@@ -1,5 +1,5 @@
1
- import { z as n, F as t, g as m, e as o, m as e } from "./loading-Baon-6K7.js";
2
- import { e as r } from "./index-DL_XK8dd.js";
1
+ import { z as n, F as e, g as b, e as t, m as i } from "./loading-C1IzY-n2.js";
2
+ import { e as s } from "./index-BLWw_MlC.js";
3
3
  import "vue";
4
4
  const g = n.object({
5
5
  icon: n.string(),
@@ -25,28 +25,28 @@ const g = n.object({
25
25
  transactionId: n.string().optional()
26
26
  });
27
27
  n.object({
28
- trx: n.lazy(() => S),
28
+ trx: n.lazy(() => x),
29
29
  onlineTrx: y.optional(),
30
30
  url: n.string().optional()
31
31
  });
32
- const s = n.enum(["POS", "APP"]), a = n.enum(["topupCount"]), h = n.object({
32
+ const a = n.enum(["POS", "APP"]), c = n.enum(["topupCount"]), h = n.object({
33
33
  line1: n.string(),
34
34
  line2: n.string().optional(),
35
35
  state: n.string(),
36
36
  city: n.string(),
37
37
  postcode: n.string(),
38
38
  country: n.string()
39
- }), c = n.object({
39
+ }), l = n.object({
40
40
  name: n.string(),
41
41
  regNo: n.string(),
42
42
  address: h,
43
43
  phoneNo: n.string(),
44
44
  sstRegNo: n.string().optional()
45
- }), l = n.object({
45
+ }), d = n.object({
46
46
  systemCode: n.string(),
47
47
  inclusive: n.boolean()
48
48
  }), E = n.object({
49
- id: t,
49
+ id: e,
50
50
  dayToExpire: n.number()
51
51
  }), j = n.object({
52
52
  normal: n.coerce.number(),
@@ -62,18 +62,18 @@ const s = n.enum(["POS", "APP"]), a = n.enum(["topupCount"]), h = n.object({
62
62
  name: n.string(),
63
63
  systemCode: n.string(),
64
64
  taxCode: n.string(),
65
- rate: m,
66
- total: o
65
+ rate: b,
66
+ total: t
67
67
  });
68
68
  n.object({
69
69
  canPurchase: n.boolean(),
70
70
  reason: n.string()
71
71
  });
72
72
  n.object({
73
- type: a
73
+ type: c
74
74
  });
75
75
  n.object({
76
- type: a,
76
+ type: c,
77
77
  min: n.number().nullish(),
78
78
  max: n.number().nullish()
79
79
  });
@@ -82,23 +82,24 @@ const f = n.object({
82
82
  maxReceive: n.number().min(0).nullish(),
83
83
  maxPerUser: n.number().min(0).nullish()
84
84
  }),
85
- rule: r.nullish()
86
- }), d = n.object({
85
+ rule: s.nullish()
86
+ }), u = n.object({
87
87
  _id: n.string(),
88
88
  // conditions: z.array(FdoTopupCountCondition),
89
89
  image: n.string().nullish(),
90
- rule: r.nullish(),
90
+ rule: s.nullish(),
91
91
  name: n.string(),
92
- price: o,
92
+ price: t,
93
+ originalPrice: t.nullish(),
93
94
  // new field to indicate coinPrice
94
95
  coinPrice: n.number().nullish(),
95
96
  titles: n.array(E),
96
97
  credit: j,
97
98
  taxes: n.array(F),
98
99
  taxTotals: n.array(_),
99
- priceWithTaxes: o.nullish(),
100
- vouchers: n.array(t),
101
- _inclusiveTaxes: n.array(l).nullish(),
100
+ priceWithTaxes: t.nullish(),
101
+ vouchers: n.array(e),
102
+ _inclusiveTaxes: n.array(d).nullish(),
102
103
  _taxSystem: n.array(n.string()).nullish(),
103
104
  stripePriceId: n.string().nullish(),
104
105
  subscriptionValidity: n.number().min(1, "Must be at least 1 day").max(365, "Maximum is 365").nullish(),
@@ -109,59 +110,63 @@ const f = n.object({
109
110
  pf_titles: n.array(n.any()).optional(),
110
111
  pf_vouchers: n.array(n.any()).optional(),
111
112
  pf_credit: n.number().optional()
112
- }).superRefine((i, b) => {
113
- i.stripePriceId && !i.subscriptionValidity && b.addIssue({
113
+ }).superRefine((o, r) => {
114
+ o.stripePriceId && !o.subscriptionValidity && r.addIssue({
114
115
  code: "custom",
115
116
  message: "Validity is required when stripePriceId is provided",
116
117
  path: ["subscriptionValidity"]
118
+ }), o.originalPrice && o.originalPrice.amount && o.originalPrice.amount < o.price.amount && r.addIssue({
119
+ code: "custom",
120
+ message: "Original price must be greater than price",
121
+ path: ["originalPrice"]
117
122
  });
118
- }), u = n.object({
123
+ }), p = n.object({
119
124
  name: n.string(),
120
- bundles: n.array(d)
125
+ bundles: n.array(u)
121
126
  });
122
127
  n.object({
123
128
  _id: n.string(),
124
129
  name: n.string(),
125
130
  expiredAt: n.string()
126
131
  });
127
- const T = n.object({
132
+ const I = n.object({
128
133
  apiKey: n.string(),
129
134
  webhookSecret: n.string()
130
- }), I = n.object({
131
- company: c.nullish(),
132
- inclusiveTaxes: n.array(l).nullish(),
133
- stripe: T.optional()
134
- }), x = {
135
+ }), T = n.object({
136
+ company: l.nullish(),
137
+ inclusiveTaxes: n.array(d).nullish(),
138
+ stripe: I.optional()
139
+ }), C = {
135
140
  collectionName: "Stores",
136
141
  transform: {
137
142
  _id: "oid",
138
143
  business: "oid"
139
144
  }
140
145
  };
141
- I.extend({
142
- _id: t,
143
- business: t,
144
- categories: n.array(u)
145
- }).describe(e.describe(x));
146
- const C = n.object({
146
+ T.extend({
147
+ _id: e,
148
+ business: e,
149
+ categories: n.array(p)
150
+ }).describe(i.describe(C));
151
+ const S = n.object({
147
152
  refundedAt: n.coerce.date(),
148
153
  reason: n.string(),
149
- transactions: n.array(t)
150
- }), p = n.object({
154
+ transactions: n.array(e)
155
+ }), m = n.object({
151
156
  type: n.enum(["ONLINE", "OFFLINE", "COIN", "STRIPE", "CARD"]),
152
157
  extra: n.string().nullish()
153
- }), S = n.object({
154
- _id: t,
155
- source: s,
158
+ }), x = n.object({
159
+ _id: e,
160
+ source: a,
156
161
  // can be memberStorePurchase
157
162
  ref: n.string(),
158
- business: t,
159
- company: c,
160
- location: t.optional(),
161
- member: t,
163
+ business: e,
164
+ company: l,
165
+ location: e.optional(),
166
+ member: e,
162
167
  // createdAt: z.coerce.date(),
163
- bundle: d,
164
- transactions: n.array(t),
168
+ bundle: u,
169
+ transactions: n.array(e),
165
170
  // array of transaction id (voucher, credit, title)
166
171
  status: n.enum([
167
172
  "PENDING_PAYMENT",
@@ -169,15 +174,15 @@ const C = n.object({
169
174
  "COMPLETED",
170
175
  "REFUNDED"
171
176
  ]),
172
- refund: C.nullish(),
173
- paymentType: p.nullish(),
177
+ refund: S.nullish(),
178
+ paymentType: m.nullish(),
174
179
  paymentRef: n.string().nullish(),
175
180
  pf_transactions: n.array(n.any()).optional(),
176
181
  pf_member: n.any().optional(),
177
182
  pf_location: n.any().optional(),
178
183
  pf_ref: n.any().optional()
179
184
  }).describe(
180
- e.describe({
185
+ i.describe({
181
186
  collectionName: "StoreTransactions",
182
187
  transform: {
183
188
  _id: "oid",
@@ -189,33 +194,33 @@ const C = n.object({
189
194
  })
190
195
  );
191
196
  n.object({
192
- bundle: t,
197
+ bundle: e,
193
198
  member: n.string(),
194
199
  ref: n.string(),
195
- paymentType: p.nullish(),
200
+ paymentType: m.nullish(),
196
201
  withCoin: n.boolean().optional(),
197
202
  card: n.string().optional(),
198
- location: t.optional(),
199
- source: s
203
+ location: e.optional(),
204
+ source: a
200
205
  });
201
206
  n.object({
202
- categories: n.array(u)
207
+ categories: n.array(p)
203
208
  });
204
209
  n.object({
205
- id: t,
210
+ id: e,
206
211
  reason: n.string(),
207
- location: t.optional()
212
+ location: e.optional()
208
213
  });
209
214
  n.object({
210
- _id: t,
211
- business: t,
212
- user: t,
215
+ _id: e,
216
+ business: e,
217
+ user: e,
213
218
  bundleId: n.string(),
214
- transaction: n.array(t),
219
+ transaction: n.array(e),
215
220
  subscriptionId: n.string(),
216
221
  expiredAt: n.coerce.date()
217
222
  }).describe(
218
- e.describe({
223
+ i.describe({
219
224
  collectionName: "StoreSubscriptions",
220
225
  transform: {
221
226
  _id: "oid",
@@ -231,9 +236,9 @@ n.object({
231
236
  subscriptionId: n.string()
232
237
  });
233
238
  export {
234
- I as F,
235
- c as a,
239
+ T as F,
240
+ l as a,
236
241
  h as b,
237
- d as c,
238
- S as d
242
+ u as c,
243
+ x as d
239
244
  };
@@ -1,8 +1,10 @@
1
- import { e, S as n, h as c } from "./app-Bpd1FsZZ.js";
1
+ import { e, S as n, h as c } from "./app-BvizV9z5.js";
2
2
  const t = () => {
3
3
  const a = n.getBusinessId();
4
4
  if (!a) throw new Error("Invalid business ID");
5
- return c(`businesses/${a}/campaigns`);
5
+ return c(`businesses/${a}/campaigns`, {
6
+ // url: 'http://localhost:3000/portal/',
7
+ });
6
8
  }, i = {
7
9
  async readAllGrouped(a) {
8
10
  const s = e(
@@ -68,27 +70,15 @@ const t = () => {
68
70
  );
69
71
  },
70
72
  async createGroup(a) {
71
- return e(
72
- await t().post(
73
- "/groups",
74
- a
75
- )
76
- );
73
+ return e(await t().post("/groups", a));
77
74
  },
78
75
  async updateGroup(a, s) {
79
76
  return e(
80
- await t().put(
81
- `/groups/${a}`,
82
- s
83
- )
77
+ await t().put(`/groups/${a}`, s)
84
78
  );
85
79
  },
86
80
  async deleteGroup(a) {
87
- return e(
88
- await t().delete(
89
- `/groups/${a}`
90
- )
91
- );
81
+ return e(await t().delete(`/groups/${a}`));
92
82
  },
93
83
  async sendCollection(a, s) {
94
84
  return e(
@@ -1,5 +1,5 @@
1
- import { z as o, F as e, m as c } from "./loading-Baon-6K7.js";
2
- import { m as u, n as d, o as m, k as r } from "./index-DL_XK8dd.js";
1
+ import { z as o, F as e, m as c } from "./loading-C1IzY-n2.js";
2
+ import { n as d, o as u, p as m, m as a } from "./index-BLWw_MlC.js";
3
3
  const b = o.enum([
4
4
  "PORTAL",
5
5
  "BENEFIT",
@@ -13,7 +13,10 @@ const b = o.enum([
13
13
  "CYCLE",
14
14
  "COUNTER",
15
15
  "GAME",
16
- "COUNTER_CONSUME"
16
+ "COUNTER_CONSUME",
17
+ "STAMP_REWARD",
18
+ "STAMP_CARRY_FORWARD",
19
+ "STAMP_MAX_REACHED"
17
20
  ]), i = o.string(), l = o.record(o.string(), o.any()).nullish(), p = {
18
21
  collectionName: "Transactions",
19
22
  transform: {
@@ -34,14 +37,14 @@ const b = o.enum([
34
37
  as: "pf_collectible"
35
38
  }
36
39
  }
37
- }, E = o.object({
40
+ }, A = o.object({
38
41
  _id: e,
39
42
  user: e.nullable(),
40
43
  collectible: e,
41
44
  collection: e,
42
45
  business: e,
43
46
  amount: o.number(),
44
- expiryAmount: o.array(o.lazy(() => a)),
47
+ expiryAmount: o.array(o.lazy(() => r)),
45
48
  from: o.lazy(() => t),
46
49
  to: o.lazy(() => t),
47
50
  source: i,
@@ -57,7 +60,7 @@ const b = o.enum([
57
60
  }).describe(c.describe(p));
58
61
  o.object({
59
62
  amount: o.number(),
60
- expiryAmount: o.array(o.lazy(() => a)),
63
+ expiryAmount: o.array(o.lazy(() => r)),
61
64
  collection: o.lazy(() => C),
62
65
  source: i,
63
66
  ref: o.string(),
@@ -71,20 +74,21 @@ o.object({
71
74
  id: o.string()
72
75
  });
73
76
  b.options;
74
- const s = o.enum(["NORMAL", "EXPIRABLE"]), a = o.object({
77
+ const s = o.enum(["NORMAL", "EXPIRABLE"]), r = o.object({
75
78
  _id: e,
76
79
  amount: o.number(),
77
80
  expiredAt: o.coerce.date()
78
81
  }), t = o.object({
79
82
  balance: o.number(),
80
- expiryBalance: o.array(a).optional()
83
+ expiryBalance: o.array(r).optional()
81
84
  }), f = {
82
85
  collectionName: "Collections",
83
86
  transform: {
84
87
  _id: "oid",
85
88
  business: "oid",
86
89
  collectible: "oid",
87
- user: "oid"
90
+ user: "oid",
91
+ deactivatedAt: "date"
88
92
  },
89
93
  lookups: {
90
94
  user: {
@@ -102,12 +106,14 @@ const s = o.enum(["NORMAL", "EXPIRABLE"]), a = o.object({
102
106
  user: e.nullish(),
103
107
  code: o.string().optional(),
104
108
  collectible: e,
105
- type: u,
106
- extras: d.nullish(),
109
+ type: d,
110
+ extras: u.nullish(),
107
111
  options: m,
108
112
  ref: o.string().nullish(),
113
+ deactivatedAt: o.date().nullish(),
109
114
  pf_user: o.any().optional(),
110
- pf_collectible: o.any().optional()
115
+ pf_collectible: o.any().optional(),
116
+ pf_campaign: o.any().optional()
111
117
  }).merge(t).describe(c.describe(f)), n = o.object({
112
118
  amount: o.number(),
113
119
  ref: o.string(),
@@ -117,14 +123,14 @@ const s = o.enum(["NORMAL", "EXPIRABLE"]), a = o.object({
117
123
  n.extend({
118
124
  code: o.string().optional(),
119
125
  collectible: e,
120
- channelConfig: r.nullish(),
126
+ channelConfig: a.nullish(),
121
127
  business: e,
122
128
  user: e.nullable()
123
129
  });
124
130
  n.extend({
125
131
  codes: o.array(o.string()),
126
132
  collectible: e,
127
- channelConfig: r.nullish(),
133
+ channelConfig: a.nullish(),
128
134
  business: e,
129
135
  user: e.nullable()
130
136
  });
@@ -157,11 +163,11 @@ o.object({
157
163
  code: o.string(),
158
164
  codeConfig: g
159
165
  });
160
- const _ = o.object({
166
+ const E = o.object({
161
167
  amount: o.coerce.number().min(1).max(1e7).multipleOf(0.01, "Amount must be maximum of two decimal places (0.00)"),
162
168
  day: o.coerce.number().min(1).max(9999),
163
169
  remark: o.string().optional()
164
- }), x = o.object({
170
+ }), F = o.object({
165
171
  amount: o.coerce.number().min(1),
166
172
  remark: o.string().optional()
167
173
  });
@@ -182,15 +188,15 @@ n.extend({
182
188
  n.extend({
183
189
  business: o.string(),
184
190
  user: o.string(),
185
- channelConfig: r.nullish()
191
+ channelConfig: a.nullish()
186
192
  });
187
193
  o.object({
188
194
  memberId: o.array(e)
189
195
  });
190
196
  export {
191
- _ as F,
192
- x as a,
193
- E as b,
197
+ E as F,
198
+ F as a,
199
+ A as b,
194
200
  C as c,
195
201
  b as d,
196
202
  t as e