@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DHAyGCKP.js → App-EPNXLOQz.js} +118 -106
- package/dist/AuditLogs-CadZXkap.js +2013 -0
- package/dist/{Bin-BxyU2xtK.js → Bin-CEWFX1MK.js} +8 -8
- package/dist/{Broadcast-BJjehb02.js → Broadcast-DC8W46mc.js} +18 -17
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DsojUEnT.js} +5 -6
- package/dist/{Card-BYDuADCn.js → Card-BLFHOVL5.js} +19 -19
- package/dist/{Collections-BlPEkNm8.js → Collections-CVQV9gAI.js} +197 -185
- package/dist/{Credit-D9Eqxv2E.js → Credit-Bvd1uiUU.js} +18 -17
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DMHQ36PW.js +3377 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js} +6 -6
- package/dist/{Experience-DGumSpYK.js → Experience-bKhm3DP2.js} +35 -34
- package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-CgnAdnBE.js} +1 -1
- package/dist/{Game-DDsYLdKu.js → Game-BTZ5Ftp5.js} +16 -15
- package/dist/Grab-DMuSoVGl.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-hMmCNoZI.js} +1 -1
- package/dist/{Index-DwRbFOsj.js → Index-BNh-_EZa.js} +10 -10
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D0wKkrBj.js} +1 -1
- package/dist/LoyaltyDashboard-Do06Mjzo.js +1082 -0
- package/dist/{MainLayout-BEUAguIP.js → MainLayout-C_Zu8e2b.js} +1 -1
- package/dist/{Marketing-WdhEZvmz.js → Marketing-DHTow_lX.js} +4 -4
- package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-BZqVEaXl.js} +214 -211
- package/dist/{Member-jL3RMGsZ.js → Member-DNQICbO9.js} +20 -20
- package/dist/{MemberList-B1bdPK63.js → MemberList-B5f-zT_3.js} +50 -51
- package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-BmmgHC1I.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-DhlFz8So.js} +11 -11
- package/dist/{Mission-CoXzS7U6.js → Mission-CyUldhj4.js} +35 -34
- package/dist/{Overview-B16wZUSV.js → Overview-If_YcRY8.js} +19 -19
- package/dist/{Point-CORBv0y2.js → Point-DXgR4D2b.js} +30 -29
- package/dist/{Promotion-DQ4WnFkH.js → Promotion-8KrS5PGT.js} +111 -105
- package/dist/{Queue-BW97QEY2.js → Queue-ypegp0sQ.js} +43 -43
- package/dist/{Record-DZOhwf13.js → Record-C1eVdBIL.js} +10 -10
- package/dist/Review-fsYAsdHU.js +871 -0
- package/dist/ReviewFacebookCallback-zNKnoxr_.js +243 -0
- package/dist/ReviewGoogleCallback-CpCT0ZYL.js +213 -0
- package/dist/{Reward-Bi9mpuyH.js → Reward-B_k-VLJn.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-BUl5B7lH.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D93zAujE.js +1911 -0
- package/dist/{Segment-COhS8SPv.js → Segment-PJLbJ6YE.js} +77 -78
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-BLwf6QCO.js} +3 -3
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-VoddUHxA.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DOXfYdxf.js} +4 -4
- package/dist/{Setting-BNtYrzdN.js → Setting-DItVUJHA.js} +259 -248
- package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-Bfvr60OW.js} +13 -13
- package/dist/{Store-iTgtmUVL.js → Store-hyTJyNWv.js} +24 -24
- package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-B7c20AF5.js} +16 -16
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bl438tVa.js +1130 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBb3Zfuz.js +7007 -0
- package/dist/{Tier-BbZMbFSd.js → Tier-CuulnY8J.js} +544 -469
- package/dist/{Title-Co5XWIJm.js → Title-Bf9ZiFGW.js} +93 -92
- package/dist/{Transaction-CoUbt5rr.js → Transaction-reVAaf86.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js} +6 -6
- package/dist/{Voucher-CXojttH0.js → Voucher-E8R2cCl-.js} +28 -27
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js} +2 -2
- package/dist/{app-_LtKE4PZ.js → app-BdRRCAGj.js} +3524 -3049
- package/dist/app.js +4 -3
- package/dist/{business-CchrWCX9.js → business-caUtvXxX.js} +1 -1
- package/dist/{campaign-D2RzC0L1.js → campaign-CDFEhdIH.js} +13 -7
- package/dist/{campaign-N2x2N6OP.js → campaign-CPtzFxiR.js} +114 -64
- package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-p1buII_I.js} +3 -2
- package/dist/campaign.fn-DerIK7yj.js +776 -0
- package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-CJ30_XmW.js} +1 -1
- package/dist/duplicateCampaign-DLfhHm07.js +51 -0
- package/dist/{effect-DADvE7lZ.js → effect-BJC34M9S.js} +1 -1
- package/dist/{email-addresses-DzUHQuVs.js → email-addresses-D1aYCi0p.js} +2 -2
- package/dist/{export-uzECYleM.js → export-ChFEuUc5.js} +3 -3
- package/dist/{helper-DMsYRFIM.js → helper-BNWd3eM2.js} +1 -1
- package/dist/{timezone-B_KZGqyd.js → index-0SZADZbB.js} +21 -20
- package/dist/{index-C2h4SP0A.js → index-6ZSFSZ-H.js} +769 -205
- package/dist/index-B4dazSVT.js +48 -0
- package/dist/{index-B9RmImNP.js → index-B9xvXnEM.js} +3 -3
- package/dist/{index-KYtKBtvK.js → index-BWQK3rqq.js} +3 -3
- package/dist/{index-DXl_Qtu-.js → index-BoeHTTcl.js} +1 -1
- package/dist/{index-Bc-pgOn6.js → index-Br17eSOV.js} +1 -1
- package/dist/{index-DQ6H1MEw.js → index-CAVSuo6k.js} +1996 -1968
- package/dist/{index-Ct1Qf7kH.js → index-CIin0Pv0.js} +1 -1
- package/dist/{index-r8TuEpzi.js → index-CeSEAz_T.js} +1 -1
- package/dist/{index-CrPHsZg1.js → index-DNsYSxpY.js} +1539 -1267
- package/dist/index-Dcn4qaYt.js +67 -0
- package/dist/{index-XJX8_Wlh.js → index-Do2cnzep.js} +1 -1
- package/dist/{index-CEVpWmjC.js → index-Dp3CLZSg.js} +7 -7
- package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CYGo-PcK.js} +173 -173
- package/dist/{loading-DK8UdxtS.js → loading-DtPQnEA5.js} +1 -1
- package/dist/{lodash-CgcQgDO8.js → lodash-BvTKz5Pn.js} +1 -1
- package/dist/{membership-Cs4GzRnn.js → membership-Csnvqeql.js} +3 -3
- package/dist/{money-TgbWserQ.js → money-CwRxILG1.js} +1 -1
- package/dist/{number-fLCh4B45.js → number-qcECHCpu.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-BKWyHH4F.js +145 -0
- package/dist/{plugins-DYcrIMpx.js → plugins-BBpKk0ld.js} +94 -95
- package/dist/{reward-uQ8Oz8Fd.js → reward-CX1axU5-.js} +1 -1
- package/dist/{rule-BcbgF0xS.js → rule-pKsATz8r.js} +505 -487
- package/dist/style.css +1 -1
- package/dist/template-BSuapoPb.js +188 -0
- package/dist/{trigger-c-_77EFL.js → trigger-DnMktlx-.js} +5 -5
- package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-Bu0-ny3z.js} +3 -3
- package/dist/{usePagination-C3cT5BmC.js → usePagination-CzfJhepV.js} +1 -1
- package/dist/{user-CRIo5MyA.js → user-BLDWqYm_.js} +1 -1
- package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-bssxjuw_.js} +424 -424
- package/dist/{xlsx-Bw1AshOG.js → xlsx-xNwsJDub.js} +166 -166
- package/dist/{zod-CzlTW8Al.js → zod-Cu18aMVT.js} +1 -1
- package/package.json +8 -4
- package/dist/Analytic-Ccb5IKBy.js +0 -426
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
- package/dist/campaign.fn-Da4r_dvc.js +0 -776
- package/dist/collection.fn-BqDPyvUe.js +0 -26
- package/dist/dto-CstKk_3g.js +0 -216
- package/dist/index-_KlH62Ed.js +0 -55
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-CVxLIQ5K.js +0 -145
- package/dist/rule-builder-CIkRKgap.js +0 -102
- package/dist/template-wZEVj8lZ.js +0 -236
|
@@ -1,10 +1,184 @@
|
|
|
1
|
-
import { z as e, F as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { z as e, F as o, m, a as R } from "./index-BWQK3rqq.js";
|
|
2
|
+
import { B as L, C as x, E as D, G as w, H as g, I as A, J as G } from "./index-DNsYSxpY.js";
|
|
3
|
+
import { _ as M, l as H, a as F } from "./index-CAVSuo6k.js";
|
|
4
|
+
import { i as p } from "./helper-BNWd3eM2.js";
|
|
5
|
+
import { a as _ } from "./index-B9xvXnEM.js";
|
|
6
|
+
function h(n, a) {
|
|
7
|
+
let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
8
|
+
const l = r.length;
|
|
9
|
+
for (let c = 0; c < n; c++)
|
|
10
|
+
i += r.charAt(Math.floor(Math.random() * l));
|
|
11
|
+
return i;
|
|
12
|
+
}
|
|
13
|
+
function u(n) {
|
|
14
|
+
return !n.property && "rules" in n;
|
|
15
|
+
}
|
|
16
|
+
function k(n) {
|
|
17
|
+
return "property" in n && !!n.property;
|
|
18
|
+
}
|
|
19
|
+
const B = "g_schedule";
|
|
20
|
+
function V(n) {
|
|
21
|
+
return n.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
22
|
+
`).trim();
|
|
23
|
+
}
|
|
24
|
+
function Y(n, a = !1) {
|
|
25
|
+
const i = M.cloneDeep(n);
|
|
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 (u(i))
|
|
33
|
+
for (const r in i.rules) {
|
|
34
|
+
const l = i.rules[r], c = a || u(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_${h(4)}`,
|
|
46
|
+
rules: {},
|
|
47
|
+
logic: ""
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static scaffoldEntry(a) {
|
|
51
|
+
return {
|
|
52
|
+
name: `r_${h(4)}`,
|
|
53
|
+
property: a ?? "",
|
|
54
|
+
conditions: {},
|
|
55
|
+
negated: !1
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static constructEntry(a, i, r, l) {
|
|
59
|
+
return {
|
|
60
|
+
name: l ?? `e_${h(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]) => u(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: o,
|
|
171
|
+
user: e.string().length(28),
|
|
172
|
+
userName: e.string().min(1),
|
|
173
|
+
userPhoneNumber: e.string().refine((n) => L(n)).nullish(),
|
|
174
|
+
moduleType: q,
|
|
175
|
+
business: o.nullish(),
|
|
176
|
+
clientIp: e.string().nullish(),
|
|
177
|
+
timestamp: e.string().datetime(),
|
|
178
|
+
request: Q,
|
|
179
|
+
response: $
|
|
180
|
+
}).describe(m.describe(W));
|
|
181
|
+
const Ye = {
|
|
8
182
|
PROMOTION: {
|
|
9
183
|
name: "Promotion Template",
|
|
10
184
|
description: "Promotion template for campaign creation.",
|
|
@@ -125,7 +299,7 @@ const te = {
|
|
|
125
299
|
effect: null,
|
|
126
300
|
event: {
|
|
127
301
|
type: "MAKING_ORDER",
|
|
128
|
-
rule:
|
|
302
|
+
rule: t.scaffoldGroup()
|
|
129
303
|
},
|
|
130
304
|
group: null,
|
|
131
305
|
targetLocation: null,
|
|
@@ -388,7 +562,7 @@ const te = {
|
|
|
388
562
|
code: "",
|
|
389
563
|
event: {
|
|
390
564
|
type: "BILL_COMPLETED",
|
|
391
|
-
rule:
|
|
565
|
+
rule: t.scaffoldGroup()
|
|
392
566
|
},
|
|
393
567
|
group: null,
|
|
394
568
|
targetLocation: null,
|
|
@@ -410,7 +584,7 @@ const te = {
|
|
|
410
584
|
// },
|
|
411
585
|
hideInApp: !0
|
|
412
586
|
},
|
|
413
|
-
configs:
|
|
587
|
+
configs: p("VOUCHER", {
|
|
414
588
|
name: "",
|
|
415
589
|
business: null,
|
|
416
590
|
noCampaign: !1
|
|
@@ -538,17 +712,17 @@ const te = {
|
|
|
538
712
|
image: "",
|
|
539
713
|
event: {
|
|
540
714
|
type: "SCHEDULE",
|
|
541
|
-
rule:
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
715
|
+
rule: t.setRuleToGroup(
|
|
716
|
+
t.scaffoldGroup(),
|
|
717
|
+
t.setRuleToGroup(
|
|
718
|
+
t.scaffoldGroup("g_schedule"),
|
|
545
719
|
[
|
|
546
|
-
|
|
720
|
+
t.constructEntry(
|
|
547
721
|
"trigger.date",
|
|
548
722
|
"_rrule",
|
|
549
723
|
"RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU"
|
|
550
724
|
),
|
|
551
|
-
|
|
725
|
+
t.constructEntry(
|
|
552
726
|
"trigger.time",
|
|
553
727
|
"_isOnTime",
|
|
554
728
|
"00:00"
|
|
@@ -742,7 +916,7 @@ const te = {
|
|
|
742
916
|
image: "",
|
|
743
917
|
event: {
|
|
744
918
|
type: "BILL_COMPLETED",
|
|
745
|
-
rule:
|
|
919
|
+
rule: t.scaffoldGroup()
|
|
746
920
|
},
|
|
747
921
|
group: null,
|
|
748
922
|
targetLocation: null,
|
|
@@ -929,7 +1103,7 @@ const te = {
|
|
|
929
1103
|
image: "",
|
|
930
1104
|
event: {
|
|
931
1105
|
type: "BILL_COMPLETED",
|
|
932
|
-
rule:
|
|
1106
|
+
rule: t.scaffoldGroup()
|
|
933
1107
|
},
|
|
934
1108
|
group: null,
|
|
935
1109
|
targetLocation: null,
|
|
@@ -1116,7 +1290,7 @@ const te = {
|
|
|
1116
1290
|
image: "",
|
|
1117
1291
|
event: {
|
|
1118
1292
|
type: "BILL_COMPLETED",
|
|
1119
|
-
rule:
|
|
1293
|
+
rule: t.scaffoldGroup()
|
|
1120
1294
|
},
|
|
1121
1295
|
group: null,
|
|
1122
1296
|
targetLocation: null,
|
|
@@ -1325,7 +1499,7 @@ const te = {
|
|
|
1325
1499
|
image: "",
|
|
1326
1500
|
event: {
|
|
1327
1501
|
type: "BILL_COMPLETED",
|
|
1328
|
-
rule:
|
|
1502
|
+
rule: t.scaffoldGroup()
|
|
1329
1503
|
},
|
|
1330
1504
|
group: null,
|
|
1331
1505
|
targetLocation: null,
|
|
@@ -1343,7 +1517,7 @@ const te = {
|
|
|
1343
1517
|
game: {
|
|
1344
1518
|
event: {
|
|
1345
1519
|
type: "GAME_COMPLETED",
|
|
1346
|
-
rule:
|
|
1520
|
+
rule: t.scaffoldGroup()
|
|
1347
1521
|
},
|
|
1348
1522
|
name: "rewardpool_",
|
|
1349
1523
|
targetLocation: null,
|
|
@@ -1355,7 +1529,7 @@ const te = {
|
|
|
1355
1529
|
rewards: []
|
|
1356
1530
|
}
|
|
1357
1531
|
},
|
|
1358
|
-
configs:
|
|
1532
|
+
configs: p("GAME", {
|
|
1359
1533
|
name: "Token",
|
|
1360
1534
|
business: null,
|
|
1361
1535
|
noCampaign: !1
|
|
@@ -1580,7 +1754,7 @@ const te = {
|
|
|
1580
1754
|
},
|
|
1581
1755
|
event: {
|
|
1582
1756
|
type: "BILL_COMPLETED",
|
|
1583
|
-
rule:
|
|
1757
|
+
rule: t.scaffoldGroup()
|
|
1584
1758
|
},
|
|
1585
1759
|
mission: {
|
|
1586
1760
|
type: "STAMP",
|
|
@@ -1596,53 +1770,219 @@ const te = {
|
|
|
1596
1770
|
type: "timeframe"
|
|
1597
1771
|
}
|
|
1598
1772
|
},
|
|
1599
|
-
configs:
|
|
1773
|
+
configs: p("STAMP", {
|
|
1600
1774
|
business: null,
|
|
1601
1775
|
noCampaign: !1
|
|
1602
1776
|
})
|
|
1603
1777
|
}
|
|
1778
|
+
},
|
|
1779
|
+
GRAB: {
|
|
1780
|
+
name: "Grab Campaign Template",
|
|
1781
|
+
description: "Grab campaign template for campaign creation.",
|
|
1782
|
+
steps: [
|
|
1783
|
+
{
|
|
1784
|
+
name: "connect.template.general_information",
|
|
1785
|
+
groups: [
|
|
1786
|
+
{
|
|
1787
|
+
name: "connect.template.general",
|
|
1788
|
+
fields: [
|
|
1789
|
+
{
|
|
1790
|
+
label: "connect.template.campaign_name",
|
|
1791
|
+
property: "campaign.name",
|
|
1792
|
+
type: "text"
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
label: "connect.template.campaign_period",
|
|
1796
|
+
property: "campaign.timeframeOptions",
|
|
1797
|
+
type: "timeframe"
|
|
1798
|
+
}
|
|
1799
|
+
]
|
|
1800
|
+
}
|
|
1801
|
+
]
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: "connect.template.discount",
|
|
1805
|
+
groups: [
|
|
1806
|
+
{
|
|
1807
|
+
name: "connect.template.discount",
|
|
1808
|
+
fields: [
|
|
1809
|
+
{
|
|
1810
|
+
label: void 0,
|
|
1811
|
+
property: "campaign.discount",
|
|
1812
|
+
type: "grab_effect"
|
|
1813
|
+
}
|
|
1814
|
+
]
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
name: "connect.template.grab_quota",
|
|
1818
|
+
fields: [
|
|
1819
|
+
{
|
|
1820
|
+
label: void 0,
|
|
1821
|
+
property: "campaign.quotas",
|
|
1822
|
+
type: "grab_quota"
|
|
1823
|
+
}
|
|
1824
|
+
]
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
name: "connect.template.grab_condition",
|
|
1828
|
+
fields: [
|
|
1829
|
+
{
|
|
1830
|
+
label: void 0,
|
|
1831
|
+
property: "campaign.conditions",
|
|
1832
|
+
type: "grab_conditions"
|
|
1833
|
+
}
|
|
1834
|
+
]
|
|
1835
|
+
}
|
|
1836
|
+
]
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
name: "connect.template.terms_conditions",
|
|
1840
|
+
groups: [
|
|
1841
|
+
{
|
|
1842
|
+
name: "Location",
|
|
1843
|
+
fields: [
|
|
1844
|
+
{
|
|
1845
|
+
label: "Target location",
|
|
1846
|
+
property: "campaign.targetLocation",
|
|
1847
|
+
type: "target_location"
|
|
1848
|
+
}
|
|
1849
|
+
]
|
|
1850
|
+
}
|
|
1851
|
+
]
|
|
1852
|
+
}
|
|
1853
|
+
],
|
|
1854
|
+
defaultValue: {
|
|
1855
|
+
templateId: "",
|
|
1856
|
+
campaign: {
|
|
1857
|
+
type: "GRAB",
|
|
1858
|
+
templateId: "",
|
|
1859
|
+
name: "",
|
|
1860
|
+
description: "",
|
|
1861
|
+
image: "",
|
|
1862
|
+
discount: null,
|
|
1863
|
+
group: null,
|
|
1864
|
+
event: {
|
|
1865
|
+
type: "MAKING_ORDER",
|
|
1866
|
+
rule: t.scaffoldGroup()
|
|
1867
|
+
},
|
|
1868
|
+
quotas: {
|
|
1869
|
+
totalCount: 10,
|
|
1870
|
+
totalCountPerUser: 2
|
|
1871
|
+
},
|
|
1872
|
+
conditions: {
|
|
1873
|
+
startTime: "",
|
|
1874
|
+
endTime: "",
|
|
1875
|
+
eaterType: "all",
|
|
1876
|
+
minBasketAmount: 10,
|
|
1877
|
+
bundleQuantity: 2,
|
|
1878
|
+
workingHour: {
|
|
1879
|
+
sun: {
|
|
1880
|
+
periods: [
|
|
1881
|
+
{
|
|
1882
|
+
startTime: "11:30",
|
|
1883
|
+
endTime: "14:00"
|
|
1884
|
+
}
|
|
1885
|
+
]
|
|
1886
|
+
},
|
|
1887
|
+
mon: {
|
|
1888
|
+
periods: [
|
|
1889
|
+
{
|
|
1890
|
+
startTime: "11:30",
|
|
1891
|
+
endTime: "14:00"
|
|
1892
|
+
}
|
|
1893
|
+
]
|
|
1894
|
+
},
|
|
1895
|
+
tue: {
|
|
1896
|
+
periods: [
|
|
1897
|
+
{
|
|
1898
|
+
startTime: "11:30",
|
|
1899
|
+
endTime: "14:00"
|
|
1900
|
+
}
|
|
1901
|
+
]
|
|
1902
|
+
},
|
|
1903
|
+
wed: {
|
|
1904
|
+
periods: [
|
|
1905
|
+
{
|
|
1906
|
+
startTime: "11:30",
|
|
1907
|
+
endTime: "14:00"
|
|
1908
|
+
}
|
|
1909
|
+
]
|
|
1910
|
+
},
|
|
1911
|
+
thu: {
|
|
1912
|
+
periods: [
|
|
1913
|
+
{
|
|
1914
|
+
startTime: "11:30",
|
|
1915
|
+
endTime: "14:00"
|
|
1916
|
+
}
|
|
1917
|
+
]
|
|
1918
|
+
},
|
|
1919
|
+
fri: {
|
|
1920
|
+
periods: [
|
|
1921
|
+
{
|
|
1922
|
+
startTime: "11:30",
|
|
1923
|
+
endTime: "14:00"
|
|
1924
|
+
}
|
|
1925
|
+
]
|
|
1926
|
+
},
|
|
1927
|
+
sat: {
|
|
1928
|
+
periods: [
|
|
1929
|
+
{
|
|
1930
|
+
startTime: "11:30",
|
|
1931
|
+
endTime: "14:00"
|
|
1932
|
+
}
|
|
1933
|
+
]
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
targetLocation: null,
|
|
1938
|
+
timeframeOptions: {
|
|
1939
|
+
type: "timeframe",
|
|
1940
|
+
property: "__now"
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1604
1944
|
}
|
|
1605
1945
|
};
|
|
1606
|
-
|
|
1946
|
+
t.scaffoldGroup(), p("STAMP", {
|
|
1607
1947
|
business: null,
|
|
1608
1948
|
noCampaign: !1
|
|
1609
1949
|
});
|
|
1610
1950
|
({
|
|
1611
|
-
...
|
|
1612
|
-
},
|
|
1951
|
+
...t.scaffoldGroup()
|
|
1952
|
+
}, p("VOUCHER", {
|
|
1613
1953
|
name: "",
|
|
1614
1954
|
business: null,
|
|
1615
1955
|
noCampaign: !1
|
|
1616
1956
|
}));
|
|
1617
1957
|
({
|
|
1618
|
-
...
|
|
1619
|
-
},
|
|
1958
|
+
...t.scaffoldGroup()
|
|
1959
|
+
}, p("VOUCHER", {
|
|
1620
1960
|
name: "",
|
|
1621
1961
|
business: null,
|
|
1622
1962
|
noCampaign: !1
|
|
1623
1963
|
}));
|
|
1624
1964
|
({
|
|
1625
|
-
...
|
|
1965
|
+
...t.scaffoldGroup()
|
|
1626
1966
|
});
|
|
1627
1967
|
({
|
|
1628
|
-
...
|
|
1968
|
+
...t.scaffoldGroup()
|
|
1629
1969
|
});
|
|
1630
1970
|
({
|
|
1631
|
-
...
|
|
1971
|
+
...t.scaffoldGroup()
|
|
1632
1972
|
});
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
[
|
|
1973
|
+
t.setRuleToGroup(
|
|
1974
|
+
t.scaffoldGroup(),
|
|
1975
|
+
t.setRuleToGroup(
|
|
1976
|
+
t.scaffoldGroup("g_user"),
|
|
1977
|
+
[t.constructEntry("user.member", "_isIn", [!0])],
|
|
1638
1978
|
"&&"
|
|
1639
1979
|
)
|
|
1640
1980
|
);
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1981
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1982
|
+
t.setRuleToGroup(
|
|
1983
|
+
t.scaffoldGroup("g_user"),
|
|
1644
1984
|
[
|
|
1645
|
-
|
|
1985
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1646
1986
|
op: "this",
|
|
1647
1987
|
unit: "month",
|
|
1648
1988
|
ignoreYear: !0
|
|
@@ -1652,13 +1992,13 @@ a.setRuleToGroup(a.scaffoldGroup(), [
|
|
|
1652
1992
|
)
|
|
1653
1993
|
]);
|
|
1654
1994
|
({
|
|
1655
|
-
...
|
|
1995
|
+
...t.scaffoldGroup()
|
|
1656
1996
|
});
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1997
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1998
|
+
t.setRuleToGroup(
|
|
1999
|
+
t.scaffoldGroup("g_user"),
|
|
1660
2000
|
[
|
|
1661
|
-
|
|
2001
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1662
2002
|
op: "this",
|
|
1663
2003
|
unit: "month",
|
|
1664
2004
|
ignoreYear: !0
|
|
@@ -1668,85 +2008,85 @@ a.setRuleToGroup(a.scaffoldGroup(), [
|
|
|
1668
2008
|
)
|
|
1669
2009
|
]);
|
|
1670
2010
|
({
|
|
1671
|
-
...
|
|
2011
|
+
...t.scaffoldGroup()
|
|
1672
2012
|
});
|
|
1673
2013
|
({
|
|
1674
|
-
...
|
|
1675
|
-
},
|
|
2014
|
+
...t.scaffoldGroup()
|
|
2015
|
+
}, p("VOUCHER", {
|
|
1676
2016
|
name: "",
|
|
1677
2017
|
business: null,
|
|
1678
2018
|
noCampaign: !1
|
|
1679
2019
|
}));
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
2020
|
+
t.setRuleToGroup(
|
|
2021
|
+
t.scaffoldGroup(),
|
|
2022
|
+
t.setRuleToGroup(
|
|
2023
|
+
t.scaffoldGroup("g_schedule"),
|
|
1684
2024
|
[
|
|
1685
|
-
|
|
1686
|
-
|
|
2025
|
+
t.constructEntry("trigger.date", "_isOnDate", ""),
|
|
2026
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1687
2027
|
],
|
|
1688
2028
|
"&&"
|
|
1689
2029
|
)
|
|
1690
2030
|
);
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
2031
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
2032
|
+
t.setRuleToGroup(
|
|
2033
|
+
t.scaffoldGroup("g_schedule"),
|
|
1694
2034
|
[
|
|
1695
|
-
|
|
2035
|
+
t.constructEntry(
|
|
1696
2036
|
"trigger.date",
|
|
1697
2037
|
"_rrule",
|
|
1698
2038
|
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
1699
2039
|
),
|
|
1700
|
-
|
|
2040
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1701
2041
|
],
|
|
1702
2042
|
"&&"
|
|
1703
2043
|
)
|
|
1704
2044
|
]);
|
|
1705
|
-
({ ...
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
2045
|
+
({ ...t.scaffoldGroup() });
|
|
2046
|
+
t.setRuleToGroup(
|
|
2047
|
+
t.scaffoldGroup(),
|
|
2048
|
+
t.setRuleToGroup(
|
|
2049
|
+
t.scaffoldGroup("g_schedule"),
|
|
1710
2050
|
[
|
|
1711
|
-
|
|
2051
|
+
t.constructEntry(
|
|
1712
2052
|
"trigger.date",
|
|
1713
2053
|
"_rrule",
|
|
1714
2054
|
"RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
|
|
1715
2055
|
),
|
|
1716
|
-
|
|
2056
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1717
2057
|
],
|
|
1718
2058
|
"&&"
|
|
1719
2059
|
)
|
|
1720
2060
|
);
|
|
1721
|
-
|
|
2061
|
+
t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
|
|
1722
2062
|
name: "Token",
|
|
1723
2063
|
business: null,
|
|
1724
2064
|
noCampaign: !1
|
|
1725
2065
|
});
|
|
1726
2066
|
({
|
|
1727
|
-
...
|
|
1728
|
-
},
|
|
2067
|
+
...t.scaffoldGroup()
|
|
2068
|
+
}, p("VOUCHER", {
|
|
1729
2069
|
name: "",
|
|
1730
2070
|
business: null,
|
|
1731
2071
|
noCampaign: !1
|
|
1732
2072
|
}));
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
2073
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
2074
|
+
t.setRuleToGroup(
|
|
2075
|
+
t.scaffoldGroup("g_schedule"),
|
|
1736
2076
|
[
|
|
1737
|
-
|
|
2077
|
+
t.constructEntry(
|
|
1738
2078
|
"trigger.date",
|
|
1739
2079
|
"_rrule",
|
|
1740
2080
|
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
1741
2081
|
),
|
|
1742
|
-
|
|
2082
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1743
2083
|
],
|
|
1744
2084
|
"&&"
|
|
1745
2085
|
),
|
|
1746
|
-
|
|
1747
|
-
|
|
2086
|
+
t.setRuleToGroup(
|
|
2087
|
+
t.scaffoldGroup("g_user"),
|
|
1748
2088
|
[
|
|
1749
|
-
|
|
2089
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1750
2090
|
op: "this",
|
|
1751
2091
|
unit: "month",
|
|
1752
2092
|
ignoreYear: !0
|
|
@@ -1754,30 +2094,30 @@ a.setRuleToGroup(a.scaffoldGroup(), [
|
|
|
1754
2094
|
],
|
|
1755
2095
|
"&&"
|
|
1756
2096
|
)
|
|
1757
|
-
]),
|
|
2097
|
+
]), p("VOUCHER", {
|
|
1758
2098
|
name: "",
|
|
1759
2099
|
business: null,
|
|
1760
2100
|
noCampaign: !1
|
|
1761
2101
|
});
|
|
1762
2102
|
({
|
|
1763
|
-
...
|
|
2103
|
+
...t.scaffoldGroup()
|
|
1764
2104
|
});
|
|
1765
2105
|
({
|
|
1766
|
-
...
|
|
2106
|
+
...t.scaffoldGroup()
|
|
1767
2107
|
});
|
|
1768
2108
|
({
|
|
1769
|
-
...
|
|
2109
|
+
...t.scaffoldGroup()
|
|
1770
2110
|
});
|
|
1771
2111
|
({
|
|
1772
|
-
...
|
|
2112
|
+
...t.scaffoldGroup()
|
|
1773
2113
|
});
|
|
1774
2114
|
({
|
|
1775
|
-
...
|
|
2115
|
+
...t.scaffoldGroup()
|
|
1776
2116
|
});
|
|
1777
2117
|
({
|
|
1778
|
-
...
|
|
2118
|
+
...t.scaffoldGroup()
|
|
1779
2119
|
});
|
|
1780
|
-
const
|
|
2120
|
+
const Z = e.enum([
|
|
1781
2121
|
"MEMBER_REWARD",
|
|
1782
2122
|
"PAID_LOYALTY",
|
|
1783
2123
|
"COLLECT_FEEDBACK",
|
|
@@ -1787,7 +2127,7 @@ const v = e.enum([
|
|
|
1787
2127
|
"BROADCAST",
|
|
1788
2128
|
"BIRTHDAY",
|
|
1789
2129
|
"GAME"
|
|
1790
|
-
]),
|
|
2130
|
+
]), ee = e.enum([
|
|
1791
2131
|
"text",
|
|
1792
2132
|
"number",
|
|
1793
2133
|
"textarea",
|
|
@@ -1813,110 +2153,118 @@ const v = e.enum([
|
|
|
1813
2153
|
"rule_bill",
|
|
1814
2154
|
"rule_feedback",
|
|
1815
2155
|
"rule_birthday",
|
|
1816
|
-
"promotion_game_type"
|
|
1817
|
-
|
|
2156
|
+
"promotion_game_type",
|
|
2157
|
+
"grab_effect",
|
|
2158
|
+
"grab_quota",
|
|
2159
|
+
"grab_conditions"
|
|
2160
|
+
]), te = e.object({
|
|
1818
2161
|
label: e.string().optional(),
|
|
1819
2162
|
label_locale: e.record(e.string()).nullish(),
|
|
1820
2163
|
property: e.string().or(e.any()),
|
|
1821
|
-
type:
|
|
2164
|
+
type: ee,
|
|
1822
2165
|
extras: e.string().optional(),
|
|
1823
2166
|
isRuleChildren: e.boolean().optional()
|
|
1824
|
-
}),
|
|
2167
|
+
}), z = e.object({
|
|
1825
2168
|
not: e.boolean().optional(),
|
|
1826
2169
|
property: e.string(),
|
|
1827
2170
|
value: e.any()
|
|
1828
|
-
}),
|
|
2171
|
+
}), ae = e.object({
|
|
1829
2172
|
name: e.string().optional(),
|
|
1830
2173
|
name_locale: e.record(e.string()).nullish(),
|
|
1831
|
-
fields: e.array(
|
|
1832
|
-
condition:
|
|
1833
|
-
e.array(
|
|
2174
|
+
fields: e.array(te),
|
|
2175
|
+
condition: z.optional().or(
|
|
2176
|
+
e.array(z)
|
|
1834
2177
|
)
|
|
1835
|
-
}),
|
|
2178
|
+
}), ne = e.object({
|
|
1836
2179
|
name: e.string(),
|
|
1837
2180
|
name_locale: e.record(e.string()).nullish(),
|
|
1838
|
-
groups: e.array(
|
|
2181
|
+
groups: e.array(ae)
|
|
1839
2182
|
});
|
|
1840
2183
|
e.object({
|
|
1841
|
-
_id:
|
|
2184
|
+
_id: o,
|
|
1842
2185
|
name: e.string(),
|
|
1843
2186
|
name_locale: e.record(e.string()).nullish(),
|
|
1844
2187
|
description: e.string().nullish(),
|
|
1845
2188
|
description_locale: e.record(e.string()).nullish(),
|
|
1846
|
-
steps: e.array(
|
|
1847
|
-
intention: e.array(
|
|
2189
|
+
steps: e.array(ne).min(1),
|
|
2190
|
+
intention: e.array(Z),
|
|
1848
2191
|
defaultValue: e.any()
|
|
1849
2192
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
1850
|
-
const
|
|
2193
|
+
const oe = {
|
|
1851
2194
|
collectionName: "Businesses",
|
|
1852
2195
|
transform: {
|
|
1853
2196
|
_id: "oid"
|
|
1854
2197
|
}
|
|
1855
2198
|
};
|
|
1856
2199
|
e.object({
|
|
1857
|
-
_id:
|
|
2200
|
+
_id: o,
|
|
1858
2201
|
ownerId: e.string(),
|
|
1859
2202
|
name: e.string(),
|
|
1860
2203
|
credit: e.number(),
|
|
1861
2204
|
forceSend: e.boolean().optional()
|
|
1862
|
-
}).describe(
|
|
1863
|
-
const
|
|
2205
|
+
}).describe(m.describe(oe));
|
|
2206
|
+
const T = e.enum(["PHONE"]), ie = e.enum([
|
|
1864
2207
|
"MOCEAN",
|
|
1865
2208
|
"SLACK",
|
|
1866
2209
|
"SMS",
|
|
1867
2210
|
"EMAIL",
|
|
1868
2211
|
"WHATSAPP"
|
|
1869
|
-
]),
|
|
2212
|
+
]), le = e.enum(["PENDING", "COMPLETED", "FAILED"]), re = e.enum([
|
|
1870
2213
|
"General",
|
|
1871
2214
|
"Otp",
|
|
1872
2215
|
"Marketing",
|
|
1873
2216
|
"Ordering",
|
|
1874
2217
|
"MemberInvitation",
|
|
1875
2218
|
"MarketingPromotion"
|
|
1876
|
-
]),
|
|
1877
|
-
type:
|
|
1878
|
-
}),
|
|
1879
|
-
type: e.literal(
|
|
1880
|
-
provider:
|
|
1881
|
-
usage:
|
|
1882
|
-
}),
|
|
2219
|
+
]), ce = e.object({
|
|
2220
|
+
type: T
|
|
2221
|
+
}), v = ce.extend({
|
|
2222
|
+
type: e.literal(T.enum.PHONE),
|
|
2223
|
+
provider: ie,
|
|
2224
|
+
usage: re.optional()
|
|
2225
|
+
}), pe = {
|
|
1883
2226
|
collectionName: "Notifications",
|
|
1884
2227
|
transform: { _id: "oid", business: "oid" }
|
|
1885
2228
|
};
|
|
1886
2229
|
e.object({
|
|
1887
|
-
_id:
|
|
1888
|
-
business:
|
|
2230
|
+
_id: o,
|
|
2231
|
+
business: o,
|
|
1889
2232
|
target: e.string(),
|
|
1890
2233
|
title: e.string().optional(),
|
|
1891
2234
|
message: e.string(),
|
|
1892
|
-
option:
|
|
1893
|
-
status:
|
|
2235
|
+
option: v,
|
|
2236
|
+
status: le,
|
|
1894
2237
|
ref: e.string().optional()
|
|
1895
|
-
}).describe(
|
|
1896
|
-
e.object({
|
|
2238
|
+
}).describe(m.describe(pe));
|
|
2239
|
+
const me = e.object({
|
|
1897
2240
|
target: e.string(),
|
|
1898
2241
|
title: e.string().optional(),
|
|
1899
2242
|
message: e.string(),
|
|
1900
|
-
option:
|
|
2243
|
+
option: v,
|
|
1901
2244
|
ref: e.string().optional()
|
|
1902
2245
|
});
|
|
2246
|
+
e.object({
|
|
2247
|
+
campaignId: e.string(),
|
|
2248
|
+
notification: me,
|
|
2249
|
+
business: e.string()
|
|
2250
|
+
});
|
|
1903
2251
|
e.object({
|
|
1904
2252
|
phone: e.string(),
|
|
1905
2253
|
message: e.string()
|
|
1906
2254
|
});
|
|
1907
|
-
const
|
|
2255
|
+
const C = e.object({
|
|
1908
2256
|
name: e.string().optional(),
|
|
1909
2257
|
address: e.string()
|
|
1910
|
-
}),
|
|
2258
|
+
}), se = e.object({
|
|
1911
2259
|
filename: e.string(),
|
|
1912
2260
|
content: e.instanceof(Uint8Array)
|
|
1913
2261
|
});
|
|
1914
2262
|
e.object({
|
|
1915
|
-
from:
|
|
1916
|
-
to: e.array(
|
|
2263
|
+
from: C.optional(),
|
|
2264
|
+
to: e.array(C),
|
|
1917
2265
|
subject: e.string(),
|
|
1918
2266
|
html: e.string().optional(),
|
|
1919
|
-
attachments: e.array(
|
|
2267
|
+
attachments: e.array(se).optional()
|
|
1920
2268
|
});
|
|
1921
2269
|
e.object({
|
|
1922
2270
|
subject: e.string(),
|
|
@@ -1956,7 +2304,7 @@ e.object({
|
|
|
1956
2304
|
billId: e.string()
|
|
1957
2305
|
});
|
|
1958
2306
|
e.object({
|
|
1959
|
-
amount:
|
|
2307
|
+
amount: R,
|
|
1960
2308
|
member: e.string(),
|
|
1961
2309
|
bill: e.string(),
|
|
1962
2310
|
otp: e.string().nullish(),
|
|
@@ -1965,15 +2313,15 @@ e.object({
|
|
|
1965
2313
|
e.object({
|
|
1966
2314
|
orderId: e.string()
|
|
1967
2315
|
});
|
|
1968
|
-
var
|
|
1969
|
-
e.nativeEnum(
|
|
2316
|
+
var S = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(S || {});
|
|
2317
|
+
e.nativeEnum(S);
|
|
1970
2318
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
1971
2319
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
1972
2320
|
e.enum(["quota"]);
|
|
1973
|
-
var
|
|
1974
|
-
e.nativeEnum(
|
|
2321
|
+
var N = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(N || {});
|
|
2322
|
+
e.nativeEnum(N);
|
|
1975
2323
|
e.enum(["restaurant"]);
|
|
1976
|
-
const
|
|
2324
|
+
const ge = e.object({
|
|
1977
2325
|
label: e.string(),
|
|
1978
2326
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
1979
2327
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -1983,41 +2331,41 @@ const D = e.object({
|
|
|
1983
2331
|
reason: e.string().optional()
|
|
1984
2332
|
});
|
|
1985
2333
|
e.object({
|
|
1986
|
-
_id:
|
|
2334
|
+
_id: o,
|
|
1987
2335
|
businessId: e.string(),
|
|
1988
2336
|
userId: e.string(),
|
|
1989
2337
|
email: e.string().nullish(),
|
|
1990
2338
|
phoneNo: e.string().nullish(),
|
|
1991
|
-
permissions: e.array(e.lazy(() =>
|
|
2339
|
+
permissions: e.array(e.lazy(() => ge))
|
|
1992
2340
|
}).describe(
|
|
1993
|
-
|
|
2341
|
+
m.describe({
|
|
1994
2342
|
collectionName: "PermissionUsers",
|
|
1995
2343
|
transform: {
|
|
1996
2344
|
_id: "oid"
|
|
1997
2345
|
}
|
|
1998
2346
|
})
|
|
1999
2347
|
);
|
|
2000
|
-
const
|
|
2348
|
+
const U = e.object({
|
|
2001
2349
|
userId: e.string(),
|
|
2002
2350
|
level: e.number(),
|
|
2003
2351
|
role: e.string().optional(),
|
|
2004
2352
|
businessId: e.string().optional(),
|
|
2005
2353
|
restaurantId: e.string().optional()
|
|
2006
|
-
}),
|
|
2354
|
+
}), de = e.function().args(e.any(), U).returns(e.boolean()), he = e.function().args(U).returns(e.promise(e.array(e.any())));
|
|
2007
2355
|
e.object({
|
|
2008
|
-
isAdmin:
|
|
2009
|
-
getRules:
|
|
2356
|
+
isAdmin: de,
|
|
2357
|
+
getRules: he
|
|
2010
2358
|
});
|
|
2011
2359
|
e.object({
|
|
2012
|
-
transactions: e.array(
|
|
2013
|
-
collections: e.array(
|
|
2360
|
+
transactions: e.array(x),
|
|
2361
|
+
collections: e.array(D)
|
|
2014
2362
|
});
|
|
2015
|
-
const
|
|
2363
|
+
const P = e.enum([
|
|
2016
2364
|
"ROCK_PAPER_SCISSOR"
|
|
2017
2365
|
]);
|
|
2018
|
-
|
|
2366
|
+
P.enum.ROCK_PAPER_SCISSOR + "";
|
|
2019
2367
|
e.object({
|
|
2020
|
-
type:
|
|
2368
|
+
type: P
|
|
2021
2369
|
});
|
|
2022
2370
|
e.object({
|
|
2023
2371
|
host: e.string().url(),
|
|
@@ -2026,7 +2374,7 @@ e.object({
|
|
|
2026
2374
|
roomId: e.string()
|
|
2027
2375
|
});
|
|
2028
2376
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
2029
|
-
const
|
|
2377
|
+
const ue = {
|
|
2030
2378
|
collectionName: "MarketingMaterials",
|
|
2031
2379
|
transform: {
|
|
2032
2380
|
_id: "oid",
|
|
@@ -2034,13 +2382,13 @@ const G = {
|
|
|
2034
2382
|
}
|
|
2035
2383
|
};
|
|
2036
2384
|
e.object({
|
|
2037
|
-
_id:
|
|
2038
|
-
business:
|
|
2385
|
+
_id: o,
|
|
2386
|
+
business: o,
|
|
2039
2387
|
imageUrl: e.string().url(),
|
|
2040
2388
|
headline: e.string(),
|
|
2041
2389
|
caption: e.string(),
|
|
2042
2390
|
editedAt: e.coerce.date()
|
|
2043
|
-
}).describe(
|
|
2391
|
+
}).describe(m.describe(ue));
|
|
2044
2392
|
e.object({
|
|
2045
2393
|
id: e.number(),
|
|
2046
2394
|
name: e.string(),
|
|
@@ -2060,12 +2408,12 @@ e.object({
|
|
|
2060
2408
|
phone: e.string().optional(),
|
|
2061
2409
|
email: e.string().optional()
|
|
2062
2410
|
});
|
|
2063
|
-
const
|
|
2411
|
+
const _e = e.enum([
|
|
2064
2412
|
"PENDING",
|
|
2065
2413
|
"SUCCESS",
|
|
2066
2414
|
"FAILED",
|
|
2067
2415
|
"RETRYING"
|
|
2068
|
-
]),
|
|
2416
|
+
]), ye = {
|
|
2069
2417
|
collectionName: "WebhookLogs",
|
|
2070
2418
|
transform: {
|
|
2071
2419
|
_id: "oid",
|
|
@@ -2073,39 +2421,39 @@ const A = e.enum([
|
|
|
2073
2421
|
}
|
|
2074
2422
|
};
|
|
2075
2423
|
e.object({
|
|
2076
|
-
_id:
|
|
2077
|
-
business:
|
|
2424
|
+
_id: o,
|
|
2425
|
+
business: o,
|
|
2078
2426
|
type: e.string(),
|
|
2079
2427
|
payload: e.record(e.any()),
|
|
2080
|
-
status:
|
|
2428
|
+
status: _e,
|
|
2081
2429
|
response: e.any().optional(),
|
|
2082
2430
|
error: e.string().optional()
|
|
2083
|
-
}).describe(
|
|
2084
|
-
const
|
|
2431
|
+
}).describe(m.describe(ye));
|
|
2432
|
+
const fe = e.enum(["AUTO", "MANUAL"]);
|
|
2085
2433
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2086
|
-
const
|
|
2087
|
-
_id:
|
|
2434
|
+
const j = e.object({
|
|
2435
|
+
_id: o,
|
|
2088
2436
|
name: e.string().min(1, "Name is required").max(50),
|
|
2089
|
-
type:
|
|
2090
|
-
event:
|
|
2091
|
-
}),
|
|
2437
|
+
type: fe,
|
|
2438
|
+
event: w.optional()
|
|
2439
|
+
}), be = e.object({
|
|
2092
2440
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2093
2441
|
to: e.number().int("Must be integer").nullish()
|
|
2094
|
-
}).superRefine((n,
|
|
2095
|
-
n.from && n.to && n.from > n.to &&
|
|
2442
|
+
}).superRefine((n, a) => {
|
|
2443
|
+
n.from && n.to && n.from > n.to && a.addIssue({
|
|
2096
2444
|
code: "custom",
|
|
2097
2445
|
message: "Max referral count must be more than min referral count"
|
|
2098
2446
|
});
|
|
2099
|
-
}),
|
|
2100
|
-
threshold:
|
|
2101
|
-
rewards: e.array(
|
|
2102
|
-
pf_reward: e.array(
|
|
2103
|
-
}),
|
|
2447
|
+
}), He = e.object({
|
|
2448
|
+
threshold: be,
|
|
2449
|
+
rewards: e.array(o),
|
|
2450
|
+
pf_reward: e.array(_).optional()
|
|
2451
|
+
}), y = e.object({
|
|
2104
2452
|
id: e.string(),
|
|
2105
2453
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2106
|
-
rule:
|
|
2107
|
-
rewards: e.array(
|
|
2108
|
-
}),
|
|
2454
|
+
rule: F.optional(),
|
|
2455
|
+
rewards: e.array(He)
|
|
2456
|
+
}), ze = {
|
|
2109
2457
|
collectionName: "ReferralRecords",
|
|
2110
2458
|
transform: {
|
|
2111
2459
|
_id: "oid",
|
|
@@ -2114,25 +2462,25 @@ const y = e.object({
|
|
|
2114
2462
|
referee: "oid",
|
|
2115
2463
|
refereeReward: "oid"
|
|
2116
2464
|
}
|
|
2117
|
-
},
|
|
2465
|
+
}, Ce = e.object({
|
|
2118
2466
|
completedAt: e.coerce.date(),
|
|
2119
|
-
criteria:
|
|
2467
|
+
criteria: o,
|
|
2120
2468
|
ref: e.string()
|
|
2121
|
-
}),
|
|
2122
|
-
_id:
|
|
2123
|
-
business:
|
|
2124
|
-
referer:
|
|
2125
|
-
referee:
|
|
2126
|
-
criteria: e.array(
|
|
2127
|
-
reward: e.array(
|
|
2128
|
-
refereeReward: e.array(
|
|
2129
|
-
criteria_progress: e.array(
|
|
2469
|
+
}), Te = e.object({
|
|
2470
|
+
_id: o,
|
|
2471
|
+
business: o,
|
|
2472
|
+
referer: o,
|
|
2473
|
+
referee: o,
|
|
2474
|
+
criteria: e.array(j),
|
|
2475
|
+
reward: e.array(y),
|
|
2476
|
+
refereeReward: e.array(o).optional(),
|
|
2477
|
+
criteria_progress: e.array(Ce),
|
|
2130
2478
|
status: e.string(),
|
|
2131
|
-
pf_referer:
|
|
2132
|
-
pf_referee:
|
|
2133
|
-
pf_refereeReward: e.array(
|
|
2134
|
-
}).describe(
|
|
2135
|
-
|
|
2479
|
+
pf_referer: g.optional(),
|
|
2480
|
+
pf_referee: g.optional(),
|
|
2481
|
+
pf_refereeReward: e.array(_).optional()
|
|
2482
|
+
}).describe(m.describe(ze));
|
|
2483
|
+
Te.pick({
|
|
2136
2484
|
_id: !0,
|
|
2137
2485
|
business: !0,
|
|
2138
2486
|
referer: !0,
|
|
@@ -2140,57 +2488,273 @@ W.pick({
|
|
|
2140
2488
|
criteria_progress: !0,
|
|
2141
2489
|
criteria: !0
|
|
2142
2490
|
}).extend({
|
|
2143
|
-
pf_referee:
|
|
2491
|
+
pf_referee: g.pick({
|
|
2144
2492
|
_id: !0,
|
|
2145
2493
|
name: !0,
|
|
2146
2494
|
phoneNumber: !0,
|
|
2147
2495
|
photoUrl: !0
|
|
2148
2496
|
})
|
|
2149
2497
|
});
|
|
2150
|
-
const
|
|
2498
|
+
const ve = {
|
|
2151
2499
|
collectionName: "ReferralProgram",
|
|
2152
2500
|
transform: {
|
|
2153
2501
|
_id: "oid",
|
|
2154
2502
|
business: "oid"
|
|
2155
2503
|
}
|
|
2156
|
-
},
|
|
2157
|
-
_id:
|
|
2158
|
-
business:
|
|
2504
|
+
}, J = e.object({
|
|
2505
|
+
_id: o,
|
|
2506
|
+
business: o,
|
|
2159
2507
|
term_and_condition: e.string().optional(),
|
|
2160
|
-
refereeReward: e.array(
|
|
2161
|
-
reward: e.array(
|
|
2162
|
-
criteria: e.array(
|
|
2163
|
-
}).describe(
|
|
2508
|
+
refereeReward: e.array(o).optional(),
|
|
2509
|
+
reward: e.array(y),
|
|
2510
|
+
criteria: e.array(j)
|
|
2511
|
+
}).describe(m.describe(ve));
|
|
2164
2512
|
e.object({
|
|
2165
|
-
referer:
|
|
2166
|
-
referee:
|
|
2167
|
-
business:
|
|
2513
|
+
referer: o,
|
|
2514
|
+
referee: o,
|
|
2515
|
+
business: o
|
|
2168
2516
|
});
|
|
2169
2517
|
e.object({
|
|
2170
|
-
program:
|
|
2518
|
+
program: J.pick({
|
|
2171
2519
|
_id: !0,
|
|
2172
2520
|
business: !0,
|
|
2173
2521
|
term_and_condition: !0
|
|
2174
2522
|
}).extend({
|
|
2175
|
-
reward:
|
|
2176
|
-
pf_refereeReward: e.array(
|
|
2523
|
+
reward: y.optional(),
|
|
2524
|
+
pf_refereeReward: e.array(_).optional()
|
|
2177
2525
|
}),
|
|
2178
2526
|
referralCount: e.number(),
|
|
2179
2527
|
successReferralCount: e.number(),
|
|
2180
|
-
referredBy:
|
|
2528
|
+
referredBy: g.pick({
|
|
2181
2529
|
_id: !0,
|
|
2182
2530
|
name: !0,
|
|
2183
2531
|
phoneNumber: !0,
|
|
2184
2532
|
photoUrl: !0
|
|
2185
2533
|
}).optional()
|
|
2186
2534
|
});
|
|
2187
|
-
|
|
2535
|
+
J.extend({
|
|
2188
2536
|
updateReferralRecord: e.boolean().optional()
|
|
2189
2537
|
});
|
|
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(o)
|
|
2544
|
+
}), Ne = e.object({
|
|
2545
|
+
locationId: o.nullable(),
|
|
2546
|
+
googleLocationName: e.string(),
|
|
2547
|
+
displayName: e.string().optional()
|
|
2548
|
+
}), Ue = e.object({
|
|
2549
|
+
token: e.string().nullable(),
|
|
2550
|
+
locations: e.array(Ne)
|
|
2551
|
+
}), Pe = e.object({
|
|
2552
|
+
token: e.string().nullable(),
|
|
2553
|
+
pages: e.array(Se)
|
|
2554
|
+
});
|
|
2555
|
+
e.object({
|
|
2556
|
+
_id: o,
|
|
2557
|
+
businessId: o,
|
|
2558
|
+
google: Ue.nullable(),
|
|
2559
|
+
facebook: Pe.nullable()
|
|
2560
|
+
}).describe(
|
|
2561
|
+
m.describe({
|
|
2562
|
+
collectionName: "ReviewSourceConfig",
|
|
2563
|
+
transform: {
|
|
2564
|
+
_id: "oid",
|
|
2565
|
+
businessId: "oid"
|
|
2566
|
+
}
|
|
2567
|
+
})
|
|
2568
|
+
);
|
|
2569
|
+
e.object({
|
|
2570
|
+
token: e.string()
|
|
2571
|
+
});
|
|
2572
|
+
e.object({
|
|
2573
|
+
locations: e.array(
|
|
2574
|
+
e.object({
|
|
2575
|
+
googleLocationName: e.string(),
|
|
2576
|
+
locationId: e.string().nullable(),
|
|
2577
|
+
displayName: e.string().optional()
|
|
2578
|
+
})
|
|
2579
|
+
)
|
|
2580
|
+
});
|
|
2581
|
+
e.object({
|
|
2582
|
+
token: e.string()
|
|
2583
|
+
});
|
|
2584
|
+
e.object({
|
|
2585
|
+
pages: e.array(
|
|
2586
|
+
e.object({
|
|
2587
|
+
facebookPageId: e.string(),
|
|
2588
|
+
locationIds: e.array(e.string())
|
|
2589
|
+
})
|
|
2590
|
+
)
|
|
2591
|
+
});
|
|
2592
|
+
e.object({
|
|
2593
|
+
_id: e.string(),
|
|
2594
|
+
google: e.object({
|
|
2595
|
+
token: e.string().nullable(),
|
|
2596
|
+
locations: e.array(
|
|
2597
|
+
e.object({
|
|
2598
|
+
googleLocationName: e.string(),
|
|
2599
|
+
displayName: e.string().optional(),
|
|
2600
|
+
locationId: e.string().nullable()
|
|
2601
|
+
})
|
|
2602
|
+
)
|
|
2603
|
+
}).nullable(),
|
|
2604
|
+
facebook: e.object({
|
|
2605
|
+
token: e.string().nullable(),
|
|
2606
|
+
pages: e.array(
|
|
2607
|
+
e.object({
|
|
2608
|
+
facebookPageId: e.string(),
|
|
2609
|
+
pageName: e.string(),
|
|
2610
|
+
pageProfileImageUrl: e.string(),
|
|
2611
|
+
locationIds: e.array(e.string())
|
|
2612
|
+
})
|
|
2613
|
+
)
|
|
2614
|
+
}).nullable()
|
|
2615
|
+
});
|
|
2616
|
+
const E = e.object({
|
|
2617
|
+
name: e.string(),
|
|
2618
|
+
pictureUrl: e.string()
|
|
2619
|
+
}), je = E.extend({
|
|
2620
|
+
isAnonymous: e.boolean().optional()
|
|
2621
|
+
}), Je = E.extend({
|
|
2622
|
+
id: e.string().optional()
|
|
2623
|
+
}), d = e.object({
|
|
2624
|
+
comment: e.string(),
|
|
2625
|
+
updateTime: e.coerce.date()
|
|
2626
|
+
}), s = e.object({
|
|
2627
|
+
thumbnailUrl: e.string(),
|
|
2628
|
+
thumbnailLabel: e.string(),
|
|
2629
|
+
videoUrl: e.string().optional()
|
|
2630
|
+
}), Ee = {
|
|
2631
|
+
collectionName: "Reviews",
|
|
2632
|
+
transform: {
|
|
2633
|
+
_id: "oid",
|
|
2634
|
+
locationId: "oid"
|
|
2635
|
+
},
|
|
2636
|
+
lookups: {
|
|
2637
|
+
reviewerId: {
|
|
2638
|
+
as: "reviewer",
|
|
2639
|
+
fromCollection: "UsersV2"
|
|
2640
|
+
},
|
|
2641
|
+
locationId: {
|
|
2642
|
+
as: "location",
|
|
2643
|
+
fromCollection: "Locations"
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
}, O = e.enum(["google", "facebook", "feedme"]);
|
|
2647
|
+
O.options;
|
|
2648
|
+
e.enum(["google", "facebook"]);
|
|
2649
|
+
const Oe = e.enum([
|
|
2650
|
+
"createTime_desc",
|
|
2651
|
+
"createTime_asc",
|
|
2652
|
+
"rating_asc",
|
|
2653
|
+
"rating_desc"
|
|
2654
|
+
]);
|
|
2655
|
+
e.object({
|
|
2656
|
+
source: O.optional(),
|
|
2657
|
+
dateFrom: e.coerce.date().optional(),
|
|
2658
|
+
dateTo: e.coerce.date().optional(),
|
|
2659
|
+
locationId: e.string().optional(),
|
|
2660
|
+
sort: Oe.optional(),
|
|
2661
|
+
limit: e.coerce.number().int().positive().optional(),
|
|
2662
|
+
skip: e.coerce.number().int().min(0).optional()
|
|
2663
|
+
});
|
|
2664
|
+
const I = e.object({
|
|
2665
|
+
name: e.string(),
|
|
2666
|
+
pictureUrl: e.string()
|
|
2667
|
+
}), Ie = I.extend({
|
|
2668
|
+
isAnonymous: e.boolean().optional()
|
|
2669
|
+
}), Re = I.extend({
|
|
2670
|
+
id: e.string().optional()
|
|
2671
|
+
}), f = e.object({
|
|
2672
|
+
_id: o,
|
|
2673
|
+
comment: e.string(),
|
|
2674
|
+
createTime: e.coerce.date(),
|
|
2675
|
+
locationId: o
|
|
2676
|
+
}), Le = f.extend({
|
|
2677
|
+
source: e.literal("google"),
|
|
2678
|
+
reviewer: Ie.optional(),
|
|
2679
|
+
reply: d.optional(),
|
|
2680
|
+
mediaItems: e.array(s),
|
|
2681
|
+
starRating: e.number(),
|
|
2682
|
+
locationName: e.string(),
|
|
2683
|
+
locationDisplayName: e.string()
|
|
2684
|
+
}), xe = f.extend({
|
|
2685
|
+
source: e.literal("facebook"),
|
|
2686
|
+
reviewer: Re.optional(),
|
|
2687
|
+
isPositive: e.boolean().optional(),
|
|
2688
|
+
pageId: e.string(),
|
|
2689
|
+
pageName: e.string()
|
|
2690
|
+
}), De = f.extend({
|
|
2691
|
+
source: e.literal("feedme"),
|
|
2692
|
+
reviewer: A,
|
|
2693
|
+
reply: d.optional(),
|
|
2694
|
+
starRating: e.number(),
|
|
2695
|
+
location: G.optional(),
|
|
2696
|
+
mediaItems: e.array(s),
|
|
2697
|
+
billId: e.string()
|
|
2698
|
+
});
|
|
2699
|
+
e.discriminatedUnion("source", [
|
|
2700
|
+
Le,
|
|
2701
|
+
xe,
|
|
2702
|
+
De
|
|
2703
|
+
]);
|
|
2704
|
+
e.object({
|
|
2705
|
+
comment: e.string(),
|
|
2706
|
+
starRating: e.number(),
|
|
2707
|
+
billId: e.string(),
|
|
2708
|
+
mediaItems: e.array(s).optional()
|
|
2709
|
+
});
|
|
2710
|
+
const b = e.object({
|
|
2711
|
+
_id: o,
|
|
2712
|
+
externalId: e.string().optional(),
|
|
2713
|
+
comment: e.string(),
|
|
2714
|
+
createTime: e.coerce.date(),
|
|
2715
|
+
// The marketing Location the review belongs to. For feedme reviews this is
|
|
2716
|
+
// the restaurantId (Location._id === restaurantId); for google/facebook it
|
|
2717
|
+
// is resolved from the review-source location/page mapping at sync time.
|
|
2718
|
+
locationId: o
|
|
2719
|
+
}), we = b.extend({
|
|
2720
|
+
source: e.literal("google"),
|
|
2721
|
+
reviewer: je.optional(),
|
|
2722
|
+
reply: d.optional(),
|
|
2723
|
+
mediaItems: e.array(s),
|
|
2724
|
+
starRating: e.number(),
|
|
2725
|
+
locationName: e.string(),
|
|
2726
|
+
locationDisplayName: e.string()
|
|
2727
|
+
}), Ae = b.extend({
|
|
2728
|
+
source: e.literal("facebook"),
|
|
2729
|
+
reviewer: Je.optional(),
|
|
2730
|
+
isPositive: e.boolean().optional(),
|
|
2731
|
+
pageId: e.string(),
|
|
2732
|
+
pageName: e.string()
|
|
2733
|
+
}), Ge = b.extend({
|
|
2734
|
+
source: e.literal("feedme"),
|
|
2735
|
+
reviewerId: o,
|
|
2736
|
+
reviewer: e.any().optional(),
|
|
2737
|
+
reply: d.optional(),
|
|
2738
|
+
starRating: e.number(),
|
|
2739
|
+
billId: e.string(),
|
|
2740
|
+
location: e.any().optional(),
|
|
2741
|
+
mediaItems: e.array(s)
|
|
2742
|
+
});
|
|
2743
|
+
e.discriminatedUnion("source", [
|
|
2744
|
+
we,
|
|
2745
|
+
Ae,
|
|
2746
|
+
Ge
|
|
2747
|
+
]).describe(m.describe(Ee));
|
|
2190
2748
|
export {
|
|
2191
|
-
|
|
2192
|
-
|
|
2749
|
+
Z as F,
|
|
2750
|
+
t as R,
|
|
2751
|
+
Ye as T,
|
|
2193
2752
|
k as a,
|
|
2194
|
-
|
|
2195
|
-
|
|
2753
|
+
He as b,
|
|
2754
|
+
j as c,
|
|
2755
|
+
y as d,
|
|
2756
|
+
X as e,
|
|
2757
|
+
q as f,
|
|
2758
|
+
u as i,
|
|
2759
|
+
Y as s
|
|
2196
2760
|
};
|