@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-beta.9
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-DsB2o1oB.js → App-CwMrP0Q-.js} +7 -7
- package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-CAtlilma.js} +9 -9
- package/dist/{Bin-DMr7K8Kj.js → Bin-sSw4Gatd.js} +8 -8
- package/dist/{Broadcast-C9akM-TB.js → Broadcast-DH2Fpb-O.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cd47Mrej.js} +5 -5
- package/dist/{Card-DRkIYs0M.js → Card-D4YJZ_I8.js} +18 -18
- package/dist/{Collections-B0uGC2FE.js → Collections--8QcjuAp.js} +7 -7
- package/dist/{Credit-V5YA_hGx.js → Credit-DgF3qd52.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bpr9KuHW.js} +30 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-BgHApZqm.js} +6 -6
- package/dist/{Experience-WTWy5yY6.js → Experience-DxtkVeS9.js} +9 -9
- package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-BtPuPAIo.js} +1 -1
- package/dist/{Game-BwOfTCW5.js → Game-CbcrkUBh.js} +10 -10
- package/dist/{Grab-DmmwrGzk.js → Grab-CDhmMNsL.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-CqoO7N7r.js} +1 -1
- package/dist/{Index-m7l4insz.js → Index-BzPX7mr1.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-mI-5po-a.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DyP3ipwX.js} +1 -1
- package/dist/{LoyaltyDashboard-CJdhYiea.js → LoyaltyDashboard-BFjI3IWT.js} +4 -4
- package/dist/{MainLayout-Du5kZOtA.js → MainLayout-gxkaZeZ-.js} +1 -1
- package/dist/{Marketing-C9pSIdBU.js → Marketing-BlMjT0cP.js} +4 -4
- package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-v0vGn3Lz.js} +6 -6
- package/dist/{Member-DUV_vbPI.js → Member-BBUlAPqZ.js} +11 -11
- package/dist/{MemberList-Ye4nOk-i.js → MemberList-DZJhULFD.js} +25 -25
- package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-CTBoDEg4.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-nlYOP9gZ.js} +9 -9
- package/dist/{Mission-BBmCGpt8.js → Mission-D_xjOnWO.js} +10 -10
- package/dist/{Overview-DOJj4XvO.js → Overview-C5-uSEJH.js} +18 -18
- package/dist/{Point-Bzg6hi6o.js → Point-BmVyG_i-.js} +9 -9
- package/dist/{Promotion-BMXIp_ef.js → Promotion-BWmTkHyw.js} +10 -10
- package/dist/{Queue-55G2gtP5.js → Queue-Do2XlY5H.js} +10 -10
- package/dist/{Record-DNPI02c6.js → Record-BIzUOikr.js} +9 -9
- package/dist/{Review-CYNPPxYU.js → Review-D9cFDrhN.js} +585 -534
- package/dist/{ReviewFacebookCallback-0SUkKAaC.js → ReviewFacebookCallback-DbE8_6D3.js} +4 -4
- package/dist/{ReviewGoogleCallback-BZEzx68n.js → ReviewGoogleCallback-LMZgyopt.js} +4 -4
- package/dist/{Reward-CnP8R2pS.js → Reward-gCpIJIq9.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-Dkyz-W9m.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BEqgU70M.js} +13 -13
- package/dist/{Segment-CxiQnnyj.js → Segment-CZrzY2st.js} +23 -23
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js → SelectItems.vue_vue_type_script_setup_true_lang-B1qAMtkn.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dc36wzB0.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BtnF-BPt.js} +4 -4
- package/dist/{Setting-jHAjccod.js → Setting-JrI4ttI1.js} +14 -14
- package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-iOOpEUlI.js} +12 -12
- package/dist/{Store-Cu-hKmVa.js → Store-DbXKThJn.js} +21 -21
- package/dist/{StoreRewards-DILeipMG.js → StoreRewards-CfkwVw7d.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CNC_jNgW.js} +21 -21
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BBlCR4pN.js} +2 -2
- package/dist/{Tier-BAZ1xuKL.js → Tier-BVrAqpWt.js} +22 -22
- package/dist/{Title-CcNAt47f.js → Title-DhumBh-S.js} +19 -19
- package/dist/{Transaction-D7DO3dKQ.js → Transaction-BQLge28p.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CSPaj2uN.js} +6 -6
- package/dist/{Voucher-Cq-n1CaC.js → Voucher-DeB4YhvL.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BjUFEIlS.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-BzrPUcC9.js} +2 -2
- package/dist/{app-Z-UKRG5V.js → app-BHIG18wW.js} +1060 -1045
- package/dist/app.js +1 -1
- package/dist/{business-C7EF6cKC.js → business-CCmy2VBj.js} +1 -1
- package/dist/{campaign-DHBuP4UA.js → campaign-DiFdvcPE.js} +10 -10
- package/dist/{campaign--MjoY1Mn.js → campaign-jofcGLi8.js} +1 -1
- package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-CBp5IeWz.js} +1 -1
- package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-BZ0Ivuwi.js} +93 -93
- package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-frp5wluZ.js} +1 -1
- package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-CxuNftok.js} +2 -2
- package/dist/{effect-BcB8IlTI.js → effect-BegkMXTr.js} +1 -1
- package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-B0t3BKV6.js} +2 -2
- package/dist/{export-CjB7qxZ9.js → export-CGrchnsA.js} +3 -3
- package/dist/{helper-BSgrCJRv.js → helper-CIYSBZvt.js} +1 -1
- package/dist/{index-BIAjmMga.js → index-BBgVfqVf.js} +1 -1
- package/dist/{index-hbyCVNa7.js → index-BPh_k5rA.js} +3 -3
- package/dist/{index-CsoBDon4.js → index-C-2YkeBp.js} +3 -3
- package/dist/{index-hlyg-wxV.js → index-CF1RNy12.js} +1 -1
- package/dist/{index-VlFWaBrg.js → index-C_6y8OES.js} +1 -1
- package/dist/{index-BpI-BI4H.js → index-CixwNfnv.js} +1 -1
- package/dist/{index-BoYEqLif.js → index-Cv0pq7A_.js} +179 -190
- package/dist/{index-iMPtFp54.js → index-D4_JDL9j.js} +3 -3
- package/dist/{index-Bm0QPucw.js → index-Dc-I4Jr-.js} +1 -1
- package/dist/{index-CoHWpylO.js → index-DcE-11T-.js} +17 -17
- package/dist/{index-Bv4MBLQ5.js → index-DdAl4SK2.js} +1 -1
- package/dist/{index-Bf6jNZit.js → index-Dg_OJTxE.js} +1 -1
- package/dist/{index-CIBPhxlC.js → index-DzQCyuGA.js} +2 -2
- package/dist/{index-HXiYGO4_.js → index-PmoP3mXP.js} +2 -2
- package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-QGfAIiCc.js} +105 -105
- package/dist/{loading-CSXr0Yqz.js → loading-Cql_LElt.js} +1 -1
- package/dist/{lodash-Bh7XKI-R.js → lodash-PMdIVUsY.js} +1 -1
- package/dist/{membership-CfredTm3.js → membership-BHD1GQ45.js} +3 -3
- package/dist/{money-BZIST_m9.js → money-CASVly6f.js} +1 -1
- package/dist/{number-DXLR2w95.js → number-dMI2x0jy.js} +1 -1
- package/dist/objectid-Db_4Ays3.js +145 -0
- package/dist/{plugins-4FlbwoES.js → plugins-CnEVta3V.js} +3 -3
- package/dist/{reward-DUbl79bZ.js → reward-vdrNMYrF.js} +1 -1
- package/dist/{rule-BQUoZ4l_.js → rule-BLXUDFEw.js} +3 -3
- package/dist/{template-BoiSG7G7.js → template-CRjkIq3e.js} +6 -6
- package/dist/{trigger-D5g5m6tT.js → trigger-Ccrh378a.js} +5 -5
- package/dist/{useMarketingMaterialActions-B-Jlw2Z9.js → useMarketingMaterialActions-BQLBRa3G.js} +3 -3
- package/dist/{usePagination-DHePBBoR.js → usePagination-BjsffqjT.js} +1 -1
- package/dist/{user-C_ToSo-g.js → user-B5jS1GLb.js} +1 -1
- package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-CCjHlB6z.js} +252 -252
- package/dist/{xlsx-h4G1C-xj.js → xlsx-DmBOvA2N.js} +1 -1
- package/dist/{zod-CgigfJar.js → zod-DrYZ6KS4.js} +1 -1
- package/package.json +1 -1
- package/dist/objectid-Dg4ZodlT.js +0 -145
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { z as e, F as n, m, a as L } from "./index-
|
|
2
|
-
import { B as x, C as D, E as w, G as A, H as g, I as
|
|
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 L } from "./index-BPh_k5rA.js";
|
|
2
|
+
import { B as x, C as D, E as w, G as A, H as g, I as v } from "./index-DcE-11T-.js";
|
|
3
|
+
import { _ as G, l as z, a as M } from "./index-C-2YkeBp.js";
|
|
4
|
+
import { i as p } from "./helper-CIYSBZvt.js";
|
|
5
|
+
import { a as b } from "./index-D4_JDL9j.js";
|
|
6
|
+
function y(o, a) {
|
|
7
7
|
let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
8
8
|
const l = r.length;
|
|
9
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
|
|
13
|
+
function f(o) {
|
|
14
14
|
return !o.property && "rules" in o;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function F(o) {
|
|
17
17
|
return "property" in o && !!o.property;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
19
|
+
const k = "g_schedule";
|
|
20
|
+
function B(o) {
|
|
21
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 V(o, a = !1) {
|
|
25
|
+
const i = G.cloneDeep(o);
|
|
26
|
+
if (F(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 = B(
|
|
29
29
|
r._rrule
|
|
30
30
|
)), i;
|
|
31
31
|
}
|
|
32
|
-
if (
|
|
32
|
+
if (f(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 || f(l) && l.name === k;
|
|
35
|
+
i.rules[r] = V(
|
|
36
36
|
l,
|
|
37
37
|
c
|
|
38
38
|
);
|
|
@@ -42,14 +42,14 @@ function Y(o, a = !1) {
|
|
|
42
42
|
class t {
|
|
43
43
|
static scaffoldGroup(a) {
|
|
44
44
|
return {
|
|
45
|
-
name: a ?? `g_${
|
|
45
|
+
name: a ?? `g_${y(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_${y(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_${y(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]) => f(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
74
74
|
}
|
|
75
75
|
static setRuleToGroup(a, i, r) {
|
|
76
|
-
let l =
|
|
76
|
+
let l = z.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 = z.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 Y(10, l);
|
|
115
115
|
return !0;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
class
|
|
118
|
+
class Y 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 K = {
|
|
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
|
+
}, W = 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
|
+
]), X = e.enum([
|
|
148
148
|
"CAMPAIGN",
|
|
149
149
|
"LOCATION",
|
|
150
150
|
"MARKETING MATERIALS",
|
|
@@ -154,15 +154,15 @@ const W = {
|
|
|
154
154
|
"SETTINGS",
|
|
155
155
|
"SEGMENTATION",
|
|
156
156
|
"USER"
|
|
157
|
-
]),
|
|
158
|
-
httpMethod:
|
|
157
|
+
]), q = e.object({
|
|
158
|
+
httpMethod: W,
|
|
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
|
});
|
|
@@ -171,14 +171,14 @@ e.object({
|
|
|
171
171
|
user: e.string().length(28),
|
|
172
172
|
userName: e.string().min(1),
|
|
173
173
|
userPhoneNumber: e.string().refine((o) => x(o)).nullish(),
|
|
174
|
-
moduleType:
|
|
174
|
+
moduleType: X,
|
|
175
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: q,
|
|
179
|
+
response: Q
|
|
180
|
+
}).describe(m.describe(K));
|
|
181
|
+
const Ke = {
|
|
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 $ = 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
|
+
]), Z = e.enum([
|
|
2131
2131
|
"text",
|
|
2132
2132
|
"number",
|
|
2133
2133
|
"textarea",
|
|
@@ -2157,28 +2157,28 @@ const Z = e.enum([
|
|
|
2157
2157
|
"grab_effect",
|
|
2158
2158
|
"grab_quota",
|
|
2159
2159
|
"grab_conditions"
|
|
2160
|
-
]),
|
|
2160
|
+
]), ee = 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: Z,
|
|
2165
2165
|
extras: e.string().optional(),
|
|
2166
2166
|
isRuleChildren: e.boolean().optional()
|
|
2167
|
-
}),
|
|
2167
|
+
}), C = e.object({
|
|
2168
2168
|
not: e.boolean().optional(),
|
|
2169
2169
|
property: e.string(),
|
|
2170
2170
|
value: e.any()
|
|
2171
|
-
}),
|
|
2171
|
+
}), te = 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(ee),
|
|
2175
|
+
condition: C.optional().or(
|
|
2176
|
+
e.array(C)
|
|
2177
2177
|
)
|
|
2178
|
-
}),
|
|
2178
|
+
}), ae = e.object({
|
|
2179
2179
|
name: e.string(),
|
|
2180
2180
|
name_locale: e.record(e.string()).nullish(),
|
|
2181
|
-
groups: e.array(
|
|
2181
|
+
groups: e.array(te)
|
|
2182
2182
|
});
|
|
2183
2183
|
e.object({
|
|
2184
2184
|
_id: n,
|
|
@@ -2186,11 +2186,11 @@ e.object({
|
|
|
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(ae).min(1),
|
|
2190
|
+
intention: e.array($),
|
|
2191
2191
|
defaultValue: e.any()
|
|
2192
2192
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2193
|
-
const
|
|
2193
|
+
const ne = {
|
|
2194
2194
|
collectionName: "Businesses",
|
|
2195
2195
|
transform: {
|
|
2196
2196
|
_id: "oid"
|
|
@@ -2202,27 +2202,27 @@ e.object({
|
|
|
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(ne));
|
|
2206
|
+
const S = e.enum(["PHONE"]), oe = e.enum([
|
|
2207
2207
|
"MOCEAN",
|
|
2208
2208
|
"SLACK",
|
|
2209
2209
|
"SMS",
|
|
2210
2210
|
"EMAIL",
|
|
2211
2211
|
"WHATSAPP"
|
|
2212
|
-
]),
|
|
2212
|
+
]), ie = e.enum(["PENDING", "COMPLETED", "FAILED"]), le = 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
|
+
]), re = e.object({
|
|
2220
|
+
type: S
|
|
2221
|
+
}), N = re.extend({
|
|
2222
|
+
type: e.literal(S.enum.PHONE),
|
|
2223
|
+
provider: oe,
|
|
2224
|
+
usage: le.optional()
|
|
2225
|
+
}), ce = {
|
|
2226
2226
|
collectionName: "Notifications",
|
|
2227
2227
|
transform: { _id: "oid", business: "oid" }
|
|
2228
2228
|
};
|
|
@@ -2232,39 +2232,39 @@ e.object({
|
|
|
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: ie,
|
|
2237
2237
|
ref: e.string().optional()
|
|
2238
|
-
}).describe(m.describe(
|
|
2239
|
-
const
|
|
2238
|
+
}).describe(m.describe(ce));
|
|
2239
|
+
const pe = 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: pe,
|
|
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 T = e.object({
|
|
2256
2256
|
name: e.string().optional(),
|
|
2257
2257
|
address: e.string()
|
|
2258
|
-
}),
|
|
2258
|
+
}), me = 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: T.optional(),
|
|
2264
|
+
to: e.array(T),
|
|
2265
2265
|
subject: e.string(),
|
|
2266
2266
|
html: e.string().optional(),
|
|
2267
|
-
attachments: e.array(
|
|
2267
|
+
attachments: e.array(me).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 se = 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())]),
|
|
@@ -2336,7 +2336,7 @@ e.object({
|
|
|
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(() => se))
|
|
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
|
+
}), ge = e.function().args(e.any(), j).returns(e.boolean()), de = e.function().args(j).returns(e.promise(e.array(e.any())));
|
|
2355
2355
|
e.object({
|
|
2356
|
-
isAdmin:
|
|
2357
|
-
getRules:
|
|
2356
|
+
isAdmin: ge,
|
|
2357
|
+
getRules: de
|
|
2358
2358
|
});
|
|
2359
2359
|
e.object({
|
|
2360
2360
|
transactions: e.array(D),
|
|
2361
2361
|
collections: e.array(w)
|
|
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 ue = {
|
|
2378
2378
|
collectionName: "MarketingMaterials",
|
|
2379
2379
|
transform: {
|
|
2380
2380
|
_id: "oid",
|
|
@@ -2388,7 +2388,7 @@ e.object({
|
|
|
2388
2388
|
headline: e.string(),
|
|
2389
2389
|
caption: e.string(),
|
|
2390
2390
|
editedAt: e.coerce.date()
|
|
2391
|
-
}).describe(m.describe(
|
|
2391
|
+
}).describe(m.describe(ue));
|
|
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 he = e.enum([
|
|
2412
2412
|
"PENDING",
|
|
2413
2413
|
"SUCCESS",
|
|
2414
2414
|
"FAILED",
|
|
2415
2415
|
"RETRYING"
|
|
2416
|
-
]),
|
|
2416
|
+
]), _e = {
|
|
2417
2417
|
collectionName: "WebhookLogs",
|
|
2418
2418
|
transform: {
|
|
2419
2419
|
_id: "oid",
|
|
@@ -2425,18 +2425,18 @@ e.object({
|
|
|
2425
2425
|
business: n,
|
|
2426
2426
|
type: e.string(),
|
|
2427
2427
|
payload: e.record(e.any()),
|
|
2428
|
-
status:
|
|
2428
|
+
status: he,
|
|
2429
2429
|
response: e.any().optional(),
|
|
2430
2430
|
error: e.string().optional()
|
|
2431
|
-
}).describe(m.describe(
|
|
2432
|
-
const
|
|
2431
|
+
}).describe(m.describe(_e));
|
|
2432
|
+
const ye = e.enum(["AUTO", "MANUAL"]);
|
|
2433
2433
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2434
|
-
const
|
|
2434
|
+
const E = e.object({
|
|
2435
2435
|
_id: n,
|
|
2436
2436
|
name: e.string().min(1, "Name is required").max(50),
|
|
2437
|
-
type:
|
|
2437
|
+
type: ye,
|
|
2438
2438
|
event: A.optional()
|
|
2439
|
-
}),
|
|
2439
|
+
}), fe = 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
2442
|
}).superRefine((o, a) => {
|
|
@@ -2444,16 +2444,16 @@ const J = e.object({
|
|
|
2444
2444
|
code: "custom",
|
|
2445
2445
|
message: "Max referral count must be more than min referral count"
|
|
2446
2446
|
});
|
|
2447
|
-
}),
|
|
2448
|
-
threshold:
|
|
2447
|
+
}), be = e.object({
|
|
2448
|
+
threshold: fe,
|
|
2449
2449
|
rewards: e.array(n),
|
|
2450
|
-
pf_reward: e.array(
|
|
2451
|
-
}),
|
|
2450
|
+
pf_reward: e.array(b).optional()
|
|
2451
|
+
}), H = 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: M.optional(),
|
|
2455
|
+
rewards: e.array(be)
|
|
2456
|
+
}), He = {
|
|
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
|
+
}, ze = e.object({
|
|
2466
2466
|
completedAt: e.coerce.date(),
|
|
2467
2467
|
criteria: n,
|
|
2468
2468
|
ref: e.string()
|
|
2469
|
-
}),
|
|
2469
|
+
}), Ce = e.object({
|
|
2470
2470
|
_id: n,
|
|
2471
2471
|
business: n,
|
|
2472
2472
|
referer: n,
|
|
2473
2473
|
referee: n,
|
|
2474
|
-
criteria: e.array(
|
|
2475
|
-
reward: e.array(
|
|
2474
|
+
criteria: e.array(E),
|
|
2475
|
+
reward: e.array(H),
|
|
2476
2476
|
refereeReward: e.array(n).optional(),
|
|
2477
|
-
criteria_progress: e.array(
|
|
2477
|
+
criteria_progress: e.array(ze),
|
|
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(b).optional()
|
|
2482
|
+
}).describe(m.describe(He));
|
|
2483
|
+
Ce.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 Te = {
|
|
2499
2499
|
collectionName: "ReferralProgram",
|
|
2500
2500
|
transform: {
|
|
2501
2501
|
_id: "oid",
|
|
2502
2502
|
business: "oid"
|
|
2503
2503
|
}
|
|
2504
|
-
},
|
|
2504
|
+
}, O = e.object({
|
|
2505
2505
|
_id: n,
|
|
2506
2506
|
business: n,
|
|
2507
2507
|
term_and_condition: e.string().optional(),
|
|
2508
2508
|
refereeReward: e.array(n).optional(),
|
|
2509
|
-
reward: e.array(
|
|
2510
|
-
criteria: e.array(
|
|
2511
|
-
}).describe(m.describe(
|
|
2509
|
+
reward: e.array(H),
|
|
2510
|
+
criteria: e.array(E)
|
|
2511
|
+
}).describe(m.describe(Te));
|
|
2512
2512
|
e.object({
|
|
2513
2513
|
referer: n,
|
|
2514
2514
|
referee: n,
|
|
2515
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: H.optional(),
|
|
2524
|
+
pf_refereeReward: e.array(b).optional()
|
|
2525
2525
|
}),
|
|
2526
2526
|
referralCount: e.number(),
|
|
2527
2527
|
successReferralCount: e.number(),
|
|
@@ -2532,33 +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 ve = e.object({
|
|
2539
2539
|
facebookPageId: e.string(),
|
|
2540
2540
|
pageName: e.string(),
|
|
2541
2541
|
pageProfileImageUrl: e.string(),
|
|
2542
2542
|
pageAccessToken: e.string().optional(),
|
|
2543
2543
|
locationIds: e.array(n)
|
|
2544
|
-
}),
|
|
2544
|
+
}), Se = e.object({
|
|
2545
2545
|
locationId: n.nullable(),
|
|
2546
2546
|
googleLocationName: e.string(),
|
|
2547
2547
|
displayName: e.string().optional()
|
|
2548
|
-
}),
|
|
2548
|
+
}), Ne = e.object({
|
|
2549
2549
|
accessToken: e.string().nullable(),
|
|
2550
2550
|
refreshToken: e.string().nullable(),
|
|
2551
2551
|
accessTokenExpiresAt: e.date().nullable(),
|
|
2552
|
-
locations: e.array(
|
|
2553
|
-
}),
|
|
2552
|
+
locations: e.array(Se)
|
|
2553
|
+
}), Ue = e.object({
|
|
2554
2554
|
token: e.string().nullable(),
|
|
2555
|
-
pages: e.array(
|
|
2555
|
+
pages: e.array(ve)
|
|
2556
2556
|
});
|
|
2557
2557
|
e.object({
|
|
2558
2558
|
_id: n,
|
|
2559
2559
|
businessId: n,
|
|
2560
|
-
google:
|
|
2561
|
-
facebook:
|
|
2560
|
+
google: Ne.nullable(),
|
|
2561
|
+
facebook: Ue.nullable()
|
|
2562
2562
|
}).describe(
|
|
2563
2563
|
m.describe({
|
|
2564
2564
|
collectionName: "ReviewSourceConfig",
|
|
@@ -2618,14 +2618,14 @@ e.object({
|
|
|
2618
2618
|
)
|
|
2619
2619
|
}).nullable()
|
|
2620
2620
|
});
|
|
2621
|
-
const
|
|
2621
|
+
const d = e.object({
|
|
2622
2622
|
name: e.string(),
|
|
2623
2623
|
pictureUrl: e.string()
|
|
2624
|
-
}),
|
|
2624
|
+
}), Pe = d.extend({
|
|
2625
2625
|
isAnonymous: e.boolean().optional()
|
|
2626
|
-
}),
|
|
2626
|
+
}), je = d.extend({
|
|
2627
2627
|
id: e.string().optional()
|
|
2628
|
-
}),
|
|
2628
|
+
}), u = e.object({
|
|
2629
2629
|
comment: e.string(),
|
|
2630
2630
|
updateTime: e.coerce.date()
|
|
2631
2631
|
}), s = e.object({
|
|
@@ -2633,23 +2633,13 @@ const O = e.object({
|
|
|
2633
2633
|
thumbnailUrl: e.string(),
|
|
2634
2634
|
thumbnailLabel: e.string(),
|
|
2635
2635
|
videoUrl: e.string().optional()
|
|
2636
|
-
}),
|
|
2636
|
+
}), Je = {
|
|
2637
2637
|
collectionName: "Reviews",
|
|
2638
2638
|
transform: {
|
|
2639
2639
|
_id: "oid",
|
|
2640
2640
|
businessId: "oid",
|
|
2641
2641
|
reviewerId: "oid",
|
|
2642
|
-
|
|
2643
|
-
},
|
|
2644
|
-
lookups: {
|
|
2645
|
-
reviewerId: {
|
|
2646
|
-
as: "reviewer",
|
|
2647
|
-
fromCollection: "UsersV2"
|
|
2648
|
-
},
|
|
2649
|
-
locationId: {
|
|
2650
|
-
as: "location",
|
|
2651
|
-
fromCollection: "Locations"
|
|
2652
|
-
}
|
|
2642
|
+
restaurantId: "oid"
|
|
2653
2643
|
}
|
|
2654
2644
|
}, I = e.enum([
|
|
2655
2645
|
"google",
|
|
@@ -2659,7 +2649,7 @@ const O = e.object({
|
|
|
2659
2649
|
]);
|
|
2660
2650
|
I.options;
|
|
2661
2651
|
e.enum(["google", "facebook"]);
|
|
2662
|
-
const
|
|
2652
|
+
const Ee = e.enum([
|
|
2663
2653
|
"createTime_desc",
|
|
2664
2654
|
"createTime_asc",
|
|
2665
2655
|
"rating_asc",
|
|
@@ -2671,51 +2661,52 @@ e.object({
|
|
|
2671
2661
|
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
2672
2662
|
locationId: e.string().optional(),
|
|
2673
2663
|
excludeDeleted: e.boolean().optional(),
|
|
2674
|
-
sort:
|
|
2664
|
+
sort: Ee.optional(),
|
|
2675
2665
|
limit: e.coerce.number().int().positive().optional(),
|
|
2676
2666
|
skip: e.coerce.number().int().min(0).optional()
|
|
2677
2667
|
});
|
|
2678
2668
|
const R = e.object({
|
|
2679
2669
|
name: e.string(),
|
|
2680
2670
|
pictureUrl: e.string()
|
|
2681
|
-
}),
|
|
2671
|
+
}), Oe = R.extend({
|
|
2682
2672
|
isAnonymous: e.boolean().optional()
|
|
2683
|
-
}),
|
|
2673
|
+
}), Ie = R.extend({
|
|
2684
2674
|
id: e.string().optional()
|
|
2685
|
-
}),
|
|
2675
|
+
}), h = e.object({
|
|
2686
2676
|
_id: n,
|
|
2687
2677
|
comment: e.string(),
|
|
2688
2678
|
createTime: e.coerce.date(),
|
|
2689
2679
|
updateTime: e.coerce.date().nullish(),
|
|
2690
|
-
|
|
2691
|
-
|
|
2680
|
+
restaurantId: n,
|
|
2681
|
+
restaurantName: e.string()
|
|
2682
|
+
}), Re = h.extend({
|
|
2692
2683
|
source: e.literal("google"),
|
|
2693
2684
|
externalId: e.string().min(1),
|
|
2694
|
-
|
|
2695
|
-
|
|
2685
|
+
translatedComment: e.string().optional(),
|
|
2686
|
+
reviewer: Oe.optional(),
|
|
2687
|
+
reply: u.optional(),
|
|
2696
2688
|
mediaItems: e.array(s),
|
|
2697
2689
|
starRating: e.number(),
|
|
2698
2690
|
locationName: e.string(),
|
|
2699
2691
|
locationDisplayName: e.string()
|
|
2700
|
-
}),
|
|
2692
|
+
}), Le = h.extend({
|
|
2701
2693
|
source: e.literal("facebook"),
|
|
2702
2694
|
externalId: e.string().min(1),
|
|
2703
|
-
reviewer:
|
|
2695
|
+
reviewer: Ie.optional(),
|
|
2704
2696
|
isPositive: e.boolean().optional(),
|
|
2705
2697
|
pageId: e.string(),
|
|
2706
2698
|
pageName: e.string()
|
|
2707
|
-
}),
|
|
2699
|
+
}), xe = h.extend({
|
|
2708
2700
|
source: e.literal("feedme"),
|
|
2709
|
-
reviewer:
|
|
2710
|
-
reply:
|
|
2701
|
+
reviewer: v,
|
|
2702
|
+
reply: u.optional(),
|
|
2711
2703
|
starRating: e.number(),
|
|
2712
|
-
location: G.optional(),
|
|
2713
2704
|
mediaItems: e.array(s),
|
|
2714
2705
|
billId: e.string()
|
|
2715
|
-
}),
|
|
2706
|
+
}), De = h.extend({
|
|
2716
2707
|
source: e.literal("feedvibe"),
|
|
2717
2708
|
externalId: e.string().min(1),
|
|
2718
|
-
reviewer:
|
|
2709
|
+
reviewer: v.optional(),
|
|
2719
2710
|
rating: e.object({
|
|
2720
2711
|
overall: e.number(),
|
|
2721
2712
|
food: e.number(),
|
|
@@ -2726,10 +2717,10 @@ const R = e.object({
|
|
|
2726
2717
|
mediaItems: e.array(s).default([])
|
|
2727
2718
|
});
|
|
2728
2719
|
e.discriminatedUnion("source", [
|
|
2720
|
+
Re,
|
|
2729
2721
|
Le,
|
|
2730
2722
|
xe,
|
|
2731
|
-
De
|
|
2732
|
-
we
|
|
2723
|
+
De
|
|
2733
2724
|
]);
|
|
2734
2725
|
e.object({
|
|
2735
2726
|
comment: e.string(),
|
|
@@ -2737,47 +2728,45 @@ e.object({
|
|
|
2737
2728
|
billId: e.string(),
|
|
2738
2729
|
mediaItems: e.array(s).optional()
|
|
2739
2730
|
});
|
|
2740
|
-
const
|
|
2731
|
+
const _ = e.object({
|
|
2741
2732
|
_id: n,
|
|
2742
2733
|
businessId: n,
|
|
2743
2734
|
comment: e.string(),
|
|
2744
2735
|
createTime: e.coerce.date(),
|
|
2745
2736
|
updateTime: e.coerce.date().nullish(),
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
// is resolved from the review-source location/page mapping at sync time.
|
|
2749
|
-
locationId: n,
|
|
2737
|
+
restaurantId: n,
|
|
2738
|
+
restaurantName: e.string(),
|
|
2750
2739
|
deletedAt: e.coerce.date().optional()
|
|
2751
|
-
}),
|
|
2740
|
+
}), we = _.extend({
|
|
2752
2741
|
source: e.literal("google"),
|
|
2753
2742
|
externalId: e.string().min(1),
|
|
2754
|
-
|
|
2755
|
-
|
|
2743
|
+
translatedComment: e.string().optional(),
|
|
2744
|
+
reviewer: Pe.optional(),
|
|
2745
|
+
reply: u.optional(),
|
|
2756
2746
|
mediaItems: e.array(s),
|
|
2757
2747
|
starRating: e.number(),
|
|
2758
2748
|
locationName: e.string(),
|
|
2759
2749
|
locationDisplayName: e.string()
|
|
2760
|
-
}),
|
|
2750
|
+
}), Ae = _.extend({
|
|
2761
2751
|
source: e.literal("facebook"),
|
|
2762
2752
|
externalId: e.string().min(1),
|
|
2763
|
-
reviewer:
|
|
2753
|
+
reviewer: je.optional(),
|
|
2764
2754
|
isPositive: e.boolean().optional(),
|
|
2765
2755
|
pageId: e.string(),
|
|
2766
2756
|
pageName: e.string()
|
|
2767
|
-
}),
|
|
2757
|
+
}), Ge = _.extend({
|
|
2768
2758
|
source: e.literal("feedme"),
|
|
2769
2759
|
reviewerId: n,
|
|
2770
|
-
reviewer:
|
|
2771
|
-
reply:
|
|
2760
|
+
reviewer: d,
|
|
2761
|
+
reply: u.optional(),
|
|
2772
2762
|
starRating: e.number(),
|
|
2773
2763
|
billId: e.string(),
|
|
2774
|
-
location: e.any().optional(),
|
|
2775
2764
|
mediaItems: e.array(s)
|
|
2776
|
-
}),
|
|
2765
|
+
}), Me = _.extend({
|
|
2777
2766
|
source: e.literal("feedvibe"),
|
|
2778
2767
|
externalId: e.string().min(1),
|
|
2779
2768
|
reviewerId: n,
|
|
2780
|
-
reviewer:
|
|
2769
|
+
reviewer: d,
|
|
2781
2770
|
rating: e.object({
|
|
2782
2771
|
overall: e.number(),
|
|
2783
2772
|
food: e.number(),
|
|
@@ -2788,21 +2777,21 @@ const h = e.object({
|
|
|
2788
2777
|
mediaItems: e.array(s).default([])
|
|
2789
2778
|
});
|
|
2790
2779
|
e.discriminatedUnion("source", [
|
|
2780
|
+
we,
|
|
2791
2781
|
Ae,
|
|
2792
2782
|
Ge,
|
|
2793
|
-
Me
|
|
2794
|
-
|
|
2795
|
-
]).describe(m.describe(Ee));
|
|
2783
|
+
Me
|
|
2784
|
+
]).describe(m.describe(Je));
|
|
2796
2785
|
export {
|
|
2797
|
-
|
|
2786
|
+
$ as F,
|
|
2798
2787
|
t as R,
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2788
|
+
Ke as T,
|
|
2789
|
+
F as a,
|
|
2790
|
+
be as b,
|
|
2791
|
+
E as c,
|
|
2792
|
+
H as d,
|
|
2793
|
+
W as e,
|
|
2794
|
+
X as f,
|
|
2795
|
+
f as i,
|
|
2796
|
+
V as s
|
|
2808
2797
|
};
|