@feedmepos/mf-connect 0.0.16-beta.10 → 0.0.16-beta.11

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 (86) hide show
  1. package/dist/{Analytic-BVk0jPDU.js → Analytic-Gq7PoNer.js} +32 -20
  2. package/dist/{App-BbAalq1k.js → App-Cikl5jnp.js} +33 -27
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +18 -11
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  7. package/dist/Collections-B1SC1rr7.js +453 -0
  8. package/dist/{Credit-Bc9EzdsC.js → Credit-BgwI8DR3.js} +78 -69
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js +2788 -0
  10. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js +344 -0
  11. package/dist/{Experience-CgKak5ik.js → Experience-C2Q-zqV6.js} +64 -55
  12. package/dist/{Game-QhfKqrN_.js → Game-DU2pZDGk.js} +54 -45
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  14. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  15. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
  16. package/dist/MainLayout-B1aJoR95.js +41 -0
  17. package/dist/{Marketing-CSx4N7UJ.js → Marketing-DWiTQp9I.js} +79 -72
  18. package/dist/{Member-CY6WMD8D.js → Member-BEXKBFry.js} +25 -22
  19. package/dist/{MemberList-8iRwm7Sz.js → MemberList-DzMdajIf.js} +321 -307
  20. package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js +432 -0
  22. package/dist/{Mission-BTy1p7lU.js → Mission-KzwRlaA5.js} +50 -40
  23. package/dist/{Point-A6B_ggSy.js → Point-CSKvZXHc.js} +67 -58
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js +1751 -0
  26. package/dist/{Segment-CFVXtyEj.js → Segment-2Q0PonBb.js} +145 -130
  27. package/dist/{Setting-Jmtw-_DV.js → Setting-Df5vVRt4.js} +167 -154
  28. package/dist/{Store-DQypT-7e.js → Store-C0WXCKs6.js} +504 -489
  29. package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-eSSIO0nk.js} +124 -108
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +131 -123
  31. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js +139 -0
  32. package/dist/{Tier-D1jymeLK.js → Tier-v-1FkRU-.js} +144 -125
  33. package/dist/{Title-DN9DIP2k.js → Title-CQ2JWqBW.js} +107 -90
  34. package/dist/{Transaction-BAJvAoU6.js → Transaction-0OouN_6s.js} +2 -2
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
  37. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  38. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  39. package/dist/app-Bd19eW7X.js +5381 -0
  40. package/dist/app-CfS25Z66.js +34797 -0
  41. package/dist/app-wDQR6dpb.js +39 -0
  42. package/dist/app.js +2 -1
  43. package/dist/business-dQh3AEot.js +78 -0
  44. package/dist/campaign-BOl8AgKA.js +96 -0
  45. package/dist/campaign-CpzFl8Vr.js +4 -0
  46. package/dist/collection.fn-B_YsXmrP.js +26 -0
  47. package/dist/dto-B8NfyVPG.js +1169 -0
  48. package/dist/effect-C2jCStXO.js +61 -0
  49. package/dist/{export-DjeNY5Pc.js → export-BtZc3Yzh.js} +19 -16
  50. package/dist/helper-8oGsrM56.js +71 -0
  51. package/dist/index-6FkKY3q0.js +73 -0
  52. package/dist/index-C7oeXRUl.js +95 -0
  53. package/dist/index-CZKYIefW.js +203 -0
  54. package/dist/index-C_0IFnwi.js +2071 -0
  55. package/dist/index-CuvNtC_M.js +61 -0
  56. package/dist/index-DCixRRvz.js +761 -0
  57. package/dist/index-DFgt4-VW.js +38 -0
  58. package/dist/index-DYDhH9bi.js +8832 -0
  59. package/dist/index-Dbd4WA4r.js +61 -0
  60. package/dist/index-Di-kWSmf.js +1737 -0
  61. package/dist/index-Dn0jdj0o.js +28058 -0
  62. package/dist/index-DwKqFNF6.js +3 -0
  63. package/dist/index-HoacsZDk.js +291 -0
  64. package/dist/index-UTQHDUdW.js +94 -0
  65. package/dist/loading-D_AN6p24.js +32697 -0
  66. package/dist/lodash-B5I3zXaY.js +3678 -0
  67. package/dist/membership-Ccrx9R6r.js +221 -0
  68. package/dist/moment-BWErdI6_.js +2578 -0
  69. package/dist/money-waD-f-Zz.js +15 -0
  70. package/dist/number-CwTGGsh9.js +12 -0
  71. package/dist/object-qECH92oz.js +26 -0
  72. package/dist/objectId-dwaoBfJX.js +7 -0
  73. package/dist/rule-DJ07h3Gh.js +1973 -0
  74. package/dist/rule-builder-DJ-acvVD.js +89 -0
  75. package/dist/template-clxvNnbF.js +190 -0
  76. package/dist/usePagination-BeF5K3M7.js +223 -0
  77. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  78. package/dist/xlsx-BB366cdN.js +15491 -0
  79. package/dist/zod-W_PvIofQ.js +90 -0
  80. package/package.json +2 -2
  81. package/dist/Card-B5in1RMa.js +0 -805
  82. package/dist/Collections-CFCZ9YIG.js +0 -4
  83. package/dist/MainLayout-JbHzENFy.js +0 -4
  84. package/dist/app-BpzzygYP.js +0 -87765
  85. package/dist/money-DKGIIplY.js +0 -15
  86. package/dist/number-tPodRxTN.js +0 -12
