@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.71
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-BonFFUVJ.js → App-B-Onur9k.js} +812 -666
- package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-BnEeKG1C.js} +14 -13
- package/dist/{Bin-Mu8gAiHw.js → Bin-BH9_nATR.js} +8 -8
- package/dist/Broadcast-Gt2ZLLpZ.js +302 -0
- package/dist/CampaignAnalytic-BT6zTgNk.js +1830 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -5
- package/dist/Card-dD52oor7.js +1084 -0
- package/dist/{Collections-CByXxRW_.js → Collections-7bwYNl3M.js} +14 -13
- package/dist/Credit-qZdlqXqR.js +286 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js +53 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js +4213 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +35 -35
- package/dist/{Experience-B7J-aqPK.js → Experience-CAaWgWXP.js} +112 -86
- package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-BpfY6VnX.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-fhrbFb_5.js +356 -0
- package/dist/GiftCardSetup-CTwmNKim.js +736 -0
- package/dist/{Grab-C45MmlD9.js → Grab-BnPfb92x.js} +33 -32
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
- package/dist/{Index-vQ6uP49O.js → Index-DRwvmm_j.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
- package/dist/LoyaltyDashboard-8jn6SIWo.js +2865 -0
- package/dist/MainLayout-Bf42AcB1.js +143 -0
- package/dist/{Marketing-B6xMdQvW.js → Marketing-DruTMjiR.js} +7 -6
- package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-moEHd_gP.js} +15 -14
- package/dist/Member-C9VTQqIm.js +654 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js +1279 -0
- package/dist/MemberImportHistory-DZVwya9v.js +187 -0
- package/dist/MemberList-KusIfy1u.js +334 -0
- package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-msyjdzlI.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +5928 -5644
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js +40 -0
- package/dist/Mission-CUUxpBUF.js +360 -0
- package/dist/{Overview-nsyJGSCq.js → Overview-C9jyKXHX.js} +21 -20
- package/dist/Overview-CYKoF8Hp.js +1316 -0
- package/dist/Point-CPpQ07yp.js +288 -0
- package/dist/Promotion-CJ95m9Qb.js +423 -0
- package/dist/{Queue-Dkipt6fw.js → Queue-CX39ILh_.js} +14 -13
- package/dist/{Record-BFqx6vM-.js → Record-6I0qyXB5.js} +9 -9
- package/dist/Review-DoWu2XNT.js +45 -0
- package/dist/ReviewFacebookCallback-Co-5TnI7.js +238 -0
- package/dist/ReviewGoogleCallback-Ca7ZuMcF.js +213 -0
- package/dist/{Reward-DjFEE7I_.js → Reward-Cx_N6qBJ.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +14 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +196 -186
- package/dist/{Segment-BAjdUfZ6.js → Segment-Bx0EW966.js} +275 -276
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +37 -36
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
- package/dist/{Setting-BK7y0XC-.js → Setting-DzEK3dWj.js} +14 -14
- package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-BNALbI88.js} +12 -12
- package/dist/Settings-Cw85-xzq.js +230 -0
- package/dist/Store-BSqW1gwf.js +2612 -0
- package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-CJXnS8Qf.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js +1329 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
- package/dist/{Tier-BF3V430O.js → Tier-DfitNxp2.js} +2580 -754
- package/dist/{Title-DwPuqKfJ.js → Title-QCbtOvKB.js} +39 -37
- package/dist/Transaction-dOCzlidD.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +26 -26
- package/dist/{Voucher-DnhVIl_o.js → Voucher-BfoCDwjg.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +118 -124
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
- package/dist/{app-i3r-6ZVm.js → app-BxTElIm-.js} +45168 -37577
- package/dist/app.js +1 -1
- package/dist/base.export-BmUK8hMh.js +75 -0
- package/dist/{business-i0Gxk7gG.js → business-DjAiT8tR.js} +5 -5
- package/dist/campaign-DlR3KF9m.js +368 -0
- package/dist/campaign-tAmQNoq7.js +100 -0
- package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BjwEQd11.js} +1 -1
- package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn-C6kWWIQx.js} +53 -53
- package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-BrtXpT9S.js} +1 -1
- package/dist/collection.fn-CDhfM3Eq.js +26 -0
- package/dist/currency-10nX5QnT.js +7 -0
- package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-6oMZOvfM.js} +11 -11
- package/dist/{effect-DM4AzeQl.js → effect-T4YzuTc5.js} +1 -1
- package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-BjODnJMM.js} +209 -201
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-CkdISSVP.js → helper-BCl5r5yZ.js} +1 -1
- package/dist/{index-DgzNGQgE.js → index-B9ZMIUMa.js} +2083 -2559
- package/dist/{index-CB7ytKOE.js → index-BBsK7TUw.js} +1588 -1522
- package/dist/index-BQk6zTgf.js +32437 -0
- package/dist/index-Bd4clHfr.js +901 -0
- package/dist/index-BeVWchv7.js +14550 -0
- package/dist/index-Bht1Z11w.js +72 -0
- package/dist/{index-FD50UHqf.js → index-BiolIgqR.js} +105 -123
- package/dist/{index-Cl8t41Sk.js → index-BxU--5J5.js} +5 -5
- package/dist/index-Bz6oSli7.js +151 -0
- package/dist/index-C5IfNJUl.js +53 -0
- package/dist/{index-BWsj6lCJ.js → index-CRvUvCMA.js} +14 -14
- package/dist/{index-B6xi1soU.js → index-CnaQt4Pn.js} +1 -1
- package/dist/{index-4EtrCy_K.js → index-Ctja--IE.js} +4 -4
- package/dist/{index-D6qeYVNz.js → index-D8rGhchh.js} +1 -1
- package/dist/{index-BrboOmPq.js → index-DJdTDF9C.js} +347 -216
- package/dist/index-DXiJa8Cw.js +137 -0
- package/dist/{index-CxdLExX0.js → index-DeQKLilv.js} +24 -9
- package/dist/{index-vI-ndGu_.js → index-DhtKt4OL.js} +5 -5
- package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-CEOegJjn.js} +132 -132
- package/dist/{loading-DTKDhqew.js → loading-Dx4SCvZY.js} +1 -1
- package/dist/{lodash-CCPBsqhe.js → lodash-Dq8OKCKK.js} +1 -1
- package/dist/member-import-DX-jn2uk.js +187 -0
- package/dist/membership-CltAa-gH.js +274 -0
- package/dist/{money-wMK3QkZ5.js → money-DsaAjJTI.js} +1 -1
- package/dist/{number-DjKVlWn0.js → number-DmhHKYgY.js} +1 -1
- package/dist/objectid-BdNv-dZX.js +145 -0
- package/dist/{plugins-D25PaNJk.js → plugins-BFKVM3uC.js} +13 -12
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-E63jqJHm.js → reward--SjvIeyy.js} +1 -1
- package/dist/{rule-RVvPtAnk.js → rule-CAKdNobZ.js} +335 -275
- package/dist/style.css +1 -1
- package/dist/{template-zNxOQaqe.js → template-Cfxc5eM8.js} +6 -6
- package/dist/timezone-D2b-V5XD.js +20 -0
- package/dist/transaction.fn-B5mLY7bz.js +71 -0
- package/dist/{trigger-BXV02FhP.js → trigger-DvYcjRBZ.js} +17 -17
- package/dist/useMarketingMaterialActions-DtqnjMSt.js +96 -0
- package/dist/{usePagination-BPcPhEnp.js → usePagination-DKX24g31.js} +1 -1
- package/dist/{user-Bd8S7R5u.js → user-fWb1NxGO.js} +1 -1
- package/dist/vue-i18n-wJReAVJw.js +2365 -0
- package/dist/{xlsx-_tQC9Ezf.js → xlsx-Mthhu4JR.js} +440 -440
- package/dist/{zod-C1j2GLZP.js → zod-CVpVUgBZ.js} +1 -1
- package/package.json +10 -6
- package/dist/Broadcast-Cy-i-WOT.js +0 -266
- package/dist/Card-f2XOtWxp.js +0 -910
- package/dist/Credit-CcZF4aQS.js +0 -260
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-CUW7NeVG.js +0 -330
- package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
- package/dist/MainLayout-R5NxIBR-.js +0 -41
- package/dist/Member-CC5F6Bmz.js +0 -280
- package/dist/MemberList-Cq4zxopX.js +0 -1601
- package/dist/Mission-DcCZ6tAG.js +0 -334
- package/dist/Point-D1vLd5hL.js +0 -262
- package/dist/Promotion-Cv7MW5RJ.js +0 -397
- package/dist/Review-CKhakUMe.js +0 -1123
- package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
- package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
- package/dist/Store-uTRQ6KbC.js +0 -1996
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
- package/dist/Transaction-CnTEfMGU.js +0 -39
- package/dist/campaign-CbMlARNI.js +0 -219
- package/dist/campaign-f7FT91GR.js +0 -277
- package/dist/export-DQR-0lmK.js +0 -97
- package/dist/index-COrXX9MR.js +0 -52
- package/dist/index-CWiaP-aV.js +0 -28900
- package/dist/index-jVfDVEtz.js +0 -85
- package/dist/membership-rifuatxU.js +0 -255
- package/dist/objectid-DjpWkCxH.js +0 -145
- package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
- package/dist/vue-i18n-CgMK-TaC.js +0 -2365
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import { z as e, F as n, m,
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import { i as p } from "./helper-
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { z as e, F as n, m, b as A } from "./index-BxU--5J5.js";
|
|
2
|
+
import { C as F, E as M, H as G, I as g } from "./index-B9ZMIUMa.js";
|
|
3
|
+
import { _ as k, l as v, f as B } from "./index-BBsK7TUw.js";
|
|
4
|
+
import { i as p } from "./helper-BCl5r5yZ.js";
|
|
5
|
+
import { d as z, b as U, e as d } from "./index-BeVWchv7.js";
|
|
6
|
+
import { d as V } from "./index-Bd4clHfr.js";
|
|
7
|
+
import { F as T } from "./index-DhtKt4OL.js";
|
|
8
|
+
function b(o, a) {
|
|
7
9
|
let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
8
10
|
const l = r.length;
|
|
9
11
|
for (let c = 0; c < o; c++)
|
|
10
12
|
i += r.charAt(Math.floor(Math.random() * l));
|
|
11
13
|
return i;
|
|
12
14
|
}
|
|
13
|
-
function
|
|
15
|
+
function H(o) {
|
|
14
16
|
return !o.property && "rules" in o;
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function Y(o) {
|
|
17
19
|
return "property" in o && !!o.property;
|
|
18
20
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
21
|
+
const W = "g_schedule";
|
|
22
|
+
function K(o) {
|
|
21
23
|
return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
22
24
|
`).trim();
|
|
23
25
|
}
|
|
24
|
-
function
|
|
25
|
-
const i =
|
|
26
|
-
if (
|
|
26
|
+
function q(o, a = !1) {
|
|
27
|
+
const i = k.cloneDeep(o);
|
|
28
|
+
if (Y(i)) {
|
|
27
29
|
const r = i.conditions;
|
|
28
|
-
return !a && r && typeof r._rrule == "string" && (r._rrule =
|
|
30
|
+
return !a && r && typeof r._rrule == "string" && (r._rrule = K(
|
|
29
31
|
r._rrule
|
|
30
32
|
)), i;
|
|
31
33
|
}
|
|
32
|
-
if (
|
|
34
|
+
if (H(i))
|
|
33
35
|
for (const r in i.rules) {
|
|
34
|
-
const l = i.rules[r], c = a ||
|
|
35
|
-
i.rules[r] =
|
|
36
|
+
const l = i.rules[r], c = a || H(l) && l.name === W;
|
|
37
|
+
i.rules[r] = q(
|
|
36
38
|
l,
|
|
37
39
|
c
|
|
38
40
|
);
|
|
@@ -42,14 +44,14 @@ function Y(o, a = !1) {
|
|
|
42
44
|
class t {
|
|
43
45
|
static scaffoldGroup(a) {
|
|
44
46
|
return {
|
|
45
|
-
name: a ?? `g_${
|
|
47
|
+
name: a ?? `g_${b(4)}`,
|
|
46
48
|
rules: {},
|
|
47
49
|
logic: ""
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
static scaffoldEntry(a) {
|
|
51
53
|
return {
|
|
52
|
-
name: `r_${
|
|
54
|
+
name: `r_${b(4)}`,
|
|
53
55
|
property: a ?? "",
|
|
54
56
|
conditions: {},
|
|
55
57
|
negated: !1
|
|
@@ -57,7 +59,7 @@ class t {
|
|
|
57
59
|
}
|
|
58
60
|
static constructEntry(a, i, r, l) {
|
|
59
61
|
return {
|
|
60
|
-
name: l ?? `e_${
|
|
62
|
+
name: l ?? `e_${b(4)}`,
|
|
61
63
|
property: a,
|
|
62
64
|
conditions: {
|
|
63
65
|
[i]: r
|
|
@@ -70,16 +72,16 @@ class t {
|
|
|
70
72
|
}
|
|
71
73
|
static constructLogic(a, i) {
|
|
72
74
|
const r = i ?? t.getLogic(a);
|
|
73
|
-
return Object.entries(a.rules).map(([l, c]) =>
|
|
75
|
+
return Object.entries(a.rules).map(([l, c]) => H(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
74
76
|
}
|
|
75
77
|
static setRuleToGroup(a, i, r) {
|
|
76
|
-
let l =
|
|
78
|
+
let l = v.cloneDeep(a);
|
|
77
79
|
return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
|
|
78
80
|
l.rules[c.name] = c;
|
|
79
81
|
}) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
|
|
80
82
|
}
|
|
81
83
|
static removeEntry(a, i, r) {
|
|
82
|
-
const l =
|
|
84
|
+
const l = v.cloneDeep(a);
|
|
83
85
|
return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
|
|
84
86
|
}
|
|
85
87
|
static constructRule(a) {
|
|
@@ -111,18 +113,18 @@ class t {
|
|
|
111
113
|
static isRuleExceed(a, i) {
|
|
112
114
|
const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
|
|
113
115
|
if (l > 10)
|
|
114
|
-
throw new
|
|
116
|
+
throw new X(10, l);
|
|
115
117
|
return !0;
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
|
-
class
|
|
120
|
+
class X extends Error {
|
|
119
121
|
constructor(a, i) {
|
|
120
122
|
super(
|
|
121
123
|
`Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
|
|
122
124
|
), this.name = "MaxRulesExceededError";
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
|
-
const
|
|
127
|
+
const Q = {
|
|
126
128
|
collectionName: "AuditLogs",
|
|
127
129
|
transform: {
|
|
128
130
|
_id: "oid",
|
|
@@ -135,7 +137,7 @@ const W = {
|
|
|
135
137
|
fromCollection: "Businesses"
|
|
136
138
|
}
|
|
137
139
|
}
|
|
138
|
-
},
|
|
140
|
+
}, $ = e.enum([
|
|
139
141
|
"GET",
|
|
140
142
|
"POST",
|
|
141
143
|
"PUT",
|
|
@@ -144,7 +146,7 @@ const W = {
|
|
|
144
146
|
"OPTIONS",
|
|
145
147
|
"HEAD",
|
|
146
148
|
"ALL"
|
|
147
|
-
]),
|
|
149
|
+
]), Z = e.enum([
|
|
148
150
|
"CAMPAIGN",
|
|
149
151
|
"LOCATION",
|
|
150
152
|
"MARKETING MATERIALS",
|
|
@@ -154,15 +156,15 @@ const W = {
|
|
|
154
156
|
"SETTINGS",
|
|
155
157
|
"SEGMENTATION",
|
|
156
158
|
"USER"
|
|
157
|
-
]),
|
|
158
|
-
httpMethod:
|
|
159
|
+
]), ee = e.object({
|
|
160
|
+
httpMethod: $,
|
|
159
161
|
url: e.string().min(1),
|
|
160
162
|
userAgent: e.string(),
|
|
161
163
|
host: e.string().min(1),
|
|
162
164
|
params: e.object({}).passthrough().nullish(),
|
|
163
165
|
query: e.object({}).passthrough().nullish(),
|
|
164
166
|
body: e.object({}).passthrough().nullish()
|
|
165
|
-
}),
|
|
167
|
+
}), te = e.object({
|
|
166
168
|
statusCode: e.number().int().min(100).max(599),
|
|
167
169
|
body: e.object({}).passthrough().nullish()
|
|
168
170
|
});
|
|
@@ -170,15 +172,15 @@ e.object({
|
|
|
170
172
|
_id: n,
|
|
171
173
|
user: e.string().length(28),
|
|
172
174
|
userName: e.string().min(1),
|
|
173
|
-
userPhoneNumber: e.string().refine((o) =>
|
|
174
|
-
moduleType:
|
|
175
|
+
userPhoneNumber: e.string().refine((o) => F(o)).nullish(),
|
|
176
|
+
moduleType: Z,
|
|
175
177
|
business: n.nullish(),
|
|
176
178
|
clientIp: e.string().nullish(),
|
|
177
179
|
timestamp: e.string().datetime(),
|
|
178
|
-
request:
|
|
179
|
-
response:
|
|
180
|
-
}).describe(m.describe(
|
|
181
|
-
const
|
|
180
|
+
request: ee,
|
|
181
|
+
response: te
|
|
182
|
+
}).describe(m.describe(Q));
|
|
183
|
+
const ot = {
|
|
182
184
|
PROMOTION: {
|
|
183
185
|
name: "Promotion Template",
|
|
184
186
|
description: "Promotion template for campaign creation.",
|
|
@@ -2117,7 +2119,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2117
2119
|
({
|
|
2118
2120
|
...t.scaffoldGroup()
|
|
2119
2121
|
});
|
|
2120
|
-
const
|
|
2122
|
+
const ae = e.enum([
|
|
2121
2123
|
"MEMBER_REWARD",
|
|
2122
2124
|
"PAID_LOYALTY",
|
|
2123
2125
|
"COLLECT_FEEDBACK",
|
|
@@ -2127,7 +2129,7 @@ const Z = e.enum([
|
|
|
2127
2129
|
"BROADCAST",
|
|
2128
2130
|
"BIRTHDAY",
|
|
2129
2131
|
"GAME"
|
|
2130
|
-
]),
|
|
2132
|
+
]), ne = e.enum([
|
|
2131
2133
|
"text",
|
|
2132
2134
|
"number",
|
|
2133
2135
|
"textarea",
|
|
@@ -2157,28 +2159,28 @@ const Z = e.enum([
|
|
|
2157
2159
|
"grab_effect",
|
|
2158
2160
|
"grab_quota",
|
|
2159
2161
|
"grab_conditions"
|
|
2160
|
-
]),
|
|
2162
|
+
]), oe = e.object({
|
|
2161
2163
|
label: e.string().optional(),
|
|
2162
2164
|
label_locale: e.record(e.string()).nullish(),
|
|
2163
2165
|
property: e.string().or(e.any()),
|
|
2164
|
-
type:
|
|
2166
|
+
type: ne,
|
|
2165
2167
|
extras: e.string().optional(),
|
|
2166
2168
|
isRuleChildren: e.boolean().optional()
|
|
2167
|
-
}),
|
|
2169
|
+
}), S = e.object({
|
|
2168
2170
|
not: e.boolean().optional(),
|
|
2169
2171
|
property: e.string(),
|
|
2170
2172
|
value: e.any()
|
|
2171
|
-
}),
|
|
2173
|
+
}), ie = e.object({
|
|
2172
2174
|
name: e.string().optional(),
|
|
2173
2175
|
name_locale: e.record(e.string()).nullish(),
|
|
2174
|
-
fields: e.array(
|
|
2175
|
-
condition:
|
|
2176
|
-
e.array(
|
|
2176
|
+
fields: e.array(oe),
|
|
2177
|
+
condition: S.optional().or(
|
|
2178
|
+
e.array(S)
|
|
2177
2179
|
)
|
|
2178
|
-
}),
|
|
2180
|
+
}), le = e.object({
|
|
2179
2181
|
name: e.string(),
|
|
2180
2182
|
name_locale: e.record(e.string()).nullish(),
|
|
2181
|
-
groups: e.array(
|
|
2183
|
+
groups: e.array(ie)
|
|
2182
2184
|
});
|
|
2183
2185
|
e.object({
|
|
2184
2186
|
_id: n,
|
|
@@ -2186,11 +2188,11 @@ e.object({
|
|
|
2186
2188
|
name_locale: e.record(e.string()).nullish(),
|
|
2187
2189
|
description: e.string().nullish(),
|
|
2188
2190
|
description_locale: e.record(e.string()).nullish(),
|
|
2189
|
-
steps: e.array(
|
|
2190
|
-
intention: e.array(
|
|
2191
|
+
steps: e.array(le).min(1),
|
|
2192
|
+
intention: e.array(ae),
|
|
2191
2193
|
defaultValue: e.any()
|
|
2192
2194
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2193
|
-
const
|
|
2195
|
+
const re = {
|
|
2194
2196
|
collectionName: "Businesses",
|
|
2195
2197
|
transform: {
|
|
2196
2198
|
_id: "oid"
|
|
@@ -2202,69 +2204,171 @@ e.object({
|
|
|
2202
2204
|
name: e.string(),
|
|
2203
2205
|
credit: e.number(),
|
|
2204
2206
|
forceSend: e.boolean().optional()
|
|
2205
|
-
}).describe(m.describe(
|
|
2206
|
-
const
|
|
2207
|
+
}).describe(m.describe(re));
|
|
2208
|
+
const P = e.enum(["PHONE"]), ce = e.enum([
|
|
2207
2209
|
"MOCEAN",
|
|
2208
2210
|
"SLACK",
|
|
2209
2211
|
"SMS",
|
|
2210
2212
|
"EMAIL",
|
|
2211
2213
|
"WHATSAPP"
|
|
2212
|
-
]),
|
|
2214
|
+
]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
|
|
2213
2215
|
"General",
|
|
2214
2216
|
"Otp",
|
|
2215
2217
|
"Marketing",
|
|
2216
2218
|
"Ordering",
|
|
2217
2219
|
"MemberInvitation",
|
|
2218
2220
|
"MarketingPromotion"
|
|
2219
|
-
]),
|
|
2220
|
-
type:
|
|
2221
|
-
}),
|
|
2222
|
-
type: e.literal(
|
|
2223
|
-
provider:
|
|
2224
|
-
usage:
|
|
2225
|
-
}),
|
|
2221
|
+
]), se = e.object({
|
|
2222
|
+
type: P
|
|
2223
|
+
}), j = se.extend({
|
|
2224
|
+
type: e.literal(P.enum.PHONE),
|
|
2225
|
+
provider: ce,
|
|
2226
|
+
usage: me.optional()
|
|
2227
|
+
}), E = e.enum([
|
|
2228
|
+
"Accepted",
|
|
2229
|
+
"PartiallyAccepted",
|
|
2230
|
+
"Queued",
|
|
2231
|
+
"Unknown",
|
|
2232
|
+
"Failed"
|
|
2233
|
+
]), ge = e.enum([
|
|
2234
|
+
"PENDING",
|
|
2235
|
+
"SUBMITTED",
|
|
2236
|
+
"SETTLED",
|
|
2237
|
+
"FAILED"
|
|
2238
|
+
]), J = e.object({
|
|
2239
|
+
channel: e.string(),
|
|
2240
|
+
status: e.string(),
|
|
2241
|
+
statusDetails: e.string().nullish()
|
|
2242
|
+
}), de = {
|
|
2226
2243
|
collectionName: "Notifications",
|
|
2227
|
-
transform: {
|
|
2244
|
+
transform: {
|
|
2245
|
+
_id: "oid",
|
|
2246
|
+
business: "oid",
|
|
2247
|
+
campaign: "oid",
|
|
2248
|
+
member: "oid"
|
|
2249
|
+
}
|
|
2228
2250
|
};
|
|
2229
2251
|
e.object({
|
|
2230
2252
|
_id: n,
|
|
2231
2253
|
business: n,
|
|
2232
|
-
|
|
2254
|
+
status: pe,
|
|
2255
|
+
ref: e.string().optional(),
|
|
2233
2256
|
title: e.string().optional(),
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2257
|
+
// Single-channel fields. Absent on multi-channel dispatches, which carry
|
|
2258
|
+
// their content per channel in the submitted request instead.
|
|
2259
|
+
target: e.string().optional(),
|
|
2260
|
+
message: e.string().optional(),
|
|
2261
|
+
option: j.optional(),
|
|
2262
|
+
// Multi-channel dispatch fields.
|
|
2263
|
+
campaign: n.nullish(),
|
|
2264
|
+
member: n.nullish(),
|
|
2265
|
+
/**
|
|
2266
|
+
* The scheduled run this dispatch belongs to. With campaign and member it
|
|
2267
|
+
* identifies one intended send, so a redelivered queue job is recognised
|
|
2268
|
+
* rather than sent twice.
|
|
2269
|
+
*/
|
|
2270
|
+
runAt: e.coerce.date().nullish(),
|
|
2271
|
+
mode: z.nullish(),
|
|
2272
|
+
channels: e.array(U).nullish(),
|
|
2273
|
+
/**
|
|
2274
|
+
* Local submission state, kept separate from the upstream outcome so an
|
|
2275
|
+
* interrupted worker can tell "never sent" from "sent, result unknown".
|
|
2276
|
+
*/
|
|
2277
|
+
state: ge.nullish(),
|
|
2278
|
+
outcome: E.nullish(),
|
|
2279
|
+
/** Upstream correlation id, preserved even when the request failed. */
|
|
2280
|
+
requestId: e.string().nullish(),
|
|
2281
|
+
attempts: e.array(J).nullish(),
|
|
2282
|
+
/** Credit consumed upstream, recorded for reconciliation. */
|
|
2283
|
+
creditUsed: d.nullish(),
|
|
2284
|
+
balanceAfter: d.nullish(),
|
|
2285
|
+
error: e.string().nullish(),
|
|
2286
|
+
createdAt: e.coerce.date().nullish(),
|
|
2287
|
+
submittedAt: e.coerce.date().nullish(),
|
|
2288
|
+
settledAt: e.coerce.date().nullish()
|
|
2289
|
+
}).describe(m.describe(de));
|
|
2290
|
+
const ue = e.object({
|
|
2240
2291
|
target: e.string(),
|
|
2241
2292
|
title: e.string().optional(),
|
|
2242
2293
|
message: e.string(),
|
|
2243
|
-
option:
|
|
2294
|
+
option: j,
|
|
2244
2295
|
ref: e.string().optional()
|
|
2296
|
+
}), he = e.object({
|
|
2297
|
+
memberId: e.string(),
|
|
2298
|
+
name: e.string().nullish(),
|
|
2299
|
+
phoneNumber: e.string().nullish(),
|
|
2300
|
+
email: e.string().nullish(),
|
|
2301
|
+
/**
|
|
2302
|
+
* Shared Firebase uid required by App Inbox and Push, sourced from
|
|
2303
|
+
* `FdoUserV2.externalMemberId`. Optional there, so it can legitimately be
|
|
2304
|
+
* absent for a member; upstream decides what that means for a channel.
|
|
2305
|
+
*/
|
|
2306
|
+
firebaseUid: e.string().nullish()
|
|
2307
|
+
});
|
|
2308
|
+
e.object({
|
|
2309
|
+
businessId: e.string(),
|
|
2310
|
+
forceSend: e.boolean(),
|
|
2311
|
+
mode: z,
|
|
2312
|
+
channels: e.array(
|
|
2313
|
+
e.enum(["SMS", "WHATSAPP", "EMAIL", "APP_INBOX", "PUSH_NOTIFICATION"])
|
|
2314
|
+
),
|
|
2315
|
+
metadata: e.object({
|
|
2316
|
+
source: e.string(),
|
|
2317
|
+
refValue: e.string()
|
|
2318
|
+
}),
|
|
2319
|
+
content: e.record(e.string(), e.unknown())
|
|
2245
2320
|
});
|
|
2246
2321
|
e.object({
|
|
2322
|
+
requestId: e.string().nullish(),
|
|
2323
|
+
status: E.nullish(),
|
|
2324
|
+
attempts: e.array(J).nullish(),
|
|
2325
|
+
creditUsed: d.nullish(),
|
|
2326
|
+
balance: d.nullish()
|
|
2327
|
+
});
|
|
2328
|
+
const _e = e.object({
|
|
2247
2329
|
campaignId: e.string(),
|
|
2248
|
-
|
|
2249
|
-
|
|
2330
|
+
business: e.string(),
|
|
2331
|
+
runAt: e.coerce.date(),
|
|
2332
|
+
recipient: he,
|
|
2333
|
+
/** Personalised, editor-data-free content keyed by channel. */
|
|
2334
|
+
content: e.record(e.string(), e.unknown()),
|
|
2335
|
+
mode: z,
|
|
2336
|
+
channels: e.array(U)
|
|
2337
|
+
});
|
|
2338
|
+
e.object({
|
|
2339
|
+
campaignId: e.string(),
|
|
2340
|
+
/** Absent only on multi-channel jobs, which carry `dispatch` instead. */
|
|
2341
|
+
notification: ue.optional(),
|
|
2342
|
+
business: e.string(),
|
|
2343
|
+
/**
|
|
2344
|
+
* Present only for multi-channel broadcasts. When set the job takes the
|
|
2345
|
+
* multi-channel dispatch path; when absent the legacy single-channel path
|
|
2346
|
+
* runs unchanged.
|
|
2347
|
+
*/
|
|
2348
|
+
dispatch: _e.optional()
|
|
2349
|
+
}).superRefine((o, a) => {
|
|
2350
|
+
!o.notification && !o.dispatch && a.addIssue({
|
|
2351
|
+
code: e.ZodIssueCode.custom,
|
|
2352
|
+
message: "Job must carry either a notification or a dispatch"
|
|
2353
|
+
});
|
|
2250
2354
|
});
|
|
2251
2355
|
e.object({
|
|
2252
2356
|
phone: e.string(),
|
|
2253
2357
|
message: e.string()
|
|
2254
2358
|
});
|
|
2255
|
-
const
|
|
2359
|
+
const N = e.object({
|
|
2256
2360
|
name: e.string().optional(),
|
|
2257
2361
|
address: e.string()
|
|
2258
|
-
}),
|
|
2362
|
+
}), ye = e.object({
|
|
2259
2363
|
filename: e.string(),
|
|
2260
2364
|
content: e.instanceof(Uint8Array)
|
|
2261
2365
|
});
|
|
2262
2366
|
e.object({
|
|
2263
|
-
from:
|
|
2264
|
-
to: e.array(
|
|
2367
|
+
from: N.optional(),
|
|
2368
|
+
to: e.array(N),
|
|
2265
2369
|
subject: e.string(),
|
|
2266
2370
|
html: e.string().optional(),
|
|
2267
|
-
attachments: e.array(
|
|
2371
|
+
attachments: e.array(ye).optional()
|
|
2268
2372
|
});
|
|
2269
2373
|
e.object({
|
|
2270
2374
|
subject: e.string(),
|
|
@@ -2304,7 +2408,7 @@ e.object({
|
|
|
2304
2408
|
billId: e.string()
|
|
2305
2409
|
});
|
|
2306
2410
|
e.object({
|
|
2307
|
-
amount:
|
|
2411
|
+
amount: A,
|
|
2308
2412
|
member: e.string(),
|
|
2309
2413
|
bill: e.string(),
|
|
2310
2414
|
otp: e.string().nullish(),
|
|
@@ -2313,15 +2417,15 @@ e.object({
|
|
|
2313
2417
|
e.object({
|
|
2314
2418
|
orderId: e.string()
|
|
2315
2419
|
});
|
|
2316
|
-
var
|
|
2317
|
-
e.nativeEnum(
|
|
2420
|
+
var O = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(O || {});
|
|
2421
|
+
e.nativeEnum(O);
|
|
2318
2422
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2319
2423
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2320
2424
|
e.enum(["quota"]);
|
|
2321
|
-
var
|
|
2322
|
-
e.nativeEnum(
|
|
2425
|
+
var I = /* @__PURE__ */ ((o) => (o.marketing = "business::marketing", o.campaign = "business::campaign", o.counter = "business::counter", o.permission = "business::permission", o.role = "business::role", o))(I || {});
|
|
2426
|
+
e.nativeEnum(I);
|
|
2323
2427
|
e.enum(["restaurant"]);
|
|
2324
|
-
const
|
|
2428
|
+
const fe = e.object({
|
|
2325
2429
|
label: e.string(),
|
|
2326
2430
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
2327
2431
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -2336,7 +2440,7 @@ e.object({
|
|
|
2336
2440
|
userId: e.string(),
|
|
2337
2441
|
email: e.string().nullish(),
|
|
2338
2442
|
phoneNo: e.string().nullish(),
|
|
2339
|
-
permissions: e.array(e.lazy(() =>
|
|
2443
|
+
permissions: e.array(e.lazy(() => fe))
|
|
2340
2444
|
}).describe(
|
|
2341
2445
|
m.describe({
|
|
2342
2446
|
collectionName: "PermissionUsers",
|
|
@@ -2345,27 +2449,27 @@ e.object({
|
|
|
2345
2449
|
}
|
|
2346
2450
|
})
|
|
2347
2451
|
);
|
|
2348
|
-
const
|
|
2452
|
+
const R = e.object({
|
|
2349
2453
|
userId: e.string(),
|
|
2350
2454
|
level: e.number(),
|
|
2351
2455
|
role: e.string().optional(),
|
|
2352
2456
|
businessId: e.string().optional(),
|
|
2353
2457
|
restaurantId: e.string().optional()
|
|
2354
|
-
}),
|
|
2458
|
+
}), be = e.function().args(e.any(), R).returns(e.boolean()), He = e.function().args(R).returns(e.promise(e.array(e.any())));
|
|
2355
2459
|
e.object({
|
|
2356
|
-
isAdmin:
|
|
2357
|
-
getRules:
|
|
2460
|
+
isAdmin: be,
|
|
2461
|
+
getRules: He
|
|
2358
2462
|
});
|
|
2359
2463
|
e.object({
|
|
2360
|
-
transactions: e.array(
|
|
2361
|
-
collections: e.array(
|
|
2464
|
+
transactions: e.array(M),
|
|
2465
|
+
collections: e.array(G)
|
|
2362
2466
|
});
|
|
2363
|
-
const
|
|
2467
|
+
const L = e.enum([
|
|
2364
2468
|
"ROCK_PAPER_SCISSOR"
|
|
2365
2469
|
]);
|
|
2366
|
-
|
|
2470
|
+
L.enum.ROCK_PAPER_SCISSOR + "";
|
|
2367
2471
|
e.object({
|
|
2368
|
-
type:
|
|
2472
|
+
type: L
|
|
2369
2473
|
});
|
|
2370
2474
|
e.object({
|
|
2371
2475
|
host: e.string().url(),
|
|
@@ -2374,7 +2478,7 @@ e.object({
|
|
|
2374
2478
|
roomId: e.string()
|
|
2375
2479
|
});
|
|
2376
2480
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
2377
|
-
const
|
|
2481
|
+
const ze = {
|
|
2378
2482
|
collectionName: "MarketingMaterials",
|
|
2379
2483
|
transform: {
|
|
2380
2484
|
_id: "oid",
|
|
@@ -2388,7 +2492,7 @@ e.object({
|
|
|
2388
2492
|
headline: e.string(),
|
|
2389
2493
|
caption: e.string(),
|
|
2390
2494
|
editedAt: e.coerce.date()
|
|
2391
|
-
}).describe(m.describe(
|
|
2495
|
+
}).describe(m.describe(ze));
|
|
2392
2496
|
e.object({
|
|
2393
2497
|
id: e.number(),
|
|
2394
2498
|
name: e.string(),
|
|
@@ -2408,12 +2512,12 @@ e.object({
|
|
|
2408
2512
|
phone: e.string().optional(),
|
|
2409
2513
|
email: e.string().optional()
|
|
2410
2514
|
});
|
|
2411
|
-
const
|
|
2515
|
+
const Te = e.enum([
|
|
2412
2516
|
"PENDING",
|
|
2413
2517
|
"SUCCESS",
|
|
2414
2518
|
"FAILED",
|
|
2415
2519
|
"RETRYING"
|
|
2416
|
-
]),
|
|
2520
|
+
]), Ce = {
|
|
2417
2521
|
collectionName: "WebhookLogs",
|
|
2418
2522
|
transform: {
|
|
2419
2523
|
_id: "oid",
|
|
@@ -2425,18 +2529,18 @@ e.object({
|
|
|
2425
2529
|
business: n,
|
|
2426
2530
|
type: e.string(),
|
|
2427
2531
|
payload: e.record(e.any()),
|
|
2428
|
-
status:
|
|
2532
|
+
status: Te,
|
|
2429
2533
|
response: e.any().optional(),
|
|
2430
2534
|
error: e.string().optional()
|
|
2431
|
-
}).describe(m.describe(
|
|
2432
|
-
const
|
|
2535
|
+
}).describe(m.describe(Ce));
|
|
2536
|
+
const ve = e.enum(["AUTO", "MANUAL"]);
|
|
2433
2537
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2434
|
-
const
|
|
2538
|
+
const x = e.object({
|
|
2435
2539
|
_id: n,
|
|
2436
2540
|
name: e.string().min(1, "Name is required").max(50),
|
|
2437
|
-
type:
|
|
2438
|
-
event:
|
|
2439
|
-
}),
|
|
2541
|
+
type: ve,
|
|
2542
|
+
event: V.optional()
|
|
2543
|
+
}), Se = e.object({
|
|
2440
2544
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2441
2545
|
to: e.number().int("Must be integer").nullish()
|
|
2442
2546
|
}).superRefine((o, a) => {
|
|
@@ -2444,16 +2548,16 @@ const J = e.object({
|
|
|
2444
2548
|
code: "custom",
|
|
2445
2549
|
message: "Max referral count must be more than min referral count"
|
|
2446
2550
|
});
|
|
2447
|
-
}),
|
|
2448
|
-
threshold:
|
|
2551
|
+
}), Ne = e.object({
|
|
2552
|
+
threshold: Se,
|
|
2449
2553
|
rewards: e.array(n),
|
|
2450
|
-
pf_reward: e.array(
|
|
2451
|
-
}),
|
|
2554
|
+
pf_reward: e.array(T).optional()
|
|
2555
|
+
}), C = e.object({
|
|
2452
2556
|
id: e.string(),
|
|
2453
2557
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2454
|
-
rule:
|
|
2455
|
-
rewards: e.array(
|
|
2456
|
-
}),
|
|
2558
|
+
rule: B.optional(),
|
|
2559
|
+
rewards: e.array(Ne)
|
|
2560
|
+
}), Ue = {
|
|
2457
2561
|
collectionName: "ReferralRecords",
|
|
2458
2562
|
transform: {
|
|
2459
2563
|
_id: "oid",
|
|
@@ -2462,25 +2566,25 @@ const J = e.object({
|
|
|
2462
2566
|
referee: "oid",
|
|
2463
2567
|
refereeReward: "oid"
|
|
2464
2568
|
}
|
|
2465
|
-
},
|
|
2569
|
+
}, Pe = e.object({
|
|
2466
2570
|
completedAt: e.coerce.date(),
|
|
2467
2571
|
criteria: n,
|
|
2468
2572
|
ref: e.string()
|
|
2469
|
-
}),
|
|
2573
|
+
}), je = e.object({
|
|
2470
2574
|
_id: n,
|
|
2471
2575
|
business: n,
|
|
2472
2576
|
referer: n,
|
|
2473
2577
|
referee: n,
|
|
2474
|
-
criteria: e.array(
|
|
2475
|
-
reward: e.array(
|
|
2578
|
+
criteria: e.array(x),
|
|
2579
|
+
reward: e.array(C),
|
|
2476
2580
|
refereeReward: e.array(n).optional(),
|
|
2477
|
-
criteria_progress: e.array(
|
|
2581
|
+
criteria_progress: e.array(Pe),
|
|
2478
2582
|
status: e.string(),
|
|
2479
2583
|
pf_referer: g.optional(),
|
|
2480
2584
|
pf_referee: g.optional(),
|
|
2481
|
-
pf_refereeReward: e.array(
|
|
2482
|
-
}).describe(m.describe(
|
|
2483
|
-
|
|
2585
|
+
pf_refereeReward: e.array(T).optional()
|
|
2586
|
+
}).describe(m.describe(Ue));
|
|
2587
|
+
je.pick({
|
|
2484
2588
|
_id: !0,
|
|
2485
2589
|
business: !0,
|
|
2486
2590
|
referer: !0,
|
|
@@ -2495,33 +2599,33 @@ Te.pick({
|
|
|
2495
2599
|
photoUrl: !0
|
|
2496
2600
|
})
|
|
2497
2601
|
});
|
|
2498
|
-
const
|
|
2602
|
+
const Ee = {
|
|
2499
2603
|
collectionName: "ReferralProgram",
|
|
2500
2604
|
transform: {
|
|
2501
2605
|
_id: "oid",
|
|
2502
2606
|
business: "oid"
|
|
2503
2607
|
}
|
|
2504
|
-
},
|
|
2608
|
+
}, D = e.object({
|
|
2505
2609
|
_id: n,
|
|
2506
2610
|
business: n,
|
|
2507
2611
|
term_and_condition: e.string().optional(),
|
|
2508
2612
|
refereeReward: e.array(n).optional(),
|
|
2509
|
-
reward: e.array(
|
|
2510
|
-
criteria: e.array(
|
|
2511
|
-
}).describe(m.describe(
|
|
2613
|
+
reward: e.array(C),
|
|
2614
|
+
criteria: e.array(x)
|
|
2615
|
+
}).describe(m.describe(Ee));
|
|
2512
2616
|
e.object({
|
|
2513
2617
|
referer: n,
|
|
2514
2618
|
referee: n,
|
|
2515
2619
|
business: n
|
|
2516
2620
|
});
|
|
2517
2621
|
e.object({
|
|
2518
|
-
program:
|
|
2622
|
+
program: D.pick({
|
|
2519
2623
|
_id: !0,
|
|
2520
2624
|
business: !0,
|
|
2521
2625
|
term_and_condition: !0
|
|
2522
2626
|
}).extend({
|
|
2523
|
-
reward:
|
|
2524
|
-
pf_refereeReward: e.array(
|
|
2627
|
+
reward: C.optional(),
|
|
2628
|
+
pf_refereeReward: e.array(T).optional()
|
|
2525
2629
|
}),
|
|
2526
2630
|
referralCount: e.number(),
|
|
2527
2631
|
successReferralCount: e.number(),
|
|
@@ -2532,33 +2636,37 @@ e.object({
|
|
|
2532
2636
|
photoUrl: !0
|
|
2533
2637
|
}).optional()
|
|
2534
2638
|
});
|
|
2535
|
-
|
|
2639
|
+
D.extend({
|
|
2536
2640
|
updateReferralRecord: e.boolean().optional()
|
|
2537
2641
|
});
|
|
2538
|
-
const
|
|
2642
|
+
const Je = e.object({
|
|
2539
2643
|
facebookPageId: e.string(),
|
|
2540
2644
|
pageName: e.string(),
|
|
2541
2645
|
pageProfileImageUrl: e.string(),
|
|
2542
2646
|
pageAccessToken: e.string().optional(),
|
|
2543
2647
|
locationIds: e.array(n)
|
|
2544
|
-
}),
|
|
2648
|
+
}), Oe = e.object({
|
|
2545
2649
|
locationId: n.nullable(),
|
|
2546
2650
|
googleLocationName: e.string(),
|
|
2547
2651
|
displayName: e.string().optional()
|
|
2548
|
-
}),
|
|
2652
|
+
}), Ie = e.object({
|
|
2549
2653
|
accessToken: e.string().nullable(),
|
|
2550
2654
|
refreshToken: e.string().nullable(),
|
|
2551
2655
|
accessTokenExpiresAt: e.date().nullable(),
|
|
2552
|
-
locations: e.array(
|
|
2553
|
-
|
|
2656
|
+
locations: e.array(Oe),
|
|
2657
|
+
lastSyncTime: e.coerce.date().nullish(),
|
|
2658
|
+
syncFrequency: e.number().int().min(1).max(30).default(30)
|
|
2659
|
+
}), Re = e.object({
|
|
2554
2660
|
token: e.string().nullable(),
|
|
2555
|
-
pages: e.array(
|
|
2661
|
+
pages: e.array(Je),
|
|
2662
|
+
lastSyncTime: e.coerce.date().nullish(),
|
|
2663
|
+
syncFrequency: e.number().int().min(1).max(30).default(30)
|
|
2556
2664
|
});
|
|
2557
2665
|
e.object({
|
|
2558
2666
|
_id: n,
|
|
2559
2667
|
businessId: n,
|
|
2560
|
-
google:
|
|
2561
|
-
facebook:
|
|
2668
|
+
google: Ie.nullable(),
|
|
2669
|
+
facebook: Re.nullable()
|
|
2562
2670
|
}).describe(
|
|
2563
2671
|
m.describe({
|
|
2564
2672
|
collectionName: "ReviewSourceConfig",
|
|
@@ -2604,7 +2712,9 @@ e.object({
|
|
|
2604
2712
|
displayName: e.string().optional(),
|
|
2605
2713
|
locationId: e.string().nullable()
|
|
2606
2714
|
})
|
|
2607
|
-
)
|
|
2715
|
+
),
|
|
2716
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
2717
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
2608
2718
|
}).nullable(),
|
|
2609
2719
|
facebook: e.object({
|
|
2610
2720
|
token: e.string().nullable(),
|
|
@@ -2615,107 +2725,120 @@ e.object({
|
|
|
2615
2725
|
pageProfileImageUrl: e.string(),
|
|
2616
2726
|
locationIds: e.array(e.string())
|
|
2617
2727
|
})
|
|
2618
|
-
)
|
|
2728
|
+
),
|
|
2729
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
2730
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
2619
2731
|
}).nullable()
|
|
2620
2732
|
});
|
|
2621
|
-
const
|
|
2733
|
+
const u = e.object({
|
|
2622
2734
|
name: e.string(),
|
|
2623
|
-
pictureUrl: e.string()
|
|
2624
|
-
|
|
2735
|
+
pictureUrl: e.string(),
|
|
2736
|
+
phoneNumber: e.string().optional()
|
|
2737
|
+
}), Le = u.extend({
|
|
2625
2738
|
isAnonymous: e.boolean().optional()
|
|
2626
|
-
}),
|
|
2739
|
+
}), xe = u.extend({
|
|
2627
2740
|
id: e.string().optional()
|
|
2628
|
-
}),
|
|
2741
|
+
}), h = e.object({
|
|
2629
2742
|
comment: e.string(),
|
|
2630
2743
|
updateTime: e.coerce.date()
|
|
2631
|
-
})
|
|
2744
|
+
});
|
|
2745
|
+
e.object({
|
|
2746
|
+
comment: e.string().trim().min(1).max(4096)
|
|
2747
|
+
});
|
|
2748
|
+
const s = e.object({
|
|
2632
2749
|
externalId: e.string().optional(),
|
|
2633
2750
|
thumbnailUrl: e.string(),
|
|
2634
2751
|
thumbnailLabel: e.string(),
|
|
2635
2752
|
videoUrl: e.string().optional()
|
|
2636
|
-
}),
|
|
2753
|
+
}), De = {
|
|
2637
2754
|
collectionName: "Reviews",
|
|
2638
2755
|
transform: {
|
|
2639
2756
|
_id: "oid",
|
|
2640
2757
|
businessId: "oid",
|
|
2641
2758
|
reviewerId: "oid",
|
|
2642
|
-
|
|
2643
|
-
},
|
|
2644
|
-
lookups: {
|
|
2645
|
-
reviewerId: {
|
|
2646
|
-
as: "reviewer",
|
|
2647
|
-
fromCollection: "UsersV2"
|
|
2648
|
-
},
|
|
2649
|
-
locationId: {
|
|
2650
|
-
as: "location",
|
|
2651
|
-
fromCollection: "Locations"
|
|
2652
|
-
}
|
|
2759
|
+
restaurantId: "oid"
|
|
2653
2760
|
}
|
|
2654
|
-
},
|
|
2761
|
+
}, w = e.enum([
|
|
2655
2762
|
"google",
|
|
2656
2763
|
"facebook",
|
|
2657
2764
|
"feedme",
|
|
2658
2765
|
"feedvibe"
|
|
2659
2766
|
]);
|
|
2660
|
-
|
|
2767
|
+
w.options;
|
|
2661
2768
|
e.enum(["google", "facebook"]);
|
|
2662
|
-
const
|
|
2769
|
+
const we = e.enum([
|
|
2663
2770
|
"createTime_desc",
|
|
2664
2771
|
"createTime_asc",
|
|
2665
2772
|
"rating_asc",
|
|
2666
2773
|
"rating_desc"
|
|
2667
2774
|
]);
|
|
2668
2775
|
e.object({
|
|
2669
|
-
source:
|
|
2776
|
+
source: w.array().optional(),
|
|
2670
2777
|
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
2671
2778
|
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
2672
2779
|
locationId: e.string().optional(),
|
|
2673
2780
|
excludeDeleted: e.boolean().optional(),
|
|
2674
|
-
sort:
|
|
2781
|
+
sort: we.optional(),
|
|
2675
2782
|
limit: e.coerce.number().int().positive().optional(),
|
|
2676
2783
|
skip: e.coerce.number().int().min(0).optional()
|
|
2677
2784
|
});
|
|
2678
|
-
const
|
|
2785
|
+
const it = e.object({
|
|
2786
|
+
averageScore: e.number(),
|
|
2787
|
+
total: e.number().int().nonnegative(),
|
|
2788
|
+
starCounts: e.array(
|
|
2789
|
+
e.object({
|
|
2790
|
+
star: e.number().int().min(1).max(5),
|
|
2791
|
+
count: e.number().int().nonnegative()
|
|
2792
|
+
})
|
|
2793
|
+
)
|
|
2794
|
+
}), _ = e.object({
|
|
2679
2795
|
name: e.string(),
|
|
2680
|
-
pictureUrl: e.string()
|
|
2681
|
-
|
|
2796
|
+
pictureUrl: e.string().optional(),
|
|
2797
|
+
phoneNumber: e.string().optional()
|
|
2798
|
+
}), Ae = _.extend({
|
|
2799
|
+
_id: e.string().optional()
|
|
2800
|
+
}), Fe = _.extend({
|
|
2801
|
+
_id: e.string()
|
|
2802
|
+
}), Me = _.extend({
|
|
2682
2803
|
isAnonymous: e.boolean().optional()
|
|
2683
|
-
}),
|
|
2804
|
+
}), Ge = _.extend({
|
|
2684
2805
|
id: e.string().optional()
|
|
2685
|
-
}),
|
|
2806
|
+
}), y = e.object({
|
|
2686
2807
|
_id: n,
|
|
2687
2808
|
comment: e.string(),
|
|
2688
2809
|
createTime: e.coerce.date(),
|
|
2689
2810
|
updateTime: e.coerce.date().nullish(),
|
|
2690
|
-
|
|
2691
|
-
|
|
2811
|
+
restaurantId: n,
|
|
2812
|
+
restaurantName: e.string()
|
|
2813
|
+
}), ke = y.extend({
|
|
2692
2814
|
source: e.literal("google"),
|
|
2693
2815
|
externalId: e.string().min(1),
|
|
2694
|
-
|
|
2695
|
-
|
|
2816
|
+
translatedComment: e.string().optional(),
|
|
2817
|
+
reviewer: Me.optional(),
|
|
2818
|
+
reply: h.optional(),
|
|
2696
2819
|
mediaItems: e.array(s),
|
|
2697
2820
|
starRating: e.number(),
|
|
2698
2821
|
locationName: e.string(),
|
|
2699
|
-
locationDisplayName: e.string()
|
|
2700
|
-
|
|
2822
|
+
locationDisplayName: e.string(),
|
|
2823
|
+
originalUrl: e.string().optional()
|
|
2824
|
+
}), Be = y.extend({
|
|
2701
2825
|
source: e.literal("facebook"),
|
|
2702
2826
|
externalId: e.string().min(1),
|
|
2703
|
-
reviewer:
|
|
2827
|
+
reviewer: Ge.optional(),
|
|
2704
2828
|
isPositive: e.boolean().optional(),
|
|
2705
2829
|
pageId: e.string(),
|
|
2706
2830
|
pageName: e.string()
|
|
2707
|
-
}),
|
|
2831
|
+
}), Ve = y.extend({
|
|
2708
2832
|
source: e.literal("feedme"),
|
|
2709
|
-
reviewer:
|
|
2710
|
-
reply:
|
|
2833
|
+
reviewer: Ae.optional(),
|
|
2834
|
+
reply: h.optional(),
|
|
2711
2835
|
starRating: e.number(),
|
|
2712
|
-
location: G.optional(),
|
|
2713
2836
|
mediaItems: e.array(s),
|
|
2714
2837
|
billId: e.string()
|
|
2715
|
-
}),
|
|
2838
|
+
}), Ye = y.extend({
|
|
2716
2839
|
source: e.literal("feedvibe"),
|
|
2717
2840
|
externalId: e.string().min(1),
|
|
2718
|
-
reviewer:
|
|
2841
|
+
reviewer: Fe.optional(),
|
|
2719
2842
|
rating: e.object({
|
|
2720
2843
|
overall: e.number(),
|
|
2721
2844
|
food: e.number(),
|
|
@@ -2726,58 +2849,64 @@ const R = e.object({
|
|
|
2726
2849
|
mediaItems: e.array(s).default([])
|
|
2727
2850
|
});
|
|
2728
2851
|
e.discriminatedUnion("source", [
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2852
|
+
ke,
|
|
2853
|
+
Be,
|
|
2854
|
+
Ve,
|
|
2855
|
+
Ye
|
|
2733
2856
|
]);
|
|
2734
2857
|
e.object({
|
|
2735
2858
|
comment: e.string(),
|
|
2736
2859
|
starRating: e.number(),
|
|
2737
2860
|
billId: e.string(),
|
|
2861
|
+
isAnonymous: e.boolean(),
|
|
2738
2862
|
mediaItems: e.array(s).optional()
|
|
2739
2863
|
});
|
|
2740
|
-
|
|
2864
|
+
e.object({
|
|
2865
|
+
name: e.string().trim().min(1),
|
|
2866
|
+
phoneNumber: e.string().trim().min(1).optional()
|
|
2867
|
+
});
|
|
2868
|
+
const f = e.object({
|
|
2741
2869
|
_id: n,
|
|
2742
2870
|
businessId: n,
|
|
2743
2871
|
comment: e.string(),
|
|
2744
2872
|
createTime: e.coerce.date(),
|
|
2745
2873
|
updateTime: e.coerce.date().nullish(),
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
// is resolved from the review-source location/page mapping at sync time.
|
|
2749
|
-
locationId: n,
|
|
2874
|
+
restaurantId: n,
|
|
2875
|
+
restaurantName: e.string(),
|
|
2750
2876
|
deletedAt: e.coerce.date().optional()
|
|
2751
|
-
}),
|
|
2877
|
+
}), We = f.extend({
|
|
2752
2878
|
source: e.literal("google"),
|
|
2753
2879
|
externalId: e.string().min(1),
|
|
2754
|
-
|
|
2755
|
-
|
|
2880
|
+
translatedComment: e.string().optional(),
|
|
2881
|
+
reviewer: Le.optional(),
|
|
2882
|
+
reply: h.optional(),
|
|
2756
2883
|
mediaItems: e.array(s),
|
|
2757
2884
|
starRating: e.number(),
|
|
2758
2885
|
locationName: e.string(),
|
|
2759
|
-
locationDisplayName: e.string()
|
|
2760
|
-
|
|
2886
|
+
locationDisplayName: e.string(),
|
|
2887
|
+
originalUrl: e.string().optional()
|
|
2888
|
+
}), Ke = f.extend({
|
|
2761
2889
|
source: e.literal("facebook"),
|
|
2762
2890
|
externalId: e.string().min(1),
|
|
2763
|
-
reviewer:
|
|
2891
|
+
reviewer: xe.optional(),
|
|
2764
2892
|
isPositive: e.boolean().optional(),
|
|
2765
2893
|
pageId: e.string(),
|
|
2766
2894
|
pageName: e.string()
|
|
2767
|
-
}),
|
|
2895
|
+
}), qe = f.extend({
|
|
2768
2896
|
source: e.literal("feedme"),
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2897
|
+
isAnonymous: e.boolean(),
|
|
2898
|
+
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
2899
|
+
reviewerId: n.optional(),
|
|
2900
|
+
reviewer: u.optional(),
|
|
2901
|
+
reply: h.optional(),
|
|
2772
2902
|
starRating: e.number(),
|
|
2773
2903
|
billId: e.string(),
|
|
2774
|
-
location: e.any().optional(),
|
|
2775
2904
|
mediaItems: e.array(s)
|
|
2776
|
-
}),
|
|
2905
|
+
}), Xe = f.extend({
|
|
2777
2906
|
source: e.literal("feedvibe"),
|
|
2778
2907
|
externalId: e.string().min(1),
|
|
2779
2908
|
reviewerId: n,
|
|
2780
|
-
reviewer:
|
|
2909
|
+
reviewer: u,
|
|
2781
2910
|
rating: e.object({
|
|
2782
2911
|
overall: e.number(),
|
|
2783
2912
|
food: e.number(),
|
|
@@ -2788,21 +2917,23 @@ const h = e.object({
|
|
|
2788
2917
|
mediaItems: e.array(s).default([])
|
|
2789
2918
|
});
|
|
2790
2919
|
e.discriminatedUnion("source", [
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
]).describe(m.describe(
|
|
2920
|
+
We,
|
|
2921
|
+
Ke,
|
|
2922
|
+
qe,
|
|
2923
|
+
Xe
|
|
2924
|
+
]).describe(m.describe(De));
|
|
2796
2925
|
export {
|
|
2797
|
-
|
|
2926
|
+
ae as F,
|
|
2798
2927
|
t as R,
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2928
|
+
ot as T,
|
|
2929
|
+
H as a,
|
|
2930
|
+
Ne as b,
|
|
2931
|
+
x as c,
|
|
2932
|
+
C as d,
|
|
2933
|
+
$ as e,
|
|
2934
|
+
Z as f,
|
|
2935
|
+
it as g,
|
|
2936
|
+
h,
|
|
2937
|
+
Y as i,
|
|
2938
|
+
q as s
|
|
2808
2939
|
};
|