@feedmepos/mf-connect 0.0.7 → 0.0.8

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 (67) hide show
  1. package/dist/{Analytic-D-E67IbN.js → Analytic-BxRuK2P2.js} +8 -8
  2. package/dist/{Broadcast-NjpOa4PK.js → Broadcast-BqGojAWW.js} +8 -8
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-7KnDJ-sV.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js} +8 -8
  4. package/dist/{Card-BOEkf7wo.js → Card-Dlj5jQp4.js} +54 -54
  5. package/dist/{Collections-sLYCpBxu.js → Collections-DvdDRozp.js} +181 -186
  6. package/dist/{Credit-DU2_9ex7.js → Credit-BeHm7_2S.js} +8 -8
  7. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CBO6OHrM.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js} +170 -160
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CTvGOX7T.js → EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js} +2999 -2978
  9. package/dist/{Experience-DGNdVxuU.js → Experience-CtDY9u4Y.js} +8 -8
  10. package/dist/{Game-B1i79HLc.js → Game-DjaYuqcb.js} +8 -8
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DzdMpEl_.js → ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js} +1 -1
  12. package/dist/{MainLayout-CfgDdm6k.js → MainLayout-B-iAZM2k.js} +1 -1
  13. package/dist/{Marketing-CBre7DEM.js → Marketing-BJJltAh-.js} +6 -6
  14. package/dist/{Member-BfvuL8GL.js → Member-eJ9Pdi5w.js} +2 -2
  15. package/dist/{MemberList-CQ17Q4V7.js → MemberList-CrhMqUfJ.js} +12 -12
  16. package/dist/{MemberTransactions-Cviim4GX.js → MemberTransactions-DRET8mSQ.js} +2 -2
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-j31pc2Wx.js → MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js} +2 -2
  18. package/dist/{Point-9ta-6dJv.js → Point-DPTOgJbC.js} +8 -8
  19. package/dist/{Promotion-CBmH5FNG.js → Promotion-wzkRuNqO.js} +9 -9
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-r9Q-pOrs.js → RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js} +12 -12
  21. package/dist/{Segment-ZUtFZM5W.js → Segment-DnsPrP7Q.js} +10 -10
  22. package/dist/{Setting-TQdqaKPQ.js → Setting-CXuZu0-m.js} +9 -9
  23. package/dist/{Store-DX1ALcTQ.js → Store-4Um9keEp.js} +12 -12
  24. package/dist/{StoreRewards-Bd1ZFUQM.js → StoreRewards-B-UFeyQM.js} +10 -10
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-D0L-LkOm.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js} +5 -5
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C0xL6Ua_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js} +1 -1
  27. package/dist/Tier-C6KVsxGO.js +818 -0
  28. package/dist/{Title-YJtGygMA.js → Title-DuN1ahIM.js} +236 -236
  29. package/dist/{Transaction-DmvmaPk6.js → Transaction-DdfX7Xfe.js} +1 -1
  30. package/dist/{Voucher-D88gJYa3.js → Voucher-DarXrxZr.js} +99 -94
  31. package/dist/{app-g6ra_l_x.js → app-CxBTTB31.js} +1266 -1251
  32. package/dist/app.js +1 -1
  33. package/dist/{campaign-DdY0vnwY.js → campaign-B0aXkadj.js} +7 -7
  34. package/dist/dto-BtdVC-Ab.js +1093 -0
  35. package/dist/{effect-CghM-w8z.js → effect-BUN6rkQM.js} +1 -1
  36. package/dist/{helper-xWsMhdHl.js → helper-Cpq3x8K5.js} +1 -1
  37. package/dist/{index-CVSXd2FW.js → index-0GYrZr4L.js} +138 -132
  38. package/dist/{index-Dz8i7yJ_.js → index-8clzk3uX.js} +1 -1
  39. package/dist/{index-D71HFulf.js → index-BTntbYTS.js} +1 -1
  40. package/dist/{index-B4ootZIL.js → index-BvnZdJBY.js} +2 -2
  41. package/dist/{index-Cl-b6jYW.js → index-C6NgUSl2.js} +1 -1
  42. package/dist/{index-Bp8rb1uM.js → index-CK9yJMj7.js} +34 -34
  43. package/dist/{index-BSF_A6Bx.js → index-D2Juhkdw.js} +2 -2
  44. package/dist/{index-C5UTq5_2.js → index-DDSLx7vu.js} +2 -2
  45. package/dist/{index-gLwPyXKM.js → index-Dg-PMgXV.js} +1 -1
  46. package/dist/index-DysVCkrx.js +1735 -0
  47. package/dist/libs/packages/core/src/campaign/campaign.enum.d.ts +6 -0
  48. package/dist/libs/packages/core/src/campaign/campaign.fn.d.ts +2 -0
  49. package/dist/libs/packages/core/src/template/templates.d.ts +7 -0
  50. package/dist/{loading-DClM7b3o.js → loading-Cxp7sI5p.js} +2 -2
  51. package/dist/{lodash-wTDGx83S.js → lodash-DsT1nK-T.js} +1 -1
  52. package/dist/{membership-BEDm55VI.js → membership-DtD45RXh.js} +4 -4
  53. package/dist/{money-CPy2C0LJ.js → money-CFI1TMCS.js} +1 -1
  54. package/dist/{number-ROACK3bi.js → number-BBtf4fYz.js} +1 -1
  55. package/dist/packages/connect/src/api/index.d.ts +3 -0
  56. package/dist/packages/connect/src/api/settings/index.d.ts +1 -1
  57. package/dist/packages/connect/src/main.d.ts +1 -1
  58. package/dist/{plugins-CJou3ejy.js → plugins-B_d-WFtN.js} +4 -4
  59. package/dist/{rule-Cp7qN96m.js → rule-CB9Qlcx1.js} +2 -2
  60. package/dist/{rule-builder-OR4oX_mq.js → rule-builder-BIKcA4Bg.js} +1 -1
  61. package/dist/{template-Dk2sky27.js → template-qlb46PGl.js} +5 -5
  62. package/dist/{usePagination-DRHXkOF-.js → usePagination-CX66ab1Y.js} +1 -1
  63. package/dist/{xlsx-C5St1Lch.js → xlsx-DMaFso0k.js} +1 -1
  64. package/package.json +2 -2
  65. package/dist/Tier-DAUABM7F.js +0 -818
  66. package/dist/dto-BQHDb7XC.js +0 -353
  67. package/dist/index-CPU_mtDw.js +0 -1742
