@feedmepos/mf-connect 0.1.98-beta.9 → 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-CwMrP0Q-.js → App-BSSze_b9.js} +106 -118
- package/dist/{Bin-sSw4Gatd.js → Bin-DfzoQbE0.js} +8 -8
- package/dist/{Broadcast-DH2Fpb-O.js → Broadcast-DsqO4SXX.js} +17 -18
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cd47Mrej.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQ0x2VJp.js} +6 -5
- package/dist/{Card-D4YJZ_I8.js → Card-VxbqomXV.js} +19 -19
- package/dist/{Collections--8QcjuAp.js → Collections-CvD98I3M.js} +185 -197
- package/dist/{Credit-DgF3qd52.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-BgHApZqm.js → EffectSheet.vue_vue_type_style_index_0_lang-CPx9U9fU.js} +6 -6
- package/dist/{Experience-DxtkVeS9.js → Experience-uWQRb-qf.js} +34 -35
- package/dist/{FileSaver.min-BtPuPAIo.js → FileSaver.min-DKNoHTvP.js} +1 -1
- package/dist/{Game-CbcrkUBh.js → Game-BgT3oNx7.js} +15 -16
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CqoO7N7r.js → ImageInput.vue_vue_type_script_setup_true_lang-ClqrJbU6.js} +1 -1
- package/dist/{Index-BzPX7mr1.js → Index-D3RgVj9V.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DyP3ipwX.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CkCpumzB.js} +1 -1
- package/dist/{MainLayout-gxkaZeZ-.js → MainLayout-B2RiPsIR.js} +1 -1
- package/dist/{Marketing-BlMjT0cP.js → Marketing-FrE7k7eW.js} +4 -4
- package/dist/{MarketingMaterialEdit-v0vGn3Lz.js → MarketingMaterialEdit-DGNjEUu-.js} +211 -214
- package/dist/{Member-BBUlAPqZ.js → Member-CgTagUQ9.js} +20 -20
- package/dist/{MemberList-DZJhULFD.js → MemberList-CKbzsDMX.js} +51 -50
- package/dist/{MemberTransactions-CTBoDEg4.js → MemberTransactions-CnY5cFdv.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-nlYOP9gZ.js → MessageInput.vue_vue_type_script_setup_true_lang-DqivG_O4.js} +11 -11
- package/dist/{Mission-D_xjOnWO.js → Mission-BGNqy7wQ.js} +34 -35
- package/dist/{Overview-C5-uSEJH.js → Overview-CnpF74wa.js} +19 -19
- package/dist/{Point-BmVyG_i-.js → Point-BHgIy7Bz.js} +29 -30
- package/dist/{Promotion-BWmTkHyw.js → Promotion-CNQvO5Lq.js} +105 -111
- package/dist/{Queue-Do2XlY5H.js → Queue-CoPBE0UP.js} +43 -43
- package/dist/{Record-BIzUOikr.js → Record-BuDQ15FJ.js} +10 -10
- package/dist/{Reward-gCpIJIq9.js → Reward-BQlCO3Dk.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dkyz-W9m.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-CZrzY2st.js → Segment-DKFAXGzY.js} +78 -77
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-B1qAMtkn.js → SelectItems.vue_vue_type_script_setup_true_lang-CUR7djaM.js} +3 -3
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dc36wzB0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CZ3s2W8Q.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BtnF-BPt.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbilZk82.js} +4 -4
- package/dist/{Setting-JrI4ttI1.js → Setting-hrDZ1cQR.js} +248 -259
- package/dist/{SettingAdvertisements-iOOpEUlI.js → SettingAdvertisements-CQsx4JqQ.js} +13 -13
- package/dist/{Store-DbXKThJn.js → Store-Cgmsklnt.js} +24 -24
- package/dist/{StoreRewards-CfkwVw7d.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-BVrAqpWt.js → Tier-DgKMMyKr.js} +469 -544
- package/dist/{Title-DhumBh-S.js → Title-BKijiEFV.js} +92 -93
- package/dist/{Transaction-BQLge28p.js → Transaction-zHL4q_wj.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CSPaj2uN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DjafpVOa.js} +6 -6
- package/dist/{Voucher-DeB4YhvL.js → Voucher-DW4-SD1w.js} +27 -28
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BjUFEIlS.js → VoucherEditor.vue_vue_type_script_setup_true_lang-y2wm2Bcu.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzrPUcC9.js → ZodTextField.vue_vue_type_script_setup_true_lang-BWZUE554.js} +2 -2
- package/dist/{app-BHIG18wW.js → app-B23RANXL.js} +3530 -4125
- package/dist/app.js +3 -4
- package/dist/{business-CCmy2VBj.js → business-BFU-2tpT.js} +1 -1
- package/dist/{campaign-DiFdvcPE.js → campaign-BEKKOWya.js} +64 -114
- package/dist/{campaign-jofcGLi8.js → campaign-CwlWx58O.js} +7 -13
- package/dist/{campaign.enum-CBp5IeWz.js → campaign.enum-5KIiekYl.js} +2 -3
- package/dist/{campaign.fn-BZ0Ivuwi.js → campaign.fn-CyWn_KL-.js} +57 -57
- package/dist/{collectible.enum-frp5wluZ.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-BegkMXTr.js → effect-DNDXE2iM.js} +1 -1
- package/dist/{email-addresses-B0t3BKV6.js → email-addresses-DXSkxrZ6.js} +2 -2
- package/dist/{export-CGrchnsA.js → export-zMj-UAnF.js} +3 -3
- package/dist/{helper-CIYSBZvt.js → helper-D32ml7Qv.js} +1 -1
- package/dist/{index-PmoP3mXP.js → index-9jgqbdnt.js} +7 -7
- package/dist/{index-CF1RNy12.js → index-B2OiTtF5.js} +1 -1
- package/dist/{index-DcE-11T-.js → index-B9-jeiQR.js} +1281 -1518
- package/dist/{index-D4_JDL9j.js → index-BWHk6oqv.js} +3 -3
- package/dist/{index-BPh_k5rA.js → index-BmmFSQPd.js} +3 -3
- package/dist/{index-C-2YkeBp.js → index-CA09A75h.js} +1968 -1996
- package/dist/index-Cc15IFUt.js +55 -0
- package/dist/{index-CixwNfnv.js → index-CcnOzrwY.js} +1 -1
- package/dist/{index-C_6y8OES.js → index-DSGHkaP0.js} +1 -1
- package/dist/{index-Cv0pq7A_.js → index-DvHLsdIR.js} +206 -807
- package/dist/{index-Dg_OJTxE.js → index-PrTZHXNT.js} +1 -1
- package/dist/{index-BBgVfqVf.js → index-txVWLdtz.js} +1 -1
- package/dist/{index.esm2017-QGfAIiCc.js → index.esm2017-BJG8dqci.js} +184 -184
- package/dist/{loading-Cql_LElt.js → loading-DuZVM_Ow.js} +1 -1
- package/dist/{lodash-PMdIVUsY.js → lodash-DqQem5rZ.js} +1 -1
- package/dist/{membership-BHD1GQ45.js → membership-CvoEzwor.js} +3 -3
- package/dist/{money-CASVly6f.js → money-B9PJ_JYh.js} +1 -1
- package/dist/{number-dMI2x0jy.js → number-GIC15kny.js} +1 -1
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectid-CtJ4pTf2.js +145 -0
- package/dist/{plugins-CnEVta3V.js → plugins-XAhAFHmZ.js} +95 -94
- package/dist/{reward-vdrNMYrF.js → reward-Dy0Z6PLL.js} +1 -1
- package/dist/{rule-BLXUDFEw.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-DzQCyuGA.js → timezone-BE1YhvLN.js} +20 -21
- package/dist/{trigger-Ccrh378a.js → trigger-BcHfjuiZ.js} +5 -5
- package/dist/{useMarketingMaterialActions-BQLBRa3G.js → useMarketingMaterialActions-YQq4LWOp.js} +3 -3
- package/dist/{usePagination-BjsffqjT.js → usePagination-B1KK2gTx.js} +1 -1
- package/dist/{user-B5jS1GLb.js → user-BTRRi1B3.js} +1 -1
- package/dist/{vue-i18n-CCjHlB6z.js → vue-i18n-D8NX5Rry.js} +390 -390
- package/dist/{xlsx-DmBOvA2N.js → xlsx-C9LzK7Kg.js} +1 -1
- package/dist/{zod-DrYZ6KS4.js → zod-D3ciRzE4.js} +1 -1
- package/package.json +4 -8
- package/dist/AuditLogs-CAtlilma.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-Bpr9KuHW.js +0 -3377
- package/dist/Grab-CDhmMNsL.js +0 -300
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-mI-5po-a.js +0 -48
- package/dist/LoyaltyDashboard-BFjI3IWT.js +0 -1082
- package/dist/Review-D9cFDrhN.js +0 -1192
- package/dist/ReviewFacebookCallback-DbE8_6D3.js +0 -243
- package/dist/ReviewGoogleCallback-LMZgyopt.js +0 -208
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BEqgU70M.js +0 -1911
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNC_jNgW.js +0 -1130
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BBlCR4pN.js +0 -7007
- package/dist/duplicateCampaign-CxuNftok.js +0 -51
- package/dist/index-Dc-I4Jr-.js +0 -67
- package/dist/index-DdAl4SK2.js +0 -52
- package/dist/object-BYyQ0PZp.js +0 -18
- package/dist/objectid-Db_4Ays3.js +0 -145
- package/dist/template-CRjkIq3e.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 f(o) {
|
|
14
|
-
return !o.property && "rules" in o;
|
|
15
|
-
}
|
|
16
|
-
function F(o) {
|
|
17
|
-
return "property" in o && !!o.property;
|
|
18
|
-
}
|
|
19
|
-
const k = "g_schedule";
|
|
20
|
-
function B(o) {
|
|
21
|
-
return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
22
|
-
`).trim();
|
|
23
|
-
}
|
|
24
|
-
function V(o, a = !1) {
|
|
25
|
-
const i = G.cloneDeep(o);
|
|
26
|
-
if (F(i)) {
|
|
27
|
-
const r = i.conditions;
|
|
28
|
-
return !a && r && typeof r._rrule == "string" && (r._rrule = B(
|
|
29
|
-
r._rrule
|
|
30
|
-
)), i;
|
|
31
|
-
}
|
|
32
|
-
if (f(i))
|
|
33
|
-
for (const r in i.rules) {
|
|
34
|
-
const l = i.rules[r], c = a || f(l) && l.name === k;
|
|
35
|
-
i.rules[r] = V(
|
|
36
|
-
l,
|
|
37
|
-
c
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
return i;
|
|
41
|
-
}
|
|
42
|
-
class t {
|
|
43
|
-
static scaffoldGroup(a) {
|
|
44
|
-
return {
|
|
45
|
-
name: a ?? `g_${y(4)}`,
|
|
46
|
-
rules: {},
|
|
47
|
-
logic: ""
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
static scaffoldEntry(a) {
|
|
51
|
-
return {
|
|
52
|
-
name: `r_${y(4)}`,
|
|
53
|
-
property: a ?? "",
|
|
54
|
-
conditions: {},
|
|
55
|
-
negated: !1
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
static constructEntry(a, i, r, l) {
|
|
59
|
-
return {
|
|
60
|
-
name: l ?? `e_${y(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]) => f(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
74
|
-
}
|
|
75
|
-
static setRuleToGroup(a, i, r) {
|
|
76
|
-
let l = z.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 = z.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 Y(10, l);
|
|
115
|
-
return !0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
class Y 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 K = {
|
|
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
|
-
}, W = e.enum([
|
|
139
|
-
"GET",
|
|
140
|
-
"POST",
|
|
141
|
-
"PUT",
|
|
142
|
-
"PATCH",
|
|
143
|
-
"DELETE",
|
|
144
|
-
"OPTIONS",
|
|
145
|
-
"HEAD",
|
|
146
|
-
"ALL"
|
|
147
|
-
]), X = 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: W,
|
|
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) => x(o)).nullish(),
|
|
174
|
-
moduleType: X,
|
|
175
|
-
business: n.nullish(),
|
|
176
|
-
clientIp: e.string().nullish(),
|
|
177
|
-
timestamp: e.string().datetime(),
|
|
178
|
-
request: q,
|
|
179
|
-
response: Q
|
|
180
|
-
}).describe(m.describe(K));
|
|
181
|
-
const Ke = {
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 Ke = {
|
|
|
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 $ = 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 $ = 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
|
-
]), ee = 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: pe,
|
|
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 se = 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 ue = {
|
|
|
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 he = 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 E = 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,310 +2140,57 @@ Ce.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 ve = 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
|
-
}), Se = e.object({
|
|
2545
|
-
locationId: n.nullable(),
|
|
2546
|
-
googleLocationName: e.string(),
|
|
2547
|
-
displayName: e.string().optional()
|
|
2548
|
-
}), Ne = e.object({
|
|
2549
|
-
accessToken: e.string().nullable(),
|
|
2550
|
-
refreshToken: e.string().nullable(),
|
|
2551
|
-
accessTokenExpiresAt: e.date().nullable(),
|
|
2552
|
-
locations: e.array(Se)
|
|
2553
|
-
}), Ue = e.object({
|
|
2554
|
-
token: e.string().nullable(),
|
|
2555
|
-
pages: e.array(ve)
|
|
2556
|
-
});
|
|
2557
|
-
e.object({
|
|
2558
|
-
_id: n,
|
|
2559
|
-
businessId: n,
|
|
2560
|
-
google: Ne.nullable(),
|
|
2561
|
-
facebook: Ue.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
|
-
}), Pe = d.extend({
|
|
2625
|
-
isAnonymous: e.boolean().optional()
|
|
2626
|
-
}), je = d.extend({
|
|
2627
|
-
id: e.string().optional()
|
|
2628
|
-
}), u = 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
|
-
}), Je = {
|
|
2637
|
-
collectionName: "Reviews",
|
|
2638
|
-
transform: {
|
|
2639
|
-
_id: "oid",
|
|
2640
|
-
businessId: "oid",
|
|
2641
|
-
reviewerId: "oid",
|
|
2642
|
-
restaurantId: "oid"
|
|
2643
|
-
}
|
|
2644
|
-
}, I = e.enum([
|
|
2645
|
-
"google",
|
|
2646
|
-
"facebook",
|
|
2647
|
-
"feedme",
|
|
2648
|
-
"feedvibe"
|
|
2649
|
-
]);
|
|
2650
|
-
I.options;
|
|
2651
|
-
e.enum(["google", "facebook"]);
|
|
2652
|
-
const Ee = e.enum([
|
|
2653
|
-
"createTime_desc",
|
|
2654
|
-
"createTime_asc",
|
|
2655
|
-
"rating_asc",
|
|
2656
|
-
"rating_desc"
|
|
2657
|
-
]);
|
|
2658
|
-
e.object({
|
|
2659
|
-
source: I.array().optional(),
|
|
2660
|
-
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
2661
|
-
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
2662
|
-
locationId: e.string().optional(),
|
|
2663
|
-
excludeDeleted: e.boolean().optional(),
|
|
2664
|
-
sort: Ee.optional(),
|
|
2665
|
-
limit: e.coerce.number().int().positive().optional(),
|
|
2666
|
-
skip: e.coerce.number().int().min(0).optional()
|
|
2667
|
-
});
|
|
2668
|
-
const R = e.object({
|
|
2669
|
-
name: e.string(),
|
|
2670
|
-
pictureUrl: e.string()
|
|
2671
|
-
}), Oe = R.extend({
|
|
2672
|
-
isAnonymous: e.boolean().optional()
|
|
2673
|
-
}), Ie = R.extend({
|
|
2674
|
-
id: e.string().optional()
|
|
2675
|
-
}), h = e.object({
|
|
2676
|
-
_id: n,
|
|
2677
|
-
comment: e.string(),
|
|
2678
|
-
createTime: e.coerce.date(),
|
|
2679
|
-
updateTime: e.coerce.date().nullish(),
|
|
2680
|
-
restaurantId: n,
|
|
2681
|
-
restaurantName: e.string()
|
|
2682
|
-
}), Re = h.extend({
|
|
2683
|
-
source: e.literal("google"),
|
|
2684
|
-
externalId: e.string().min(1),
|
|
2685
|
-
translatedComment: e.string().optional(),
|
|
2686
|
-
reviewer: Oe.optional(),
|
|
2687
|
-
reply: u.optional(),
|
|
2688
|
-
mediaItems: e.array(s),
|
|
2689
|
-
starRating: e.number(),
|
|
2690
|
-
locationName: e.string(),
|
|
2691
|
-
locationDisplayName: e.string()
|
|
2692
|
-
}), Le = h.extend({
|
|
2693
|
-
source: e.literal("facebook"),
|
|
2694
|
-
externalId: e.string().min(1),
|
|
2695
|
-
reviewer: Ie.optional(),
|
|
2696
|
-
isPositive: e.boolean().optional(),
|
|
2697
|
-
pageId: e.string(),
|
|
2698
|
-
pageName: e.string()
|
|
2699
|
-
}), xe = h.extend({
|
|
2700
|
-
source: e.literal("feedme"),
|
|
2701
|
-
reviewer: v,
|
|
2702
|
-
reply: u.optional(),
|
|
2703
|
-
starRating: e.number(),
|
|
2704
|
-
mediaItems: e.array(s),
|
|
2705
|
-
billId: e.string()
|
|
2706
|
-
}), De = h.extend({
|
|
2707
|
-
source: e.literal("feedvibe"),
|
|
2708
|
-
externalId: e.string().min(1),
|
|
2709
|
-
reviewer: v.optional(),
|
|
2710
|
-
rating: e.object({
|
|
2711
|
-
overall: e.number(),
|
|
2712
|
-
food: e.number(),
|
|
2713
|
-
service: e.number(),
|
|
2714
|
-
atmosphere: e.number()
|
|
2715
|
-
}),
|
|
2716
|
-
verified: e.boolean(),
|
|
2717
|
-
mediaItems: e.array(s).default([])
|
|
2718
|
-
});
|
|
2719
|
-
e.discriminatedUnion("source", [
|
|
2720
|
-
Re,
|
|
2721
|
-
Le,
|
|
2722
|
-
xe,
|
|
2723
|
-
De
|
|
2724
|
-
]);
|
|
2725
|
-
e.object({
|
|
2726
|
-
comment: e.string(),
|
|
2727
|
-
starRating: e.number(),
|
|
2728
|
-
billId: e.string(),
|
|
2729
|
-
mediaItems: e.array(s).optional()
|
|
2730
|
-
});
|
|
2731
|
-
const _ = e.object({
|
|
2732
|
-
_id: n,
|
|
2733
|
-
businessId: n,
|
|
2734
|
-
comment: e.string(),
|
|
2735
|
-
createTime: e.coerce.date(),
|
|
2736
|
-
updateTime: e.coerce.date().nullish(),
|
|
2737
|
-
restaurantId: n,
|
|
2738
|
-
restaurantName: e.string(),
|
|
2739
|
-
deletedAt: e.coerce.date().optional()
|
|
2740
|
-
}), we = _.extend({
|
|
2741
|
-
source: e.literal("google"),
|
|
2742
|
-
externalId: e.string().min(1),
|
|
2743
|
-
translatedComment: e.string().optional(),
|
|
2744
|
-
reviewer: Pe.optional(),
|
|
2745
|
-
reply: u.optional(),
|
|
2746
|
-
mediaItems: e.array(s),
|
|
2747
|
-
starRating: e.number(),
|
|
2748
|
-
locationName: e.string(),
|
|
2749
|
-
locationDisplayName: e.string()
|
|
2750
|
-
}), Ae = _.extend({
|
|
2751
|
-
source: e.literal("facebook"),
|
|
2752
|
-
externalId: e.string().min(1),
|
|
2753
|
-
reviewer: je.optional(),
|
|
2754
|
-
isPositive: e.boolean().optional(),
|
|
2755
|
-
pageId: e.string(),
|
|
2756
|
-
pageName: e.string()
|
|
2757
|
-
}), Ge = _.extend({
|
|
2758
|
-
source: e.literal("feedme"),
|
|
2759
|
-
reviewerId: n,
|
|
2760
|
-
reviewer: d,
|
|
2761
|
-
reply: u.optional(),
|
|
2762
|
-
starRating: e.number(),
|
|
2763
|
-
billId: e.string(),
|
|
2764
|
-
mediaItems: e.array(s)
|
|
2765
|
-
}), Me = _.extend({
|
|
2766
|
-
source: e.literal("feedvibe"),
|
|
2767
|
-
externalId: e.string().min(1),
|
|
2768
|
-
reviewerId: n,
|
|
2769
|
-
reviewer: d,
|
|
2770
|
-
rating: e.object({
|
|
2771
|
-
overall: e.number(),
|
|
2772
|
-
food: e.number(),
|
|
2773
|
-
service: e.number(),
|
|
2774
|
-
atmosphere: e.number()
|
|
2775
|
-
}),
|
|
2776
|
-
verified: e.boolean(),
|
|
2777
|
-
mediaItems: e.array(s).default([])
|
|
2778
|
-
});
|
|
2779
|
-
e.discriminatedUnion("source", [
|
|
2780
|
-
we,
|
|
2781
|
-
Ae,
|
|
2782
|
-
Ge,
|
|
2783
|
-
Me
|
|
2784
|
-
]).describe(m.describe(Je));
|
|
2785
2190
|
export {
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
E as c,
|
|
2792
|
-
H as d,
|
|
2793
|
-
W as e,
|
|
2794
|
-
X as f,
|
|
2795
|
-
f as i,
|
|
2796
|
-
V as s
|
|
2191
|
+
v as F,
|
|
2192
|
+
te as T,
|
|
2193
|
+
k as a,
|
|
2194
|
+
y as b,
|
|
2195
|
+
r as c
|
|
2797
2196
|
};
|