@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.10
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-DHAyGCKP.js → App-CuoqxGQ_.js} +118 -106
- package/dist/AuditLogs-3VOqNuiy.js +2013 -0
- package/dist/{Bin-BxyU2xtK.js → Bin-DJAVHuWd.js} +8 -8
- package/dist/{Broadcast-BJjehb02.js → Broadcast-u9MAxxwk.js} +18 -17
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-h5E8WsFD.js} +5 -6
- package/dist/{Card-BYDuADCn.js → Card-DxH_641i.js} +19 -19
- package/dist/{Collections-BlPEkNm8.js → Collections-C9La6TzV.js} +197 -185
- package/dist/{Credit-D9Eqxv2E.js → Credit-DmRE1f4J.js} +18 -17
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DpOkDd5R.js +3377 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-CS34jatD.js} +6 -6
- package/dist/{Experience-DGumSpYK.js → Experience-C0FyDsmi.js} +35 -34
- package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-Be-90ifa.js} +1 -1
- package/dist/{Game-DDsYLdKu.js → Game-DYi-DQBb.js} +16 -15
- package/dist/Grab-BpIj6ILT.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-yfl42RYQ.js} +1 -1
- package/dist/{Index-DwRbFOsj.js → Index-BUTAUbSs.js} +10 -10
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-Xt8jbqnN.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Cofvjj26.js} +1 -1
- package/dist/LoyaltyDashboard-D-uRlQr4.js +1082 -0
- package/dist/{MainLayout-BEUAguIP.js → MainLayout-Bix1-Ejy.js} +1 -1
- package/dist/{Marketing-WdhEZvmz.js → Marketing-BK84KRoM.js} +4 -4
- package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-Njw8eFdM.js} +214 -211
- package/dist/{Member-jL3RMGsZ.js → Member-BglFXn-U.js} +20 -20
- package/dist/{MemberList-B1bdPK63.js → MemberList-BUaDqh-4.js} +50 -51
- package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-cdNWr7OQ.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-By18HGU7.js} +11 -11
- package/dist/{Mission-CoXzS7U6.js → Mission-DkacZ5on.js} +35 -34
- package/dist/{Overview-B16wZUSV.js → Overview-D6QiG05G.js} +19 -19
- package/dist/{Point-CORBv0y2.js → Point-B7Dnvqds.js} +30 -29
- package/dist/{Promotion-DQ4WnFkH.js → Promotion-OSAQAs7v.js} +111 -105
- package/dist/{Queue-BW97QEY2.js → Queue-VLWvCP3n.js} +45 -45
- package/dist/{Record-DZOhwf13.js → Record-DcvHadqJ.js} +10 -10
- package/dist/Review-B5P5fBoG.js +1186 -0
- package/dist/ReviewFacebookCallback-DK423k4B.js +243 -0
- package/dist/ReviewGoogleCallback-BkWwQXpL.js +208 -0
- package/dist/{Reward-Bi9mpuyH.js → Reward-B5UnJceg.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-CFN_ag0M.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CaZ-rcMt.js +1911 -0
- package/dist/{Segment-COhS8SPv.js → Segment-BuZW_Z-L.js} +77 -78
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-d3q61-tE.js} +3 -3
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D9jf_1QH.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CHo3hDkD.js} +4 -4
- package/dist/{Setting-BNtYrzdN.js → Setting-CKvCYEZ1.js} +259 -248
- package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-DMDLvJuR.js} +13 -13
- package/dist/{Store-iTgtmUVL.js → Store-YCCrdeiS.js} +24 -24
- package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-DrUeDPKk.js} +16 -16
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DxQ-kH_8.js +1130 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BzcC6nYi.js +7007 -0
- package/dist/{Tier-BbZMbFSd.js → Tier-cX6lgE5V.js} +544 -469
- package/dist/{Title-Co5XWIJm.js → Title-BO7yS6FQ.js} +93 -92
- package/dist/{Transaction-CoUbt5rr.js → Transaction-dwbikp5f.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C8QHAIeV.js} +6 -6
- package/dist/{Voucher-CXojttH0.js → Voucher-D5RtI53O.js} +28 -27
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Dw5trcej.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-Db1Yid5T.js} +2 -2
- package/dist/{app-_LtKE4PZ.js → app-veCyMzJU.js} +4238 -3623
- package/dist/app.js +4 -3
- package/dist/{business-CchrWCX9.js → business-BvtZwaVt.js} +1 -1
- package/dist/{campaign-D2RzC0L1.js → campaign-BbaSbea1.js} +13 -7
- package/dist/{campaign-N2x2N6OP.js → campaign-CyVE2I7v.js} +114 -64
- package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-B4old-6y.js} +3 -2
- package/dist/{campaign.fn-Da4r_dvc.js → campaign.fn-DuG421Su.js} +151 -151
- package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-C4_aVSzr.js} +1 -1
- package/dist/duplicateCampaign-BsXuQigf.js +51 -0
- package/dist/{effect-DADvE7lZ.js → effect-CCpybKfz.js} +1 -1
- package/dist/{email-addresses-DzUHQuVs.js → email-addresses-DDX4Mi6S.js} +2 -2
- package/dist/{export-uzECYleM.js → export-BkbeKb2b.js} +3 -3
- package/dist/{helper-DMsYRFIM.js → helper-DAxddTyP.js} +1 -1
- package/dist/{index-C2h4SP0A.js → index-B87M_APu.js} +829 -206
- package/dist/{index-KYtKBtvK.js → index-BI2mt6Pz.js} +3 -3
- package/dist/{index-Ct1Qf7kH.js → index-BkdCXelA.js} +1 -1
- package/dist/{index-XJX8_Wlh.js → index-C8dM9zHa.js} +1 -1
- package/dist/{index-CEVpWmjC.js → index-CKWDVDJG.js} +7 -7
- package/dist/{index-r8TuEpzi.js → index-CO9CGqzQ.js} +1 -1
- package/dist/{timezone-B_KZGqyd.js → index-CYwrTv3T.js} +21 -20
- package/dist/{index-Bc-pgOn6.js → index-CeUevans.js} +1 -1
- package/dist/{index-DQ6H1MEw.js → index-ClwNTy-6.js} +1996 -1968
- package/dist/{index-DXl_Qtu-.js → index-CoX84Njy.js} +1 -1
- package/dist/{index-B9RmImNP.js → index-EAtgJDuz.js} +3 -3
- package/dist/index-M7aip9Cz.js +67 -0
- package/dist/{index-CrPHsZg1.js → index-NyBcZeNK.js} +1549 -1271
- package/dist/index-mGQbobml.js +61 -0
- package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CJ1DBw4k.js} +184 -184
- package/dist/{loading-DK8UdxtS.js → loading-Bpwlx9Qf.js} +1 -1
- package/dist/{lodash-CgcQgDO8.js → lodash-DuvaOX4r.js} +1 -1
- package/dist/{membership-Cs4GzRnn.js → membership-BpmZ1RRg.js} +3 -3
- package/dist/{money-TgbWserQ.js → money-BIv7vBs6.js} +1 -1
- package/dist/{number-fLCh4B45.js → number-BBWkXSgJ.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-CTrVbFLZ.js +145 -0
- package/dist/{plugins-DYcrIMpx.js → plugins-BgZow8Qr.js} +94 -95
- package/dist/{reward-uQ8Oz8Fd.js → reward-mI3VO63r.js} +1 -1
- package/dist/{rule-BcbgF0xS.js → rule-DHb2dJky.js} +505 -487
- package/dist/style.css +1 -1
- package/dist/template-CFQFUU6d.js +188 -0
- package/dist/{trigger-c-_77EFL.js → trigger-B5HKpszv.js} +5 -5
- package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-DeZG3azC.js} +3 -3
- package/dist/{usePagination-C3cT5BmC.js → usePagination-C19TYQjJ.js} +1 -1
- package/dist/{user-CRIo5MyA.js → user-CR2Dbom0.js} +1 -1
- package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-tHTzSWDK.js} +314 -314
- package/dist/{xlsx-Bw1AshOG.js → xlsx-BLlEAp7n.js} +166 -166
- package/dist/{zod-CzlTW8Al.js → zod-ZxC0hnix.js} +1 -1
- package/package.json +8 -4
- package/dist/Analytic-Ccb5IKBy.js +0 -426
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
- package/dist/collection.fn-BqDPyvUe.js +0 -26
- package/dist/dto-CstKk_3g.js +0 -216
- package/dist/index-_KlH62Ed.js +0 -55
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-CVxLIQ5K.js +0 -145
- package/dist/rule-builder-CIkRKgap.js +0 -102
- package/dist/template-wZEVj8lZ.js +0 -236
|
@@ -1,10 +1,184 @@
|
|
|
1
|
-
import { z as e, F as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { z as e, F as n, m, a as R } from "./index-BI2mt6Pz.js";
|
|
2
|
+
import { B as L, C as x, E as D, G as w, H as g } from "./index-NyBcZeNK.js";
|
|
3
|
+
import { _ as A, l as C, a as G } from "./index-ClwNTy-6.js";
|
|
4
|
+
import { i as p } from "./helper-DAxddTyP.js";
|
|
5
|
+
import { a as H } from "./index-EAtgJDuz.js";
|
|
6
|
+
function f(o, a) {
|
|
7
|
+
let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
8
|
+
const l = r.length;
|
|
9
|
+
for (let c = 0; c < o; c++)
|
|
10
|
+
i += r.charAt(Math.floor(Math.random() * l));
|
|
11
|
+
return i;
|
|
12
|
+
}
|
|
13
|
+
function b(o) {
|
|
14
|
+
return !o.property && "rules" in o;
|
|
15
|
+
}
|
|
16
|
+
function M(o) {
|
|
17
|
+
return "property" in o && !!o.property;
|
|
18
|
+
}
|
|
19
|
+
const F = "g_schedule";
|
|
20
|
+
function k(o) {
|
|
21
|
+
return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
22
|
+
`).trim();
|
|
23
|
+
}
|
|
24
|
+
function B(o, a = !1) {
|
|
25
|
+
const i = A.cloneDeep(o);
|
|
26
|
+
if (M(i)) {
|
|
27
|
+
const r = i.conditions;
|
|
28
|
+
return !a && r && typeof r._rrule == "string" && (r._rrule = k(
|
|
29
|
+
r._rrule
|
|
30
|
+
)), i;
|
|
31
|
+
}
|
|
32
|
+
if (b(i))
|
|
33
|
+
for (const r in i.rules) {
|
|
34
|
+
const l = i.rules[r], c = a || b(l) && l.name === F;
|
|
35
|
+
i.rules[r] = B(
|
|
36
|
+
l,
|
|
37
|
+
c
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
return i;
|
|
41
|
+
}
|
|
42
|
+
class t {
|
|
43
|
+
static scaffoldGroup(a) {
|
|
44
|
+
return {
|
|
45
|
+
name: a ?? `g_${f(4)}`,
|
|
46
|
+
rules: {},
|
|
47
|
+
logic: ""
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static scaffoldEntry(a) {
|
|
51
|
+
return {
|
|
52
|
+
name: `r_${f(4)}`,
|
|
53
|
+
property: a ?? "",
|
|
54
|
+
conditions: {},
|
|
55
|
+
negated: !1
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static constructEntry(a, i, r, l) {
|
|
59
|
+
return {
|
|
60
|
+
name: l ?? `e_${f(4)}`,
|
|
61
|
+
property: a,
|
|
62
|
+
conditions: {
|
|
63
|
+
[i]: r
|
|
64
|
+
},
|
|
65
|
+
negated: !1
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static getLogic(a) {
|
|
69
|
+
return (a.logic ?? "").includes("||") ? "||" : "&&";
|
|
70
|
+
}
|
|
71
|
+
static constructLogic(a, i) {
|
|
72
|
+
const r = i ?? t.getLogic(a);
|
|
73
|
+
return Object.entries(a.rules).map(([l, c]) => b(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
74
|
+
}
|
|
75
|
+
static setRuleToGroup(a, i, r) {
|
|
76
|
+
let l = C.cloneDeep(a);
|
|
77
|
+
return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
|
|
78
|
+
l.rules[c.name] = c;
|
|
79
|
+
}) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
|
|
80
|
+
}
|
|
81
|
+
static removeEntry(a, i, r) {
|
|
82
|
+
const l = C.cloneDeep(a);
|
|
83
|
+
return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
|
|
84
|
+
}
|
|
85
|
+
static constructRule(a) {
|
|
86
|
+
switch (a.type) {
|
|
87
|
+
case "timeframe": {
|
|
88
|
+
const i = a.property, r = t.scaffoldGroup("timeframe"), l = [];
|
|
89
|
+
return (a.start || a.end) && l.push(
|
|
90
|
+
t.constructEntry(i, "_isBetween", {
|
|
91
|
+
start: a.start || void 0,
|
|
92
|
+
end: a.end || void 0
|
|
93
|
+
})
|
|
94
|
+
), t.setRuleToGroup(r, l, "&&");
|
|
95
|
+
}
|
|
96
|
+
default:
|
|
97
|
+
throw Error("invalid config type");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
static getRules(a) {
|
|
101
|
+
return a && "rules" in a ? Object.values(a.rules) : [];
|
|
102
|
+
}
|
|
103
|
+
static simplify(a) {
|
|
104
|
+
const [i] = Object.entries(a.conditions);
|
|
105
|
+
return i[0], {
|
|
106
|
+
property: a.property,
|
|
107
|
+
operator: i[0],
|
|
108
|
+
equator: i[1]
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
static isRuleExceed(a, i) {
|
|
112
|
+
const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
|
|
113
|
+
if (l > 10)
|
|
114
|
+
throw new V(10, l);
|
|
115
|
+
return !0;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
class V extends Error {
|
|
119
|
+
constructor(a, i) {
|
|
120
|
+
super(
|
|
121
|
+
`Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
|
|
122
|
+
), this.name = "MaxRulesExceededError";
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const Y = {
|
|
126
|
+
collectionName: "AuditLogs",
|
|
127
|
+
transform: {
|
|
128
|
+
_id: "oid",
|
|
129
|
+
business: "oid",
|
|
130
|
+
timestamp: "date"
|
|
131
|
+
},
|
|
132
|
+
lookups: {
|
|
133
|
+
business: {
|
|
134
|
+
as: "pf_business",
|
|
135
|
+
fromCollection: "Businesses"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, K = e.enum([
|
|
139
|
+
"GET",
|
|
140
|
+
"POST",
|
|
141
|
+
"PUT",
|
|
142
|
+
"PATCH",
|
|
143
|
+
"DELETE",
|
|
144
|
+
"OPTIONS",
|
|
145
|
+
"HEAD",
|
|
146
|
+
"ALL"
|
|
147
|
+
]), W = e.enum([
|
|
148
|
+
"CAMPAIGN",
|
|
149
|
+
"LOCATION",
|
|
150
|
+
"MARKETING MATERIALS",
|
|
151
|
+
"MEMBERSHIP",
|
|
152
|
+
"STORE",
|
|
153
|
+
"TRANSACTION",
|
|
154
|
+
"SETTINGS",
|
|
155
|
+
"SEGMENTATION",
|
|
156
|
+
"USER"
|
|
157
|
+
]), X = e.object({
|
|
158
|
+
httpMethod: K,
|
|
159
|
+
url: e.string().min(1),
|
|
160
|
+
userAgent: e.string(),
|
|
161
|
+
host: e.string().min(1),
|
|
162
|
+
params: e.object({}).passthrough().nullish(),
|
|
163
|
+
query: e.object({}).passthrough().nullish(),
|
|
164
|
+
body: e.object({}).passthrough().nullish()
|
|
165
|
+
}), q = e.object({
|
|
166
|
+
statusCode: e.number().int().min(100).max(599),
|
|
167
|
+
body: e.object({}).passthrough().nullish()
|
|
168
|
+
});
|
|
169
|
+
e.object({
|
|
170
|
+
_id: n,
|
|
171
|
+
user: e.string().length(28),
|
|
172
|
+
userName: e.string().min(1),
|
|
173
|
+
userPhoneNumber: e.string().refine((o) => L(o)).nullish(),
|
|
174
|
+
moduleType: W,
|
|
175
|
+
business: n.nullish(),
|
|
176
|
+
clientIp: e.string().nullish(),
|
|
177
|
+
timestamp: e.string().datetime(),
|
|
178
|
+
request: X,
|
|
179
|
+
response: q
|
|
180
|
+
}).describe(m.describe(Y));
|
|
181
|
+
const We = {
|
|
8
182
|
PROMOTION: {
|
|
9
183
|
name: "Promotion Template",
|
|
10
184
|
description: "Promotion template for campaign creation.",
|
|
@@ -125,7 +299,7 @@ const te = {
|
|
|
125
299
|
effect: null,
|
|
126
300
|
event: {
|
|
127
301
|
type: "MAKING_ORDER",
|
|
128
|
-
rule:
|
|
302
|
+
rule: t.scaffoldGroup()
|
|
129
303
|
},
|
|
130
304
|
group: null,
|
|
131
305
|
targetLocation: null,
|
|
@@ -388,7 +562,7 @@ const te = {
|
|
|
388
562
|
code: "",
|
|
389
563
|
event: {
|
|
390
564
|
type: "BILL_COMPLETED",
|
|
391
|
-
rule:
|
|
565
|
+
rule: t.scaffoldGroup()
|
|
392
566
|
},
|
|
393
567
|
group: null,
|
|
394
568
|
targetLocation: null,
|
|
@@ -410,7 +584,7 @@ const te = {
|
|
|
410
584
|
// },
|
|
411
585
|
hideInApp: !0
|
|
412
586
|
},
|
|
413
|
-
configs:
|
|
587
|
+
configs: p("VOUCHER", {
|
|
414
588
|
name: "",
|
|
415
589
|
business: null,
|
|
416
590
|
noCampaign: !1
|
|
@@ -538,17 +712,17 @@ const te = {
|
|
|
538
712
|
image: "",
|
|
539
713
|
event: {
|
|
540
714
|
type: "SCHEDULE",
|
|
541
|
-
rule:
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
715
|
+
rule: t.setRuleToGroup(
|
|
716
|
+
t.scaffoldGroup(),
|
|
717
|
+
t.setRuleToGroup(
|
|
718
|
+
t.scaffoldGroup("g_schedule"),
|
|
545
719
|
[
|
|
546
|
-
|
|
720
|
+
t.constructEntry(
|
|
547
721
|
"trigger.date",
|
|
548
722
|
"_rrule",
|
|
549
723
|
"RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU"
|
|
550
724
|
),
|
|
551
|
-
|
|
725
|
+
t.constructEntry(
|
|
552
726
|
"trigger.time",
|
|
553
727
|
"_isOnTime",
|
|
554
728
|
"00:00"
|
|
@@ -742,7 +916,7 @@ const te = {
|
|
|
742
916
|
image: "",
|
|
743
917
|
event: {
|
|
744
918
|
type: "BILL_COMPLETED",
|
|
745
|
-
rule:
|
|
919
|
+
rule: t.scaffoldGroup()
|
|
746
920
|
},
|
|
747
921
|
group: null,
|
|
748
922
|
targetLocation: null,
|
|
@@ -929,7 +1103,7 @@ const te = {
|
|
|
929
1103
|
image: "",
|
|
930
1104
|
event: {
|
|
931
1105
|
type: "BILL_COMPLETED",
|
|
932
|
-
rule:
|
|
1106
|
+
rule: t.scaffoldGroup()
|
|
933
1107
|
},
|
|
934
1108
|
group: null,
|
|
935
1109
|
targetLocation: null,
|
|
@@ -1116,7 +1290,7 @@ const te = {
|
|
|
1116
1290
|
image: "",
|
|
1117
1291
|
event: {
|
|
1118
1292
|
type: "BILL_COMPLETED",
|
|
1119
|
-
rule:
|
|
1293
|
+
rule: t.scaffoldGroup()
|
|
1120
1294
|
},
|
|
1121
1295
|
group: null,
|
|
1122
1296
|
targetLocation: null,
|
|
@@ -1325,7 +1499,7 @@ const te = {
|
|
|
1325
1499
|
image: "",
|
|
1326
1500
|
event: {
|
|
1327
1501
|
type: "BILL_COMPLETED",
|
|
1328
|
-
rule:
|
|
1502
|
+
rule: t.scaffoldGroup()
|
|
1329
1503
|
},
|
|
1330
1504
|
group: null,
|
|
1331
1505
|
targetLocation: null,
|
|
@@ -1343,7 +1517,7 @@ const te = {
|
|
|
1343
1517
|
game: {
|
|
1344
1518
|
event: {
|
|
1345
1519
|
type: "GAME_COMPLETED",
|
|
1346
|
-
rule:
|
|
1520
|
+
rule: t.scaffoldGroup()
|
|
1347
1521
|
},
|
|
1348
1522
|
name: "rewardpool_",
|
|
1349
1523
|
targetLocation: null,
|
|
@@ -1355,7 +1529,7 @@ const te = {
|
|
|
1355
1529
|
rewards: []
|
|
1356
1530
|
}
|
|
1357
1531
|
},
|
|
1358
|
-
configs:
|
|
1532
|
+
configs: p("GAME", {
|
|
1359
1533
|
name: "Token",
|
|
1360
1534
|
business: null,
|
|
1361
1535
|
noCampaign: !1
|
|
@@ -1580,7 +1754,7 @@ const te = {
|
|
|
1580
1754
|
},
|
|
1581
1755
|
event: {
|
|
1582
1756
|
type: "BILL_COMPLETED",
|
|
1583
|
-
rule:
|
|
1757
|
+
rule: t.scaffoldGroup()
|
|
1584
1758
|
},
|
|
1585
1759
|
mission: {
|
|
1586
1760
|
type: "STAMP",
|
|
@@ -1596,53 +1770,219 @@ const te = {
|
|
|
1596
1770
|
type: "timeframe"
|
|
1597
1771
|
}
|
|
1598
1772
|
},
|
|
1599
|
-
configs:
|
|
1773
|
+
configs: p("STAMP", {
|
|
1600
1774
|
business: null,
|
|
1601
1775
|
noCampaign: !1
|
|
1602
1776
|
})
|
|
1603
1777
|
}
|
|
1778
|
+
},
|
|
1779
|
+
GRAB: {
|
|
1780
|
+
name: "Grab Campaign Template",
|
|
1781
|
+
description: "Grab campaign template for campaign creation.",
|
|
1782
|
+
steps: [
|
|
1783
|
+
{
|
|
1784
|
+
name: "connect.template.general_information",
|
|
1785
|
+
groups: [
|
|
1786
|
+
{
|
|
1787
|
+
name: "connect.template.general",
|
|
1788
|
+
fields: [
|
|
1789
|
+
{
|
|
1790
|
+
label: "connect.template.campaign_name",
|
|
1791
|
+
property: "campaign.name",
|
|
1792
|
+
type: "text"
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
label: "connect.template.campaign_period",
|
|
1796
|
+
property: "campaign.timeframeOptions",
|
|
1797
|
+
type: "timeframe"
|
|
1798
|
+
}
|
|
1799
|
+
]
|
|
1800
|
+
}
|
|
1801
|
+
]
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: "connect.template.discount",
|
|
1805
|
+
groups: [
|
|
1806
|
+
{
|
|
1807
|
+
name: "connect.template.discount",
|
|
1808
|
+
fields: [
|
|
1809
|
+
{
|
|
1810
|
+
label: void 0,
|
|
1811
|
+
property: "campaign.discount",
|
|
1812
|
+
type: "grab_effect"
|
|
1813
|
+
}
|
|
1814
|
+
]
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
name: "connect.template.grab_quota",
|
|
1818
|
+
fields: [
|
|
1819
|
+
{
|
|
1820
|
+
label: void 0,
|
|
1821
|
+
property: "campaign.quotas",
|
|
1822
|
+
type: "grab_quota"
|
|
1823
|
+
}
|
|
1824
|
+
]
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
name: "connect.template.grab_condition",
|
|
1828
|
+
fields: [
|
|
1829
|
+
{
|
|
1830
|
+
label: void 0,
|
|
1831
|
+
property: "campaign.conditions",
|
|
1832
|
+
type: "grab_conditions"
|
|
1833
|
+
}
|
|
1834
|
+
]
|
|
1835
|
+
}
|
|
1836
|
+
]
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
name: "connect.template.terms_conditions",
|
|
1840
|
+
groups: [
|
|
1841
|
+
{
|
|
1842
|
+
name: "Location",
|
|
1843
|
+
fields: [
|
|
1844
|
+
{
|
|
1845
|
+
label: "Target location",
|
|
1846
|
+
property: "campaign.targetLocation",
|
|
1847
|
+
type: "target_location"
|
|
1848
|
+
}
|
|
1849
|
+
]
|
|
1850
|
+
}
|
|
1851
|
+
]
|
|
1852
|
+
}
|
|
1853
|
+
],
|
|
1854
|
+
defaultValue: {
|
|
1855
|
+
templateId: "",
|
|
1856
|
+
campaign: {
|
|
1857
|
+
type: "GRAB",
|
|
1858
|
+
templateId: "",
|
|
1859
|
+
name: "",
|
|
1860
|
+
description: "",
|
|
1861
|
+
image: "",
|
|
1862
|
+
discount: null,
|
|
1863
|
+
group: null,
|
|
1864
|
+
event: {
|
|
1865
|
+
type: "MAKING_ORDER",
|
|
1866
|
+
rule: t.scaffoldGroup()
|
|
1867
|
+
},
|
|
1868
|
+
quotas: {
|
|
1869
|
+
totalCount: 10,
|
|
1870
|
+
totalCountPerUser: 2
|
|
1871
|
+
},
|
|
1872
|
+
conditions: {
|
|
1873
|
+
startTime: "",
|
|
1874
|
+
endTime: "",
|
|
1875
|
+
eaterType: "all",
|
|
1876
|
+
minBasketAmount: 10,
|
|
1877
|
+
bundleQuantity: 2,
|
|
1878
|
+
workingHour: {
|
|
1879
|
+
sun: {
|
|
1880
|
+
periods: [
|
|
1881
|
+
{
|
|
1882
|
+
startTime: "11:30",
|
|
1883
|
+
endTime: "14:00"
|
|
1884
|
+
}
|
|
1885
|
+
]
|
|
1886
|
+
},
|
|
1887
|
+
mon: {
|
|
1888
|
+
periods: [
|
|
1889
|
+
{
|
|
1890
|
+
startTime: "11:30",
|
|
1891
|
+
endTime: "14:00"
|
|
1892
|
+
}
|
|
1893
|
+
]
|
|
1894
|
+
},
|
|
1895
|
+
tue: {
|
|
1896
|
+
periods: [
|
|
1897
|
+
{
|
|
1898
|
+
startTime: "11:30",
|
|
1899
|
+
endTime: "14:00"
|
|
1900
|
+
}
|
|
1901
|
+
]
|
|
1902
|
+
},
|
|
1903
|
+
wed: {
|
|
1904
|
+
periods: [
|
|
1905
|
+
{
|
|
1906
|
+
startTime: "11:30",
|
|
1907
|
+
endTime: "14:00"
|
|
1908
|
+
}
|
|
1909
|
+
]
|
|
1910
|
+
},
|
|
1911
|
+
thu: {
|
|
1912
|
+
periods: [
|
|
1913
|
+
{
|
|
1914
|
+
startTime: "11:30",
|
|
1915
|
+
endTime: "14:00"
|
|
1916
|
+
}
|
|
1917
|
+
]
|
|
1918
|
+
},
|
|
1919
|
+
fri: {
|
|
1920
|
+
periods: [
|
|
1921
|
+
{
|
|
1922
|
+
startTime: "11:30",
|
|
1923
|
+
endTime: "14:00"
|
|
1924
|
+
}
|
|
1925
|
+
]
|
|
1926
|
+
},
|
|
1927
|
+
sat: {
|
|
1928
|
+
periods: [
|
|
1929
|
+
{
|
|
1930
|
+
startTime: "11:30",
|
|
1931
|
+
endTime: "14:00"
|
|
1932
|
+
}
|
|
1933
|
+
]
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
targetLocation: null,
|
|
1938
|
+
timeframeOptions: {
|
|
1939
|
+
type: "timeframe",
|
|
1940
|
+
property: "__now"
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1604
1944
|
}
|
|
1605
1945
|
};
|
|
1606
|
-
|
|
1946
|
+
t.scaffoldGroup(), p("STAMP", {
|
|
1607
1947
|
business: null,
|
|
1608
1948
|
noCampaign: !1
|
|
1609
1949
|
});
|
|
1610
1950
|
({
|
|
1611
|
-
...
|
|
1612
|
-
},
|
|
1951
|
+
...t.scaffoldGroup()
|
|
1952
|
+
}, p("VOUCHER", {
|
|
1613
1953
|
name: "",
|
|
1614
1954
|
business: null,
|
|
1615
1955
|
noCampaign: !1
|
|
1616
1956
|
}));
|
|
1617
1957
|
({
|
|
1618
|
-
...
|
|
1619
|
-
},
|
|
1958
|
+
...t.scaffoldGroup()
|
|
1959
|
+
}, p("VOUCHER", {
|
|
1620
1960
|
name: "",
|
|
1621
1961
|
business: null,
|
|
1622
1962
|
noCampaign: !1
|
|
1623
1963
|
}));
|
|
1624
1964
|
({
|
|
1625
|
-
...
|
|
1965
|
+
...t.scaffoldGroup()
|
|
1626
1966
|
});
|
|
1627
1967
|
({
|
|
1628
|
-
...
|
|
1968
|
+
...t.scaffoldGroup()
|
|
1629
1969
|
});
|
|
1630
1970
|
({
|
|
1631
|
-
...
|
|
1971
|
+
...t.scaffoldGroup()
|
|
1632
1972
|
});
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
[
|
|
1973
|
+
t.setRuleToGroup(
|
|
1974
|
+
t.scaffoldGroup(),
|
|
1975
|
+
t.setRuleToGroup(
|
|
1976
|
+
t.scaffoldGroup("g_user"),
|
|
1977
|
+
[t.constructEntry("user.member", "_isIn", [!0])],
|
|
1638
1978
|
"&&"
|
|
1639
1979
|
)
|
|
1640
1980
|
);
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1981
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1982
|
+
t.setRuleToGroup(
|
|
1983
|
+
t.scaffoldGroup("g_user"),
|
|
1644
1984
|
[
|
|
1645
|
-
|
|
1985
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1646
1986
|
op: "this",
|
|
1647
1987
|
unit: "month",
|
|
1648
1988
|
ignoreYear: !0
|
|
@@ -1652,13 +1992,13 @@ a.setRuleToGroup(a.scaffoldGroup(), [
|
|
|
1652
1992
|
)
|
|
1653
1993
|
]);
|
|
1654
1994
|
({
|
|
1655
|
-
...
|
|
1995
|
+
...t.scaffoldGroup()
|
|
1656
1996
|
});
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1997
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1998
|
+
t.setRuleToGroup(
|
|
1999
|
+
t.scaffoldGroup("g_user"),
|
|
1660
2000
|
[
|
|
1661
|
-
|
|
2001
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1662
2002
|
op: "this",
|
|
1663
2003
|
unit: "month",
|
|
1664
2004
|
ignoreYear: !0
|
|
@@ -1668,85 +2008,85 @@ a.setRuleToGroup(a.scaffoldGroup(), [
|
|
|
1668
2008
|
)
|
|
1669
2009
|
]);
|
|
1670
2010
|
({
|
|
1671
|
-
...
|
|
2011
|
+
...t.scaffoldGroup()
|
|
1672
2012
|
});
|
|
1673
2013
|
({
|
|
1674
|
-
...
|
|
1675
|
-
},
|
|
2014
|
+
...t.scaffoldGroup()
|
|
2015
|
+
}, p("VOUCHER", {
|
|
1676
2016
|
name: "",
|
|
1677
2017
|
business: null,
|
|
1678
2018
|
noCampaign: !1
|
|
1679
2019
|
}));
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
2020
|
+
t.setRuleToGroup(
|
|
2021
|
+
t.scaffoldGroup(),
|
|
2022
|
+
t.setRuleToGroup(
|
|
2023
|
+
t.scaffoldGroup("g_schedule"),
|
|
1684
2024
|
[
|
|
1685
|
-
|
|
1686
|
-
|
|
2025
|
+
t.constructEntry("trigger.date", "_isOnDate", ""),
|
|
2026
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1687
2027
|
],
|
|
1688
2028
|
"&&"
|
|
1689
2029
|
)
|
|
1690
2030
|
);
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
2031
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
2032
|
+
t.setRuleToGroup(
|
|
2033
|
+
t.scaffoldGroup("g_schedule"),
|
|
1694
2034
|
[
|
|
1695
|
-
|
|
2035
|
+
t.constructEntry(
|
|
1696
2036
|
"trigger.date",
|
|
1697
2037
|
"_rrule",
|
|
1698
2038
|
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
1699
2039
|
),
|
|
1700
|
-
|
|
2040
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1701
2041
|
],
|
|
1702
2042
|
"&&"
|
|
1703
2043
|
)
|
|
1704
2044
|
]);
|
|
1705
|
-
({ ...
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
2045
|
+
({ ...t.scaffoldGroup() });
|
|
2046
|
+
t.setRuleToGroup(
|
|
2047
|
+
t.scaffoldGroup(),
|
|
2048
|
+
t.setRuleToGroup(
|
|
2049
|
+
t.scaffoldGroup("g_schedule"),
|
|
1710
2050
|
[
|
|
1711
|
-
|
|
2051
|
+
t.constructEntry(
|
|
1712
2052
|
"trigger.date",
|
|
1713
2053
|
"_rrule",
|
|
1714
2054
|
"RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
|
|
1715
2055
|
),
|
|
1716
|
-
|
|
2056
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1717
2057
|
],
|
|
1718
2058
|
"&&"
|
|
1719
2059
|
)
|
|
1720
2060
|
);
|
|
1721
|
-
|
|
2061
|
+
t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
|
|
1722
2062
|
name: "Token",
|
|
1723
2063
|
business: null,
|
|
1724
2064
|
noCampaign: !1
|
|
1725
2065
|
});
|
|
1726
2066
|
({
|
|
1727
|
-
...
|
|
1728
|
-
},
|
|
2067
|
+
...t.scaffoldGroup()
|
|
2068
|
+
}, p("VOUCHER", {
|
|
1729
2069
|
name: "",
|
|
1730
2070
|
business: null,
|
|
1731
2071
|
noCampaign: !1
|
|
1732
2072
|
}));
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
2073
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
2074
|
+
t.setRuleToGroup(
|
|
2075
|
+
t.scaffoldGroup("g_schedule"),
|
|
1736
2076
|
[
|
|
1737
|
-
|
|
2077
|
+
t.constructEntry(
|
|
1738
2078
|
"trigger.date",
|
|
1739
2079
|
"_rrule",
|
|
1740
2080
|
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
1741
2081
|
),
|
|
1742
|
-
|
|
2082
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1743
2083
|
],
|
|
1744
2084
|
"&&"
|
|
1745
2085
|
),
|
|
1746
|
-
|
|
1747
|
-
|
|
2086
|
+
t.setRuleToGroup(
|
|
2087
|
+
t.scaffoldGroup("g_user"),
|
|
1748
2088
|
[
|
|
1749
|
-
|
|
2089
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1750
2090
|
op: "this",
|
|
1751
2091
|
unit: "month",
|
|
1752
2092
|
ignoreYear: !0
|
|
@@ -1754,30 +2094,30 @@ a.setRuleToGroup(a.scaffoldGroup(), [
|
|
|
1754
2094
|
],
|
|
1755
2095
|
"&&"
|
|
1756
2096
|
)
|
|
1757
|
-
]),
|
|
2097
|
+
]), p("VOUCHER", {
|
|
1758
2098
|
name: "",
|
|
1759
2099
|
business: null,
|
|
1760
2100
|
noCampaign: !1
|
|
1761
2101
|
});
|
|
1762
2102
|
({
|
|
1763
|
-
...
|
|
2103
|
+
...t.scaffoldGroup()
|
|
1764
2104
|
});
|
|
1765
2105
|
({
|
|
1766
|
-
...
|
|
2106
|
+
...t.scaffoldGroup()
|
|
1767
2107
|
});
|
|
1768
2108
|
({
|
|
1769
|
-
...
|
|
2109
|
+
...t.scaffoldGroup()
|
|
1770
2110
|
});
|
|
1771
2111
|
({
|
|
1772
|
-
...
|
|
2112
|
+
...t.scaffoldGroup()
|
|
1773
2113
|
});
|
|
1774
2114
|
({
|
|
1775
|
-
...
|
|
2115
|
+
...t.scaffoldGroup()
|
|
1776
2116
|
});
|
|
1777
2117
|
({
|
|
1778
|
-
...
|
|
2118
|
+
...t.scaffoldGroup()
|
|
1779
2119
|
});
|
|
1780
|
-
const
|
|
2120
|
+
const Q = e.enum([
|
|
1781
2121
|
"MEMBER_REWARD",
|
|
1782
2122
|
"PAID_LOYALTY",
|
|
1783
2123
|
"COLLECT_FEEDBACK",
|
|
@@ -1787,7 +2127,7 @@ const v = e.enum([
|
|
|
1787
2127
|
"BROADCAST",
|
|
1788
2128
|
"BIRTHDAY",
|
|
1789
2129
|
"GAME"
|
|
1790
|
-
]),
|
|
2130
|
+
]), $ = e.enum([
|
|
1791
2131
|
"text",
|
|
1792
2132
|
"number",
|
|
1793
2133
|
"textarea",
|
|
@@ -1813,110 +2153,118 @@ const v = e.enum([
|
|
|
1813
2153
|
"rule_bill",
|
|
1814
2154
|
"rule_feedback",
|
|
1815
2155
|
"rule_birthday",
|
|
1816
|
-
"promotion_game_type"
|
|
1817
|
-
|
|
2156
|
+
"promotion_game_type",
|
|
2157
|
+
"grab_effect",
|
|
2158
|
+
"grab_quota",
|
|
2159
|
+
"grab_conditions"
|
|
2160
|
+
]), Z = e.object({
|
|
1818
2161
|
label: e.string().optional(),
|
|
1819
2162
|
label_locale: e.record(e.string()).nullish(),
|
|
1820
2163
|
property: e.string().or(e.any()),
|
|
1821
|
-
type:
|
|
2164
|
+
type: $,
|
|
1822
2165
|
extras: e.string().optional(),
|
|
1823
2166
|
isRuleChildren: e.boolean().optional()
|
|
1824
|
-
}),
|
|
2167
|
+
}), T = e.object({
|
|
1825
2168
|
not: e.boolean().optional(),
|
|
1826
2169
|
property: e.string(),
|
|
1827
2170
|
value: e.any()
|
|
1828
|
-
}),
|
|
2171
|
+
}), ee = e.object({
|
|
1829
2172
|
name: e.string().optional(),
|
|
1830
2173
|
name_locale: e.record(e.string()).nullish(),
|
|
1831
|
-
fields: e.array(
|
|
1832
|
-
condition:
|
|
1833
|
-
e.array(
|
|
2174
|
+
fields: e.array(Z),
|
|
2175
|
+
condition: T.optional().or(
|
|
2176
|
+
e.array(T)
|
|
1834
2177
|
)
|
|
1835
|
-
}),
|
|
2178
|
+
}), te = e.object({
|
|
1836
2179
|
name: e.string(),
|
|
1837
2180
|
name_locale: e.record(e.string()).nullish(),
|
|
1838
|
-
groups: e.array(
|
|
2181
|
+
groups: e.array(ee)
|
|
1839
2182
|
});
|
|
1840
2183
|
e.object({
|
|
1841
|
-
_id:
|
|
2184
|
+
_id: n,
|
|
1842
2185
|
name: e.string(),
|
|
1843
2186
|
name_locale: e.record(e.string()).nullish(),
|
|
1844
2187
|
description: e.string().nullish(),
|
|
1845
2188
|
description_locale: e.record(e.string()).nullish(),
|
|
1846
|
-
steps: e.array(
|
|
1847
|
-
intention: e.array(
|
|
2189
|
+
steps: e.array(te).min(1),
|
|
2190
|
+
intention: e.array(Q),
|
|
1848
2191
|
defaultValue: e.any()
|
|
1849
2192
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
1850
|
-
const
|
|
2193
|
+
const ae = {
|
|
1851
2194
|
collectionName: "Businesses",
|
|
1852
2195
|
transform: {
|
|
1853
2196
|
_id: "oid"
|
|
1854
2197
|
}
|
|
1855
2198
|
};
|
|
1856
2199
|
e.object({
|
|
1857
|
-
_id:
|
|
2200
|
+
_id: n,
|
|
1858
2201
|
ownerId: e.string(),
|
|
1859
2202
|
name: e.string(),
|
|
1860
2203
|
credit: e.number(),
|
|
1861
2204
|
forceSend: e.boolean().optional()
|
|
1862
|
-
}).describe(
|
|
1863
|
-
const
|
|
2205
|
+
}).describe(m.describe(ae));
|
|
2206
|
+
const S = e.enum(["PHONE"]), ne = e.enum([
|
|
1864
2207
|
"MOCEAN",
|
|
1865
2208
|
"SLACK",
|
|
1866
2209
|
"SMS",
|
|
1867
2210
|
"EMAIL",
|
|
1868
2211
|
"WHATSAPP"
|
|
1869
|
-
]),
|
|
2212
|
+
]), oe = e.enum(["PENDING", "COMPLETED", "FAILED"]), ie = e.enum([
|
|
1870
2213
|
"General",
|
|
1871
2214
|
"Otp",
|
|
1872
2215
|
"Marketing",
|
|
1873
2216
|
"Ordering",
|
|
1874
2217
|
"MemberInvitation",
|
|
1875
2218
|
"MarketingPromotion"
|
|
1876
|
-
]),
|
|
1877
|
-
type:
|
|
1878
|
-
}),
|
|
1879
|
-
type: e.literal(
|
|
1880
|
-
provider:
|
|
1881
|
-
usage:
|
|
1882
|
-
}),
|
|
2219
|
+
]), le = e.object({
|
|
2220
|
+
type: S
|
|
2221
|
+
}), N = le.extend({
|
|
2222
|
+
type: e.literal(S.enum.PHONE),
|
|
2223
|
+
provider: ne,
|
|
2224
|
+
usage: ie.optional()
|
|
2225
|
+
}), re = {
|
|
1883
2226
|
collectionName: "Notifications",
|
|
1884
2227
|
transform: { _id: "oid", business: "oid" }
|
|
1885
2228
|
};
|
|
1886
2229
|
e.object({
|
|
1887
|
-
_id:
|
|
1888
|
-
business:
|
|
2230
|
+
_id: n,
|
|
2231
|
+
business: n,
|
|
1889
2232
|
target: e.string(),
|
|
1890
2233
|
title: e.string().optional(),
|
|
1891
2234
|
message: e.string(),
|
|
1892
|
-
option:
|
|
1893
|
-
status:
|
|
2235
|
+
option: N,
|
|
2236
|
+
status: oe,
|
|
1894
2237
|
ref: e.string().optional()
|
|
1895
|
-
}).describe(
|
|
1896
|
-
e.object({
|
|
2238
|
+
}).describe(m.describe(re));
|
|
2239
|
+
const ce = e.object({
|
|
1897
2240
|
target: e.string(),
|
|
1898
2241
|
title: e.string().optional(),
|
|
1899
2242
|
message: e.string(),
|
|
1900
|
-
option:
|
|
2243
|
+
option: N,
|
|
1901
2244
|
ref: e.string().optional()
|
|
1902
2245
|
});
|
|
2246
|
+
e.object({
|
|
2247
|
+
campaignId: e.string(),
|
|
2248
|
+
notification: ce,
|
|
2249
|
+
business: e.string()
|
|
2250
|
+
});
|
|
1903
2251
|
e.object({
|
|
1904
2252
|
phone: e.string(),
|
|
1905
2253
|
message: e.string()
|
|
1906
2254
|
});
|
|
1907
|
-
const
|
|
2255
|
+
const v = e.object({
|
|
1908
2256
|
name: e.string().optional(),
|
|
1909
2257
|
address: e.string()
|
|
1910
|
-
}),
|
|
2258
|
+
}), pe = e.object({
|
|
1911
2259
|
filename: e.string(),
|
|
1912
2260
|
content: e.instanceof(Uint8Array)
|
|
1913
2261
|
});
|
|
1914
2262
|
e.object({
|
|
1915
|
-
from:
|
|
1916
|
-
to: e.array(
|
|
2263
|
+
from: v.optional(),
|
|
2264
|
+
to: e.array(v),
|
|
1917
2265
|
subject: e.string(),
|
|
1918
2266
|
html: e.string().optional(),
|
|
1919
|
-
attachments: e.array(
|
|
2267
|
+
attachments: e.array(pe).optional()
|
|
1920
2268
|
});
|
|
1921
2269
|
e.object({
|
|
1922
2270
|
subject: e.string(),
|
|
@@ -1956,7 +2304,7 @@ e.object({
|
|
|
1956
2304
|
billId: e.string()
|
|
1957
2305
|
});
|
|
1958
2306
|
e.object({
|
|
1959
|
-
amount:
|
|
2307
|
+
amount: R,
|
|
1960
2308
|
member: e.string(),
|
|
1961
2309
|
bill: e.string(),
|
|
1962
2310
|
otp: e.string().nullish(),
|
|
@@ -1965,15 +2313,15 @@ e.object({
|
|
|
1965
2313
|
e.object({
|
|
1966
2314
|
orderId: e.string()
|
|
1967
2315
|
});
|
|
1968
|
-
var
|
|
1969
|
-
e.nativeEnum(
|
|
2316
|
+
var U = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(U || {});
|
|
2317
|
+
e.nativeEnum(U);
|
|
1970
2318
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
1971
2319
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
1972
2320
|
e.enum(["quota"]);
|
|
1973
|
-
var
|
|
1974
|
-
e.nativeEnum(
|
|
2321
|
+
var P = /* @__PURE__ */ ((o) => (o.marketing = "business::marketing", o.campaign = "business::campaign", o.counter = "business::counter", o.permission = "business::permission", o.role = "business::role", o))(P || {});
|
|
2322
|
+
e.nativeEnum(P);
|
|
1975
2323
|
e.enum(["restaurant"]);
|
|
1976
|
-
const
|
|
2324
|
+
const me = e.object({
|
|
1977
2325
|
label: e.string(),
|
|
1978
2326
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
1979
2327
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -1983,41 +2331,41 @@ const D = e.object({
|
|
|
1983
2331
|
reason: e.string().optional()
|
|
1984
2332
|
});
|
|
1985
2333
|
e.object({
|
|
1986
|
-
_id:
|
|
2334
|
+
_id: n,
|
|
1987
2335
|
businessId: e.string(),
|
|
1988
2336
|
userId: e.string(),
|
|
1989
2337
|
email: e.string().nullish(),
|
|
1990
2338
|
phoneNo: e.string().nullish(),
|
|
1991
|
-
permissions: e.array(e.lazy(() =>
|
|
2339
|
+
permissions: e.array(e.lazy(() => me))
|
|
1992
2340
|
}).describe(
|
|
1993
|
-
|
|
2341
|
+
m.describe({
|
|
1994
2342
|
collectionName: "PermissionUsers",
|
|
1995
2343
|
transform: {
|
|
1996
2344
|
_id: "oid"
|
|
1997
2345
|
}
|
|
1998
2346
|
})
|
|
1999
2347
|
);
|
|
2000
|
-
const
|
|
2348
|
+
const j = e.object({
|
|
2001
2349
|
userId: e.string(),
|
|
2002
2350
|
level: e.number(),
|
|
2003
2351
|
role: e.string().optional(),
|
|
2004
2352
|
businessId: e.string().optional(),
|
|
2005
2353
|
restaurantId: e.string().optional()
|
|
2006
|
-
}),
|
|
2354
|
+
}), se = e.function().args(e.any(), j).returns(e.boolean()), ge = e.function().args(j).returns(e.promise(e.array(e.any())));
|
|
2007
2355
|
e.object({
|
|
2008
|
-
isAdmin:
|
|
2009
|
-
getRules:
|
|
2356
|
+
isAdmin: se,
|
|
2357
|
+
getRules: ge
|
|
2010
2358
|
});
|
|
2011
2359
|
e.object({
|
|
2012
|
-
transactions: e.array(
|
|
2013
|
-
collections: e.array(
|
|
2360
|
+
transactions: e.array(x),
|
|
2361
|
+
collections: e.array(D)
|
|
2014
2362
|
});
|
|
2015
|
-
const
|
|
2363
|
+
const J = e.enum([
|
|
2016
2364
|
"ROCK_PAPER_SCISSOR"
|
|
2017
2365
|
]);
|
|
2018
|
-
|
|
2366
|
+
J.enum.ROCK_PAPER_SCISSOR + "";
|
|
2019
2367
|
e.object({
|
|
2020
|
-
type:
|
|
2368
|
+
type: J
|
|
2021
2369
|
});
|
|
2022
2370
|
e.object({
|
|
2023
2371
|
host: e.string().url(),
|
|
@@ -2026,7 +2374,7 @@ e.object({
|
|
|
2026
2374
|
roomId: e.string()
|
|
2027
2375
|
});
|
|
2028
2376
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
2029
|
-
const
|
|
2377
|
+
const de = {
|
|
2030
2378
|
collectionName: "MarketingMaterials",
|
|
2031
2379
|
transform: {
|
|
2032
2380
|
_id: "oid",
|
|
@@ -2034,13 +2382,13 @@ const G = {
|
|
|
2034
2382
|
}
|
|
2035
2383
|
};
|
|
2036
2384
|
e.object({
|
|
2037
|
-
_id:
|
|
2038
|
-
business:
|
|
2385
|
+
_id: n,
|
|
2386
|
+
business: n,
|
|
2039
2387
|
imageUrl: e.string().url(),
|
|
2040
2388
|
headline: e.string(),
|
|
2041
2389
|
caption: e.string(),
|
|
2042
2390
|
editedAt: e.coerce.date()
|
|
2043
|
-
}).describe(
|
|
2391
|
+
}).describe(m.describe(de));
|
|
2044
2392
|
e.object({
|
|
2045
2393
|
id: e.number(),
|
|
2046
2394
|
name: e.string(),
|
|
@@ -2060,12 +2408,12 @@ e.object({
|
|
|
2060
2408
|
phone: e.string().optional(),
|
|
2061
2409
|
email: e.string().optional()
|
|
2062
2410
|
});
|
|
2063
|
-
const
|
|
2411
|
+
const ue = e.enum([
|
|
2064
2412
|
"PENDING",
|
|
2065
2413
|
"SUCCESS",
|
|
2066
2414
|
"FAILED",
|
|
2067
2415
|
"RETRYING"
|
|
2068
|
-
]),
|
|
2416
|
+
]), he = {
|
|
2069
2417
|
collectionName: "WebhookLogs",
|
|
2070
2418
|
transform: {
|
|
2071
2419
|
_id: "oid",
|
|
@@ -2073,39 +2421,39 @@ const A = e.enum([
|
|
|
2073
2421
|
}
|
|
2074
2422
|
};
|
|
2075
2423
|
e.object({
|
|
2076
|
-
_id:
|
|
2077
|
-
business:
|
|
2424
|
+
_id: n,
|
|
2425
|
+
business: n,
|
|
2078
2426
|
type: e.string(),
|
|
2079
2427
|
payload: e.record(e.any()),
|
|
2080
|
-
status:
|
|
2428
|
+
status: ue,
|
|
2081
2429
|
response: e.any().optional(),
|
|
2082
2430
|
error: e.string().optional()
|
|
2083
|
-
}).describe(
|
|
2084
|
-
const
|
|
2431
|
+
}).describe(m.describe(he));
|
|
2432
|
+
const _e = e.enum(["AUTO", "MANUAL"]);
|
|
2085
2433
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2086
|
-
const
|
|
2087
|
-
_id:
|
|
2434
|
+
const E = e.object({
|
|
2435
|
+
_id: n,
|
|
2088
2436
|
name: e.string().min(1, "Name is required").max(50),
|
|
2089
|
-
type:
|
|
2090
|
-
event:
|
|
2091
|
-
}),
|
|
2437
|
+
type: _e,
|
|
2438
|
+
event: w.optional()
|
|
2439
|
+
}), ye = e.object({
|
|
2092
2440
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2093
2441
|
to: e.number().int("Must be integer").nullish()
|
|
2094
|
-
}).superRefine((
|
|
2095
|
-
|
|
2442
|
+
}).superRefine((o, a) => {
|
|
2443
|
+
o.from && o.to && o.from > o.to && a.addIssue({
|
|
2096
2444
|
code: "custom",
|
|
2097
2445
|
message: "Max referral count must be more than min referral count"
|
|
2098
2446
|
});
|
|
2099
|
-
}),
|
|
2100
|
-
threshold:
|
|
2101
|
-
rewards: e.array(
|
|
2102
|
-
pf_reward: e.array(
|
|
2103
|
-
}),
|
|
2447
|
+
}), fe = e.object({
|
|
2448
|
+
threshold: ye,
|
|
2449
|
+
rewards: e.array(n),
|
|
2450
|
+
pf_reward: e.array(H).optional()
|
|
2451
|
+
}), z = e.object({
|
|
2104
2452
|
id: e.string(),
|
|
2105
2453
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2106
|
-
rule:
|
|
2107
|
-
rewards: e.array(
|
|
2108
|
-
}),
|
|
2454
|
+
rule: G.optional(),
|
|
2455
|
+
rewards: e.array(fe)
|
|
2456
|
+
}), be = {
|
|
2109
2457
|
collectionName: "ReferralRecords",
|
|
2110
2458
|
transform: {
|
|
2111
2459
|
_id: "oid",
|
|
@@ -2114,25 +2462,25 @@ const y = e.object({
|
|
|
2114
2462
|
referee: "oid",
|
|
2115
2463
|
refereeReward: "oid"
|
|
2116
2464
|
}
|
|
2117
|
-
},
|
|
2465
|
+
}, He = e.object({
|
|
2118
2466
|
completedAt: e.coerce.date(),
|
|
2119
|
-
criteria:
|
|
2467
|
+
criteria: n,
|
|
2120
2468
|
ref: e.string()
|
|
2121
|
-
}),
|
|
2122
|
-
_id:
|
|
2123
|
-
business:
|
|
2124
|
-
referer:
|
|
2125
|
-
referee:
|
|
2126
|
-
criteria: e.array(
|
|
2127
|
-
reward: e.array(
|
|
2128
|
-
refereeReward: e.array(
|
|
2129
|
-
criteria_progress: e.array(
|
|
2469
|
+
}), ze = e.object({
|
|
2470
|
+
_id: n,
|
|
2471
|
+
business: n,
|
|
2472
|
+
referer: n,
|
|
2473
|
+
referee: n,
|
|
2474
|
+
criteria: e.array(E),
|
|
2475
|
+
reward: e.array(z),
|
|
2476
|
+
refereeReward: e.array(n).optional(),
|
|
2477
|
+
criteria_progress: e.array(He),
|
|
2130
2478
|
status: e.string(),
|
|
2131
|
-
pf_referer:
|
|
2132
|
-
pf_referee:
|
|
2133
|
-
pf_refereeReward: e.array(
|
|
2134
|
-
}).describe(
|
|
2135
|
-
|
|
2479
|
+
pf_referer: g.optional(),
|
|
2480
|
+
pf_referee: g.optional(),
|
|
2481
|
+
pf_refereeReward: e.array(H).optional()
|
|
2482
|
+
}).describe(m.describe(be));
|
|
2483
|
+
ze.pick({
|
|
2136
2484
|
_id: !0,
|
|
2137
2485
|
business: !0,
|
|
2138
2486
|
referer: !0,
|
|
@@ -2140,57 +2488,332 @@ W.pick({
|
|
|
2140
2488
|
criteria_progress: !0,
|
|
2141
2489
|
criteria: !0
|
|
2142
2490
|
}).extend({
|
|
2143
|
-
pf_referee:
|
|
2491
|
+
pf_referee: g.pick({
|
|
2144
2492
|
_id: !0,
|
|
2145
2493
|
name: !0,
|
|
2146
2494
|
phoneNumber: !0,
|
|
2147
2495
|
photoUrl: !0
|
|
2148
2496
|
})
|
|
2149
2497
|
});
|
|
2150
|
-
const
|
|
2498
|
+
const Ce = {
|
|
2151
2499
|
collectionName: "ReferralProgram",
|
|
2152
2500
|
transform: {
|
|
2153
2501
|
_id: "oid",
|
|
2154
2502
|
business: "oid"
|
|
2155
2503
|
}
|
|
2156
|
-
},
|
|
2157
|
-
_id:
|
|
2158
|
-
business:
|
|
2504
|
+
}, O = e.object({
|
|
2505
|
+
_id: n,
|
|
2506
|
+
business: n,
|
|
2159
2507
|
term_and_condition: e.string().optional(),
|
|
2160
|
-
refereeReward: e.array(
|
|
2161
|
-
reward: e.array(
|
|
2162
|
-
criteria: e.array(
|
|
2163
|
-
}).describe(
|
|
2508
|
+
refereeReward: e.array(n).optional(),
|
|
2509
|
+
reward: e.array(z),
|
|
2510
|
+
criteria: e.array(E)
|
|
2511
|
+
}).describe(m.describe(Ce));
|
|
2164
2512
|
e.object({
|
|
2165
|
-
referer:
|
|
2166
|
-
referee:
|
|
2167
|
-
business:
|
|
2513
|
+
referer: n,
|
|
2514
|
+
referee: n,
|
|
2515
|
+
business: n
|
|
2168
2516
|
});
|
|
2169
2517
|
e.object({
|
|
2170
|
-
program:
|
|
2518
|
+
program: O.pick({
|
|
2171
2519
|
_id: !0,
|
|
2172
2520
|
business: !0,
|
|
2173
2521
|
term_and_condition: !0
|
|
2174
2522
|
}).extend({
|
|
2175
|
-
reward:
|
|
2176
|
-
pf_refereeReward: e.array(
|
|
2523
|
+
reward: z.optional(),
|
|
2524
|
+
pf_refereeReward: e.array(H).optional()
|
|
2177
2525
|
}),
|
|
2178
2526
|
referralCount: e.number(),
|
|
2179
2527
|
successReferralCount: e.number(),
|
|
2180
|
-
referredBy:
|
|
2528
|
+
referredBy: g.pick({
|
|
2181
2529
|
_id: !0,
|
|
2182
2530
|
name: !0,
|
|
2183
2531
|
phoneNumber: !0,
|
|
2184
2532
|
photoUrl: !0
|
|
2185
2533
|
}).optional()
|
|
2186
2534
|
});
|
|
2187
|
-
|
|
2535
|
+
O.extend({
|
|
2188
2536
|
updateReferralRecord: e.boolean().optional()
|
|
2189
2537
|
});
|
|
2538
|
+
const Te = e.object({
|
|
2539
|
+
facebookPageId: e.string(),
|
|
2540
|
+
pageName: e.string(),
|
|
2541
|
+
pageProfileImageUrl: e.string(),
|
|
2542
|
+
pageAccessToken: e.string().optional(),
|
|
2543
|
+
locationIds: e.array(n)
|
|
2544
|
+
}), ve = e.object({
|
|
2545
|
+
locationId: n.nullable(),
|
|
2546
|
+
googleLocationName: e.string(),
|
|
2547
|
+
displayName: e.string().optional()
|
|
2548
|
+
}), Se = e.object({
|
|
2549
|
+
accessToken: e.string().nullable(),
|
|
2550
|
+
refreshToken: e.string().nullable(),
|
|
2551
|
+
accessTokenExpiresAt: e.date().nullable(),
|
|
2552
|
+
locations: e.array(ve)
|
|
2553
|
+
}), Ne = e.object({
|
|
2554
|
+
token: e.string().nullable(),
|
|
2555
|
+
pages: e.array(Te)
|
|
2556
|
+
});
|
|
2557
|
+
e.object({
|
|
2558
|
+
_id: n,
|
|
2559
|
+
businessId: n,
|
|
2560
|
+
google: Se.nullable(),
|
|
2561
|
+
facebook: Ne.nullable()
|
|
2562
|
+
}).describe(
|
|
2563
|
+
m.describe({
|
|
2564
|
+
collectionName: "ReviewSourceConfig",
|
|
2565
|
+
transform: {
|
|
2566
|
+
_id: "oid",
|
|
2567
|
+
businessId: "oid"
|
|
2568
|
+
}
|
|
2569
|
+
})
|
|
2570
|
+
);
|
|
2571
|
+
e.object({
|
|
2572
|
+
code: e.string(),
|
|
2573
|
+
redirectUri: e.string(),
|
|
2574
|
+
state: e.string()
|
|
2575
|
+
});
|
|
2576
|
+
e.object({
|
|
2577
|
+
locations: e.array(
|
|
2578
|
+
e.object({
|
|
2579
|
+
googleLocationName: e.string(),
|
|
2580
|
+
locationId: e.string().nullable(),
|
|
2581
|
+
displayName: e.string().optional()
|
|
2582
|
+
})
|
|
2583
|
+
)
|
|
2584
|
+
});
|
|
2585
|
+
e.object({
|
|
2586
|
+
token: e.string()
|
|
2587
|
+
});
|
|
2588
|
+
e.object({
|
|
2589
|
+
pages: e.array(
|
|
2590
|
+
e.object({
|
|
2591
|
+
facebookPageId: e.string(),
|
|
2592
|
+
locationIds: e.array(e.string())
|
|
2593
|
+
})
|
|
2594
|
+
)
|
|
2595
|
+
});
|
|
2596
|
+
e.object({
|
|
2597
|
+
_id: e.string(),
|
|
2598
|
+
google: e.object({
|
|
2599
|
+
accessToken: e.string().nullable(),
|
|
2600
|
+
accessTokenExpiresAt: e.string().datetime().nullable(),
|
|
2601
|
+
locations: e.array(
|
|
2602
|
+
e.object({
|
|
2603
|
+
googleLocationName: e.string(),
|
|
2604
|
+
displayName: e.string().optional(),
|
|
2605
|
+
locationId: e.string().nullable()
|
|
2606
|
+
})
|
|
2607
|
+
)
|
|
2608
|
+
}).nullable(),
|
|
2609
|
+
facebook: e.object({
|
|
2610
|
+
token: e.string().nullable(),
|
|
2611
|
+
pages: e.array(
|
|
2612
|
+
e.object({
|
|
2613
|
+
facebookPageId: e.string(),
|
|
2614
|
+
pageName: e.string(),
|
|
2615
|
+
pageProfileImageUrl: e.string(),
|
|
2616
|
+
locationIds: e.array(e.string())
|
|
2617
|
+
})
|
|
2618
|
+
)
|
|
2619
|
+
}).nullable()
|
|
2620
|
+
});
|
|
2621
|
+
const d = e.object({
|
|
2622
|
+
name: e.string(),
|
|
2623
|
+
pictureUrl: e.string(),
|
|
2624
|
+
phoneNumber: e.string().optional()
|
|
2625
|
+
}), Ue = d.extend({
|
|
2626
|
+
isAnonymous: e.boolean().optional()
|
|
2627
|
+
}), Pe = d.extend({
|
|
2628
|
+
id: e.string().optional()
|
|
2629
|
+
}), u = e.object({
|
|
2630
|
+
comment: e.string(),
|
|
2631
|
+
updateTime: e.coerce.date()
|
|
2632
|
+
}), s = e.object({
|
|
2633
|
+
externalId: e.string().optional(),
|
|
2634
|
+
thumbnailUrl: e.string(),
|
|
2635
|
+
thumbnailLabel: e.string(),
|
|
2636
|
+
videoUrl: e.string().optional()
|
|
2637
|
+
}), je = {
|
|
2638
|
+
collectionName: "Reviews",
|
|
2639
|
+
transform: {
|
|
2640
|
+
_id: "oid",
|
|
2641
|
+
businessId: "oid",
|
|
2642
|
+
reviewerId: "oid",
|
|
2643
|
+
restaurantId: "oid"
|
|
2644
|
+
}
|
|
2645
|
+
}, I = e.enum([
|
|
2646
|
+
"google",
|
|
2647
|
+
"facebook",
|
|
2648
|
+
"feedme",
|
|
2649
|
+
"feedvibe"
|
|
2650
|
+
]);
|
|
2651
|
+
I.options;
|
|
2652
|
+
e.enum(["google", "facebook"]);
|
|
2653
|
+
const Je = e.enum([
|
|
2654
|
+
"createTime_desc",
|
|
2655
|
+
"createTime_asc",
|
|
2656
|
+
"rating_asc",
|
|
2657
|
+
"rating_desc"
|
|
2658
|
+
]);
|
|
2659
|
+
e.object({
|
|
2660
|
+
source: I.array().optional(),
|
|
2661
|
+
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
2662
|
+
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
2663
|
+
locationId: e.string().optional(),
|
|
2664
|
+
excludeDeleted: e.boolean().optional(),
|
|
2665
|
+
sort: Je.optional(),
|
|
2666
|
+
limit: e.coerce.number().int().positive().optional(),
|
|
2667
|
+
skip: e.coerce.number().int().min(0).optional()
|
|
2668
|
+
});
|
|
2669
|
+
const Xe = e.object({
|
|
2670
|
+
averageScore: e.number(),
|
|
2671
|
+
total: e.number().int().nonnegative(),
|
|
2672
|
+
starCounts: e.array(
|
|
2673
|
+
e.object({
|
|
2674
|
+
star: e.number().int().min(1).max(5),
|
|
2675
|
+
count: e.number().int().nonnegative()
|
|
2676
|
+
})
|
|
2677
|
+
)
|
|
2678
|
+
}), h = e.object({
|
|
2679
|
+
name: e.string(),
|
|
2680
|
+
pictureUrl: e.string().optional(),
|
|
2681
|
+
phoneNumber: e.string().optional()
|
|
2682
|
+
}), Ee = h.extend({
|
|
2683
|
+
_id: e.string().optional()
|
|
2684
|
+
}), Oe = h.extend({
|
|
2685
|
+
_id: e.string()
|
|
2686
|
+
}), Ie = h.extend({
|
|
2687
|
+
isAnonymous: e.boolean().optional()
|
|
2688
|
+
}), Re = h.extend({
|
|
2689
|
+
id: e.string().optional()
|
|
2690
|
+
}), _ = e.object({
|
|
2691
|
+
_id: n,
|
|
2692
|
+
comment: e.string(),
|
|
2693
|
+
createTime: e.coerce.date(),
|
|
2694
|
+
updateTime: e.coerce.date().nullish(),
|
|
2695
|
+
restaurantId: n,
|
|
2696
|
+
restaurantName: e.string()
|
|
2697
|
+
}), Le = _.extend({
|
|
2698
|
+
source: e.literal("google"),
|
|
2699
|
+
externalId: e.string().min(1),
|
|
2700
|
+
translatedComment: e.string().optional(),
|
|
2701
|
+
reviewer: Ie.optional(),
|
|
2702
|
+
reply: u.optional(),
|
|
2703
|
+
mediaItems: e.array(s),
|
|
2704
|
+
starRating: e.number(),
|
|
2705
|
+
locationName: e.string(),
|
|
2706
|
+
locationDisplayName: e.string()
|
|
2707
|
+
}), xe = _.extend({
|
|
2708
|
+
source: e.literal("facebook"),
|
|
2709
|
+
externalId: e.string().min(1),
|
|
2710
|
+
reviewer: Re.optional(),
|
|
2711
|
+
isPositive: e.boolean().optional(),
|
|
2712
|
+
pageId: e.string(),
|
|
2713
|
+
pageName: e.string()
|
|
2714
|
+
}), De = _.extend({
|
|
2715
|
+
source: e.literal("feedme"),
|
|
2716
|
+
reviewer: Ee.optional(),
|
|
2717
|
+
reply: u.optional(),
|
|
2718
|
+
starRating: e.number(),
|
|
2719
|
+
mediaItems: e.array(s),
|
|
2720
|
+
billId: e.string()
|
|
2721
|
+
}), we = _.extend({
|
|
2722
|
+
source: e.literal("feedvibe"),
|
|
2723
|
+
externalId: e.string().min(1),
|
|
2724
|
+
reviewer: Oe.optional(),
|
|
2725
|
+
rating: e.object({
|
|
2726
|
+
overall: e.number(),
|
|
2727
|
+
food: e.number(),
|
|
2728
|
+
service: e.number(),
|
|
2729
|
+
atmosphere: e.number()
|
|
2730
|
+
}),
|
|
2731
|
+
verified: e.boolean(),
|
|
2732
|
+
mediaItems: e.array(s).default([])
|
|
2733
|
+
});
|
|
2734
|
+
e.discriminatedUnion("source", [
|
|
2735
|
+
Le,
|
|
2736
|
+
xe,
|
|
2737
|
+
De,
|
|
2738
|
+
we
|
|
2739
|
+
]);
|
|
2740
|
+
e.object({
|
|
2741
|
+
comment: e.string(),
|
|
2742
|
+
starRating: e.number(),
|
|
2743
|
+
billId: e.string(),
|
|
2744
|
+
isAnonymous: e.boolean(),
|
|
2745
|
+
mediaItems: e.array(s).optional()
|
|
2746
|
+
});
|
|
2747
|
+
e.object({
|
|
2748
|
+
name: e.string().trim().min(1),
|
|
2749
|
+
phoneNumber: e.string().trim().min(1).optional()
|
|
2750
|
+
});
|
|
2751
|
+
const y = e.object({
|
|
2752
|
+
_id: n,
|
|
2753
|
+
businessId: n,
|
|
2754
|
+
comment: e.string(),
|
|
2755
|
+
createTime: e.coerce.date(),
|
|
2756
|
+
updateTime: e.coerce.date().nullish(),
|
|
2757
|
+
restaurantId: n,
|
|
2758
|
+
restaurantName: e.string(),
|
|
2759
|
+
deletedAt: e.coerce.date().optional()
|
|
2760
|
+
}), Ae = y.extend({
|
|
2761
|
+
source: e.literal("google"),
|
|
2762
|
+
externalId: e.string().min(1),
|
|
2763
|
+
translatedComment: e.string().optional(),
|
|
2764
|
+
reviewer: Ue.optional(),
|
|
2765
|
+
reply: u.optional(),
|
|
2766
|
+
mediaItems: e.array(s),
|
|
2767
|
+
starRating: e.number(),
|
|
2768
|
+
locationName: e.string(),
|
|
2769
|
+
locationDisplayName: e.string()
|
|
2770
|
+
}), Ge = y.extend({
|
|
2771
|
+
source: e.literal("facebook"),
|
|
2772
|
+
externalId: e.string().min(1),
|
|
2773
|
+
reviewer: Pe.optional(),
|
|
2774
|
+
isPositive: e.boolean().optional(),
|
|
2775
|
+
pageId: e.string(),
|
|
2776
|
+
pageName: e.string()
|
|
2777
|
+
}), Me = y.extend({
|
|
2778
|
+
source: e.literal("feedme"),
|
|
2779
|
+
isAnonymous: e.boolean(),
|
|
2780
|
+
reviewerId: n.optional(),
|
|
2781
|
+
reviewer: d.optional(),
|
|
2782
|
+
reply: u.optional(),
|
|
2783
|
+
starRating: e.number(),
|
|
2784
|
+
billId: e.string(),
|
|
2785
|
+
mediaItems: e.array(s)
|
|
2786
|
+
}), Fe = y.extend({
|
|
2787
|
+
source: e.literal("feedvibe"),
|
|
2788
|
+
externalId: e.string().min(1),
|
|
2789
|
+
reviewerId: n,
|
|
2790
|
+
reviewer: d,
|
|
2791
|
+
rating: e.object({
|
|
2792
|
+
overall: e.number(),
|
|
2793
|
+
food: e.number(),
|
|
2794
|
+
service: e.number(),
|
|
2795
|
+
atmosphere: e.number()
|
|
2796
|
+
}),
|
|
2797
|
+
verified: e.boolean(),
|
|
2798
|
+
mediaItems: e.array(s).default([])
|
|
2799
|
+
});
|
|
2800
|
+
e.discriminatedUnion("source", [
|
|
2801
|
+
Ae,
|
|
2802
|
+
Ge,
|
|
2803
|
+
Me,
|
|
2804
|
+
Fe
|
|
2805
|
+
]).describe(m.describe(je));
|
|
2190
2806
|
export {
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2807
|
+
Q as F,
|
|
2808
|
+
t as R,
|
|
2809
|
+
We as T,
|
|
2810
|
+
M as a,
|
|
2811
|
+
fe as b,
|
|
2812
|
+
E as c,
|
|
2813
|
+
z as d,
|
|
2814
|
+
K as e,
|
|
2815
|
+
W as f,
|
|
2816
|
+
Xe as g,
|
|
2817
|
+
b as i,
|
|
2818
|
+
B as s
|
|
2196
2819
|
};
|