@feedmepos/mf-connect 0.1.113-prod → 0.1.114-dev
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/README.md +66 -1
- package/dist/{App-2J4yDonr.js → App-CIWTDYuZ.js} +700 -654
- package/dist/AuditLogs-BluLDXu9.js +2016 -0
- package/dist/{Bin-BU_hVuxJ.js → Bin-jS6pM4L3.js} +8 -8
- package/dist/Broadcast-DBqsSZ0S.js +306 -0
- package/dist/{CampaignAnalytic-DUUmFMvy.js → CampaignAnalytic-DJrjXD4H.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BZirReIy.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CzwigRLi.js} +9 -9
- package/dist/{Card-DS2K_LFv.js → Card-B10nLilL.js} +25 -24
- package/dist/{Collections-BFdRdPHR.js → Collections-BN42A73p.js} +197 -185
- package/dist/{Credit-CODfiox3.js → Credit-0SS26HGE.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B2T5G1hZ.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B3wozBFs.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BRd5RVYe.js +4442 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-KvZebiOu.js → EffectSheet.vue_vue_type_style_index_0_lang-zV9dLCWp.js} +32 -32
- package/dist/{Experience-BGBWc8Ep.js → Experience-D7qPzsrc.js} +32 -31
- package/dist/{FileSaver.min-DJAN3Eu0.js → FileSaver.min-BKWoklMK.js} +1 -1
- package/dist/{Game-6yyn0uAd.js → Game-BoYMwfog.js} +19 -18
- package/dist/{GiftCardSetup-B096bTm0.js → GiftCardSetup-B87O0xzo.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-ChvUXdF-.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B3uGbEFY.js} +7 -7
- package/dist/{Goals-Db2mwbRo.js → Goals-CVxf3xCA.js} +4 -4
- package/dist/Grab-mGL1Mue_.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-xdEzwMcS.js → ImageInput.vue_vue_type_script_setup_true_lang-HipBZ1_T.js} +1 -1
- package/dist/{Index-580WNkG2.js → Index-Dptuy-6c.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BkAQXKNJ.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cjc4UeKz.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CR6sSnx4.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bh0ari3f.js} +1 -1
- package/dist/{LoyaltyDashboard-Clr2aiUP.js → LoyaltyDashboard-BxhI6RAE.js} +15 -15
- package/dist/MainLayout-YfDxvZXl.js +4 -0
- package/dist/{MainLayout-_iCyT5mw.js → MainLayout.vue_vue_type_script_setup_true_lang-BgXpznbi.js} +5 -4
- package/dist/{Marketing-fq1wxANq.js → Marketing-C2cVJacf.js} +4 -4
- package/dist/MarketingMaterialEdit-DkOEy_L-.js +1037 -0
- package/dist/{Member-BfRy196y.js → Member-DufbKDOh.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BAR44Qcp.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CU8EmBxy.js} +43 -50
- package/dist/{MemberImportHistory-C4622Ivs.js → MemberImportHistory-DlFN-uQl.js} +7 -7
- package/dist/{MemberList-DqtsMN_N.js → MemberList-B344n8I4.js} +103 -105
- package/dist/{MemberTransactions-DsUoFg3z.js → MemberTransactions-BS7H640M.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CzFMUgXM.js → MessageInput.vue_vue_type_script_setup_true_lang-CxDtXvwd.js} +4228 -4176
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CVQYcuQ6.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-lY0jlyOG.js} +1 -1
- package/dist/{Mission-B0GO4LiM.js → Mission-D2ed_oKn.js} +22 -21
- package/dist/{Overview-XpJJmHqs.js → Overview-CLh_T6YY.js} +145 -144
- package/dist/{Overview-CVITimwN.js → Overview-DJa-hXDC.js} +23 -22
- package/dist/{Point-B7aCrMkI.js → Point-DAPeg1VD.js} +22 -21
- package/dist/{Promotion-DfVcuXHy.js → Promotion-CPPCMMFl.js} +137 -131
- package/dist/{Queue-BT7O2cvj.js → Queue-BcPwCRcM.js} +47 -46
- package/dist/{Record-CAc030dz.js → Record-C5XKn--g.js} +9 -9
- package/dist/{Review-CyXo4GTY.js → Review-Cc51luIv.js} +2 -2
- package/dist/ReviewFacebookCallback-BSGInFB8.js +225 -0
- package/dist/{ReviewGoogleCallback-BxiFOl0B.js → ReviewGoogleCallback-C1gY4vcP.js} +5 -5
- package/dist/{Reward-ChfNtdwX.js → Reward-k1R3hLiF.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CpQu_QBQ.js → RewardGroup.vue_vue_type_script_setup_true_lang-BGbbGVK4.js} +16 -15
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Coh3L11L.js +1923 -0
- package/dist/{Segment-H2zBDZeh.js → Segment-DsBnIvje.js} +290 -291
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B0jCJ-Xq.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CMKpvXN-.js} +31 -30
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DW_ViNZM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-LyAtRMs8.js} +4 -4
- package/dist/Setting-BRueNgc4.js +574 -0
- package/dist/{SettingAdvertisements-DPQHP3-B.js → SettingAdvertisements-BrVcQyhF.js} +12 -12
- package/dist/Settings-fOvXd29Z.js +286 -0
- package/dist/{Store-B2f5HVQc.js → Store-rrh2pIHH.js} +661 -654
- package/dist/{StoreRewards-QxfaEt9f.js → StoreRewards-D-jivVKr.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CvQXsZbH.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DbnY9VE9.js +7007 -0
- package/dist/{Tier-BSk4rBm8.js → Tier-DJiLtw3M.js} +2576 -687
- package/dist/{Title-CIzpB8TT.js → Title-s0bzA7yZ.js} +94 -92
- package/dist/{Transaction-BjxxNEHa.js → Transaction-CQ-CJ_eh.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BMutYxOU.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bfy8SZH1.js} +26 -26
- package/dist/{Voucher-B2lFq21Y.js → Voucher-9vydRET7.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BWV631It.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Dq7veRL5.js} +16 -16
- package/dist/WhatsappAccount-D12Hvzfl.js +159 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BrZEDi6O.js +39 -0
- package/dist/WhatsappBot-o5b_0CnB.js +629 -0
- package/dist/WhatsappBotLogs-CK_V_iT5.js +372 -0
- package/dist/WhatsappBotSettings-BooibLUg.js +694 -0
- package/dist/WhatsappLayout-bOyNHGUI.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-Cytrffdh.js +253 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BCoB0Fsa.js → ZodTextField.vue_vue_type_script_setup_true_lang-96t_eUzk.js} +2 -2
- package/dist/{app-DgFVWdhA.js → app-DV3e2LkD.js} +10610 -8223
- package/dist/app.js +4 -3
- package/dist/{base.export-B6Rojjek.js → base.export-DQUUtGmy.js} +2 -2
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-C6ID0exl.js → business-BZ0boE-5.js} +1 -1
- package/dist/campaign-CsfFq2S-.js +400 -0
- package/dist/{campaign-BgSJXWdU.js → campaign-DMrtYWcs.js} +31 -25
- package/dist/{campaign.enum-CVvm0LMm.js → campaign.enum-Dx-Zo68Q.js} +3 -2
- package/dist/campaign.fn-C-CdNNdR.js +776 -0
- package/dist/{collectible.enum-DGQVW464.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-dV4F8R-j.js → collection.fn-C-rryKSc.js} +2 -2
- package/dist/{currency-DlHi_3WN.js → currency-BOd9iVZV.js} +1 -1
- package/dist/duplicateCampaign-ey_rW0Bz.js +51 -0
- package/dist/{effect-BJgmiWY4.js → effect-BP6Hkxmj.js} +1 -1
- package/dist/{email-addresses-3GTx_xTh.js → email-addresses-CO61QAq0.js} +2 -2
- package/dist/feature-flag-Bq1SgbYC.js +868 -0
- package/dist/feature-flag-lvPP0ED-.js +50 -0
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-BX0JQP06.js → helper-BRpts-M-.js} +1 -1
- package/dist/{index-BIpAzktM.js → index-03WIXl-H.js} +8 -7
- package/dist/{index-BeCKw7Y3.js → index-B0RavybO.js} +19 -6
- package/dist/{index-DeNbsrQx.js → index-BDNkoALK.js} +1 -1
- package/dist/{index-Bl5aHABH.js → index-BV5aPSYo.js} +11 -10
- package/dist/{index-Cnw0B8Lc.js → index-Bk20uvPY.js} +1 -1
- package/dist/index-Bn19rfby.js +14571 -0
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-nmw7_9ZE.js → index-Cj-eugzc.js} +1 -1
- package/dist/{index-uXgPJlic.js → index-CoROn5OA.js} +2700 -2613
- package/dist/{index-DdMVrWZy.js → index-CrBhcMaL.js} +8028 -10767
- package/dist/{index-2xed2K8D.js → index-CsBjAM3E.js} +4 -3
- package/dist/{index-CiFReW-F.js → index-D1t4_KaG.js} +1 -1
- package/dist/{index-DRNdJ_KC.js → index-D3wGTCWf.js} +8 -7
- package/dist/{index-CtBLnWVG.js → index-D41kjcrZ.js} +683 -581
- package/dist/{index-CNULhBPM.js → index-DIZLkVe0.js} +691 -230
- package/dist/{index-QaWLGgEC.js → index-DucKyzrD.js} +2 -2
- package/dist/{index-o2OQljHs.js → index-R5WS21OL.js} +4 -4
- package/dist/index-RwNlbTO8.js +115 -0
- package/dist/{index-R0qlOO6J.js → index-VYI0zWNC.js} +29 -15
- package/dist/index-ZRE89TKq.js +80 -0
- package/dist/{index-BHT6cvWA.js → index-_Cj-bsd_.js} +396 -232
- package/dist/{index-Y2Pu1YkB.js → index-mToWKHVs.js} +2 -2
- package/dist/{index.esm2017-Dum0onrS.js → index.esm2017-B_Sag8Pg.js} +209 -209
- package/dist/{loading-B2mSdkfy.js → loading-C5fVI0ry.js} +1 -1
- package/dist/{lodash-DtOypaKt.js → lodash-COo8_xCU.js} +1 -1
- package/dist/{member-import-C2pLnh44.js → member-import-I_pKwUfF.js} +6 -5
- package/dist/{membership-BWyBGF4n.js → membership-BgfH9Kva.js} +3 -3
- package/dist/{money-3lCCVCeP.js → money-Cr07YDlV.js} +1 -1
- package/dist/{number-zlqy2MLG.js → number-DFsj0dkh.js} +1 -1
- package/dist/objectid-Cu89BzwI.js +145 -0
- package/dist/{onboarding-BqD3B4M1.js → onboarding-DlkJCm-5.js} +25 -25
- package/dist/{onboardingSetup-CCQ90jg7.js → onboardingSetup-BEhVj613.js} +2 -2
- package/dist/{plugins-Bj3npYnL.js → plugins-CPTtiKqf.js} +3 -3
- package/dist/{MarketingMaterialEdit-0h7E0n5e.js → remy-icon-BhUGu2NI.js} +2 -1031
- package/dist/{reward-5dDuZEb7.js → reward-DqY0mQ_5.js} +1 -1
- package/dist/{rule-NqLeSyoO.js → rule-mJJ48eKw.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-C1QftpDG.js +188 -0
- package/dist/{timezone-B0lkgvh-.js → timezone-BBgBHels.js} +1 -1
- package/dist/{transaction.fn-CACuVUBe.js → transaction.fn-Sr0hj3kY.js} +2 -2
- package/dist/{trigger-BKJwKTJx.js → trigger-PUP0mwKM.js} +8 -8
- package/dist/{useMarketingMaterialActions-DERvOmen.js → useMarketingMaterialActions-faslwaHd.js} +3 -3
- package/dist/{usePagination-FkjroUq2.js → usePagination-Be6nIQ9y.js} +1 -1
- package/dist/{user-H9MnsLbu.js → user-DBSYzG_9.js} +1 -1
- package/dist/vue-i18n-C6c2jsH3.js +2365 -0
- package/dist/{xlsx-BVmtIl_i.js → xlsx-Bfo19lFv.js} +786 -786
- package/dist/{zod-DI7OBdxu.js → zod-CihbDg3N.js} +1 -1
- package/package.json +12 -3
- package/dist/Broadcast-CoirZUyr.js +0 -271
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DyIOw_HH.js +0 -2431
- package/dist/ReviewFacebookCallback--IcyheQA.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang--5K-qagY.js +0 -1883
- package/dist/Setting-D4XOHSHT.js +0 -2036
- package/dist/Settings-Dt_oLoGl.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Db2cd6ny.js +0 -1264
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D9L-AayN.js +0 -142
- package/dist/campaign-DDfFBFye.js +0 -228
- package/dist/campaign.fn-DRabv93K.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/index-CmhDYsk6.js +0 -51
- package/dist/objectid-b2KGvMA7.js +0 -145
- package/dist/rule-builder-BzYwbbj4.js +0 -102
- package/dist/template-fjUz6xrU.js +0 -236
- package/dist/vue-i18n-DbJO6sZW.js +0 -2365
|
@@ -1,11 +1,187 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { d as
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { F as n, m, b as A } from "./index-CrBhcMaL.js";
|
|
2
|
+
import { z as e } from "./index-C_H8jFYf.js";
|
|
3
|
+
import { l as M, m as F, n as G, o as g } from "./index-D41kjcrZ.js";
|
|
4
|
+
import { _ as k, l as v, f as B } from "./index-CoROn5OA.js";
|
|
5
|
+
import { i as p } from "./helper-BRpts-M-.js";
|
|
6
|
+
import { d as z, b as U, e as d } from "./index-Bn19rfby.js";
|
|
7
|
+
import { d as V } from "./index-_Cj-bsd_.js";
|
|
8
|
+
import { F as T } from "./index-D3wGTCWf.js";
|
|
9
|
+
function b(o, a) {
|
|
10
|
+
let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
11
|
+
const l = r.length;
|
|
12
|
+
for (let c = 0; c < o; c++)
|
|
13
|
+
i += r.charAt(Math.floor(Math.random() * l));
|
|
14
|
+
return i;
|
|
15
|
+
}
|
|
16
|
+
function H(o) {
|
|
17
|
+
return !o.property && "rules" in o;
|
|
18
|
+
}
|
|
19
|
+
function W(o) {
|
|
20
|
+
return "property" in o && !!o.property;
|
|
21
|
+
}
|
|
22
|
+
const Y = "g_schedule";
|
|
23
|
+
function K(o) {
|
|
24
|
+
return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
25
|
+
`).trim();
|
|
26
|
+
}
|
|
27
|
+
function q(o, a = !1) {
|
|
28
|
+
const i = k.cloneDeep(o);
|
|
29
|
+
if (W(i)) {
|
|
30
|
+
const r = i.conditions;
|
|
31
|
+
return !a && r && typeof r._rrule == "string" && (r._rrule = K(
|
|
32
|
+
r._rrule
|
|
33
|
+
)), i;
|
|
34
|
+
}
|
|
35
|
+
if (H(i))
|
|
36
|
+
for (const r in i.rules) {
|
|
37
|
+
const l = i.rules[r], c = a || H(l) && l.name === Y;
|
|
38
|
+
i.rules[r] = q(
|
|
39
|
+
l,
|
|
40
|
+
c
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return i;
|
|
44
|
+
}
|
|
45
|
+
class t {
|
|
46
|
+
static scaffoldGroup(a) {
|
|
47
|
+
return {
|
|
48
|
+
name: a ?? `g_${b(4)}`,
|
|
49
|
+
rules: {},
|
|
50
|
+
logic: ""
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static scaffoldEntry(a) {
|
|
54
|
+
return {
|
|
55
|
+
name: `r_${b(4)}`,
|
|
56
|
+
property: a ?? "",
|
|
57
|
+
conditions: {},
|
|
58
|
+
negated: !1
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static constructEntry(a, i, r, l) {
|
|
62
|
+
return {
|
|
63
|
+
name: l ?? `e_${b(4)}`,
|
|
64
|
+
property: a,
|
|
65
|
+
conditions: {
|
|
66
|
+
[i]: r
|
|
67
|
+
},
|
|
68
|
+
negated: !1
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static getLogic(a) {
|
|
72
|
+
return (a.logic ?? "").includes("||") ? "||" : "&&";
|
|
73
|
+
}
|
|
74
|
+
static constructLogic(a, i) {
|
|
75
|
+
const r = i ?? t.getLogic(a);
|
|
76
|
+
return Object.entries(a.rules).map(([l, c]) => H(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
77
|
+
}
|
|
78
|
+
static setRuleToGroup(a, i, r) {
|
|
79
|
+
let l = v.cloneDeep(a);
|
|
80
|
+
return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
|
|
81
|
+
l.rules[c.name] = c;
|
|
82
|
+
}) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
|
|
83
|
+
}
|
|
84
|
+
static removeEntry(a, i, r) {
|
|
85
|
+
const l = v.cloneDeep(a);
|
|
86
|
+
return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
|
|
87
|
+
}
|
|
88
|
+
static constructRule(a) {
|
|
89
|
+
switch (a.type) {
|
|
90
|
+
case "timeframe": {
|
|
91
|
+
const i = a.property, r = t.scaffoldGroup("timeframe"), l = [];
|
|
92
|
+
return (a.start || a.end) && l.push(
|
|
93
|
+
t.constructEntry(i, "_isBetween", {
|
|
94
|
+
start: a.start || void 0,
|
|
95
|
+
end: a.end || void 0
|
|
96
|
+
})
|
|
97
|
+
), t.setRuleToGroup(r, l, "&&");
|
|
98
|
+
}
|
|
99
|
+
default:
|
|
100
|
+
throw Error("invalid config type");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
static getRules(a) {
|
|
104
|
+
return a && "rules" in a ? Object.values(a.rules) : [];
|
|
105
|
+
}
|
|
106
|
+
static simplify(a) {
|
|
107
|
+
const [i] = Object.entries(a.conditions);
|
|
108
|
+
return i[0], {
|
|
109
|
+
property: a.property,
|
|
110
|
+
operator: i[0],
|
|
111
|
+
equator: i[1]
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
static isRuleExceed(a, i) {
|
|
115
|
+
const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
|
|
116
|
+
if (l > 10)
|
|
117
|
+
throw new X(10, l);
|
|
118
|
+
return !0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
class X extends Error {
|
|
122
|
+
constructor(a, i) {
|
|
123
|
+
super(
|
|
124
|
+
`Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
|
|
125
|
+
), this.name = "MaxRulesExceededError";
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
const Q = {
|
|
129
|
+
collectionName: "AuditLogs",
|
|
130
|
+
transform: {
|
|
131
|
+
_id: "oid",
|
|
132
|
+
business: "oid",
|
|
133
|
+
timestamp: "date"
|
|
134
|
+
},
|
|
135
|
+
lookups: {
|
|
136
|
+
business: {
|
|
137
|
+
as: "pf_business",
|
|
138
|
+
fromCollection: "Businesses"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}, $ = e.enum([
|
|
142
|
+
"GET",
|
|
143
|
+
"POST",
|
|
144
|
+
"PUT",
|
|
145
|
+
"PATCH",
|
|
146
|
+
"DELETE",
|
|
147
|
+
"OPTIONS",
|
|
148
|
+
"HEAD",
|
|
149
|
+
"ALL"
|
|
150
|
+
]), Z = e.enum([
|
|
151
|
+
"CAMPAIGN",
|
|
152
|
+
"LOCATION",
|
|
153
|
+
"MARKETING MATERIALS",
|
|
154
|
+
"MEMBERSHIP",
|
|
155
|
+
"STORE",
|
|
156
|
+
"TRANSACTION",
|
|
157
|
+
"SETTINGS",
|
|
158
|
+
"SEGMENTATION",
|
|
159
|
+
"USER"
|
|
160
|
+
]), ee = e.object({
|
|
161
|
+
httpMethod: $,
|
|
162
|
+
url: e.string().min(1),
|
|
163
|
+
userAgent: e.string(),
|
|
164
|
+
host: e.string().min(1),
|
|
165
|
+
params: e.object({}).passthrough().nullish(),
|
|
166
|
+
query: e.object({}).passthrough().nullish(),
|
|
167
|
+
body: e.object({}).passthrough().nullish()
|
|
168
|
+
}), te = e.object({
|
|
169
|
+
statusCode: e.number().int().min(100).max(599),
|
|
170
|
+
body: e.object({}).passthrough().nullish()
|
|
171
|
+
});
|
|
172
|
+
e.object({
|
|
173
|
+
_id: n,
|
|
174
|
+
user: e.string().length(28),
|
|
175
|
+
userName: e.string().min(1),
|
|
176
|
+
userPhoneNumber: e.string().refine((o) => M(o)).nullish(),
|
|
177
|
+
moduleType: Z,
|
|
178
|
+
business: n.nullish(),
|
|
179
|
+
clientIp: e.string().nullish(),
|
|
180
|
+
timestamp: e.string().datetime(),
|
|
181
|
+
request: ee,
|
|
182
|
+
response: te
|
|
183
|
+
}).describe(m.describe(Q));
|
|
184
|
+
const it = {
|
|
9
185
|
PROMOTION: {
|
|
10
186
|
name: "Promotion Template",
|
|
11
187
|
description: "Promotion template for campaign creation.",
|
|
@@ -411,7 +587,7 @@ const Ee = {
|
|
|
411
587
|
// },
|
|
412
588
|
hideInApp: !0
|
|
413
589
|
},
|
|
414
|
-
configs:
|
|
590
|
+
configs: p("VOUCHER", {
|
|
415
591
|
name: "",
|
|
416
592
|
business: null,
|
|
417
593
|
noCampaign: !1
|
|
@@ -1401,7 +1577,7 @@ const Ee = {
|
|
|
1401
1577
|
rewards: []
|
|
1402
1578
|
}
|
|
1403
1579
|
},
|
|
1404
|
-
configs:
|
|
1580
|
+
configs: p("GAME", {
|
|
1405
1581
|
name: "Token",
|
|
1406
1582
|
business: null,
|
|
1407
1583
|
noCampaign: !1
|
|
@@ -1642,18 +1818,184 @@ const Ee = {
|
|
|
1642
1818
|
type: "timeframe"
|
|
1643
1819
|
}
|
|
1644
1820
|
},
|
|
1645
|
-
configs:
|
|
1821
|
+
configs: p("STAMP", {
|
|
1646
1822
|
business: null,
|
|
1647
1823
|
noCampaign: !1
|
|
1648
1824
|
})
|
|
1649
1825
|
}
|
|
1826
|
+
},
|
|
1827
|
+
GRAB: {
|
|
1828
|
+
name: "Grab Campaign Template",
|
|
1829
|
+
description: "Grab campaign template for campaign creation.",
|
|
1830
|
+
steps: [
|
|
1831
|
+
{
|
|
1832
|
+
name: "connect.template.general_information",
|
|
1833
|
+
groups: [
|
|
1834
|
+
{
|
|
1835
|
+
name: "connect.template.general",
|
|
1836
|
+
fields: [
|
|
1837
|
+
{
|
|
1838
|
+
label: "connect.template.campaign_name",
|
|
1839
|
+
property: "campaign.name",
|
|
1840
|
+
type: "text"
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
label: "connect.template.campaign_period",
|
|
1844
|
+
property: "campaign.timeframeOptions",
|
|
1845
|
+
type: "timeframe"
|
|
1846
|
+
}
|
|
1847
|
+
]
|
|
1848
|
+
}
|
|
1849
|
+
]
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
name: "connect.template.discount",
|
|
1853
|
+
groups: [
|
|
1854
|
+
{
|
|
1855
|
+
name: "connect.template.discount",
|
|
1856
|
+
fields: [
|
|
1857
|
+
{
|
|
1858
|
+
label: void 0,
|
|
1859
|
+
property: "campaign.discount",
|
|
1860
|
+
type: "grab_effect"
|
|
1861
|
+
}
|
|
1862
|
+
]
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
name: "connect.template.grab_quota",
|
|
1866
|
+
fields: [
|
|
1867
|
+
{
|
|
1868
|
+
label: void 0,
|
|
1869
|
+
property: "campaign.quotas",
|
|
1870
|
+
type: "grab_quota"
|
|
1871
|
+
}
|
|
1872
|
+
]
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
name: "connect.template.grab_condition",
|
|
1876
|
+
fields: [
|
|
1877
|
+
{
|
|
1878
|
+
label: void 0,
|
|
1879
|
+
property: "campaign.conditions",
|
|
1880
|
+
type: "grab_conditions"
|
|
1881
|
+
}
|
|
1882
|
+
]
|
|
1883
|
+
}
|
|
1884
|
+
]
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
name: "connect.template.terms_conditions",
|
|
1888
|
+
groups: [
|
|
1889
|
+
{
|
|
1890
|
+
name: "Location",
|
|
1891
|
+
fields: [
|
|
1892
|
+
{
|
|
1893
|
+
label: "Target location",
|
|
1894
|
+
property: "campaign.targetLocation",
|
|
1895
|
+
type: "target_location"
|
|
1896
|
+
}
|
|
1897
|
+
]
|
|
1898
|
+
}
|
|
1899
|
+
]
|
|
1900
|
+
}
|
|
1901
|
+
],
|
|
1902
|
+
defaultValue: {
|
|
1903
|
+
templateId: "",
|
|
1904
|
+
campaign: {
|
|
1905
|
+
type: "GRAB",
|
|
1906
|
+
templateId: "",
|
|
1907
|
+
name: "",
|
|
1908
|
+
description: "",
|
|
1909
|
+
image: "",
|
|
1910
|
+
discount: null,
|
|
1911
|
+
group: null,
|
|
1912
|
+
event: {
|
|
1913
|
+
type: "MAKING_ORDER",
|
|
1914
|
+
rule: t.scaffoldGroup()
|
|
1915
|
+
},
|
|
1916
|
+
quotas: {
|
|
1917
|
+
totalCount: 10,
|
|
1918
|
+
totalCountPerUser: 2
|
|
1919
|
+
},
|
|
1920
|
+
conditions: {
|
|
1921
|
+
startTime: "",
|
|
1922
|
+
endTime: "",
|
|
1923
|
+
eaterType: "all",
|
|
1924
|
+
minBasketAmount: 10,
|
|
1925
|
+
bundleQuantity: 2,
|
|
1926
|
+
workingHour: {
|
|
1927
|
+
sun: {
|
|
1928
|
+
periods: [
|
|
1929
|
+
{
|
|
1930
|
+
startTime: "11:30",
|
|
1931
|
+
endTime: "14:00"
|
|
1932
|
+
}
|
|
1933
|
+
]
|
|
1934
|
+
},
|
|
1935
|
+
mon: {
|
|
1936
|
+
periods: [
|
|
1937
|
+
{
|
|
1938
|
+
startTime: "11:30",
|
|
1939
|
+
endTime: "14:00"
|
|
1940
|
+
}
|
|
1941
|
+
]
|
|
1942
|
+
},
|
|
1943
|
+
tue: {
|
|
1944
|
+
periods: [
|
|
1945
|
+
{
|
|
1946
|
+
startTime: "11:30",
|
|
1947
|
+
endTime: "14:00"
|
|
1948
|
+
}
|
|
1949
|
+
]
|
|
1950
|
+
},
|
|
1951
|
+
wed: {
|
|
1952
|
+
periods: [
|
|
1953
|
+
{
|
|
1954
|
+
startTime: "11:30",
|
|
1955
|
+
endTime: "14:00"
|
|
1956
|
+
}
|
|
1957
|
+
]
|
|
1958
|
+
},
|
|
1959
|
+
thu: {
|
|
1960
|
+
periods: [
|
|
1961
|
+
{
|
|
1962
|
+
startTime: "11:30",
|
|
1963
|
+
endTime: "14:00"
|
|
1964
|
+
}
|
|
1965
|
+
]
|
|
1966
|
+
},
|
|
1967
|
+
fri: {
|
|
1968
|
+
periods: [
|
|
1969
|
+
{
|
|
1970
|
+
startTime: "11:30",
|
|
1971
|
+
endTime: "14:00"
|
|
1972
|
+
}
|
|
1973
|
+
]
|
|
1974
|
+
},
|
|
1975
|
+
sat: {
|
|
1976
|
+
periods: [
|
|
1977
|
+
{
|
|
1978
|
+
startTime: "11:30",
|
|
1979
|
+
endTime: "14:00"
|
|
1980
|
+
}
|
|
1981
|
+
]
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
targetLocation: null,
|
|
1986
|
+
timeframeOptions: {
|
|
1987
|
+
type: "timeframe",
|
|
1988
|
+
property: "__now"
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1650
1992
|
}
|
|
1651
1993
|
};
|
|
1652
|
-
t.scaffoldGroup(),
|
|
1994
|
+
t.scaffoldGroup(), p("STAMP", {
|
|
1653
1995
|
business: null,
|
|
1654
1996
|
noCampaign: !1
|
|
1655
1997
|
});
|
|
1656
|
-
const
|
|
1998
|
+
const lt = {
|
|
1657
1999
|
_id: "",
|
|
1658
2000
|
intention: [],
|
|
1659
2001
|
name: "Spend and get voucher",
|
|
@@ -2051,7 +2393,7 @@ const Oe = {
|
|
|
2051
2393
|
amount: 1
|
|
2052
2394
|
}
|
|
2053
2395
|
},
|
|
2054
|
-
configs:
|
|
2396
|
+
configs: p("VOUCHER", {
|
|
2055
2397
|
name: "",
|
|
2056
2398
|
business: null,
|
|
2057
2399
|
noCampaign: !1
|
|
@@ -2060,7 +2402,7 @@ const Oe = {
|
|
|
2060
2402
|
};
|
|
2061
2403
|
({
|
|
2062
2404
|
...t.scaffoldGroup()
|
|
2063
|
-
},
|
|
2405
|
+
}, p("VOUCHER", {
|
|
2064
2406
|
name: "",
|
|
2065
2407
|
business: null,
|
|
2066
2408
|
noCampaign: !1
|
|
@@ -2071,7 +2413,7 @@ const Oe = {
|
|
|
2071
2413
|
({
|
|
2072
2414
|
...t.scaffoldGroup()
|
|
2073
2415
|
});
|
|
2074
|
-
const
|
|
2416
|
+
const rt = {
|
|
2075
2417
|
_id: "",
|
|
2076
2418
|
intention: [],
|
|
2077
2419
|
name: "Spend and earn points",
|
|
@@ -2446,7 +2788,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2446
2788
|
});
|
|
2447
2789
|
({
|
|
2448
2790
|
...t.scaffoldGroup()
|
|
2449
|
-
},
|
|
2791
|
+
}, p("VOUCHER", {
|
|
2450
2792
|
name: "",
|
|
2451
2793
|
business: null,
|
|
2452
2794
|
noCampaign: !1
|
|
@@ -2492,12 +2834,12 @@ t.setRuleToGroup(
|
|
|
2492
2834
|
"&&"
|
|
2493
2835
|
)
|
|
2494
2836
|
);
|
|
2495
|
-
t.scaffoldGroup(), t.scaffoldGroup(),
|
|
2837
|
+
t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
|
|
2496
2838
|
name: "Token",
|
|
2497
2839
|
business: null,
|
|
2498
2840
|
noCampaign: !1
|
|
2499
2841
|
});
|
|
2500
|
-
const
|
|
2842
|
+
const ct = {
|
|
2501
2843
|
_id: "",
|
|
2502
2844
|
intention: [],
|
|
2503
2845
|
name: "Welcome voucher",
|
|
@@ -2843,7 +3185,7 @@ const Re = {
|
|
|
2843
3185
|
amount: 1
|
|
2844
3186
|
}
|
|
2845
3187
|
},
|
|
2846
|
-
configs:
|
|
3188
|
+
configs: p("VOUCHER", {
|
|
2847
3189
|
name: "",
|
|
2848
3190
|
business: null,
|
|
2849
3191
|
noCampaign: !1
|
|
@@ -2874,7 +3216,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2874
3216
|
],
|
|
2875
3217
|
"&&"
|
|
2876
3218
|
)
|
|
2877
|
-
]),
|
|
3219
|
+
]), p("VOUCHER", {
|
|
2878
3220
|
name: "",
|
|
2879
3221
|
business: null,
|
|
2880
3222
|
noCampaign: !1
|
|
@@ -2897,7 +3239,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2897
3239
|
({
|
|
2898
3240
|
...t.scaffoldGroup()
|
|
2899
3241
|
});
|
|
2900
|
-
const
|
|
3242
|
+
const ae = e.enum([
|
|
2901
3243
|
"MEMBER_REWARD",
|
|
2902
3244
|
"PAID_LOYALTY",
|
|
2903
3245
|
"COLLECT_FEEDBACK",
|
|
@@ -2907,7 +3249,7 @@ const O = e.enum([
|
|
|
2907
3249
|
"BROADCAST",
|
|
2908
3250
|
"BIRTHDAY",
|
|
2909
3251
|
"GAME"
|
|
2910
|
-
]),
|
|
3252
|
+
]), ne = e.enum([
|
|
2911
3253
|
"text",
|
|
2912
3254
|
"number",
|
|
2913
3255
|
"textarea",
|
|
@@ -2933,115 +3275,220 @@ const O = e.enum([
|
|
|
2933
3275
|
"rule_bill",
|
|
2934
3276
|
"rule_feedback",
|
|
2935
3277
|
"rule_birthday",
|
|
2936
|
-
"promotion_game_type"
|
|
2937
|
-
|
|
3278
|
+
"promotion_game_type",
|
|
3279
|
+
"grab_effect",
|
|
3280
|
+
"grab_quota",
|
|
3281
|
+
"grab_conditions"
|
|
3282
|
+
]), oe = e.object({
|
|
2938
3283
|
label: e.string().optional(),
|
|
2939
3284
|
label_locale: e.record(e.string()).nullish(),
|
|
2940
3285
|
property: e.string().or(e.any()),
|
|
2941
|
-
type:
|
|
3286
|
+
type: ne,
|
|
2942
3287
|
extras: e.string().optional(),
|
|
2943
3288
|
isRuleChildren: e.boolean().optional()
|
|
2944
|
-
}),
|
|
3289
|
+
}), S = e.object({
|
|
2945
3290
|
not: e.boolean().optional(),
|
|
2946
3291
|
property: e.string(),
|
|
2947
3292
|
value: e.any()
|
|
2948
|
-
}),
|
|
3293
|
+
}), ie = e.object({
|
|
2949
3294
|
name: e.string().optional(),
|
|
2950
3295
|
name_locale: e.record(e.string()).nullish(),
|
|
2951
|
-
fields: e.array(
|
|
2952
|
-
condition:
|
|
2953
|
-
e.array(
|
|
3296
|
+
fields: e.array(oe),
|
|
3297
|
+
condition: S.optional().or(
|
|
3298
|
+
e.array(S)
|
|
2954
3299
|
)
|
|
2955
|
-
}),
|
|
3300
|
+
}), le = e.object({
|
|
2956
3301
|
name: e.string(),
|
|
2957
3302
|
name_locale: e.record(e.string()).nullish(),
|
|
2958
|
-
groups: e.array(
|
|
3303
|
+
groups: e.array(ie)
|
|
2959
3304
|
});
|
|
2960
3305
|
e.object({
|
|
2961
|
-
_id:
|
|
3306
|
+
_id: n,
|
|
2962
3307
|
name: e.string(),
|
|
2963
3308
|
name_locale: e.record(e.string()).nullish(),
|
|
2964
3309
|
description: e.string().nullish(),
|
|
2965
3310
|
description_locale: e.record(e.string()).nullish(),
|
|
2966
|
-
steps: e.array(
|
|
2967
|
-
intention: e.array(
|
|
3311
|
+
steps: e.array(le).min(1),
|
|
3312
|
+
intention: e.array(ae),
|
|
2968
3313
|
defaultValue: e.any()
|
|
2969
3314
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2970
|
-
const
|
|
3315
|
+
const re = {
|
|
2971
3316
|
collectionName: "Businesses",
|
|
2972
3317
|
transform: {
|
|
2973
3318
|
_id: "oid"
|
|
2974
3319
|
}
|
|
2975
3320
|
};
|
|
2976
3321
|
e.object({
|
|
2977
|
-
_id:
|
|
3322
|
+
_id: n,
|
|
2978
3323
|
ownerId: e.string(),
|
|
2979
3324
|
name: e.string(),
|
|
2980
3325
|
credit: e.number(),
|
|
2981
3326
|
forceSend: e.boolean().optional()
|
|
2982
|
-
}).describe(
|
|
2983
|
-
const
|
|
3327
|
+
}).describe(m.describe(re));
|
|
3328
|
+
const P = e.enum(["PHONE"]), ce = e.enum([
|
|
2984
3329
|
"MOCEAN",
|
|
2985
3330
|
"SLACK",
|
|
2986
3331
|
"SMS",
|
|
2987
3332
|
"EMAIL",
|
|
2988
3333
|
"WHATSAPP"
|
|
2989
|
-
]),
|
|
3334
|
+
]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
|
|
2990
3335
|
"General",
|
|
2991
3336
|
"Otp",
|
|
2992
3337
|
"Marketing",
|
|
2993
3338
|
"Ordering",
|
|
2994
3339
|
"MemberInvitation",
|
|
2995
3340
|
"MarketingPromotion"
|
|
2996
|
-
]),
|
|
2997
|
-
type:
|
|
2998
|
-
}),
|
|
2999
|
-
type: e.literal(
|
|
3000
|
-
provider:
|
|
3001
|
-
usage:
|
|
3002
|
-
}),
|
|
3341
|
+
]), se = e.object({
|
|
3342
|
+
type: P
|
|
3343
|
+
}), j = se.extend({
|
|
3344
|
+
type: e.literal(P.enum.PHONE),
|
|
3345
|
+
provider: ce,
|
|
3346
|
+
usage: me.optional()
|
|
3347
|
+
}), E = e.enum([
|
|
3348
|
+
"Accepted",
|
|
3349
|
+
"PartiallyAccepted",
|
|
3350
|
+
"Queued",
|
|
3351
|
+
"Unknown",
|
|
3352
|
+
"Failed"
|
|
3353
|
+
]), ge = e.enum([
|
|
3354
|
+
"PENDING",
|
|
3355
|
+
"SUBMITTED",
|
|
3356
|
+
"SETTLED",
|
|
3357
|
+
"FAILED"
|
|
3358
|
+
]), J = e.object({
|
|
3359
|
+
channel: e.string(),
|
|
3360
|
+
status: e.string(),
|
|
3361
|
+
statusDetails: e.string().nullish()
|
|
3362
|
+
}), de = {
|
|
3003
3363
|
collectionName: "Notifications",
|
|
3004
|
-
transform: {
|
|
3364
|
+
transform: {
|
|
3365
|
+
_id: "oid",
|
|
3366
|
+
business: "oid",
|
|
3367
|
+
campaign: "oid",
|
|
3368
|
+
member: "oid"
|
|
3369
|
+
}
|
|
3005
3370
|
};
|
|
3006
3371
|
e.object({
|
|
3007
|
-
_id:
|
|
3008
|
-
business:
|
|
3009
|
-
|
|
3372
|
+
_id: n,
|
|
3373
|
+
business: n,
|
|
3374
|
+
status: pe,
|
|
3375
|
+
ref: e.string().optional(),
|
|
3010
3376
|
title: e.string().optional(),
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3377
|
+
// Single-channel fields. Absent on multi-channel dispatches, which carry
|
|
3378
|
+
// their content per channel in the submitted request instead.
|
|
3379
|
+
target: e.string().optional(),
|
|
3380
|
+
message: e.string().optional(),
|
|
3381
|
+
option: j.optional(),
|
|
3382
|
+
// Multi-channel dispatch fields.
|
|
3383
|
+
campaign: n.nullish(),
|
|
3384
|
+
member: n.nullish(),
|
|
3385
|
+
/**
|
|
3386
|
+
* The scheduled run this dispatch belongs to. With campaign and member it
|
|
3387
|
+
* identifies one intended send, so a redelivered queue job is recognised
|
|
3388
|
+
* rather than sent twice.
|
|
3389
|
+
*/
|
|
3390
|
+
runAt: e.coerce.date().nullish(),
|
|
3391
|
+
mode: z.nullish(),
|
|
3392
|
+
channels: e.array(U).nullish(),
|
|
3393
|
+
/**
|
|
3394
|
+
* Local submission state, kept separate from the upstream outcome so an
|
|
3395
|
+
* interrupted worker can tell "never sent" from "sent, result unknown".
|
|
3396
|
+
*/
|
|
3397
|
+
state: ge.nullish(),
|
|
3398
|
+
outcome: E.nullish(),
|
|
3399
|
+
/** Upstream correlation id, preserved even when the request failed. */
|
|
3400
|
+
requestId: e.string().nullish(),
|
|
3401
|
+
attempts: e.array(J).nullish(),
|
|
3402
|
+
/** Credit consumed upstream, recorded for reconciliation. */
|
|
3403
|
+
creditUsed: d.nullish(),
|
|
3404
|
+
balanceAfter: d.nullish(),
|
|
3405
|
+
error: e.string().nullish(),
|
|
3406
|
+
createdAt: e.coerce.date().nullish(),
|
|
3407
|
+
submittedAt: e.coerce.date().nullish(),
|
|
3408
|
+
settledAt: e.coerce.date().nullish()
|
|
3409
|
+
}).describe(m.describe(de));
|
|
3410
|
+
const ue = e.object({
|
|
3017
3411
|
target: e.string(),
|
|
3018
3412
|
title: e.string().optional(),
|
|
3019
3413
|
message: e.string(),
|
|
3020
|
-
option:
|
|
3414
|
+
option: j,
|
|
3021
3415
|
ref: e.string().optional()
|
|
3416
|
+
}), he = e.object({
|
|
3417
|
+
memberId: e.string(),
|
|
3418
|
+
name: e.string().nullish(),
|
|
3419
|
+
phoneNumber: e.string().nullish(),
|
|
3420
|
+
email: e.string().nullish(),
|
|
3421
|
+
/**
|
|
3422
|
+
* Shared Firebase uid required by App Inbox and Push, sourced from
|
|
3423
|
+
* `FdoUserV2.externalMemberId`. Optional there, so it can legitimately be
|
|
3424
|
+
* absent for a member; upstream decides what that means for a channel.
|
|
3425
|
+
*/
|
|
3426
|
+
firebaseUid: e.string().nullish()
|
|
3427
|
+
});
|
|
3428
|
+
e.object({
|
|
3429
|
+
businessId: e.string(),
|
|
3430
|
+
forceSend: e.boolean(),
|
|
3431
|
+
mode: z,
|
|
3432
|
+
channels: e.array(
|
|
3433
|
+
e.enum(["SMS", "WHATSAPP", "EMAIL", "APP_INBOX", "PUSH_NOTIFICATION"])
|
|
3434
|
+
),
|
|
3435
|
+
metadata: e.object({
|
|
3436
|
+
source: e.string(),
|
|
3437
|
+
refValue: e.string()
|
|
3438
|
+
}),
|
|
3439
|
+
content: e.record(e.string(), e.unknown())
|
|
3022
3440
|
});
|
|
3023
3441
|
e.object({
|
|
3442
|
+
requestId: e.string().nullish(),
|
|
3443
|
+
status: E.nullish(),
|
|
3444
|
+
attempts: e.array(J).nullish(),
|
|
3445
|
+
creditUsed: d.nullish(),
|
|
3446
|
+
balance: d.nullish()
|
|
3447
|
+
});
|
|
3448
|
+
const _e = e.object({
|
|
3024
3449
|
campaignId: e.string(),
|
|
3025
|
-
|
|
3026
|
-
|
|
3450
|
+
business: e.string(),
|
|
3451
|
+
runAt: e.coerce.date(),
|
|
3452
|
+
recipient: he,
|
|
3453
|
+
/** Personalised, editor-data-free content keyed by channel. */
|
|
3454
|
+
content: e.record(e.string(), e.unknown()),
|
|
3455
|
+
mode: z,
|
|
3456
|
+
channels: e.array(U)
|
|
3457
|
+
});
|
|
3458
|
+
e.object({
|
|
3459
|
+
campaignId: e.string(),
|
|
3460
|
+
/** Absent only on multi-channel jobs, which carry `dispatch` instead. */
|
|
3461
|
+
notification: ue.optional(),
|
|
3462
|
+
business: e.string(),
|
|
3463
|
+
/**
|
|
3464
|
+
* Present only for multi-channel broadcasts. When set the job takes the
|
|
3465
|
+
* multi-channel dispatch path; when absent the legacy single-channel path
|
|
3466
|
+
* runs unchanged.
|
|
3467
|
+
*/
|
|
3468
|
+
dispatch: _e.optional()
|
|
3469
|
+
}).superRefine((o, a) => {
|
|
3470
|
+
!o.notification && !o.dispatch && a.addIssue({
|
|
3471
|
+
code: e.ZodIssueCode.custom,
|
|
3472
|
+
message: "Job must carry either a notification or a dispatch"
|
|
3473
|
+
});
|
|
3027
3474
|
});
|
|
3028
3475
|
e.object({
|
|
3029
3476
|
phone: e.string(),
|
|
3030
3477
|
message: e.string()
|
|
3031
3478
|
});
|
|
3032
|
-
const
|
|
3479
|
+
const N = e.object({
|
|
3033
3480
|
name: e.string().optional(),
|
|
3034
3481
|
address: e.string()
|
|
3035
|
-
}),
|
|
3482
|
+
}), ye = e.object({
|
|
3036
3483
|
filename: e.string(),
|
|
3037
3484
|
content: e.instanceof(Uint8Array)
|
|
3038
3485
|
});
|
|
3039
3486
|
e.object({
|
|
3040
|
-
from:
|
|
3041
|
-
to: e.array(
|
|
3487
|
+
from: N.optional(),
|
|
3488
|
+
to: e.array(N),
|
|
3042
3489
|
subject: e.string(),
|
|
3043
3490
|
html: e.string().optional(),
|
|
3044
|
-
attachments: e.array(
|
|
3491
|
+
attachments: e.array(ye).optional()
|
|
3045
3492
|
});
|
|
3046
3493
|
e.object({
|
|
3047
3494
|
subject: e.string(),
|
|
@@ -3081,7 +3528,7 @@ e.object({
|
|
|
3081
3528
|
billId: e.string()
|
|
3082
3529
|
});
|
|
3083
3530
|
e.object({
|
|
3084
|
-
amount:
|
|
3531
|
+
amount: A,
|
|
3085
3532
|
member: e.string(),
|
|
3086
3533
|
bill: e.string(),
|
|
3087
3534
|
otp: e.string().nullish(),
|
|
@@ -3090,15 +3537,15 @@ e.object({
|
|
|
3090
3537
|
e.object({
|
|
3091
3538
|
orderId: e.string()
|
|
3092
3539
|
});
|
|
3093
|
-
var
|
|
3094
|
-
e.nativeEnum(
|
|
3540
|
+
var O = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(O || {});
|
|
3541
|
+
e.nativeEnum(O);
|
|
3095
3542
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
3096
3543
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
3097
3544
|
e.enum(["quota"]);
|
|
3098
|
-
var
|
|
3099
|
-
e.nativeEnum(
|
|
3545
|
+
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 || {});
|
|
3546
|
+
e.nativeEnum(I);
|
|
3100
3547
|
e.enum(["restaurant"]);
|
|
3101
|
-
const
|
|
3548
|
+
const fe = e.object({
|
|
3102
3549
|
label: e.string(),
|
|
3103
3550
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
3104
3551
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -3108,41 +3555,41 @@ const V = e.object({
|
|
|
3108
3555
|
reason: e.string().optional()
|
|
3109
3556
|
});
|
|
3110
3557
|
e.object({
|
|
3111
|
-
_id:
|
|
3558
|
+
_id: n,
|
|
3112
3559
|
businessId: e.string(),
|
|
3113
3560
|
userId: e.string(),
|
|
3114
3561
|
email: e.string().nullish(),
|
|
3115
3562
|
phoneNo: e.string().nullish(),
|
|
3116
|
-
permissions: e.array(e.lazy(() =>
|
|
3563
|
+
permissions: e.array(e.lazy(() => fe))
|
|
3117
3564
|
}).describe(
|
|
3118
|
-
|
|
3565
|
+
m.describe({
|
|
3119
3566
|
collectionName: "PermissionUsers",
|
|
3120
3567
|
transform: {
|
|
3121
3568
|
_id: "oid"
|
|
3122
3569
|
}
|
|
3123
3570
|
})
|
|
3124
3571
|
);
|
|
3125
|
-
const
|
|
3572
|
+
const R = e.object({
|
|
3126
3573
|
userId: e.string(),
|
|
3127
3574
|
level: e.number(),
|
|
3128
3575
|
role: e.string().optional(),
|
|
3129
3576
|
businessId: e.string().optional(),
|
|
3130
3577
|
restaurantId: e.string().optional()
|
|
3131
|
-
}),
|
|
3578
|
+
}), be = e.function().args(e.any(), R).returns(e.boolean()), He = e.function().args(R).returns(e.promise(e.array(e.any())));
|
|
3132
3579
|
e.object({
|
|
3133
|
-
isAdmin:
|
|
3134
|
-
getRules:
|
|
3580
|
+
isAdmin: be,
|
|
3581
|
+
getRules: He
|
|
3135
3582
|
});
|
|
3136
3583
|
e.object({
|
|
3137
|
-
transactions: e.array(
|
|
3138
|
-
collections: e.array(
|
|
3584
|
+
transactions: e.array(F),
|
|
3585
|
+
collections: e.array(G)
|
|
3139
3586
|
});
|
|
3140
|
-
const
|
|
3587
|
+
const L = e.enum([
|
|
3141
3588
|
"ROCK_PAPER_SCISSOR"
|
|
3142
3589
|
]);
|
|
3143
|
-
|
|
3590
|
+
L.enum.ROCK_PAPER_SCISSOR + "";
|
|
3144
3591
|
e.object({
|
|
3145
|
-
type:
|
|
3592
|
+
type: L
|
|
3146
3593
|
});
|
|
3147
3594
|
e.object({
|
|
3148
3595
|
host: e.string().url(),
|
|
@@ -3151,7 +3598,7 @@ e.object({
|
|
|
3151
3598
|
roomId: e.string()
|
|
3152
3599
|
});
|
|
3153
3600
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
3154
|
-
const
|
|
3601
|
+
const ze = {
|
|
3155
3602
|
collectionName: "MarketingMaterials",
|
|
3156
3603
|
transform: {
|
|
3157
3604
|
_id: "oid",
|
|
@@ -3159,13 +3606,13 @@ const K = {
|
|
|
3159
3606
|
}
|
|
3160
3607
|
};
|
|
3161
3608
|
e.object({
|
|
3162
|
-
_id:
|
|
3163
|
-
business:
|
|
3609
|
+
_id: n,
|
|
3610
|
+
business: n,
|
|
3164
3611
|
imageUrl: e.string().url(),
|
|
3165
3612
|
headline: e.string(),
|
|
3166
3613
|
caption: e.string(),
|
|
3167
3614
|
editedAt: e.coerce.date()
|
|
3168
|
-
}).describe(
|
|
3615
|
+
}).describe(m.describe(ze));
|
|
3169
3616
|
e.object({
|
|
3170
3617
|
id: e.number(),
|
|
3171
3618
|
name: e.string(),
|
|
@@ -3185,12 +3632,12 @@ e.object({
|
|
|
3185
3632
|
phone: e.string().optional(),
|
|
3186
3633
|
email: e.string().optional()
|
|
3187
3634
|
});
|
|
3188
|
-
const
|
|
3635
|
+
const Te = e.enum([
|
|
3189
3636
|
"PENDING",
|
|
3190
3637
|
"SUCCESS",
|
|
3191
3638
|
"FAILED",
|
|
3192
3639
|
"RETRYING"
|
|
3193
|
-
]),
|
|
3640
|
+
]), Ce = {
|
|
3194
3641
|
collectionName: "WebhookLogs",
|
|
3195
3642
|
transform: {
|
|
3196
3643
|
_id: "oid",
|
|
@@ -3198,39 +3645,39 @@ const X = e.enum([
|
|
|
3198
3645
|
}
|
|
3199
3646
|
};
|
|
3200
3647
|
e.object({
|
|
3201
|
-
_id:
|
|
3202
|
-
business:
|
|
3648
|
+
_id: n,
|
|
3649
|
+
business: n,
|
|
3203
3650
|
type: e.string(),
|
|
3204
3651
|
payload: e.record(e.any()),
|
|
3205
|
-
status:
|
|
3652
|
+
status: Te,
|
|
3206
3653
|
response: e.any().optional(),
|
|
3207
3654
|
error: e.string().optional()
|
|
3208
|
-
}).describe(
|
|
3209
|
-
const
|
|
3655
|
+
}).describe(m.describe(Ce));
|
|
3656
|
+
const ve = e.enum(["AUTO", "MANUAL"]);
|
|
3210
3657
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
3211
|
-
const
|
|
3212
|
-
_id:
|
|
3658
|
+
const x = e.object({
|
|
3659
|
+
_id: n,
|
|
3213
3660
|
name: e.string().min(1, "Name is required").max(50),
|
|
3214
|
-
type:
|
|
3215
|
-
event:
|
|
3216
|
-
}),
|
|
3661
|
+
type: ve,
|
|
3662
|
+
event: V.optional()
|
|
3663
|
+
}), Se = e.object({
|
|
3217
3664
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
3218
3665
|
to: e.number().int("Must be integer").nullish()
|
|
3219
|
-
}).superRefine((
|
|
3220
|
-
|
|
3666
|
+
}).superRefine((o, a) => {
|
|
3667
|
+
o.from && o.to && o.from > o.to && a.addIssue({
|
|
3221
3668
|
code: "custom",
|
|
3222
3669
|
message: "Max referral count must be more than min referral count"
|
|
3223
3670
|
});
|
|
3224
|
-
}),
|
|
3225
|
-
threshold:
|
|
3226
|
-
rewards: e.array(
|
|
3227
|
-
pf_reward: e.array(
|
|
3228
|
-
}),
|
|
3671
|
+
}), Ne = e.object({
|
|
3672
|
+
threshold: Se,
|
|
3673
|
+
rewards: e.array(n),
|
|
3674
|
+
pf_reward: e.array(T).optional()
|
|
3675
|
+
}), C = e.object({
|
|
3229
3676
|
id: e.string(),
|
|
3230
3677
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
3231
|
-
rule:
|
|
3232
|
-
rewards: e.array(
|
|
3233
|
-
}),
|
|
3678
|
+
rule: B.optional(),
|
|
3679
|
+
rewards: e.array(Ne)
|
|
3680
|
+
}), Ue = {
|
|
3234
3681
|
collectionName: "ReferralRecords",
|
|
3235
3682
|
transform: {
|
|
3236
3683
|
_id: "oid",
|
|
@@ -3239,25 +3686,25 @@ const T = e.object({
|
|
|
3239
3686
|
referee: "oid",
|
|
3240
3687
|
refereeReward: "oid"
|
|
3241
3688
|
}
|
|
3242
|
-
},
|
|
3689
|
+
}, Pe = e.object({
|
|
3243
3690
|
completedAt: e.coerce.date(),
|
|
3244
|
-
criteria:
|
|
3691
|
+
criteria: n,
|
|
3245
3692
|
ref: e.string()
|
|
3246
|
-
}),
|
|
3247
|
-
_id:
|
|
3248
|
-
business:
|
|
3249
|
-
referer:
|
|
3250
|
-
referee:
|
|
3251
|
-
criteria: e.array(
|
|
3252
|
-
reward: e.array(
|
|
3253
|
-
refereeReward: e.array(
|
|
3254
|
-
criteria_progress: e.array(
|
|
3693
|
+
}), je = e.object({
|
|
3694
|
+
_id: n,
|
|
3695
|
+
business: n,
|
|
3696
|
+
referer: n,
|
|
3697
|
+
referee: n,
|
|
3698
|
+
criteria: e.array(x),
|
|
3699
|
+
reward: e.array(C),
|
|
3700
|
+
refereeReward: e.array(n).optional(),
|
|
3701
|
+
criteria_progress: e.array(Pe),
|
|
3255
3702
|
status: e.string(),
|
|
3256
|
-
pf_referer:
|
|
3257
|
-
pf_referee:
|
|
3258
|
-
pf_refereeReward: e.array(
|
|
3259
|
-
}).describe(
|
|
3260
|
-
|
|
3703
|
+
pf_referer: g.optional(),
|
|
3704
|
+
pf_referee: g.optional(),
|
|
3705
|
+
pf_refereeReward: e.array(T).optional()
|
|
3706
|
+
}).describe(m.describe(Ue));
|
|
3707
|
+
je.pick({
|
|
3261
3708
|
_id: !0,
|
|
3262
3709
|
business: !0,
|
|
3263
3710
|
referer: !0,
|
|
@@ -3265,79 +3712,83 @@ ae.pick({
|
|
|
3265
3712
|
criteria_progress: !0,
|
|
3266
3713
|
criteria: !0
|
|
3267
3714
|
}).extend({
|
|
3268
|
-
pf_referee:
|
|
3715
|
+
pf_referee: g.pick({
|
|
3269
3716
|
_id: !0,
|
|
3270
3717
|
name: !0,
|
|
3271
3718
|
phoneNumber: !0,
|
|
3272
3719
|
photoUrl: !0
|
|
3273
3720
|
})
|
|
3274
3721
|
});
|
|
3275
|
-
const
|
|
3722
|
+
const Ee = {
|
|
3276
3723
|
collectionName: "ReferralProgram",
|
|
3277
3724
|
transform: {
|
|
3278
3725
|
_id: "oid",
|
|
3279
3726
|
business: "oid"
|
|
3280
3727
|
}
|
|
3281
|
-
},
|
|
3282
|
-
_id:
|
|
3283
|
-
business:
|
|
3728
|
+
}, D = e.object({
|
|
3729
|
+
_id: n,
|
|
3730
|
+
business: n,
|
|
3284
3731
|
term_and_condition: e.string().optional(),
|
|
3285
|
-
refereeReward: e.array(
|
|
3286
|
-
reward: e.array(
|
|
3287
|
-
criteria: e.array(
|
|
3288
|
-
}).describe(
|
|
3732
|
+
refereeReward: e.array(n).optional(),
|
|
3733
|
+
reward: e.array(C),
|
|
3734
|
+
criteria: e.array(x)
|
|
3735
|
+
}).describe(m.describe(Ee));
|
|
3289
3736
|
e.object({
|
|
3290
|
-
referer:
|
|
3291
|
-
referee:
|
|
3292
|
-
business:
|
|
3737
|
+
referer: n,
|
|
3738
|
+
referee: n,
|
|
3739
|
+
business: n
|
|
3293
3740
|
});
|
|
3294
3741
|
e.object({
|
|
3295
|
-
program:
|
|
3742
|
+
program: D.pick({
|
|
3296
3743
|
_id: !0,
|
|
3297
3744
|
business: !0,
|
|
3298
3745
|
term_and_condition: !0
|
|
3299
3746
|
}).extend({
|
|
3300
|
-
reward:
|
|
3301
|
-
pf_refereeReward: e.array(
|
|
3747
|
+
reward: C.optional(),
|
|
3748
|
+
pf_refereeReward: e.array(T).optional()
|
|
3302
3749
|
}),
|
|
3303
3750
|
referralCount: e.number(),
|
|
3304
3751
|
successReferralCount: e.number(),
|
|
3305
|
-
referredBy:
|
|
3752
|
+
referredBy: g.pick({
|
|
3306
3753
|
_id: !0,
|
|
3307
3754
|
name: !0,
|
|
3308
3755
|
phoneNumber: !0,
|
|
3309
3756
|
photoUrl: !0
|
|
3310
3757
|
}).optional()
|
|
3311
3758
|
});
|
|
3312
|
-
|
|
3759
|
+
D.extend({
|
|
3313
3760
|
updateReferralRecord: e.boolean().optional()
|
|
3314
3761
|
});
|
|
3315
|
-
const
|
|
3762
|
+
const Je = e.object({
|
|
3316
3763
|
facebookPageId: e.string(),
|
|
3317
3764
|
pageName: e.string(),
|
|
3318
3765
|
pageProfileImageUrl: e.string(),
|
|
3319
3766
|
pageAccessToken: e.string().optional(),
|
|
3320
|
-
locationIds: e.array(
|
|
3321
|
-
}),
|
|
3322
|
-
locationId:
|
|
3767
|
+
locationIds: e.array(n)
|
|
3768
|
+
}), Oe = e.object({
|
|
3769
|
+
locationId: n.nullable(),
|
|
3323
3770
|
googleLocationName: e.string(),
|
|
3324
3771
|
displayName: e.string().optional()
|
|
3325
|
-
}),
|
|
3772
|
+
}), Ie = e.object({
|
|
3326
3773
|
accessToken: e.string().nullable(),
|
|
3327
3774
|
refreshToken: e.string().nullable(),
|
|
3328
3775
|
accessTokenExpiresAt: e.date().nullable(),
|
|
3329
|
-
locations: e.array(
|
|
3330
|
-
|
|
3776
|
+
locations: e.array(Oe),
|
|
3777
|
+
lastSyncTime: e.coerce.date().nullish(),
|
|
3778
|
+
syncFrequency: e.number().int().min(1).max(30).default(30)
|
|
3779
|
+
}), Re = e.object({
|
|
3331
3780
|
token: e.string().nullable(),
|
|
3332
|
-
pages: e.array(
|
|
3781
|
+
pages: e.array(Je),
|
|
3782
|
+
lastSyncTime: e.coerce.date().nullish(),
|
|
3783
|
+
syncFrequency: e.number().int().min(1).max(30).default(30)
|
|
3333
3784
|
});
|
|
3334
3785
|
e.object({
|
|
3335
|
-
_id:
|
|
3336
|
-
businessId:
|
|
3337
|
-
google:
|
|
3338
|
-
facebook:
|
|
3786
|
+
_id: n,
|
|
3787
|
+
businessId: n,
|
|
3788
|
+
google: Ie.nullable(),
|
|
3789
|
+
facebook: Re.nullable()
|
|
3339
3790
|
}).describe(
|
|
3340
|
-
|
|
3791
|
+
m.describe({
|
|
3341
3792
|
collectionName: "ReviewSourceConfig",
|
|
3342
3793
|
transform: {
|
|
3343
3794
|
_id: "oid",
|
|
@@ -3381,7 +3832,9 @@ e.object({
|
|
|
3381
3832
|
displayName: e.string().optional(),
|
|
3382
3833
|
locationId: e.string().nullable()
|
|
3383
3834
|
})
|
|
3384
|
-
)
|
|
3835
|
+
),
|
|
3836
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
3837
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
3385
3838
|
}).nullable(),
|
|
3386
3839
|
facebook: e.object({
|
|
3387
3840
|
token: e.string().nullable(),
|
|
@@ -3392,30 +3845,32 @@ e.object({
|
|
|
3392
3845
|
pageProfileImageUrl: e.string(),
|
|
3393
3846
|
locationIds: e.array(e.string())
|
|
3394
3847
|
})
|
|
3395
|
-
)
|
|
3848
|
+
),
|
|
3849
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
3850
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
3396
3851
|
}).nullable()
|
|
3397
3852
|
});
|
|
3398
|
-
const
|
|
3853
|
+
const u = e.object({
|
|
3399
3854
|
name: e.string(),
|
|
3400
3855
|
pictureUrl: e.string(),
|
|
3401
3856
|
phoneNumber: e.string().optional()
|
|
3402
|
-
}),
|
|
3857
|
+
}), Le = u.extend({
|
|
3403
3858
|
isAnonymous: e.boolean().optional()
|
|
3404
|
-
}),
|
|
3859
|
+
}), xe = u.extend({
|
|
3405
3860
|
id: e.string().optional()
|
|
3406
|
-
}),
|
|
3861
|
+
}), h = e.object({
|
|
3407
3862
|
comment: e.string(),
|
|
3408
3863
|
updateTime: e.coerce.date()
|
|
3409
3864
|
});
|
|
3410
3865
|
e.object({
|
|
3411
3866
|
comment: e.string().trim().min(1).max(4096)
|
|
3412
3867
|
});
|
|
3413
|
-
const
|
|
3868
|
+
const s = e.object({
|
|
3414
3869
|
externalId: e.string().optional(),
|
|
3415
3870
|
thumbnailUrl: e.string(),
|
|
3416
3871
|
thumbnailLabel: e.string(),
|
|
3417
3872
|
videoUrl: e.string().optional()
|
|
3418
|
-
}),
|
|
3873
|
+
}), De = {
|
|
3419
3874
|
collectionName: "Reviews",
|
|
3420
3875
|
transform: {
|
|
3421
3876
|
_id: "oid",
|
|
@@ -3423,31 +3878,31 @@ const l = e.object({
|
|
|
3423
3878
|
reviewerId: "oid",
|
|
3424
3879
|
restaurantId: "oid"
|
|
3425
3880
|
}
|
|
3426
|
-
},
|
|
3881
|
+
}, w = e.enum([
|
|
3427
3882
|
"google",
|
|
3428
3883
|
"facebook",
|
|
3429
3884
|
"feedme",
|
|
3430
3885
|
"feedvibe"
|
|
3431
3886
|
]);
|
|
3432
|
-
|
|
3887
|
+
w.options;
|
|
3433
3888
|
e.enum(["google", "facebook"]);
|
|
3434
|
-
const
|
|
3889
|
+
const we = e.enum([
|
|
3435
3890
|
"createTime_desc",
|
|
3436
3891
|
"createTime_asc",
|
|
3437
3892
|
"rating_asc",
|
|
3438
3893
|
"rating_desc"
|
|
3439
3894
|
]);
|
|
3440
3895
|
e.object({
|
|
3441
|
-
source:
|
|
3896
|
+
source: w.array().optional(),
|
|
3442
3897
|
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
3443
3898
|
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
3444
3899
|
locationId: e.string().optional(),
|
|
3445
3900
|
excludeDeleted: e.boolean().optional(),
|
|
3446
|
-
sort:
|
|
3901
|
+
sort: we.optional(),
|
|
3447
3902
|
limit: e.coerce.number().int().positive().optional(),
|
|
3448
3903
|
skip: e.coerce.number().int().min(0).optional()
|
|
3449
3904
|
});
|
|
3450
|
-
const
|
|
3905
|
+
const pt = e.object({
|
|
3451
3906
|
averageScore: e.number(),
|
|
3452
3907
|
total: e.number().int().nonnegative(),
|
|
3453
3908
|
starCounts: e.array(
|
|
@@ -3456,54 +3911,54 @@ const Le = e.object({
|
|
|
3456
3911
|
count: e.number().int().nonnegative()
|
|
3457
3912
|
})
|
|
3458
3913
|
)
|
|
3459
|
-
}),
|
|
3914
|
+
}), _ = e.object({
|
|
3460
3915
|
name: e.string(),
|
|
3461
3916
|
pictureUrl: e.string().optional(),
|
|
3462
3917
|
phoneNumber: e.string().optional()
|
|
3463
|
-
}),
|
|
3918
|
+
}), Ae = _.extend({
|
|
3464
3919
|
_id: e.string().optional()
|
|
3465
|
-
}),
|
|
3920
|
+
}), Me = _.extend({
|
|
3466
3921
|
_id: e.string()
|
|
3467
|
-
}),
|
|
3922
|
+
}), Fe = _.extend({
|
|
3468
3923
|
isAnonymous: e.boolean().optional()
|
|
3469
|
-
}),
|
|
3924
|
+
}), Ge = _.extend({
|
|
3470
3925
|
id: e.string().optional()
|
|
3471
|
-
}),
|
|
3472
|
-
_id:
|
|
3926
|
+
}), y = e.object({
|
|
3927
|
+
_id: n,
|
|
3473
3928
|
comment: e.string(),
|
|
3474
3929
|
createTime: e.coerce.date(),
|
|
3475
3930
|
updateTime: e.coerce.date().nullish(),
|
|
3476
|
-
restaurantId:
|
|
3931
|
+
restaurantId: n,
|
|
3477
3932
|
restaurantName: e.string()
|
|
3478
|
-
}),
|
|
3933
|
+
}), ke = y.extend({
|
|
3479
3934
|
source: e.literal("google"),
|
|
3480
3935
|
externalId: e.string().min(1),
|
|
3481
3936
|
translatedComment: e.string().optional(),
|
|
3482
|
-
reviewer:
|
|
3483
|
-
reply:
|
|
3484
|
-
mediaItems: e.array(
|
|
3937
|
+
reviewer: Fe.optional(),
|
|
3938
|
+
reply: h.optional(),
|
|
3939
|
+
mediaItems: e.array(s),
|
|
3485
3940
|
starRating: e.number(),
|
|
3486
3941
|
locationName: e.string(),
|
|
3487
3942
|
locationDisplayName: e.string(),
|
|
3488
3943
|
originalUrl: e.string().optional()
|
|
3489
|
-
}),
|
|
3944
|
+
}), Be = y.extend({
|
|
3490
3945
|
source: e.literal("facebook"),
|
|
3491
3946
|
externalId: e.string().min(1),
|
|
3492
|
-
reviewer:
|
|
3947
|
+
reviewer: Ge.optional(),
|
|
3493
3948
|
isPositive: e.boolean().optional(),
|
|
3494
3949
|
pageId: e.string(),
|
|
3495
3950
|
pageName: e.string()
|
|
3496
|
-
}),
|
|
3951
|
+
}), Ve = y.extend({
|
|
3497
3952
|
source: e.literal("feedme"),
|
|
3498
|
-
reviewer:
|
|
3499
|
-
reply:
|
|
3953
|
+
reviewer: Ae.optional(),
|
|
3954
|
+
reply: h.optional(),
|
|
3500
3955
|
starRating: e.number(),
|
|
3501
|
-
mediaItems: e.array(
|
|
3956
|
+
mediaItems: e.array(s),
|
|
3502
3957
|
billId: e.string()
|
|
3503
|
-
}),
|
|
3958
|
+
}), We = y.extend({
|
|
3504
3959
|
source: e.literal("feedvibe"),
|
|
3505
3960
|
externalId: e.string().min(1),
|
|
3506
|
-
reviewer:
|
|
3961
|
+
reviewer: Me.optional(),
|
|
3507
3962
|
rating: e.object({
|
|
3508
3963
|
overall: e.number(),
|
|
3509
3964
|
food: e.number(),
|
|
@@ -3511,67 +3966,67 @@ const Le = e.object({
|
|
|
3511
3966
|
atmosphere: e.number()
|
|
3512
3967
|
}),
|
|
3513
3968
|
verified: e.boolean(),
|
|
3514
|
-
mediaItems: e.array(
|
|
3969
|
+
mediaItems: e.array(s).default([])
|
|
3515
3970
|
});
|
|
3516
3971
|
e.discriminatedUnion("source", [
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3972
|
+
ke,
|
|
3973
|
+
Be,
|
|
3974
|
+
Ve,
|
|
3975
|
+
We
|
|
3521
3976
|
]);
|
|
3522
3977
|
e.object({
|
|
3523
3978
|
comment: e.string(),
|
|
3524
3979
|
starRating: e.number(),
|
|
3525
3980
|
billId: e.string(),
|
|
3526
3981
|
isAnonymous: e.boolean(),
|
|
3527
|
-
mediaItems: e.array(
|
|
3982
|
+
mediaItems: e.array(s).optional()
|
|
3528
3983
|
});
|
|
3529
3984
|
e.object({
|
|
3530
3985
|
name: e.string().trim().min(1),
|
|
3531
3986
|
phoneNumber: e.string().trim().min(1).optional()
|
|
3532
3987
|
});
|
|
3533
|
-
const
|
|
3534
|
-
_id:
|
|
3535
|
-
businessId:
|
|
3988
|
+
const f = e.object({
|
|
3989
|
+
_id: n,
|
|
3990
|
+
businessId: n,
|
|
3536
3991
|
comment: e.string(),
|
|
3537
3992
|
createTime: e.coerce.date(),
|
|
3538
3993
|
updateTime: e.coerce.date().nullish(),
|
|
3539
|
-
restaurantId:
|
|
3994
|
+
restaurantId: n,
|
|
3540
3995
|
restaurantName: e.string(),
|
|
3541
3996
|
deletedAt: e.coerce.date().optional()
|
|
3542
|
-
}),
|
|
3997
|
+
}), Ye = f.extend({
|
|
3543
3998
|
source: e.literal("google"),
|
|
3544
3999
|
externalId: e.string().min(1),
|
|
3545
4000
|
translatedComment: e.string().optional(),
|
|
3546
|
-
reviewer:
|
|
3547
|
-
reply:
|
|
3548
|
-
mediaItems: e.array(
|
|
4001
|
+
reviewer: Le.optional(),
|
|
4002
|
+
reply: h.optional(),
|
|
4003
|
+
mediaItems: e.array(s),
|
|
3549
4004
|
starRating: e.number(),
|
|
3550
4005
|
locationName: e.string(),
|
|
3551
4006
|
locationDisplayName: e.string(),
|
|
3552
4007
|
originalUrl: e.string().optional()
|
|
3553
|
-
}),
|
|
4008
|
+
}), Ke = f.extend({
|
|
3554
4009
|
source: e.literal("facebook"),
|
|
3555
4010
|
externalId: e.string().min(1),
|
|
3556
|
-
reviewer:
|
|
4011
|
+
reviewer: xe.optional(),
|
|
3557
4012
|
isPositive: e.boolean().optional(),
|
|
3558
4013
|
pageId: e.string(),
|
|
3559
4014
|
pageName: e.string()
|
|
3560
|
-
}),
|
|
4015
|
+
}), qe = f.extend({
|
|
3561
4016
|
source: e.literal("feedme"),
|
|
3562
4017
|
isAnonymous: e.boolean(),
|
|
3563
4018
|
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
3564
|
-
reviewerId:
|
|
3565
|
-
reviewer:
|
|
3566
|
-
reply:
|
|
4019
|
+
reviewerId: n.optional(),
|
|
4020
|
+
reviewer: u.optional(),
|
|
4021
|
+
reply: h.optional(),
|
|
3567
4022
|
starRating: e.number(),
|
|
3568
4023
|
billId: e.string(),
|
|
3569
|
-
mediaItems: e.array(
|
|
3570
|
-
}),
|
|
4024
|
+
mediaItems: e.array(s)
|
|
4025
|
+
}), Xe = f.extend({
|
|
3571
4026
|
source: e.literal("feedvibe"),
|
|
3572
4027
|
externalId: e.string().min(1),
|
|
3573
|
-
reviewerId:
|
|
3574
|
-
reviewer:
|
|
4028
|
+
reviewerId: n,
|
|
4029
|
+
reviewer: u,
|
|
3575
4030
|
rating: e.object({
|
|
3576
4031
|
overall: e.number(),
|
|
3577
4032
|
food: e.number(),
|
|
@@ -3579,23 +4034,29 @@ const g = e.object({
|
|
|
3579
4034
|
atmosphere: e.number()
|
|
3580
4035
|
}),
|
|
3581
4036
|
verified: e.boolean(),
|
|
3582
|
-
mediaItems: e.array(
|
|
4037
|
+
mediaItems: e.array(s).default([])
|
|
3583
4038
|
});
|
|
3584
4039
|
e.discriminatedUnion("source", [
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
]).describe(
|
|
4040
|
+
Ye,
|
|
4041
|
+
Ke,
|
|
4042
|
+
qe,
|
|
4043
|
+
Xe
|
|
4044
|
+
]).describe(m.describe(De));
|
|
3590
4045
|
export {
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
4046
|
+
ae as F,
|
|
4047
|
+
t as R,
|
|
4048
|
+
lt as S,
|
|
4049
|
+
it as T,
|
|
4050
|
+
ct as W,
|
|
4051
|
+
H as a,
|
|
4052
|
+
rt as b,
|
|
4053
|
+
Ne as c,
|
|
4054
|
+
x as d,
|
|
4055
|
+
C as e,
|
|
4056
|
+
$ as f,
|
|
4057
|
+
Z as g,
|
|
4058
|
+
pt as h,
|
|
4059
|
+
W as i,
|
|
4060
|
+
h as j,
|
|
4061
|
+
q as s
|
|
3601
4062
|
};
|