@feedmepos/mf-connect 0.1.57-prod → 0.1.58-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 (128) hide show
  1. package/package.json +1 -1
  2. package/dist/Analytic-BqvhYgCU.js +0 -427
  3. package/dist/App-Dtl_D0cH.js +0 -4630
  4. package/dist/Bin-y4ikpgPS.js +0 -166
  5. package/dist/Broadcast-DSROFwe4.js +0 -233
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CcsG6vOP.js +0 -121
  7. package/dist/Card-BiSEPsZb.js +0 -911
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-CX-nN7Xj.js +0 -458
  10. package/dist/Credit-IiV9b4cB.js +0 -228
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CoGes8YL.js +0 -2194
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-sGh_SMCH.js +0 -348
  14. package/dist/Experience-Cf-EMhKy.js +0 -229
  15. package/dist/FileSaver.min-NlMItPOc.js +0 -74
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  17. package/dist/Game-C8mfJn6W.js +0 -284
  18. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +0 -144
  19. package/dist/Index-DkvO1AoT.js +0 -259
  20. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  21. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
  22. package/dist/MainLayout-B1aJoR95.js +0 -41
  23. package/dist/Marketing-xJTIo3RF.js +0 -319
  24. package/dist/Member-DZkYoKW8.js +0 -279
  25. package/dist/MemberList-CAYEJnf3.js +0 -1607
  26. package/dist/MemberOverview-wL_ailso.js +0 -58
  27. package/dist/MemberTransactions-Dc5aAQ69.js +0 -45
  28. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BSvlPzw8.js +0 -60553
  29. package/dist/Mission-C_NbNWZw.js +0 -302
  30. package/dist/Overview-DyxEwEfe.js +0 -1079
  31. package/dist/Point-CsEWk61V.js +0 -232
  32. package/dist/Promotion--pWgy9Dx.js +0 -289
  33. package/dist/Queue-k3qAQR7B.js +0 -260
  34. package/dist/Record-D5F5JyVA.js +0 -341
  35. package/dist/Reward-3FSrq5mX.js +0 -442
  36. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-Dzj7a7UY.js +0 -150
  37. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DRl_Gjfx.js +0 -1763
  38. package/dist/Segment-BWJn6ODR.js +0 -882
  39. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BKsV_zcr.js +0 -181
  40. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3efGNC_.js +0 -188
  41. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cj7c2V3h.js +0 -147
  42. package/dist/Setting-UiTXazZV.js +0 -1936
  43. package/dist/Store-BrvmHPCX.js +0 -1842
  44. package/dist/StoreRewards-D_7fr-Ef.js +0 -423
  45. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BXy0L5AH.js +0 -995
  46. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DumcDlBs.js +0 -139
  47. package/dist/Tier-C4wvx8F7.js +0 -895
  48. package/dist/Title-CPHT85Uj.js +0 -566
  49. package/dist/Transaction-6Ig2W00P.js +0 -39
  50. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DknFkIJh.js +0 -130
  51. package/dist/Voucher-Bbl-7gZ5.js +0 -384
  52. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-xsswRZG8.js +0 -419
  53. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-B5J6Hd8G.js +0 -56
  54. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  55. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  56. package/dist/app-BDVZwARN.js +0 -7057
  57. package/dist/app-CAEhNFRG.js +0 -57962
  58. package/dist/app-wDQR6dpb.js +0 -39
  59. package/dist/app.js +0 -6
  60. package/dist/business-6C_ol5wd.js +0 -82
  61. package/dist/campaign-B13G6pZ3.js +0 -1810
  62. package/dist/campaign-CpzFl8Vr.js +0 -4
  63. package/dist/campaign-DrQp6qBu.js +0 -94
  64. package/dist/campaign.enum-DnTrlaNC.js +0 -20
  65. package/dist/campaign.fn-BZse90_k.js +0 -758
  66. package/dist/collectible.enum-633Me0yR.js +0 -19
  67. package/dist/collection.fn-C96855j5.js +0 -26
  68. package/dist/dto-2bMujqmZ.js +0 -216
  69. package/dist/effect-C7lAJwKh.js +0 -78
  70. package/dist/email-addresses-3ayN-9jv.js +0 -705
  71. package/dist/export-BNbDV7SC.js +0 -97
  72. package/dist/feedme.ico +0 -0
  73. package/dist/helper-CsfZ__dQ.js +0 -71
  74. package/dist/index-BLSAz0gK.js +0 -32
  75. package/dist/index-BY9I3Cer.js +0 -3
  76. package/dist/index-BdnRNcVO.js +0 -146
  77. package/dist/index-BmyNfpfG.js +0 -30076
  78. package/dist/index-CSBRkhKy.js +0 -38
  79. package/dist/index-Cf_fcvoS.js +0 -54
  80. package/dist/index-CqrO13uj.js +0 -76
  81. package/dist/index-CuvNtC_M.js +0 -61
  82. package/dist/index-D4kdSzs9.js +0 -3070
  83. package/dist/index-DcJq7tl4.js +0 -32269
  84. package/dist/index-DdjSIwSL.js +0 -44
  85. package/dist/index-LKr2k8J2.js +0 -8861
  86. package/dist/index-XAxwm-1v.js +0 -2130
  87. package/dist/index-b82LrGSB.js +0 -121
  88. package/dist/index-tcAb0W5F.js +0 -31
  89. package/dist/index-vh86FiIQ.js +0 -10
  90. package/dist/index.esm2017-BklqmujQ.js +0 -3069
  91. package/dist/loading-OXARGiqO.js +0 -71
  92. package/dist/lodash-B5I3zXaY.js +0 -3678
  93. package/dist/membership-D1Vb1rUo.js +0 -235
  94. package/dist/moment-D7p2TMB-.js +0 -2583
  95. package/dist/money-BpyAytEq.js +0 -15
  96. package/dist/number-C-PtPOOj.js +0 -12
  97. package/dist/object-qECH92oz.js +0 -26
  98. package/dist/objectId-dwaoBfJX.js +0 -7
  99. package/dist/objectid-BrLIKTmQ.js +0 -145
  100. package/dist/plugins-CjPWhNb2.js +0 -208
  101. package/dist/reward-DonQFzvW.js +0 -36
  102. package/dist/rule-AtNPBnbE.js +0 -1951
  103. package/dist/rule-builder-C0Q-3g6T.js +0 -102
  104. package/dist/style.css +0 -4
  105. package/dist/template-CNjE7eht.js +0 -190
  106. package/dist/tier-BJDhpH6X.js +0 -4
  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-CYbdI3q2.js +0 -1151
  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-Bdi6n80h.js +0 -144
  122. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  123. package/dist/type_drinks-D6jnpvwV.js +0 -4
  124. package/dist/usePagination-Ds-cuHop.js +0 -223
  125. package/dist/user-BwGm78n8.js +0 -54
  126. package/dist/vue-i18n-D1nTd69a.js +0 -2365
  127. package/dist/xlsx-DF5iW3wh.js +0 -15491
  128. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -1,2130 +0,0 @@
