@feedmepos/mf-connect 0.1.0-beta.64 → 0.1.0-beta.65

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 (89) hide show
  1. package/dist/{Analytic-B325EvdK.js → Analytic-BykZRzDs.js} +11 -11
  2. package/dist/{App-Cm-p4GBZ.js → App-DlJhQ-d7.js} +6 -6
  3. package/dist/{AuditLogs-Da6jqw_l.js → AuditLogs-D_Tj-hN5.js} +8 -8
  4. package/dist/{Bin-Cgxr39me.js → Bin-B9DIsHlV.js} +8 -8
  5. package/dist/{Broadcast-CR3YdMim.js → Broadcast-HujD0CH6.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJDw0QLZ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B9KbyT0Z.js} +6 -6
  7. package/dist/{Card-CIlXJesR.js → Card-dEGuVh8Y.js} +15 -15
  8. package/dist/{Collections-Dkp13T6I.js → Collections-DLU_r242.js} +5 -5
  9. package/dist/{Credit-BL7s3TmG.js → Credit-DPxRywNS.js} +9 -9
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgKNPE7p.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BO7Zjzjn.js} +28 -28
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BTXLeEQV.js → EffectSheet.vue_vue_type_style_index_0_lang-CDCnlwRw.js} +6 -6
  12. package/dist/{Experience-Cr7c9Dmr.js → Experience-DbeeaSny.js} +9 -9
  13. package/dist/Game-DF-tRQmA.js +278 -0
  14. package/dist/{Index-D1DjHCn6.js → Index-D-Gl4vEU.js} +10 -10
  15. package/dist/{Marketing-RKv-hDji.js → Marketing-BVUn9m1D.js} +6 -6
  16. package/dist/{Member-BpE1hEHn.js → Member-DeAQPJ5c.js} +5 -5
  17. package/dist/{MemberList-D7LB9fXz.js → MemberList-CK3ItLYd.js} +24 -24
  18. package/dist/{MemberTransactions-BWHZqhcv.js → MemberTransactions-ChvkxttB.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DPnmbxWD.js → MessageInput.vue_vue_type_script_setup_true_lang-DJjiapX-.js} +8 -8
  20. package/dist/{Mission-CPNWKX0I.js → Mission-af0CLDdi.js} +117 -96
  21. package/dist/{Overview-DJels2bf.js → Overview-bE-CxDyW.js} +52 -52
  22. package/dist/{Point-PXjurF_w.js → Point-DMUJXRIW.js} +9 -9
  23. package/dist/{Promotion-CFFuDmX9.js → Promotion-C72ZIHQC.js} +10 -10
  24. package/dist/{Queue-C-0R9noT.js → Queue-BxVMOXfX.js} +19 -19
  25. package/dist/{Record-Cg3Uk_e0.js → Record-BTXkLR-X.js} +7 -7
  26. package/dist/{Reward-q3OH71kA.js → Reward-UtZnwyhC.js} +15 -15
  27. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CTDa510y.js → RewardGroup.vue_vue_type_script_setup_true_lang-BBSqJfeS.js} +11 -11
  28. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D6y3fXbd.js → RuleGroup.vue_vue_type_script_setup_true_lang-u9z-Uco-.js} +244 -241
  29. package/dist/{Segment-BUxi24U7.js → Segment-CsCYYgLL.js} +14 -14
  30. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-xA3_GoYK.js → SelectItems.vue_vue_type_script_setup_true_lang-B7jbLxek.js} +2 -2
  31. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-kBXjyEyt.js +186 -0
  32. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKPEsDLl.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BVE_boAC.js} +3 -3
  33. package/dist/{Setting-Y3cUXNMQ.js → Setting-B1W1sMAI.js} +10 -10
  34. package/dist/{Store-DhwEmp-R.js → Store-DC3YkCuT.js} +18 -18
  35. package/dist/{StoreRewards-BWOMVEzb.js → StoreRewards-BLSf4yL5.js} +13 -13
  36. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B7BAEEiB.js → StoreTransactions.vue_vue_type_script_setup_true_lang-7JAwsa6H.js} +17 -17
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C3K5UV1O.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bj7An5CY.js} +1 -1
  38. package/dist/{Tier-5sRNLSO1.js → Tier-DoGYPOK2.js} +19 -19
  39. package/dist/{Title-BwGfSgM4.js → Title-Dcg5_aiJ.js} +19 -19
  40. package/dist/{Transaction-BbIdqQsD.js → Transaction-DjzGqSTu.js} +2 -2
  41. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-qNeUH0Gf.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CWv6o4xN.js} +6 -6
  42. package/dist/{Voucher-BvOxoMrH.js → Voucher-COtfsGvM.js} +12 -12
  43. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BtazBTn_.js → VoucherEditor.vue_vue_type_script_setup_true_lang-tl9RMCof.js} +10 -10
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BWcX9cJf.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6abwK-T.js} +1 -1
  45. package/dist/{app-33F7lJW2.js → app-CTeqEkoa.js} +1 -1
  46. package/dist/{app-CoVaAkSk.js → app-SUKcprMq.js} +463 -453
  47. package/dist/app.js +1 -1
  48. package/dist/{business-BtgsuI9Z.js → business-DcFWQWQ_.js} +1 -1
  49. package/dist/{campaign-D6PH5eQ_.js → campaign-9l1-4E18.js} +9 -9
  50. package/dist/{campaign-GRjeK1WI.js → campaign-B1xMjgeN.js} +2 -2
  51. package/dist/{campaign.enum-KcUV41Ki.js → campaign.enum-BoBKGas3.js} +1 -1
  52. package/dist/{campaign.fn-DlaQfCnQ.js → campaign.fn-BuJQp7OR.js} +41 -41
  53. package/dist/{collectible.enum-D8QbCobD.js → collectible.enum-CBU_rAz2.js} +1 -1
  54. package/dist/{collection.fn-By3YQRv8.js → collection.fn-BzmzHuiA.js} +2 -2
  55. package/dist/{dto-CuPBd2H3.js → dto-BIamKujn.js} +4 -4
  56. package/dist/{effect-BokWNg14.js → effect-B-4TI9VM.js} +1 -1
  57. package/dist/{email-addresses-DE4qV3Eh.js → email-addresses-DEv8LE3V.js} +1 -1
  58. package/dist/{export-B8kx1Nmt.js → export-FypV374Y.js} +3 -3
  59. package/dist/{helper-COmipb68.js → helper-ByX6M5s_.js} +1 -1
  60. package/dist/{index-DKqP75Bm.js → index--ljh_arC.js} +1 -1
  61. package/dist/{index-DiTg_x8h.js → index-B0wqzS6z.js} +1 -1
  62. package/dist/{index-BNKBRRdT.js → index-BsGmEByl.js} +1 -1
  63. package/dist/{index-BtjSlXEc.js → index-C3R1PpLs.js} +1 -1
  64. package/dist/{index-BtzXDz7E.js → index-COs3r3yx.js} +1 -1
  65. package/dist/{index-Bk9xhO-D.js → index-CcJqawSD.js} +1 -1
  66. package/dist/{index-DHw_2WuP.js → index-CdMXuKzu.js} +3 -3
  67. package/dist/{index-SzOkDo2y.js → index-DHt_xUTS.js} +3 -3
  68. package/dist/index-DgkJMGFX.js +73912 -0
  69. package/dist/{index-8CMfJmg3.js → index-YmukhZFD.js} +82 -76
  70. package/dist/{index-CQct2DL8.js → index-uf-Xzbbb.js} +1 -1
  71. package/dist/{index-esK00bm6.js → index-wKj9Jq_Y.js} +2 -2
  72. package/dist/{index.esm2017-IwuN8acP.js → index.esm2017-D2ty8PoZ.js} +1 -1
  73. package/dist/{loading-BWW2Z1X0.js → loading-BkexxRvP.js} +1 -1
  74. package/dist/{membership-CJK6mxff.js → membership-DSvm3lCf.js} +3 -3
  75. package/dist/{money-DDs_MtN7.js → money-BWtCy3GX.js} +1 -1
  76. package/dist/{number-pF7bUUUj.js → number-DeIIxnKB.js} +1 -1
  77. package/dist/{objectid-Bjt4ojTL.js → objectid-5Cs5ddrm.js} +1 -1
  78. package/dist/{plugins-BsO39OJE.js → plugins-BovoaCMv.js} +6 -4
  79. package/dist/{reward-2pJnAigN.js → reward-C3FKPfvO.js} +1 -1
  80. package/dist/{rule-builder-DlCdj9oR.js → rule-builder-_n-2bDtG.js} +1 -1
  81. package/dist/{rule-DxWfHg0z.js → rule-bx6kGPEY.js} +8 -4
  82. package/dist/{template-DDGHUxfa.js → template-DCacwacU.js} +4 -4
  83. package/dist/{trigger-DQxt8ZNb.js → trigger-DkTKCHNq.js} +11 -11
  84. package/dist/{user-C0hkkvCd.js → user-yXVKLZVM.js} +1 -1
  85. package/dist/{vue-i18n-BrZbqfu6.js → vue-i18n-bpwKTYQc.js} +248 -248
  86. package/dist/{xlsx-CzvLdaX-.js → xlsx-CyCSR0F9.js} +1 -1
  87. package/package.json +1 -1
  88. package/dist/Game-qBiDfoX8.js +0 -257
  89. package/dist/index-DBqFcTrv.js +0 -2179
