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