1
- import { z as e, F as a, m as o } from "./index-DcJq7tl4.js";
2
- import { c as v } from "./index-LKr2k8J2.js";
3
- import { R as t } from "./rule-builder-C0Q-3g6T.js";
4
- import { i } from "./helper-CsfZ__dQ.js";
5
- import { E, G as O, H as I, I as p } from "./index-D4kdSzs9.js";
6
- import { a as r } from "./index-Cf_fcvoS.js";
7
- const z = {
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
- }), x = 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
- }), C = e.object({
1821
- name: e.string(),
1822
- groups: e.array(x)
1823
- });
1824
- e.object({
1825
- _id: a,
1826
- name: e.string(),
1827
- description: e.string().nullish(),
1828
- steps: e.array(C).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: a,
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: a,
1870
- business: a,
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
- });
1935
- e.object({
1936
- claimIds: e.array(e.string()),
1937
- billId: e.string()
1938
- });
1939
- var g = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(g || {});
1940
- e.nativeEnum(g);
1941
- e.enum(["manage", "create", "read", "update", "delete"]);
1942
- e.enum(["all", "restaurant", "business", "delivery", "agent"]);
1943
- e.enum(["quota"]);
1944
- var d = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(d || {});
1945
- e.nativeEnum(d);
1946
- e.enum(["restaurant"]);
1947
- const U = e.object({
1948
- label: e.string(),
1949
- subject: e.union([e.string(), e.array(e.string())]),
1950
- actions: e.union([e.string(), e.array(e.string())]),
1951
- fields: e.array(e.string()).optional(),
1952
- conditions: e.any().optional(),
1953
- inverted: e.boolean().optional(),
1954
- reason: e.string().optional()
1955
- });
1956
- e.object({
1957
- _id: a,
1958
- businessId: e.string(),
1959
- userId: e.string(),
1960
- email: e.string().nullish(),
1961
- phoneNo: e.string().nullish(),
1962
- permissions: e.array(e.lazy(() => U))
1963
- }).describe(
1964
- o.describe({
1965
- collectionName: "PermissionUsers",
1966
- transform: {
1967
- _id: "oid"
1968
- }
1969
- })
1970
- );
1971
- const y = e.object({
1972
- userId: e.string(),
1973
- level: e.number(),
1974
- role: e.string().optional(),
1975
- businessId: e.string().optional(),
1976
- restaurantId: e.string().optional()
1977
- }), F = e.function().args(e.any(), y).returns(e.boolean()), P = e.function().args(y).returns(e.promise(e.array(e.any())));
1978
- e.object({
1979
- isAdmin: F,
1980
- getRules: P
1981
- });
1982
- e.object({
1983
- transactions: e.array(E),
1984
- collections: e.array(O)
1985
- });
1986
- const u = e.enum([
1987
- "ROCK_PAPER_SCISSOR"
1988
- ]);
1989
- u.enum.ROCK_PAPER_SCISSOR + "";
1990
- e.object({
1991
- type: u
1992
- });
1993
- e.object({
1994
- host: e.string().url(),
1995
- player: e.string().url(),
1996
- token: e.string(),
1997
- roomId: e.string()
1998
- });
1999
- e.object({
2000
- id: e.number(),
2001
- name: e.string(),
2002
- email: e.string(),
2003
- phone: e.string(),
2004
- birthday: e.string(),
2005
- address: e.string().nullable(),
2006
- avatar: e.string(),
2007
- tier: e.string(),
2008
- visitCount: e.number().nullable(),
2009
- lastVisit: e.string().nullable(),
2010
- averageSpending: e.number().nullable(),
2011
- point: e.number()
2012
- });
2013
- e.object({
2014
- businessId: e.string(),
2015
- phone: e.string().optional(),
2016
- email: e.string().optional()
2017
- });
2018
- const G = e.enum(["AUTO", "MANUAL"]);
2019
- e.enum(["IN_PROGRESS", "COMPLETED"]);
2020
- const f = e.object({
2021
- _id: a,
2022
- name: e.string().min(1, "Name is required").max(50),
2023
- type: G,
2024
- event: I.optional()
2025
- }), B = e.object({
2026
- from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2027
- to: e.number().int("Must be integer").nullish()
2028
- }).superRefine((n, b) => {
2029
- n.from && n.to && n.from > n.to && b.addIssue({
2030
- code: "custom",
2031
- message: "Max referral count must be more than min referral count"
2032
- });
2033
- }), H = e.object({
2034
- threshold: B,
2035
- rewards: e.array(a),
2036
- pf_reward: e.array(r).optional()
2037
- }), l = e.object({
2038
- id: e.string(),
2039
- name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2040
- rule: v.optional(),
2041
- rewards: e.array(H)
2042
- }), V = {
2043
- collectionName: "ReferralRecords",
2044
- transform: {
2045
- _id: "oid",
2046
- business: "oid",
2047
- referer: "oid",
2048
- referee: "oid",
2049
- refereeReward: "oid"
2050
- }
2051
- }, k = e.object({
2052
- completedAt: e.coerce.date(),
2053
- criteria: a,
2054
- ref: e.string()
2055
- }), j = e.object({
2056
- _id: a,
2057
- business: a,
2058
- referer: a,
2059
- referee: a,
2060
- criteria: e.array(f),
2061
- reward: e.array(l),
2062
- refereeReward: e.array(a).optional(),
2063
- criteria_progress: e.array(k),
2064
- status: e.string(),
2065
- pf_referer: p.optional(),
2066
- pf_referee: p.optional(),
2067
- pf_refereeReward: e.array(r).optional()
2068
- }).describe(o.describe(V));
2069
- j.pick({
2070
- _id: !0,
2071
- business: !0,
2072
- referer: !0,
2073
- referee: !0,
2074
- criteria_progress: !0,
2075
- criteria: !0
2076
- }).extend({
2077
- pf_referee: p.pick({
2078
- _id: !0,
2079
- name: !0,
2080
- phoneNumber: !0,
2081
- photoUrl: !0
2082
- })
2083
- });
2084
- const Y = {
2085
- collectionName: "ReferralProgram",
2086
- transform: {
2087
- _id: "oid",
2088
- business: "oid"
2089
- }
2090
- }, _ = e.object({
2091
- _id: a,
2092
- business: a,
2093
- term_and_condition: e.string().optional(),
2094
- refereeReward: e.array(a).optional(),
2095
- reward: e.array(l),
2096
- criteria: e.array(f)
2097
- }).describe(o.describe(Y));
2098
- e.object({
2099
- referer: a,
2100
- referee: a,
2101
- business: a
2102
- });
2103
- e.object({
2104
- program: _.pick({
2105
- _id: !0,
2106
- business: !0,
2107
- term_and_condition: !0
2108
- }).extend({
2109
- reward: l.optional(),
2110
- pf_refereeReward: e.array(r).optional()
2111
- }),
2112
- referralCount: e.number(),
2113
- successReferralCount: e.number(),
2114
- referredBy: p.pick({
2115
- _id: !0,
2116
- name: !0,
2117
- phoneNumber: !0,
2118
- photoUrl: !0
2119
- }).optional()
2120
- });
2121
- _.extend({
2122
- updateReferralRecord: e.boolean().optional()
2123
- });
2124
- export {
2125
- L as F,
2126
- z as T,
2127
- H as a,
2128
- f as b,
2129
- l as c
2130
- };