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

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 (148) hide show
  1. package/dist/{Analytic-NBx32reB.js → Analytic-CM7mh-iO.js} +16 -16
  2. package/dist/{App-CaK9PvMd.js → App-CeCzzsDu.js} +625 -619
  3. package/dist/AuditLogs-VWx8DFKA.js +1991 -0
  4. package/dist/{Bin-CL6o1JSs.js → Bin-vUuol_I9.js} +10 -10
  5. package/dist/Broadcast-6VXz4-IG.js +233 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js} +6 -6
  7. package/dist/{Card-DNdEjt6s.js → Card-CeIeGET1.js} +144 -140
  8. package/dist/Collections-CF_OcAL3.js +540 -0
  9. package/dist/Credit-BUqGOyp_.js +226 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js +3150 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js +347 -0
  14. package/dist/Experience-BxiFH_uV.js +225 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-lgg_oBvT.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-BzYW0LfY.js +300 -0
  18. package/dist/GenerateMaterial-B5A7mx2y.js +589 -0
  19. package/dist/Grab-BgiMqwvj.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js} +49 -48
  21. package/dist/{Index-2wokhhFB.js → Index-B85ops8K.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-CXGVkD-W.js} +1 -1
  24. package/dist/Marketing-Bnijl7lA.js +145 -0
  25. package/dist/MarketingMaterialEdit-BlUKwSoP.js +746 -0
  26. package/dist/{Member-2xV4Izwa.js → Member-sT853g51.js} +38 -37
  27. package/dist/{MemberList-CYgBdyJt.js → MemberList-DYT5_fSP.js} +158 -159
  28. package/dist/{MemberTransactions-DWDV01N4.js → MemberTransactions-Cqce5ebe.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js → MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js} +5940 -5668
  30. package/dist/Mission-Q5_sGgrm.js +304 -0
  31. package/dist/{Overview-BZjto86d.js → Overview-B0rwrHR1.js} +24 -25
  32. package/dist/Point-BGYFMvev.js +228 -0
  33. package/dist/Promotion-0acd63nA.js +364 -0
  34. package/dist/{Queue-D62r2qjy.js → Queue-SVqRUlD_.js} +14 -15
  35. package/dist/{Record-0iF3dG7y.js → Record-BTjg4ihy.js} +10 -10
  36. package/dist/{Reward-C5IEJYu6.js → Reward-DW58VMRO.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js → RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js +1766 -0
  39. package/dist/{Segment-BknjBrUP.js → Segment-Dny8pxP1.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js → SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js} +12 -12
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js} +4 -4
  43. package/dist/Setting-CjcnxK34.js +1992 -0
  44. package/dist/SettingAdvertisements-CIyDF4C8.js +263 -0
  45. package/dist/Store-B8k5YVqU.js +1934 -0
  46. package/dist/StoreRewards-BW08rwpL.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js +8093 -0
  49. package/dist/{Tier-B168DtFj.js → Tier-DKzu4tYw.js} +561 -480
  50. package/dist/{Title-uH0RI1N3.js → Title-BK-TXatJ.js} +149 -147
  51. package/dist/{Transaction-Bx-pmLrJ.js → Transaction-Duayg1jd.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js} +7 -7
  53. package/dist/{Voucher-Dzpz2AEB.js → Voucher-BEVAkNeJ.js} +140 -124
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js → ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js} +2 -2
  56. package/dist/app-IvbII0ql.js +45026 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-B65OtB5B.js → business-BFIwFfkq.js} +11 -8
  59. package/dist/campaign-RuIwxc4y.js +253 -0
  60. package/dist/{campaign-qGy6uzrC.js → campaign-w9j4I4jn.js} +29 -25
  61. package/dist/{campaign.enum-CZp2DmXI.js → campaign.enum-IHLsfdik.js} +3 -2
  62. package/dist/campaign.fn-B_P1MkRV.js +776 -0
  63. package/dist/{collectible.enum-CN-lnG1m.js → collectible.enum-CUgSjO08.js} +1 -1
  64. package/dist/{collection.fn-mMwGQWce.js → collection.fn-CrfnNb41.js} +2 -2
  65. package/dist/dto-jwO_sX9I.js +222 -0
  66. package/dist/{effect-Bg3yb9T6.js → effect--0g8PNyt.js} +1 -1
  67. package/dist/{email-addresses-CQsN724N.js → email-addresses-HtsxvXw9.js} +2 -2
  68. package/dist/{export-BLf2dhFd.js → export-CFEwMRmd.js} +9 -10
  69. package/dist/{helper-CFaph16Q.js → helper-CCfb24PO.js} +22 -7
  70. package/dist/index-B-AMMFfT.js +3419 -0
  71. package/dist/{index-BPyac0fq.js → index-BR3UbZ0F.js} +1 -1
  72. package/dist/{index-Dy5p_b1S.js → index-BZEM0T2A.js} +1 -1
  73. package/dist/index-Bflu4Rft.js +8884 -0
  74. package/dist/{index-Dkmn0jmX.js → index-CR3f3BXQ.js} +2552 -2356
  75. package/dist/{index-BkySejFg.js → index-CZPcwcUo.js} +3 -3
  76. package/dist/{index-BPZtjcTm.js → index-CkuPY85X.js} +1 -1
  77. package/dist/index-CppLPpqB.js +30933 -0
  78. package/dist/index-CuvNtC_M.js +61 -0
  79. package/dist/{index-BKOgzVx6.js → index-DDYH-IEX.js} +1 -1
  80. package/dist/{index-DaEQgaiW.js → index-DdZdHioZ.js} +455 -245
  81. package/dist/{index-BBPIZjw6.js → index-Dic_WcAL.js} +3 -3
  82. package/dist/{index-CH2d_B8c.js → index-DpjYgKTN.js} +4 -1
  83. package/dist/index-wzSeRJAd.js +36 -0
  84. package/dist/{index.esm2017-B9vJTKYg.js → index.esm2017-CUnjzfU-.js} +89 -89
  85. package/dist/loading-CivgDw5C.js +215 -0
  86. package/dist/{lodash-B5I3zXaY.js → lodash-BSbv_9TG.js} +1 -1
  87. package/dist/{membership-Du79A0Pl.js → membership-j2w1YUO-.js} +3 -3
  88. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  89. package/dist/{money-DXgYs2-R.js → money-DL-x8hiT.js} +1 -1
  90. package/dist/{number-CBMkNZvH.js → number-D1yoFGEr.js} +1 -1
  91. package/dist/objectid-CHab6j3r.js +145 -0
  92. package/dist/{campaign-iKI-L84v.js → plugins-P-V4XWmW.js} +784 -777
  93. package/dist/remy-D_Deb3ue.js +13 -0
  94. package/dist/{reward-ClX_lWcQ.js → reward-BqMlBQRu.js} +1 -1
  95. package/dist/{rule-BfidJ75Y.js → rule-CztsLdki.js} +4 -4
  96. package/dist/rule-builder-DANv7Rmz.js +102 -0
  97. package/dist/style.css +11 -2
  98. package/dist/template-Dbz3FhHK.js +188 -0
  99. package/dist/timezone-BgVqObBq.js +1151 -0
  100. package/dist/trigger-CbriUibd.js +213 -0
  101. package/dist/usePagination-DtNK7W0U.js +223 -0
  102. package/dist/user-CVapqHfr.js +55 -0
  103. package/dist/vue-i18n-tpDAnnmD.js +2365 -0
  104. package/dist/{xlsx-Be4bARvl.js → xlsx-EewcN2uY.js} +1 -1
  105. package/dist/{zod-Bg2FbC-D.js → zod-D-wiCQRJ.js} +32 -31
  106. package/package.json +13 -5
  107. package/dist/AuditLogs-C-gCCPvF.js +0 -1887
  108. package/dist/Broadcast-B2-itjvZ.js +0 -227
  109. package/dist/Collections-DepGq6WJ.js +0 -465
  110. package/dist/Credit-D7K0gFwc.js +0 -222
  111. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  112. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
  113. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
  114. package/dist/Experience-FlBX3eyN.js +0 -223
  115. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  116. package/dist/Game-Cc3D7lKV.js +0 -278
  117. package/dist/Marketing-D7PXYloN.js +0 -20073
  118. package/dist/Mission-BSGc9822.js +0 -296
  119. package/dist/Point-0U4TTdPW.js +0 -226
  120. package/dist/Promotion-DiUa0GcV.js +0 -289
  121. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
  122. package/dist/Setting-RLI7RgmN.js +0 -1936
  123. package/dist/Store-gxmv8hWJ.js +0 -1842
  124. package/dist/StoreRewards-C_6gY_Nk.js +0 -423
  125. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
  126. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
  127. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
  128. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  129. package/dist/app-B90wINOO.js +0 -33357
  130. package/dist/app-DuUxQ1ZP.js +0 -7086
  131. package/dist/campaign.fn-DKScnmjX.js +0 -758
  132. package/dist/dto-C5ri8Nws.js +0 -214
  133. package/dist/index-BCGDOgxb.js +0 -38
  134. package/dist/index-BCPBmANe.js +0 -3120
  135. package/dist/index-BN2Uyvj4.js +0 -30038
  136. package/dist/index-CrbnfAk8.js +0 -8861
  137. package/dist/index-CsaQJMAR.js +0 -66
  138. package/dist/index-DJwQICyC.js +0 -146
  139. package/dist/loading-MEQuW9Xa.js +0 -71
  140. package/dist/objectid-BeZTZYqi.js +0 -145
  141. package/dist/plugins-KiMuDTPp.js +0 -208
  142. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  143. package/dist/rule-builder-BTcZx77a.js +0 -89
  144. package/dist/template-DPpMK30W.js +0 -190
  145. package/dist/trigger-DLp1bkZP.js +0 -144
  146. package/dist/usePagination-BeF5K3M7.js +0 -223
  147. package/dist/user-Cq9CGBHZ.js +0 -54
  148. package/dist/vue-i18n-COzqUgQy.js +0 -2365