@@ -1,2179 +0,0 @@
1
- import { z as e, F as n, m as o } from "./plugins-BsO39OJE.js";
2
- import { A as v, B as E, D as O, E as I, G as p } from "./index-8CMfJmg3.js";
3
- import { c as L } from "./index-esK00bm6.js";
4
- import { R as t } from "./rule-builder-DlCdj9oR.js";
5
- import { i } from "./helper-COmipb68.js";
6
- import { a as r } from "./index-DHw_2WuP.js";
7
- const h = {
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
- }, T = e.enum([
21
- "GET",
22
- "POST",
23
- "PUT",
24
- "PATCH",
25
- "DELETE",
26
- "OPTIONS",
27
- "HEAD",
28
- "ALL"
29
- ]), R = e.enum([
30
- "CAMPAIGN",
31
- "LOCATION",
32
- "MARKETING MATERIALS",
33
- "MEMBERSHIP",
34
- "STORE",
35
- "TRANSACTION",
36
- "SETTINGS",
37
- "SEGMENTATION",
38
- "USER"
39
- ]), C = e.object({
40
- httpMethod: T,
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) => v(a)).nullish(),
56
- moduleType: R,
57
- business: n.nullish(),
58
- clientIp: e.string().nullish(),
59
- timestamp: e.string().datetime(),
60
- request: C,
61
- response: x
62
- }).describe(o.describe(h));
63
- const oe = {
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
- ({
1698
- ...t.scaffoldGroup()
1699
- });
1700
- ({
1701
- ...t.scaffoldGroup()
1702
- }, i("VOUCHER", {
1703
- name: "",
1704
- business: null,
1705
- noCampaign: !1
1706
- }));
1707
- t.setRuleToGroup(
1708
- t.scaffoldGroup(),
1709
- t.setRuleToGroup(
1710
- t.scaffoldGroup("g_schedule"),
1711
- [
1712
- t.constructEntry("trigger.date", "_isOnDate", ""),
1713
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1714
- ],
1715
- "&&"
1716
- )
1717
- );
1718
- t.setRuleToGroup(t.scaffoldGroup(), [
1719
- t.setRuleToGroup(
1720
- t.scaffoldGroup("g_schedule"),
1721
- [
1722
- t.constructEntry(
1723
- "trigger.date",
1724
- "_rrule",
1725
- "RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
1726
- ),
1727
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1728
- ],
1729
- "&&"
1730
- )
1731
- ]);
1732
- ({ ...t.scaffoldGroup() });
1733
- t.setRuleToGroup(
1734
- t.scaffoldGroup(),
1735
- t.setRuleToGroup(
1736
- t.scaffoldGroup("g_schedule"),
1737
- [
1738
- t.constructEntry(
1739
- "trigger.date",
1740
- "_rrule",
1741
- "RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
1742
- ),
1743
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1744
- ],
1745
- "&&"
1746
- )
1747
- );
1748
- t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
1749
- name: "Token",
1750
- business: null,
1751
- noCampaign: !1
1752
- });
1753
- ({
1754
- ...t.scaffoldGroup()
1755
- }, i("VOUCHER", {
1756
- name: "",
1757
- business: null,
1758
- noCampaign: !1
1759
- }));
1760
- t.setRuleToGroup(t.scaffoldGroup(), [
1761
- t.setRuleToGroup(
1762
- t.scaffoldGroup("g_schedule"),
1763
- [
1764
- t.constructEntry(
1765
- "trigger.date",
1766
- "_rrule",
1767
- "RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
1768
- ),
1769
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1770
- ],
1771
- "&&"
1772
- ),
1773
- t.setRuleToGroup(
1774
- t.scaffoldGroup("g_user"),
1775
- [
1776
- t.constructEntry("user.birthday", "_isRange", {
1777
- op: "this",
1778
- unit: "month",
1779
- ignoreYear: !0
1780
- })
1781
- ],
1782
- "&&"
1783
- )
1784
- ]), i("VOUCHER", {
1785
- name: "",
1786
- business: null,
1787
- noCampaign: !1
1788
- });
1789
- ({
1790
- ...t.scaffoldGroup()
1791
- });
1792
- ({
1793
- ...t.scaffoldGroup()
1794
- });
1795
- ({
1796
- ...t.scaffoldGroup()
1797
- });
1798
- ({
1799
- ...t.scaffoldGroup()
1800
- });
1801
- ({
1802
- ...t.scaffoldGroup()
1803
- });
1804
- ({
1805
- ...t.scaffoldGroup()
1806
- });
1807
- const S = e.enum([
1808
- "MEMBER_REWARD",
1809
- "PAID_LOYALTY",
1810
- "COLLECT_FEEDBACK",
1811
- "REVISITING",
1812
- "SPEND_MORE",
1813
- "PRODUCT_LAUNCHING",
1814
- "BROADCAST",
1815
- "BIRTHDAY",
1816
- "GAME"
1817
- ]), D = e.enum([
1818
- "text",
1819
- "number",
1820
- "textarea",
1821
- "trigger",
1822
- "timeframe",
1823
- "image",
1824
- "switch",
1825
- "collectible_options",
1826
- "target_location",
1827
- "effect",
1828
- "message",
1829
- "earning_option",
1830
- "validity_option",
1831
- "game_type",
1832
- "reward_pool",
1833
- "mission",
1834
- "mission_type",
1835
- "mission_end",
1836
- "mission_pool",
1837
- "rule_schedule",
1838
- "rule_user",
1839
- "rule_time",
1840
- "rule_bill",
1841
- "rule_feedback",
1842
- "rule_birthday",
1843
- "promotion_game_type"
1844
- ]), A = e.object({
1845
- label: e.string().optional(),
1846
- property: e.string().or(e.any()),
1847
- type: D,
1848
- extras: e.string().optional(),
1849
- isRuleChildren: e.boolean().optional()
1850
- }), M = e.object({
1851
- name: e.string().optional(),
1852
- fields: e.array(A),
1853
- condition: e.object({
1854
- not: e.boolean().optional(),
1855
- property: e.string(),
1856
- value: e.any()
1857
- }).optional()
1858
- }), N = e.object({
1859
- name: e.string(),
1860
- groups: e.array(M)
1861
- });
1862
- e.object({
1863
- _id: n,
1864
- name: e.string(),
1865
- description: e.string().nullish(),
1866
- steps: e.array(N).min(1),
1867
- intention: e.array(S),
1868
- defaultValue: e.any()
1869
- }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1870
- const w = {
1871
- collectionName: "Businesses",
1872
- transform: {
1873
- _id: "oid"
1874
- }
1875
- };
1876
- e.object({
1877
- _id: n,
1878
- ownerId: e.string(),
1879
- name: e.string(),
1880
- credit: e.number(),
1881
- forceSend: e.boolean().optional()
1882
- }).describe(o.describe(w));
1883
- const m = e.enum(["PHONE"]), U = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), F = e.enum(["PENDING", "COMPLETED", "FAILED"]), P = e.enum([
1884
- "General",
1885
- "Otp",
1886
- "Marketing",
1887
- "Ordering",
1888
- "MemberInvitation"
1889
- ]), G = e.object({
1890
- type: m
1891
- }), s = G.extend({
1892
- type: e.literal(m.enum.PHONE),
1893
- provider: U,
1894
- usage: P.optional()
1895
- }), B = {
1896
- collectionName: "Notifications",
1897
- transform: { _id: "oid", business: "oid" }
1898
- };
1899
- e.object({
1900
- _id: n,
1901
- business: n,
1902
- target: e.string(),
1903
- title: e.string().optional(),
1904
- message: e.string(),
1905
- option: s,
1906
- status: F,
1907
- ref: e.string().optional()
1908
- }).describe(o.describe(B));
1909
- e.object({
1910
- target: e.string(),
1911
- title: e.string().optional(),
1912
- message: e.string(),
1913
- option: s,
1914
- ref: e.string().optional()
1915
- });
1916
- e.object({
1917
- phone: e.string(),
1918
- message: e.string()
1919
- });
1920
- const c = e.object({
1921
- name: e.string().optional(),
1922
- address: e.string()
1923
- }), H = e.object({
1924
- filename: e.string(),
1925
- content: e.instanceof(Uint8Array)
1926
- });
1927
- e.object({
1928
- from: c.optional(),
1929
- to: e.array(c),
1930
- subject: e.string(),
1931
- html: e.string().optional(),
1932
- attachments: e.array(H).optional()
1933
- });
1934
- e.object({
1935
- subject: e.string(),
1936
- body: e.string()
1937
- });
1938
- e.enum(["send_notification", "TRIGGER_EVENT"]);
1939
- e.enum([
1940
- "campaign.general",
1941
- "campaign.broadcast",
1942
- "notification.send",
1943
- "BILL_CREATE"
1944
- ]);
1945
- e.object({
1946
- claimIds: e.array(e.string()),
1947
- billId: e.string()
1948
- });
1949
- e.object({
1950
- claimIds: e.array(e.string())
1951
- });
1952
- e.object({
1953
- claimIds: e.array(e.string())
1954
- });
1955
- e.object({
1956
- userId: e.string().optional(),
1957
- ids: e.array(e.string()),
1958
- type: e.enum(["DINE_IN", "PICKUP", "DELIVERY"]),
1959
- restaurantId: e.string()
1960
- });
1961
- e.object({
1962
- claimIds: e.array(e.string()),
1963
- billId: e.string()
1964
- });
1965
- var g = /* @__PURE__ */ ((a) => (a[a.feedMe = 0] = "feedMe", a[a.business = 1] = "business", a[a.restaurant = 2] = "restaurant", a))(g || {});
1966
- e.nativeEnum(g);
1967
- e.enum(["manage", "create", "read", "update", "delete"]);
1968
- e.enum(["all", "restaurant", "business", "delivery", "agent"]);
1969
- e.enum(["quota"]);
1970
- 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 || {});
1971
- e.nativeEnum(d);
1972
- e.enum(["restaurant"]);
1973
- const V = e.object({
1974
- label: e.string(),
1975
- subject: e.union([e.string(), e.array(e.string())]),
1976
- actions: e.union([e.string(), e.array(e.string())]),
1977
- fields: e.array(e.string()).optional(),
1978
- conditions: e.any().optional(),
1979
- inverted: e.boolean().optional(),
1980
- reason: e.string().optional()
1981
- });
1982
- e.object({
1983
- _id: n,
1984
- businessId: e.string(),
1985
- userId: e.string(),
1986
- email: e.string().nullish(),
1987
- phoneNo: e.string().nullish(),
1988
- permissions: e.array(e.lazy(() => V))
1989
- }).describe(
1990
- o.describe({
1991
- collectionName: "PermissionUsers",
1992
- transform: {
1993
- _id: "oid"
1994
- }
1995
- })
1996
- );
1997
- const y = e.object({
1998
- userId: e.string(),
1999
- level: e.number(),
2000
- role: e.string().optional(),
2001
- businessId: e.string().optional(),
2002
- restaurantId: e.string().optional()
2003
- }), k = e.function().args(e.any(), y).returns(e.boolean()), j = e.function().args(y).returns(e.promise(e.array(e.any())));
2004
- e.object({
2005
- isAdmin: k,
2006
- getRules: j
2007
- });
2008
- e.object({
2009
- transactions: e.array(E),
2010
- collections: e.array(O)
2011
- });
2012
- const u = e.enum([
2013
- "ROCK_PAPER_SCISSOR"
2014
- ]);
2015
- u.enum.ROCK_PAPER_SCISSOR + "";
2016
- e.object({
2017
- type: u
2018
- });
2019
- e.object({
2020
- host: e.string().url(),
2021
- player: e.string().url(),
2022
- token: e.string(),
2023
- roomId: e.string()
2024
- });
2025
- e.object({
2026
- id: e.number(),
2027
- name: e.string(),
2028
- email: e.string(),
2029
- phone: e.string(),
2030
- birthday: e.string(),
2031
- address: e.string().nullable(),
2032
- avatar: e.string(),
2033
- tier: e.string(),
2034
- visitCount: e.number().nullable(),
2035
- lastVisit: e.string().nullable(),
2036
- averageSpending: e.number().nullable(),
2037
- point: e.number()
2038
- });
2039
- e.object({
2040
- businessId: e.string(),
2041
- phone: e.string().optional(),
2042
- email: e.string().optional()
2043
- });
2044
- const Y = e.enum([
2045
- "PENDING",
2046
- "SUCCESS",
2047
- "FAILED",
2048
- "RETRYING"
2049
- ]), K = {
2050
- collectionName: "WebhookLogs",
2051
- transform: {
2052
- _id: "oid",
2053
- business: "oid"
2054
- }
2055
- };
2056
- e.object({
2057
- _id: n,
2058
- business: n,
2059
- type: e.string(),
2060
- payload: e.record(e.any()),
2061
- status: Y,
2062
- response: e.any().optional(),
2063
- error: e.string().optional()
2064
- }).describe(o.describe(K));
2065
- const W = e.enum(["AUTO", "MANUAL"]);
2066
- e.enum(["IN_PROGRESS", "COMPLETED"]);
2067
- const f = e.object({
2068
- _id: n,
2069
- name: e.string().min(1, "Name is required").max(50),
2070
- type: W,
2071
- event: I.optional()
2072
- }), X = e.object({
2073
- from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2074
- to: e.number().int("Must be integer").nullish()
2075
- }).superRefine((a, b) => {
2076
- a.from && a.to && a.from > a.to && b.addIssue({
2077
- code: "custom",
2078
- message: "Max referral count must be more than min referral count"
2079
- });
2080
- }), q = e.object({
2081
- threshold: X,
2082
- rewards: e.array(n),
2083
- pf_reward: e.array(r).optional()
2084
- }), l = e.object({
2085
- id: e.string(),
2086
- name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2087
- rule: L.optional(),
2088
- rewards: e.array(q)
2089
- }), Q = {
2090
- collectionName: "ReferralRecords",
2091
- transform: {
2092
- _id: "oid",
2093
- business: "oid",
2094
- referer: "oid",
2095
- referee: "oid",
2096
- refereeReward: "oid"
2097
- }
2098
- }, J = e.object({
2099
- completedAt: e.coerce.date(),
2100
- criteria: n,
2101
- ref: e.string()
2102
- }), z = e.object({
2103
- _id: n,
2104
- business: n,
2105
- referer: n,
2106
- referee: n,
2107
- criteria: e.array(f),
2108
- reward: e.array(l),
2109
- refereeReward: e.array(n).optional(),
2110
- criteria_progress: e.array(J),
2111
- status: e.string(),
2112
- pf_referer: p.optional(),
2113
- pf_referee: p.optional(),
2114
- pf_refereeReward: e.array(r).optional()
2115
- }).describe(o.describe(Q));
2116
- z.pick({
2117
- _id: !0,
2118
- business: !0,
2119
- referer: !0,
2120
- referee: !0,
2121
- criteria_progress: !0,
2122
- criteria: !0
2123
- }).extend({
2124
- pf_referee: p.pick({
2125
- _id: !0,
2126
- name: !0,
2127
- phoneNumber: !0,
2128
- photoUrl: !0
2129
- })
2130
- });
2131
- const Z = {
2132
- collectionName: "ReferralProgram",
2133
- transform: {
2134
- _id: "oid",
2135
- business: "oid"
2136
- }
2137
- }, _ = e.object({
2138
- _id: n,
2139
- business: n,
2140
- term_and_condition: e.string().optional(),
2141
- refereeReward: e.array(n).optional(),
2142
- reward: e.array(l),
2143
- criteria: e.array(f)
2144
- }).describe(o.describe(Z));
2145
- e.object({
2146
- referer: n,
2147
- referee: n,
2148
- business: n
2149
- });
2150
- e.object({
2151
- program: _.pick({
2152
- _id: !0,
2153
- business: !0,
2154
- term_and_condition: !0
2155
- }).extend({
2156
- reward: l.optional(),
2157
- pf_refereeReward: e.array(r).optional()
2158
- }),
2159
- referralCount: e.number(),
2160
- successReferralCount: e.number(),
2161
- referredBy: p.pick({
2162
- _id: !0,
2163
- name: !0,
2164
- phoneNumber: !0,
2165
- photoUrl: !0
2166
- }).optional()
2167
- });
2168
- _.extend({
2169
- updateReferralRecord: e.boolean().optional()
2170
- });
2171
- export {
2172
- S as F,
2173
- oe as T,
2174
- q as a,
2175
- f as b,
2176
- l as c,
2177
- T as d,
2178
- R as e
2179
- };