@@ -0,0 +1,2071 @@
1
+ import { defineComponent as B, ref as P, resolveComponent as c, openBlock as r, createBlock as C, unref as O, withCtx as g, renderSlot as T, createElementBlock as d, toDisplayString as u, createCommentVNode as H, createVNode as I, normalizeClass as L, createElementVNode as k, Fragment as Y, renderList as j } from "vue";
2
+ import { z as e, F as m, m as f } from "./loading-D_AN6p24.js";
3
+ import "./index-DYDhH9bi.js";
4
+ import { R as a } from "./rule-builder-DJ-acvVD.js";
5
+ import { i as o } from "./helper-8oGsrM56.js";
6
+ import { b as K, c as W } from "./index-CZKYIefW.js";
7
+ const X = {
8
+ key: 0,
9
+ class: "fm-typo-en-body-lg-400 mb-4"
10
+ }, q = {
11
+ key: 1,
12
+ class: "fm-typo-en-body-lg-400"
13
+ }, z = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, ve = /* @__PURE__ */ B({
14
+ __name: "CustomSelect",
15
+ props: {
16
+ label: {
17
+ type: String,
18
+ required: !1
19
+ },
20
+ placeholder: {
21
+ type: String,
22
+ required: !1
23
+ },
24
+ items: {
25
+ type: Object,
26
+ required: !0
27
+ },
28
+ modelValue: {
29
+ type: Object
30
+ },
31
+ zIndex: {
32
+ type: Number
33
+ },
34
+ multiselect: {
35
+ type: Boolean
36
+ }
37
+ },
38
+ emits: ["update:model-value"],
39
+ setup(t, { emit: M }) {
40
+ const v = M, s = P(!1);
41
+ return (b, _) => {
42
+ const A = c("FmIcon"), w = c("FmField"), F = c("FmMenuItem"), V = c("FmPopover");
43
+ return r(), C(V, {
44
+ "show-popover": O(s),
45
+ onPopoverChanged: _[0] || (_[0] = (i) => s.value = i),
46
+ "z-index": t.zIndex
47
+ }, {
48
+ "popover-button": g(() => [
49
+ T(b.$slots, "popover-button", {}, () => [
50
+ t.label ? (r(), d("div", X, u(t.label), 1)) : H("", !0),
51
+ I(w, null, {
52
+ append: g(() => [
53
+ T(b.$slots, "append"),
54
+ I(A, {
55
+ name: O(s) ? "expand_less" : "expand_more",
56
+ size: "md",
57
+ color: "black"
58
+ }, null, 8, ["name"])
59
+ ]),
60
+ default: g(() => {
61
+ var i;
62
+ return [
63
+ t.multiselect ? (r(), d("div", q, u(t.items.filter((n) => {
64
+ var p;
65
+ return (p = t.modelValue) == null ? void 0 : p.includes(n.value);
66
+ }).map((n) => n.label).join(", ")), 1)) : (r(), d("div", {
67
+ key: 0,
68
+ class: L(["fm-typo-en-body-lg-400", {
69
+ "text-fm-color-typo-secondary": !t.items.find(
70
+ (n) => n.value == t.modelValue
71
+ )
72
+ }])
73
+ }, u(((i = t.items.find((n) => n.value == t.modelValue)) == null ? void 0 : i.label) || t.placeholder), 3))
74
+ ];
75
+ }),
76
+ _: 3
77
+ })
78
+ ])
79
+ ]),
80
+ default: g(() => [
81
+ k("div", z, [
82
+ (r(!0), d(Y, null, j(t.items, (i) => {
83
+ var n, p;
84
+ return r(), C(F, {
85
+ class: L(`${t.multiselect ? (n = t.modelValue) != null && n.some((l) => l == i.value) ? "bg-fm-color-system-warning-100" : "" : t.modelValue == i.value}`),
86
+ "has-checkbox": t.multiselect,
87
+ key: i.value,
88
+ "model-value": t.multiselect ? (p = t.modelValue) == null ? void 0 : p.some((l) => l == i.value) : t.modelValue == i.value,
89
+ label: i.label,
90
+ onClick: (l) => {
91
+ var E;
92
+ if (l.stopPropagation(), !t.multiselect)
93
+ s.value = !1, v("update:model-value", i.value);
94
+ else {
95
+ const U = (E = t.modelValue) == null ? void 0 : E.some((y) => y == i.value);
96
+ v(
97
+ "update:model-value",
98
+ U ? (t.modelValue ?? []).filter((y) => y !== i.value) : [...t.modelValue ?? [], i.value]
99
+ );
100
+ }
101
+ }
102
+ }, null, 8, ["class", "has-checkbox", "model-value", "label", "onClick"]);
103
+ }), 128))
104
+ ])
105
+ ]),
106
+ _: 3
107
+ }, 8, ["show-popover", "z-index"]);
108
+ };
109
+ }
110
+ }), be = {
111
+ PROMOTION: {
112
+ name: "Promotion Template",
113
+ description: "Promotion template for campaign creation.",
114
+ steps: [
115
+ {
116
+ name: "General information",
117
+ groups: [
118
+ {
119
+ name: "General",
120
+ fields: [
121
+ {
122
+ label: "Campaign name",
123
+ property: "campaign.name",
124
+ type: "text"
125
+ },
126
+ {
127
+ label: "Campaign description",
128
+ property: "campaign.description",
129
+ type: "textarea"
130
+ },
131
+ {
132
+ label: "Campaign period",
133
+ property: "campaign.timeframeOptions",
134
+ type: "timeframe"
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ name: "Trigger",
140
+ fields: [
141
+ {
142
+ label: void 0,
143
+ property: "campaign.event.type",
144
+ type: "trigger",
145
+ extras: "campaign.type"
146
+ }
147
+ ]
148
+ }
149
+ ]
150
+ },
151
+ {
152
+ name: "Discount",
153
+ groups: [
154
+ {
155
+ name: "Discount",
156
+ fields: [
157
+ {
158
+ label: void 0,
159
+ property: "campaign.effect",
160
+ type: "effect"
161
+ }
162
+ ]
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ name: "Terms and conditions",
168
+ groups: [
169
+ {
170
+ name: "Time limitation",
171
+ fields: [
172
+ {
173
+ label: void 0,
174
+ property: "campaign.event.rule",
175
+ type: "rule_time",
176
+ extras: "campaign.type"
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ name: "Target audience",
182
+ fields: [
183
+ {
184
+ label: void 0,
185
+ property: "campaign.event.rule",
186
+ type: "rule_user"
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ name: "Game configuration",
192
+ fields: [
193
+ {
194
+ label: void 0,
195
+ property: "campaign.gameConfig",
196
+ type: "promotion_game_type"
197
+ }
198
+ ]
199
+ },
200
+ {
201
+ name: "Location",
202
+ fields: [
203
+ {
204
+ label: "Target location",
205
+ property: "campaign.targetLocation",
206
+ type: "target_location"
207
+ }
208
+ ]
209
+ }
210
+ ]
211
+ }
212
+ ],
213
+ defaultValue: {
214
+ // TODO: templateId use in db
215
+ templateId: "",
216
+ campaign: {
217
+ type: "PROMOTION",
218
+ // TODO: templateId use in db
219
+ templateId: "",
220
+ name: "",
221
+ description: "",
222
+ image: "",
223
+ effect: null,
224
+ event: {
225
+ type: "MAKING_ORDER",
226
+ rule: a.scaffoldGroup()
227
+ },
228
+ group: null,
229
+ targetLocation: null,
230
+ timeframeOptions: {
231
+ type: "timeframe",
232
+ property: "__now"
233
+ },
234
+ gameConfig: null
235
+ }
236
+ }
237
+ },
238
+ VOUCHER: {
239
+ name: "Voucher Template",
240
+ description: "Voucher template for campaign creation.",
241
+ steps: [
242
+ {
243
+ name: "General information",
244
+ groups: [
245
+ {
246
+ name: "General",
247
+ fields: [
248
+ {
249
+ label: "Campaign name",
250
+ property: "campaign.name",
251
+ type: "text"
252
+ },
253
+ {
254
+ label: "Campaign description",
255
+ property: "campaign.description",
256
+ type: "textarea"
257
+ },
258
+ {
259
+ label: "Campaign period",
260
+ property: "campaign.timeframeOptions",
261
+ type: "timeframe"
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ name: "Trigger",
267
+ fields: [
268
+ {
269
+ label: void 0,
270
+ property: "campaign.event.type",
271
+ type: "trigger",
272
+ extras: "campaign.type"
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ name: "",
278
+ fields: [
279
+ {
280
+ label: void 0,
281
+ property: "campaign.event.rule.rules.g_schedule",
282
+ type: "rule_schedule",
283
+ extras: "campaign.timeframeOptions"
284
+ }
285
+ ],
286
+ condition: {
287
+ property: "campaign.event.type",
288
+ value: "SCHEDULE"
289
+ }
290
+ }
291
+ ]
292
+ },
293
+ {
294
+ name: "Discount",
295
+ groups: [
296
+ {
297
+ name: "Discount",
298
+ fields: [
299
+ {
300
+ label: void 0,
301
+ property: "configs.extras.effect",
302
+ type: "effect"
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ name: "Voucher detail",
308
+ fields: [
309
+ {
310
+ label: "Voucher name",
311
+ property: "configs.name",
312
+ type: "text"
313
+ },
314
+ {
315
+ label: "Voucher description",
316
+ property: "configs.description",
317
+ type: "textarea"
318
+ },
319
+ {
320
+ label: "Voucher image",
321
+ property: "configs.image",
322
+ type: "image"
323
+ }
324
+ ]
325
+ }
326
+ ]
327
+ },
328
+ {
329
+ name: "Terms and conditions",
330
+ groups: [
331
+ {
332
+ name: "Time limitation",
333
+ fields: [
334
+ {
335
+ label: void 0,
336
+ property: "campaign.event.rule",
337
+ type: "rule_time",
338
+ extras: "campaign.type"
339
+ }
340
+ ],
341
+ condition: {
342
+ not: !0,
343
+ property: "campaign.event.type",
344
+ value: "SCHEDULE"
345
+ }
346
+ },
347
+ {
348
+ name: "Spending criteria",
349
+ fields: [
350
+ {
351
+ label: void 0,
352
+ property: "campaign.event.rule",
353
+ type: "rule_bill"
354
+ }
355
+ ],
356
+ condition: {
357
+ property: "campaign.event.type",
358
+ value: "BILL_COMPLETED"
359
+ }
360
+ },
361
+ {
362
+ name: "Feedback criteria",
363
+ fields: [
364
+ {
365
+ label: void 0,
366
+ property: "campaign.event.rule",
367
+ type: "rule_feedback"
368
+ }
369
+ ],
370
+ condition: {
371
+ property: "campaign.event.type",
372
+ value: "FEEDBACK"
373
+ }
374
+ },
375
+ {
376
+ name: "Target audience",
377
+ fields: [
378
+ {
379
+ label: void 0,
380
+ property: "campaign.event.rule",
381
+ type: "rule_user"
382
+ }
383
+ // {
384
+ // label: 'Birthday config',
385
+ // property: 'campaign.event.__rule',
386
+ // type: 'rule_birthday',
387
+ // },
388
+ ]
389
+ },
390
+ {
391
+ name: "Voucher usage configuration",
392
+ fields: [
393
+ {
394
+ label: void 0,
395
+ property: "configs.options",
396
+ type: "collectible_options"
397
+ }
398
+ ]
399
+ }
400
+ ]
401
+ },
402
+ {
403
+ name: "Configuration",
404
+ groups: [
405
+ {
406
+ name: "Location",
407
+ fields: [
408
+ {
409
+ label: "Target location",
410
+ property: "campaign.targetLocation",
411
+ type: "target_location"
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ name: "Redemption",
417
+ fields: [
418
+ {
419
+ label: "Code",
420
+ property: "campaign.code",
421
+ type: "text"
422
+ }
423
+ ],
424
+ condition: {
425
+ property: "campaign.event.type",
426
+ value: "SIMPLE_CLAIM"
427
+ }
428
+ },
429
+ {
430
+ name: "Notify audience",
431
+ fields: [
432
+ {
433
+ label: "Send notification",
434
+ property: "campaign.notify",
435
+ type: "switch"
436
+ }
437
+ ]
438
+ },
439
+ {
440
+ name: "Notify message",
441
+ fields: [
442
+ {
443
+ label: "Notification message",
444
+ property: "campaign.notifyMessage",
445
+ type: "message",
446
+ extras: "ISSUE_REWARD"
447
+ }
448
+ ],
449
+ condition: {
450
+ property: "campaign.notify",
451
+ value: !0
452
+ }
453
+ }
454
+ ]
455
+ }
456
+ ],
457
+ defaultValue: {
458
+ templateId: "",
459
+ campaign: {
460
+ collectible: "",
461
+ type: "VOUCHER",
462
+ templateId: "",
463
+ name: "",
464
+ description: "",
465
+ image: "",
466
+ code: "",
467
+ event: {
468
+ type: "BILL_COMPLETED",
469
+ rule: a.scaffoldGroup()
470
+ },
471
+ group: null,
472
+ targetLocation: null,
473
+ timeframeOptions: {
474
+ type: "timeframe",
475
+ property: "__now"
476
+ },
477
+ earningOption: {
478
+ type: "FIXED",
479
+ amount: 1
480
+ },
481
+ notify: !1
482
+ },
483
+ configs: o("VOUCHER", {
484
+ name: "",
485
+ business: null,
486
+ noCampaign: !1
487
+ })
488
+ }
489
+ },
490
+ BROADCAST: {
491
+ name: "Broadcast Template",
492
+ description: "Broadcast template for campaign creation.",
493
+ steps: [
494
+ {
495
+ name: "General information",
496
+ groups: [
497
+ {
498
+ name: "General",
499
+ fields: [
500
+ {
501
+ label: "Campaign name",
502
+ property: "campaign.name",
503
+ type: "text"
504
+ },
505
+ {
506
+ label: "Campaign description",
507
+ property: "campaign.description",
508
+ type: "textarea"
509
+ }
510
+ ]
511
+ },
512
+ {
513
+ name: "Trigger",
514
+ fields: [
515
+ {
516
+ label: void 0,
517
+ property: "campaign.event.type",
518
+ type: "trigger",
519
+ extras: "campaign.type"
520
+ }
521
+ ]
522
+ },
523
+ {
524
+ name: "Broadcast configuration",
525
+ fields: [
526
+ {
527
+ label: void 0,
528
+ property: "campaign.event.rule.rules.g_schedule",
529
+ type: "rule_schedule",
530
+ extras: "campaign.timeframeOptions"
531
+ }
532
+ ],
533
+ condition: {
534
+ property: "campaign.event.type",
535
+ value: "SCHEDULE"
536
+ }
537
+ }
538
+ ]
539
+ },
540
+ {
541
+ name: "Terms and conditions",
542
+ groups: [
543
+ {
544
+ name: "Target audience",
545
+ fields: [
546
+ {
547
+ label: void 0,
548
+ property: "campaign.event.rule",
549
+ type: "rule_user"
550
+ }
551
+ ]
552
+ },
553
+ {
554
+ name: "Feedback criteria",
555
+ fields: [
556
+ {
557
+ label: void 0,
558
+ property: "campaign.event.rule",
559
+ type: "rule_feedback"
560
+ }
561
+ ],
562
+ condition: {
563
+ property: "campaign.event.type",
564
+ value: "FEEDBACK"
565
+ }
566
+ }
567
+ ]
568
+ },
569
+ {
570
+ name: "Configuration",
571
+ groups: [
572
+ {
573
+ name: "Content",
574
+ fields: [
575
+ {
576
+ label: void 0,
577
+ property: "campaign.message",
578
+ type: "message"
579
+ }
580
+ ]
581
+ },
582
+ {
583
+ name: "Location",
584
+ fields: [
585
+ {
586
+ label: void 0,
587
+ property: "campaign.targetLocation",
588
+ type: "target_location"
589
+ }
590
+ ]
591
+ }
592
+ ]
593
+ }
594
+ ],
595
+ defaultValue: {
596
+ templateId: "",
597
+ campaign: {
598
+ type: "BROADCAST",
599
+ // TODO: templateId use in db
600
+ templateId: "",
601
+ name: "",
602
+ description: "",
603
+ image: "",
604
+ event: {
605
+ type: "SCHEDULE",
606
+ rule: a.setRuleToGroup(
607
+ a.scaffoldGroup(),
608
+ a.setRuleToGroup(
609
+ a.scaffoldGroup("g_schedule"),
610
+ [
611
+ a.constructEntry(
612
+ "trigger.date",
613
+ "_rrule",
614
+ "RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU"
615
+ ),
616
+ a.constructEntry(
617
+ "trigger.time",
618
+ "_isOnTime",
619
+ "00:00"
620
+ )
621
+ ],
622
+ "&&"
623
+ )
624
+ )
625
+ },
626
+ group: null,
627
+ targetLocation: null,
628
+ timeframeOptions: {
629
+ type: "timeframe",
630
+ property: "__now"
631
+ },
632
+ message: {
633
+ channel: "SMS",
634
+ content: "",
635
+ language: "en",
636
+ variables: []
637
+ }
638
+ }
639
+ }
640
+ },
641
+ POINT: {
642
+ name: "Experience Template",
643
+ description: "Experience template for campaign creation.",
644
+ steps: [
645
+ {
646
+ name: "General information",
647
+ groups: [
648
+ {
649
+ name: "General",
650
+ fields: [
651
+ {
652
+ label: "Campaign name",
653
+ property: "campaign.name",
654
+ type: "text"
655
+ },
656
+ {
657
+ label: "Campaign description",
658
+ property: "campaign.description",
659
+ type: "textarea"
660
+ },
661
+ {
662
+ label: "Campaign period",
663
+ property: "campaign.timeframeOptions",
664
+ type: "timeframe"
665
+ }
666
+ ]
667
+ },
668
+ {
669
+ name: "Trigger",
670
+ fields: [
671
+ {
672
+ label: void 0,
673
+ property: "campaign.event.type",
674
+ type: "trigger",
675
+ extras: "campaign.type"
676
+ }
677
+ ]
678
+ },
679
+ {
680
+ name: void 0,
681
+ fields: [
682
+ {
683
+ label: void 0,
684
+ property: "campaign.event.rule.rules.g_schedule",
685
+ type: "rule_schedule",
686
+ extras: "campaign.timeframeOptions"
687
+ }
688
+ ],
689
+ condition: {
690
+ property: "campaign.event.type",
691
+ value: "SCHEDULE"
692
+ }
693
+ }
694
+ ]
695
+ },
696
+ {
697
+ name: "Terms and conditions",
698
+ groups: [
699
+ {
700
+ name: "Time limitation",
701
+ fields: [
702
+ {
703
+ label: void 0,
704
+ property: "campaign.event.rule",
705
+ type: "rule_time",
706
+ extras: "campaign.type"
707
+ }
708
+ ],
709
+ condition: {
710
+ not: !0,
711
+ property: "campaign.event.type",
712
+ value: "SCHEDULE"
713
+ }
714
+ },
715
+ {
716
+ name: "Spending criteria",
717
+ fields: [
718
+ {
719
+ label: void 0,
720
+ property: "campaign.event.rule",
721
+ type: "rule_bill"
722
+ }
723
+ ],
724
+ condition: {
725
+ property: "campaign.event.type",
726
+ value: "BILL_COMPLETED"
727
+ }
728
+ },
729
+ {
730
+ name: "Feedback criteria",
731
+ fields: [
732
+ {
733
+ label: void 0,
734
+ property: "campaign.event.rule",
735
+ type: "rule_feedback"
736
+ }
737
+ ],
738
+ condition: {
739
+ property: "campaign.event.type",
740
+ value: "FEEDBACK"
741
+ }
742
+ },
743
+ {
744
+ name: "Target audience",
745
+ fields: [
746
+ {
747
+ label: void 0,
748
+ property: "campaign.event.rule",
749
+ type: "rule_user"
750
+ }
751
+ ]
752
+ }
753
+ ]
754
+ },
755
+ {
756
+ name: "Configuration",
757
+ groups: [
758
+ {
759
+ name: "Earning type",
760
+ fields: [
761
+ {
762
+ label: void 0,
763
+ property: "campaign.earningOption",
764
+ type: "earning_option",
765
+ extras: ""
766
+ },
767
+ {
768
+ label: void 0,
769
+ property: "campaign.config.validityOption",
770
+ type: "validity_option"
771
+ }
772
+ ]
773
+ },
774
+ {
775
+ name: "Location",
776
+ fields: [
777
+ {
778
+ label: "Target location",
779
+ property: "campaign.targetLocation",
780
+ type: "target_location"
781
+ }
782
+ ]
783
+ }
784
+ // {
785
+ // name: 'Notify audience',
786
+ // fields: [
787
+ // {
788
+ // label: 'Send notification',
789
+ // property: 'campaign.notify',
790
+ // type: 'switch',
791
+ // },
792
+ // ],
793
+ // },
794
+ ]
795
+ }
796
+ ],
797
+ defaultValue: {
798
+ // TODO: templateId use in db
799
+ templateId: "",
800
+ campaign: {
801
+ collectible: "",
802
+ type: "POINT",
803
+ // TODO: templateId use in db
804
+ templateId: "",
805
+ name: "",
806
+ description: "",
807
+ image: "",
808
+ event: {
809
+ type: "BILL_COMPLETED",
810
+ rule: a.scaffoldGroup()
811
+ },
812
+ group: null,
813
+ targetLocation: null,
814
+ timeframeOptions: {
815
+ type: "timeframe",
816
+ property: "__now"
817
+ },
818
+ earningOption: {
819
+ type: "FIXED",
820
+ amount: 1
821
+ },
822
+ config: {
823
+ validityOption: {}
824
+ }
825
+ }
826
+ }
827
+ },
828
+ COIN: {
829
+ name: "Point Template",
830
+ description: "Point template for campaign creation.",
831
+ steps: [
832
+ {
833
+ name: "General information",
834
+ groups: [
835
+ {
836
+ name: "General",
837
+ fields: [
838
+ {
839
+ label: "Campaign name",
840
+ property: "campaign.name",
841
+ type: "text"
842
+ },
843
+ {
844
+ label: "Campaign description",
845
+ property: "campaign.description",
846
+ type: "textarea"
847
+ },
848
+ {
849
+ label: "Campaign period",
850
+ property: "campaign.timeframeOptions",
851
+ type: "timeframe"
852
+ }
853
+ ]
854
+ },
855
+ {
856
+ name: "Trigger",
857
+ fields: [
858
+ {
859
+ label: void 0,
860
+ property: "campaign.event.type",
861
+ type: "trigger",
862
+ extras: "campaign.type"
863
+ }
864
+ ]
865
+ },
866
+ {
867
+ name: void 0,
868
+ fields: [
869
+ {
870
+ label: void 0,
871
+ property: "campaign.event.rule.rules.g_schedule",
872
+ type: "rule_schedule",
873
+ extras: "campaign.timeframeOptions"
874
+ }
875
+ ],
876
+ condition: {
877
+ property: "campaign.event.type",
878
+ value: "SCHEDULE"
879
+ }
880
+ }
881
+ ]
882
+ },
883
+ {
884
+ name: "Terms and conditions",
885
+ groups: [
886
+ {
887
+ name: "Time limitation",
888
+ fields: [
889
+ {
890
+ label: void 0,
891
+ property: "campaign.event.rule",
892
+ type: "rule_time",
893
+ extras: "campaign.type"
894
+ }
895
+ ],
896
+ condition: {
897
+ not: !0,
898
+ property: "campaign.event.type",
899
+ value: "SCHEDULE"
900
+ }
901
+ },
902
+ {
903
+ name: "Spending criteria",
904
+ fields: [
905
+ {
906
+ label: void 0,
907
+ property: "campaign.event.rule",
908
+ type: "rule_bill"
909
+ }
910
+ ],
911
+ condition: {
912
+ property: "campaign.event.type",
913
+ value: "BILL_COMPLETED"
914
+ }
915
+ },
916
+ {
917
+ name: "Feedback criteria",
918
+ fields: [
919
+ {
920
+ label: void 0,
921
+ property: "campaign.event.rule",
922
+ type: "rule_feedback"
923
+ }
924
+ ],
925
+ condition: {
926
+ property: "campaign.event.type",
927
+ value: "FEEDBACK"
928
+ }
929
+ },
930
+ {
931
+ name: "Target audience",
932
+ fields: [
933
+ {
934
+ label: void 0,
935
+ property: "campaign.event.rule",
936
+ type: "rule_user"
937
+ }
938
+ ]
939
+ }
940
+ ]
941
+ },
942
+ {
943
+ name: "Configuration",
944
+ groups: [
945
+ {
946
+ name: "Earning type",
947
+ fields: [
948
+ {
949
+ label: void 0,
950
+ property: "campaign.earningOption",
951
+ type: "earning_option",
952
+ extras: ""
953
+ },
954
+ {
955
+ label: void 0,
956
+ property: "campaign.config.validityOption",
957
+ type: "validity_option"
958
+ }
959
+ ]
960
+ },
961
+ {
962
+ name: "Location",
963
+ fields: [
964
+ {
965
+ label: "Target location",
966
+ property: "campaign.targetLocation",
967
+ type: "target_location"
968
+ }
969
+ ]
970
+ }
971
+ // {
972
+ // name: 'Notify audience',
973
+ // fields: [
974
+ // {
975
+ // label: 'Send notification',
976
+ // property: 'campaign.notify',
977
+ // type: 'switch',
978
+ // },
979
+ // ],
980
+ // },
981
+ ]
982
+ }
983
+ ],
984
+ defaultValue: {
985
+ // TODO: templateId use in db
986
+ templateId: "",
987
+ campaign: {
988
+ collectible: "",
989
+ type: "COIN",
990
+ // TODO: templateId use in db
991
+ templateId: "",
992
+ name: "",
993
+ description: "",
994
+ image: "",
995
+ event: {
996
+ type: "BILL_COMPLETED",
997
+ rule: a.scaffoldGroup()
998
+ },
999
+ group: null,
1000
+ targetLocation: null,
1001
+ timeframeOptions: {
1002
+ type: "timeframe",
1003
+ property: "__now"
1004
+ },
1005
+ earningOption: {
1006
+ type: "FIXED",
1007
+ amount: 1
1008
+ },
1009
+ config: {
1010
+ validityOption: {}
1011
+ }
1012
+ }
1013
+ }
1014
+ },
1015
+ CREDIT: {
1016
+ name: "Credit Template",
1017
+ description: "Credit template for campaign creation.",
1018
+ steps: [
1019
+ {
1020
+ name: "General information",
1021
+ groups: [
1022
+ {
1023
+ name: "General",
1024
+ fields: [
1025
+ {
1026
+ label: "Campaign name",
1027
+ property: "campaign.name",
1028
+ type: "text"
1029
+ },
1030
+ {
1031
+ label: "Campaign description",
1032
+ property: "campaign.description",
1033
+ type: "textarea"
1034
+ },
1035
+ {
1036
+ label: "Campaign period",
1037
+ property: "campaign.timeframeOptions",
1038
+ type: "timeframe"
1039
+ }
1040
+ ]
1041
+ },
1042
+ {
1043
+ name: "Trigger",
1044
+ fields: [
1045
+ {
1046
+ label: void 0,
1047
+ property: "campaign.event.type",
1048
+ type: "trigger",
1049
+ extras: "campaign.type"
1050
+ }
1051
+ ]
1052
+ },
1053
+ {
1054
+ name: void 0,
1055
+ fields: [
1056
+ {
1057
+ label: void 0,
1058
+ property: "campaign.event.rule.rules.g_schedule",
1059
+ type: "rule_schedule",
1060
+ extras: "campaign.timeframeOptions"
1061
+ }
1062
+ ],
1063
+ condition: {
1064
+ property: "campaign.event.type",
1065
+ value: "SCHEDULE"
1066
+ }
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ name: "Terms and conditions",
1072
+ groups: [
1073
+ {
1074
+ name: "Time limitation",
1075
+ fields: [
1076
+ {
1077
+ label: void 0,
1078
+ property: "campaign.event.rule",
1079
+ type: "rule_time",
1080
+ extras: "campaign.type"
1081
+ }
1082
+ ],
1083
+ condition: {
1084
+ not: !0,
1085
+ property: "campaign.event.type",
1086
+ value: "SCHEDULE"
1087
+ }
1088
+ },
1089
+ {
1090
+ name: "Spending criteria",
1091
+ fields: [
1092
+ {
1093
+ label: void 0,
1094
+ property: "campaign.event.rule",
1095
+ type: "rule_bill"
1096
+ }
1097
+ ],
1098
+ condition: {
1099
+ property: "campaign.event.type",
1100
+ value: "BILL_COMPLETED"
1101
+ }
1102
+ },
1103
+ {
1104
+ name: "Feedback criteria",
1105
+ fields: [
1106
+ {
1107
+ label: void 0,
1108
+ property: "campaign.event.rule",
1109
+ type: "rule_feedback"
1110
+ }
1111
+ ],
1112
+ condition: {
1113
+ property: "campaign.event.type",
1114
+ value: "FEEDBACK"
1115
+ }
1116
+ },
1117
+ {
1118
+ name: "Target audience",
1119
+ fields: [
1120
+ {
1121
+ label: void 0,
1122
+ property: "campaign.event.rule",
1123
+ type: "rule_user"
1124
+ }
1125
+ ]
1126
+ }
1127
+ ]
1128
+ },
1129
+ {
1130
+ name: "Configuration",
1131
+ groups: [
1132
+ {
1133
+ name: "Earning type",
1134
+ fields: [
1135
+ {
1136
+ label: void 0,
1137
+ property: "campaign.earningOption",
1138
+ type: "earning_option",
1139
+ extras: ""
1140
+ },
1141
+ {
1142
+ label: void 0,
1143
+ property: "campaign.config.validityOption",
1144
+ type: "validity_option"
1145
+ }
1146
+ ]
1147
+ },
1148
+ {
1149
+ name: "Location",
1150
+ fields: [
1151
+ {
1152
+ label: "Target location",
1153
+ property: "campaign.targetLocation",
1154
+ type: "target_location"
1155
+ }
1156
+ ]
1157
+ }
1158
+ // {
1159
+ // name: 'Notify audience',
1160
+ // fields: [
1161
+ // {
1162
+ // label: 'Send notification',
1163
+ // property: 'campaign.notify',
1164
+ // type: 'switch',
1165
+ // },
1166
+ // ],
1167
+ // },
1168
+ ]
1169
+ }
1170
+ ],
1171
+ defaultValue: {
1172
+ // TODO: templateId use in db
1173
+ templateId: "",
1174
+ campaign: {
1175
+ collectible: "",
1176
+ type: "CREDIT",
1177
+ // TODO: templateId use in db
1178
+ templateId: "",
1179
+ name: "",
1180
+ description: "",
1181
+ image: "",
1182
+ event: {
1183
+ type: "BILL_COMPLETED",
1184
+ rule: a.scaffoldGroup()
1185
+ },
1186
+ group: null,
1187
+ targetLocation: null,
1188
+ timeframeOptions: {
1189
+ type: "timeframe",
1190
+ property: "__now"
1191
+ },
1192
+ earningOption: {
1193
+ type: "FIXED",
1194
+ amount: 1
1195
+ },
1196
+ config: {
1197
+ validityOption: {}
1198
+ }
1199
+ }
1200
+ }
1201
+ },
1202
+ GAME: {
1203
+ name: "Token Template",
1204
+ description: "Token template for campaign creation.",
1205
+ steps: [
1206
+ {
1207
+ name: "General information",
1208
+ groups: [
1209
+ {
1210
+ name: "General",
1211
+ fields: [
1212
+ {
1213
+ label: "Campaign name",
1214
+ property: "campaign.name",
1215
+ type: "text"
1216
+ },
1217
+ {
1218
+ label: "Campaign description",
1219
+ property: "campaign.description",
1220
+ type: "textarea"
1221
+ },
1222
+ {
1223
+ label: "Campaign period",
1224
+ property: "campaign.timeframeOptions",
1225
+ type: "timeframe"
1226
+ }
1227
+ ]
1228
+ },
1229
+ {
1230
+ name: "Trigger",
1231
+ fields: [
1232
+ {
1233
+ label: void 0,
1234
+ property: "campaign.event.type",
1235
+ type: "trigger",
1236
+ extras: "campaign.type"
1237
+ }
1238
+ ]
1239
+ },
1240
+ {
1241
+ name: void 0,
1242
+ fields: [
1243
+ {
1244
+ label: void 0,
1245
+ property: "campaign.event.rule.rules.g_schedule",
1246
+ type: "rule_schedule",
1247
+ extras: "campaign.timeframeOptions"
1248
+ }
1249
+ ],
1250
+ condition: {
1251
+ property: "campaign.event.type",
1252
+ value: "SCHEDULE"
1253
+ }
1254
+ }
1255
+ ]
1256
+ },
1257
+ {
1258
+ name: "Terms and conditions",
1259
+ groups: [
1260
+ {
1261
+ name: "Time limitation",
1262
+ fields: [
1263
+ {
1264
+ label: void 0,
1265
+ property: "campaign.event.rule",
1266
+ type: "rule_time",
1267
+ extras: "campaign.type"
1268
+ }
1269
+ ],
1270
+ condition: {
1271
+ not: !0,
1272
+ property: "campaign.event.type",
1273
+ value: "SCHEDULE"
1274
+ }
1275
+ },
1276
+ {
1277
+ name: "Spending criteria",
1278
+ fields: [
1279
+ {
1280
+ label: void 0,
1281
+ property: "campaign.event.rule",
1282
+ type: "rule_bill"
1283
+ }
1284
+ ],
1285
+ condition: {
1286
+ property: "campaign.event.type",
1287
+ value: "BILL_COMPLETED"
1288
+ }
1289
+ },
1290
+ {
1291
+ name: "Feedback criteria",
1292
+ fields: [
1293
+ {
1294
+ label: void 0,
1295
+ property: "campaign.event.rule",
1296
+ type: "rule_feedback"
1297
+ }
1298
+ ],
1299
+ condition: {
1300
+ property: "campaign.event.type",
1301
+ value: "FEEDBACK"
1302
+ }
1303
+ },
1304
+ {
1305
+ name: "Target audience",
1306
+ fields: [
1307
+ {
1308
+ label: void 0,
1309
+ property: "campaign.event.rule",
1310
+ type: "rule_user"
1311
+ }
1312
+ ]
1313
+ }
1314
+ ]
1315
+ },
1316
+ {
1317
+ name: "Configuration",
1318
+ groups: [
1319
+ {
1320
+ name: "Earning type",
1321
+ fields: [
1322
+ {
1323
+ label: void 0,
1324
+ property: "campaign.earningOption",
1325
+ type: "earning_option",
1326
+ extras: ""
1327
+ },
1328
+ {
1329
+ label: void 0,
1330
+ property: "campaign.config.validityOption",
1331
+ type: "validity_option"
1332
+ }
1333
+ ]
1334
+ },
1335
+ {
1336
+ name: "Location",
1337
+ fields: [
1338
+ {
1339
+ label: "Target location",
1340
+ property: "campaign.targetLocation",
1341
+ type: "target_location"
1342
+ }
1343
+ ]
1344
+ }
1345
+ ]
1346
+ },
1347
+ {
1348
+ name: "Game configuration",
1349
+ groups: [
1350
+ {
1351
+ name: "Game type",
1352
+ fields: [
1353
+ {
1354
+ label: "Select a game where you want your customer to play",
1355
+ property: "configs.extras.gameType",
1356
+ type: "game_type"
1357
+ }
1358
+ ]
1359
+ }
1360
+ ]
1361
+ },
1362
+ {
1363
+ name: "Reward pool",
1364
+ groups: [
1365
+ {
1366
+ name: "Reward pool",
1367
+ fields: [
1368
+ {
1369
+ label: "Configure the reward type and weightage given to your customer.",
1370
+ property: "campaign.game.rewards",
1371
+ type: "reward_pool"
1372
+ }
1373
+ ]
1374
+ }
1375
+ ]
1376
+ }
1377
+ ],
1378
+ defaultValue: {
1379
+ // TODO: templateId use in db
1380
+ templateId: "",
1381
+ campaign: {
1382
+ collectible: "",
1383
+ type: "GAME",
1384
+ // TODO: templateId use in db
1385
+ templateId: "",
1386
+ name: "",
1387
+ description: "",
1388
+ image: "",
1389
+ event: {
1390
+ type: "BILL_COMPLETED",
1391
+ rule: a.scaffoldGroup()
1392
+ },
1393
+ group: null,
1394
+ targetLocation: null,
1395
+ timeframeOptions: {
1396
+ type: "timeframe",
1397
+ property: "__now"
1398
+ },
1399
+ earningOption: {
1400
+ type: "FIXED",
1401
+ amount: 1
1402
+ },
1403
+ config: {
1404
+ validityOption: {}
1405
+ },
1406
+ game: {
1407
+ event: {
1408
+ type: "GAME_COMPLETED",
1409
+ rule: a.scaffoldGroup()
1410
+ },
1411
+ name: "rewardpool_",
1412
+ targetLocation: null,
1413
+ timeframeOptions: {
1414
+ type: "timeframe",
1415
+ property: "__now"
1416
+ },
1417
+ type: "REWARD_POOL",
1418
+ rewards: []
1419
+ }
1420
+ },
1421
+ configs: o("GAME", {
1422
+ name: "Token",
1423
+ business: null,
1424
+ noCampaign: !1
1425
+ })
1426
+ }
1427
+ },
1428
+ MISSION: {
1429
+ name: "Mission Template",
1430
+ description: "Mission template for campaign creation.",
1431
+ steps: [
1432
+ {
1433
+ name: "General information",
1434
+ groups: [
1435
+ {
1436
+ name: "General",
1437
+ fields: [
1438
+ {
1439
+ label: "Campaign name",
1440
+ property: "campaign.name",
1441
+ type: "text"
1442
+ },
1443
+ {
1444
+ label: "Campaign description",
1445
+ property: "campaign.description",
1446
+ type: "textarea"
1447
+ },
1448
+ {
1449
+ label: "Campaign period",
1450
+ property: "campaign.timeframeOptions",
1451
+ type: "timeframe"
1452
+ }
1453
+ ]
1454
+ },
1455
+ {
1456
+ name: "Trigger",
1457
+ fields: [
1458
+ {
1459
+ label: void 0,
1460
+ property: "campaign.event.type",
1461
+ type: "trigger",
1462
+ extras: "campaign.type"
1463
+ }
1464
+ ]
1465
+ },
1466
+ {
1467
+ name: void 0,
1468
+ fields: [
1469
+ {
1470
+ label: void 0,
1471
+ property: "campaign.event.rule.rules.g_schedule",
1472
+ type: "rule_schedule",
1473
+ extras: "campaign.timeframeOptions"
1474
+ }
1475
+ ],
1476
+ condition: {
1477
+ property: "campaign.event.type",
1478
+ value: "SCHEDULE"
1479
+ }
1480
+ }
1481
+ ]
1482
+ },
1483
+ {
1484
+ name: "Terms and conditions",
1485
+ groups: [
1486
+ {
1487
+ name: "Time limitation",
1488
+ fields: [
1489
+ {
1490
+ label: void 0,
1491
+ property: "campaign.event.rule",
1492
+ type: "rule_time",
1493
+ extras: "campaign.type"
1494
+ }
1495
+ ],
1496
+ condition: {
1497
+ not: !0,
1498
+ property: "campaign.event.type",
1499
+ value: "SCHEDULE"
1500
+ }
1501
+ },
1502
+ {
1503
+ name: "Feedback criteria",
1504
+ fields: [
1505
+ {
1506
+ label: void 0,
1507
+ property: "campaign.event.rule",
1508
+ type: "rule_feedback"
1509
+ }
1510
+ ],
1511
+ condition: {
1512
+ property: "campaign.event.type",
1513
+ value: "FEEDBACK"
1514
+ }
1515
+ },
1516
+ {
1517
+ name: "Target audience",
1518
+ fields: [
1519
+ {
1520
+ label: void 0,
1521
+ property: "campaign.event.rule",
1522
+ type: "rule_user"
1523
+ }
1524
+ ]
1525
+ },
1526
+ {
1527
+ name: "Spending criteria",
1528
+ fields: [
1529
+ {
1530
+ label: void 0,
1531
+ property: "campaign.event.rule",
1532
+ type: "rule_bill"
1533
+ }
1534
+ ],
1535
+ condition: {
1536
+ property: "campaign.event.type",
1537
+ value: "BILL_COMPLETED"
1538
+ }
1539
+ }
1540
+ ]
1541
+ },
1542
+ {
1543
+ name: "Configuration",
1544
+ groups: [
1545
+ // {
1546
+ // name: 'Earning type',
1547
+ // fields: [
1548
+ // {
1549
+ // label: undefined,
1550
+ // property: 'campaign.earningOption',
1551
+ // type: 'earning_option',
1552
+ // extras: 'campaign',
1553
+ // },
1554
+ // ],
1555
+ // },
1556
+ {
1557
+ name: "Location",
1558
+ fields: [
1559
+ {
1560
+ label: "Target location",
1561
+ property: "campaign.targetLocation",
1562
+ type: "target_location"
1563
+ }
1564
+ ]
1565
+ }
1566
+ ]
1567
+ },
1568
+ {
1569
+ name: "Mission configuration",
1570
+ groups: [
1571
+ {
1572
+ name: void 0,
1573
+ fields: [
1574
+ {
1575
+ label: void 0,
1576
+ property: "campaign.mission",
1577
+ type: "mission"
1578
+ }
1579
+ ]
1580
+ },
1581
+ {
1582
+ name: "Earning type",
1583
+ fields: [
1584
+ {
1585
+ label: void 0,
1586
+ property: "campaign.earningOption",
1587
+ type: "earning_option",
1588
+ extras: ""
1589
+ }
1590
+ ]
1591
+ },
1592
+ {
1593
+ name: "Validity configuration",
1594
+ fields: [
1595
+ {
1596
+ label: void 0,
1597
+ property: "campaign.config.validityOption",
1598
+ type: "validity_option"
1599
+ }
1600
+ ]
1601
+ },
1602
+ {
1603
+ name: "Mission participation",
1604
+ fields: [
1605
+ {
1606
+ label: void 0,
1607
+ property: "configs.options",
1608
+ type: "collectible_options",
1609
+ extras: "campaign.type"
1610
+ }
1611
+ ]
1612
+ }
1613
+ ]
1614
+ },
1615
+ {
1616
+ name: "Reward setup",
1617
+ groups: [
1618
+ {
1619
+ name: "Configure reward",
1620
+ fields: [
1621
+ {
1622
+ label: "Configure the reward type given to your customer.",
1623
+ property: "campaign.rewards",
1624
+ type: "mission_pool",
1625
+ extras: "campaign"
1626
+ }
1627
+ ]
1628
+ }
1629
+ ]
1630
+ }
1631
+ ],
1632
+ defaultValue: {
1633
+ // TODO: templateId use in db
1634
+ templateId: "",
1635
+ campaign: {
1636
+ type: "MISSION",
1637
+ business: "",
1638
+ collectible: "",
1639
+ name: "",
1640
+ earningOption: {
1641
+ amount: 1,
1642
+ type: "FIXED"
1643
+ },
1644
+ event: {
1645
+ type: "BILL_COMPLETED",
1646
+ rule: a.scaffoldGroup()
1647
+ },
1648
+ mission: {
1649
+ type: "STAMP",
1650
+ end: 10
1651
+ },
1652
+ rewards: [],
1653
+ config: {
1654
+ validityOption: {
1655
+ followFirstReceive: !0
1656
+ }
1657
+ },
1658
+ timeframeOptions: {
1659
+ type: "timeframe"
1660
+ }
1661
+ },
1662
+ configs: o("STAMP", {
1663
+ business: null,
1664
+ noCampaign: !1
1665
+ })
1666
+ }
1667
+ }
1668
+ };
1669
+ a.scaffoldGroup(), o("STAMP", {
1670
+ business: null,
1671
+ noCampaign: !1
1672
+ });
1673
+ ({
1674
+ ...a.scaffoldGroup()
1675
+ }, o("VOUCHER", {
1676
+ name: "",
1677
+ business: null,
1678
+ noCampaign: !1
1679
+ }));
1680
+ ({
1681
+ ...a.scaffoldGroup()
1682
+ }, o("VOUCHER", {
1683
+ name: "",
1684
+ business: null,
1685
+ noCampaign: !1
1686
+ }));
1687
+ ({
1688
+ ...a.scaffoldGroup()
1689
+ });
1690
+ ({
1691
+ ...a.scaffoldGroup()
1692
+ });
1693
+ ({
1694
+ ...a.scaffoldGroup()
1695
+ });
1696
+ a.setRuleToGroup(
1697
+ a.scaffoldGroup(),
1698
+ a.setRuleToGroup(
1699
+ a.scaffoldGroup("g_user"),
1700
+ [a.constructEntry("user.member", "_isIn", [!0])],
1701
+ "&&"
1702
+ )
1703
+ );
1704
+ a.setRuleToGroup(a.scaffoldGroup(), [
1705
+ a.setRuleToGroup(
1706
+ a.scaffoldGroup("g_user"),
1707
+ [
1708
+ a.constructEntry("user.birthday", "_isRange", {
1709
+ op: "this",
1710
+ unit: "month",
1711
+ ignoreYear: !0
1712
+ })
1713
+ ],
1714
+ "&&"
1715
+ )
1716
+ ]);
1717
+ ({
1718
+ ...a.scaffoldGroup()
1719
+ });
1720
+ ({
1721
+ ...a.scaffoldGroup()
1722
+ });
1723
+ ({
1724
+ ...a.scaffoldGroup()
1725
+ }, o("VOUCHER", {
1726
+ name: "",
1727
+ business: null,
1728
+ noCampaign: !1
1729
+ }));
1730
+ a.setRuleToGroup(
1731
+ a.scaffoldGroup(),
1732
+ a.setRuleToGroup(
1733
+ a.scaffoldGroup("g_schedule"),
1734
+ [
1735
+ a.constructEntry("trigger.date", "_isOnDate", ""),
1736
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1737
+ ],
1738
+ "&&"
1739
+ )
1740
+ );
1741
+ a.setRuleToGroup(a.scaffoldGroup(), [
1742
+ a.setRuleToGroup(
1743
+ a.scaffoldGroup("g_schedule"),
1744
+ [
1745
+ a.constructEntry(
1746
+ "trigger.date",
1747
+ "_rrule",
1748
+ "RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
1749
+ ),
1750
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1751
+ ],
1752
+ "&&"
1753
+ )
1754
+ ]);
1755
+ ({ ...a.scaffoldGroup() });
1756
+ a.setRuleToGroup(
1757
+ a.scaffoldGroup(),
1758
+ a.setRuleToGroup(
1759
+ a.scaffoldGroup("g_schedule"),
1760
+ [
1761
+ a.constructEntry(
1762
+ "trigger.date",
1763
+ "_rrule",
1764
+ "RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
1765
+ ),
1766
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1767
+ ],
1768
+ "&&"
1769
+ )
1770
+ );
1771
+ a.scaffoldGroup(), a.scaffoldGroup(), o("GAME", {
1772
+ name: "Token",
1773
+ business: null,
1774
+ noCampaign: !1
1775
+ });
1776
+ ({
1777
+ ...a.scaffoldGroup()
1778
+ }, o("VOUCHER", {
1779
+ name: "",
1780
+ business: null,
1781
+ noCampaign: !1
1782
+ }));
1783
+ a.setRuleToGroup(a.scaffoldGroup(), [
1784
+ a.setRuleToGroup(
1785
+ a.scaffoldGroup("g_schedule"),
1786
+ [
1787
+ a.constructEntry(
1788
+ "trigger.date",
1789
+ "_rrule",
1790
+ "RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
1791
+ ),
1792
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1793
+ ],
1794
+ "&&"
1795
+ ),
1796
+ a.setRuleToGroup(
1797
+ a.scaffoldGroup("g_user"),
1798
+ [
1799
+ a.constructEntry("user.birthday", "_isRange", {
1800
+ op: "this",
1801
+ unit: "month",
1802
+ ignoreYear: !0
1803
+ })
1804
+ ],
1805
+ "&&"
1806
+ )
1807
+ ]), o("VOUCHER", {
1808
+ name: "",
1809
+ business: null,
1810
+ noCampaign: !1
1811
+ });
1812
+ ({
1813
+ ...a.scaffoldGroup()
1814
+ });
1815
+ ({
1816
+ ...a.scaffoldGroup()
1817
+ });
1818
+ ({
1819
+ ...a.scaffoldGroup()
1820
+ });
1821
+ ({
1822
+ ...a.scaffoldGroup()
1823
+ });
1824
+ ({
1825
+ ...a.scaffoldGroup()
1826
+ });
1827
+ ({
1828
+ ...a.scaffoldGroup()
1829
+ });
1830
+ const Q = e.enum([
1831
+ "MEMBER_REWARD",
1832
+ "PAID_LOYALTY",
1833
+ "COLLECT_FEEDBACK",
1834
+ "REVISITING",
1835
+ "SPEND_MORE",
1836
+ "PRODUCT_LAUNCHING",
1837
+ "BROADCAST",
1838
+ "BIRTHDAY",
1839
+ "GAME"
1840
+ ]), J = e.enum([
1841
+ "text",
1842
+ "number",
1843
+ "textarea",
1844
+ "trigger",
1845
+ "timeframe",
1846
+ "image",
1847
+ "switch",
1848
+ "collectible_options",
1849
+ "target_location",
1850
+ "effect",
1851
+ "message",
1852
+ "earning_option",
1853
+ "validity_option",
1854
+ "game_type",
1855
+ "reward_pool",
1856
+ "mission",
1857
+ "mission_type",
1858
+ "mission_end",
1859
+ "mission_pool",
1860
+ "rule_schedule",
1861
+ "rule_user",
1862
+ "rule_time",
1863
+ "rule_bill",
1864
+ "rule_feedback",
1865
+ "rule_birthday",
1866
+ "promotion_game_type"
1867
+ ]), $ = e.object({
1868
+ label: e.string().optional(),
1869
+ property: e.string().or(e.any()),
1870
+ type: J,
1871
+ extras: e.string().optional(),
1872
+ isRuleChildren: e.boolean().optional()
1873
+ }), Z = e.object({
1874
+ name: e.string().optional(),
1875
+ fields: e.array($),
1876
+ condition: e.object({
1877
+ not: e.boolean().optional(),
1878
+ property: e.string(),
1879
+ value: e.any()
1880
+ }).optional()
1881
+ }), ee = e.object({
1882
+ name: e.string(),
1883
+ groups: e.array(Z)
1884
+ });
1885
+ e.object({
1886
+ _id: m,
1887
+ name: e.string(),
1888
+ description: e.string().nullish(),
1889
+ steps: e.array(ee).min(1),
1890
+ intention: e.array(Q),
1891
+ defaultValue: e.any()
1892
+ }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1893
+ const ae = {
1894
+ collectionName: "Businesses",
1895
+ transform: {
1896
+ _id: "oid"
1897
+ }
1898
+ };
1899
+ e.object({
1900
+ _id: m,
1901
+ ownerId: e.string(),
1902
+ name: e.string(),
1903
+ credit: e.number(),
1904
+ forceSend: e.boolean().optional()
1905
+ }).describe(f.describe(ae));
1906
+ const D = e.enum(["PHONE"]), te = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), ie = e.enum(["PENDING", "COMPLETED", "FAILED"]), ne = e.enum([
1907
+ "General",
1908
+ "Otp",
1909
+ "Marketing",
1910
+ "Ordering",
1911
+ "MemberInvitation"
1912
+ ]), oe = e.object({
1913
+ type: D
1914
+ }), x = oe.extend({
1915
+ type: e.literal(D.enum.PHONE),
1916
+ provider: te,
1917
+ usage: ne.optional()
1918
+ }), re = {
1919
+ collectionName: "Notifications",
1920
+ transform: { _id: "oid", business: "oid" }
1921
+ };
1922
+ e.object({
1923
+ _id: m,
1924
+ business: m,
1925
+ target: e.string(),
1926
+ title: e.string().optional(),
1927
+ message: e.string(),
1928
+ option: x,
1929
+ status: ie,
1930
+ ref: e.string().optional()
1931
+ }).describe(f.describe(re));
1932
+ e.object({
1933
+ target: e.string(),
1934
+ title: e.string().optional(),
1935
+ message: e.string(),
1936
+ option: x,
1937
+ ref: e.string().optional()
1938
+ });
1939
+ e.object({
1940
+ phone: e.string(),
1941
+ message: e.string()
1942
+ });
1943
+ const h = e.object({
1944
+ name: e.string(),
1945
+ address: e.string()
1946
+ }), pe = e.object({
1947
+ filename: e.string(),
1948
+ content: e.instanceof(Uint8Array)
1949
+ });
1950
+ e.object({
1951
+ from: h,
1952
+ to: e.array(h),
1953
+ subject: e.string(),
1954
+ html: e.string().optional(),
1955
+ attachments: e.array(pe).optional()
1956
+ });
1957
+ e.object({
1958
+ subject: e.string(),
1959
+ body: e.string()
1960
+ });
1961
+ e.enum(["send_notification", "TRIGGER_EVENT"]);
1962
+ e.enum([
1963
+ "campaign.general",
1964
+ "campaign.broadcast",
1965
+ "notification.send",
1966
+ "BILL_CREATE"
1967
+ ]);
1968
+ e.object({
1969
+ claimIds: e.array(e.string()),
1970
+ billId: e.string()
1971
+ });
1972
+ e.object({
1973
+ claimIds: e.array(e.string())
1974
+ });
1975
+ e.object({
1976
+ claimIds: e.array(e.string())
1977
+ });
1978
+ e.object({
1979
+ userId: e.string().optional(),
1980
+ ids: e.array(e.string()),
1981
+ type: e.enum(["DINE_IN", "PICKUP", "DELIVERY"]),
1982
+ restaurantId: e.string()
1983
+ });
1984
+ e.object({
1985
+ claimIds: e.array(e.string()),
1986
+ billId: e.string()
1987
+ });
1988
+ var S = /* @__PURE__ */ ((t) => (t[t.feedMe = 0] = "feedMe", t[t.business = 1] = "business", t[t.restaurant = 2] = "restaurant", t))(S || {});
1989
+ e.nativeEnum(S);
1990
+ e.enum(["manage", "create", "read", "update", "delete"]);
1991
+ e.enum(["all", "restaurant", "business", "delivery", "agent"]);
1992
+ e.enum(["quota"]);
1993
+ var R = /* @__PURE__ */ ((t) => (t.marketing = "business::marketing", t.campaign = "business::campaign", t.counter = "business::counter", t.permission = "business::permission", t.role = "business::role", t))(R || {});
1994
+ e.nativeEnum(R);
1995
+ e.enum(["restaurant"]);
1996
+ const le = e.object({
1997
+ label: e.string(),
1998
+ subject: e.union([e.string(), e.array(e.string())]),
1999
+ actions: e.union([e.string(), e.array(e.string())]),
2000
+ fields: e.array(e.string()).optional(),
2001
+ conditions: e.any().optional(),
2002
+ inverted: e.boolean().optional(),
2003
+ reason: e.string().optional()
2004
+ });
2005
+ e.object({
2006
+ _id: m,
2007
+ businessId: e.string(),
2008
+ userId: e.string(),
2009
+ email: e.string().nullish(),
2010
+ phoneNo: e.string().nullish(),
2011
+ permissions: e.array(e.lazy(() => le))
2012
+ }).describe(
2013
+ f.describe({
2014
+ collectionName: "PermissionUsers",
2015
+ transform: {
2016
+ _id: "oid"
2017
+ }
2018
+ })
2019
+ );
2020
+ const G = e.object({
2021
+ userId: e.string(),
2022
+ level: e.number(),
2023
+ role: e.string().optional(),
2024
+ businessId: e.string().optional(),
2025
+ restaurantId: e.string().optional()
2026
+ }), me = e.function().args(e.any(), G).returns(e.boolean()), se = e.function().args(G).returns(e.promise(e.array(e.any())));
2027
+ e.object({
2028
+ isAdmin: me,
2029
+ getRules: se
2030
+ });
2031
+ e.object({
2032
+ transactions: e.array(K),
2033
+ collections: e.array(W)
2034
+ });
2035
+ const N = e.enum([
2036
+ "ROCK_PAPER_SCISSOR"
2037
+ ]);
2038
+ N.enum.ROCK_PAPER_SCISSOR + "";
2039
+ e.object({
2040
+ type: N
2041
+ });
2042
+ e.object({
2043
+ host: e.string().url(),
2044
+ player: e.string().url(),
2045
+ token: e.string(),
2046
+ roomId: e.string()
2047
+ });
2048
+ e.object({
2049
+ id: e.number(),
2050
+ name: e.string(),
2051
+ email: e.string(),
2052
+ phone: e.string(),
2053
+ birthday: e.string(),
2054
+ address: e.string().nullable(),
2055
+ avatar: e.string(),
2056
+ tier: e.string(),
2057
+ visitCount: e.number().nullable(),
2058
+ lastVisit: e.string().nullable(),
2059
+ averageSpending: e.number().nullable(),
2060
+ point: e.number()
2061
+ });
2062
+ e.object({
2063
+ businessId: e.string(),
2064
+ phone: e.string().optional(),
2065
+ email: e.string().optional()
2066
+ });
2067
+ export {
2068
+ Q as F,
2069
+ be as T,
2070
+ ve as _
2071
+ };