@feedmepos/mf-connect 0.1.38-beta.52 → 0.1.38-beta.53

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