@feedmepos/mf-connect 0.1.115-dev → 0.1.115-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/README.md +1 -66
- package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
- package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
- package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
- package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
- package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
- package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
- package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
- package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
- package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
- package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
- package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
- package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
- package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
- package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
- package/dist/Marketing-BKK45Eve.js +236 -0
- package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
- package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
- package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
- package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
- package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
- package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
- package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
- package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
- package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
- package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
- package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
- package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
- package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
- package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
- package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
- package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
- package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
- package/dist/Setting-BnFRI0Se.js +2037 -0
- package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
- package/dist/Settings-BvT8_tkQ.js +179 -0
- package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
- package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
- package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
- package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
- package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
- package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
- package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
- package/dist/app.js +3 -4
- package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
- package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
- package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
- package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
- package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
- package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
- package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
- package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
- package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
- package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
- package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
- package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
- package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
- package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
- package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
- package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
- package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
- package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
- package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
- package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
- package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
- package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
- package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
- package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
- package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
- package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
- package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
- package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
- package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
- package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
- package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
- package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
- package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
- package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
- package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
- package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
- package/dist/objectid-DEMM_jdR.js +145 -0
- package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
- package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
- package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
- package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
- package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
- package/dist/rule-builder-Deufb6h_.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DeebIqJ_.js +236 -0
- package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
- package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
- package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
- package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
- package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
- package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
- package/dist/vue-i18n-Cze706-f.js +2365 -0
- package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
- package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BPpdm96t.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
- package/dist/Grab-BWzdN_cd.js +0 -301
- package/dist/MainLayout-DwnjGXh6.js +0 -4
- package/dist/Marketing-DCco__2F.js +0 -273
- package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
- package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
- package/dist/Setting-CDM4RhLW.js +0 -574
- package/dist/Settings-D-0tvZRr.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
- package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
- package/dist/WhatsappBot-Cl64wG_F.js +0 -876
- package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
- package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
- package/dist/WhatsappLayout-C639d2HP.js +0 -21
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
- package/dist/browser-BSAOEeIM.js +0 -1478
- package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
- package/dist/feature-flag-Bo-k5sIG.js +0 -50
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/index-C-iwb2Ln.js +0 -109
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-DQ8JJhxs.js +0 -74
- package/dist/objectid-C-wocWKI.js +0 -145
- package/dist/template-BZyFhr73.js +0 -188
- package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
- package/dist/vue-i18n-DWGiC_vs.js +0 -2365
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { z as e } from "./index-
|
|
2
|
-
import { F as
|
|
3
|
-
import { F as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as p, f as ae } from "./index-BKsxIwbi.js";
|
|
1
|
+
import { z as e, F as t, b as y, m as p, d as K } from "./index-BYI9ttxy.js";
|
|
2
|
+
import { F as h } from "./campaign.enum-9CCbalR4.js";
|
|
3
|
+
import { d as F, F as D, e as d, f as V, g as f, h as c, i as J, c as Y } from "./index-CPODug8b.js";
|
|
4
|
+
import { A as M, B as A, C as q, E as Z } from "./index-IZRfmmde.js";
|
|
5
|
+
import { c as u, d as $ } from "./index-BAXKd9Gg.js";
|
|
7
6
|
e.object({
|
|
8
7
|
location: t,
|
|
9
8
|
memberId: t,
|
|
10
|
-
nettTotal:
|
|
9
|
+
nettTotal: y,
|
|
11
10
|
remark: e.string().optional()
|
|
12
11
|
});
|
|
13
|
-
const
|
|
12
|
+
const X = e.enum(["COUNTER", "POS"]);
|
|
14
13
|
e.object({
|
|
15
14
|
id: e.string(),
|
|
16
15
|
userId: e.string(),
|
|
@@ -21,9 +20,9 @@ e.object({
|
|
|
21
20
|
level: e.number().nullish(),
|
|
22
21
|
mostPurchasedItems: e.array(e.string()).nullish()
|
|
23
22
|
});
|
|
24
|
-
const
|
|
23
|
+
const Q = {
|
|
25
24
|
collectionName: "Bills"
|
|
26
|
-
},
|
|
25
|
+
}, ee = e.object({
|
|
27
26
|
_id: e.string(),
|
|
28
27
|
items: e.record(e.string(), e.number()).nullish(),
|
|
29
28
|
// business: z.string(),
|
|
@@ -32,27 +31,25 @@ const se = {
|
|
|
32
31
|
user: e.string().nullish(),
|
|
33
32
|
memberid: e.string().nullish(),
|
|
34
33
|
// roundToNearest: z.number().nullish(),
|
|
35
|
-
nettTotal:
|
|
36
|
-
adjustedTotal:
|
|
34
|
+
nettTotal: y,
|
|
35
|
+
adjustedTotal: y.optional(),
|
|
37
36
|
// activeItems: z.array(z.string()),
|
|
38
37
|
remark: e.string().nullish(),
|
|
39
38
|
createdAt: e.coerce.date(),
|
|
40
39
|
completedAt: e.coerce.date(),
|
|
41
|
-
refunded: e.boolean().nullish(),
|
|
42
|
-
refundRecord: e.array(e.string()).nullish(),
|
|
43
40
|
location: e.string(),
|
|
44
|
-
channel:
|
|
45
|
-
}).transform((
|
|
46
|
-
...
|
|
47
|
-
createdTime:
|
|
48
|
-
completedTime:
|
|
41
|
+
channel: X.optional()
|
|
42
|
+
}).transform((a) => ({
|
|
43
|
+
...a,
|
|
44
|
+
createdTime: a.createdAt,
|
|
45
|
+
completedTime: a.completedAt,
|
|
49
46
|
get amount() {
|
|
50
|
-
return
|
|
47
|
+
return a.nettTotal.amount / 10 ** a.nettTotal.precision;
|
|
51
48
|
},
|
|
52
49
|
get adjustmentAmount() {
|
|
53
|
-
return
|
|
50
|
+
return a.adjustedTotal ? a.adjustedTotal.amount / 10 ** a.adjustedTotal.precision : void 0;
|
|
54
51
|
}
|
|
55
|
-
})).describe(
|
|
52
|
+
})).describe(p.describe(Q)), te = e.object({
|
|
56
53
|
_id: e.string(),
|
|
57
54
|
rating: e.coerce.number(),
|
|
58
55
|
user: e.string().optional(),
|
|
@@ -63,7 +60,6 @@ const se = {
|
|
|
63
60
|
"SIMPLE_CLAIM",
|
|
64
61
|
"LINK_CLAIM",
|
|
65
62
|
"BILL_COMPLETED",
|
|
66
|
-
"BILL_REFUNDED",
|
|
67
63
|
"SCHEDULE",
|
|
68
64
|
"BIRTHDAY",
|
|
69
65
|
"FEEDBACK",
|
|
@@ -78,7 +74,7 @@ const se = {
|
|
|
78
74
|
"REFERRAL_ADDED",
|
|
79
75
|
"MEMBER_IMPORTED",
|
|
80
76
|
"SEGMENTATION_IMPORTED"
|
|
81
|
-
]),
|
|
77
|
+
]), ve = o.extract([
|
|
82
78
|
"BILL_COMPLETED",
|
|
83
79
|
"FEEDBACK",
|
|
84
80
|
"GAME_COMPLETED",
|
|
@@ -91,64 +87,64 @@ const se = {
|
|
|
91
87
|
]);
|
|
92
88
|
e.enum(["START_OF", "BEFORE"]);
|
|
93
89
|
e.enum(["WEEK", "MONTH"]);
|
|
94
|
-
const
|
|
90
|
+
const ne = e.enum([
|
|
95
91
|
"WAITING",
|
|
96
92
|
"ACTIVE",
|
|
97
93
|
"COMPLETED",
|
|
98
94
|
"FAILED"
|
|
99
|
-
]),
|
|
95
|
+
]), i = e.object({
|
|
100
96
|
// type: F_EVENT_TYPE,
|
|
101
|
-
rule:
|
|
102
|
-
}),
|
|
97
|
+
rule: F.optional()
|
|
98
|
+
}), oe = i.extend({
|
|
103
99
|
type: e.literal(o.enum.BILL_COMPLETED)
|
|
104
|
-
}),
|
|
100
|
+
}), ie = i.extend({
|
|
105
101
|
type: e.literal(o.enum.FEEDBACK)
|
|
106
|
-
}),
|
|
102
|
+
}), ae = i.extend({
|
|
107
103
|
type: e.literal(o.enum.SIMPLE_CLAIM)
|
|
108
104
|
});
|
|
109
|
-
|
|
105
|
+
i.extend({
|
|
110
106
|
type: e.literal(o.enum.ENTER_SEGMENT),
|
|
111
107
|
segment: e.string()
|
|
112
108
|
});
|
|
113
|
-
const
|
|
109
|
+
const le = i.extend({
|
|
114
110
|
type: e.literal(o.enum.MEMBER_REWARD)
|
|
115
|
-
}),
|
|
111
|
+
}), se = i.extend({
|
|
116
112
|
type: e.literal(o.enum.SCHEDULE)
|
|
117
113
|
// option: FdoCronRule,
|
|
118
|
-
}),
|
|
114
|
+
}), re = i.extend({
|
|
119
115
|
type: e.literal(o.enum.MEMBERSHIP_JOINED)
|
|
120
|
-
}),
|
|
116
|
+
}), de = i.extend({
|
|
121
117
|
type: e.literal(o.enum.TIER_UPGRADED)
|
|
122
|
-
}),
|
|
118
|
+
}), ce = i.extend({
|
|
123
119
|
type: e.literal(o.enum.MAKING_ORDER)
|
|
124
|
-
}),
|
|
120
|
+
}), me = i.extend({
|
|
125
121
|
type: e.literal(o.enum.ISSUE_REWARD)
|
|
126
|
-
}),
|
|
122
|
+
}), ue = i.extend({
|
|
127
123
|
type: e.literal(o.enum.GAME_COMPLETED)
|
|
128
124
|
});
|
|
129
|
-
|
|
125
|
+
i.extend({
|
|
130
126
|
type: e.literal(o.enum.REFERRAL_ADDED)
|
|
131
127
|
});
|
|
132
|
-
|
|
128
|
+
i.extend({
|
|
133
129
|
type: e.literal(o.enum.MEMBER_IMPORTED)
|
|
134
130
|
});
|
|
135
|
-
const
|
|
136
|
-
|
|
131
|
+
const Ee = e.discriminatedUnion("type", [
|
|
132
|
+
ae,
|
|
133
|
+
oe,
|
|
134
|
+
se,
|
|
135
|
+
ie,
|
|
136
|
+
re,
|
|
137
|
+
de,
|
|
137
138
|
ce,
|
|
138
|
-
Ee,
|
|
139
139
|
me,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
ye,
|
|
143
|
-
Ce,
|
|
144
|
-
pe,
|
|
145
|
-
Re
|
|
140
|
+
le,
|
|
141
|
+
ue
|
|
146
142
|
]);
|
|
147
143
|
e.object({
|
|
148
144
|
_id: t,
|
|
149
145
|
type: o,
|
|
150
146
|
ref: e.string(),
|
|
151
|
-
status:
|
|
147
|
+
status: ne.optional(),
|
|
152
148
|
context: e.record(e.string(), e.any()).optional(),
|
|
153
149
|
failedReason: e.any().optional()
|
|
154
150
|
}).describe(JSON.stringify({ collectionName: "EventLogs" }));
|
|
@@ -159,24 +155,18 @@ const l = e.object({
|
|
|
159
155
|
campaignIds: e.array(t).optional(),
|
|
160
156
|
slackWebhookUrl: e.string().optional(),
|
|
161
157
|
emittedAt: e.coerce.date().default(/* @__PURE__ */ new Date())
|
|
162
|
-
}),
|
|
158
|
+
}), pe = l.extend({
|
|
163
159
|
type: e.literal(o.enum.BILL_COMPLETED),
|
|
164
160
|
context: e.object({
|
|
165
|
-
bill:
|
|
161
|
+
bill: ee,
|
|
166
162
|
rawBill: e.any()
|
|
167
163
|
})
|
|
168
|
-
}),
|
|
169
|
-
type: e.literal(o.enum.BILL_REFUNDED),
|
|
170
|
-
context: e.object({
|
|
171
|
-
bill: j,
|
|
172
|
-
rawBill: e.any()
|
|
173
|
-
})
|
|
174
|
-
}), fe = l.extend({
|
|
164
|
+
}), ge = l.extend({
|
|
175
165
|
type: e.literal(o.enum.SCHEDULE),
|
|
176
166
|
context: e.object({
|
|
177
167
|
triggeredAt: e.coerce.date()
|
|
178
168
|
})
|
|
179
|
-
}),
|
|
169
|
+
}), be = l.extend({
|
|
180
170
|
type: e.literal(o.enum.PAGINATE_SCHEDULE),
|
|
181
171
|
context: e.object({
|
|
182
172
|
triggeredAt: e.coerce.date(),
|
|
@@ -184,85 +174,83 @@ const l = e.object({
|
|
|
184
174
|
skip: e.coerce.number(),
|
|
185
175
|
limit: e.coerce.number()
|
|
186
176
|
})
|
|
187
|
-
}),
|
|
177
|
+
}), ye = l.extend({
|
|
188
178
|
type: e.literal(o.enum.FEEDBACK),
|
|
189
179
|
context: e.object({
|
|
190
|
-
feedback:
|
|
180
|
+
feedback: te
|
|
191
181
|
})
|
|
192
|
-
}),
|
|
182
|
+
}), Ce = l.extend({
|
|
193
183
|
type: e.literal(o.enum.MEMBERSHIP_JOINED),
|
|
194
184
|
context: e.object({
|
|
195
|
-
user:
|
|
185
|
+
user: M
|
|
196
186
|
})
|
|
197
|
-
}),
|
|
187
|
+
}), Re = l.extend({
|
|
198
188
|
type: e.literal(o.enum.TIER_UPGRADED),
|
|
199
189
|
context: e.object({
|
|
200
|
-
transaction:
|
|
190
|
+
transaction: A
|
|
201
191
|
})
|
|
202
|
-
}),
|
|
192
|
+
}), _e = l.extend({
|
|
203
193
|
type: e.literal(o.enum.ISSUE_REWARD),
|
|
204
194
|
context: e.object({
|
|
205
|
-
transaction:
|
|
206
|
-
collection:
|
|
195
|
+
transaction: A,
|
|
196
|
+
collection: q
|
|
207
197
|
})
|
|
208
|
-
}),
|
|
198
|
+
}), Ie = l.extend({
|
|
209
199
|
type: e.literal(o.enum.REFERRAL_ADDED),
|
|
210
200
|
context: e.object({
|
|
211
|
-
user:
|
|
201
|
+
user: M
|
|
212
202
|
})
|
|
213
|
-
}),
|
|
203
|
+
}), T = e.object({
|
|
214
204
|
ref: t,
|
|
215
205
|
originalName: e.string(),
|
|
216
206
|
mimeType: e.string(),
|
|
217
207
|
size: e.number(),
|
|
218
208
|
fbFilePath: e.string(),
|
|
219
209
|
isFbFileDeleted: e.boolean().nullish()
|
|
220
|
-
}),
|
|
210
|
+
}), he = e.object({
|
|
221
211
|
resetCollectionExpiryBalance: e.boolean().nullish()
|
|
222
|
-
}),
|
|
212
|
+
}), Fe = l.extend({
|
|
223
213
|
type: e.literal(o.enum.MEMBER_IMPORTED),
|
|
224
214
|
context: e.object({
|
|
225
215
|
business: e.string(),
|
|
226
|
-
file:
|
|
227
|
-
config:
|
|
216
|
+
file: T,
|
|
217
|
+
config: he.optional()
|
|
228
218
|
})
|
|
229
|
-
}),
|
|
219
|
+
}), De = l.extend({
|
|
230
220
|
type: e.literal(o.enum.SEGMENTATION_IMPORTED),
|
|
231
221
|
context: e.object({
|
|
232
222
|
business: e.string(),
|
|
233
223
|
segment: e.string(),
|
|
234
|
-
file:
|
|
224
|
+
file: T
|
|
235
225
|
})
|
|
236
226
|
});
|
|
237
227
|
e.discriminatedUnion("type", [
|
|
228
|
+
pe,
|
|
229
|
+
ge,
|
|
230
|
+
ye,
|
|
231
|
+
Ce,
|
|
232
|
+
Re,
|
|
238
233
|
_e,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
De,
|
|
242
|
-
Ae,
|
|
243
|
-
Me,
|
|
244
|
-
Te,
|
|
234
|
+
be,
|
|
235
|
+
Ie,
|
|
245
236
|
Fe,
|
|
246
|
-
|
|
247
|
-
xe,
|
|
248
|
-
Pe
|
|
237
|
+
De
|
|
249
238
|
]);
|
|
250
|
-
const
|
|
239
|
+
const fe = {
|
|
251
240
|
collectionName: "Locations",
|
|
252
241
|
transform: {
|
|
253
242
|
_id: "oid",
|
|
254
243
|
business: "oid"
|
|
255
244
|
}
|
|
256
|
-
},
|
|
245
|
+
}, O = e.object({
|
|
257
246
|
_id: t,
|
|
258
247
|
business: t,
|
|
259
248
|
name: e.string(),
|
|
260
249
|
code: e.string().nullish(),
|
|
261
250
|
otp: e.string().nullish(),
|
|
262
251
|
otpExpiredAt: e.coerce.date().nullish(),
|
|
263
|
-
apiToken: e.string().nullish()
|
|
264
|
-
|
|
265
|
-
}).describe(g.describe(Se));
|
|
252
|
+
apiToken: e.string().nullish()
|
|
253
|
+
}).describe(p.describe(fe));
|
|
266
254
|
e.object({
|
|
267
255
|
_id: t,
|
|
268
256
|
name: e.string(),
|
|
@@ -270,7 +258,7 @@ e.object({
|
|
|
270
258
|
os: e.string(),
|
|
271
259
|
apiToken: e.string().nullish()
|
|
272
260
|
}).describe(
|
|
273
|
-
|
|
261
|
+
p.describe({
|
|
274
262
|
collectionName: "LocationDevices",
|
|
275
263
|
transform: {
|
|
276
264
|
_id: "oid",
|
|
@@ -282,177 +270,76 @@ e.object({
|
|
|
282
270
|
_id: e.string(),
|
|
283
271
|
name: e.string()
|
|
284
272
|
});
|
|
285
|
-
const
|
|
286
|
-
type: e.literal(
|
|
273
|
+
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"), L = e.object({
|
|
274
|
+
type: e.literal(C.enum.NO_REWARD),
|
|
287
275
|
collectible: e.null(),
|
|
288
|
-
weight:
|
|
289
|
-
}),
|
|
290
|
-
type: e.literal(
|
|
276
|
+
weight: R
|
|
277
|
+
}), P = e.object({
|
|
278
|
+
type: e.literal(C.enum.VOUCHER),
|
|
291
279
|
collectible: t,
|
|
292
|
-
collectibleConfig: e.lazy(() =>
|
|
293
|
-
earningOption: e.lazy(() =>
|
|
294
|
-
}),
|
|
295
|
-
type: e.literal(
|
|
280
|
+
collectibleConfig: e.lazy(() => D._def.right.options[0]),
|
|
281
|
+
earningOption: e.lazy(() => d)
|
|
282
|
+
}), b = e.object({
|
|
283
|
+
type: e.literal(C.enum.LOYALTY),
|
|
296
284
|
collectible: t,
|
|
297
|
-
earningOption: e.lazy(() =>
|
|
298
|
-
validityOption: e.lazy(() =>
|
|
299
|
-
}),
|
|
300
|
-
weight:
|
|
301
|
-
}),
|
|
285
|
+
earningOption: e.lazy(() => d),
|
|
286
|
+
validityOption: e.lazy(() => V)
|
|
287
|
+
}), x = P.extend({
|
|
288
|
+
weight: R
|
|
289
|
+
}), S = b.extend({
|
|
302
290
|
weight: e.number().min(0, "Weight need to be at least 0")
|
|
303
|
-
}),
|
|
304
|
-
validityOption:
|
|
305
|
-
weight:
|
|
306
|
-
}),
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
]),
|
|
311
|
-
|
|
291
|
+
}), ze = b.extend({
|
|
292
|
+
validityOption: f,
|
|
293
|
+
weight: R
|
|
294
|
+
}), Me = e.discriminatedUnion("type", [
|
|
295
|
+
x,
|
|
296
|
+
S,
|
|
297
|
+
L
|
|
298
|
+
]), I = e.discriminatedUnion("type", [
|
|
299
|
+
x.extend({
|
|
312
300
|
collectible: t.nullish(),
|
|
313
301
|
business: t.nullish()
|
|
314
302
|
}),
|
|
315
|
-
|
|
303
|
+
S.extend({
|
|
316
304
|
collectible: t.nullish(),
|
|
317
305
|
business: t.nullish()
|
|
318
306
|
}),
|
|
319
|
-
|
|
320
|
-
]),
|
|
321
|
-
threshold:
|
|
322
|
-
}),
|
|
323
|
-
threshold:
|
|
324
|
-
}),
|
|
325
|
-
validityOption:
|
|
326
|
-
threshold:
|
|
327
|
-
}),
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
]),
|
|
331
|
-
|
|
307
|
+
L
|
|
308
|
+
]), N = P.extend({
|
|
309
|
+
threshold: _
|
|
310
|
+
}), B = b.extend({
|
|
311
|
+
threshold: _
|
|
312
|
+
}), He = b.extend({
|
|
313
|
+
validityOption: f,
|
|
314
|
+
threshold: _
|
|
315
|
+
}), j = e.discriminatedUnion("type", [
|
|
316
|
+
N,
|
|
317
|
+
B
|
|
318
|
+
]), Ae = e.discriminatedUnion("type", [
|
|
319
|
+
N.extend({
|
|
332
320
|
collectible: t.nullish(),
|
|
333
321
|
business: t.nullish()
|
|
334
322
|
}),
|
|
335
|
-
|
|
323
|
+
B.extend({
|
|
336
324
|
collectible: t.nullish(),
|
|
337
|
-
collectibleConfig:
|
|
325
|
+
collectibleConfig: D.nullish(),
|
|
338
326
|
business: t.nullish()
|
|
339
327
|
})
|
|
340
|
-
]),
|
|
341
|
-
type:
|
|
328
|
+
]), Te = e.enum(["PROGRESSIVE", "STAMP"]), Oe = e.object({
|
|
329
|
+
type: Te,
|
|
342
330
|
end: e.number().int().min(0, "Threshold need to be at least 1"),
|
|
343
|
-
rewards: e.array(e.lazy(() =>
|
|
344
|
-
}).superRefine((
|
|
345
|
-
|
|
331
|
+
rewards: e.array(e.lazy(() => j)).nullish()
|
|
332
|
+
}).superRefine((a, m) => {
|
|
333
|
+
a.type == "STAMP" && a.end > 40 && (m.addIssue({
|
|
346
334
|
code: "custom",
|
|
347
335
|
path: [],
|
|
348
336
|
message: "Stamp mission can have at most 40 threshold"
|
|
349
|
-
}),
|
|
337
|
+
}), m.addIssue({
|
|
350
338
|
code: "custom",
|
|
351
339
|
path: ["end"],
|
|
352
340
|
message: "Stamp mission can have at most 40 threshold"
|
|
353
341
|
}));
|
|
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 = {
|
|
342
|
+
}), Le = {
|
|
456
343
|
collectionName: "Groups",
|
|
457
344
|
transform: {
|
|
458
345
|
_id: "oid",
|
|
@@ -470,36 +357,33 @@ const we = {
|
|
|
470
357
|
foreignField: "group"
|
|
471
358
|
}
|
|
472
359
|
}
|
|
473
|
-
},
|
|
360
|
+
}, We = e.object({
|
|
474
361
|
_id: t,
|
|
475
362
|
name: e.string().min(1).max(300),
|
|
476
363
|
business: t,
|
|
477
364
|
pf_campaigns: e.array(e.any()).optional()
|
|
478
|
-
}).describe(
|
|
365
|
+
}).describe(p.describe(Le)), Pe = e.object({
|
|
479
366
|
from: e.string().email().nullish(),
|
|
480
367
|
name: e.string().min(1).max(50).nullish()
|
|
481
|
-
}),
|
|
368
|
+
}), xe = e.object({
|
|
482
369
|
_id: e.string(),
|
|
483
370
|
url: e.string(),
|
|
484
371
|
targetLocation: e.array(t).nullish(),
|
|
485
372
|
// null/empty = all locations
|
|
486
373
|
order: e.number().optional()
|
|
487
|
-
}),
|
|
488
|
-
type: e.literal(
|
|
374
|
+
}), U = e.object({
|
|
375
|
+
type: e.literal(h.enum.MEMBERSHIP),
|
|
489
376
|
business: t,
|
|
490
377
|
name: e.string().min(1).max(50),
|
|
491
378
|
image: e.string().nullish(),
|
|
492
379
|
url: e.string().nullish(),
|
|
493
|
-
tiers: e.array(e.lazy(() =>
|
|
380
|
+
tiers: e.array(e.lazy(() => Z)),
|
|
494
381
|
titles: e.array(t),
|
|
495
382
|
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(),
|
|
383
|
+
tierCycle: e.lazy(() => F).nullish(),
|
|
384
|
+
welcomeMessage: u.optional(),
|
|
385
|
+
advertisements: e.union([e.array(e.string()), e.array(xe)]).optional(),
|
|
501
386
|
cardEnable: e.boolean().optional(),
|
|
502
|
-
autoRevertReward: e.boolean().optional(),
|
|
503
387
|
design: e.array(
|
|
504
388
|
e.object({
|
|
505
389
|
_id: t,
|
|
@@ -508,15 +392,18 @@ const we = {
|
|
|
508
392
|
).optional(),
|
|
509
393
|
targetLocation: e.array(t).nullish(),
|
|
510
394
|
brand: e.string().nullish(),
|
|
511
|
-
email:
|
|
395
|
+
email: Pe.nullish(),
|
|
512
396
|
freeCreditAsDiscount: e.boolean().optional(),
|
|
513
|
-
pf_title: e.array(e.lazy(() =>
|
|
514
|
-
pf_targetLocation: e.array(e.lazy(() =>
|
|
515
|
-
allowedPhoneCountries: e.union([
|
|
397
|
+
pf_title: e.array(e.lazy(() => c)).optional(),
|
|
398
|
+
pf_targetLocation: e.array(e.lazy(() => O)).optional(),
|
|
399
|
+
allowedPhoneCountries: e.union([
|
|
400
|
+
e.array(e.string().regex(/^\+\d{1,4}$/)),
|
|
401
|
+
e.null()
|
|
402
|
+
]).optional(),
|
|
516
403
|
// new structure
|
|
517
404
|
group: e.string().nullish(),
|
|
518
405
|
templateId: t.nullish()
|
|
519
|
-
}), n =
|
|
406
|
+
}), n = h.exclude(["MEMBERSHIP"]), s = e.object({
|
|
520
407
|
_id: t.nullish(),
|
|
521
408
|
type: n,
|
|
522
409
|
// common information
|
|
@@ -524,8 +411,8 @@ const we = {
|
|
|
524
411
|
name: e.string().min(1).max(50),
|
|
525
412
|
image: e.string().nullish(),
|
|
526
413
|
description: e.string().max(500).nullish(),
|
|
527
|
-
timeframeOptions:
|
|
528
|
-
|
|
414
|
+
timeframeOptions: J.superRefine((a, m) => {
|
|
415
|
+
a.start && a.end && a.end < a.start && m.addIssue({
|
|
529
416
|
code: "custom",
|
|
530
417
|
path: [],
|
|
531
418
|
params: {
|
|
@@ -534,13 +421,13 @@ const we = {
|
|
|
534
421
|
});
|
|
535
422
|
}).nullish(),
|
|
536
423
|
targetLocation: e.array(t).nullish(),
|
|
537
|
-
event:
|
|
538
|
-
config:
|
|
424
|
+
event: Ee,
|
|
425
|
+
config: Y.nullish(),
|
|
539
426
|
currentReceive: e.coerce.number().optional(),
|
|
540
427
|
// new group structure
|
|
541
428
|
group: t.nullish(),
|
|
542
429
|
templateId: t.nullish(),
|
|
543
|
-
pf_targetLocation: e.array(e.lazy(() =>
|
|
430
|
+
pf_targetLocation: e.array(e.lazy(() => O)).optional(),
|
|
544
431
|
deletedAt: e.coerce.date().optional()
|
|
545
432
|
}), r = {
|
|
546
433
|
[n.enum.VOUCHER]: [
|
|
@@ -552,7 +439,6 @@ const we = {
|
|
|
552
439
|
"SIMPLE_CLAIM"
|
|
553
440
|
],
|
|
554
441
|
[n.enum.PROMOTION]: ["MAKING_ORDER"],
|
|
555
|
-
[n.enum.GRAB]: ["MAKING_ORDER"],
|
|
556
442
|
[n.enum.POINT]: [
|
|
557
443
|
"BILL_COMPLETED",
|
|
558
444
|
"FEEDBACK",
|
|
@@ -593,40 +479,40 @@ const we = {
|
|
|
593
479
|
"FEEDBACK",
|
|
594
480
|
"SCHEDULE"
|
|
595
481
|
]
|
|
596
|
-
},
|
|
482
|
+
}, G = s.extend({
|
|
597
483
|
type: e.literal(n.enum.VOUCHER),
|
|
598
484
|
// event
|
|
599
485
|
code: e.string().min(0).max(15).regex(/^[A-Za-z0-9\-_.@]*$/, {
|
|
600
486
|
message: "Code can only contain letters, numbers, and - _ . @"
|
|
601
487
|
}).optional(),
|
|
602
|
-
event:
|
|
488
|
+
event: i.merge(
|
|
603
489
|
e.object({
|
|
604
490
|
type: e.enum(r[n.enum.VOUCHER])
|
|
605
491
|
})
|
|
606
492
|
),
|
|
607
|
-
earningOption:
|
|
493
|
+
earningOption: d.default({
|
|
608
494
|
amount: 1,
|
|
609
495
|
type: "FIXED"
|
|
610
496
|
}),
|
|
611
497
|
collectible: t,
|
|
612
498
|
hideInApp: e.boolean().optional(),
|
|
613
499
|
notify: e.boolean().optional(),
|
|
614
|
-
notifyMessage: e.lazy(() =>
|
|
500
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
615
501
|
notifyCampaign: t.nullish(),
|
|
616
|
-
pf_collectible: e.lazy(() =>
|
|
502
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
617
503
|
pf_notifyCampaign: e.lazy(() => E).optional()
|
|
618
|
-
}),
|
|
504
|
+
}), Se = e.object({
|
|
619
505
|
gameType: e.string()
|
|
620
|
-
}),
|
|
506
|
+
}), w = s.extend({
|
|
621
507
|
type: e.literal(n.enum.PROMOTION),
|
|
622
508
|
// event
|
|
623
|
-
event:
|
|
509
|
+
event: i.merge(
|
|
624
510
|
e.object({
|
|
625
511
|
type: e.enum(r[n.enum.PROMOTION])
|
|
626
512
|
})
|
|
627
513
|
),
|
|
628
|
-
effect: e.custom().superRefine((
|
|
629
|
-
|
|
514
|
+
effect: e.custom().superRefine((a, m) => {
|
|
515
|
+
a || m.addIssue({
|
|
630
516
|
code: "custom",
|
|
631
517
|
path: [],
|
|
632
518
|
params: {
|
|
@@ -634,41 +520,41 @@ const we = {
|
|
|
634
520
|
}
|
|
635
521
|
});
|
|
636
522
|
}),
|
|
637
|
-
gameConfig:
|
|
638
|
-
}),
|
|
523
|
+
gameConfig: Se.nullish()
|
|
524
|
+
}), v = s.extend({
|
|
639
525
|
type: e.literal(n.enum.POINT),
|
|
640
526
|
// event
|
|
641
|
-
event:
|
|
527
|
+
event: i.merge(
|
|
642
528
|
e.object({
|
|
643
529
|
type: e.enum(r[n.enum.POINT])
|
|
644
530
|
})
|
|
645
531
|
),
|
|
646
|
-
earningOption:
|
|
532
|
+
earningOption: d,
|
|
647
533
|
collectible: t,
|
|
648
534
|
notify: e.boolean().optional(),
|
|
649
|
-
notifyMessage: e.lazy(() =>
|
|
535
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
650
536
|
notifyCampaign: t.nullish(),
|
|
651
|
-
pf_collectible: e.lazy(() =>
|
|
537
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
652
538
|
pf_notifyCampaign: e.lazy(() => E).optional()
|
|
653
|
-
}),
|
|
539
|
+
}), z = s.extend({
|
|
654
540
|
type: e.literal(n.enum.CREDIT),
|
|
655
541
|
// event
|
|
656
|
-
event:
|
|
542
|
+
event: i.merge(
|
|
657
543
|
e.object({
|
|
658
544
|
type: e.enum(r[n.enum.CREDIT])
|
|
659
545
|
})
|
|
660
546
|
),
|
|
661
|
-
earningOption:
|
|
547
|
+
earningOption: d,
|
|
662
548
|
collectible: t,
|
|
663
549
|
notify: e.boolean().optional(),
|
|
664
|
-
notifyMessage: e.lazy(() =>
|
|
550
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
665
551
|
notifyCampaign: t.nullish(),
|
|
666
|
-
pf_collectible: e.lazy(() =>
|
|
552
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
667
553
|
pf_notifyCampaign: e.lazy(() => E).optional()
|
|
668
554
|
}), E = s.extend({
|
|
669
555
|
type: e.literal(n.enum.BROADCAST),
|
|
670
556
|
// event
|
|
671
|
-
event:
|
|
557
|
+
event: i.merge(
|
|
672
558
|
e.object({
|
|
673
559
|
type: e.enum(r[n.enum.BROADCAST])
|
|
674
560
|
})
|
|
@@ -678,99 +564,59 @@ const we = {
|
|
|
678
564
|
// path, which never reads `message`; it is still mirrored when a routable
|
|
679
565
|
// channel exists (see toLegacyMessage) so an older reader degrades to
|
|
680
566
|
// sending one real message rather than nothing.
|
|
681
|
-
message:
|
|
682
|
-
delivery: e.lazy(() =>
|
|
567
|
+
message: u.nullish(),
|
|
568
|
+
delivery: e.lazy(() => $).nullish(),
|
|
683
569
|
linkedCampaign: t.nullish()
|
|
684
|
-
}),
|
|
570
|
+
}), H = s.extend({
|
|
685
571
|
type: e.literal(n.enum.COIN),
|
|
686
572
|
// event
|
|
687
|
-
event:
|
|
573
|
+
event: i.merge(
|
|
688
574
|
e.object({
|
|
689
575
|
type: e.enum(r[n.enum.COIN])
|
|
690
576
|
})
|
|
691
577
|
),
|
|
692
|
-
earningOption:
|
|
578
|
+
earningOption: d,
|
|
693
579
|
collectible: t,
|
|
694
580
|
notify: e.boolean().optional(),
|
|
695
|
-
notifyMessage: e.lazy(() =>
|
|
581
|
+
notifyMessage: e.lazy(() => u).optional(),
|
|
696
582
|
notifyCampaign: t.nullish(),
|
|
697
|
-
pf_collectible: e.lazy(() =>
|
|
583
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
698
584
|
pf_notifyCampaign: e.lazy(() => E).optional()
|
|
699
|
-
}),
|
|
585
|
+
}), g = s.extend({
|
|
700
586
|
type: e.literal(n.enum.REWARD_POOL),
|
|
701
587
|
// event
|
|
702
|
-
event:
|
|
588
|
+
event: i.merge(
|
|
703
589
|
e.object({
|
|
704
590
|
type: e.enum(r[n.enum.REWARD_POOL])
|
|
705
591
|
})
|
|
706
592
|
),
|
|
707
|
-
rewards: e.array(e.lazy(() =>
|
|
708
|
-
}),
|
|
593
|
+
rewards: e.array(e.lazy(() => Me)).min(1, "Requires at least 1 reward")
|
|
594
|
+
}), W = s.extend({
|
|
709
595
|
type: e.literal(n.enum.GAME),
|
|
710
596
|
// event
|
|
711
|
-
event:
|
|
597
|
+
event: i.merge(
|
|
712
598
|
e.object({
|
|
713
599
|
type: e.enum(r[n.enum.GAME])
|
|
714
600
|
})
|
|
715
601
|
),
|
|
716
|
-
earningOption:
|
|
602
|
+
earningOption: d,
|
|
717
603
|
collectible: t,
|
|
718
|
-
game: e.lazy(() =>
|
|
719
|
-
pf_collectible: e.lazy(() =>
|
|
604
|
+
game: e.lazy(() => g).optional(),
|
|
605
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
720
606
|
rewardPool: t.optional()
|
|
721
|
-
}),
|
|
607
|
+
}), k = s.extend({
|
|
722
608
|
type: e.literal(n.enum.MISSION),
|
|
723
|
-
event:
|
|
609
|
+
event: i.merge(
|
|
724
610
|
e.object({
|
|
725
611
|
type: e.enum(r[n.enum.MISSION])
|
|
726
612
|
})
|
|
727
613
|
),
|
|
728
|
-
earningOption:
|
|
614
|
+
earningOption: d,
|
|
729
615
|
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 = {
|
|
616
|
+
pf_collectible: e.lazy(() => c).optional(),
|
|
617
|
+
mission: e.lazy(() => Oe),
|
|
618
|
+
rewards: e.array(e.lazy(() => j)).min(1, "Requires at least 1 reward")
|
|
619
|
+
}), Ne = {
|
|
774
620
|
collectionName: "Campaigns",
|
|
775
621
|
transform: {
|
|
776
622
|
_id: "oid",
|
|
@@ -812,58 +658,54 @@ const we = {
|
|
|
812
658
|
as: "game"
|
|
813
659
|
}
|
|
814
660
|
}
|
|
815
|
-
},
|
|
661
|
+
}, ke = e.object({ _id: t }).and(
|
|
816
662
|
e.discriminatedUnion("type", [
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
663
|
+
U,
|
|
664
|
+
G,
|
|
665
|
+
w,
|
|
666
|
+
v,
|
|
667
|
+
z,
|
|
822
668
|
E,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
$
|
|
669
|
+
H,
|
|
670
|
+
g,
|
|
671
|
+
W,
|
|
672
|
+
k
|
|
828
673
|
])
|
|
829
|
-
).describe(
|
|
830
|
-
|
|
674
|
+
).describe(p.describe(Ne)), Ke = e.discriminatedUnion("type", [
|
|
675
|
+
G.extend({
|
|
831
676
|
business: t.nullish()
|
|
832
677
|
}),
|
|
833
|
-
|
|
678
|
+
w.extend({
|
|
834
679
|
business: t.nullish()
|
|
835
680
|
}),
|
|
836
|
-
|
|
681
|
+
v.extend({
|
|
837
682
|
business: t.nullish()
|
|
838
683
|
}),
|
|
839
|
-
|
|
684
|
+
z.extend({
|
|
840
685
|
business: t.nullish()
|
|
841
686
|
}),
|
|
842
687
|
E.extend({
|
|
843
688
|
business: t.nullish()
|
|
844
689
|
}),
|
|
845
|
-
|
|
690
|
+
H.extend({
|
|
846
691
|
business: t.nullish()
|
|
847
692
|
}),
|
|
848
|
-
|
|
849
|
-
rewards: e.array(e.lazy(() =>
|
|
693
|
+
g.extend({
|
|
694
|
+
rewards: e.array(e.lazy(() => I)).min(1, "Requires at least 1 reward")
|
|
850
695
|
}),
|
|
851
|
-
|
|
696
|
+
W.extend({
|
|
852
697
|
business: t.nullish(),
|
|
853
|
-
game:
|
|
698
|
+
game: g.extend({
|
|
854
699
|
business: t.nullish(),
|
|
855
|
-
rewards: e.array(e.lazy(() =>
|
|
700
|
+
rewards: e.array(e.lazy(() => I)).min(1, "Requires at least 1 reward")
|
|
856
701
|
})
|
|
857
702
|
}),
|
|
858
|
-
|
|
703
|
+
k.extend({
|
|
859
704
|
business: t.nullish(),
|
|
860
|
-
rewards: e.array(e.lazy(() =>
|
|
861
|
-
}),
|
|
862
|
-
$.extend({
|
|
863
|
-
business: t.nullish()
|
|
705
|
+
rewards: e.array(e.lazy(() => Ae)).min(1, "Requires at least 1 reward")
|
|
864
706
|
})
|
|
865
707
|
]);
|
|
866
|
-
|
|
708
|
+
U.pick({
|
|
867
709
|
business: !0,
|
|
868
710
|
name: !0,
|
|
869
711
|
image: !0,
|
|
@@ -871,7 +713,7 @@ W.pick({
|
|
|
871
713
|
tiers: !0,
|
|
872
714
|
// titles: true,
|
|
873
715
|
cardEnable: !0,
|
|
874
|
-
|
|
716
|
+
design: !0,
|
|
875
717
|
targetLocation: !0,
|
|
876
718
|
brand: !0,
|
|
877
719
|
email: !0,
|
|
@@ -880,23 +722,23 @@ W.pick({
|
|
|
880
722
|
pf_title: !0,
|
|
881
723
|
pf_targetLocation: !0
|
|
882
724
|
}).extend({
|
|
883
|
-
allowedPhoneCountryDetails: e.array(
|
|
725
|
+
allowedPhoneCountryDetails: e.array(K).nullish()
|
|
884
726
|
});
|
|
885
727
|
export {
|
|
886
728
|
r as C,
|
|
887
729
|
n as F,
|
|
888
730
|
o as a,
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
731
|
+
ke as b,
|
|
732
|
+
ve as c,
|
|
733
|
+
Ee as d,
|
|
734
|
+
We as e,
|
|
735
|
+
Ke as f,
|
|
736
|
+
ze as g,
|
|
737
|
+
I as h,
|
|
738
|
+
Te as i,
|
|
739
|
+
He as j,
|
|
740
|
+
Ae as k,
|
|
741
|
+
Oe as l,
|
|
742
|
+
U as m,
|
|
743
|
+
ne as n
|
|
902
744
|
};
|