@feedmepos/mf-connect 0.1.126-dev → 0.1.127-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.
- package/dist/{App-B_Yp6cvN.js → App-BMF6m0GU.js} +216 -224
- package/dist/{Bin-CmIpEIwe.js → Bin-Dkn-CjZE.js} +8 -8
- package/dist/{Broadcast-DkV4BdU_.js → Broadcast-DqaP4ON2.js} +21 -22
- package/dist/{CampaignAnalytic-Dkwo_lpB.js → CampaignAnalytic-2Iuxh8-x.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Ch8Gblw6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C8MlNehK.js} +9 -8
- package/dist/{Card-DXCkG34M.js → Card-Cv9eldq8.js} +22 -22
- package/dist/{Collections-CybPfSO4.js → Collections-CK-hxHpa.js} +185 -197
- package/dist/{Credit-B-KUzWsX.js → Credit-CDE4ACVm.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CWHYeYVD.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CTvIDOWy.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DUJKivXA.js +3638 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-nMcH6y5e.js → EffectSheet.vue_vue_type_style_index_0_lang-CuPhm1uG.js} +33 -33
- package/dist/{Experience-Q2NHpa-V.js → Experience-lLK_RR69.js} +31 -32
- package/dist/{FileSaver.min-CKw2rn-J.js → FileSaver.min-zDxJKfBO.js} +1 -1
- package/dist/{Game-lZvkg04z.js → Game-DCdfJkil.js} +18 -19
- package/dist/{GiftCardSetup-CPRju80_.js → GiftCardSetup-DfF1OpFk.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Ci686UoB.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-Dbx9bwJM.js} +7 -7
- package/dist/{Goals-asGsUeVv.js → Goals-t0wbcWxG.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-nk87zPWH.js → ImageInput.vue_vue_type_script_setup_true_lang-Bur6iCYa.js} +1 -1
- package/dist/{Index-DIasPS4Y.js → Index-BUF8U-h8.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DkOn8p1v.js → LocationPicker.vue_vue_type_script_setup_true_lang-kIOc-Px5.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BdSkxiP-.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DRmLpXsg.js} +1 -1
- package/dist/{LoyaltyDashboard-DlCsZ3YX.js → LoyaltyDashboard-8laUXBGQ.js} +15 -15
- package/dist/{MainLayout-DLObnTAA.js → MainLayout-BeuKKVNP.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DigSZKt1.js → MainLayout.vue_vue_type_script_setup_true_lang-C7E3h_Zr.js} +3 -3
- package/dist/{Marketing-JflPW-w9.js → Marketing-DZG0oIs-.js} +4 -4
- package/dist/{MarketingMaterialEdit-fSAB3YVb.js → MarketingMaterialEdit--RDayaUN.js} +211 -214
- package/dist/{Member-CzNahXTj.js → Member-DeEQr2ef.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-bqWUIbMG.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dmf4WtSt.js} +47 -39
- package/dist/{MemberImportHistory--r_A_2Es.js → MemberImportHistory-DMXVl1qI.js} +7 -7
- package/dist/{MemberList-CQZQ4sN8.js → MemberList-zqeFDkEZ.js} +105 -103
- package/dist/{MemberTransactions-BPg9JaUA.js → MemberTransactions-BBQPNfFG.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BhIFChx-.js → MessageInput.vue_vue_type_script_setup_true_lang-C_8yL5GL.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CdGSNqEp.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-9r-eGARm.js} +1 -1
- package/dist/{Mission-CYCB3YQc.js → Mission-TO8w3ucB.js} +21 -22
- package/dist/{Overview-DuNuUYYq.js → Overview-CPUpEzPd.js} +20 -20
- package/dist/{Overview-B5ylMBHT.js → Overview-D6YBYVxK.js} +144 -145
- package/dist/{Point-DG-Uwj25.js → Point-BSq4CRcb.js} +21 -22
- package/dist/{Promotion-DqxBQ1yO.js → Promotion-DgPNNfk7.js} +131 -137
- package/dist/{Queue-Cy8LGt_Y.js → Queue-CYyabVYT.js} +45 -45
- package/dist/{Record-CzXbu41w.js → Record-n7s29IZH.js} +9 -9
- package/dist/{Review-7VL6gIqp.js → Review-DIYulCVl.js} +2 -2
- package/dist/ReviewFacebookCallback-D07x5BnV.js +238 -0
- package/dist/{ReviewGoogleCallback-1JXR_f5O.js → ReviewGoogleCallback-CnESXIH-.js} +5 -5
- package/dist/{Reward-BKhUDEu3.js → Reward-D_L2DgT9.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DjjCytWF.js → RewardGroup.vue_vue_type_script_setup_true_lang-Dsk2VqB8.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BjyiiTSY.js +1884 -0
- package/dist/{Segment-DdHDJhaS.js → Segment-BbGE6AOZ.js} +306 -303
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-9kGUkHMi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-xrdOyWX8.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DeFw0px7.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CTsORsDg.js} +4 -4
- package/dist/{Setting-DZKGXw-i.js → Setting-B9i2ufr7.js} +17 -17
- package/dist/{SettingAdvertisements-BBNs8tCw.js → SettingAdvertisements-Cuczz1wK.js} +12 -12
- package/dist/Settings-CCSXjpUC.js +179 -0
- package/dist/{Store-C8IlE4IH.js → Store-CoxREXJ-.js} +28 -28
- package/dist/{StoreRewards-DWygRLR1.js → StoreRewards-CzkznvA1.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CeYYws6P.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BtwDM2Fr.js} +24 -24
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-tSfwcDBG.js +142 -0
- package/dist/{Tier-7RoxGHsP.js → Tier-DyOlzjE0.js} +687 -2582
- package/dist/{Title-0q2Z4HIe.js → Title-C3__B-bw.js} +94 -95
- package/dist/{Transaction-CFasERdg.js → Transaction-B_v-lbed.js} +2 -2
- package/dist/{Upselling-DM9R6pYw.js → Upselling-D_5nBzIN.js} +3 -3
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BDjwcgnc.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CE5eo992.js} +26 -26
- package/dist/{Voucher-BkzW2hVV.js → Voucher-KxXwge4O.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DaE4xa3x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-nbLXmJ5Q.js} +12 -12
- package/dist/{WhatsappAccount-C3WpDF9O.js → WhatsappAccount-C8kinTmg.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BxC_3h52.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-ydBfMtzM.js} +1 -1
- package/dist/{WhatsappBot-DZb-Dn3s.js → WhatsappBot-BuD45ou8.js} +6 -6
- package/dist/{WhatsappBotLogs--KskC32Z.js → WhatsappBotLogs-Dm0HJh_f.js} +6 -6
- package/dist/{WhatsappBotSettings-Dns_PqVE.js → WhatsappBotSettings-BNZcj26j.js} +4 -4
- package/dist/{WhatsappLayout-NIrFGbId.js → WhatsappLayout-BvBN7H-y.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BfD5hHc7.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BzKwTs9R.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CJGxy7gf.js → ZodTextField.vue_vue_type_script_setup_true_lang-BY8t6jtW.js} +2 -2
- package/dist/{app-B9nLnoBt.js → app-uud8OgB9.js} +3381 -4129
- package/dist/app.js +3 -4
- package/dist/{base.export-CBzNea0v.js → base.export-Bfxt84QY.js} +2 -2
- package/dist/{business-aT2zslwu.js → business-77FEeeil.js} +1 -1
- package/dist/{campaign-BDCLKFwN.js → campaign-6WrFDF05.js} +25 -31
- package/dist/{campaign-B6nTwt17.js → campaign-CWyU-r8u.js} +113 -126
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/campaign.fn-Ci_av9lZ.js +776 -0
- package/dist/{collection.fn-CDna_VLD.js → collection.fn-CO-YhhUM.js} +2 -2
- package/dist/{currency-Baum67Wz.js → currency-kWhKZnhN.js} +1 -1
- package/dist/{effect-CeJbflOK.js → effect-CjSyUbur.js} +1 -1
- package/dist/{email-addresses-Y3vF73J0.js → email-addresses-C_yrJd12.js} +2 -2
- package/dist/{feature-flag-zn6Ql9tv.js → feature-flag-DcM82jeJ.js} +84 -84
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-DZvnn-yx.js → helper-G8MwkrFo.js} +1 -1
- package/dist/{index-DJIt5tXC.js → index-3axft-Vz.js} +7 -7
- package/dist/{index-CDRTiAEu.js → index-6Ey495tl.js} +1 -1
- package/dist/{index-r_T5o_hF.js → index-BNjHmUyd.js} +2 -2
- package/dist/{index-DXKJsqgW.js → index-BXSokNlS.js} +1 -1
- package/dist/{index-B5H4znfe.js → index-Ba4Q_XWF.js} +4 -4
- package/dist/{index-BL2zQnXK.js → index-BqHB3euS.js} +3 -3
- package/dist/{index-juXxYQ_a.js → index-CVVLKJj_.js} +1242 -1314
- package/dist/{index-DCR1GFCA.js → index-CiFPNxgn.js} +234 -380
- package/dist/{index-BqniSMV6.js → index-Cj85mCmr.js} +197 -197
- package/dist/{index-CMs3aIA6.js → index-CqvjZF-j.js} +6 -19
- package/dist/{index-B20FfbEE.js → index-CxyO5j1a.js} +1 -1
- package/dist/{index-FgM7b2Sw.js → index-DGrPvdRc.js} +2 -2
- package/dist/{index-CPi3Qwmj.js → index-DgT4P2_R.js} +2613 -2699
- package/dist/{index-Da0-7h2j.js → index-Dkud56R0.js} +1 -1
- package/dist/{index-DHNhIloU.js → index-Dv5Ja20d.js} +1 -1
- package/dist/{index-BYUEPfbP.js → index-L_2hhvso.js} +23 -23
- package/dist/{index-DXyOBtgF.js → index-RtamQHhy.js} +1 -1
- package/dist/{index-B22ojkMy.js → index-h2p2DjKy.js} +2 -2
- package/dist/{index-DkBOM8za.js → index-ivVytFih.js} +251 -608
- package/dist/{index-njg4JLa-.js → index-sPf1Rhez.js} +8 -8
- package/dist/{index.esm2017-Dtk7BscN.js → index.esm2017-DiUbRDfz.js} +57 -57
- package/dist/{loading-PoODMkQD.js → loading-BdpH3z-q.js} +1 -1
- package/dist/{lodash-TthNgH98.js → lodash-DcC4G06s.js} +1 -1
- package/dist/{member-import-D7zs0Jvh.js → member-import-C99OxU-w.js} +1 -1
- package/dist/{membership-Cab-iWQ1.js → membership-O5EN0QMl.js} +2 -2
- package/dist/{money-9Q306M3g.js → money-CYS7zoiT.js} +1 -1
- package/dist/{number-D9M3D435.js → number-D_C66osx.js} +1 -1
- package/dist/objectid-Dd0NRad7.js +145 -0
- package/dist/{onboarding-D5LKUHVI.js → onboarding-DGx34lkW.js} +25 -25
- package/dist/{onboardingSetup-D0jsS6w5.js → onboardingSetup-ALOoxDHE.js} +2 -2
- package/dist/{plugins-CDTKQ1Pg.js → plugins-CVh8eTG-.js} +3 -3
- package/dist/{reward-De3e9vYS.js → reward-8sP3d8ie.js} +1 -1
- package/dist/{rule-trVJgEOe.js → rule-BGMBiCRZ.js} +492 -572
- package/dist/rule-builder-DcPK2oqo.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-Bku-aSPA.js +275 -0
- package/dist/{timezone-DkuByUmb.js → timezone-DML8BuIK.js} +1 -1
- package/dist/{transaction.fn-CPE-oQhA.js → transaction.fn-Dmla3R1q.js} +2 -2
- package/dist/{trigger-C6oM-8pe.js → trigger-CArDddXr.js} +9 -9
- package/dist/{useMarketingMaterialActions-C5scdJQp.js → useMarketingMaterialActions-BX5Ynq8O.js} +4 -4
- package/dist/{usePagination-CIuTHSSG.js → usePagination-BdgLVPuo.js} +1 -1
- package/dist/{user-Bdlgn2yo.js → user-BgTKHjea.js} +1 -1
- package/dist/vue-i18n-DMEbesBm.js +2365 -0
- package/dist/{xlsx-CvecxUOG.js → xlsx-WIRNQZAx.js} +166 -166
- package/dist/{zod-bniyeWdY.js → zod-Dh_CVWJN.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-C1U17evK.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C86llTFR.js +0 -4439
- package/dist/Grab-BjFLSMpE.js +0 -301
- package/dist/ReviewFacebookCallback-BwzuPmrz.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Vg7pRGIz.js +0 -1923
- package/dist/Settings-9v0hnBJZ.js +0 -286
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BiN3uRJ_.js +0 -7007
- package/dist/campaign.fn-Ck1t5C1T.js +0 -776
- package/dist/duplicateCampaign-BwrMZgaV.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-DKvQl6FD.js +0 -145
- package/dist/template-Bj3Tb6bP.js +0 -227
- package/dist/vue-i18n-DEpDI-dt.js +0 -2365
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { z as e } from "./index-C_H8jFYf.js";
|
|
2
|
-
import { F as t, b as
|
|
3
|
-
import { F as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as
|
|
2
|
+
import { F as t, b as y, m as p, d as V } from "./index-BqHB3euS.js";
|
|
3
|
+
import { F as h } from "./campaign.enum-BqekIiiN.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-DgT4P2_R.js";
|
|
5
|
+
import { j as M, k as A, l as Z, m as $ } from "./index-CVVLKJj_.js";
|
|
6
|
+
import { c as u, d as X } from "./index-Cj85mCmr.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
|
|
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
|
|
24
|
+
const ee = {
|
|
25
25
|
collectionName: "Bills"
|
|
26
|
-
},
|
|
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:
|
|
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:
|
|
45
|
-
}).transform((
|
|
46
|
-
...
|
|
47
|
-
createdTime:
|
|
48
|
-
completedTime:
|
|
44
|
+
channel: Q.optional()
|
|
45
|
+
}).transform((a) => ({
|
|
46
|
+
...a,
|
|
47
|
+
createdTime: a.createdAt,
|
|
48
|
+
completedTime: a.completedAt,
|
|
49
49
|
get amount() {
|
|
50
|
-
return
|
|
50
|
+
return a.nettTotal.amount / 10 ** a.nettTotal.precision;
|
|
51
51
|
},
|
|
52
52
|
get adjustmentAmount() {
|
|
53
|
-
return
|
|
53
|
+
return a.adjustedTotal ? a.adjustedTotal.amount / 10 ** a.adjustedTotal.precision : void 0;
|
|
54
54
|
}
|
|
55
|
-
})).describe(
|
|
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
|
-
]),
|
|
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
|
|
94
|
+
const ne = e.enum([
|
|
95
95
|
"WAITING",
|
|
96
96
|
"ACTIVE",
|
|
97
97
|
"COMPLETED",
|
|
98
98
|
"FAILED"
|
|
99
|
-
]),
|
|
99
|
+
]), i = e.object({
|
|
100
100
|
// type: F_EVENT_TYPE,
|
|
101
|
-
rule:
|
|
102
|
-
}),
|
|
101
|
+
rule: F.optional()
|
|
102
|
+
}), oe = i.extend({
|
|
103
103
|
type: e.literal(o.enum.BILL_COMPLETED)
|
|
104
|
-
}),
|
|
104
|
+
}), ie = i.extend({
|
|
105
105
|
type: e.literal(o.enum.FEEDBACK)
|
|
106
|
-
}),
|
|
106
|
+
}), ae = i.extend({
|
|
107
107
|
type: e.literal(o.enum.SIMPLE_CLAIM)
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
i.extend({
|
|
110
110
|
type: e.literal(o.enum.ENTER_SEGMENT),
|
|
111
111
|
segment: e.string()
|
|
112
112
|
});
|
|
113
|
-
const
|
|
113
|
+
const le = i.extend({
|
|
114
114
|
type: e.literal(o.enum.MEMBER_REWARD)
|
|
115
|
-
}),
|
|
115
|
+
}), se = i.extend({
|
|
116
116
|
type: e.literal(o.enum.SCHEDULE)
|
|
117
117
|
// option: FdoCronRule,
|
|
118
|
-
}),
|
|
118
|
+
}), re = i.extend({
|
|
119
119
|
type: e.literal(o.enum.MEMBERSHIP_JOINED)
|
|
120
|
-
}),
|
|
120
|
+
}), de = i.extend({
|
|
121
121
|
type: e.literal(o.enum.TIER_UPGRADED)
|
|
122
|
-
}),
|
|
122
|
+
}), ce = i.extend({
|
|
123
123
|
type: e.literal(o.enum.MAKING_ORDER)
|
|
124
|
-
}),
|
|
124
|
+
}), me = i.extend({
|
|
125
125
|
type: e.literal(o.enum.ISSUE_REWARD)
|
|
126
|
-
}),
|
|
126
|
+
}), ue = i.extend({
|
|
127
127
|
type: e.literal(o.enum.GAME_COMPLETED)
|
|
128
128
|
});
|
|
129
|
-
|
|
129
|
+
i.extend({
|
|
130
130
|
type: e.literal(o.enum.REFERRAL_ADDED)
|
|
131
131
|
});
|
|
132
|
-
|
|
132
|
+
i.extend({
|
|
133
133
|
type: e.literal(o.enum.MEMBER_IMPORTED)
|
|
134
134
|
});
|
|
135
|
-
const
|
|
136
|
-
|
|
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
|
-
|
|
141
|
-
|
|
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:
|
|
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
|
-
}),
|
|
162
|
+
}), pe = l.extend({
|
|
163
163
|
type: e.literal(o.enum.BILL_COMPLETED),
|
|
164
164
|
context: e.object({
|
|
165
|
-
bill:
|
|
165
|
+
bill: T,
|
|
166
166
|
rawBill: e.any()
|
|
167
167
|
})
|
|
168
|
-
}),
|
|
168
|
+
}), ge = l.extend({
|
|
169
169
|
type: e.literal(o.enum.BILL_REFUNDED),
|
|
170
170
|
context: e.object({
|
|
171
|
-
bill:
|
|
171
|
+
bill: T,
|
|
172
172
|
rawBill: e.any()
|
|
173
173
|
})
|
|
174
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
187
|
+
}), Ce = l.extend({
|
|
188
188
|
type: e.literal(o.enum.FEEDBACK),
|
|
189
189
|
context: e.object({
|
|
190
|
-
feedback:
|
|
190
|
+
feedback: te
|
|
191
191
|
})
|
|
192
|
-
}),
|
|
192
|
+
}), Re = l.extend({
|
|
193
193
|
type: e.literal(o.enum.MEMBERSHIP_JOINED),
|
|
194
194
|
context: e.object({
|
|
195
|
-
user:
|
|
195
|
+
user: M
|
|
196
196
|
})
|
|
197
|
-
}),
|
|
197
|
+
}), _e = l.extend({
|
|
198
198
|
type: e.literal(o.enum.TIER_UPGRADED),
|
|
199
199
|
context: e.object({
|
|
200
|
-
transaction:
|
|
200
|
+
transaction: A
|
|
201
201
|
})
|
|
202
|
-
}),
|
|
202
|
+
}), Ie = l.extend({
|
|
203
203
|
type: e.literal(o.enum.ISSUE_REWARD),
|
|
204
204
|
context: e.object({
|
|
205
|
-
transaction:
|
|
206
|
-
collection:
|
|
205
|
+
transaction: A,
|
|
206
|
+
collection: Z
|
|
207
207
|
})
|
|
208
|
-
}),
|
|
208
|
+
}), he = l.extend({
|
|
209
209
|
type: e.literal(o.enum.REFERRAL_ADDED),
|
|
210
210
|
context: e.object({
|
|
211
|
-
user:
|
|
211
|
+
user: M
|
|
212
212
|
})
|
|
213
|
-
}),
|
|
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
|
-
}),
|
|
220
|
+
}), Fe = e.object({
|
|
221
221
|
resetCollectionExpiryBalance: e.boolean().nullish()
|
|
222
|
-
}),
|
|
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:
|
|
227
|
-
config:
|
|
226
|
+
file: L,
|
|
227
|
+
config: Fe.optional()
|
|
228
228
|
})
|
|
229
|
-
}),
|
|
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:
|
|
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
|
-
|
|
243
|
-
Me,
|
|
244
|
-
Te,
|
|
245
|
-
Fe,
|
|
246
|
-
Le,
|
|
247
|
-
xe,
|
|
248
|
-
Pe
|
|
248
|
+
fe
|
|
249
249
|
]);
|
|
250
|
-
const
|
|
250
|
+
const Me = {
|
|
251
251
|
collectionName: "Locations",
|
|
252
252
|
transform: {
|
|
253
253
|
_id: "oid",
|
|
254
254
|
business: "oid"
|
|
255
255
|
}
|
|
256
|
-
},
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
286
|
-
type: e.literal(
|
|
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:
|
|
289
|
-
}),
|
|
290
|
-
type: e.literal(
|
|
287
|
+
weight: R
|
|
288
|
+
}), x = e.object({
|
|
289
|
+
type: e.literal(C.enum.VOUCHER),
|
|
291
290
|
collectible: t,
|
|
292
|
-
collectibleConfig: e.lazy(() =>
|
|
293
|
-
earningOption: e.lazy(() =>
|
|
294
|
-
}),
|
|
295
|
-
type: e.literal(
|
|
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(() =>
|
|
298
|
-
validityOption: e.lazy(() =>
|
|
299
|
-
}),
|
|
300
|
-
weight:
|
|
301
|
-
}),
|
|
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
|
-
}),
|
|
304
|
-
validityOption:
|
|
305
|
-
weight:
|
|
306
|
-
}),
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
]),
|
|
311
|
-
|
|
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
|
-
|
|
314
|
+
N.extend({
|
|
316
315
|
collectible: t.nullish(),
|
|
317
316
|
business: t.nullish()
|
|
318
317
|
}),
|
|
319
|
-
|
|
320
|
-
]),
|
|
321
|
-
threshold:
|
|
322
|
-
}),
|
|
323
|
-
threshold:
|
|
324
|
-
}),
|
|
325
|
-
validityOption:
|
|
326
|
-
threshold:
|
|
327
|
-
}),
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
]),
|
|
331
|
-
|
|
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
|
-
|
|
334
|
+
j.extend({
|
|
336
335
|
collectible: t.nullish(),
|
|
337
|
-
collectibleConfig:
|
|
336
|
+
collectibleConfig: D.nullish(),
|
|
338
337
|
business: t.nullish()
|
|
339
338
|
})
|
|
340
|
-
]),
|
|
341
|
-
type:
|
|
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(() =>
|
|
344
|
-
}).superRefine((
|
|
345
|
-
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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(
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
488
|
-
type: e.literal(
|
|
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(() =>
|
|
391
|
+
tiers: e.array(e.lazy(() => $)),
|
|
494
392
|
titles: e.array(t),
|
|
495
393
|
tierCycleEnable: e.boolean().optional(),
|
|
496
|
-
tierCycle: e.lazy(() =>
|
|
497
|
-
|
|
498
|
-
|
|
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:
|
|
407
|
+
email: xe.nullish(),
|
|
512
408
|
freeCreditAsDiscount: e.boolean().optional(),
|
|
513
|
-
pf_title: e.array(e.lazy(() =>
|
|
514
|
-
pf_targetLocation: e.array(e.lazy(() =>
|
|
515
|
-
allowedPhoneCountries: e.union([
|
|
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 =
|
|
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:
|
|
528
|
-
|
|
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:
|
|
538
|
-
config:
|
|
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(() =>
|
|
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
|
-
},
|
|
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:
|
|
500
|
+
event: i.merge(
|
|
603
501
|
e.object({
|
|
604
502
|
type: e.enum(r[n.enum.VOUCHER])
|
|
605
503
|
})
|
|
606
504
|
),
|
|
607
|
-
earningOption:
|
|
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(() =>
|
|
512
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
615
513
|
notifyCampaign: t.nullish(),
|
|
616
|
-
pf_collectible: e.lazy(() =>
|
|
514
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
617
515
|
pf_notifyCampaign: e.lazy(() => E).optional()
|
|
618
|
-
}),
|
|
516
|
+
}), Ne = e.object({
|
|
619
517
|
gameType: e.string()
|
|
620
|
-
}),
|
|
518
|
+
}), v = s.extend({
|
|
621
519
|
type: e.literal(n.enum.PROMOTION),
|
|
622
520
|
// event
|
|
623
|
-
event:
|
|
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((
|
|
629
|
-
|
|
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:
|
|
638
|
-
}),
|
|
535
|
+
gameConfig: Ne.nullish()
|
|
536
|
+
}), z = s.extend({
|
|
639
537
|
type: e.literal(n.enum.POINT),
|
|
640
538
|
// event
|
|
641
|
-
event:
|
|
539
|
+
event: i.merge(
|
|
642
540
|
e.object({
|
|
643
541
|
type: e.enum(r[n.enum.POINT])
|
|
644
542
|
})
|
|
645
543
|
),
|
|
646
|
-
earningOption:
|
|
544
|
+
earningOption: d,
|
|
647
545
|
collectible: t,
|
|
648
546
|
notify: e.boolean().optional(),
|
|
649
|
-
notifyMessage: e.lazy(() =>
|
|
547
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
650
548
|
notifyCampaign: t.nullish(),
|
|
651
|
-
pf_collectible: e.lazy(() =>
|
|
549
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
652
550
|
pf_notifyCampaign: e.lazy(() => E).optional()
|
|
653
|
-
}),
|
|
551
|
+
}), H = s.extend({
|
|
654
552
|
type: e.literal(n.enum.CREDIT),
|
|
655
553
|
// event
|
|
656
|
-
event:
|
|
554
|
+
event: i.merge(
|
|
657
555
|
e.object({
|
|
658
556
|
type: e.enum(r[n.enum.CREDIT])
|
|
659
557
|
})
|
|
660
558
|
),
|
|
661
|
-
earningOption:
|
|
559
|
+
earningOption: d,
|
|
662
560
|
collectible: t,
|
|
663
561
|
notify: e.boolean().optional(),
|
|
664
|
-
notifyMessage: e.lazy(() =>
|
|
562
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
665
563
|
notifyCampaign: t.nullish(),
|
|
666
|
-
pf_collectible: e.lazy(() =>
|
|
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:
|
|
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:
|
|
682
|
-
delivery: e.lazy(() =>
|
|
579
|
+
message: u.nullish(),
|
|
580
|
+
delivery: e.lazy(() => X).nullish(),
|
|
683
581
|
linkedCampaign: t.nullish()
|
|
684
|
-
}),
|
|
582
|
+
}), W = s.extend({
|
|
685
583
|
type: e.literal(n.enum.COIN),
|
|
686
584
|
// event
|
|
687
|
-
event:
|
|
585
|
+
event: i.merge(
|
|
688
586
|
e.object({
|
|
689
587
|
type: e.enum(r[n.enum.COIN])
|
|
690
588
|
})
|
|
691
589
|
),
|
|
692
|
-
earningOption:
|
|
590
|
+
earningOption: d,
|
|
693
591
|
collectible: t,
|
|
694
592
|
notify: e.boolean().optional(),
|
|
695
|
-
notifyMessage: e.lazy(() =>
|
|
593
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
696
594
|
notifyCampaign: t.nullish(),
|
|
697
|
-
pf_collectible: e.lazy(() =>
|
|
595
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
698
596
|
pf_notifyCampaign: e.lazy(() => E).optional()
|
|
699
|
-
}),
|
|
597
|
+
}), g = s.extend({
|
|
700
598
|
type: e.literal(n.enum.REWARD_POOL),
|
|
701
599
|
// event
|
|
702
|
-
event:
|
|
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(() =>
|
|
708
|
-
}),
|
|
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:
|
|
609
|
+
event: i.merge(
|
|
712
610
|
e.object({
|
|
713
611
|
type: e.enum(r[n.enum.GAME])
|
|
714
612
|
})
|
|
715
613
|
),
|
|
716
|
-
earningOption:
|
|
614
|
+
earningOption: d,
|
|
717
615
|
collectible: t,
|
|
718
|
-
game: e.lazy(() =>
|
|
719
|
-
pf_collectible: e.lazy(() =>
|
|
616
|
+
game: e.lazy(() => g).optional(),
|
|
617
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
720
618
|
rewardPool: t.optional()
|
|
721
|
-
}),
|
|
619
|
+
}), K = s.extend({
|
|
722
620
|
type: e.literal(n.enum.MISSION),
|
|
723
|
-
event:
|
|
621
|
+
event: i.merge(
|
|
724
622
|
e.object({
|
|
725
623
|
type: e.enum(r[n.enum.MISSION])
|
|
726
624
|
})
|
|
727
625
|
),
|
|
728
|
-
earningOption:
|
|
626
|
+
earningOption: d,
|
|
729
627
|
collectible: t,
|
|
730
|
-
pf_collectible: e.lazy(() =>
|
|
731
|
-
mission: e.lazy(() =>
|
|
732
|
-
rewards: e.array(e.lazy(() =>
|
|
733
|
-
}),
|
|
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
|
-
},
|
|
673
|
+
}, Ve = e.object({ _id: t }).and(
|
|
816
674
|
e.discriminatedUnion("type", [
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
675
|
+
G,
|
|
676
|
+
w,
|
|
677
|
+
v,
|
|
678
|
+
z,
|
|
679
|
+
H,
|
|
822
680
|
E,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
$
|
|
681
|
+
W,
|
|
682
|
+
g,
|
|
683
|
+
k,
|
|
684
|
+
K
|
|
828
685
|
])
|
|
829
|
-
).describe(
|
|
830
|
-
|
|
686
|
+
).describe(p.describe(Be)), Je = e.discriminatedUnion("type", [
|
|
687
|
+
w.extend({
|
|
831
688
|
business: t.nullish()
|
|
832
689
|
}),
|
|
833
|
-
|
|
690
|
+
v.extend({
|
|
834
691
|
business: t.nullish()
|
|
835
692
|
}),
|
|
836
|
-
|
|
693
|
+
z.extend({
|
|
837
694
|
business: t.nullish()
|
|
838
695
|
}),
|
|
839
|
-
|
|
696
|
+
H.extend({
|
|
840
697
|
business: t.nullish()
|
|
841
698
|
}),
|
|
842
699
|
E.extend({
|
|
843
700
|
business: t.nullish()
|
|
844
701
|
}),
|
|
845
|
-
|
|
702
|
+
W.extend({
|
|
846
703
|
business: t.nullish()
|
|
847
704
|
}),
|
|
848
|
-
|
|
849
|
-
rewards: e.array(e.lazy(() =>
|
|
705
|
+
g.extend({
|
|
706
|
+
rewards: e.array(e.lazy(() => I)).min(1, "Requires at least 1 reward")
|
|
850
707
|
}),
|
|
851
|
-
|
|
708
|
+
k.extend({
|
|
852
709
|
business: t.nullish(),
|
|
853
|
-
game:
|
|
710
|
+
game: g.extend({
|
|
854
711
|
business: t.nullish(),
|
|
855
|
-
rewards: e.array(e.lazy(() =>
|
|
712
|
+
rewards: e.array(e.lazy(() => I)).min(1, "Requires at least 1 reward")
|
|
856
713
|
})
|
|
857
714
|
}),
|
|
858
|
-
|
|
715
|
+
K.extend({
|
|
859
716
|
business: t.nullish(),
|
|
860
|
-
rewards: e.array(e.lazy(() =>
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
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
|
};
|