@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-BHDjuMfN.js +426 -0
- package/dist/{App-DsB2o1oB.js → App-BSSze_b9.js} +106 -118
- package/dist/{Bin-DMr7K8Kj.js → Bin-DfzoQbE0.js} +8 -8
- package/dist/{Broadcast-C9akM-TB.js → Broadcast-DsqO4SXX.js} +17 -18
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQ0x2VJp.js} +6 -5
- package/dist/{Card-DRkIYs0M.js → Card-VxbqomXV.js} +19 -19
- package/dist/{Collections-B0uGC2FE.js → Collections-CvD98I3M.js} +185 -197
- package/dist/{Credit-V5YA_hGx.js → Credit-BhM2m2L2.js} +53 -54
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DvfrrjHc.js +2223 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-CPx9U9fU.js} +6 -6
- package/dist/{Experience-WTWy5yY6.js → Experience-uWQRb-qf.js} +34 -35
- package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-DKNoHTvP.js} +1 -1
- package/dist/{Game-BwOfTCW5.js → Game-BgT3oNx7.js} +15 -16
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-ClqrJbU6.js} +1 -1
- package/dist/{Index-m7l4insz.js → Index-D3RgVj9V.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CkCpumzB.js} +1 -1
- package/dist/{MainLayout-Du5kZOtA.js → MainLayout-B2RiPsIR.js} +1 -1
- package/dist/{Marketing-C9pSIdBU.js → Marketing-FrE7k7eW.js} +4 -4
- package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-DGNjEUu-.js} +211 -214
- package/dist/{Member-DUV_vbPI.js → Member-CgTagUQ9.js} +20 -20
- package/dist/{MemberList-Ye4nOk-i.js → MemberList-CKbzsDMX.js} +51 -50
- package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-CnY5cFdv.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DqivG_O4.js} +11 -11
- package/dist/{Mission-BBmCGpt8.js → Mission-BGNqy7wQ.js} +34 -35
- package/dist/{Overview-DOJj4XvO.js → Overview-CnpF74wa.js} +19 -19
- package/dist/{Point-Bzg6hi6o.js → Point-BHgIy7Bz.js} +29 -30
- package/dist/{Promotion-BMXIp_ef.js → Promotion-CNQvO5Lq.js} +105 -111
- package/dist/{Queue-55G2gtP5.js → Queue-CoPBE0UP.js} +43 -43
- package/dist/{Record-DNPI02c6.js → Record-BuDQ15FJ.js} +10 -10
- package/dist/{Reward-CnP8R2pS.js → Reward-BQlCO3Dk.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-nhNr_T7D.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-lnxwLa8o.js +1888 -0
- package/dist/{Segment-CxiQnnyj.js → Segment-DKFAXGzY.js} +78 -77
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js → SelectItems.vue_vue_type_script_setup_true_lang-CUR7djaM.js} +3 -3
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CZ3s2W8Q.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbilZk82.js} +4 -4
- package/dist/{Setting-jHAjccod.js → Setting-hrDZ1cQR.js} +248 -259
- package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-CQsx4JqQ.js} +13 -13
- package/dist/{Store-Cu-hKmVa.js → Store-Cgmsklnt.js} +24 -24
- package/dist/{StoreRewards-DILeipMG.js → StoreRewards-CrPO4DKG.js} +16 -16
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-yesp6BoT.js +1118 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BnKybdKJ.js +142 -0
- package/dist/{Tier-BAZ1xuKL.js → Tier-DgKMMyKr.js} +469 -544
- package/dist/{Title-CcNAt47f.js → Title-BKijiEFV.js} +92 -93
- package/dist/{Transaction-D7DO3dKQ.js → Transaction-zHL4q_wj.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DjafpVOa.js} +6 -6
- package/dist/{Voucher-Cq-n1CaC.js → Voucher-DW4-SD1w.js} +27 -28
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-y2wm2Bcu.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-BWZUE554.js} +2 -2
- package/dist/{app-Z-UKRG5V.js → app-B23RANXL.js} +3083 -3663
- package/dist/app.js +3 -4
- package/dist/{business-C7EF6cKC.js → business-BFU-2tpT.js} +1 -1
- package/dist/{campaign-DHBuP4UA.js → campaign-BEKKOWya.js} +64 -114
- package/dist/{campaign--MjoY1Mn.js → campaign-CwlWx58O.js} +7 -13
- package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-5KIiekYl.js} +2 -3
- package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-CyWn_KL-.js} +130 -130
- package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-DmmR-4Nj.js} +1 -1
- package/dist/collection.fn-BB1OjBHL.js +26 -0
- package/dist/dto-p31OYANk.js +216 -0
- package/dist/{effect-BcB8IlTI.js → effect-DNDXE2iM.js} +1 -1
- package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-DXSkxrZ6.js} +2 -2
- package/dist/{export-CjB7qxZ9.js → export-zMj-UAnF.js} +3 -3
- package/dist/{helper-BSgrCJRv.js → helper-D32ml7Qv.js} +1 -1
- package/dist/{index-HXiYGO4_.js → index-9jgqbdnt.js} +7 -7
- package/dist/{index-hlyg-wxV.js → index-B2OiTtF5.js} +1 -1
- package/dist/{index-CoHWpylO.js → index-B9-jeiQR.js} +1281 -1518
- package/dist/{index-iMPtFp54.js → index-BWHk6oqv.js} +3 -3
- package/dist/{index-hbyCVNa7.js → index-BmmFSQPd.js} +3 -3
- package/dist/{index-CsoBDon4.js → index-CA09A75h.js} +1968 -1996
- package/dist/index-Cc15IFUt.js +55 -0
- package/dist/{index-BpI-BI4H.js → index-CcnOzrwY.js} +1 -1
- package/dist/{index-VlFWaBrg.js → index-DSGHkaP0.js} +1 -1
- package/dist/{index-BoYEqLif.js → index-DvHLsdIR.js} +205 -817
- package/dist/{index-Bf6jNZit.js → index-PrTZHXNT.js} +1 -1
- package/dist/{index-BIAjmMga.js → index-txVWLdtz.js} +1 -1
- package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-BJG8dqci.js} +209 -209
- package/dist/{loading-CSXr0Yqz.js → loading-DuZVM_Ow.js} +1 -1
- package/dist/{lodash-Bh7XKI-R.js → lodash-DqQem5rZ.js} +1 -1
- package/dist/{membership-CfredTm3.js → membership-CvoEzwor.js} +3 -3
- package/dist/{money-BZIST_m9.js → money-B9PJ_JYh.js} +1 -1
- package/dist/{number-DXLR2w95.js → number-GIC15kny.js} +1 -1
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectid-CtJ4pTf2.js +145 -0
- package/dist/{plugins-4FlbwoES.js → plugins-XAhAFHmZ.js} +95 -94
- package/dist/{reward-DUbl79bZ.js → reward-Dy0Z6PLL.js} +1 -1
- package/dist/{rule-BQUoZ4l_.js → rule-CUu9I1Ly.js} +487 -505
- package/dist/rule-builder-DPmaehAO.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-BHtdbnoX.js +236 -0
- package/dist/{index-CIBPhxlC.js → timezone-BE1YhvLN.js} +20 -21
- package/dist/{trigger-D5g5m6tT.js → trigger-BcHfjuiZ.js} +5 -5
- package/dist/{useMarketingMaterialActions-B-Jlw2Z9.js → useMarketingMaterialActions-YQq4LWOp.js} +3 -3
- package/dist/{usePagination-DHePBBoR.js → usePagination-B1KK2gTx.js} +1 -1
- package/dist/{user-C_ToSo-g.js → user-BTRRi1B3.js} +1 -1
- package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-D8NX5Rry.js} +298 -298
- package/dist/{xlsx-h4G1C-xj.js → xlsx-C9LzK7Kg.js} +1 -1
- package/dist/{zod-CgigfJar.js → zod-D3ciRzE4.js} +1 -1
- package/package.json +4 -8
- package/dist/AuditLogs-BcfgiYnJ.js +0 -2013
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
- package/dist/Grab-DmmwrGzk.js +0 -300
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js +0 -48
- package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
- package/dist/Review-CYNPPxYU.js +0 -1141
- package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
- package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js +0 -1911
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js +0 -7007
- package/dist/duplicateCampaign-2ODeDw3a.js +0 -51
- package/dist/index-Bm0QPucw.js +0 -67
- package/dist/index-Bv4MBLQ5.js +0 -52
- package/dist/object-BYyQ0PZp.js +0 -18
- package/dist/objectid-Dg4ZodlT.js +0 -145
- package/dist/template-BoiSG7G7.js +0 -188
|
@@ -1,184 +1,10 @@
|
|
|
1
|
-
import { z as e, F as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
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 y(o) {
|
|
14
|
-
return !o.property && "rules" in o;
|
|
15
|
-
}
|
|
16
|
-
function k(o) {
|
|
17
|
-
return "property" in o && !!o.property;
|
|
18
|
-
}
|
|
19
|
-
const B = "g_schedule";
|
|
20
|
-
function V(o) {
|
|
21
|
-
return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
22
|
-
`).trim();
|
|
23
|
-
}
|
|
24
|
-
function Y(o, a = !1) {
|
|
25
|
-
const i = M.cloneDeep(o);
|
|
26
|
-
if (k(i)) {
|
|
27
|
-
const r = i.conditions;
|
|
28
|
-
return !a && r && typeof r._rrule == "string" && (r._rrule = V(
|
|
29
|
-
r._rrule
|
|
30
|
-
)), i;
|
|
31
|
-
}
|
|
32
|
-
if (y(i))
|
|
33
|
-
for (const r in i.rules) {
|
|
34
|
-
const l = i.rules[r], c = a || y(l) && l.name === B;
|
|
35
|
-
i.rules[r] = Y(
|
|
36
|
-
l,
|
|
37
|
-
c
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
return i;
|
|
41
|
-
}
|
|
42
|
-
class t {
|
|
43
|
-
static scaffoldGroup(a) {
|
|
44
|
-
return {
|
|
45
|
-
name: a ?? `g_${_(4)}`,
|
|
46
|
-
rules: {},
|
|
47
|
-
logic: ""
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
static scaffoldEntry(a) {
|
|
51
|
-
return {
|
|
52
|
-
name: `r_${_(4)}`,
|
|
53
|
-
property: a ?? "",
|
|
54
|
-
conditions: {},
|
|
55
|
-
negated: !1
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
static constructEntry(a, i, r, l) {
|
|
59
|
-
return {
|
|
60
|
-
name: l ?? `e_${_(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]) => y(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
74
|
-
}
|
|
75
|
-
static setRuleToGroup(a, i, r) {
|
|
76
|
-
let l = H.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 = H.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 K(10, l);
|
|
115
|
-
return !0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
class K 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 W = {
|
|
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
|
-
}, X = e.enum([
|
|
139
|
-
"GET",
|
|
140
|
-
"POST",
|
|
141
|
-
"PUT",
|
|
142
|
-
"PATCH",
|
|
143
|
-
"DELETE",
|
|
144
|
-
"OPTIONS",
|
|
145
|
-
"HEAD",
|
|
146
|
-
"ALL"
|
|
147
|
-
]), q = e.enum([
|
|
148
|
-
"CAMPAIGN",
|
|
149
|
-
"LOCATION",
|
|
150
|
-
"MARKETING MATERIALS",
|
|
151
|
-
"MEMBERSHIP",
|
|
152
|
-
"STORE",
|
|
153
|
-
"TRANSACTION",
|
|
154
|
-
"SETTINGS",
|
|
155
|
-
"SEGMENTATION",
|
|
156
|
-
"USER"
|
|
157
|
-
]), Q = e.object({
|
|
158
|
-
httpMethod: X,
|
|
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
|
-
}), $ = 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) => x(o)).nullish(),
|
|
174
|
-
moduleType: q,
|
|
175
|
-
business: n.nullish(),
|
|
176
|
-
clientIp: e.string().nullish(),
|
|
177
|
-
timestamp: e.string().datetime(),
|
|
178
|
-
request: Q,
|
|
179
|
-
response: $
|
|
180
|
-
}).describe(m.describe(W));
|
|
181
|
-
const We = {
|
|
1
|
+
import { z as e, F as t, m as l, a as b } from "./index-BmmFSQPd.js";
|
|
2
|
+
import { a as z } from "./index-CA09A75h.js";
|
|
3
|
+
import { R as a } from "./rule-builder-DPmaehAO.js";
|
|
4
|
+
import { i as o } from "./helper-D32ml7Qv.js";
|
|
5
|
+
import { C, E as T, G as S, H as i } from "./index-B9-jeiQR.js";
|
|
6
|
+
import { a as c } from "./index-BWHk6oqv.js";
|
|
7
|
+
const te = {
|
|
182
8
|
PROMOTION: {
|
|
183
9
|
name: "Promotion Template",
|
|
184
10
|
description: "Promotion template for campaign creation.",
|
|
@@ -299,7 +125,7 @@ const We = {
|
|
|
299
125
|
effect: null,
|
|
300
126
|
event: {
|
|
301
127
|
type: "MAKING_ORDER",
|
|
302
|
-
rule:
|
|
128
|
+
rule: a.scaffoldGroup()
|
|
303
129
|
},
|
|
304
130
|
group: null,
|
|
305
131
|
targetLocation: null,
|
|
@@ -562,7 +388,7 @@ const We = {
|
|
|
562
388
|
code: "",
|
|
563
389
|
event: {
|
|
564
390
|
type: "BILL_COMPLETED",
|
|
565
|
-
rule:
|
|
391
|
+
rule: a.scaffoldGroup()
|
|
566
392
|
},
|
|
567
393
|
group: null,
|
|
568
394
|
targetLocation: null,
|
|
@@ -584,7 +410,7 @@ const We = {
|
|
|
584
410
|
// },
|
|
585
411
|
hideInApp: !0
|
|
586
412
|
},
|
|
587
|
-
configs:
|
|
413
|
+
configs: o("VOUCHER", {
|
|
588
414
|
name: "",
|
|
589
415
|
business: null,
|
|
590
416
|
noCampaign: !1
|
|
@@ -712,17 +538,17 @@ const We = {
|
|
|
712
538
|
image: "",
|
|
713
539
|
event: {
|
|
714
540
|
type: "SCHEDULE",
|
|
715
|
-
rule:
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
541
|
+
rule: a.setRuleToGroup(
|
|
542
|
+
a.scaffoldGroup(),
|
|
543
|
+
a.setRuleToGroup(
|
|
544
|
+
a.scaffoldGroup("g_schedule"),
|
|
719
545
|
[
|
|
720
|
-
|
|
546
|
+
a.constructEntry(
|
|
721
547
|
"trigger.date",
|
|
722
548
|
"_rrule",
|
|
723
549
|
"RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU"
|
|
724
550
|
),
|
|
725
|
-
|
|
551
|
+
a.constructEntry(
|
|
726
552
|
"trigger.time",
|
|
727
553
|
"_isOnTime",
|
|
728
554
|
"00:00"
|
|
@@ -916,7 +742,7 @@ const We = {
|
|
|
916
742
|
image: "",
|
|
917
743
|
event: {
|
|
918
744
|
type: "BILL_COMPLETED",
|
|
919
|
-
rule:
|
|
745
|
+
rule: a.scaffoldGroup()
|
|
920
746
|
},
|
|
921
747
|
group: null,
|
|
922
748
|
targetLocation: null,
|
|
@@ -1103,7 +929,7 @@ const We = {
|
|
|
1103
929
|
image: "",
|
|
1104
930
|
event: {
|
|
1105
931
|
type: "BILL_COMPLETED",
|
|
1106
|
-
rule:
|
|
932
|
+
rule: a.scaffoldGroup()
|
|
1107
933
|
},
|
|
1108
934
|
group: null,
|
|
1109
935
|
targetLocation: null,
|
|
@@ -1290,7 +1116,7 @@ const We = {
|
|
|
1290
1116
|
image: "",
|
|
1291
1117
|
event: {
|
|
1292
1118
|
type: "BILL_COMPLETED",
|
|
1293
|
-
rule:
|
|
1119
|
+
rule: a.scaffoldGroup()
|
|
1294
1120
|
},
|
|
1295
1121
|
group: null,
|
|
1296
1122
|
targetLocation: null,
|
|
@@ -1499,7 +1325,7 @@ const We = {
|
|
|
1499
1325
|
image: "",
|
|
1500
1326
|
event: {
|
|
1501
1327
|
type: "BILL_COMPLETED",
|
|
1502
|
-
rule:
|
|
1328
|
+
rule: a.scaffoldGroup()
|
|
1503
1329
|
},
|
|
1504
1330
|
group: null,
|
|
1505
1331
|
targetLocation: null,
|
|
@@ -1517,7 +1343,7 @@ const We = {
|
|
|
1517
1343
|
game: {
|
|
1518
1344
|
event: {
|
|
1519
1345
|
type: "GAME_COMPLETED",
|
|
1520
|
-
rule:
|
|
1346
|
+
rule: a.scaffoldGroup()
|
|
1521
1347
|
},
|
|
1522
1348
|
name: "rewardpool_",
|
|
1523
1349
|
targetLocation: null,
|
|
@@ -1529,7 +1355,7 @@ const We = {
|
|
|
1529
1355
|
rewards: []
|
|
1530
1356
|
}
|
|
1531
1357
|
},
|
|
1532
|
-
configs:
|
|
1358
|
+
configs: o("GAME", {
|
|
1533
1359
|
name: "Token",
|
|
1534
1360
|
business: null,
|
|
1535
1361
|
noCampaign: !1
|
|
@@ -1754,7 +1580,7 @@ const We = {
|
|
|
1754
1580
|
},
|
|
1755
1581
|
event: {
|
|
1756
1582
|
type: "BILL_COMPLETED",
|
|
1757
|
-
rule:
|
|
1583
|
+
rule: a.scaffoldGroup()
|
|
1758
1584
|
},
|
|
1759
1585
|
mission: {
|
|
1760
1586
|
type: "STAMP",
|
|
@@ -1770,219 +1596,53 @@ const We = {
|
|
|
1770
1596
|
type: "timeframe"
|
|
1771
1597
|
}
|
|
1772
1598
|
},
|
|
1773
|
-
configs:
|
|
1599
|
+
configs: o("STAMP", {
|
|
1774
1600
|
business: null,
|
|
1775
1601
|
noCampaign: !1
|
|
1776
1602
|
})
|
|
1777
1603
|
}
|
|
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
|
-
}
|
|
1944
1604
|
}
|
|
1945
1605
|
};
|
|
1946
|
-
|
|
1606
|
+
a.scaffoldGroup(), o("STAMP", {
|
|
1947
1607
|
business: null,
|
|
1948
1608
|
noCampaign: !1
|
|
1949
1609
|
});
|
|
1950
1610
|
({
|
|
1951
|
-
...
|
|
1952
|
-
},
|
|
1611
|
+
...a.scaffoldGroup()
|
|
1612
|
+
}, o("VOUCHER", {
|
|
1953
1613
|
name: "",
|
|
1954
1614
|
business: null,
|
|
1955
1615
|
noCampaign: !1
|
|
1956
1616
|
}));
|
|
1957
1617
|
({
|
|
1958
|
-
...
|
|
1959
|
-
},
|
|
1618
|
+
...a.scaffoldGroup()
|
|
1619
|
+
}, o("VOUCHER", {
|
|
1960
1620
|
name: "",
|
|
1961
1621
|
business: null,
|
|
1962
1622
|
noCampaign: !1
|
|
1963
1623
|
}));
|
|
1964
1624
|
({
|
|
1965
|
-
...
|
|
1625
|
+
...a.scaffoldGroup()
|
|
1966
1626
|
});
|
|
1967
1627
|
({
|
|
1968
|
-
...
|
|
1628
|
+
...a.scaffoldGroup()
|
|
1969
1629
|
});
|
|
1970
1630
|
({
|
|
1971
|
-
...
|
|
1631
|
+
...a.scaffoldGroup()
|
|
1972
1632
|
});
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
[
|
|
1633
|
+
a.setRuleToGroup(
|
|
1634
|
+
a.scaffoldGroup(),
|
|
1635
|
+
a.setRuleToGroup(
|
|
1636
|
+
a.scaffoldGroup("g_user"),
|
|
1637
|
+
[a.constructEntry("user.member", "_isIn", [!0])],
|
|
1978
1638
|
"&&"
|
|
1979
1639
|
)
|
|
1980
1640
|
);
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1641
|
+
a.setRuleToGroup(a.scaffoldGroup(), [
|
|
1642
|
+
a.setRuleToGroup(
|
|
1643
|
+
a.scaffoldGroup("g_user"),
|
|
1984
1644
|
[
|
|
1985
|
-
|
|
1645
|
+
a.constructEntry("user.birthday", "_isRange", {
|
|
1986
1646
|
op: "this",
|
|
1987
1647
|
unit: "month",
|
|
1988
1648
|
ignoreYear: !0
|
|
@@ -1992,13 +1652,13 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1992
1652
|
)
|
|
1993
1653
|
]);
|
|
1994
1654
|
({
|
|
1995
|
-
...
|
|
1655
|
+
...a.scaffoldGroup()
|
|
1996
1656
|
});
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1657
|
+
a.setRuleToGroup(a.scaffoldGroup(), [
|
|
1658
|
+
a.setRuleToGroup(
|
|
1659
|
+
a.scaffoldGroup("g_user"),
|
|
2000
1660
|
[
|
|
2001
|
-
|
|
1661
|
+
a.constructEntry("user.birthday", "_isRange", {
|
|
2002
1662
|
op: "this",
|
|
2003
1663
|
unit: "month",
|
|
2004
1664
|
ignoreYear: !0
|
|
@@ -2008,85 +1668,85 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2008
1668
|
)
|
|
2009
1669
|
]);
|
|
2010
1670
|
({
|
|
2011
|
-
...
|
|
1671
|
+
...a.scaffoldGroup()
|
|
2012
1672
|
});
|
|
2013
1673
|
({
|
|
2014
|
-
...
|
|
2015
|
-
},
|
|
1674
|
+
...a.scaffoldGroup()
|
|
1675
|
+
}, o("VOUCHER", {
|
|
2016
1676
|
name: "",
|
|
2017
1677
|
business: null,
|
|
2018
1678
|
noCampaign: !1
|
|
2019
1679
|
}));
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
1680
|
+
a.setRuleToGroup(
|
|
1681
|
+
a.scaffoldGroup(),
|
|
1682
|
+
a.setRuleToGroup(
|
|
1683
|
+
a.scaffoldGroup("g_schedule"),
|
|
2024
1684
|
[
|
|
2025
|
-
|
|
2026
|
-
|
|
1685
|
+
a.constructEntry("trigger.date", "_isOnDate", ""),
|
|
1686
|
+
a.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
2027
1687
|
],
|
|
2028
1688
|
"&&"
|
|
2029
1689
|
)
|
|
2030
1690
|
);
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
1691
|
+
a.setRuleToGroup(a.scaffoldGroup(), [
|
|
1692
|
+
a.setRuleToGroup(
|
|
1693
|
+
a.scaffoldGroup("g_schedule"),
|
|
2034
1694
|
[
|
|
2035
|
-
|
|
1695
|
+
a.constructEntry(
|
|
2036
1696
|
"trigger.date",
|
|
2037
1697
|
"_rrule",
|
|
2038
1698
|
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
2039
1699
|
),
|
|
2040
|
-
|
|
1700
|
+
a.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
2041
1701
|
],
|
|
2042
1702
|
"&&"
|
|
2043
1703
|
)
|
|
2044
1704
|
]);
|
|
2045
|
-
({ ...
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
1705
|
+
({ ...a.scaffoldGroup() });
|
|
1706
|
+
a.setRuleToGroup(
|
|
1707
|
+
a.scaffoldGroup(),
|
|
1708
|
+
a.setRuleToGroup(
|
|
1709
|
+
a.scaffoldGroup("g_schedule"),
|
|
2050
1710
|
[
|
|
2051
|
-
|
|
1711
|
+
a.constructEntry(
|
|
2052
1712
|
"trigger.date",
|
|
2053
1713
|
"_rrule",
|
|
2054
1714
|
"RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
|
|
2055
1715
|
),
|
|
2056
|
-
|
|
1716
|
+
a.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
2057
1717
|
],
|
|
2058
1718
|
"&&"
|
|
2059
1719
|
)
|
|
2060
1720
|
);
|
|
2061
|
-
|
|
1721
|
+
a.scaffoldGroup(), a.scaffoldGroup(), o("GAME", {
|
|
2062
1722
|
name: "Token",
|
|
2063
1723
|
business: null,
|
|
2064
1724
|
noCampaign: !1
|
|
2065
1725
|
});
|
|
2066
1726
|
({
|
|
2067
|
-
...
|
|
2068
|
-
},
|
|
1727
|
+
...a.scaffoldGroup()
|
|
1728
|
+
}, o("VOUCHER", {
|
|
2069
1729
|
name: "",
|
|
2070
1730
|
business: null,
|
|
2071
1731
|
noCampaign: !1
|
|
2072
1732
|
}));
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
1733
|
+
a.setRuleToGroup(a.scaffoldGroup(), [
|
|
1734
|
+
a.setRuleToGroup(
|
|
1735
|
+
a.scaffoldGroup("g_schedule"),
|
|
2076
1736
|
[
|
|
2077
|
-
|
|
1737
|
+
a.constructEntry(
|
|
2078
1738
|
"trigger.date",
|
|
2079
1739
|
"_rrule",
|
|
2080
1740
|
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
2081
1741
|
),
|
|
2082
|
-
|
|
1742
|
+
a.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
2083
1743
|
],
|
|
2084
1744
|
"&&"
|
|
2085
1745
|
),
|
|
2086
|
-
|
|
2087
|
-
|
|
1746
|
+
a.setRuleToGroup(
|
|
1747
|
+
a.scaffoldGroup("g_user"),
|
|
2088
1748
|
[
|
|
2089
|
-
|
|
1749
|
+
a.constructEntry("user.birthday", "_isRange", {
|
|
2090
1750
|
op: "this",
|
|
2091
1751
|
unit: "month",
|
|
2092
1752
|
ignoreYear: !0
|
|
@@ -2094,30 +1754,30 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2094
1754
|
],
|
|
2095
1755
|
"&&"
|
|
2096
1756
|
)
|
|
2097
|
-
]),
|
|
1757
|
+
]), o("VOUCHER", {
|
|
2098
1758
|
name: "",
|
|
2099
1759
|
business: null,
|
|
2100
1760
|
noCampaign: !1
|
|
2101
1761
|
});
|
|
2102
1762
|
({
|
|
2103
|
-
...
|
|
1763
|
+
...a.scaffoldGroup()
|
|
2104
1764
|
});
|
|
2105
1765
|
({
|
|
2106
|
-
...
|
|
1766
|
+
...a.scaffoldGroup()
|
|
2107
1767
|
});
|
|
2108
1768
|
({
|
|
2109
|
-
...
|
|
1769
|
+
...a.scaffoldGroup()
|
|
2110
1770
|
});
|
|
2111
1771
|
({
|
|
2112
|
-
...
|
|
1772
|
+
...a.scaffoldGroup()
|
|
2113
1773
|
});
|
|
2114
1774
|
({
|
|
2115
|
-
...
|
|
1775
|
+
...a.scaffoldGroup()
|
|
2116
1776
|
});
|
|
2117
1777
|
({
|
|
2118
|
-
...
|
|
1778
|
+
...a.scaffoldGroup()
|
|
2119
1779
|
});
|
|
2120
|
-
const
|
|
1780
|
+
const v = e.enum([
|
|
2121
1781
|
"MEMBER_REWARD",
|
|
2122
1782
|
"PAID_LOYALTY",
|
|
2123
1783
|
"COLLECT_FEEDBACK",
|
|
@@ -2127,7 +1787,7 @@ const Z = e.enum([
|
|
|
2127
1787
|
"BROADCAST",
|
|
2128
1788
|
"BIRTHDAY",
|
|
2129
1789
|
"GAME"
|
|
2130
|
-
]),
|
|
1790
|
+
]), N = e.enum([
|
|
2131
1791
|
"text",
|
|
2132
1792
|
"number",
|
|
2133
1793
|
"textarea",
|
|
@@ -2153,118 +1813,110 @@ const Z = e.enum([
|
|
|
2153
1813
|
"rule_bill",
|
|
2154
1814
|
"rule_feedback",
|
|
2155
1815
|
"rule_birthday",
|
|
2156
|
-
"promotion_game_type"
|
|
2157
|
-
|
|
2158
|
-
"grab_quota",
|
|
2159
|
-
"grab_conditions"
|
|
2160
|
-
]), te = e.object({
|
|
1816
|
+
"promotion_game_type"
|
|
1817
|
+
]), U = e.object({
|
|
2161
1818
|
label: e.string().optional(),
|
|
2162
1819
|
label_locale: e.record(e.string()).nullish(),
|
|
2163
1820
|
property: e.string().or(e.any()),
|
|
2164
|
-
type:
|
|
1821
|
+
type: N,
|
|
2165
1822
|
extras: e.string().optional(),
|
|
2166
1823
|
isRuleChildren: e.boolean().optional()
|
|
2167
|
-
}),
|
|
1824
|
+
}), p = e.object({
|
|
2168
1825
|
not: e.boolean().optional(),
|
|
2169
1826
|
property: e.string(),
|
|
2170
1827
|
value: e.any()
|
|
2171
|
-
}),
|
|
1828
|
+
}), P = e.object({
|
|
2172
1829
|
name: e.string().optional(),
|
|
2173
1830
|
name_locale: e.record(e.string()).nullish(),
|
|
2174
|
-
fields: e.array(
|
|
2175
|
-
condition:
|
|
2176
|
-
e.array(
|
|
1831
|
+
fields: e.array(U),
|
|
1832
|
+
condition: p.optional().or(
|
|
1833
|
+
e.array(p)
|
|
2177
1834
|
)
|
|
2178
|
-
}),
|
|
1835
|
+
}), j = e.object({
|
|
2179
1836
|
name: e.string(),
|
|
2180
1837
|
name_locale: e.record(e.string()).nullish(),
|
|
2181
|
-
groups: e.array(
|
|
1838
|
+
groups: e.array(P)
|
|
2182
1839
|
});
|
|
2183
1840
|
e.object({
|
|
2184
|
-
_id:
|
|
1841
|
+
_id: t,
|
|
2185
1842
|
name: e.string(),
|
|
2186
1843
|
name_locale: e.record(e.string()).nullish(),
|
|
2187
1844
|
description: e.string().nullish(),
|
|
2188
1845
|
description_locale: e.record(e.string()).nullish(),
|
|
2189
|
-
steps: e.array(
|
|
2190
|
-
intention: e.array(
|
|
1846
|
+
steps: e.array(j).min(1),
|
|
1847
|
+
intention: e.array(v),
|
|
2191
1848
|
defaultValue: e.any()
|
|
2192
1849
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2193
|
-
const
|
|
1850
|
+
const J = {
|
|
2194
1851
|
collectionName: "Businesses",
|
|
2195
1852
|
transform: {
|
|
2196
1853
|
_id: "oid"
|
|
2197
1854
|
}
|
|
2198
1855
|
};
|
|
2199
1856
|
e.object({
|
|
2200
|
-
_id:
|
|
1857
|
+
_id: t,
|
|
2201
1858
|
ownerId: e.string(),
|
|
2202
1859
|
name: e.string(),
|
|
2203
1860
|
credit: e.number(),
|
|
2204
1861
|
forceSend: e.boolean().optional()
|
|
2205
|
-
}).describe(
|
|
2206
|
-
const
|
|
1862
|
+
}).describe(l.describe(J));
|
|
1863
|
+
const s = e.enum(["PHONE"]), E = e.enum([
|
|
2207
1864
|
"MOCEAN",
|
|
2208
1865
|
"SLACK",
|
|
2209
1866
|
"SMS",
|
|
2210
1867
|
"EMAIL",
|
|
2211
1868
|
"WHATSAPP"
|
|
2212
|
-
]),
|
|
1869
|
+
]), O = e.enum(["PENDING", "COMPLETED", "FAILED"]), I = e.enum([
|
|
2213
1870
|
"General",
|
|
2214
1871
|
"Otp",
|
|
2215
1872
|
"Marketing",
|
|
2216
1873
|
"Ordering",
|
|
2217
1874
|
"MemberInvitation",
|
|
2218
1875
|
"MarketingPromotion"
|
|
2219
|
-
]),
|
|
2220
|
-
type:
|
|
2221
|
-
}),
|
|
2222
|
-
type: e.literal(
|
|
2223
|
-
provider:
|
|
2224
|
-
usage:
|
|
2225
|
-
}),
|
|
1876
|
+
]), L = e.object({
|
|
1877
|
+
type: s
|
|
1878
|
+
}), g = L.extend({
|
|
1879
|
+
type: e.literal(s.enum.PHONE),
|
|
1880
|
+
provider: E,
|
|
1881
|
+
usage: I.optional()
|
|
1882
|
+
}), R = {
|
|
2226
1883
|
collectionName: "Notifications",
|
|
2227
1884
|
transform: { _id: "oid", business: "oid" }
|
|
2228
1885
|
};
|
|
2229
1886
|
e.object({
|
|
2230
|
-
_id:
|
|
2231
|
-
business:
|
|
1887
|
+
_id: t,
|
|
1888
|
+
business: t,
|
|
2232
1889
|
target: e.string(),
|
|
2233
1890
|
title: e.string().optional(),
|
|
2234
1891
|
message: e.string(),
|
|
2235
|
-
option:
|
|
2236
|
-
status:
|
|
1892
|
+
option: g,
|
|
1893
|
+
status: O,
|
|
2237
1894
|
ref: e.string().optional()
|
|
2238
|
-
}).describe(
|
|
2239
|
-
|
|
1895
|
+
}).describe(l.describe(R));
|
|
1896
|
+
e.object({
|
|
2240
1897
|
target: e.string(),
|
|
2241
1898
|
title: e.string().optional(),
|
|
2242
1899
|
message: e.string(),
|
|
2243
|
-
option:
|
|
1900
|
+
option: g,
|
|
2244
1901
|
ref: e.string().optional()
|
|
2245
1902
|
});
|
|
2246
|
-
e.object({
|
|
2247
|
-
campaignId: e.string(),
|
|
2248
|
-
notification: me,
|
|
2249
|
-
business: e.string()
|
|
2250
|
-
});
|
|
2251
1903
|
e.object({
|
|
2252
1904
|
phone: e.string(),
|
|
2253
1905
|
message: e.string()
|
|
2254
1906
|
});
|
|
2255
|
-
const
|
|
1907
|
+
const m = e.object({
|
|
2256
1908
|
name: e.string().optional(),
|
|
2257
1909
|
address: e.string()
|
|
2258
|
-
}),
|
|
1910
|
+
}), x = e.object({
|
|
2259
1911
|
filename: e.string(),
|
|
2260
1912
|
content: e.instanceof(Uint8Array)
|
|
2261
1913
|
});
|
|
2262
1914
|
e.object({
|
|
2263
|
-
from:
|
|
2264
|
-
to: e.array(
|
|
1915
|
+
from: m.optional(),
|
|
1916
|
+
to: e.array(m),
|
|
2265
1917
|
subject: e.string(),
|
|
2266
1918
|
html: e.string().optional(),
|
|
2267
|
-
attachments: e.array(
|
|
1919
|
+
attachments: e.array(x).optional()
|
|
2268
1920
|
});
|
|
2269
1921
|
e.object({
|
|
2270
1922
|
subject: e.string(),
|
|
@@ -2304,7 +1956,7 @@ e.object({
|
|
|
2304
1956
|
billId: e.string()
|
|
2305
1957
|
});
|
|
2306
1958
|
e.object({
|
|
2307
|
-
amount:
|
|
1959
|
+
amount: b,
|
|
2308
1960
|
member: e.string(),
|
|
2309
1961
|
bill: e.string(),
|
|
2310
1962
|
otp: e.string().nullish(),
|
|
@@ -2313,15 +1965,15 @@ e.object({
|
|
|
2313
1965
|
e.object({
|
|
2314
1966
|
orderId: e.string()
|
|
2315
1967
|
});
|
|
2316
|
-
var
|
|
2317
|
-
e.nativeEnum(
|
|
1968
|
+
var d = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(d || {});
|
|
1969
|
+
e.nativeEnum(d);
|
|
2318
1970
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2319
1971
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2320
1972
|
e.enum(["quota"]);
|
|
2321
|
-
var
|
|
2322
|
-
e.nativeEnum(
|
|
1973
|
+
var h = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(h || {});
|
|
1974
|
+
e.nativeEnum(h);
|
|
2323
1975
|
e.enum(["restaurant"]);
|
|
2324
|
-
const
|
|
1976
|
+
const D = e.object({
|
|
2325
1977
|
label: e.string(),
|
|
2326
1978
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
2327
1979
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -2331,41 +1983,41 @@ const ge = e.object({
|
|
|
2331
1983
|
reason: e.string().optional()
|
|
2332
1984
|
});
|
|
2333
1985
|
e.object({
|
|
2334
|
-
_id:
|
|
1986
|
+
_id: t,
|
|
2335
1987
|
businessId: e.string(),
|
|
2336
1988
|
userId: e.string(),
|
|
2337
1989
|
email: e.string().nullish(),
|
|
2338
1990
|
phoneNo: e.string().nullish(),
|
|
2339
|
-
permissions: e.array(e.lazy(() =>
|
|
1991
|
+
permissions: e.array(e.lazy(() => D))
|
|
2340
1992
|
}).describe(
|
|
2341
|
-
|
|
1993
|
+
l.describe({
|
|
2342
1994
|
collectionName: "PermissionUsers",
|
|
2343
1995
|
transform: {
|
|
2344
1996
|
_id: "oid"
|
|
2345
1997
|
}
|
|
2346
1998
|
})
|
|
2347
1999
|
);
|
|
2348
|
-
const
|
|
2000
|
+
const u = e.object({
|
|
2349
2001
|
userId: e.string(),
|
|
2350
2002
|
level: e.number(),
|
|
2351
2003
|
role: e.string().optional(),
|
|
2352
2004
|
businessId: e.string().optional(),
|
|
2353
2005
|
restaurantId: e.string().optional()
|
|
2354
|
-
}),
|
|
2006
|
+
}), w = e.function().args(e.any(), u).returns(e.boolean()), M = e.function().args(u).returns(e.promise(e.array(e.any())));
|
|
2355
2007
|
e.object({
|
|
2356
|
-
isAdmin:
|
|
2357
|
-
getRules:
|
|
2008
|
+
isAdmin: w,
|
|
2009
|
+
getRules: M
|
|
2358
2010
|
});
|
|
2359
2011
|
e.object({
|
|
2360
|
-
transactions: e.array(
|
|
2361
|
-
collections: e.array(
|
|
2012
|
+
transactions: e.array(C),
|
|
2013
|
+
collections: e.array(T)
|
|
2362
2014
|
});
|
|
2363
|
-
const
|
|
2015
|
+
const _ = e.enum([
|
|
2364
2016
|
"ROCK_PAPER_SCISSOR"
|
|
2365
2017
|
]);
|
|
2366
|
-
|
|
2018
|
+
_.enum.ROCK_PAPER_SCISSOR + "";
|
|
2367
2019
|
e.object({
|
|
2368
|
-
type:
|
|
2020
|
+
type: _
|
|
2369
2021
|
});
|
|
2370
2022
|
e.object({
|
|
2371
2023
|
host: e.string().url(),
|
|
@@ -2374,7 +2026,7 @@ e.object({
|
|
|
2374
2026
|
roomId: e.string()
|
|
2375
2027
|
});
|
|
2376
2028
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
2377
|
-
const
|
|
2029
|
+
const G = {
|
|
2378
2030
|
collectionName: "MarketingMaterials",
|
|
2379
2031
|
transform: {
|
|
2380
2032
|
_id: "oid",
|
|
@@ -2382,13 +2034,13 @@ const he = {
|
|
|
2382
2034
|
}
|
|
2383
2035
|
};
|
|
2384
2036
|
e.object({
|
|
2385
|
-
_id:
|
|
2386
|
-
business:
|
|
2037
|
+
_id: t,
|
|
2038
|
+
business: t,
|
|
2387
2039
|
imageUrl: e.string().url(),
|
|
2388
2040
|
headline: e.string(),
|
|
2389
2041
|
caption: e.string(),
|
|
2390
2042
|
editedAt: e.coerce.date()
|
|
2391
|
-
}).describe(
|
|
2043
|
+
}).describe(l.describe(G));
|
|
2392
2044
|
e.object({
|
|
2393
2045
|
id: e.number(),
|
|
2394
2046
|
name: e.string(),
|
|
@@ -2408,12 +2060,12 @@ e.object({
|
|
|
2408
2060
|
phone: e.string().optional(),
|
|
2409
2061
|
email: e.string().optional()
|
|
2410
2062
|
});
|
|
2411
|
-
const
|
|
2063
|
+
const A = e.enum([
|
|
2412
2064
|
"PENDING",
|
|
2413
2065
|
"SUCCESS",
|
|
2414
2066
|
"FAILED",
|
|
2415
2067
|
"RETRYING"
|
|
2416
|
-
]),
|
|
2068
|
+
]), F = {
|
|
2417
2069
|
collectionName: "WebhookLogs",
|
|
2418
2070
|
transform: {
|
|
2419
2071
|
_id: "oid",
|
|
@@ -2421,39 +2073,39 @@ const _e = e.enum([
|
|
|
2421
2073
|
}
|
|
2422
2074
|
};
|
|
2423
2075
|
e.object({
|
|
2424
|
-
_id:
|
|
2425
|
-
business:
|
|
2076
|
+
_id: t,
|
|
2077
|
+
business: t,
|
|
2426
2078
|
type: e.string(),
|
|
2427
2079
|
payload: e.record(e.any()),
|
|
2428
|
-
status:
|
|
2080
|
+
status: A,
|
|
2429
2081
|
response: e.any().optional(),
|
|
2430
2082
|
error: e.string().optional()
|
|
2431
|
-
}).describe(
|
|
2432
|
-
const
|
|
2083
|
+
}).describe(l.describe(F));
|
|
2084
|
+
const B = e.enum(["AUTO", "MANUAL"]);
|
|
2433
2085
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2434
|
-
const
|
|
2435
|
-
_id:
|
|
2086
|
+
const y = e.object({
|
|
2087
|
+
_id: t,
|
|
2436
2088
|
name: e.string().min(1, "Name is required").max(50),
|
|
2437
|
-
type:
|
|
2438
|
-
event:
|
|
2439
|
-
}),
|
|
2089
|
+
type: B,
|
|
2090
|
+
event: S.optional()
|
|
2091
|
+
}), V = e.object({
|
|
2440
2092
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2441
2093
|
to: e.number().int("Must be integer").nullish()
|
|
2442
|
-
}).superRefine((
|
|
2443
|
-
|
|
2094
|
+
}).superRefine((n, H) => {
|
|
2095
|
+
n.from && n.to && n.from > n.to && H.addIssue({
|
|
2444
2096
|
code: "custom",
|
|
2445
2097
|
message: "Max referral count must be more than min referral count"
|
|
2446
2098
|
});
|
|
2447
|
-
}),
|
|
2448
|
-
threshold:
|
|
2449
|
-
rewards: e.array(
|
|
2450
|
-
pf_reward: e.array(
|
|
2451
|
-
}),
|
|
2099
|
+
}), k = e.object({
|
|
2100
|
+
threshold: V,
|
|
2101
|
+
rewards: e.array(t),
|
|
2102
|
+
pf_reward: e.array(c).optional()
|
|
2103
|
+
}), r = e.object({
|
|
2452
2104
|
id: e.string(),
|
|
2453
2105
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2454
|
-
rule:
|
|
2455
|
-
rewards: e.array(
|
|
2456
|
-
}),
|
|
2106
|
+
rule: z.optional(),
|
|
2107
|
+
rewards: e.array(k)
|
|
2108
|
+
}), Y = {
|
|
2457
2109
|
collectionName: "ReferralRecords",
|
|
2458
2110
|
transform: {
|
|
2459
2111
|
_id: "oid",
|
|
@@ -2462,25 +2114,25 @@ const J = e.object({
|
|
|
2462
2114
|
referee: "oid",
|
|
2463
2115
|
refereeReward: "oid"
|
|
2464
2116
|
}
|
|
2465
|
-
},
|
|
2117
|
+
}, K = e.object({
|
|
2466
2118
|
completedAt: e.coerce.date(),
|
|
2467
|
-
criteria:
|
|
2119
|
+
criteria: t,
|
|
2468
2120
|
ref: e.string()
|
|
2469
|
-
}),
|
|
2470
|
-
_id:
|
|
2471
|
-
business:
|
|
2472
|
-
referer:
|
|
2473
|
-
referee:
|
|
2474
|
-
criteria: e.array(
|
|
2475
|
-
reward: e.array(
|
|
2476
|
-
refereeReward: e.array(
|
|
2477
|
-
criteria_progress: e.array(
|
|
2121
|
+
}), W = e.object({
|
|
2122
|
+
_id: t,
|
|
2123
|
+
business: t,
|
|
2124
|
+
referer: t,
|
|
2125
|
+
referee: t,
|
|
2126
|
+
criteria: e.array(y),
|
|
2127
|
+
reward: e.array(r),
|
|
2128
|
+
refereeReward: e.array(t).optional(),
|
|
2129
|
+
criteria_progress: e.array(K),
|
|
2478
2130
|
status: e.string(),
|
|
2479
|
-
pf_referer:
|
|
2480
|
-
pf_referee:
|
|
2481
|
-
pf_refereeReward: e.array(
|
|
2482
|
-
}).describe(
|
|
2483
|
-
|
|
2131
|
+
pf_referer: i.optional(),
|
|
2132
|
+
pf_referee: i.optional(),
|
|
2133
|
+
pf_refereeReward: e.array(c).optional()
|
|
2134
|
+
}).describe(l.describe(Y));
|
|
2135
|
+
W.pick({
|
|
2484
2136
|
_id: !0,
|
|
2485
2137
|
business: !0,
|
|
2486
2138
|
referer: !0,
|
|
@@ -2488,321 +2140,57 @@ Te.pick({
|
|
|
2488
2140
|
criteria_progress: !0,
|
|
2489
2141
|
criteria: !0
|
|
2490
2142
|
}).extend({
|
|
2491
|
-
pf_referee:
|
|
2143
|
+
pf_referee: i.pick({
|
|
2492
2144
|
_id: !0,
|
|
2493
2145
|
name: !0,
|
|
2494
2146
|
phoneNumber: !0,
|
|
2495
2147
|
photoUrl: !0
|
|
2496
2148
|
})
|
|
2497
2149
|
});
|
|
2498
|
-
const
|
|
2150
|
+
const X = {
|
|
2499
2151
|
collectionName: "ReferralProgram",
|
|
2500
2152
|
transform: {
|
|
2501
2153
|
_id: "oid",
|
|
2502
2154
|
business: "oid"
|
|
2503
2155
|
}
|
|
2504
|
-
},
|
|
2505
|
-
_id:
|
|
2506
|
-
business:
|
|
2156
|
+
}, f = e.object({
|
|
2157
|
+
_id: t,
|
|
2158
|
+
business: t,
|
|
2507
2159
|
term_and_condition: e.string().optional(),
|
|
2508
|
-
refereeReward: e.array(
|
|
2509
|
-
reward: e.array(
|
|
2510
|
-
criteria: e.array(
|
|
2511
|
-
}).describe(
|
|
2160
|
+
refereeReward: e.array(t).optional(),
|
|
2161
|
+
reward: e.array(r),
|
|
2162
|
+
criteria: e.array(y)
|
|
2163
|
+
}).describe(l.describe(X));
|
|
2512
2164
|
e.object({
|
|
2513
|
-
referer:
|
|
2514
|
-
referee:
|
|
2515
|
-
business:
|
|
2165
|
+
referer: t,
|
|
2166
|
+
referee: t,
|
|
2167
|
+
business: t
|
|
2516
2168
|
});
|
|
2517
2169
|
e.object({
|
|
2518
|
-
program:
|
|
2170
|
+
program: f.pick({
|
|
2519
2171
|
_id: !0,
|
|
2520
2172
|
business: !0,
|
|
2521
2173
|
term_and_condition: !0
|
|
2522
2174
|
}).extend({
|
|
2523
|
-
reward:
|
|
2524
|
-
pf_refereeReward: e.array(
|
|
2175
|
+
reward: r.optional(),
|
|
2176
|
+
pf_refereeReward: e.array(c).optional()
|
|
2525
2177
|
}),
|
|
2526
2178
|
referralCount: e.number(),
|
|
2527
2179
|
successReferralCount: e.number(),
|
|
2528
|
-
referredBy:
|
|
2180
|
+
referredBy: i.pick({
|
|
2529
2181
|
_id: !0,
|
|
2530
2182
|
name: !0,
|
|
2531
2183
|
phoneNumber: !0,
|
|
2532
2184
|
photoUrl: !0
|
|
2533
2185
|
}).optional()
|
|
2534
2186
|
});
|
|
2535
|
-
|
|
2187
|
+
f.extend({
|
|
2536
2188
|
updateReferralRecord: e.boolean().optional()
|
|
2537
2189
|
});
|
|
2538
|
-
const Se = 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
|
-
}), Ne = e.object({
|
|
2545
|
-
locationId: n.nullable(),
|
|
2546
|
-
googleLocationName: e.string(),
|
|
2547
|
-
displayName: e.string().optional()
|
|
2548
|
-
}), Ue = e.object({
|
|
2549
|
-
accessToken: e.string().nullable(),
|
|
2550
|
-
refreshToken: e.string().nullable(),
|
|
2551
|
-
accessTokenExpiresAt: e.date().nullable(),
|
|
2552
|
-
locations: e.array(Ne)
|
|
2553
|
-
}), Pe = e.object({
|
|
2554
|
-
token: e.string().nullable(),
|
|
2555
|
-
pages: e.array(Se)
|
|
2556
|
-
});
|
|
2557
|
-
e.object({
|
|
2558
|
-
_id: n,
|
|
2559
|
-
businessId: n,
|
|
2560
|
-
google: Ue.nullable(),
|
|
2561
|
-
facebook: Pe.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 O = e.object({
|
|
2622
|
-
name: e.string(),
|
|
2623
|
-
pictureUrl: e.string()
|
|
2624
|
-
}), je = O.extend({
|
|
2625
|
-
isAnonymous: e.boolean().optional()
|
|
2626
|
-
}), Je = O.extend({
|
|
2627
|
-
id: e.string().optional()
|
|
2628
|
-
}), d = e.object({
|
|
2629
|
-
comment: e.string(),
|
|
2630
|
-
updateTime: e.coerce.date()
|
|
2631
|
-
}), s = e.object({
|
|
2632
|
-
externalId: e.string().optional(),
|
|
2633
|
-
thumbnailUrl: e.string(),
|
|
2634
|
-
thumbnailLabel: e.string(),
|
|
2635
|
-
videoUrl: e.string().optional()
|
|
2636
|
-
}), Ee = {
|
|
2637
|
-
collectionName: "Reviews",
|
|
2638
|
-
transform: {
|
|
2639
|
-
_id: "oid",
|
|
2640
|
-
businessId: "oid",
|
|
2641
|
-
reviewerId: "oid",
|
|
2642
|
-
locationId: "oid"
|
|
2643
|
-
},
|
|
2644
|
-
lookups: {
|
|
2645
|
-
reviewerId: {
|
|
2646
|
-
as: "reviewer",
|
|
2647
|
-
fromCollection: "UsersV2"
|
|
2648
|
-
},
|
|
2649
|
-
locationId: {
|
|
2650
|
-
as: "location",
|
|
2651
|
-
fromCollection: "Locations"
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
}, I = e.enum([
|
|
2655
|
-
"google",
|
|
2656
|
-
"facebook",
|
|
2657
|
-
"feedme",
|
|
2658
|
-
"feedvibe"
|
|
2659
|
-
]);
|
|
2660
|
-
I.options;
|
|
2661
|
-
e.enum(["google", "facebook"]);
|
|
2662
|
-
const Oe = e.enum([
|
|
2663
|
-
"createTime_desc",
|
|
2664
|
-
"createTime_asc",
|
|
2665
|
-
"rating_asc",
|
|
2666
|
-
"rating_desc"
|
|
2667
|
-
]);
|
|
2668
|
-
e.object({
|
|
2669
|
-
source: I.array().optional(),
|
|
2670
|
-
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
2671
|
-
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
2672
|
-
locationId: e.string().optional(),
|
|
2673
|
-
excludeDeleted: e.boolean().optional(),
|
|
2674
|
-
sort: Oe.optional(),
|
|
2675
|
-
limit: e.coerce.number().int().positive().optional(),
|
|
2676
|
-
skip: e.coerce.number().int().min(0).optional()
|
|
2677
|
-
});
|
|
2678
|
-
const R = e.object({
|
|
2679
|
-
name: e.string(),
|
|
2680
|
-
pictureUrl: e.string()
|
|
2681
|
-
}), Ie = R.extend({
|
|
2682
|
-
isAnonymous: e.boolean().optional()
|
|
2683
|
-
}), Re = R.extend({
|
|
2684
|
-
id: e.string().optional()
|
|
2685
|
-
}), u = e.object({
|
|
2686
|
-
_id: n,
|
|
2687
|
-
comment: e.string(),
|
|
2688
|
-
createTime: e.coerce.date(),
|
|
2689
|
-
updateTime: e.coerce.date().nullish(),
|
|
2690
|
-
locationId: n
|
|
2691
|
-
}), Le = u.extend({
|
|
2692
|
-
source: e.literal("google"),
|
|
2693
|
-
externalId: e.string().min(1),
|
|
2694
|
-
reviewer: Ie.optional(),
|
|
2695
|
-
reply: d.optional(),
|
|
2696
|
-
mediaItems: e.array(s),
|
|
2697
|
-
starRating: e.number(),
|
|
2698
|
-
locationName: e.string(),
|
|
2699
|
-
locationDisplayName: e.string()
|
|
2700
|
-
}), xe = u.extend({
|
|
2701
|
-
source: e.literal("facebook"),
|
|
2702
|
-
externalId: e.string().min(1),
|
|
2703
|
-
reviewer: Re.optional(),
|
|
2704
|
-
isPositive: e.boolean().optional(),
|
|
2705
|
-
pageId: e.string(),
|
|
2706
|
-
pageName: e.string()
|
|
2707
|
-
}), De = u.extend({
|
|
2708
|
-
source: e.literal("feedme"),
|
|
2709
|
-
reviewer: T,
|
|
2710
|
-
reply: d.optional(),
|
|
2711
|
-
starRating: e.number(),
|
|
2712
|
-
location: G.optional(),
|
|
2713
|
-
mediaItems: e.array(s),
|
|
2714
|
-
billId: e.string()
|
|
2715
|
-
}), we = u.extend({
|
|
2716
|
-
source: e.literal("feedvibe"),
|
|
2717
|
-
externalId: e.string().min(1),
|
|
2718
|
-
reviewer: T.optional(),
|
|
2719
|
-
rating: e.object({
|
|
2720
|
-
overall: e.number(),
|
|
2721
|
-
food: e.number(),
|
|
2722
|
-
service: e.number(),
|
|
2723
|
-
atmosphere: e.number()
|
|
2724
|
-
}),
|
|
2725
|
-
verified: e.boolean(),
|
|
2726
|
-
mediaItems: e.array(s).default([])
|
|
2727
|
-
});
|
|
2728
|
-
e.discriminatedUnion("source", [
|
|
2729
|
-
Le,
|
|
2730
|
-
xe,
|
|
2731
|
-
De,
|
|
2732
|
-
we
|
|
2733
|
-
]);
|
|
2734
|
-
e.object({
|
|
2735
|
-
comment: e.string(),
|
|
2736
|
-
starRating: e.number(),
|
|
2737
|
-
billId: e.string(),
|
|
2738
|
-
mediaItems: e.array(s).optional()
|
|
2739
|
-
});
|
|
2740
|
-
const h = e.object({
|
|
2741
|
-
_id: n,
|
|
2742
|
-
businessId: n,
|
|
2743
|
-
comment: e.string(),
|
|
2744
|
-
createTime: e.coerce.date(),
|
|
2745
|
-
updateTime: e.coerce.date().nullish(),
|
|
2746
|
-
// The marketing Location the review belongs to. For feedme reviews this is
|
|
2747
|
-
// the restaurantId (Location._id === restaurantId); for google/facebook it
|
|
2748
|
-
// is resolved from the review-source location/page mapping at sync time.
|
|
2749
|
-
locationId: n,
|
|
2750
|
-
deletedAt: e.coerce.date().optional()
|
|
2751
|
-
}), Ae = h.extend({
|
|
2752
|
-
source: e.literal("google"),
|
|
2753
|
-
externalId: e.string().min(1),
|
|
2754
|
-
reviewer: je.optional(),
|
|
2755
|
-
reply: d.optional(),
|
|
2756
|
-
mediaItems: e.array(s),
|
|
2757
|
-
starRating: e.number(),
|
|
2758
|
-
locationName: e.string(),
|
|
2759
|
-
locationDisplayName: e.string()
|
|
2760
|
-
}), Ge = h.extend({
|
|
2761
|
-
source: e.literal("facebook"),
|
|
2762
|
-
externalId: e.string().min(1),
|
|
2763
|
-
reviewer: Je.optional(),
|
|
2764
|
-
isPositive: e.boolean().optional(),
|
|
2765
|
-
pageId: e.string(),
|
|
2766
|
-
pageName: e.string()
|
|
2767
|
-
}), Me = h.extend({
|
|
2768
|
-
source: e.literal("feedme"),
|
|
2769
|
-
reviewerId: n,
|
|
2770
|
-
reviewer: e.any().optional(),
|
|
2771
|
-
reply: d.optional(),
|
|
2772
|
-
starRating: e.number(),
|
|
2773
|
-
billId: e.string(),
|
|
2774
|
-
location: e.any().optional(),
|
|
2775
|
-
mediaItems: e.array(s)
|
|
2776
|
-
}), Fe = h.extend({
|
|
2777
|
-
source: e.literal("feedvibe"),
|
|
2778
|
-
externalId: e.string().min(1),
|
|
2779
|
-
reviewerId: n,
|
|
2780
|
-
reviewer: e.any().optional(),
|
|
2781
|
-
rating: e.object({
|
|
2782
|
-
overall: e.number(),
|
|
2783
|
-
food: e.number(),
|
|
2784
|
-
service: e.number(),
|
|
2785
|
-
atmosphere: e.number()
|
|
2786
|
-
}),
|
|
2787
|
-
verified: e.boolean(),
|
|
2788
|
-
mediaItems: e.array(s).default([])
|
|
2789
|
-
});
|
|
2790
|
-
e.discriminatedUnion("source", [
|
|
2791
|
-
Ae,
|
|
2792
|
-
Ge,
|
|
2793
|
-
Me,
|
|
2794
|
-
Fe
|
|
2795
|
-
]).describe(m.describe(Ee));
|
|
2796
2190
|
export {
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
We as T,
|
|
2191
|
+
v as F,
|
|
2192
|
+
te as T,
|
|
2800
2193
|
k as a,
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
b as d,
|
|
2804
|
-
X as e,
|
|
2805
|
-
q as f,
|
|
2806
|
-
y as i,
|
|
2807
|
-
Y as s
|
|
2194
|
+
y as b,
|
|
2195
|
+
r as c
|
|
2808
2196
|
};
|