@@ -1,4 +1,4 @@
1
- import { d as o } from "./app-g6ra_l_x.js";
1
+ import { d as o } from "./app-CxBTTB31.js";
2
2
  function c(e) {
3
3
  if (!e)
4
4
  return null;
@@ -1,4 +1,4 @@
1
- import { h as l } from "./index-BSF_A6Bx.js";
1
+ import { h as l } from "./index-D2Juhkdw.js";
2
2
  function o(a, e) {
3
3
  switch (a) {
4
4
  case "COIN":
@@ -1,8 +1,8 @@
1
- import { z as e, F as n, b as O, m as u } from "./plugins-CJou3ejy.js";
2
- import { e as R, F as z, a as c, g as F, i as p, j as w, k } from "./index-BSF_A6Bx.js";
3
- import { b as M } from "./index-CPU_mtDw.js";
4
- import { b as h, c as W } from "./index-C5UTq5_2.js";
5
- import { d as K } from "./index-B4ootZIL.js";
1
+ import { z as e, F as n, b as D, m as u } from "./plugins-B_d-WFtN.js";
2
+ import { e as R, F as w, a as c, g as F, i as E, j as k, k as W } from "./index-D2Juhkdw.js";
3
+ import { b as h } from "./index-DysVCkrx.js";
4
+ import { b as T, c as K } from "./index-DDSLx7vu.js";
5
+ import { d as V } from "./index-BvnZdJBY.js";
6
6
  const L = e.enum([
7
7
  "VOUCHER",
8
8
  "PROMOTION",
@@ -13,14 +13,17 @@ const L = e.enum([
13
13
  "COIN",
14
14
  "REWARD_POOL",
15
15
  "GAME"
16
- ]);
16
+ ]), A = e.enum(["TIME_BASED_PROMOTION", "GAME_PROMOTION"]), xe = {
17
+ [A.enum.TIME_BASED_PROMOTION]: "7.7.4",
18
+ [A.enum.GAME_PROMOTION]: "7.7.4"
19
+ };
17
20
  e.object({
18
21
  location: n,
19
22
  memberId: n,
20
- nettTotal: O,
23
+ nettTotal: D,
21
24
  remark: e.string().optional()
22
25
  });
23
- const V = e.enum(["COUNTER", "POS"]);
26
+ const J = e.enum(["COUNTER", "POS"]);
24
27
  e.object({
25
28
  id: e.string(),
26
29
  userId: e.string(),
@@ -31,9 +34,9 @@ e.object({
31
34
  level: e.number().nullish(),
32
35
  mostPurchasedItems: e.array(e.string()).nullish()
33
36
  });
34
- const J = {
37
+ const Y = {
35
38
  collectionName: "Bills"
36
- }, Y = e.object({
39
+ }, q = e.object({
37
40
  _id: e.string(),
38
41
  // items: z.record(z.lazy(() => FdoBillItem)),
39
42
  // business: z.string(),
@@ -42,13 +45,13 @@ const J = {
42
45
  user: e.string().nullish(),
43
46
  memberid: e.string().nullish(),
44
47
  // roundToNearest: z.number().nullish(),
45
- nettTotal: O,
48
+ nettTotal: D,
46
49
  // activeItems: z.array(z.string()),
47
50
  remark: e.string().nullish(),
48
51
  createdAt: e.coerce.date(),
49
52
  completedAt: e.coerce.date(),
50
53
  location: e.string(),
51
- channel: V.optional()
54
+ channel: J.optional()
52
55
  }).transform((o) => ({
53
56
  ...o,
54
57
  createdTime: o.createdAt,
@@ -56,7 +59,7 @@ const J = {
56
59
  get amount() {
57
60
  return o.nettTotal.amount / 10 ** o.nettTotal.precision;
58
61
  }
59
- })).describe(u.describe(J)), q = e.object({
62
+ })).describe(u.describe(Y)), X = e.object({
60
63
  _id: e.string(),
61
64
  rating: e.coerce.number(),
62
65
  user: e.string(),
@@ -78,7 +81,7 @@ const J = {
78
81
  "MEMBER_REWARD",
79
82
  "GAME_COMPLETED",
80
83
  "PAGINATE_SCHEDULE"
81
- ]), xe = i.extract([
84
+ ]), Be = i.extract([
82
85
  "BILL_COMPLETED",
83
86
  "FEEDBACK",
84
87
  "GAME_COMPLETED",
@@ -94,43 +97,43 @@ e.enum(["WEEK", "MONTH"]);
94
97
  const a = e.object({
95
98
  // type: F_EVENT_TYPE,
96
99
  rule: R.optional()
97
- }), X = a.extend({
98
- type: e.literal(i.enum.BILL_COMPLETED)
99
100
  }), Z = a.extend({
100
- type: e.literal(i.enum.FEEDBACK)
101
+ type: e.literal(i.enum.BILL_COMPLETED)
101
102
  }), Q = a.extend({
103
+ type: e.literal(i.enum.FEEDBACK)
104
+ }), $ = a.extend({
102
105
  type: e.literal(i.enum.SIMPLE_CLAIM)
103
106
  });
104
107
  a.extend({
105
108
  type: e.literal(i.enum.ENTER_SEGMENT),
106
109
  segment: e.string()
107
110
  });
108
- const $ = a.extend({
111
+ const ee = a.extend({
109
112
  type: e.literal(i.enum.MEMBER_REWARD)
110
- }), ee = a.extend({
113
+ }), ne = a.extend({
111
114
  type: e.literal(i.enum.SCHEDULE)
112
115
  // option: FdoCronRule,
113
- }), ne = a.extend({
114
- type: e.literal(i.enum.MEMBERSHIP_JOINED)
115
116
  }), te = a.extend({
116
- type: e.literal(i.enum.TIER_UPGRADED)
117
+ type: e.literal(i.enum.MEMBERSHIP_JOINED)
117
118
  }), oe = a.extend({
118
- type: e.literal(i.enum.MAKING_ORDER)
119
+ type: e.literal(i.enum.TIER_UPGRADED)
119
120
  }), ie = a.extend({
120
- type: e.literal(i.enum.ISSUE_REWARD)
121
+ type: e.literal(i.enum.MAKING_ORDER)
121
122
  }), ae = a.extend({
123
+ type: e.literal(i.enum.ISSUE_REWARD)
124
+ }), le = a.extend({
122
125
  type: e.literal(i.enum.GAME_COMPLETED)
123
- }), le = e.discriminatedUnion("type", [
124
- Q,
125
- X,
126
- ee,
126
+ }), se = e.discriminatedUnion("type", [
127
+ $,
127
128
  Z,
128
129
  ne,
130
+ Q,
129
131
  te,
130
132
  oe,
131
133
  ie,
132
- $,
133
- ae
134
+ ae,
135
+ ee,
136
+ le
134
137
  ]);
135
138
  e.object({
136
139
  _id: n,
@@ -144,17 +147,17 @@ const d = e.object({
144
147
  campaignIds: e.array(n).optional(),
145
148
  slackWebhookUrl: e.string().optional(),
146
149
  emittedAt: e.coerce.date().default(/* @__PURE__ */ new Date())
147
- }), se = d.extend({
150
+ }), re = d.extend({
148
151
  type: e.literal(i.enum.BILL_COMPLETED),
149
152
  context: e.object({
150
- bill: Y
153
+ bill: q
151
154
  })
152
- }), re = d.extend({
155
+ }), ce = d.extend({
153
156
  type: e.literal(i.enum.SCHEDULE),
154
157
  context: e.object({
155
158
  triggeredAt: e.coerce.date()
156
159
  })
157
- }), ce = d.extend({
160
+ }), de = d.extend({
158
161
  type: e.literal(i.enum.PAGINATE_SCHEDULE),
159
162
  context: e.object({
160
163
  triggeredAt: e.coerce.date(),
@@ -162,38 +165,38 @@ const d = e.object({
162
165
  skip: e.coerce.number(),
163
166
  limit: e.coerce.number()
164
167
  })
165
- }), de = d.extend({
168
+ }), me = d.extend({
166
169
  type: e.literal(i.enum.FEEDBACK),
167
170
  context: e.object({
168
- feedback: q
171
+ feedback: X
169
172
  })
170
- }), me = d.extend({
173
+ }), ue = d.extend({
171
174
  type: e.literal(i.enum.MEMBERSHIP_JOINED),
172
175
  context: e.object({
173
- user: M
176
+ user: h
174
177
  })
175
- }), ue = d.extend({
178
+ }), Ee = d.extend({
176
179
  type: e.literal(i.enum.TIER_UPGRADED),
177
180
  context: e.object({
178
- transaction: h
181
+ transaction: T
179
182
  })
180
183
  }), pe = d.extend({
181
184
  type: e.literal(i.enum.ISSUE_REWARD),
182
185
  context: e.object({
183
- transaction: h,
184
- collection: W
186
+ transaction: T,
187
+ collection: K
185
188
  })
186
189
  });
187
190
  e.discriminatedUnion("type", [
188
- se,
189
191
  re,
190
- de,
192
+ ce,
191
193
  me,
192
194
  ue,
195
+ Ee,
193
196
  pe,
194
- ce
197
+ de
195
198
  ]);
196
- const Ee = e.object({
199
+ const ge = e.object({
197
200
  from: e.coerce.number(),
198
201
  to: e.coerce.number().optional()
199
202
  }).superRefine((o, l) => {
@@ -201,29 +204,29 @@ const Ee = e.object({
201
204
  code: "custom",
202
205
  message: "Max experience must be more than min experience"
203
206
  });
204
- }), ge = e.enum(["MULTIPLIER", "FIXED"]);
207
+ }), be = e.enum(["MULTIPLIER", "FIXED"]);
205
208
  e.object({
206
- type: ge
209
+ type: be
207
210
  });
208
- const be = e.object({
211
+ const Ce = e.object({
209
212
  _id: n.optional(),
210
213
  rule: R,
211
214
  tierExpression: e.string().nullish(),
212
215
  expExpression: e.string().nullish()
213
- }), f = e.object({
216
+ }), I = e.object({
214
217
  _id: n,
215
218
  name: e.string().min(1),
216
219
  image: e.string().nullish(),
217
- option: Ee,
218
- cycleOptions: e.array(e.lazy(() => be)).nullish(),
220
+ option: ge,
221
+ cycleOptions: e.array(e.lazy(() => Ce)).nullish(),
219
222
  member_count: e.number().optional()
220
223
  });
221
- f.partial({
224
+ I.partial({
222
225
  _id: !0
223
226
  });
224
- const Ne = f.partial({
227
+ const Se = I.partial({
225
228
  _id: !0
226
- }), Ce = {
229
+ }), ye = {
227
230
  collectionName: "Cards",
228
231
  transform: {
229
232
  _id: "oid",
@@ -252,10 +255,10 @@ e.object({
252
255
  design: e.string().nullish(),
253
256
  bundle: e.string().nullish(),
254
257
  subscriptionBundle: e.string().nullish(),
255
- pf_member: e.lazy(() => M).nullish(),
256
- pf_transaction: e.lazy(() => K).nullish()
257
- }).describe(u.describe(Ce));
258
- const ye = e.object({
258
+ pf_member: e.lazy(() => h).nullish(),
259
+ pf_transaction: e.lazy(() => V).nullish()
260
+ }).describe(u.describe(ye));
261
+ const _e = e.object({
259
262
  length: e.coerce.number().optional(),
260
263
  charset: e.string(),
261
264
  prefix: e.string().optional(),
@@ -265,14 +268,14 @@ const ye = e.object({
265
268
  e.object({
266
269
  quantity: e.number(),
267
270
  code: e.string(),
268
- codeConfig: ye,
271
+ codeConfig: _e,
269
272
  setCardOnBind: e.boolean().optional(),
270
273
  design: e.string().nullish(),
271
274
  bundle: e.string().optional(),
272
275
  subscriptionBundle: e.string().optional()
273
276
  });
274
- const _e = e.enum(["SMS", "WHATSAPP"]), E = e.object({
275
- channel: _e,
277
+ const Re = e.enum(["SMS", "WHATSAPP"]), p = e.object({
278
+ channel: Re,
276
279
  variables: e.array(e.string()),
277
280
  content: e.string(),
278
281
  language: e.string(),
@@ -282,41 +285,41 @@ const _e = e.enum(["SMS", "WHATSAPP"]), E = e.object({
282
285
  code: e.ZodIssueCode.custom,
283
286
  message: "Content is required"
284
287
  });
285
- const y = /{{(.*?)}}/g, _ = [...o.content.matchAll(y)].map((m) => m[1]), A = o.variables, b = _.filter((m) => A.indexOf(m) < 0);
288
+ const y = /{{(.*?)}}/g, _ = [...o.content.matchAll(y)].map((m) => m[1]), O = o.variables, b = _.filter((m) => O.indexOf(m) < 0);
286
289
  b.length && l.addIssue({
287
290
  code: e.ZodIssueCode.custom,
288
291
  message: "Invalid variable(s): " + b.join(", ")
289
292
  });
290
293
  });
291
- function Be(o, l) {
294
+ function Ue(o, l) {
292
295
  return o.replace(/{{(.*?)}}/g, (y, _) => {
293
- const b = _.trim().split(".").reduce((m, v) => (m != null ? m[v] : null) ?? null, l);
296
+ const b = _.trim().split(".").reduce((m, z) => (m != null ? m[z] : null) ?? null, l);
294
297
  return b !== null ? b : y;
295
298
  });
296
299
  }
297
- const I = e.enum(["NO_REWARD", "VOUCHER", "LOYALTY"]), T = e.object({
298
- type: e.literal(I.enum.NO_REWARD),
300
+ const f = e.enum(["NO_REWARD", "VOUCHER", "LOYALTY"]), P = e.object({
301
+ type: e.literal(f.enum.NO_REWARD),
299
302
  collectible: e.null(),
300
303
  weight: e.number().min(0, "Weight need to be at least 0")
301
- }), P = e.object({
302
- type: e.literal(I.enum.VOUCHER),
304
+ }), N = e.object({
305
+ type: e.literal(f.enum.VOUCHER),
303
306
  collectible: n,
304
- collectibleConfig: e.lazy(() => z._def.right.options[0]),
307
+ collectibleConfig: e.lazy(() => w._def.right.options[0]),
305
308
  weight: e.number().min(0, "Weight need to be at least 0"),
306
309
  earningOption: e.lazy(() => c),
307
310
  validityOption: e.lazy(() => F)
308
311
  }), x = e.object({
309
- type: e.literal(I.enum.LOYALTY),
312
+ type: e.literal(f.enum.LOYALTY),
310
313
  collectible: n,
311
314
  weight: e.number().min(0, "Weight need to be at least 0"),
312
315
  earningOption: e.lazy(() => c),
313
316
  validityOption: e.lazy(() => F)
314
- }), Re = e.discriminatedUnion("type", [
315
- P,
317
+ }), Ie = e.discriminatedUnion("type", [
318
+ N,
316
319
  x,
317
- T
318
- ]), D = e.discriminatedUnion("type", [
319
- P.extend({
320
+ P
321
+ ]), M = e.discriminatedUnion("type", [
322
+ N.extend({
320
323
  collectible: n.nullish(),
321
324
  business: n.nullish()
322
325
  }),
@@ -324,14 +327,14 @@ const I = e.enum(["NO_REWARD", "VOUCHER", "LOYALTY"]), T = e.object({
324
327
  collectible: n.nullish(),
325
328
  business: n.nullish()
326
329
  }),
327
- T
330
+ P
328
331
  ]), fe = {
329
332
  collectionName: "Locations",
330
333
  transform: {
331
334
  _id: "oid",
332
335
  business: "oid"
333
336
  }
334
- }, N = e.object({
337
+ }, B = e.object({
335
338
  _id: n,
336
339
  business: n,
337
340
  name: e.string(),
@@ -352,7 +355,7 @@ e.object({
352
355
  location: "oid"
353
356
  }
354
357
  }));
355
- const Ie = {
358
+ const Oe = {
356
359
  collectionName: "Groups",
357
360
  transform: {
358
361
  _id: "oid",
@@ -370,33 +373,35 @@ const Ie = {
370
373
  foreignField: "group"
371
374
  }
372
375
  }
373
- }, Se = e.object({
376
+ }, je = e.object({
374
377
  _id: n,
375
378
  name: e.string().min(1).max(300),
376
379
  business: n,
377
380
  pf_campaigns: e.array(e.any()).optional()
378
- }).describe(u.describe(Ie)), Ae = e.object({
381
+ }).describe(u.describe(Oe)), Ae = e.object({
379
382
  type: e.literal(L.enum.MEMBERSHIP),
380
383
  business: n,
381
384
  name: e.string().min(1).max(50),
382
385
  image: e.string().nullish(),
383
386
  url: e.string().nullish(),
384
- tiers: e.array(e.lazy(() => f)),
387
+ tiers: e.array(e.lazy(() => I)),
385
388
  titles: e.array(n),
386
389
  tierCycleEnable: e.boolean().optional(),
387
390
  tierCycle: e.lazy(() => R).nullish(),
388
- welcomeMessage: E.optional(),
391
+ welcomeMessage: p.optional(),
389
392
  advertisements: e.array(e.string()).optional(),
390
393
  cardEnable: e.boolean().optional(),
391
- design: e.array(e.object({
392
- _id: n,
393
- image: e.string()
394
- })).optional(),
394
+ design: e.array(
395
+ e.object({
396
+ _id: n,
397
+ image: e.string()
398
+ })
399
+ ).optional(),
395
400
  targetLocation: e.array(n).nullish(),
396
401
  brand: e.string().nullish(),
397
402
  freeCreditAsDiscount: e.boolean().optional(),
398
- pf_title: e.array(e.lazy(() => p)).optional(),
399
- pf_targetLocation: e.array(e.lazy(() => N)).optional(),
403
+ pf_title: e.array(e.lazy(() => E)).optional(),
404
+ pf_targetLocation: e.array(e.lazy(() => B)).optional(),
400
405
  // new structure
401
406
  group: e.string().nullish(),
402
407
  templateId: n.nullish()
@@ -408,7 +413,7 @@ const Ie = {
408
413
  name: e.string().min(1).max(50),
409
414
  image: e.string().nullish(),
410
415
  description: e.string().max(500).nullish(),
411
- timeframeOptions: w.superRefine((o, l) => {
416
+ timeframeOptions: k.superRefine((o, l) => {
412
417
  o.start && o.end && o.end < o.start && l.addIssue({
413
418
  code: "custom",
414
419
  message: "End date must be later or same as start date",
@@ -416,13 +421,13 @@ const Ie = {
416
421
  });
417
422
  }).nullish(),
418
423
  targetLocation: e.array(n).nullish(),
419
- event: le,
420
- config: k.nullish(),
424
+ event: se,
425
+ config: W.nullish(),
421
426
  currentReceive: e.coerce.number().optional(),
422
427
  // new group structure
423
428
  group: n.nullish(),
424
429
  templateId: n.nullish(),
425
- pf_targetLocation: e.array(e.lazy(() => N)).optional()
430
+ pf_targetLocation: e.array(e.lazy(() => B)).optional()
426
431
  }), r = {
427
432
  [t.enum.VOUCHER]: [
428
433
  "BILL_COMPLETED",
@@ -468,7 +473,7 @@ const Ie = {
468
473
  "SCHEDULE",
469
474
  "SIMPLE_CLAIM"
470
475
  ]
471
- }, B = s.extend({
476
+ }, S = s.extend({
472
477
  type: e.literal(t.enum.VOUCHER),
473
478
  // event
474
479
  event: a.merge(
@@ -482,13 +487,13 @@ const Ie = {
482
487
  }),
483
488
  collectible: n,
484
489
  notify: e.boolean().optional(),
485
- notifyMessage: e.lazy(() => E).optional(),
490
+ notifyMessage: e.lazy(() => p).optional(),
486
491
  notifyCampaign: n.nullish(),
487
- pf_collectible: e.lazy(() => p).optional(),
492
+ pf_collectible: e.lazy(() => E).optional(),
488
493
  pf_notifyCampaign: e.lazy(() => g).optional()
489
- }), De = e.object({
494
+ }), Me = e.object({
490
495
  gameType: e.string()
491
- }), S = s.extend({
496
+ }), U = s.extend({
492
497
  type: e.literal(t.enum.PROMOTION),
493
498
  // event
494
499
  event: a.merge(
@@ -502,8 +507,8 @@ const Ie = {
502
507
  message: "Effect is required"
503
508
  });
504
509
  }),
505
- gameConfig: De.nullish()
506
- }), U = s.extend({
510
+ gameConfig: Me.nullish()
511
+ }), j = s.extend({
507
512
  type: e.literal(t.enum.POINT),
508
513
  // event
509
514
  event: a.merge(
@@ -514,11 +519,11 @@ const Ie = {
514
519
  earningOption: c,
515
520
  collectible: n,
516
521
  notify: e.boolean().optional(),
517
- notifyMessage: e.lazy(() => E).optional(),
522
+ notifyMessage: e.lazy(() => p).optional(),
518
523
  notifyCampaign: n.nullish(),
519
- pf_collectible: e.lazy(() => p).optional(),
524
+ pf_collectible: e.lazy(() => E).optional(),
520
525
  pf_notifyCampaign: e.lazy(() => g).optional()
521
- }), j = s.extend({
526
+ }), G = s.extend({
522
527
  type: e.literal(t.enum.CREDIT),
523
528
  // event
524
529
  event: a.merge(
@@ -529,9 +534,9 @@ const Ie = {
529
534
  earningOption: c,
530
535
  collectible: n,
531
536
  notify: e.boolean().optional(),
532
- notifyMessage: e.lazy(() => E).optional(),
537
+ notifyMessage: e.lazy(() => p).optional(),
533
538
  notifyCampaign: n.nullish(),
534
- pf_collectible: e.lazy(() => p).optional(),
539
+ pf_collectible: e.lazy(() => E).optional(),
535
540
  pf_notifyCampaign: e.lazy(() => g).optional()
536
541
  }), g = s.extend({
537
542
  type: e.literal(t.enum.BROADCAST),
@@ -541,9 +546,9 @@ const Ie = {
541
546
  type: e.enum(r[t.enum.BROADCAST])
542
547
  })
543
548
  ),
544
- message: E,
549
+ message: p,
545
550
  linkedCampaign: n.nullish()
546
- }), G = s.extend({
551
+ }), H = s.extend({
547
552
  type: e.literal(t.enum.COIN),
548
553
  // event
549
554
  event: a.merge(
@@ -554,9 +559,9 @@ const Ie = {
554
559
  earningOption: c,
555
560
  collectible: n,
556
561
  notify: e.boolean().optional(),
557
- notifyMessage: e.lazy(() => E).optional(),
562
+ notifyMessage: e.lazy(() => p).optional(),
558
563
  notifyCampaign: n.nullish(),
559
- pf_collectible: e.lazy(() => p).optional(),
564
+ pf_collectible: e.lazy(() => E).optional(),
560
565
  pf_notifyCampaign: e.lazy(() => g).optional()
561
566
  }), C = s.extend({
562
567
  type: e.literal(t.enum.REWARD_POOL),
@@ -566,8 +571,8 @@ const Ie = {
566
571
  type: e.enum(r[t.enum.REWARD_POOL])
567
572
  })
568
573
  ),
569
- rewards: e.array(e.lazy(() => Re)).min(1, "Requires at least 1 reward")
570
- }), H = s.extend({
574
+ rewards: e.array(e.lazy(() => Ie)).min(1, "Requires at least 1 reward")
575
+ }), v = s.extend({
571
576
  type: e.literal(t.enum.GAME),
572
577
  // event
573
578
  event: a.merge(
@@ -578,9 +583,9 @@ const Ie = {
578
583
  earningOption: c,
579
584
  collectible: n,
580
585
  game: e.lazy(() => C).optional(),
581
- pf_collectible: e.lazy(() => p).optional(),
586
+ pf_collectible: e.lazy(() => E).optional(),
582
587
  rewardPool: n.optional()
583
- }), Oe = {
588
+ }), De = {
584
589
  collectionName: "Campaigns",
585
590
  transform: {
586
591
  _id: "oid",
@@ -622,22 +627,19 @@ const Ie = {
622
627
  as: "game"
623
628
  }
624
629
  }
625
- }, Ue = e.object({ _id: n }).and(
630
+ }, Ge = e.object({ _id: n }).and(
626
631
  e.discriminatedUnion("type", [
627
632
  Ae,
628
- B,
629
633
  S,
630
634
  U,
631
635
  j,
632
- g,
633
636
  G,
637
+ g,
638
+ H,
634
639
  C,
635
- H
640
+ v
636
641
  ])
637
- ).describe(u.describe(Oe)), je = e.discriminatedUnion("type", [
638
- B.extend({
639
- business: n.nullish()
640
- }),
642
+ ).describe(u.describe(De)), He = e.discriminatedUnion("type", [
641
643
  S.extend({
642
644
  business: n.nullish()
643
645
  }),
@@ -647,32 +649,36 @@ const Ie = {
647
649
  j.extend({
648
650
  business: n.nullish()
649
651
  }),
652
+ G.extend({
653
+ business: n.nullish()
654
+ }),
650
655
  g.extend({
651
656
  business: n.nullish()
652
657
  }),
653
- G.extend({
658
+ H.extend({
654
659
  business: n.nullish()
655
660
  }),
656
661
  C.extend({
657
- rewards: e.array(e.lazy(() => D)).min(1, "Requires at least 1 reward")
662
+ rewards: e.array(e.lazy(() => M)).min(1, "Requires at least 1 reward")
658
663
  }),
659
- H.extend({
664
+ v.extend({
660
665
  business: n.nullish(),
661
666
  game: C.extend({
662
667
  business: n.nullish(),
663
- rewards: e.array(e.lazy(() => D)).min(1, "Requires at least 1 reward")
668
+ rewards: e.array(e.lazy(() => M)).min(1, "Requires at least 1 reward")
664
669
  })
665
670
  })
666
671
  ]);
667
672
  export {
668
673
  r as C,
669
- Ne as F,
674
+ Se as F,
670
675
  t as a,
671
- xe as b,
672
- D as c,
676
+ Be as b,
677
+ M as c,
673
678
  L as d,
674
- Se as e,
675
- je as f,
676
- Ue as g,
677
- Be as r
679
+ je as e,
680
+ xe as f,
681
+ He as g,
682
+ Ge as h,
683
+ Ue as r
678
684
  };
@@ -1,4 +1,4 @@
1
- import { z as t, F as e, m as i } from "./plugins-CJou3ejy.js";
1
+ import { z as t, F as e, m as i } from "./plugins-B_d-WFtN.js";
2
2
  const n = t.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]), s = {
3
3
  collectionName: "MarketingMaterials",
4
4
  transform: {
@@ -1,4 +1,4 @@
1
- import { e, S as n, h as c } from "./app-g6ra_l_x.js";
1
+ import { e, S as n, h as c } from "./app-CxBTTB31.js";
2
2
  const t = () => {
3
3
  const a = n.getBusinessId();
4
4
  if (!a) throw new Error("Invalid business ID");
@@ -1,5 +1,5 @@
1
- import { z as n, F as t, d as m, b as o, m as e } from "./plugins-CJou3ejy.js";
2
- import { e as r } from "./index-BSF_A6Bx.js";
1
+ import { z as n, F as t, d as m, b as o, m as e } from "./plugins-B_d-WFtN.js";
2
+ import { e as r } from "./index-D2Juhkdw.js";
3
3
  import "vue";
4
4
  const g = n.object({
5
5
  icon: n.string(),
@@ -1,4 +1,4 @@
1
- import { e as t, S as n, h as u } from "./app-g6ra_l_x.js";
1
+ import { e as t, S as n, h as u } from "./app-CxBTTB31.js";
2
2
  const a = () => {
3
3
  const e = n.getBusinessId();
4
4
  if (!e) throw new Error("Invalid business ID");