@feedmepos/mf-connect 0.1.128-dev → 0.1.129-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/{App-CPSC0ccq.js → App-CgtQ9UIg.js} +215 -223
  2. package/dist/{Bin-Cn7sCPql.js → Bin-DMgRFBtT.js} +8 -8
  3. package/dist/{Broadcast-bR7HAyV2.js → Broadcast-BBoLXcAt.js} +21 -22
  4. package/dist/{CampaignAnalytic-Dnpw_Jwo.js → CampaignAnalytic-7id6XGu5.js} +6 -6
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-HaWMLA4s.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-6QxiK0J7.js} +10 -9
  6. package/dist/{Card-BE3Y0KHF.js → Card-BfqTdIhC.js} +23 -23
  7. package/dist/{Collections-CLSp9Uah.js → Collections-Ca5iBZQN.js} +185 -197
  8. package/dist/{Credit-DgMyKROt.js → Credit-DM-hrq47.js} +20 -21
  9. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D8eCQE4D.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CuWzYh0T.js} +1 -1
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-fch7sWPv.js +3638 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CXw7yS8N.js → EffectSheet.vue_vue_type_style_index_0_lang-COGdYitL.js} +33 -33
  12. package/dist/{Experience-CCeRbvIe.js → Experience-Esl5jJIv.js} +31 -32
  13. package/dist/{FileSaver.min-D8Rw2VVN.js → FileSaver.min-COdUgnCD.js} +1 -1
  14. package/dist/{Game-CYGg8vWQ.js → Game-CUayhiK9.js} +18 -19
  15. package/dist/{GiftCardSetup-rzea90xr.js → GiftCardSetup-BFnYVo6x.js} +31 -31
  16. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BFUBfL-S.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BwVSP2tE.js} +128 -140
  17. package/dist/{Goals-BnZfK7a3.js → Goals-F7WJ5oYC.js} +4 -4
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Cw2imjlQ.js → ImageInput.vue_vue_type_script_setup_true_lang-CqDz9E6H.js} +1 -1
  19. package/dist/{Index-DjZi_lVg.js → Index-DVu2x3VY.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B1q4NtuM.js → LocationPicker.vue_vue_type_script_setup_true_lang-CrF5V3bJ.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CUjzbMcb.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CBLORz65.js} +1 -1
  22. package/dist/{LoyaltyDashboard-C3TZSSQz.js → LoyaltyDashboard-BXtAIIwE.js} +14 -14
  23. package/dist/{MainLayout-uNGpBpJi.js → MainLayout-BoQpqLPT.js} +1 -1
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-0PcswtGl.js → MainLayout.vue_vue_type_script_setup_true_lang-CoDtG7GL.js} +3 -3
  25. package/dist/{Marketing-SXmxcw3-.js → Marketing-CSFifAsA.js} +4 -4
  26. package/dist/{MarketingMaterialEdit-DK0tjHpF.js → MarketingMaterialEdit-2UgbFmpl.js} +211 -214
  27. package/dist/{Member-BFSwupq6.js → Member-BP_B3BvA.js} +7 -7
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-CjllSBjR.js +1308 -0
  29. package/dist/{MemberImportHistory-z12l_IAQ.js → MemberImportHistory-B3d0xGVj.js} +7 -7
  30. package/dist/{MemberList-DfN7ur0J.js → MemberList-CmRijOUZ.js} +105 -103
  31. package/dist/{MemberTransactions-Bntt4bRR.js → MemberTransactions-9gxO0FZF.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-ComtYItw.js → MessageInput.vue_vue_type_script_setup_true_lang-TrfCfwiu.js} +12 -12
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-_Imnj16x.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DsKAiGQG.js} +1 -1
  34. package/dist/{Mission-CvpeYVjB.js → Mission-YZoqUj_8.js} +21 -22
  35. package/dist/{Overview-BtTkltlY.js → Overview-Cm4UvReJ.js} +144 -145
  36. package/dist/{Overview-BkaFC5La.js → Overview-D5W62m_5.js} +21 -21
  37. package/dist/{Point-CpNAFABM.js → Point-B6PYl0Av.js} +21 -22
  38. package/dist/{Promotion-B_vD_9UF.js → Promotion-D6IVdgP9.js} +131 -137
  39. package/dist/{Queue-D5jDhI0f.js → Queue-CrAJB-NQ.js} +46 -46
  40. package/dist/{Record-EsNXzy4D.js → Record-BxBSeGCs.js} +9 -9
  41. package/dist/{Review-ByMrkymf.js → Review-CpewMLNi.js} +2 -2
  42. package/dist/ReviewFacebookCallback-BUwvOweo.js +238 -0
  43. package/dist/{ReviewGoogleCallback-BzU-hUy5.js → ReviewGoogleCallback-DgR17qMj.js} +5 -5
  44. package/dist/{Reward-kxAuVGDE.js → Reward-FQA-iBCK.js} +16 -16
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-i9B1R3XP.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPUuepSH.js} +14 -14
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B9mhQFnd.js +1884 -0
  47. package/dist/{Segment-C5SJs7al.js → Segment-CUlSXXCp.js} +307 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-RIerABcb.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BBx4Vsad.js} +15 -15
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8jS4gee.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DNQwB2po.js} +4 -4
  50. package/dist/{Setting-zmlu3QcR.js → Setting-4m9maYGQ.js} +17 -17
  51. package/dist/{SettingAdvertisements-DewXGZoE.js → SettingAdvertisements-B2TVVGk_.js} +12 -12
  52. package/dist/Settings-DnYKPpMT.js +179 -0
  53. package/dist/{Store-CiTwDcgr.js → Store-CiNooWmM.js} +29 -29
  54. package/dist/{StoreRewards-DaOJxsVm.js → StoreRewards-Do7Y0tmg.js} +15 -15
  55. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BTqxeKR4.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BNnXXDOX.js} +25 -25
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Tx5gxGgN.js +142 -0
  57. package/dist/{Tier-lNI7GWMP.js → Tier-C51gzsGE.js} +688 -2583
  58. package/dist/{Title-CDxDztnl.js → Title-Dz1_3FI-.js} +95 -96
  59. package/dist/{Transaction-CcsUvIns.js → Transaction-Uow2MU3k.js} +2 -2
  60. package/dist/{Upselling-BDirPkWX.js → Upselling-ljPWgZm_.js} +3 -3
  61. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hqzfBpop.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Dk082NOB.js} +26 -26
  62. package/dist/{Voucher-CJDo5U_P.js → Voucher-BahN-_B8.js} +19 -19
  63. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-WjsLHh_E.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C5YJIrEQ.js} +12 -12
  64. package/dist/{WhatsappAccount-CQBti7RJ.js → WhatsappAccount-BsJfi4aQ.js} +6 -6
  65. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DVNZ774z.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D6Q2lt81.js} +1 -1
  66. package/dist/{WhatsappBot-91lIlikm.js → WhatsappBot-DsETxGDb.js} +7 -7
  67. package/dist/{WhatsappBotLogs-PQTwT8e5.js → WhatsappBotLogs-rxhWcCic.js} +5 -5
  68. package/dist/{WhatsappBotSettings-CUES9UL-.js → WhatsappBotSettings-BVVqPUuB.js} +5 -5
  69. package/dist/{WhatsappLayout-pZGYJj0J.js → WhatsappLayout-ww0HSVET.js} +3 -3
  70. package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DAoonwsO.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-PRbvIqZI.js} +3 -3
  71. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-HEIeZYCP.js → ZodTextField.vue_vue_type_script_setup_true_lang-B3kaDL4W.js} +2 -2
  72. package/dist/{app--pRyBODF.js → app-DRy3Qq-e.js} +3380 -4144
  73. package/dist/app.js +3 -4
  74. package/dist/{base.export-CSdCmt-6.js → base.export-CjcYq9u_.js} +2 -2
  75. package/dist/business-DyQFxLGA.js +82 -0
  76. package/dist/{campaign-CwQjWU63.js → campaign-CWGgZxbn.js} +94 -121
  77. package/dist/{campaign-t9ubUkjB.js → campaign-Diyxk6-K.js} +25 -31
  78. package/dist/{campaign.enum-Damu7hgo.js → campaign.enum-CkIW-mae.js} +2 -3
  79. package/dist/campaign.fn-DmM_bev0.js +776 -0
  80. package/dist/{collectible.enum-C8LbgIQ7.js → collectible.enum-BXcUSpN2.js} +1 -1
  81. package/dist/{collection.fn-BV7pDqa5.js → collection.fn-BZuMGmeM.js} +2 -2
  82. package/dist/{currency-pS0xeJA6.js → currency-B0CeepgW.js} +1 -1
  83. package/dist/{effect-B532leFF.js → effect-C3tRo5Vc.js} +1 -1
  84. package/dist/{email-addresses-CKkT_5O5.js → email-addresses-CPm5eBoR.js} +2 -2
  85. package/dist/{feature-flag-25oDCLLB.js → feature-flag-COBMyDEn.js} +84 -84
  86. package/dist/google-C3S8u0mT.js +4 -0
  87. package/dist/{helper-DxOj04aq.js → helper-scL87EvT.js} +1 -1
  88. package/dist/{index-C7wVaeC1.js → index-40lptiZw.js} +1 -1
  89. package/dist/{index-BCgTcZ7c.js → index-4D44dKUi.js} +252 -609
  90. package/dist/{index-ip2EqUEW.js → index-BUGWEUx9.js} +1 -1
  91. package/dist/{index-DEENB4la.js → index-BWu5WNw5.js} +198 -198
  92. package/dist/{index-DBzCfWxW.js → index-BaqeaRIe.js} +2 -2
  93. package/dist/{index-DVlo0TO9.js → index-BefX1Cnk.js} +23 -23
  94. package/dist/{index-BHnMLtU2.js → index-BexTIIOc.js} +235 -381
  95. package/dist/{index-ClD2-18P.js → index-C55j-xHV.js} +6 -19
  96. package/dist/{index-B3sR1LMa.js → index-CHzG8fUk.js} +7 -7
  97. package/dist/{index-Diw9710S.js → index-CLwEr_8O.js} +4 -4
  98. package/dist/{index-DiYuhtNS.js → index-CW-lY5-3.js} +4 -4
  99. package/dist/{index-C6pr4oIv.js → index-CWAhvR-e.js} +1243 -1315
  100. package/dist/{index-uCkkfjE3.js → index-CpO-jDv5.js} +4 -4
  101. package/dist/{index-BFJ2FmB4.js → index-CsnGMcHq.js} +2 -2
  102. package/dist/{index-BViMt33t.js → index-Dc4-mMaE.js} +1 -1
  103. package/dist/{index-DqQ1q8sX.js → index-DcDRRNH6.js} +19 -26
  104. package/dist/{index-CBYY3VEG.js → index-DsP7OUWn.js} +2614 -2700
  105. package/dist/{index-BX6lcJDB.js → index-OMMh3tr2.js} +1 -1
  106. package/dist/{index-C_qmnOKQ.js → index-VR97zHF5.js} +9 -9
  107. package/dist/{index-DSAEs8u0.js → index-koWxgq3V.js} +1 -1
  108. package/dist/{index-BLRv_4gJ.js → index-tn-XNvX5.js} +1 -1
  109. package/dist/{index-DBT1f1M3.js → index-xopF1dSo.js} +2 -2
  110. package/dist/{index.esm2017-DRrIFPLo.js → index.esm2017-T25AMY_y.js} +93 -93
  111. package/dist/{loading--SZI7Tpo.js → loading-BYmbcfaQ.js} +1 -1
  112. package/dist/{lodash-BZqvXM_P.js → lodash-7z2rsw4O.js} +1 -1
  113. package/dist/{member-import-Bmt1OdRW.js → member-import-BI7Pvj61.js} +2 -2
  114. package/dist/{membership-BTFpH7Mg.js → membership-BrZIRGS0.js} +3 -3
  115. package/dist/{money-BVtlYyxo.js → money-DdNo8GRv.js} +1 -1
  116. package/dist/{number-DrOdGSrF.js → number-Gfw2iUoP.js} +1 -1
  117. package/dist/objectid-D-yjbqcO.js +145 -0
  118. package/dist/{onboarding-BjcSBC8v.js → onboarding-CUqT7rpt.js} +25 -25
  119. package/dist/{onboardingSetup-Dcv8i8qd.js → onboardingSetup-BC5HuwKA.js} +2 -2
  120. package/dist/{plugins-Iw52rJ1s.js → plugins-DlLEAHTq.js} +3 -3
  121. package/dist/{reward-DF9tE7iA.js → reward-D038cMaw.js} +1 -1
  122. package/dist/{rule-rCPhlgAq.js → rule-BVpbZ7F8.js} +492 -572
  123. package/dist/rule-builder-DA9K7mBN.js +102 -0
  124. package/dist/style.css +1 -1
  125. package/dist/template-CgJvGx2j.js +275 -0
  126. package/dist/{transaction.fn-Cp3ylqFD.js → transaction.fn-PmR-QOML.js} +2 -2
  127. package/dist/{trigger-O6JvCms4.js → trigger-DjOMEcv_.js} +9 -9
  128. package/dist/{useMarketingMaterialActions-Cnadk3AO.js → useMarketingMaterialActions-D2fkr1yK.js} +4 -4
  129. package/dist/{usePagination-C5lSxdqt.js → usePagination-oq_rR3Lp.js} +1 -1
  130. package/dist/{user-B7iv0TRE.js → user-CkwZIW3i.js} +1 -1
  131. package/dist/vue-i18n-1lTcxtBS.js +2365 -0
  132. package/dist/{xlsx-DTJ6bUKL.js → xlsx-BtcfpQDU.js} +381 -381
  133. package/dist/{zod-cIIx_Ng9.js → zod-CUrnHp4O.js} +1 -1
  134. package/package.json +2 -6
  135. package/dist/AuditLogs-CgrYStwa.js +0 -2016
  136. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BB2gszsG.js +0 -4584
  137. package/dist/Grab-BRbn6ffm.js +0 -301
  138. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dvcasf5O.js +0 -1322
  139. package/dist/ReviewFacebookCallback-BDl6NBkw.js +0 -225
  140. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D3MZsh4A.js +0 -1923
  141. package/dist/Settings-5HU_uY6B.js +0 -286
  142. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DlFCI1BT.js +0 -7007
  143. package/dist/business-BtEfH8Mt.js +0 -83
  144. package/dist/campaign.fn-D3_OzyyQ.js +0 -776
  145. package/dist/duplicateCampaign-19CDT2kM.js +0 -51
  146. package/dist/google-BQK68wbe.js +0 -5
  147. package/dist/objectid-DdJFC6TI.js +0 -145
  148. package/dist/template-v1F1rvUU.js +0 -227
  149. package/dist/vue-i18n-CYFvlTTS.js +0 -2365