@@ -1,10 +1,10 @@
1
- import { z as e, F as n, m as o, a as v } from "./index-Dkmn0jmX.js";
2
- import { D as E, E as O, G as I, H as L, I as p } from "./index-BCPBmANe.js";
3
- import { c as h } from "./index-CrbnfAk8.js";
4
- import { R as t } from "./rule-builder-BTcZx77a.js";
5
- import { i } from "./helper-CFaph16Q.js";
6
- import { a as r } from "./index-BkySejFg.js";
7
- const T = {
1
+ import { z as e, F as t, m as i, a as b } from "./index-CR3f3BXQ.js";
2
+ import { A as z, B as C, C as T, D as S, E as l } from "./index-B-AMMFfT.js";
3
+ import { a as v } from "./index-Bflu4Rft.js";
4
+ import { R as a } from "./rule-builder-DANv7Rmz.js";
5
+ import { i as o } from "./helper-CCfb24PO.js";
6
+ import { a as r } from "./index-CZPcwcUo.js";
7
+ const N = {
8
8
  collectionName: "AuditLogs",
9
9
  transform: {
10
10
  _id: "oid",
@@ -17,7 +17,7 @@ const T = {
17
17
  fromCollection: "Businesses"
18
18
  }
19
19
  }
20
- }, R = e.enum([
20
+ }, U = e.enum([
21
21
  "GET",
22
22
  "POST",
23
23
  "PUT",
@@ -26,7 +26,7 @@ const T = {
26
26
  "OPTIONS",
27
27
  "HEAD",
28
28
  "ALL"
29
- ]), C = e.enum([
29
+ ]), P = e.enum([
30
30
  "CAMPAIGN",
31
31
  "LOCATION",
32
32
  "MARKETING MATERIALS",
@@ -36,31 +36,31 @@ const T = {
36
36
  "SETTINGS",
37
37
  "SEGMENTATION",
38
38
  "USER"
39
- ]), S = e.object({
40
- httpMethod: R,
39
+ ]), j = e.object({
40
+ httpMethod: U,
41
41
  url: e.string().min(1),
42
42
  userAgent: e.string(),
43
43
  host: e.string().min(1),
44
44
  params: e.object({}).passthrough().nullish(),
45
45
  query: e.object({}).passthrough().nullish(),
46
46
  body: e.object({}).passthrough().nullish()
47
- }), x = e.object({
47
+ }), J = e.object({
48
48
  statusCode: e.number().int().min(100).max(599),
49
49
  body: e.object({}).passthrough().nullish()
50
50
  });
51
51
  e.object({
52
- _id: n,
52
+ _id: t,
53
53
  user: e.string().length(28),
54
54
  userName: e.string().min(1),
55
- userPhoneNumber: e.string().refine((a) => E(a)).nullish(),
56
- moduleType: C,
57
- business: n.nullish(),
55
+ userPhoneNumber: e.string().refine((n) => z(n)).nullish(),
56
+ moduleType: P,
57
+ business: t.nullish(),
58
58
  clientIp: e.string().nullish(),
59
59
  timestamp: e.string().datetime(),
60
- request: S,
61
- response: x
62
- }).describe(o.describe(T));
63
- const pe = {
60
+ request: j,
61
+ response: J
62
+ }).describe(i.describe(N));
63
+ const ce = {
64
64
  PROMOTION: {
65
65
  name: "Promotion Template",
66
66
  description: "Promotion template for campaign creation.",
@@ -111,6 +111,11 @@ const pe = {
111
111
  label: void 0,
112
112
  property: "campaign.effect",
113
113
  type: "effect"
114
+ },
115
+ {
116
+ label: "connect.template.campaign_image",
117
+ property: "campaign.image",
118
+ type: "image"
114
119
  }
115
120
  ]
116
121
  }
@@ -141,7 +146,7 @@ const pe = {
141
146
  ]
142
147
  },
143
148
  {
144
- name: "Game configuration",
149
+ name: "connect.template.game_configuration",
145
150
  fields: [
146
151
  {
147
152
  label: void 0,
@@ -151,10 +156,10 @@ const pe = {
151
156
  ]
152
157
  },
153
158
  {
154
- name: "Location",
159
+ name: "connect.template.location",
155
160
  fields: [
156
161
  {
157
- label: "Target location",
162
+ label: "connect.template.target_location",
158
163
  property: "campaign.targetLocation",
159
164
  type: "target_location"
160
165
  }
@@ -176,7 +181,7 @@ const pe = {
176
181
  effect: null,
177
182
  event: {
178
183
  type: "MAKING_ORDER",
179
- rule: t.scaffoldGroup()
184
+ rule: a.scaffoldGroup()
180
185
  },
181
186
  group: null,
182
187
  targetLocation: null,
@@ -270,7 +275,7 @@ const pe = {
270
275
  type: "textarea"
271
276
  },
272
277
  {
273
- label: "Voucher Image",
278
+ label: "connect.template.voucher_image",
274
279
  property: "configs.image",
275
280
  type: "image"
276
281
  }
@@ -359,45 +364,51 @@ const pe = {
359
364
  name: "connect.template.location",
360
365
  fields: [
361
366
  {
362
- label: "Target location",
367
+ label: "connect.template.target_location",
363
368
  property: "campaign.targetLocation",
364
369
  type: "target_location"
365
370
  }
366
371
  ]
367
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
+ // },
368
387
  {
369
- name: "Redemption",
388
+ name: "connect.template.redemption",
370
389
  fields: [
371
390
  {
372
- label: "Code",
391
+ label: "connect.template.code",
373
392
  property: "campaign.code",
374
393
  type: "text"
375
394
  }
376
395
  ],
377
- condition: {
378
- property: "campaign.event.type",
379
- value: "SIMPLE_CLAIM"
380
- }
381
- },
382
- {
383
- name: "Hide in App (FeedVibe)",
384
- fields: [
396
+ condition: [
397
+ {
398
+ property: "campaign.event.type",
399
+ value: "SIMPLE_CLAIM"
400
+ },
385
401
  {
386
- label: "Hide",
387
402
  property: "campaign.hideInApp",
388
- type: "switch"
403
+ value: !0
389
404
  }
390
- ],
391
- condition: {
392
- property: "campaign.event.type",
393
- value: "SIMPLE_CLAIM"
394
- }
405
+ ]
395
406
  },
396
407
  {
397
- name: "Notify audience",
408
+ name: "connect.template.notify_audience",
398
409
  fields: [
399
410
  {
400
- label: "Send notification",
411
+ label: "connect.template.send_notification",
401
412
  property: "campaign.notify",
402
413
  type: "switch"
403
414
  }
@@ -407,7 +418,7 @@ const pe = {
407
418
  name: "connect.template.notify_message",
408
419
  fields: [
409
420
  {
410
- label: "Notification message",
421
+ label: "connect.template.notification_message",
411
422
  property: "campaign.notifyMessage",
412
423
  type: "message",
413
424
  extras: "ISSUE_REWARD"
@@ -433,7 +444,7 @@ const pe = {
433
444
  code: "",
434
445
  event: {
435
446
  type: "BILL_COMPLETED",
436
- rule: t.scaffoldGroup()
447
+ rule: a.scaffoldGroup()
437
448
  },
438
449
  group: null,
439
450
  targetLocation: null,
@@ -455,7 +466,7 @@ const pe = {
455
466
  // },
456
467
  hideInApp: !0
457
468
  },
458
- configs: i("VOUCHER", {
469
+ configs: o("VOUCHER", {
459
470
  name: "",
460
471
  business: null,
461
472
  noCampaign: !1
@@ -481,6 +492,11 @@ const pe = {
481
492
  label: "connect.template.campaign_description",
482
493
  property: "campaign.description",
483
494
  type: "textarea"
495
+ },
496
+ {
497
+ label: "connect.template.campaign_period",
498
+ property: "campaign.timeframeOptions",
499
+ type: "timeframe"
484
500
  }
485
501
  ]
486
502
  },
@@ -578,17 +594,17 @@ const pe = {
578
594
  image: "",
579
595
  event: {
580
596
  type: "SCHEDULE",
581
- rule: t.setRuleToGroup(
582
- t.scaffoldGroup(),
583
- t.setRuleToGroup(
584
- t.scaffoldGroup("g_schedule"),
597
+ rule: a.setRuleToGroup(
598
+ a.scaffoldGroup(),
599
+ a.setRuleToGroup(
600
+ a.scaffoldGroup("g_schedule"),
585
601
  [
586
- t.constructEntry(
602
+ a.constructEntry(
587
603
  "trigger.date",
588
604
  "_rrule",
589
605
  "RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU"
590
606
  ),
591
- t.constructEntry(
607
+ a.constructEntry(
592
608
  "trigger.time",
593
609
  "_isOnTime",
594
610
  "00:00"
@@ -750,17 +766,17 @@ const pe = {
750
766
  name: "connect.template.location",
751
767
  fields: [
752
768
  {
753
- label: "Target location",
769
+ label: "connect.template.target_location",
754
770
  property: "campaign.targetLocation",
755
771
  type: "target_location"
756
772
  }
757
773
  ]
758
774
  }
759
775
  // {
760
- // name: 'Notify audience',
776
+ // name: 'connect.template.notify_audience',
761
777
  // fields: [
762
778
  // {
763
- // label: 'Send notification',
779
+ // label: 'connect.template.send_notification',
764
780
  // property: 'campaign.notify',
765
781
  // type: 'switch',
766
782
  // },
@@ -782,7 +798,7 @@ const pe = {
782
798
  image: "",
783
799
  event: {
784
800
  type: "BILL_COMPLETED",
785
- rule: t.scaffoldGroup()
801
+ rule: a.scaffoldGroup()
786
802
  },
787
803
  group: null,
788
804
  targetLocation: null,
@@ -937,17 +953,17 @@ const pe = {
937
953
  name: "connect.template.location",
938
954
  fields: [
939
955
  {
940
- label: "Target location",
956
+ label: "connect.template.target_location",
941
957
  property: "campaign.targetLocation",
942
958
  type: "target_location"
943
959
  }
944
960
  ]
945
961
  }
946
962
  // {
947
- // name: 'Notify audience',
963
+ // name: 'connect.template.notify_audience',
948
964
  // fields: [
949
965
  // {
950
- // label: 'Send notification',
966
+ // label: 'connect.template.send_notification',
951
967
  // property: 'campaign.notify',
952
968
  // type: 'switch',
953
969
  // },
@@ -969,7 +985,7 @@ const pe = {
969
985
  image: "",
970
986
  event: {
971
987
  type: "BILL_COMPLETED",
972
- rule: t.scaffoldGroup()
988
+ rule: a.scaffoldGroup()
973
989
  },
974
990
  group: null,
975
991
  targetLocation: null,
@@ -1124,17 +1140,17 @@ const pe = {
1124
1140
  name: "connect.template.location",
1125
1141
  fields: [
1126
1142
  {
1127
- label: "Target location",
1143
+ label: "connect.template.target_location",
1128
1144
  property: "campaign.targetLocation",
1129
1145
  type: "target_location"
1130
1146
  }
1131
1147
  ]
1132
1148
  }
1133
1149
  // {
1134
- // name: 'Notify audience',
1150
+ // name: 'connect.template.notify_audience',
1135
1151
  // fields: [
1136
1152
  // {
1137
- // label: 'Send notification',
1153
+ // label: 'connect.template.send_notification',
1138
1154
  // property: 'campaign.notify',
1139
1155
  // type: 'switch',
1140
1156
  // },
@@ -1156,7 +1172,7 @@ const pe = {
1156
1172
  image: "",
1157
1173
  event: {
1158
1174
  type: "BILL_COMPLETED",
1159
- rule: t.scaffoldGroup()
1175
+ rule: a.scaffoldGroup()
1160
1176
  },
1161
1177
  group: null,
1162
1178
  targetLocation: null,
@@ -1313,7 +1329,7 @@ const pe = {
1313
1329
  name: "connect.template.location",
1314
1330
  fields: [
1315
1331
  {
1316
- label: "Target location",
1332
+ label: "connect.template.target_location",
1317
1333
  property: "campaign.targetLocation",
1318
1334
  type: "target_location"
1319
1335
  }
@@ -1328,7 +1344,7 @@ const pe = {
1328
1344
  name: "connect.template.game_type",
1329
1345
  fields: [
1330
1346
  {
1331
- label: "Select a game where you want your customer to play",
1347
+ label: "connect.template.select_game",
1332
1348
  property: "configs.extras.gameType",
1333
1349
  type: "game_type"
1334
1350
  }
@@ -1365,7 +1381,7 @@ const pe = {
1365
1381
  image: "",
1366
1382
  event: {
1367
1383
  type: "BILL_COMPLETED",
1368
- rule: t.scaffoldGroup()
1384
+ rule: a.scaffoldGroup()
1369
1385
  },
1370
1386
  group: null,
1371
1387
  targetLocation: null,
@@ -1383,7 +1399,7 @@ const pe = {
1383
1399
  game: {
1384
1400
  event: {
1385
1401
  type: "GAME_COMPLETED",
1386
- rule: t.scaffoldGroup()
1402
+ rule: a.scaffoldGroup()
1387
1403
  },
1388
1404
  name: "rewardpool_",
1389
1405
  targetLocation: null,
@@ -1395,7 +1411,7 @@ const pe = {
1395
1411
  rewards: []
1396
1412
  }
1397
1413
  },
1398
- configs: i("GAME", {
1414
+ configs: o("GAME", {
1399
1415
  name: "Token",
1400
1416
  business: null,
1401
1417
  noCampaign: !1
@@ -1534,7 +1550,7 @@ const pe = {
1534
1550
  name: "connect.template.location",
1535
1551
  fields: [
1536
1552
  {
1537
- label: "Target location",
1553
+ label: "connect.template.target_location",
1538
1554
  property: "campaign.targetLocation",
1539
1555
  type: "target_location"
1540
1556
  }
@@ -1596,7 +1612,7 @@ const pe = {
1596
1612
  name: "connect.template.configure_reward",
1597
1613
  fields: [
1598
1614
  {
1599
- label: "Configure the reward type given to your customer.",
1615
+ label: "connect.template.configure_reward_customer",
1600
1616
  property: "campaign.rewards",
1601
1617
  type: "mission_pool",
1602
1618
  extras: "campaign"
@@ -1620,7 +1636,7 @@ const pe = {
1620
1636
  },
1621
1637
  event: {
1622
1638
  type: "BILL_COMPLETED",
1623
- rule: t.scaffoldGroup()
1639
+ rule: a.scaffoldGroup()
1624
1640
  },
1625
1641
  mission: {
1626
1642
  type: "STAMP",
@@ -1636,53 +1652,219 @@ const pe = {
1636
1652
  type: "timeframe"
1637
1653
  }
1638
1654
  },
1639
- configs: i("STAMP", {
1655
+ configs: o("STAMP", {
1640
1656
  business: null,
1641
1657
  noCampaign: !1
1642
1658
  })
1643
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
+ }
1644
1826
  }
1645
1827
  };
1646
- t.scaffoldGroup(), i("STAMP", {
1828
+ a.scaffoldGroup(), o("STAMP", {
1647
1829
  business: null,
1648
1830
  noCampaign: !1
1649
1831
  });
1650
1832
  ({
1651
- ...t.scaffoldGroup()
1652
- }, i("VOUCHER", {
1833
+ ...a.scaffoldGroup()
1834
+ }, o("VOUCHER", {
1653
1835
  name: "",
1654
1836
  business: null,
1655
1837
  noCampaign: !1
1656
1838
  }));
1657
1839
  ({
1658
- ...t.scaffoldGroup()
1659
- }, i("VOUCHER", {
1840
+ ...a.scaffoldGroup()
1841
+ }, o("VOUCHER", {
1660
1842
  name: "",
1661
1843
  business: null,
1662
1844
  noCampaign: !1
1663
1845
  }));
1664
1846
  ({
1665
- ...t.scaffoldGroup()
1847
+ ...a.scaffoldGroup()
1666
1848
  });
1667
1849
  ({
1668
- ...t.scaffoldGroup()
1850
+ ...a.scaffoldGroup()
1669
1851
  });
1670
1852
  ({
1671
- ...t.scaffoldGroup()
1853
+ ...a.scaffoldGroup()
1672
1854
  });
1673
- t.setRuleToGroup(
1674
- t.scaffoldGroup(),
1675
- t.setRuleToGroup(
1676
- t.scaffoldGroup("g_user"),
1677
- [t.constructEntry("user.member", "_isIn", [!0])],
1855
+ a.setRuleToGroup(
1856
+ a.scaffoldGroup(),
1857
+ a.setRuleToGroup(
1858
+ a.scaffoldGroup("g_user"),
1859
+ [a.constructEntry("user.member", "_isIn", [!0])],
1678
1860
  "&&"
1679
1861
  )
1680
1862
  );
1681
- t.setRuleToGroup(t.scaffoldGroup(), [
1682
- t.setRuleToGroup(
1683
- t.scaffoldGroup("g_user"),
1863
+ a.setRuleToGroup(a.scaffoldGroup(), [
1864
+ a.setRuleToGroup(
1865
+ a.scaffoldGroup("g_user"),
1684
1866
  [
1685
- t.constructEntry("user.birthday", "_isRange", {
1867
+ a.constructEntry("user.birthday", "_isRange", {
1686
1868
  op: "this",
1687
1869
  unit: "month",
1688
1870
  ignoreYear: !0
@@ -1692,13 +1874,13 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1692
1874
  )
1693
1875
  ]);
1694
1876
  ({
1695
- ...t.scaffoldGroup()
1877
+ ...a.scaffoldGroup()
1696
1878
  });
1697
- t.setRuleToGroup(t.scaffoldGroup(), [
1698
- t.setRuleToGroup(
1699
- t.scaffoldGroup("g_user"),
1879
+ a.setRuleToGroup(a.scaffoldGroup(), [
1880
+ a.setRuleToGroup(
1881
+ a.scaffoldGroup("g_user"),
1700
1882
  [
1701
- t.constructEntry("user.birthday", "_isRange", {
1883
+ a.constructEntry("user.birthday", "_isRange", {
1702
1884
  op: "this",
1703
1885
  unit: "month",
1704
1886
  ignoreYear: !0
@@ -1708,85 +1890,85 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1708
1890
  )
1709
1891
  ]);
1710
1892
  ({
1711
- ...t.scaffoldGroup()
1893
+ ...a.scaffoldGroup()
1712
1894
  });
1713
1895
  ({
1714
- ...t.scaffoldGroup()
1715
- }, i("VOUCHER", {
1896
+ ...a.scaffoldGroup()
1897
+ }, o("VOUCHER", {
1716
1898
  name: "",
1717
1899
  business: null,
1718
1900
  noCampaign: !1
1719
1901
  }));
1720
- t.setRuleToGroup(
1721
- t.scaffoldGroup(),
1722
- t.setRuleToGroup(
1723
- t.scaffoldGroup("g_schedule"),
1902
+ a.setRuleToGroup(
1903
+ a.scaffoldGroup(),
1904
+ a.setRuleToGroup(
1905
+ a.scaffoldGroup("g_schedule"),
1724
1906
  [
1725
- t.constructEntry("trigger.date", "_isOnDate", ""),
1726
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1907
+ a.constructEntry("trigger.date", "_isOnDate", ""),
1908
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1727
1909
  ],
1728
1910
  "&&"
1729
1911
  )
1730
1912
  );
1731
- t.setRuleToGroup(t.scaffoldGroup(), [
1732
- t.setRuleToGroup(
1733
- t.scaffoldGroup("g_schedule"),
1913
+ a.setRuleToGroup(a.scaffoldGroup(), [
1914
+ a.setRuleToGroup(
1915
+ a.scaffoldGroup("g_schedule"),
1734
1916
  [
1735
- t.constructEntry(
1917
+ a.constructEntry(
1736
1918
  "trigger.date",
1737
1919
  "_rrule",
1738
1920
  "RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
1739
1921
  ),
1740
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1922
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1741
1923
  ],
1742
1924
  "&&"
1743
1925
  )
1744
1926
  ]);
1745
- ({ ...t.scaffoldGroup() });
1746
- t.setRuleToGroup(
1747
- t.scaffoldGroup(),
1748
- t.setRuleToGroup(
1749
- t.scaffoldGroup("g_schedule"),
1927
+ ({ ...a.scaffoldGroup() });
1928
+ a.setRuleToGroup(
1929
+ a.scaffoldGroup(),
1930
+ a.setRuleToGroup(
1931
+ a.scaffoldGroup("g_schedule"),
1750
1932
  [
1751
- t.constructEntry(
1933
+ a.constructEntry(
1752
1934
  "trigger.date",
1753
1935
  "_rrule",
1754
1936
  "RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
1755
1937
  ),
1756
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1938
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1757
1939
  ],
1758
1940
  "&&"
1759
1941
  )
1760
1942
  );
1761
- t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
1943
+ a.scaffoldGroup(), a.scaffoldGroup(), o("GAME", {
1762
1944
  name: "Token",
1763
1945
  business: null,
1764
1946
  noCampaign: !1
1765
1947
  });
1766
1948
  ({
1767
- ...t.scaffoldGroup()
1768
- }, i("VOUCHER", {
1949
+ ...a.scaffoldGroup()
1950
+ }, o("VOUCHER", {
1769
1951
  name: "",
1770
1952
  business: null,
1771
1953
  noCampaign: !1
1772
1954
  }));
1773
- t.setRuleToGroup(t.scaffoldGroup(), [
1774
- t.setRuleToGroup(
1775
- t.scaffoldGroup("g_schedule"),
1955
+ a.setRuleToGroup(a.scaffoldGroup(), [
1956
+ a.setRuleToGroup(
1957
+ a.scaffoldGroup("g_schedule"),
1776
1958
  [
1777
- t.constructEntry(
1959
+ a.constructEntry(
1778
1960
  "trigger.date",
1779
1961
  "_rrule",
1780
1962
  "RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
1781
1963
  ),
1782
- t.constructEntry("trigger.time", "_isOnTime", "00:00")
1964
+ a.constructEntry("trigger.time", "_isOnTime", "00:00")
1783
1965
  ],
1784
1966
  "&&"
1785
1967
  ),
1786
- t.setRuleToGroup(
1787
- t.scaffoldGroup("g_user"),
1968
+ a.setRuleToGroup(
1969
+ a.scaffoldGroup("g_user"),
1788
1970
  [
1789
- t.constructEntry("user.birthday", "_isRange", {
1971
+ a.constructEntry("user.birthday", "_isRange", {
1790
1972
  op: "this",
1791
1973
  unit: "month",
1792
1974
  ignoreYear: !0
@@ -1794,30 +1976,30 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1794
1976
  ],
1795
1977
  "&&"
1796
1978
  )
1797
- ]), i("VOUCHER", {
1979
+ ]), o("VOUCHER", {
1798
1980
  name: "",
1799
1981
  business: null,
1800
1982
  noCampaign: !1
1801
1983
  });
1802
1984
  ({
1803
- ...t.scaffoldGroup()
1985
+ ...a.scaffoldGroup()
1804
1986
  });
1805
1987
  ({
1806
- ...t.scaffoldGroup()
1988
+ ...a.scaffoldGroup()
1807
1989
  });
1808
1990
  ({
1809
- ...t.scaffoldGroup()
1991
+ ...a.scaffoldGroup()
1810
1992
  });
1811
1993
  ({
1812
- ...t.scaffoldGroup()
1994
+ ...a.scaffoldGroup()
1813
1995
  });
1814
1996
  ({
1815
- ...t.scaffoldGroup()
1997
+ ...a.scaffoldGroup()
1816
1998
  });
1817
1999
  ({
1818
- ...t.scaffoldGroup()
2000
+ ...a.scaffoldGroup()
1819
2001
  });
1820
- const D = e.enum([
2002
+ const E = e.enum([
1821
2003
  "MEMBER_REWARD",
1822
2004
  "PAID_LOYALTY",
1823
2005
  "COLLECT_FEEDBACK",
@@ -1827,7 +2009,7 @@ const D = e.enum([
1827
2009
  "BROADCAST",
1828
2010
  "BIRTHDAY",
1829
2011
  "GAME"
1830
- ]), A = e.enum([
2012
+ ]), O = e.enum([
1831
2013
  "text",
1832
2014
  "number",
1833
2015
  "textarea",
@@ -1853,102 +2035,113 @@ const D = e.enum([
1853
2035
  "rule_bill",
1854
2036
  "rule_feedback",
1855
2037
  "rule_birthday",
1856
- "promotion_game_type"
1857
- ]), M = e.object({
2038
+ "promotion_game_type",
2039
+ "grab_effect",
2040
+ "grab_quota",
2041
+ "grab_conditions"
2042
+ ]), I = e.object({
1858
2043
  label: e.string().optional(),
2044
+ label_locale: e.record(e.string()).nullish(),
1859
2045
  property: e.string().or(e.any()),
1860
- type: A,
2046
+ type: O,
1861
2047
  extras: e.string().optional(),
1862
2048
  isRuleChildren: e.boolean().optional()
1863
- }), N = e.object({
2049
+ }), p = e.object({
2050
+ not: e.boolean().optional(),
2051
+ property: e.string(),
2052
+ value: e.any()
2053
+ }), L = e.object({
1864
2054
  name: e.string().optional(),
1865
- fields: e.array(M),
1866
- condition: e.object({
1867
- not: e.boolean().optional(),
1868
- property: e.string(),
1869
- value: e.any()
1870
- }).optional()
1871
- }), w = e.object({
2055
+ name_locale: e.record(e.string()).nullish(),
2056
+ fields: e.array(I),
2057
+ condition: p.optional().or(
2058
+ e.array(p)
2059
+ )
2060
+ }), R = e.object({
1872
2061
  name: e.string(),
1873
- groups: e.array(N)
2062
+ name_locale: e.record(e.string()).nullish(),
2063
+ groups: e.array(L)
1874
2064
  });
1875
2065
  e.object({
1876
- _id: n,
2066
+ _id: t,
1877
2067
  name: e.string(),
2068
+ name_locale: e.record(e.string()).nullish(),
1878
2069
  description: e.string().nullish(),
1879
- steps: e.array(w).min(1),
1880
- intention: e.array(D),
2070
+ description_locale: e.record(e.string()).nullish(),
2071
+ steps: e.array(R).min(1),
2072
+ intention: e.array(E),
1881
2073
  defaultValue: e.any()
1882
2074
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1883
- const U = {
2075
+ const D = {
1884
2076
  collectionName: "Businesses",
1885
2077
  transform: {
1886
2078
  _id: "oid"
1887
2079
  }
1888
2080
  };
1889
2081
  e.object({
1890
- _id: n,
2082
+ _id: t,
1891
2083
  ownerId: e.string(),
1892
2084
  name: e.string(),
1893
2085
  credit: e.number(),
1894
2086
  forceSend: e.boolean().optional()
1895
- }).describe(o.describe(U));
1896
- const m = e.enum(["PHONE"]), F = e.enum([
2087
+ }).describe(i.describe(D));
2088
+ const s = e.enum(["PHONE"]), x = e.enum([
1897
2089
  "MOCEAN",
1898
2090
  "SLACK",
1899
2091
  "SMS",
1900
2092
  "EMAIL",
1901
2093
  "WHATSAPP"
1902
- ]), P = e.enum(["PENDING", "COMPLETED", "FAILED"]), G = e.enum([
2094
+ ]), w = e.enum(["PENDING", "COMPLETED", "FAILED"]), A = e.enum([
1903
2095
  "General",
1904
2096
  "Otp",
1905
2097
  "Marketing",
1906
2098
  "Ordering",
1907
- "MemberInvitation"
1908
- ]), B = e.object({
1909
- type: m
1910
- }), s = B.extend({
1911
- type: e.literal(m.enum.PHONE),
1912
- provider: F,
1913
- usage: G.optional()
1914
- }), H = {
2099
+ "MemberInvitation",
2100
+ "MarketingPromotion"
2101
+ ]), M = e.object({
2102
+ type: s
2103
+ }), g = M.extend({
2104
+ type: e.literal(s.enum.PHONE),
2105
+ provider: x,
2106
+ usage: A.optional()
2107
+ }), G = {
1915
2108
  collectionName: "Notifications",
1916
2109
  transform: { _id: "oid", business: "oid" }
1917
2110
  };
1918
2111
  e.object({
1919
- _id: n,
1920
- business: n,
2112
+ _id: t,
2113
+ business: t,
1921
2114
  target: e.string(),
1922
2115
  title: e.string().optional(),
1923
2116
  message: e.string(),
1924
- option: s,
1925
- status: P,
2117
+ option: g,
2118
+ status: w,
1926
2119
  ref: e.string().optional()
1927
- }).describe(o.describe(H));
2120
+ }).describe(i.describe(G));
1928
2121
  e.object({
1929
2122
  target: e.string(),
1930
2123
  title: e.string().optional(),
1931
2124
  message: e.string(),
1932
- option: s,
2125
+ option: g,
1933
2126
  ref: e.string().optional()
1934
2127
  });
1935
2128
  e.object({
1936
2129
  phone: e.string(),
1937
2130
  message: e.string()
1938
2131
  });
1939
- const c = e.object({
2132
+ const m = e.object({
1940
2133
  name: e.string().optional(),
1941
2134
  address: e.string()
1942
- }), V = e.object({
2135
+ }), F = e.object({
1943
2136
  filename: e.string(),
1944
2137
  content: e.instanceof(Uint8Array)
1945
2138
  });
1946
2139
  e.object({
1947
- from: c.optional(),
1948
- to: e.array(c),
2140
+ from: m.optional(),
2141
+ to: e.array(m),
1949
2142
  subject: e.string(),
1950
2143
  html: e.string().optional(),
1951
- attachments: e.array(V).optional()
2144
+ attachments: e.array(F).optional()
1952
2145
  });
1953
2146
  e.object({
1954
2147
  subject: e.string(),
@@ -1980,14 +2173,15 @@ e.object({
1980
2173
  userId: e.string().optional(),
1981
2174
  ids: e.array(e.string()),
1982
2175
  type: e.enum(["DINE_IN", "PICKUP", "DELIVERY"]),
1983
- restaurantId: e.string()
2176
+ restaurantId: e.string(),
2177
+ orderId: e.string().optional()
1984
2178
  });
1985
2179
  e.object({
1986
2180
  claimIds: e.array(e.string()),
1987
2181
  billId: e.string()
1988
2182
  });
1989
2183
  e.object({
1990
- amount: v,
2184
+ amount: b,
1991
2185
  member: e.string(),
1992
2186
  bill: e.string(),
1993
2187
  otp: e.string().nullish(),
@@ -1996,15 +2190,15 @@ e.object({
1996
2190
  e.object({
1997
2191
  orderId: e.string()
1998
2192
  });
1999
- var g = /* @__PURE__ */ ((a) => (a[a.feedMe = 0] = "feedMe", a[a.business = 1] = "business", a[a.restaurant = 2] = "restaurant", a))(g || {});
2000
- e.nativeEnum(g);
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);
2001
2195
  e.enum(["manage", "create", "read", "update", "delete"]);
2002
2196
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2003
2197
  e.enum(["quota"]);
2004
- var d = /* @__PURE__ */ ((a) => (a.marketing = "business::marketing", a.campaign = "business::campaign", a.counter = "business::counter", a.permission = "business::permission", a.role = "business::role", a))(d || {});
2005
- e.nativeEnum(d);
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);
2006
2200
  e.enum(["restaurant"]);
2007
- const k = e.object({
2201
+ const B = e.object({
2008
2202
  label: e.string(),
2009
2203
  subject: e.union([e.string(), e.array(e.string())]),
2010
2204
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2014,41 +2208,41 @@ const k = e.object({
2014
2208
  reason: e.string().optional()
2015
2209
  });
2016
2210
  e.object({
2017
- _id: n,
2211
+ _id: t,
2018
2212
  businessId: e.string(),
2019
2213
  userId: e.string(),
2020
2214
  email: e.string().nullish(),
2021
2215
  phoneNo: e.string().nullish(),
2022
- permissions: e.array(e.lazy(() => k))
2216
+ permissions: e.array(e.lazy(() => B))
2023
2217
  }).describe(
2024
- o.describe({
2218
+ i.describe({
2025
2219
  collectionName: "PermissionUsers",
2026
2220
  transform: {
2027
2221
  _id: "oid"
2028
2222
  }
2029
2223
  })
2030
2224
  );
2031
- const y = e.object({
2225
+ const u = e.object({
2032
2226
  userId: e.string(),
2033
2227
  level: e.number(),
2034
2228
  role: e.string().optional(),
2035
2229
  businessId: e.string().optional(),
2036
2230
  restaurantId: e.string().optional()
2037
- }), j = e.function().args(e.any(), y).returns(e.boolean()), Y = e.function().args(y).returns(e.promise(e.array(e.any())));
2231
+ }), V = e.function().args(e.any(), u).returns(e.boolean()), k = e.function().args(u).returns(e.promise(e.array(e.any())));
2038
2232
  e.object({
2039
- isAdmin: j,
2040
- getRules: Y
2233
+ isAdmin: V,
2234
+ getRules: k
2041
2235
  });
2042
2236
  e.object({
2043
- transactions: e.array(O),
2044
- collections: e.array(I)
2237
+ transactions: e.array(C),
2238
+ collections: e.array(T)
2045
2239
  });
2046
- const u = e.enum([
2240
+ const _ = e.enum([
2047
2241
  "ROCK_PAPER_SCISSOR"
2048
2242
  ]);
2049
- u.enum.ROCK_PAPER_SCISSOR + "";
2243
+ _.enum.ROCK_PAPER_SCISSOR + "";
2050
2244
  e.object({
2051
- type: u
2245
+ type: _
2052
2246
  });
2053
2247
  e.object({
2054
2248
  host: e.string().url(),
@@ -2056,6 +2250,22 @@ e.object({
2056
2250
  token: e.string(),
2057
2251
  roomId: e.string()
2058
2252
  });
2253
+ e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
2254
+ const Y = {
2255
+ collectionName: "MarketingMaterials",
2256
+ transform: {
2257
+ _id: "oid",
2258
+ business: "oid"
2259
+ }
2260
+ };
2261
+ e.object({
2262
+ _id: t,
2263
+ business: t,
2264
+ imageUrl: e.string().url(),
2265
+ headline: e.string(),
2266
+ caption: e.string(),
2267
+ editedAt: e.coerce.date()
2268
+ }).describe(i.describe(Y));
2059
2269
  e.object({
2060
2270
  id: e.number(),
2061
2271
  name: e.string(),
@@ -2088,39 +2298,39 @@ const K = e.enum([
2088
2298
  }
2089
2299
  };
2090
2300
  e.object({
2091
- _id: n,
2092
- business: n,
2301
+ _id: t,
2302
+ business: t,
2093
2303
  type: e.string(),
2094
2304
  payload: e.record(e.any()),
2095
2305
  status: K,
2096
2306
  response: e.any().optional(),
2097
2307
  error: e.string().optional()
2098
- }).describe(o.describe(W));
2308
+ }).describe(i.describe(W));
2099
2309
  const X = e.enum(["AUTO", "MANUAL"]);
2100
2310
  e.enum(["IN_PROGRESS", "COMPLETED"]);
2101
- const f = e.object({
2102
- _id: n,
2311
+ const y = e.object({
2312
+ _id: t,
2103
2313
  name: e.string().min(1, "Name is required").max(50),
2104
2314
  type: X,
2105
- event: L.optional()
2315
+ event: S.optional()
2106
2316
  }), q = e.object({
2107
2317
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2108
2318
  to: e.number().int("Must be integer").nullish()
2109
- }).superRefine((a, b) => {
2110
- a.from && a.to && a.from > a.to && b.addIssue({
2319
+ }).superRefine((n, H) => {
2320
+ n.from && n.to && n.from > n.to && H.addIssue({
2111
2321
  code: "custom",
2112
2322
  message: "Max referral count must be more than min referral count"
2113
2323
  });
2114
2324
  }), Q = e.object({
2115
2325
  threshold: q,
2116
- rewards: e.array(n),
2326
+ rewards: e.array(t),
2117
2327
  pf_reward: e.array(r).optional()
2118
- }), l = e.object({
2328
+ }), c = e.object({
2119
2329
  id: e.string(),
2120
2330
  name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2121
- rule: h.optional(),
2331
+ rule: v.optional(),
2122
2332
  rewards: e.array(Q)
2123
- }), J = {
2333
+ }), Z = {
2124
2334
  collectionName: "ReferralRecords",
2125
2335
  transform: {
2126
2336
  _id: "oid",
@@ -2129,25 +2339,25 @@ const f = e.object({
2129
2339
  referee: "oid",
2130
2340
  refereeReward: "oid"
2131
2341
  }
2132
- }, z = e.object({
2342
+ }, $ = e.object({
2133
2343
  completedAt: e.coerce.date(),
2134
- criteria: n,
2344
+ criteria: t,
2135
2345
  ref: e.string()
2136
- }), Z = e.object({
2137
- _id: n,
2138
- business: n,
2139
- referer: n,
2140
- referee: n,
2141
- criteria: e.array(f),
2142
- reward: e.array(l),
2143
- refereeReward: e.array(n).optional(),
2144
- criteria_progress: e.array(z),
2346
+ }), ee = e.object({
2347
+ _id: t,
2348
+ business: t,
2349
+ referer: t,
2350
+ referee: t,
2351
+ criteria: e.array(y),
2352
+ reward: e.array(c),
2353
+ refereeReward: e.array(t).optional(),
2354
+ criteria_progress: e.array($),
2145
2355
  status: e.string(),
2146
- pf_referer: p.optional(),
2147
- pf_referee: p.optional(),
2356
+ pf_referer: l.optional(),
2357
+ pf_referee: l.optional(),
2148
2358
  pf_refereeReward: e.array(r).optional()
2149
- }).describe(o.describe(J));
2150
- Z.pick({
2359
+ }).describe(i.describe(Z));
2360
+ ee.pick({
2151
2361
  _id: !0,
2152
2362
  business: !0,
2153
2363
  referer: !0,
@@ -2155,59 +2365,59 @@ Z.pick({
2155
2365
  criteria_progress: !0,
2156
2366
  criteria: !0
2157
2367
  }).extend({
2158
- pf_referee: p.pick({
2368
+ pf_referee: l.pick({
2159
2369
  _id: !0,
2160
2370
  name: !0,
2161
2371
  phoneNumber: !0,
2162
2372
  photoUrl: !0
2163
2373
  })
2164
2374
  });
2165
- const $ = {
2375
+ const ae = {
2166
2376
  collectionName: "ReferralProgram",
2167
2377
  transform: {
2168
2378
  _id: "oid",
2169
2379
  business: "oid"
2170
2380
  }
2171
- }, _ = e.object({
2172
- _id: n,
2173
- business: n,
2381
+ }, f = e.object({
2382
+ _id: t,
2383
+ business: t,
2174
2384
  term_and_condition: e.string().optional(),
2175
- refereeReward: e.array(n).optional(),
2176
- reward: e.array(l),
2177
- criteria: e.array(f)
2178
- }).describe(o.describe($));
2385
+ refereeReward: e.array(t).optional(),
2386
+ reward: e.array(c),
2387
+ criteria: e.array(y)
2388
+ }).describe(i.describe(ae));
2179
2389
  e.object({
2180
- referer: n,
2181
- referee: n,
2182
- business: n
2390
+ referer: t,
2391
+ referee: t,
2392
+ business: t
2183
2393
  });
2184
2394
  e.object({
2185
- program: _.pick({
2395
+ program: f.pick({
2186
2396
  _id: !0,
2187
2397
  business: !0,
2188
2398
  term_and_condition: !0
2189
2399
  }).extend({
2190
- reward: l.optional(),
2400
+ reward: c.optional(),
2191
2401
  pf_refereeReward: e.array(r).optional()
2192
2402
  }),
2193
2403
  referralCount: e.number(),
2194
2404
  successReferralCount: e.number(),
2195
- referredBy: p.pick({
2405
+ referredBy: l.pick({
2196
2406
  _id: !0,
2197
2407
  name: !0,
2198
2408
  phoneNumber: !0,
2199
2409
  photoUrl: !0
2200
2410
  }).optional()
2201
2411
  });
2202
- _.extend({
2412
+ f.extend({
2203
2413
  updateReferralRecord: e.boolean().optional()
2204
2414
  });
2205
2415
  export {
2206
- D as F,
2207
- pe as T,
2416
+ E as F,
2417
+ ce as T,
2208
2418
  Q as a,
2209
- f as b,
2210
- l as c,
2211
- R as d,
2212
- C as e
2419
+ y as b,
2420
+ c,
2421
+ U as d,
2422
+ P as e
2213
2423
  };