@feedmepos/mf-connect 0.1.98-beta.1 → 0.1.98-beta.11
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-EPNXLOQz.js → App-DKClefqk.js} +794 -654
- package/dist/{AuditLogs-CadZXkap.js → AuditLogs-BeSkYL6M.js} +9 -9
- package/dist/{Bin-CEWFX1MK.js → Bin-DqZYwOrb.js} +8 -8
- package/dist/{Broadcast-DC8W46mc.js → Broadcast-D8AD4KkO.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DsojUEnT.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-vqHrjU8C.js} +5 -5
- package/dist/{Card-BLFHOVL5.js → Card-DvhrSAk4.js} +18 -18
- package/dist/{Collections-CVQV9gAI.js → Collections-D2w-IYlv.js} +7 -7
- package/dist/{Credit-Bvd1uiUU.js → Credit-C6WDUg72.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DMHQ36PW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CQJ6pNxV.js} +30 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js → EffectSheet.vue_vue_type_style_index_0_lang-CgoTE9a7.js} +6 -6
- package/dist/{Experience-bKhm3DP2.js → Experience-CzB0noGs.js} +9 -9
- package/dist/{FileSaver.min-CgnAdnBE.js → FileSaver.min-ChS9YTfX.js} +1 -1
- package/dist/{Game-BTZ5Ftp5.js → Game-C4NPtOis.js} +10 -10
- package/dist/{Grab-DMuSoVGl.js → Grab-DRQkvRE-.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-hMmCNoZI.js → ImageInput.vue_vue_type_script_setup_true_lang-DD_fi0Z5.js} +1 -1
- package/dist/{Index-BNh-_EZa.js → Index-bOOUuYVP.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js → LocationPicker.vue_vue_type_script_setup_true_lang-uPK3w6VD.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D0wKkrBj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B9JJ2xSz.js} +1 -1
- package/dist/{LoyaltyDashboard-Do06Mjzo.js → LoyaltyDashboard-bD6MlAbo.js} +4 -4
- package/dist/{MainLayout-C_Zu8e2b.js → MainLayout-1DjfB3tH.js} +1 -1
- package/dist/{Marketing-DHTow_lX.js → Marketing-CEagZu_d.js} +4 -4
- package/dist/{MarketingMaterialEdit-BZqVEaXl.js → MarketingMaterialEdit-pNm733VI.js} +6 -6
- package/dist/{Member-DNQICbO9.js → Member-Du0xk_f0.js} +11 -11
- package/dist/{MemberList-B5f-zT_3.js → MemberList-2BImw45d.js} +25 -25
- package/dist/{MemberTransactions-BmmgHC1I.js → MemberTransactions-Ce9ccBGW.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhlFz8So.js → MessageInput.vue_vue_type_script_setup_true_lang-CY7V8qMz.js} +9 -9
- package/dist/{Mission-CyUldhj4.js → Mission-C0S2U1yY.js} +10 -10
- package/dist/{Overview-If_YcRY8.js → Overview-B0-bTPEk.js} +18 -18
- package/dist/{Point-DXgR4D2b.js → Point-Blc4sA0k.js} +9 -9
- package/dist/{Promotion-8KrS5PGT.js → Promotion-8nM93Gci.js} +10 -10
- package/dist/{Queue-ypegp0sQ.js → Queue-Def03xU8.js} +14 -14
- package/dist/{Record-C1eVdBIL.js → Record-Bop_7cP_.js} +9 -9
- package/dist/Review-CFdfmjkW.js +1186 -0
- package/dist/{ReviewFacebookCallback-zNKnoxr_.js → ReviewFacebookCallback-KUQE5QOQ.js} +4 -4
- package/dist/ReviewGoogleCallback-CZdfbE37.js +208 -0
- package/dist/{Reward-B_k-VLJn.js → Reward-DKkjbPWO.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BUl5B7lH.js → RewardGroup.vue_vue_type_script_setup_true_lang-BglByPmS.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D93zAujE.js → RuleGroup.vue_vue_type_script_setup_true_lang-DHLeyxp_.js} +13 -13
- package/dist/{Segment-PJLbJ6YE.js → Segment-DPBzExUz.js} +23 -23
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLwf6QCO.js → SelectItems.vue_vue_type_script_setup_true_lang-Di-Xv-Fk.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-VoddUHxA.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DsSarYWA.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DOXfYdxf.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-MjnVm1zx.js} +4 -4
- package/dist/{Setting-DItVUJHA.js → Setting-BH61xoUN.js} +14 -14
- package/dist/{SettingAdvertisements-Bfvr60OW.js → SettingAdvertisements-LfzmkWhb.js} +12 -12
- package/dist/{Store-hyTJyNWv.js → Store-DiNTwuRj.js} +21 -21
- package/dist/{StoreRewards-B7c20AF5.js → StoreRewards-3bylfB08.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bl438tVa.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DR2M_zjD.js} +21 -21
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DBb3Zfuz.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-gIqflCTb.js} +2 -2
- package/dist/{Tier-CuulnY8J.js → Tier-Dyy84802.js} +22 -22
- package/dist/{Title-Bf9ZiFGW.js → Title-DQdRI9k0.js} +19 -19
- package/dist/{Transaction-reVAaf86.js → Transaction-BxNk0O0-.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BqrFEBBM.js} +6 -6
- package/dist/{Voucher-E8R2cCl-.js → Voucher-D-qCe-wS.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B3sadrpZ.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js → ZodTextField.vue_vue_type_script_setup_true_lang--TG7NPaw.js} +2 -2
- package/dist/{app-BdRRCAGj.js → app-CYjBbA_4.js} +1310 -1053
- package/dist/app.js +1 -1
- package/dist/{business-caUtvXxX.js → business-B2SfzRDs.js} +1 -1
- package/dist/{campaign-CPtzFxiR.js → campaign-CpQjVRLb.js} +10 -10
- package/dist/{campaign-CDFEhdIH.js → campaign-DsZVOlpO.js} +1 -1
- package/dist/{campaign.enum-p1buII_I.js → campaign.enum-CUrE4_NH.js} +1 -1
- package/dist/campaign.fn-WPHSaV98.js +776 -0
- package/dist/{collectible.enum-CJ30_XmW.js → collectible.enum-BBE8WrYO.js} +1 -1
- package/dist/{duplicateCampaign-DLfhHm07.js → duplicateCampaign-BUGw2sf1.js} +2 -2
- package/dist/{effect-BJC34M9S.js → effect-D4ONfQoQ.js} +1 -1
- package/dist/{email-addresses-D1aYCi0p.js → email-addresses-BuZiD6UO.js} +2 -2
- package/dist/{export-ChFEuUc5.js → export-Css_Pqj-.js} +3 -3
- package/dist/{helper-BNWd3eM2.js → helper-CZfQKkv5.js} +1 -1
- package/dist/{index-6ZSFSZ-H.js → index-3T8aqJmS.js} +293 -234
- package/dist/{index-CAVSuo6k.js → index-87QXVsV-.js} +3 -3
- package/dist/{index-CIin0Pv0.js → index-B5FUen0h.js} +1 -1
- package/dist/{index-BWQK3rqq.js → index-BCzQpGUZ.js} +3 -3
- package/dist/{index-B4dazSVT.js → index-BJPEIJ9Q.js} +30 -17
- package/dist/{index-Dp3CLZSg.js → index-BfGNdgTX.js} +2 -2
- package/dist/{index-Do2cnzep.js → index-Bkc0ov6S.js} +1 -1
- package/dist/{index-BoeHTTcl.js → index-D-M_i6Mn.js} +1 -1
- package/dist/{index-0SZADZbB.js → index-DK2Ciib6.js} +2 -2
- package/dist/{index-B9xvXnEM.js → index-DjHvO9Tb.js} +3 -3
- package/dist/{index-Br17eSOV.js → index-DrJOutcM.js} +1 -1
- package/dist/{index-CeSEAz_T.js → index-DsJwHWYF.js} +1 -1
- package/dist/{index-DNsYSxpY.js → index-MJK4pjIp.js} +359 -353
- package/dist/{index-Dcn4qaYt.js → index-wl8_bJLh.js} +1 -1
- package/dist/{index.esm2017-CYGo-PcK.js → index.esm2017-CM-jNysx.js} +69 -69
- package/dist/{loading-DtPQnEA5.js → loading-CXYKpSBl.js} +1 -1
- package/dist/{lodash-BvTKz5Pn.js → lodash-DKWJqSEk.js} +1 -1
- package/dist/{membership-Csnvqeql.js → membership-BDi5RNlV.js} +3 -3
- package/dist/{money-CwRxILG1.js → money-CGM2GRnp.js} +1 -1
- package/dist/{number-qcECHCpu.js → number-DGznpJcf.js} +1 -1
- package/dist/objectid-dfqc-m2y.js +145 -0
- package/dist/{plugins-BBpKk0ld.js → plugins-BphKx8yz.js} +3 -3
- package/dist/{reward-CX1axU5-.js → reward-BxfsoKsP.js} +1 -1
- package/dist/{rule-pKsATz8r.js → rule-Bdwoo4oE.js} +3 -3
- package/dist/{template-BSuapoPb.js → template-BcbeqGkQ.js} +6 -6
- package/dist/{trigger-DnMktlx-.js → trigger-DhYSpO0F.js} +5 -5
- package/dist/{useMarketingMaterialActions-Bu0-ny3z.js → useMarketingMaterialActions-DpD2R5LH.js} +3 -3
- package/dist/{usePagination-CzfJhepV.js → usePagination-9T8RlODO.js} +1 -1
- package/dist/{user-BLDWqYm_.js → user-DUZG4AEt.js} +1 -1
- package/dist/{vue-i18n-bssxjuw_.js → vue-i18n-B36YK77u.js} +247 -247
- package/dist/{xlsx-xNwsJDub.js → xlsx-7bg82jL7.js} +584 -584
- package/dist/{zod-Cu18aMVT.js → zod-BoDvtk8b.js} +1 -1
- package/package.json +1 -1
- package/dist/Review-fsYAsdHU.js +0 -871
- package/dist/ReviewGoogleCallback-CpCT0ZYL.js +0 -213
- package/dist/campaign.fn-DerIK7yj.js +0 -776
- package/dist/objectid-BKWyHH4F.js +0 -145
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { z as e, F as
|
|
2
|
-
import { B as L, C as x, E as D, G as w, H as g
|
|
3
|
-
import { _ as
|
|
4
|
-
import { i as p } from "./helper-
|
|
5
|
-
import { a as
|
|
6
|
-
function
|
|
1
|
+
import { z as e, F as n, m, a as R } from "./index-BCzQpGUZ.js";
|
|
2
|
+
import { B as L, C as x, E as D, G as w, H as g } from "./index-MJK4pjIp.js";
|
|
3
|
+
import { _ as A, l as C, a as G } from "./index-87QXVsV-.js";
|
|
4
|
+
import { i as p } from "./helper-CZfQKkv5.js";
|
|
5
|
+
import { a as H } from "./index-DjHvO9Tb.js";
|
|
6
|
+
function f(o, a) {
|
|
7
7
|
let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
8
8
|
const l = r.length;
|
|
9
|
-
for (let c = 0; c <
|
|
9
|
+
for (let c = 0; c < o; c++)
|
|
10
10
|
i += r.charAt(Math.floor(Math.random() * l));
|
|
11
11
|
return i;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return !
|
|
13
|
+
function b(o) {
|
|
14
|
+
return !o.property && "rules" in o;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return "property" in
|
|
16
|
+
function M(o) {
|
|
17
|
+
return "property" in o && !!o.property;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
21
|
-
return
|
|
19
|
+
const F = "g_schedule";
|
|
20
|
+
function k(o) {
|
|
21
|
+
return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
22
22
|
`).trim();
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const i =
|
|
26
|
-
if (
|
|
24
|
+
function B(o, a = !1) {
|
|
25
|
+
const i = A.cloneDeep(o);
|
|
26
|
+
if (M(i)) {
|
|
27
27
|
const r = i.conditions;
|
|
28
|
-
return !a && r && typeof r._rrule == "string" && (r._rrule =
|
|
28
|
+
return !a && r && typeof r._rrule == "string" && (r._rrule = k(
|
|
29
29
|
r._rrule
|
|
30
30
|
)), i;
|
|
31
31
|
}
|
|
32
|
-
if (
|
|
32
|
+
if (b(i))
|
|
33
33
|
for (const r in i.rules) {
|
|
34
|
-
const l = i.rules[r], c = a ||
|
|
35
|
-
i.rules[r] =
|
|
34
|
+
const l = i.rules[r], c = a || b(l) && l.name === F;
|
|
35
|
+
i.rules[r] = B(
|
|
36
36
|
l,
|
|
37
37
|
c
|
|
38
38
|
);
|
|
@@ -42,14 +42,14 @@ function Y(n, a = !1) {
|
|
|
42
42
|
class t {
|
|
43
43
|
static scaffoldGroup(a) {
|
|
44
44
|
return {
|
|
45
|
-
name: a ?? `g_${
|
|
45
|
+
name: a ?? `g_${f(4)}`,
|
|
46
46
|
rules: {},
|
|
47
47
|
logic: ""
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
static scaffoldEntry(a) {
|
|
51
51
|
return {
|
|
52
|
-
name: `r_${
|
|
52
|
+
name: `r_${f(4)}`,
|
|
53
53
|
property: a ?? "",
|
|
54
54
|
conditions: {},
|
|
55
55
|
negated: !1
|
|
@@ -57,7 +57,7 @@ class t {
|
|
|
57
57
|
}
|
|
58
58
|
static constructEntry(a, i, r, l) {
|
|
59
59
|
return {
|
|
60
|
-
name: l ?? `e_${
|
|
60
|
+
name: l ?? `e_${f(4)}`,
|
|
61
61
|
property: a,
|
|
62
62
|
conditions: {
|
|
63
63
|
[i]: r
|
|
@@ -70,16 +70,16 @@ class t {
|
|
|
70
70
|
}
|
|
71
71
|
static constructLogic(a, i) {
|
|
72
72
|
const r = i ?? t.getLogic(a);
|
|
73
|
-
return Object.entries(a.rules).map(([l, c]) =>
|
|
73
|
+
return Object.entries(a.rules).map(([l, c]) => b(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
74
74
|
}
|
|
75
75
|
static setRuleToGroup(a, i, r) {
|
|
76
|
-
let l =
|
|
76
|
+
let l = C.cloneDeep(a);
|
|
77
77
|
return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
|
|
78
78
|
l.rules[c.name] = c;
|
|
79
79
|
}) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
|
|
80
80
|
}
|
|
81
81
|
static removeEntry(a, i, r) {
|
|
82
|
-
const l =
|
|
82
|
+
const l = C.cloneDeep(a);
|
|
83
83
|
return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
|
|
84
84
|
}
|
|
85
85
|
static constructRule(a) {
|
|
@@ -111,18 +111,18 @@ class t {
|
|
|
111
111
|
static isRuleExceed(a, i) {
|
|
112
112
|
const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
|
|
113
113
|
if (l > 10)
|
|
114
|
-
throw new
|
|
114
|
+
throw new V(10, l);
|
|
115
115
|
return !0;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
class
|
|
118
|
+
class V extends Error {
|
|
119
119
|
constructor(a, i) {
|
|
120
120
|
super(
|
|
121
121
|
`Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
|
|
122
122
|
), this.name = "MaxRulesExceededError";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
const
|
|
125
|
+
const Y = {
|
|
126
126
|
collectionName: "AuditLogs",
|
|
127
127
|
transform: {
|
|
128
128
|
_id: "oid",
|
|
@@ -135,7 +135,7 @@ const W = {
|
|
|
135
135
|
fromCollection: "Businesses"
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
},
|
|
138
|
+
}, K = e.enum([
|
|
139
139
|
"GET",
|
|
140
140
|
"POST",
|
|
141
141
|
"PUT",
|
|
@@ -144,7 +144,7 @@ const W = {
|
|
|
144
144
|
"OPTIONS",
|
|
145
145
|
"HEAD",
|
|
146
146
|
"ALL"
|
|
147
|
-
]),
|
|
147
|
+
]), W = e.enum([
|
|
148
148
|
"CAMPAIGN",
|
|
149
149
|
"LOCATION",
|
|
150
150
|
"MARKETING MATERIALS",
|
|
@@ -154,31 +154,31 @@ const W = {
|
|
|
154
154
|
"SETTINGS",
|
|
155
155
|
"SEGMENTATION",
|
|
156
156
|
"USER"
|
|
157
|
-
]),
|
|
158
|
-
httpMethod:
|
|
157
|
+
]), X = e.object({
|
|
158
|
+
httpMethod: K,
|
|
159
159
|
url: e.string().min(1),
|
|
160
160
|
userAgent: e.string(),
|
|
161
161
|
host: e.string().min(1),
|
|
162
162
|
params: e.object({}).passthrough().nullish(),
|
|
163
163
|
query: e.object({}).passthrough().nullish(),
|
|
164
164
|
body: e.object({}).passthrough().nullish()
|
|
165
|
-
}),
|
|
165
|
+
}), q = e.object({
|
|
166
166
|
statusCode: e.number().int().min(100).max(599),
|
|
167
167
|
body: e.object({}).passthrough().nullish()
|
|
168
168
|
});
|
|
169
169
|
e.object({
|
|
170
|
-
_id:
|
|
170
|
+
_id: n,
|
|
171
171
|
user: e.string().length(28),
|
|
172
172
|
userName: e.string().min(1),
|
|
173
|
-
userPhoneNumber: e.string().refine((
|
|
174
|
-
moduleType:
|
|
175
|
-
business:
|
|
173
|
+
userPhoneNumber: e.string().refine((o) => L(o)).nullish(),
|
|
174
|
+
moduleType: W,
|
|
175
|
+
business: n.nullish(),
|
|
176
176
|
clientIp: e.string().nullish(),
|
|
177
177
|
timestamp: e.string().datetime(),
|
|
178
|
-
request:
|
|
179
|
-
response:
|
|
180
|
-
}).describe(m.describe(
|
|
181
|
-
const
|
|
178
|
+
request: X,
|
|
179
|
+
response: q
|
|
180
|
+
}).describe(m.describe(Y));
|
|
181
|
+
const We = {
|
|
182
182
|
PROMOTION: {
|
|
183
183
|
name: "Promotion Template",
|
|
184
184
|
description: "Promotion template for campaign creation.",
|
|
@@ -2117,7 +2117,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2117
2117
|
({
|
|
2118
2118
|
...t.scaffoldGroup()
|
|
2119
2119
|
});
|
|
2120
|
-
const
|
|
2120
|
+
const Q = e.enum([
|
|
2121
2121
|
"MEMBER_REWARD",
|
|
2122
2122
|
"PAID_LOYALTY",
|
|
2123
2123
|
"COLLECT_FEEDBACK",
|
|
@@ -2127,7 +2127,7 @@ const Z = e.enum([
|
|
|
2127
2127
|
"BROADCAST",
|
|
2128
2128
|
"BIRTHDAY",
|
|
2129
2129
|
"GAME"
|
|
2130
|
-
]),
|
|
2130
|
+
]), $ = e.enum([
|
|
2131
2131
|
"text",
|
|
2132
2132
|
"number",
|
|
2133
2133
|
"textarea",
|
|
@@ -2157,114 +2157,114 @@ const Z = e.enum([
|
|
|
2157
2157
|
"grab_effect",
|
|
2158
2158
|
"grab_quota",
|
|
2159
2159
|
"grab_conditions"
|
|
2160
|
-
]),
|
|
2160
|
+
]), Z = e.object({
|
|
2161
2161
|
label: e.string().optional(),
|
|
2162
2162
|
label_locale: e.record(e.string()).nullish(),
|
|
2163
2163
|
property: e.string().or(e.any()),
|
|
2164
|
-
type:
|
|
2164
|
+
type: $,
|
|
2165
2165
|
extras: e.string().optional(),
|
|
2166
2166
|
isRuleChildren: e.boolean().optional()
|
|
2167
|
-
}),
|
|
2167
|
+
}), T = e.object({
|
|
2168
2168
|
not: e.boolean().optional(),
|
|
2169
2169
|
property: e.string(),
|
|
2170
2170
|
value: e.any()
|
|
2171
|
-
}),
|
|
2171
|
+
}), ee = e.object({
|
|
2172
2172
|
name: e.string().optional(),
|
|
2173
2173
|
name_locale: e.record(e.string()).nullish(),
|
|
2174
|
-
fields: e.array(
|
|
2175
|
-
condition:
|
|
2176
|
-
e.array(
|
|
2174
|
+
fields: e.array(Z),
|
|
2175
|
+
condition: T.optional().or(
|
|
2176
|
+
e.array(T)
|
|
2177
2177
|
)
|
|
2178
|
-
}),
|
|
2178
|
+
}), te = e.object({
|
|
2179
2179
|
name: e.string(),
|
|
2180
2180
|
name_locale: e.record(e.string()).nullish(),
|
|
2181
|
-
groups: e.array(
|
|
2181
|
+
groups: e.array(ee)
|
|
2182
2182
|
});
|
|
2183
2183
|
e.object({
|
|
2184
|
-
_id:
|
|
2184
|
+
_id: n,
|
|
2185
2185
|
name: e.string(),
|
|
2186
2186
|
name_locale: e.record(e.string()).nullish(),
|
|
2187
2187
|
description: e.string().nullish(),
|
|
2188
2188
|
description_locale: e.record(e.string()).nullish(),
|
|
2189
|
-
steps: e.array(
|
|
2190
|
-
intention: e.array(
|
|
2189
|
+
steps: e.array(te).min(1),
|
|
2190
|
+
intention: e.array(Q),
|
|
2191
2191
|
defaultValue: e.any()
|
|
2192
2192
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2193
|
-
const
|
|
2193
|
+
const ae = {
|
|
2194
2194
|
collectionName: "Businesses",
|
|
2195
2195
|
transform: {
|
|
2196
2196
|
_id: "oid"
|
|
2197
2197
|
}
|
|
2198
2198
|
};
|
|
2199
2199
|
e.object({
|
|
2200
|
-
_id:
|
|
2200
|
+
_id: n,
|
|
2201
2201
|
ownerId: e.string(),
|
|
2202
2202
|
name: e.string(),
|
|
2203
2203
|
credit: e.number(),
|
|
2204
2204
|
forceSend: e.boolean().optional()
|
|
2205
|
-
}).describe(m.describe(
|
|
2206
|
-
const
|
|
2205
|
+
}).describe(m.describe(ae));
|
|
2206
|
+
const S = e.enum(["PHONE"]), ne = e.enum([
|
|
2207
2207
|
"MOCEAN",
|
|
2208
2208
|
"SLACK",
|
|
2209
2209
|
"SMS",
|
|
2210
2210
|
"EMAIL",
|
|
2211
2211
|
"WHATSAPP"
|
|
2212
|
-
]),
|
|
2212
|
+
]), oe = e.enum(["PENDING", "COMPLETED", "FAILED"]), ie = e.enum([
|
|
2213
2213
|
"General",
|
|
2214
2214
|
"Otp",
|
|
2215
2215
|
"Marketing",
|
|
2216
2216
|
"Ordering",
|
|
2217
2217
|
"MemberInvitation",
|
|
2218
2218
|
"MarketingPromotion"
|
|
2219
|
-
]),
|
|
2220
|
-
type:
|
|
2221
|
-
}),
|
|
2222
|
-
type: e.literal(
|
|
2223
|
-
provider:
|
|
2224
|
-
usage:
|
|
2225
|
-
}),
|
|
2219
|
+
]), le = e.object({
|
|
2220
|
+
type: S
|
|
2221
|
+
}), N = le.extend({
|
|
2222
|
+
type: e.literal(S.enum.PHONE),
|
|
2223
|
+
provider: ne,
|
|
2224
|
+
usage: ie.optional()
|
|
2225
|
+
}), re = {
|
|
2226
2226
|
collectionName: "Notifications",
|
|
2227
2227
|
transform: { _id: "oid", business: "oid" }
|
|
2228
2228
|
};
|
|
2229
2229
|
e.object({
|
|
2230
|
-
_id:
|
|
2231
|
-
business:
|
|
2230
|
+
_id: n,
|
|
2231
|
+
business: n,
|
|
2232
2232
|
target: e.string(),
|
|
2233
2233
|
title: e.string().optional(),
|
|
2234
2234
|
message: e.string(),
|
|
2235
|
-
option:
|
|
2236
|
-
status:
|
|
2235
|
+
option: N,
|
|
2236
|
+
status: oe,
|
|
2237
2237
|
ref: e.string().optional()
|
|
2238
|
-
}).describe(m.describe(
|
|
2239
|
-
const
|
|
2238
|
+
}).describe(m.describe(re));
|
|
2239
|
+
const ce = e.object({
|
|
2240
2240
|
target: e.string(),
|
|
2241
2241
|
title: e.string().optional(),
|
|
2242
2242
|
message: e.string(),
|
|
2243
|
-
option:
|
|
2243
|
+
option: N,
|
|
2244
2244
|
ref: e.string().optional()
|
|
2245
2245
|
});
|
|
2246
2246
|
e.object({
|
|
2247
2247
|
campaignId: e.string(),
|
|
2248
|
-
notification:
|
|
2248
|
+
notification: ce,
|
|
2249
2249
|
business: e.string()
|
|
2250
2250
|
});
|
|
2251
2251
|
e.object({
|
|
2252
2252
|
phone: e.string(),
|
|
2253
2253
|
message: e.string()
|
|
2254
2254
|
});
|
|
2255
|
-
const
|
|
2255
|
+
const v = e.object({
|
|
2256
2256
|
name: e.string().optional(),
|
|
2257
2257
|
address: e.string()
|
|
2258
|
-
}),
|
|
2258
|
+
}), pe = e.object({
|
|
2259
2259
|
filename: e.string(),
|
|
2260
2260
|
content: e.instanceof(Uint8Array)
|
|
2261
2261
|
});
|
|
2262
2262
|
e.object({
|
|
2263
|
-
from:
|
|
2264
|
-
to: e.array(
|
|
2263
|
+
from: v.optional(),
|
|
2264
|
+
to: e.array(v),
|
|
2265
2265
|
subject: e.string(),
|
|
2266
2266
|
html: e.string().optional(),
|
|
2267
|
-
attachments: e.array(
|
|
2267
|
+
attachments: e.array(pe).optional()
|
|
2268
2268
|
});
|
|
2269
2269
|
e.object({
|
|
2270
2270
|
subject: e.string(),
|
|
@@ -2313,15 +2313,15 @@ e.object({
|
|
|
2313
2313
|
e.object({
|
|
2314
2314
|
orderId: e.string()
|
|
2315
2315
|
});
|
|
2316
|
-
var
|
|
2317
|
-
e.nativeEnum(
|
|
2316
|
+
var U = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(U || {});
|
|
2317
|
+
e.nativeEnum(U);
|
|
2318
2318
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2319
2319
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2320
2320
|
e.enum(["quota"]);
|
|
2321
|
-
var
|
|
2322
|
-
e.nativeEnum(
|
|
2321
|
+
var P = /* @__PURE__ */ ((o) => (o.marketing = "business::marketing", o.campaign = "business::campaign", o.counter = "business::counter", o.permission = "business::permission", o.role = "business::role", o))(P || {});
|
|
2322
|
+
e.nativeEnum(P);
|
|
2323
2323
|
e.enum(["restaurant"]);
|
|
2324
|
-
const
|
|
2324
|
+
const me = e.object({
|
|
2325
2325
|
label: e.string(),
|
|
2326
2326
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
2327
2327
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -2331,12 +2331,12 @@ const ge = e.object({
|
|
|
2331
2331
|
reason: e.string().optional()
|
|
2332
2332
|
});
|
|
2333
2333
|
e.object({
|
|
2334
|
-
_id:
|
|
2334
|
+
_id: n,
|
|
2335
2335
|
businessId: e.string(),
|
|
2336
2336
|
userId: e.string(),
|
|
2337
2337
|
email: e.string().nullish(),
|
|
2338
2338
|
phoneNo: e.string().nullish(),
|
|
2339
|
-
permissions: e.array(e.lazy(() =>
|
|
2339
|
+
permissions: e.array(e.lazy(() => me))
|
|
2340
2340
|
}).describe(
|
|
2341
2341
|
m.describe({
|
|
2342
2342
|
collectionName: "PermissionUsers",
|
|
@@ -2345,27 +2345,27 @@ e.object({
|
|
|
2345
2345
|
}
|
|
2346
2346
|
})
|
|
2347
2347
|
);
|
|
2348
|
-
const
|
|
2348
|
+
const j = e.object({
|
|
2349
2349
|
userId: e.string(),
|
|
2350
2350
|
level: e.number(),
|
|
2351
2351
|
role: e.string().optional(),
|
|
2352
2352
|
businessId: e.string().optional(),
|
|
2353
2353
|
restaurantId: e.string().optional()
|
|
2354
|
-
}),
|
|
2354
|
+
}), se = e.function().args(e.any(), j).returns(e.boolean()), ge = e.function().args(j).returns(e.promise(e.array(e.any())));
|
|
2355
2355
|
e.object({
|
|
2356
|
-
isAdmin:
|
|
2357
|
-
getRules:
|
|
2356
|
+
isAdmin: se,
|
|
2357
|
+
getRules: ge
|
|
2358
2358
|
});
|
|
2359
2359
|
e.object({
|
|
2360
2360
|
transactions: e.array(x),
|
|
2361
2361
|
collections: e.array(D)
|
|
2362
2362
|
});
|
|
2363
|
-
const
|
|
2363
|
+
const J = e.enum([
|
|
2364
2364
|
"ROCK_PAPER_SCISSOR"
|
|
2365
2365
|
]);
|
|
2366
|
-
|
|
2366
|
+
J.enum.ROCK_PAPER_SCISSOR + "";
|
|
2367
2367
|
e.object({
|
|
2368
|
-
type:
|
|
2368
|
+
type: J
|
|
2369
2369
|
});
|
|
2370
2370
|
e.object({
|
|
2371
2371
|
host: e.string().url(),
|
|
@@ -2374,7 +2374,7 @@ e.object({
|
|
|
2374
2374
|
roomId: e.string()
|
|
2375
2375
|
});
|
|
2376
2376
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
2377
|
-
const
|
|
2377
|
+
const de = {
|
|
2378
2378
|
collectionName: "MarketingMaterials",
|
|
2379
2379
|
transform: {
|
|
2380
2380
|
_id: "oid",
|
|
@@ -2382,13 +2382,13 @@ const ue = {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
};
|
|
2384
2384
|
e.object({
|
|
2385
|
-
_id:
|
|
2386
|
-
business:
|
|
2385
|
+
_id: n,
|
|
2386
|
+
business: n,
|
|
2387
2387
|
imageUrl: e.string().url(),
|
|
2388
2388
|
headline: e.string(),
|
|
2389
2389
|
caption: e.string(),
|
|
2390
2390
|
editedAt: e.coerce.date()
|
|
2391
|
-
}).describe(m.describe(
|
|
2391
|
+
}).describe(m.describe(de));
|
|
2392
2392
|
e.object({
|
|
2393
2393
|
id: e.number(),
|
|
2394
2394
|
name: e.string(),
|
|
@@ -2408,12 +2408,12 @@ e.object({
|
|
|
2408
2408
|
phone: e.string().optional(),
|
|
2409
2409
|
email: e.string().optional()
|
|
2410
2410
|
});
|
|
2411
|
-
const
|
|
2411
|
+
const ue = e.enum([
|
|
2412
2412
|
"PENDING",
|
|
2413
2413
|
"SUCCESS",
|
|
2414
2414
|
"FAILED",
|
|
2415
2415
|
"RETRYING"
|
|
2416
|
-
]),
|
|
2416
|
+
]), he = {
|
|
2417
2417
|
collectionName: "WebhookLogs",
|
|
2418
2418
|
transform: {
|
|
2419
2419
|
_id: "oid",
|
|
@@ -2421,39 +2421,39 @@ const _e = e.enum([
|
|
|
2421
2421
|
}
|
|
2422
2422
|
};
|
|
2423
2423
|
e.object({
|
|
2424
|
-
_id:
|
|
2425
|
-
business:
|
|
2424
|
+
_id: n,
|
|
2425
|
+
business: n,
|
|
2426
2426
|
type: e.string(),
|
|
2427
2427
|
payload: e.record(e.any()),
|
|
2428
|
-
status:
|
|
2428
|
+
status: ue,
|
|
2429
2429
|
response: e.any().optional(),
|
|
2430
2430
|
error: e.string().optional()
|
|
2431
|
-
}).describe(m.describe(
|
|
2432
|
-
const
|
|
2431
|
+
}).describe(m.describe(he));
|
|
2432
|
+
const _e = e.enum(["AUTO", "MANUAL"]);
|
|
2433
2433
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2434
|
-
const
|
|
2435
|
-
_id:
|
|
2434
|
+
const E = e.object({
|
|
2435
|
+
_id: n,
|
|
2436
2436
|
name: e.string().min(1, "Name is required").max(50),
|
|
2437
|
-
type:
|
|
2437
|
+
type: _e,
|
|
2438
2438
|
event: w.optional()
|
|
2439
|
-
}),
|
|
2439
|
+
}), ye = e.object({
|
|
2440
2440
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2441
2441
|
to: e.number().int("Must be integer").nullish()
|
|
2442
|
-
}).superRefine((
|
|
2443
|
-
|
|
2442
|
+
}).superRefine((o, a) => {
|
|
2443
|
+
o.from && o.to && o.from > o.to && a.addIssue({
|
|
2444
2444
|
code: "custom",
|
|
2445
2445
|
message: "Max referral count must be more than min referral count"
|
|
2446
2446
|
});
|
|
2447
|
-
}),
|
|
2448
|
-
threshold:
|
|
2449
|
-
rewards: e.array(
|
|
2450
|
-
pf_reward: e.array(
|
|
2451
|
-
}),
|
|
2447
|
+
}), fe = e.object({
|
|
2448
|
+
threshold: ye,
|
|
2449
|
+
rewards: e.array(n),
|
|
2450
|
+
pf_reward: e.array(H).optional()
|
|
2451
|
+
}), z = e.object({
|
|
2452
2452
|
id: e.string(),
|
|
2453
2453
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2454
|
-
rule:
|
|
2455
|
-
rewards: e.array(
|
|
2456
|
-
}),
|
|
2454
|
+
rule: G.optional(),
|
|
2455
|
+
rewards: e.array(fe)
|
|
2456
|
+
}), be = {
|
|
2457
2457
|
collectionName: "ReferralRecords",
|
|
2458
2458
|
transform: {
|
|
2459
2459
|
_id: "oid",
|
|
@@ -2462,25 +2462,25 @@ const j = e.object({
|
|
|
2462
2462
|
referee: "oid",
|
|
2463
2463
|
refereeReward: "oid"
|
|
2464
2464
|
}
|
|
2465
|
-
},
|
|
2465
|
+
}, He = e.object({
|
|
2466
2466
|
completedAt: e.coerce.date(),
|
|
2467
|
-
criteria:
|
|
2467
|
+
criteria: n,
|
|
2468
2468
|
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(
|
|
2469
|
+
}), ze = e.object({
|
|
2470
|
+
_id: n,
|
|
2471
|
+
business: n,
|
|
2472
|
+
referer: n,
|
|
2473
|
+
referee: n,
|
|
2474
|
+
criteria: e.array(E),
|
|
2475
|
+
reward: e.array(z),
|
|
2476
|
+
refereeReward: e.array(n).optional(),
|
|
2477
|
+
criteria_progress: e.array(He),
|
|
2478
2478
|
status: e.string(),
|
|
2479
2479
|
pf_referer: g.optional(),
|
|
2480
2480
|
pf_referee: g.optional(),
|
|
2481
|
-
pf_refereeReward: e.array(
|
|
2482
|
-
}).describe(m.describe(
|
|
2483
|
-
|
|
2481
|
+
pf_refereeReward: e.array(H).optional()
|
|
2482
|
+
}).describe(m.describe(be));
|
|
2483
|
+
ze.pick({
|
|
2484
2484
|
_id: !0,
|
|
2485
2485
|
business: !0,
|
|
2486
2486
|
referer: !0,
|
|
@@ -2495,33 +2495,33 @@ Te.pick({
|
|
|
2495
2495
|
photoUrl: !0
|
|
2496
2496
|
})
|
|
2497
2497
|
});
|
|
2498
|
-
const
|
|
2498
|
+
const Ce = {
|
|
2499
2499
|
collectionName: "ReferralProgram",
|
|
2500
2500
|
transform: {
|
|
2501
2501
|
_id: "oid",
|
|
2502
2502
|
business: "oid"
|
|
2503
2503
|
}
|
|
2504
|
-
},
|
|
2505
|
-
_id:
|
|
2506
|
-
business:
|
|
2504
|
+
}, O = e.object({
|
|
2505
|
+
_id: n,
|
|
2506
|
+
business: n,
|
|
2507
2507
|
term_and_condition: e.string().optional(),
|
|
2508
|
-
refereeReward: e.array(
|
|
2509
|
-
reward: e.array(
|
|
2510
|
-
criteria: e.array(
|
|
2511
|
-
}).describe(m.describe(
|
|
2508
|
+
refereeReward: e.array(n).optional(),
|
|
2509
|
+
reward: e.array(z),
|
|
2510
|
+
criteria: e.array(E)
|
|
2511
|
+
}).describe(m.describe(Ce));
|
|
2512
2512
|
e.object({
|
|
2513
|
-
referer:
|
|
2514
|
-
referee:
|
|
2515
|
-
business:
|
|
2513
|
+
referer: n,
|
|
2514
|
+
referee: n,
|
|
2515
|
+
business: n
|
|
2516
2516
|
});
|
|
2517
2517
|
e.object({
|
|
2518
|
-
program:
|
|
2518
|
+
program: O.pick({
|
|
2519
2519
|
_id: !0,
|
|
2520
2520
|
business: !0,
|
|
2521
2521
|
term_and_condition: !0
|
|
2522
2522
|
}).extend({
|
|
2523
|
-
reward:
|
|
2524
|
-
pf_refereeReward: e.array(
|
|
2523
|
+
reward: z.optional(),
|
|
2524
|
+
pf_refereeReward: e.array(H).optional()
|
|
2525
2525
|
}),
|
|
2526
2526
|
referralCount: e.number(),
|
|
2527
2527
|
successReferralCount: e.number(),
|
|
@@ -2532,31 +2532,33 @@ e.object({
|
|
|
2532
2532
|
photoUrl: !0
|
|
2533
2533
|
}).optional()
|
|
2534
2534
|
});
|
|
2535
|
-
|
|
2535
|
+
O.extend({
|
|
2536
2536
|
updateReferralRecord: e.boolean().optional()
|
|
2537
2537
|
});
|
|
2538
|
-
const
|
|
2538
|
+
const Te = e.object({
|
|
2539
2539
|
facebookPageId: e.string(),
|
|
2540
2540
|
pageName: e.string(),
|
|
2541
2541
|
pageProfileImageUrl: e.string(),
|
|
2542
2542
|
pageAccessToken: e.string().optional(),
|
|
2543
|
-
locationIds: e.array(
|
|
2544
|
-
}),
|
|
2545
|
-
locationId:
|
|
2543
|
+
locationIds: e.array(n)
|
|
2544
|
+
}), ve = e.object({
|
|
2545
|
+
locationId: n.nullable(),
|
|
2546
2546
|
googleLocationName: e.string(),
|
|
2547
2547
|
displayName: e.string().optional()
|
|
2548
|
-
}),
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2548
|
+
}), Se = e.object({
|
|
2549
|
+
accessToken: e.string().nullable(),
|
|
2550
|
+
refreshToken: e.string().nullable(),
|
|
2551
|
+
accessTokenExpiresAt: e.date().nullable(),
|
|
2552
|
+
locations: e.array(ve)
|
|
2553
|
+
}), Ne = e.object({
|
|
2552
2554
|
token: e.string().nullable(),
|
|
2553
|
-
pages: e.array(
|
|
2555
|
+
pages: e.array(Te)
|
|
2554
2556
|
});
|
|
2555
2557
|
e.object({
|
|
2556
|
-
_id:
|
|
2557
|
-
businessId:
|
|
2558
|
-
google:
|
|
2559
|
-
facebook:
|
|
2558
|
+
_id: n,
|
|
2559
|
+
businessId: n,
|
|
2560
|
+
google: Se.nullable(),
|
|
2561
|
+
facebook: Ne.nullable()
|
|
2560
2562
|
}).describe(
|
|
2561
2563
|
m.describe({
|
|
2562
2564
|
collectionName: "ReviewSourceConfig",
|
|
@@ -2567,7 +2569,9 @@ e.object({
|
|
|
2567
2569
|
})
|
|
2568
2570
|
);
|
|
2569
2571
|
e.object({
|
|
2570
|
-
|
|
2572
|
+
code: e.string(),
|
|
2573
|
+
redirectUri: e.string(),
|
|
2574
|
+
state: e.string()
|
|
2571
2575
|
});
|
|
2572
2576
|
e.object({
|
|
2573
2577
|
locations: e.array(
|
|
@@ -2592,7 +2596,8 @@ e.object({
|
|
|
2592
2596
|
e.object({
|
|
2593
2597
|
_id: e.string(),
|
|
2594
2598
|
google: e.object({
|
|
2595
|
-
|
|
2599
|
+
accessToken: e.string().nullable(),
|
|
2600
|
+
accessTokenExpiresAt: e.string().datetime().nullable(),
|
|
2596
2601
|
locations: e.array(
|
|
2597
2602
|
e.object({
|
|
2598
2603
|
googleLocationName: e.string(),
|
|
@@ -2613,148 +2618,202 @@ e.object({
|
|
|
2613
2618
|
)
|
|
2614
2619
|
}).nullable()
|
|
2615
2620
|
});
|
|
2616
|
-
const
|
|
2621
|
+
const d = e.object({
|
|
2617
2622
|
name: e.string(),
|
|
2618
|
-
pictureUrl: e.string()
|
|
2619
|
-
|
|
2623
|
+
pictureUrl: e.string(),
|
|
2624
|
+
phoneNumber: e.string().optional()
|
|
2625
|
+
}), Ue = d.extend({
|
|
2620
2626
|
isAnonymous: e.boolean().optional()
|
|
2621
|
-
}),
|
|
2627
|
+
}), Pe = d.extend({
|
|
2622
2628
|
id: e.string().optional()
|
|
2623
|
-
}),
|
|
2629
|
+
}), u = e.object({
|
|
2624
2630
|
comment: e.string(),
|
|
2625
2631
|
updateTime: e.coerce.date()
|
|
2626
2632
|
}), s = e.object({
|
|
2633
|
+
externalId: e.string().optional(),
|
|
2627
2634
|
thumbnailUrl: e.string(),
|
|
2628
2635
|
thumbnailLabel: e.string(),
|
|
2629
2636
|
videoUrl: e.string().optional()
|
|
2630
|
-
}),
|
|
2637
|
+
}), je = {
|
|
2631
2638
|
collectionName: "Reviews",
|
|
2632
2639
|
transform: {
|
|
2633
2640
|
_id: "oid",
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
reviewerId: {
|
|
2638
|
-
as: "reviewer",
|
|
2639
|
-
fromCollection: "UsersV2"
|
|
2640
|
-
},
|
|
2641
|
-
locationId: {
|
|
2642
|
-
as: "location",
|
|
2643
|
-
fromCollection: "Locations"
|
|
2644
|
-
}
|
|
2641
|
+
businessId: "oid",
|
|
2642
|
+
reviewerId: "oid",
|
|
2643
|
+
restaurantId: "oid"
|
|
2645
2644
|
}
|
|
2646
|
-
},
|
|
2647
|
-
|
|
2645
|
+
}, I = e.enum([
|
|
2646
|
+
"google",
|
|
2647
|
+
"facebook",
|
|
2648
|
+
"feedme",
|
|
2649
|
+
"feedvibe"
|
|
2650
|
+
]);
|
|
2651
|
+
I.options;
|
|
2648
2652
|
e.enum(["google", "facebook"]);
|
|
2649
|
-
const
|
|
2653
|
+
const Je = e.enum([
|
|
2650
2654
|
"createTime_desc",
|
|
2651
2655
|
"createTime_asc",
|
|
2652
2656
|
"rating_asc",
|
|
2653
2657
|
"rating_desc"
|
|
2654
2658
|
]);
|
|
2655
2659
|
e.object({
|
|
2656
|
-
source:
|
|
2657
|
-
dateFrom: e.
|
|
2658
|
-
dateTo: e.
|
|
2660
|
+
source: I.array().optional(),
|
|
2661
|
+
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
2662
|
+
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
2659
2663
|
locationId: e.string().optional(),
|
|
2660
|
-
|
|
2664
|
+
excludeDeleted: e.boolean().optional(),
|
|
2665
|
+
sort: Je.optional(),
|
|
2661
2666
|
limit: e.coerce.number().int().positive().optional(),
|
|
2662
2667
|
skip: e.coerce.number().int().min(0).optional()
|
|
2663
2668
|
});
|
|
2664
|
-
const
|
|
2669
|
+
const Xe = e.object({
|
|
2670
|
+
averageScore: e.number(),
|
|
2671
|
+
total: e.number().int().nonnegative(),
|
|
2672
|
+
starCounts: e.array(
|
|
2673
|
+
e.object({
|
|
2674
|
+
star: e.number().int().min(1).max(5),
|
|
2675
|
+
count: e.number().int().nonnegative()
|
|
2676
|
+
})
|
|
2677
|
+
)
|
|
2678
|
+
}), h = e.object({
|
|
2665
2679
|
name: e.string(),
|
|
2666
|
-
pictureUrl: e.string()
|
|
2667
|
-
|
|
2680
|
+
pictureUrl: e.string().optional(),
|
|
2681
|
+
phoneNumber: e.string().optional()
|
|
2682
|
+
}), Ee = h.extend({
|
|
2683
|
+
_id: e.string().optional()
|
|
2684
|
+
}), Oe = h.extend({
|
|
2685
|
+
_id: e.string()
|
|
2686
|
+
}), Ie = h.extend({
|
|
2668
2687
|
isAnonymous: e.boolean().optional()
|
|
2669
|
-
}), Re =
|
|
2688
|
+
}), Re = h.extend({
|
|
2670
2689
|
id: e.string().optional()
|
|
2671
|
-
}),
|
|
2672
|
-
_id:
|
|
2690
|
+
}), _ = e.object({
|
|
2691
|
+
_id: n,
|
|
2673
2692
|
comment: e.string(),
|
|
2674
2693
|
createTime: e.coerce.date(),
|
|
2675
|
-
|
|
2676
|
-
|
|
2694
|
+
updateTime: e.coerce.date().nullish(),
|
|
2695
|
+
restaurantId: n,
|
|
2696
|
+
restaurantName: e.string()
|
|
2697
|
+
}), Le = _.extend({
|
|
2677
2698
|
source: e.literal("google"),
|
|
2699
|
+
externalId: e.string().min(1),
|
|
2700
|
+
translatedComment: e.string().optional(),
|
|
2678
2701
|
reviewer: Ie.optional(),
|
|
2679
|
-
reply:
|
|
2702
|
+
reply: u.optional(),
|
|
2680
2703
|
mediaItems: e.array(s),
|
|
2681
2704
|
starRating: e.number(),
|
|
2682
2705
|
locationName: e.string(),
|
|
2683
2706
|
locationDisplayName: e.string()
|
|
2684
|
-
}), xe =
|
|
2707
|
+
}), xe = _.extend({
|
|
2685
2708
|
source: e.literal("facebook"),
|
|
2709
|
+
externalId: e.string().min(1),
|
|
2686
2710
|
reviewer: Re.optional(),
|
|
2687
2711
|
isPositive: e.boolean().optional(),
|
|
2688
2712
|
pageId: e.string(),
|
|
2689
2713
|
pageName: e.string()
|
|
2690
|
-
}), De =
|
|
2714
|
+
}), De = _.extend({
|
|
2691
2715
|
source: e.literal("feedme"),
|
|
2692
|
-
reviewer:
|
|
2693
|
-
reply:
|
|
2716
|
+
reviewer: Ee.optional(),
|
|
2717
|
+
reply: u.optional(),
|
|
2694
2718
|
starRating: e.number(),
|
|
2695
|
-
location: G.optional(),
|
|
2696
2719
|
mediaItems: e.array(s),
|
|
2697
2720
|
billId: e.string()
|
|
2721
|
+
}), we = _.extend({
|
|
2722
|
+
source: e.literal("feedvibe"),
|
|
2723
|
+
externalId: e.string().min(1),
|
|
2724
|
+
reviewer: Oe.optional(),
|
|
2725
|
+
rating: e.object({
|
|
2726
|
+
overall: e.number(),
|
|
2727
|
+
food: e.number(),
|
|
2728
|
+
service: e.number(),
|
|
2729
|
+
atmosphere: e.number()
|
|
2730
|
+
}),
|
|
2731
|
+
verified: e.boolean(),
|
|
2732
|
+
mediaItems: e.array(s).default([])
|
|
2698
2733
|
});
|
|
2699
2734
|
e.discriminatedUnion("source", [
|
|
2700
2735
|
Le,
|
|
2701
2736
|
xe,
|
|
2702
|
-
De
|
|
2737
|
+
De,
|
|
2738
|
+
we
|
|
2703
2739
|
]);
|
|
2704
2740
|
e.object({
|
|
2705
2741
|
comment: e.string(),
|
|
2706
2742
|
starRating: e.number(),
|
|
2707
2743
|
billId: e.string(),
|
|
2744
|
+
isAnonymous: e.boolean(),
|
|
2708
2745
|
mediaItems: e.array(s).optional()
|
|
2709
2746
|
});
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2747
|
+
e.object({
|
|
2748
|
+
name: e.string().trim().min(1),
|
|
2749
|
+
phoneNumber: e.string().trim().min(1).optional()
|
|
2750
|
+
});
|
|
2751
|
+
const y = e.object({
|
|
2752
|
+
_id: n,
|
|
2753
|
+
businessId: n,
|
|
2713
2754
|
comment: e.string(),
|
|
2714
2755
|
createTime: e.coerce.date(),
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
}),
|
|
2756
|
+
updateTime: e.coerce.date().nullish(),
|
|
2757
|
+
restaurantId: n,
|
|
2758
|
+
restaurantName: e.string(),
|
|
2759
|
+
deletedAt: e.coerce.date().optional()
|
|
2760
|
+
}), Ae = y.extend({
|
|
2720
2761
|
source: e.literal("google"),
|
|
2721
|
-
|
|
2722
|
-
|
|
2762
|
+
externalId: e.string().min(1),
|
|
2763
|
+
translatedComment: e.string().optional(),
|
|
2764
|
+
reviewer: Ue.optional(),
|
|
2765
|
+
reply: u.optional(),
|
|
2723
2766
|
mediaItems: e.array(s),
|
|
2724
2767
|
starRating: e.number(),
|
|
2725
2768
|
locationName: e.string(),
|
|
2726
2769
|
locationDisplayName: e.string()
|
|
2727
|
-
}),
|
|
2770
|
+
}), Ge = y.extend({
|
|
2728
2771
|
source: e.literal("facebook"),
|
|
2729
|
-
|
|
2772
|
+
externalId: e.string().min(1),
|
|
2773
|
+
reviewer: Pe.optional(),
|
|
2730
2774
|
isPositive: e.boolean().optional(),
|
|
2731
2775
|
pageId: e.string(),
|
|
2732
2776
|
pageName: e.string()
|
|
2733
|
-
}),
|
|
2777
|
+
}), Me = y.extend({
|
|
2734
2778
|
source: e.literal("feedme"),
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2779
|
+
isAnonymous: e.boolean(),
|
|
2780
|
+
reviewerId: n.optional(),
|
|
2781
|
+
reviewer: d.optional(),
|
|
2782
|
+
reply: u.optional(),
|
|
2738
2783
|
starRating: e.number(),
|
|
2739
2784
|
billId: e.string(),
|
|
2740
|
-
location: e.any().optional(),
|
|
2741
2785
|
mediaItems: e.array(s)
|
|
2786
|
+
}), Fe = y.extend({
|
|
2787
|
+
source: e.literal("feedvibe"),
|
|
2788
|
+
externalId: e.string().min(1),
|
|
2789
|
+
reviewerId: n,
|
|
2790
|
+
reviewer: d,
|
|
2791
|
+
rating: e.object({
|
|
2792
|
+
overall: e.number(),
|
|
2793
|
+
food: e.number(),
|
|
2794
|
+
service: e.number(),
|
|
2795
|
+
atmosphere: e.number()
|
|
2796
|
+
}),
|
|
2797
|
+
verified: e.boolean(),
|
|
2798
|
+
mediaItems: e.array(s).default([])
|
|
2742
2799
|
});
|
|
2743
2800
|
e.discriminatedUnion("source", [
|
|
2744
|
-
we,
|
|
2745
2801
|
Ae,
|
|
2746
|
-
Ge
|
|
2747
|
-
|
|
2802
|
+
Ge,
|
|
2803
|
+
Me,
|
|
2804
|
+
Fe
|
|
2805
|
+
]).describe(m.describe(je));
|
|
2748
2806
|
export {
|
|
2749
|
-
|
|
2807
|
+
Q as F,
|
|
2750
2808
|
t as R,
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2809
|
+
We as T,
|
|
2810
|
+
M as a,
|
|
2811
|
+
fe as b,
|
|
2812
|
+
E as c,
|
|
2813
|
+
z as d,
|
|
2814
|
+
K as e,
|
|
2815
|
+
W as f,
|
|
2816
|
+
Xe as g,
|
|
2817
|
+
b as i,
|
|
2818
|
+
B as s
|
|
2760
2819
|
};
|