@@ -1,16 +1,16 @@
1
- import { z as e } from "./index-BViMt33t.js";
2
- import { F as t, b as _, m as g, d as X } from "./index-DiYuhtNS.js";
3
- import { F as M } from "./campaign.enum-Damu7hgo.js";
4
- import { f as T, F as L, g as c, i as ee, j as O, k as u, m as x, e as te } from "./index-CBYY3VEG.js";
5
- import { o as P, m as S, n as ne, p as oe, q as ie } from "./index-C6pr4oIv.js";
6
- import { c as p, f as ae } from "./index-DEENB4la.js";
1
+ import { z as e } from "./index-Dc4-mMaE.js";
2
+ import { F as t, b as y, m as p, d as V } from "./index-CW-lY5-3.js";
3
+ import { F as h } from "./campaign.enum-CkIW-mae.js";
4
+ import { d as F, F as D, e as d, f as J, g as f, h as c, i as Y, c as q } from "./index-DsP7OUWn.js";
5
+ import { j as M, k as A, l as Z, m as $ } from "./index-CWAhvR-e.js";
6
+ import { c as u, d as X } from "./index-BWu5WNw5.js";
7
7
  e.object({
8
8
  location: t,
9
9
  memberId: t,
10
- nettTotal: _,
10
+ nettTotal: y,
11
11
  remark: e.string().optional()
12
12
  });
