@feedmepos/mf-connect 0.1.38-beta.6 → 0.1.38-beta.60

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