13
- const le = e.enum(["COUNTER", "POS"]);
13
+ const Q = e.enum(["COUNTER", "POS"]);
14
14
  e.object({
15
15
  id: e.string(),
16
16
  userId: e.string(),
@@ -21,9 +21,9 @@ e.object({
21
21
  level: e.number().nullish(),
22
22
  mostPurchasedItems: e.array(e.string()).nullish()
23
23
  });
24
- const se = {
24
+ const ee = {
25
25
  collectionName: "Bills"
26
- }, j = e.object({
26
+ }, T = e.object({
27
27
  _id: e.string(),
28
28
  items: e.record(e.string(), e.number()).nullish(),
29
29
  // business: z.string(),
@@ -32,8 +32,8 @@ const se = {
32
32
  user: e.string().nullish(),
33
33
  memberid: e.string().nullish(),
34
34
  // roundToNearest: z.number().nullish(),
35
- nettTotal: _,
36
- adjustedTotal: _.optional(),
35
+ nettTotal: y,
36
+ adjustedTotal: y.optional(),
37
37
  // activeItems: z.array(z.string()),
38
38
  remark: e.string().nullish(),
39
39
  createdAt: e.coerce.date(),
@@ -41,18 +41,18 @@ const se = {
41
41
  refunded: e.boolean().nullish(),
42
42
  refundRecord: e.array(e.string()).nullish(),
43
43
  location: e.string(),
44
- channel: le.optional()
45
- }).transform((i) => ({
46
- ...i,
47
- createdTime: i.createdAt,
48
- completedTime: i.completedAt,
44
+ channel: Q.optional()
45
+ }).transform((a) => ({
46
+ ...a,
47
+ createdTime: a.createdAt,
48
+ completedTime: a.completedAt,
49
49
  get amount() {
50
- return i.nettTotal.amount / 10 ** i.nettTotal.precision;
50
+ return a.nettTotal.amount / 10 ** a.nettTotal.precision;
51
51
  },
52
52
  get adjustmentAmount() {
53
- return i.adjustedTotal ? i.adjustedTotal.amount / 10 ** i.adjustedTotal.precision : void 0;
53
+ return a.adjustedTotal ? a.adjustedTotal.amount / 10 ** a.adjustedTotal.precision : void 0;
54
54
  }
55
- })).describe(g.describe(se)), re = e.object({
55
+ })).describe(p.describe(ee)), te = e.object({
56
56
  _id: e.string(),
57
57
  rating: e.coerce.number(),
58
58
  user: e.string().optional(),
@@ -78,7 +78,7 @@ const se = {
78
78
  "REFERRAL_ADDED",
79
79
  "MEMBER_IMPORTED",
80
80
  "SEGMENTATION_IMPORTED"
81
- ]), Ze = o.extract([
81
+ ]), He = o.extract([
82
82
  "BILL_COMPLETED",
83
83
  "FEEDBACK",
84
84
  "GAME_COMPLETED",
@@ -91,64 +91,64 @@ const se = {
91
91
  ]);
92
92
  e.enum(["START_OF", "BEFORE"]);
93
93
  e.enum(["WEEK", "MONTH"]);
94
- const de = e.enum([
94
+ const ne = e.enum([
95
95
  "WAITING",
96
96
  "ACTIVE",
97
97
  "COMPLETED",
98
98
  "FAILED"
99
- ]), a = e.object({
99
+ ]), i = e.object({
100
100
  // type: F_EVENT_TYPE,
101
- rule: T.optional()
102
- }), ce = a.extend({
101
+ rule: F.optional()
102
+ }), oe = i.extend({
103
103
  type: e.literal(o.enum.BILL_COMPLETED)
104
- }), me = a.extend({
104
+ }), ie = i.extend({
105
105
  type: e.literal(o.enum.FEEDBACK)
106
- }), ue = a.extend({
106
+ }), ae = i.extend({
107
107
  type: e.literal(o.enum.SIMPLE_CLAIM)
108
108
  });
109
- a.extend({
109
+ i.extend({
110
110
  type: e.literal(o.enum.ENTER_SEGMENT),
111
111
  segment: e.string()
112
112
  });
113
- const pe = a.extend({
113
+ const le = i.extend({
114
114
  type: e.literal(o.enum.MEMBER_REWARD)
115
- }), Ee = a.extend({
115
+ }), se = i.extend({
116
116
  type: e.literal(o.enum.SCHEDULE)
117
117
  // option: FdoCronRule,
118
- }), ge = a.extend({
118
+ }), re = i.extend({
119
119
  type: e.literal(o.enum.MEMBERSHIP_JOINED)
120
- }), be = a.extend({
120
+ }), de = i.extend({
121
121
  type: e.literal(o.enum.TIER_UPGRADED)
122
- }), ye = a.extend({
122
+ }), ce = i.extend({
123
123
  type: e.literal(o.enum.MAKING_ORDER)
124
- }), Ce = a.extend({
124
+ }), me = i.extend({
125
125
  type: e.literal(o.enum.ISSUE_REWARD)
126
- }), Re = a.extend({
126
+ }), ue = i.extend({
127
127
  type: e.literal(o.enum.GAME_COMPLETED)
128
128
  });
129
- a.extend({
129
+ i.extend({
130
130
  type: e.literal(o.enum.REFERRAL_ADDED)
131
131
  });
132
- a.extend({
132
+ i.extend({
133
133
  type: e.literal(o.enum.MEMBER_IMPORTED)
134
134
  });
135
- const Ie = e.discriminatedUnion("type", [
136
- ue,
135
+ const Ee = e.discriminatedUnion("type", [
136
+ ae,
137
+ oe,
138
+ se,
139
+ ie,
140
+ re,
141
+ de,
137
142
  ce,
138
- Ee,
139
143
  me,
140
- ge,
141
- be,
142
- ye,
143
- Ce,
144
- pe,
145
- Re
144
+ le,
145
+ ue
146
146
  ]);
147
147
  e.object({
148
148
  _id: t,
149
149
  type: o,
150
150
  ref: e.string(),
151
- status: de.optional(),
151
+ status: ne.optional(),
152
152
  context: e.record(e.string(), e.any()).optional(),
153
153
  failedReason: e.any().optional()
154
154
  }).describe(JSON.stringify({ collectionName: "EventLogs" }));
@@ -159,24 +159,24 @@ const l = e.object({
159
159
  campaignIds: e.array(t).optional(),
160
160
  slackWebhookUrl: e.string().optional(),
161
161
  emittedAt: e.coerce.date().default(/* @__PURE__ */ new Date())
162
- }), _e = l.extend({
162
+ }), pe = l.extend({
163
163
  type: e.literal(o.enum.BILL_COMPLETED),
164
164
  context: e.object({
165
- bill: j,
165
+ bill: T,
166
166
  rawBill: e.any()
167
167
  })
168
- }), he = l.extend({
168
+ }), ge = l.extend({
169
169
  type: e.literal(o.enum.BILL_REFUNDED),
170
170
  context: e.object({
171
- bill: j,
171
+ bill: T,
172
172
  rawBill: e.any()
173
173
  })
174
- }), fe = l.extend({
174
+ }), be = l.extend({
175
175
  type: e.literal(o.enum.SCHEDULE),
176
176
  context: e.object({
177
177
  triggeredAt: e.coerce.date()
178
178
  })
179
- }), Fe = l.extend({
179
+ }), ye = l.extend({
180
180
  type: e.literal(o.enum.PAGINATE_SCHEDULE),
181
181
  context: e.object({
182
182
  triggeredAt: e.coerce.date(),
@@ -184,85 +184,84 @@ const l = e.object({
184
184
  skip: e.coerce.number(),
185
185
  limit: e.coerce.number()
186
186
  })
187
- }), De = l.extend({
187
+ }), Ce = l.extend({
188
188
  type: e.literal(o.enum.FEEDBACK),
189
189
  context: e.object({
190
- feedback: re
190
+ feedback: te
191
191
  })
192
- }), Ae = l.extend({
192
+ }), Re = l.extend({
193
193
  type: e.literal(o.enum.MEMBERSHIP_JOINED),
194
194
  context: e.object({
195
- user: P
195
+ user: M
196
196
  })
197
- }), Me = l.extend({
197
+ }), _e = l.extend({
198
198
  type: e.literal(o.enum.TIER_UPGRADED),
199
199
  context: e.object({
200
- transaction: S
200
+ transaction: A
201
201
  })
202
- }), Te = l.extend({
202
+ }), Ie = l.extend({
203
203
  type: e.literal(o.enum.ISSUE_REWARD),
204
204
  context: e.object({
205
- transaction: S,
206
- collection: ne
205
+ transaction: A,
206
+ collection: Z
207
207
  })
208
- }), Le = l.extend({
208
+ }), he = l.extend({
209
209
  type: e.literal(o.enum.REFERRAL_ADDED),
210
210
  context: e.object({
211
- user: P
211
+ user: M
212
212
  })
213
- }), N = e.object({
213
+ }), L = e.object({
214
214
  ref: t,
215
215
  originalName: e.string(),
216
216
  mimeType: e.string(),
217
217
  size: e.number(),
218
218
  fbFilePath: e.string(),
219
219
  isFbFileDeleted: e.boolean().nullish()
220
- }), Oe = e.object({
220
+ }), Fe = e.object({
221
221
  resetCollectionExpiryBalance: e.boolean().nullish()
222
- }), xe = l.extend({
222
+ }), De = l.extend({
223
223
  type: e.literal(o.enum.MEMBER_IMPORTED),
224
224
  context: e.object({
225
225
  business: e.string(),
226
- file: N,
227
- config: Oe.optional()
226
+ file: L,
227
+ config: Fe.optional()
228
228
  })
229
- }), Pe = l.extend({
229
+ }), fe = l.extend({
230
230
  type: e.literal(o.enum.SEGMENTATION_IMPORTED),
231
231
  context: e.object({
232
232
  business: e.string(),
233
233
  segment: e.string(),
234
- file: N
234
+ file: L
235
235
  })
236
236
  });
237
237
  e.discriminatedUnion("type", [
238
+ pe,
239
+ ge,
240
+ be,
241
+ Ce,
242
+ Re,
238
243
  _e,
244
+ Ie,
245
+ ye,
239
246
  he,
240
- fe,
241
247
  De,
242
- Ae,
243
- Me,
244
- Te,
245
- Fe,
246
- Le,
247
- xe,
248
- Pe
248
+ fe
249
249
  ]);
250
- const Se = {
250
+ const Me = {
251
251
  collectionName: "Locations",
252
252
  transform: {
253
253
  _id: "oid",
254
254
  business: "oid"
255
255
  }
256
- }, B = e.object({
256
+ }, O = e.object({
257
257
  _id: t,
258
258
  business: t,
259
259
  name: e.string(),
260
260
  code: e.string().nullish(),
261
261
  otp: e.string().nullish(),
262
262
  otpExpiredAt: e.coerce.date().nullish(),
263
- apiToken: e.string().nullish(),
264
- customAttribute: e.record(e.any()).nullish()
265
- }).describe(g.describe(Se));
263
+ apiToken: e.string().nullish()
264
+ }).describe(p.describe(Me));
266
265
  e.object({
267
266
  _id: t,
268
267
  name: e.string(),
@@ -270,7 +269,7 @@ e.object({
270
269
  os: e.string(),
271
270
  apiToken: e.string().nullish()
272
271
  }).describe(
273
- g.describe({
272
+ p.describe({
274
273
  collectionName: "LocationDevices",
275
274
  transform: {
276
275
  _id: "oid",
@@ -282,177 +281,76 @@ e.object({
282
281
  _id: e.string(),
283
282
  name: e.string()
284
283
  });
285
- const h = e.enum(["NO_REWARD", "VOUCHER", "LOYALTY"]), f = e.number().min(0, "Weight need to be at least 0"), F = e.number().int("Must be integer").min(0, "Threshold need to be at least 0"), G = e.object({
286
- type: e.literal(h.enum.NO_REWARD),
284
+ const C = e.enum(["NO_REWARD", "VOUCHER", "LOYALTY"]), R = e.number().min(0, "Weight need to be at least 0"), _ = e.number().int("Must be integer").min(0, "Threshold need to be at least 0"), P = e.object({
285
+ type: e.literal(C.enum.NO_REWARD),
287
286
  collectible: e.null(),
288
- weight: f
289
- }), U = e.object({
290
- type: e.literal(h.enum.VOUCHER),
287
+ weight: R
288
+ }), x = e.object({
289
+ type: e.literal(C.enum.VOUCHER),
291
290
  collectible: t,
292
- collectibleConfig: e.lazy(() => L._def.right.options[0]),
293
- earningOption: e.lazy(() => c)
294
- }), y = e.object({
295
- type: e.literal(h.enum.LOYALTY),
291
+ collectibleConfig: e.lazy(() => D._def.right.options[0]),
292
+ earningOption: e.lazy(() => d)
293
+ }), b = e.object({
294
+ type: e.literal(C.enum.LOYALTY),
296
295
  collectible: t,
297
- earningOption: e.lazy(() => c),
298
- validityOption: e.lazy(() => ee)
299
- }), w = U.extend({
300
- weight: f
301
- }), v = y.extend({
296
+ earningOption: e.lazy(() => d),
297
+ validityOption: e.lazy(() => J)
298
+ }), S = x.extend({
299
+ weight: R
300
+ }), N = b.extend({
302
301
  weight: e.number().min(0, "Weight need to be at least 0")
303
- }), Qe = y.extend({
304
- validityOption: O,
305
- weight: f
306
- }), je = e.discriminatedUnion("type", [
307
- w,
308
- v,
309
- G
310
- ]), D = e.discriminatedUnion("type", [
311
- w.extend({
302
+ }), We = b.extend({
303
+ validityOption: f,
304
+ weight: R
305
+ }), Ae = e.discriminatedUnion("type", [
306
+ S,
307
+ N,
308
+ P
309
+ ]), I = e.discriminatedUnion("type", [
310
+ S.extend({
312
311
  collectible: t.nullish(),
313
312
  business: t.nullish()
314
313
  }),
315
- v.extend({
314
+ N.extend({
316
315
  collectible: t.nullish(),
317
316
  business: t.nullish()
318
317
  }),
319
- G
320
- ]), z = U.extend({
321
- threshold: F
322
- }), H = y.extend({
323
- threshold: F
324
- }), $e = y.extend({
325
- validityOption: O,
326
- threshold: F
327
- }), k = e.discriminatedUnion("type", [
328
- z,
329
- H
330
- ]), Ne = e.discriminatedUnion("type", [
331
- z.extend({
318
+ P
319
+ ]), B = x.extend({
320
+ threshold: _
321
+ }), j = b.extend({
322
+ threshold: _
323
+ }), ke = b.extend({
324
+ validityOption: f,
325
+ threshold: _
326
+ }), U = e.discriminatedUnion("type", [
327
+ B,
328
+ j
329
+ ]), Te = e.discriminatedUnion("type", [
330
+ B.extend({
332
331
  collectible: t.nullish(),
333
332
  business: t.nullish()
334
333
  }),
335
- H.extend({
334
+ j.extend({
336
335
  collectible: t.nullish(),
337
- collectibleConfig: L.nullish(),
336
+ collectibleConfig: D.nullish(),
338
337
  business: t.nullish()
339
338
  })
340
- ]), Be = e.enum(["PROGRESSIVE", "STAMP"]), Ge = e.object({
341
- type: Be,
339
+ ]), Le = e.enum(["PROGRESSIVE", "STAMP"]), Oe = e.object({
340
+ type: Le,
342
341
  end: e.number().int().min(0, "Threshold need to be at least 1"),
343
- rewards: e.array(e.lazy(() => k)).nullish()
344
- }).superRefine((i, d) => {
345
- i.type == "STAMP" && i.end > 40 && (d.addIssue({
342
+ rewards: e.array(e.lazy(() => U)).nullish()
343
+ }).superRefine((a, m) => {
344
+ a.type == "STAMP" && a.end > 40 && (m.addIssue({
346
345
  code: "custom",
347
346
  path: [],
348
347
  message: "Stamp mission can have at most 40 threshold"
349
- }), d.addIssue({
348
+ }), m.addIssue({
350
349
  code: "custom",
351
350
  path: ["end"],
352
351
  message: "Stamp mission can have at most 40 threshold"
353
352
  }));
354
- }), C = e.object({
355
- totalCount: e.number().optional(),
356
- totalCountPerUser: e.number().optional()
357
- }), m = e.object({
358
- periods: e.array(
359
- e.object({
360
- startTime: e.string(),
361
- endTime: e.string()
362
- })
363
- )
364
- }), R = e.object({
365
- startTime: e.string(),
366
- // ISO 8601 date string
367
- endTime: e.string(),
368
- // ISO 8601 date string
369
- eaterType: e.enum(["all", "new", "existing"]),
370
- minBasketAmount: e.number().optional(),
371
- bundleQuantity: e.number().optional(),
372
- workingHour: e.object({
373
- mon: m.optional(),
374
- tue: m.optional(),
375
- wed: m.optional(),
376
- thu: m.optional(),
377
- fri: m.optional(),
378
- sat: m.optional(),
379
- sun: m.optional()
380
- }).optional()
381
- }), Ue = e.object({
382
- type: e.enum(["items", "category", "order"]),
383
- objectIDs: e.array(e.string()).optional()
384
- }), I = e.object({
385
- type: e.enum([
386
- "net",
387
- // dollar off
388
- "percentage",
389
- // percentage off
390
- "bundleSameFixPrice",
391
- // bundle fix price (same item)
392
- "bundleDiffFixPrice",
393
- // bundle fix price (different items)
394
- "bundleSameNet",
395
- // bundle dollar off (same item)
396
- "bundleDiffNet",
397
- // bundle dollar off (different items)
398
- "bundleSamePercentage",
399
- // bundle percentage off (same item)
400
- "bundleDiffPercentage",
401
- // bundle percentage off (different items)
402
- "delivery",
403
- // delivery fee off
404
- "freeItem"
405
- // free item
406
- ]),
407
- value: e.number(),
408
- cap: e.number().optional(),
409
- // for percentage off campaigns
410
- scope: Ue
411
- });
412
- e.object({
413
- merchantID: e.string().optional(),
414
- name: e.string().max(256),
415
- quotas: C.optional(),
416
- conditions: R,
417
- discount: I,
418
- customTag: e.string().max(22).optional()
419
- });
420
- e.object({
421
- id: e.string()
422
- });
423
- e.object({
424
- merchantID: e.string().optional(),
425
- name: e.string().max(256).optional(),
426
- quotas: C.optional(),
427
- conditions: R.optional(),
428
- discount: I.optional(),
429
- customTag: e.string().max(22).optional()
430
- });
431
- const A = e.object({
432
- id: e.string(),
433
- merchantID: e.string(),
434
- name: e.string(),
435
- quotas: C.optional(),
436
- conditions: R,
437
- discount: I,
438
- customTag: e.string().optional(),
439
- status: e.enum(["ongoing", "upcoming", "expired", "cancelled"]).optional(),
440
- createdAt: e.string().optional(),
441
- updatedAt: e.string().optional()
442
- });
443
- e.object({
444
- ongoing: e.array(A),
445
- upcoming: e.array(A)
446
- });
447
- e.object({
448
- merchantID: e.string()
449
- });
450
- e.object({
451
- target: e.string(),
452
- reason: e.string(),
453
- message: e.string()
454
- });
455
- const we = {
353
+ }), Pe = {
456
354
  collectionName: "Groups",
457
355
  transform: {
458
356
  _id: "oid",
@@ -470,34 +368,32 @@ const we = {
470
368
  foreignField: "group"
471
369
  }
472
370
  }
473
- }, Xe = e.object({
371
+ }, Ke = e.object({
474
372
  _id: t,
475
373
  name: e.string().min(1).max(300),
476
374
  business: t,
477
375
  pf_campaigns: e.array(e.any()).optional()
478
- }).describe(g.describe(we)), ve = e.object({
376
+ }).describe(p.describe(Pe)), xe = e.object({
479
377
  from: e.string().email().nullish(),
480
378
  name: e.string().min(1).max(50).nullish()
481
- }), ze = e.object({
379
+ }), Se = e.object({
482
380
  _id: e.string(),
483
381
  url: e.string(),
484
382
  targetLocation: e.array(t).nullish(),
485
383
  // null/empty = all locations
486
384
  order: e.number().optional()
487
- }), W = e.object({
488
- type: e.literal(M.enum.MEMBERSHIP),
385
+ }), G = e.object({
386
+ type: e.literal(h.enum.MEMBERSHIP),
489
387
  business: t,
490
388
  name: e.string().min(1).max(50),
491
389
  image: e.string().nullish(),
492
390
  url: e.string().nullish(),
493
- tiers: e.array(e.lazy(() => oe)),
391
+ tiers: e.array(e.lazy(() => $)),
494
392
  titles: e.array(t),
495
393
  tierCycleEnable: e.boolean().optional(),
496
- tierCycle: e.lazy(() => T).nullish(),
497
- tierRules: e.array(e.lazy(() => ie)).nullish(),
498
- migrated: e.boolean().optional(),
499
- welcomeMessage: p.optional(),
500
- advertisements: e.union([e.array(e.string()), e.array(ze)]).optional(),
394
+ tierCycle: e.lazy(() => F).nullish(),
395
+ welcomeMessage: u.optional(),
396
+ advertisements: e.union([e.array(e.string()), e.array(Se)]).optional(),
501
397
  cardEnable: e.boolean().optional(),
502
398
  autoRevertReward: e.boolean().optional(),
503
399
  design: e.array(
@@ -508,15 +404,18 @@ const we = {
508
404
  ).optional(),
509
405
  targetLocation: e.array(t).nullish(),
510
406
  brand: e.string().nullish(),
511
- email: ve.nullish(),
407
+ email: xe.nullish(),
512
408
  freeCreditAsDiscount: e.boolean().optional(),
513
- pf_title: e.array(e.lazy(() => u)).optional(),
514
- pf_targetLocation: e.array(e.lazy(() => B)).optional(),
515
- allowedPhoneCountries: e.union([e.array(e.string().regex(/^\+\d{1,4}$/)), e.null()]).optional(),
409
+ pf_title: e.array(e.lazy(() => c)).optional(),
410
+ pf_targetLocation: e.array(e.lazy(() => O)).optional(),
411
+ allowedPhoneCountries: e.union([
412
+ e.array(e.string().regex(/^\+\d{1,4}$/)),
413
+ e.null()
414
+ ]).optional(),
516
415
  // new structure
517
416
  group: e.string().nullish(),
518
417
  templateId: t.nullish()
519
- }), n = M.exclude(["MEMBERSHIP"]), s = e.object({
418
+ }), n = h.exclude(["MEMBERSHIP"]), s = e.object({
520
419
  _id: t.nullish(),
521
420
  type: n,
522
421
  // common information
@@ -524,8 +423,8 @@ const we = {
524
423
  name: e.string().min(1).max(50),
525
424
  image: e.string().nullish(),
526
425
  description: e.string().max(500).nullish(),
527
- timeframeOptions: x.superRefine((i, d) => {
528
- i.start && i.end && i.end < i.start && d.addIssue({
426
+ timeframeOptions: Y.superRefine((a, m) => {
427
+ a.start && a.end && a.end < a.start && m.addIssue({
529
428
  code: "custom",
530
429
  path: [],
531
430
  params: {
@@ -534,13 +433,13 @@ const we = {
534
433
  });
535
434
  }).nullish(),
536
435
  targetLocation: e.array(t).nullish(),
537
- event: Ie,
538
- config: te.nullish(),
436
+ event: Ee,
437
+ config: q.nullish(),
539
438
  currentReceive: e.coerce.number().optional(),
540
439
  // new group structure
541
440
  group: t.nullish(),
542
441
  templateId: t.nullish(),
543
- pf_targetLocation: e.array(e.lazy(() => B)).optional(),
442
+ pf_targetLocation: e.array(e.lazy(() => O)).optional(),
544
443
  deletedAt: e.coerce.date().optional()
545
444
  }), r = {
546
445
  [n.enum.VOUCHER]: [
@@ -552,7 +451,6 @@ const we = {
552
451
  "SIMPLE_CLAIM"
553
452
  ],
554
453
  [n.enum.PROMOTION]: ["MAKING_ORDER"],
555
- [n.enum.GRAB]: ["MAKING_ORDER"],
556
454
  [n.enum.POINT]: [
557
455
  "BILL_COMPLETED",
558
456
  "FEEDBACK",
@@ -593,40 +491,40 @@ const we = {
593
491
  "FEEDBACK",
594
492
  "SCHEDULE"
595
493
  ]
596
- }, K = s.extend({
494
+ }, w = s.extend({
597
495
  type: e.literal(n.enum.VOUCHER),
598
496
  // event
599
497
  code: e.string().min(0).max(15).regex(/^[A-Za-z0-9\-_.@]*$/, {
600
498
  message: "Code can only contain letters, numbers, and - _ . @"
601
499
  }).optional(),
602
- event: a.merge(
500
+ event: i.merge(
603
501
  e.object({
604
502
  type: e.enum(r[n.enum.VOUCHER])
605
503
  })
606
504
  ),
607
- earningOption: c.default({
505
+ earningOption: d.default({
608
506
  amount: 1,
609
507
  type: "FIXED"
610
508
  }),
611
509
  collectible: t,
612
510
  hideInApp: e.boolean().optional(),
613
511
  notify: e.boolean().optional(),
614
- notifyMessage: e.lazy(() => p).optional(),
512
+ notifyMessage: e.lazy(() => u).optional(),
615
513
  notifyCampaign: t.nullish(),
616
- pf_collectible: e.lazy(() => u).optional(),
514
+ pf_collectible: e.lazy(() => c).optional(),
617
515
  pf_notifyCampaign: e.lazy(() => E).optional()
618
- }), He = e.object({
516
+ }), Ne = e.object({
619
517
  gameType: e.string()
620
- }), V = s.extend({
518
+ }), v = s.extend({
621
519
  type: e.literal(n.enum.PROMOTION),
622
520
  // event
623
- event: a.merge(
521
+ event: i.merge(
624
522
  e.object({
625
523
  type: e.enum(r[n.enum.PROMOTION])
626
524
  })
627
525
  ),
628
- effect: e.custom().superRefine((i, d) => {
629
- i || d.addIssue({
526
+ effect: e.custom().superRefine((a, m) => {
527
+ a || m.addIssue({
630
528
  code: "custom",
631
529
  path: [],
632
530
  params: {
@@ -634,41 +532,41 @@ const we = {
634
532
  }
635
533
  });
636
534
  }),
637
- gameConfig: He.nullish()
638
- }), q = s.extend({
535
+ gameConfig: Ne.nullish()
536
+ }), z = s.extend({
639
537
  type: e.literal(n.enum.POINT),
640
538
  // event
641
- event: a.merge(
539
+ event: i.merge(
642
540
  e.object({
643
541
  type: e.enum(r[n.enum.POINT])
644
542
  })
645
543
  ),
646
- earningOption: c,
544
+ earningOption: d,
647
545
  collectible: t,
648
546
  notify: e.boolean().optional(),
649
- notifyMessage: e.lazy(() => p).optional(),
547
+ notifyMessage: e.lazy(() => u).optional(),
650
548
  notifyCampaign: t.nullish(),
651
- pf_collectible: e.lazy(() => u).optional(),
549
+ pf_collectible: e.lazy(() => c).optional(),
652
550
  pf_notifyCampaign: e.lazy(() => E).optional()
653
- }), J = s.extend({
551
+ }), H = s.extend({
654
552
  type: e.literal(n.enum.CREDIT),
655
553
  // event
656
- event: a.merge(
554
+ event: i.merge(
657
555
  e.object({
658
556
  type: e.enum(r[n.enum.CREDIT])
659
557
  })
660
558
  ),
661
- earningOption: c,
559
+ earningOption: d,
662
560
  collectible: t,
663
561
  notify: e.boolean().optional(),
664
- notifyMessage: e.lazy(() => p).optional(),
562
+ notifyMessage: e.lazy(() => u).optional(),
665
563
  notifyCampaign: t.nullish(),
666
- pf_collectible: e.lazy(() => u).optional(),
564
+ pf_collectible: e.lazy(() => c).optional(),
667
565
  pf_notifyCampaign: e.lazy(() => E).optional()
668
566
  }), E = s.extend({
669
567
  type: e.literal(n.enum.BROADCAST),
670
568
  // event
671
- event: a.merge(
569
+ event: i.merge(
672
570
  e.object({
673
571
  type: e.enum(r[n.enum.BROADCAST])
674
572
  })
@@ -678,99 +576,59 @@ const we = {
678
576
  // path, which never reads `message`; it is still mirrored when a routable
679
577
  // channel exists (see toLegacyMessage) so an older reader degrades to
680
578
  // sending one real message rather than nothing.
681
- message: p.nullish(),
682
- delivery: e.lazy(() => ae).nullish(),
579
+ message: u.nullish(),
580
+ delivery: e.lazy(() => X).nullish(),
683
581
  linkedCampaign: t.nullish()
684
- }), Y = s.extend({
582
+ }), W = s.extend({
685
583
  type: e.literal(n.enum.COIN),
686
584
  // event
687
- event: a.merge(
585
+ event: i.merge(
688
586
  e.object({
689
587
  type: e.enum(r[n.enum.COIN])
690
588
  })
691
589
  ),
692
- earningOption: c,
590
+ earningOption: d,
693
591
  collectible: t,
694
592
  notify: e.boolean().optional(),
695
- notifyMessage: e.lazy(() => p).optional(),
593
+ notifyMessage: e.lazy(() => u).optional(),
696
594
  notifyCampaign: t.nullish(),
697
- pf_collectible: e.lazy(() => u).optional(),
595
+ pf_collectible: e.lazy(() => c).optional(),
698
596
  pf_notifyCampaign: e.lazy(() => E).optional()
699
- }), b = s.extend({
597
+ }), g = s.extend({
700
598
  type: e.literal(n.enum.REWARD_POOL),
701
599
  // event
702
- event: a.merge(
600
+ event: i.merge(
703
601
  e.object({
704
602
  type: e.enum(r[n.enum.REWARD_POOL])
705
603
  })
706
604
  ),
707
- rewards: e.array(e.lazy(() => je)).min(1, "Requires at least 1 reward")
708
- }), Z = s.extend({
605
+ rewards: e.array(e.lazy(() => Ae)).min(1, "Requires at least 1 reward")
606
+ }), k = s.extend({
709
607
  type: e.literal(n.enum.GAME),
710
608
  // event
711
- event: a.merge(
609
+ event: i.merge(
712
610
  e.object({
713
611
  type: e.enum(r[n.enum.GAME])
714
612
  })
715
613
  ),
716
- earningOption: c,
614
+ earningOption: d,
717
615
  collectible: t,
718
- game: e.lazy(() => b).optional(),
719
- pf_collectible: e.lazy(() => u).optional(),
616
+ game: e.lazy(() => g).optional(),
617
+ pf_collectible: e.lazy(() => c).optional(),
720
618
  rewardPool: t.optional()
721
- }), Q = s.extend({
619
+ }), K = s.extend({
722
620
  type: e.literal(n.enum.MISSION),
723
- event: a.merge(
621
+ event: i.merge(
724
622
  e.object({
725
623
  type: e.enum(r[n.enum.MISSION])
726
624
  })
727
625
  ),
728
- earningOption: c,
626
+ earningOption: d,
729
627
  collectible: t,
730
- pf_collectible: e.lazy(() => u).optional(),
731
- mission: e.lazy(() => Ge),
732
- rewards: e.array(e.lazy(() => k)).min(1, "Requires at least 1 reward")
733
- }), $ = s.omit({
734
- timeframeOptions: !0
735
- }).extend({
736
- type: e.literal(n.enum.GRAB),
737
- event: a.merge(
738
- e.object({
739
- type: e.enum(r[n.enum.GRAB])
740
- })
741
- ),
742
- business: t,
743
- name: e.string().min(1).max(50),
744
- targetLocation: e.array(t).nullish(),
745
- group: e.string().nullish(),
746
- templateId: t.nullish(),
747
- // Grab specific fields
748
- conditions: R,
749
- quotas: C,
750
- discount: I,
751
- grabCampaignMeta: e.array(
752
- e.object({
753
- locationId: e.string(),
754
- campaignId: e.string()
755
- })
756
- ).optional(),
757
- // Make timeframeOptions required (remove .nullish() from parent)
758
- timeframeOptions: x.superRefine((i, d) => {
759
- (!i.start || !i.end) && d.addIssue({
760
- code: "custom",
761
- path: [],
762
- params: {
763
- i18n: { key: "timeframe.required" }
764
- }
765
- }), i.start && i.end && i.end < i.start && d.addIssue({
766
- code: "custom",
767
- path: [],
768
- params: {
769
- i18n: { key: "timeframe.end_before_start" }
770
- }
771
- });
772
- })
773
- }), ke = {
628
+ pf_collectible: e.lazy(() => c).optional(),
629
+ mission: e.lazy(() => Oe),
630
+ rewards: e.array(e.lazy(() => U)).min(1, "Requires at least 1 reward")
631
+ }), Be = {
774
632
  collectionName: "Campaigns",
775
633
  transform: {
776
634
  _id: "oid",
@@ -812,58 +670,54 @@ const we = {
812
670
  as: "game"
813
671
  }
814
672
  }
815
- }, et = e.object({ _id: t }).and(
673
+ }, Ve = e.object({ _id: t }).and(
816
674
  e.discriminatedUnion("type", [
817
- W,
818
- K,
819
- V,
820
- q,
821
- J,
675
+ G,
676
+ w,
677
+ v,
678
+ z,
679
+ H,
822
680
  E,
823
- Y,
824
- b,
825
- Z,
826
- Q,
827
- $
681
+ W,
682
+ g,
683
+ k,
684
+ K
828
685
  ])
829
- ).describe(g.describe(ke)), tt = e.discriminatedUnion("type", [
830
- K.extend({
686
+ ).describe(p.describe(Be)), Je = e.discriminatedUnion("type", [
687
+ w.extend({
831
688
  business: t.nullish()
832
689
  }),
833
- V.extend({
690
+ v.extend({
834
691
  business: t.nullish()
835
692
  }),
836
- q.extend({
693
+ z.extend({
837
694
  business: t.nullish()
838
695
  }),
839
- J.extend({
696
+ H.extend({
840
697
  business: t.nullish()
841
698
  }),
842
699
  E.extend({
843
700
  business: t.nullish()
844
701
  }),
845
- Y.extend({
702
+ W.extend({
846
703
  business: t.nullish()
847
704
  }),
848
- b.extend({
849
- rewards: e.array(e.lazy(() => D)).min(1, "Requires at least 1 reward")
705
+ g.extend({
706
+ rewards: e.array(e.lazy(() => I)).min(1, "Requires at least 1 reward")
850
707
  }),
851
- Z.extend({
708
+ k.extend({
852
709
  business: t.nullish(),
853
- game: b.extend({
710
+ game: g.extend({
854
711
  business: t.nullish(),
855
- rewards: e.array(e.lazy(() => D)).min(1, "Requires at least 1 reward")
712
+ rewards: e.array(e.lazy(() => I)).min(1, "Requires at least 1 reward")
856
713
  })
857
714
  }),
858
- Q.extend({
715
+ K.extend({
859
716
  business: t.nullish(),
860
- rewards: e.array(e.lazy(() => Ne)).min(1, "Requires at least 1 reward")
861
- }),
862
- $.extend({
863
- business: t.nullish()
717
+ rewards: e.array(e.lazy(() => Te)).min(1, "Requires at least 1 reward")
864
718
  })
865
719
  ]);
866
- W.pick({
720
+ G.pick({
867
721
  business: !0,
868
722
  name: !0,
869
723
  image: !0,
@@ -871,7 +725,7 @@ W.pick({
871
725
  tiers: !0,
872
726
  // titles: true,
873
727
  cardEnable: !0,
874
- // design: true,
728
+ design: !0,
875
729
  targetLocation: !0,
876
730
  brand: !0,
877
731
  email: !0,
@@ -880,23 +734,23 @@ W.pick({
880
734
  pf_title: !0,
881
735
  pf_targetLocation: !0
882
736
  }).extend({
883
- allowedPhoneCountryDetails: e.array(X).nullish()
737
+ allowedPhoneCountryDetails: e.array(V).nullish()
884
738
  });
885
739
  export {
886
740
  r as C,
887
741
  n as F,
888
742
  o as a,
889
- et as b,
890
- Ie as c,
891
- Xe as d,
892
- tt as e,
893
- Qe as f,
894
- D as g,
895
- Be as h,
896
- $e as i,
897
- Ne as j,
898
- Ge as k,
899
- Ze as l,
900
- W as m,
901
- de as n
743
+ Ve as b,
744
+ He as c,
745
+ Ee as d,
746
+ Ke as e,
747
+ Je as f,
748
+ We as g,
749
+ I as h,
750
+ Le as i,
751
+ ke as j,
752
+ Te as k,
753
+ Oe as l,
754
+ G as m,
755
+ ne as n
902
756
  };