@feedmepos/mf-connect 0.1.118-prod → 0.1.119-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 +12 -8
- package/dist/{App-BHcTqLff.js → App-z-u6skb5.js} +349 -337
- package/dist/AuditLogs-J0UJ3HJW.js +2016 -0
- package/dist/{Bin-DWhXJmHo.js → Bin-Dh9RAgYi.js} +8 -8
- package/dist/{Broadcast-Ct1DL8Pd.js → Broadcast-Dg6azPS8.js} +22 -21
- package/dist/{CampaignAnalytic-BSEKCM-4.js → CampaignAnalytic-CVB4dstO.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BxRg2Wu8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DYgBeT23.js} +8 -9
- package/dist/{Card-B7DwrAPH.js → Card-CY736Ul0.js} +22 -22
- package/dist/{Collections-BJw4JJq_.js → Collections-CdTKWkZZ.js} +197 -185
- package/dist/{Credit-BteIGXkp.js → Credit-CUhEKlMI.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CSFwIzOS.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CBwgeTXh.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BC4jTtVY.js +4439 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BDZ21UHA.js → EffectSheet.vue_vue_type_style_index_0_lang-D5-EKqG9.js} +30 -30
- package/dist/{Experience-C_VQVfJX.js → Experience-CMp09U-6.js} +32 -31
- package/dist/{FileSaver.min-CMiQUZQE.js → FileSaver.min-Bq5McdmK.js} +1 -1
- package/dist/{Game-BiHMrMBF.js → Game-Dv5NvG-q.js} +19 -18
- package/dist/{GiftCardSetup-DtJIm6oI.js → GiftCardSetup-SO2Tk5In.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BKGnPAEj.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CgG5vHCp.js} +7 -7
- package/dist/{Goals-B7VjLMDT.js → Goals-BEwQP4cY.js} +4 -4
- package/dist/Grab-npbL7p7S.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C9ecPgpJ.js → ImageInput.vue_vue_type_script_setup_true_lang-BDGEqsWE.js} +1 -1
- package/dist/{Index-D_DIHKZG.js → Index-8F2LOWng.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DSwB0Ubn.js → LocationPicker.vue_vue_type_script_setup_true_lang-BwAjki7Y.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-dk8_eVwd.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DK4C0Y9j.js} +1 -1
- package/dist/{LoyaltyDashboard-DOgHeJdK.js → LoyaltyDashboard-rWm0b8cm.js} +15 -15
- package/dist/{MainLayout-CfYgoXLS.js → MainLayout-ezbgp2IQ.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Bz2LGHUd.js → MainLayout.vue_vue_type_script_setup_true_lang-1QY5-U5y.js} +3 -3
- package/dist/{Marketing-B6TCrwaR.js → Marketing-DcWF4xVc.js} +4 -4
- package/dist/{MarketingMaterialEdit-Bu3a9NGj.js → MarketingMaterialEdit-C1bXj_hU.js} +214 -211
- package/dist/{Member-X51KrYXV.js → Member-CgDZqGsV.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CYU21JaO.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dh1_j06F.js} +39 -47
- package/dist/{MemberImportHistory-CHd9fx7E.js → MemberImportHistory-DT3QJ5se.js} +7 -7
- package/dist/{MemberList-D4L3bSlw.js → MemberList-Bm05jnbk.js} +103 -105
- package/dist/{MemberTransactions-CEgjfhnX.js → MemberTransactions-D90tTpdC.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-zsaig_yK.js → MessageInput.vue_vue_type_script_setup_true_lang-jvgjOXXA.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-YZQkKG66.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CxL-Nh6i.js} +1 -1
- package/dist/{Mission-BEVtvY0-.js → Mission-D_l2eJI3.js} +22 -21
- package/dist/{Overview-DVoXXZ16.js → Overview-1AYfTeMD.js} +20 -20
- package/dist/{Overview-4QRkldza.js → Overview-BOZBnorP.js} +145 -144
- package/dist/{Point-BJmebaL9.js → Point-Cqy4XzeG.js} +22 -21
- package/dist/{Promotion-DWZZBofu.js → Promotion-9RDNbCgB.js} +137 -131
- package/dist/{Queue-DLdsyhCT.js → Queue-D2Eie_np.js} +45 -45
- package/dist/{Record-QOD3XELf.js → Record-e4B--FD8.js} +9 -9
- package/dist/{Review-CKmhyuqj.js → Review-DcUpSvc-.js} +2 -2
- package/dist/ReviewFacebookCallback-BhHdYb4X.js +225 -0
- package/dist/{ReviewGoogleCallback-CDriVQPZ.js → ReviewGoogleCallback-JPkamgo2.js} +5 -5
- package/dist/Reward-BQJw-R8V.js +444 -0
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-ZgYX2QwC.js → RewardGroup.vue_vue_type_script_setup_true_lang-D_DSQ8q2.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DfWjXTx3.js +1923 -0
- package/dist/{Segment-URdB0lnl.js → Segment-Cjdqsqqg.js} +303 -306
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmI2LAsz.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-g-CJUZBF.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCEgZzA4.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-lbH0b170.js} +4 -4
- package/dist/{Setting-BDIHH2Wk.js → Setting-B3HK4mtx.js} +159 -148
- package/dist/{SettingAdvertisements-CkJYZnIN.js → SettingAdvertisements-BQFJpdIm.js} +12 -12
- package/dist/Settings-DKWkiRuA.js +286 -0
- package/dist/{Store-CV0kYncl.js → Store-mp1LyXwr.js} +28 -28
- package/dist/{StoreRewards-30kSkAZ_.js → StoreRewards-DiSB6d7_.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAYKqf-Y.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-be7ksTJw.js +7007 -0
- package/dist/{Tier-DiQSC3iv.js → Tier-CxaXh96q.js} +2575 -687
- package/dist/{Title-DixxpjAg.js → Title-Byz0TGpi.js} +95 -94
- package/dist/{Transaction-DQK4LUGD.js → Transaction-CNXulI3o.js} +2 -2
- package/dist/Upselling-Dto64bmE.js +1013 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CL-GKkuD.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C0bfVZf8.js} +26 -26
- package/dist/{Voucher-CSVlk_Hr.js → Voucher-CVw3E8Y4.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CiSoy0Ky.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C0d3ktXA.js} +12 -12
- package/dist/{WhatsappAccount-CQYbv2Ew.js → WhatsappAccount-5vLzjaIV.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DjgRo9iA.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CwGBRX-Q.js} +1 -1
- package/dist/{WhatsappBot-DdO9Bfvh.js → WhatsappBot-BWJbD7Gk.js} +6 -6
- package/dist/{WhatsappBotLogs-CjjWJGND.js → WhatsappBotLogs-C8gpmZyC.js} +6 -6
- package/dist/{WhatsappBotSettings-DYGx-kRr.js → WhatsappBotSettings-BvPnKHz-.js} +4 -4
- package/dist/WhatsappLayout-DJXhXeXf.js +21 -0
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DTUytfe5.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BxUYjrWQ.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DdCUr_Zm.js → ZodTextField.vue_vue_type_script_setup_true_lang-CkjzVKif.js} +2 -2
- package/dist/{app-CqQeNnGq.js → app-BF1vds2J.js} +11496 -10741
- package/dist/app.js +4 -3
- package/dist/{base.export-Dls5LQeu.js → base.export-B7FU8J4P.js} +2 -2
- package/dist/{business-gvLSQklz.js → business-DkUMhys1.js} +1 -1
- package/dist/{campaign-Cd6GmA4U.js → campaign-0AgQP43B.js} +34 -28
- package/dist/{campaign-BqazvOUj.js → campaign-C9cVkGMF.js} +121 -94
- package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
- package/dist/campaign.fn-N6rJeDUx.js +776 -0
- package/dist/{collection.fn-CERMsFPh.js → collection.fn-B_QnW0e3.js} +2 -2
- package/dist/{currency-IkiKiNg1.js → currency-XQmondpC.js} +1 -1
- package/dist/duplicateCampaign-CvQRWP-Z.js +51 -0
- package/dist/{effect-j_T62HBN.js → effect-Mwn1x6qN.js} +1 -1
- package/dist/{email-addresses-CN1kPlEj.js → email-addresses-DQQAi6-l.js} +2 -2
- package/dist/{feature-flag-DDfyOLsv.js → feature-flag-B1VMMZMd.js} +144 -144
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-DVUe13eh.js → helper-D1R8vyjc.js} +1 -1
- package/dist/{index-fNYUguDQ.js → index-BU6CU5MP.js} +389 -232
- package/dist/{index-DALsfLV7.js → index-Bm43wR8L.js} +2699 -2613
- package/dist/{index-jS16KX9p.js → index-Bym-ZIcv.js} +1 -1
- package/dist/{index-BvoOJdfc.js → index-C9Nbb7wc.js} +2 -2
- package/dist/{index-UJHdDEG1.js → index-CLlGMbnP.js} +1 -1
- package/dist/{index-BvkqHehI.js → index-CPB7j8Wn.js} +10 -10
- package/dist/{index-COuLtOaw.js → index-CRAuAyO3.js} +1 -1
- package/dist/{index-k7FFxt_M.js → index-Cg8Z5eYT.js} +2 -2
- package/dist/{index-CPyK4a5J.js → index-CzE9ZPDV.js} +4 -4
- package/dist/{index-Cjy0SXCn.js → index-D5BwAYuA.js} +197 -197
- package/dist/{index-ep_Kxxid.js → index-DMfCzjiA.js} +2 -2
- package/dist/{index-DMiaWY0s.js → index-DQnCdGWe.js} +682 -581
- package/dist/{index-D_1pnadB.js → index-DaUhJ6xV.js} +29 -15
- package/dist/{index-9RBtEPPj.js → index-P8DDRVa3.js} +1 -1
- package/dist/{index-C_SaKemI.js → index-Rs75lw-x.js} +1 -1
- package/dist/{index-C-IajuP1.js → index-ZYrey0SM.js} +10 -10
- package/dist/{index-CWGbeg5X.js → index-eR9mqPPV.js} +19 -6
- package/dist/{index-BmIfGArh.js → index-mOGrVzUV.js} +3 -3
- package/dist/{index-lzQ6ehOk.js → index-ug7pxPAX.js} +608 -251
- package/dist/{index-DzbVgUEP.js → index-ytSMcSMt.js} +1 -1
- package/dist/{index.esm2017-vJKhLfdu.js → index.esm2017-Gkctw9Mb.js} +111 -111
- package/dist/{loading-jZV2Dm--.js → loading-kUQqT44G.js} +1 -1
- package/dist/{lodash-C2pLek0l.js → lodash-B4AjV7YZ.js} +1 -1
- package/dist/{member-import-BKI7soRD.js → member-import-CwDUG5mj.js} +1 -1
- package/dist/{membership-smdlFpPr.js → membership-BI6U8-eM.js} +2 -2
- package/dist/{money-5XyTnYwW.js → money-Bum-AbB7.js} +1 -1
- package/dist/{number-DHU9qJJQ.js → number-uAoNqG-N.js} +1 -1
- package/dist/objectid-CPTCMH2h.js +145 -0
- package/dist/{onboarding-C_5pyGx-.js → onboarding-wtYzQipv.js} +36 -36
- package/dist/{onboardingSetup-Bd1V-Ipy.js → onboardingSetup-DlYM-oqd.js} +2 -2
- package/dist/{plugins-D1Ru-da5.js → plugins-BGyTPNfc.js} +3 -3
- package/dist/{reward-BqPl68Xk.js → reward-D0xtG-bp.js} +1 -1
- package/dist/{rule-WBrRXwL-.js → rule-BAA5-vRj.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-DKgW9ul3.js +188 -0
- package/dist/{timezone-O4qrCDcK.js → timezone-Bbw2OeEP.js} +1 -1
- package/dist/{transaction.fn-CY_F8Nb8.js → transaction.fn-DZdNjP_E.js} +2 -2
- package/dist/{trigger-D-vySeIB.js → trigger-BpotFb7G.js} +9 -9
- package/dist/{useMarketingMaterialActions-kA6SLHy_.js → useMarketingMaterialActions-CQ1M0N9c.js} +4 -4
- package/dist/{usePagination-AYE_RJH2.js → usePagination-qALFI_Td.js} +1 -1
- package/dist/{user-DJcMkYXP.js → user-X_94TRIK.js} +1 -1
- package/dist/vue-i18n-CRFpVnMa.js +2365 -0
- package/dist/{xlsx--s3hBdDk.js → xlsx-DW48eXDT.js} +224 -224
- package/dist/{zod-IpHRbxaJ.js → zod-BAP9II5C.js} +1 -1
- package/package.json +8 -3
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJotVIKM.js +0 -3496
- package/dist/ReviewFacebookCallback-C6DlaJ_j.js +0 -238
- package/dist/Reward-DftoZfPN.js +0 -442
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHmBwLNP.js +0 -1884
- package/dist/Settings-9gaegvYJ.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dgwyk3NA.js +0 -1265
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CDUhH6wp.js +0 -142
- package/dist/WhatsappLayout-B6k_79Kl.js +0 -21
- package/dist/campaign.fn-C0oMb1fs.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-jT5g6pGt.js +0 -145
- package/dist/rule-builder-DAlSbaWh.js +0 -102
- package/dist/template-DDquG4Xc.js +0 -236
- package/dist/vue-i18n-kXHiDb_1.js +0 -2365
|
@@ -1,13 +1,187 @@
|
|
|
1
|
+
import { F as n, m, b as A } from "./index-mOGrVzUV.js";
|
|
1
2
|
import { z as e } from "./index-C_H8jFYf.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
3
|
+
import { l as M, m as F, n as G, o as g } from "./index-DQnCdGWe.js";
|
|
4
|
+
import { _ as k, l as v, f as B } from "./index-Bm43wR8L.js";
|
|
5
|
+
import { i as p } from "./helper-D1R8vyjc.js";
|
|
6
|
+
import { d as z, b as U, e as d } from "./index-D5BwAYuA.js";
|
|
7
|
+
import { c as V } from "./index-BU6CU5MP.js";
|
|
8
|
+
import { F as T } from "./index-C9Nbb7wc.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 = {
|
|
11
185
|
PROMOTION: {
|
|
12
186
|
name: "Promotion Template",
|
|
13
187
|
description: "Promotion template for campaign creation.",
|
|
@@ -413,7 +587,7 @@ const Me = {
|
|
|
413
587
|
// },
|
|
414
588
|
hideInApp: !0
|
|
415
589
|
},
|
|
416
|
-
configs:
|
|
590
|
+
configs: p("VOUCHER", {
|
|
417
591
|
name: "",
|
|
418
592
|
business: null,
|
|
419
593
|
noCampaign: !1
|
|
@@ -1403,7 +1577,7 @@ const Me = {
|
|
|
1403
1577
|
rewards: []
|
|
1404
1578
|
}
|
|
1405
1579
|
},
|
|
1406
|
-
configs:
|
|
1580
|
+
configs: p("GAME", {
|
|
1407
1581
|
name: "Token",
|
|
1408
1582
|
business: null,
|
|
1409
1583
|
noCampaign: !1
|
|
@@ -1644,18 +1818,184 @@ const Me = {
|
|
|
1644
1818
|
type: "timeframe"
|
|
1645
1819
|
}
|
|
1646
1820
|
},
|
|
1647
|
-
configs:
|
|
1821
|
+
configs: p("STAMP", {
|
|
1648
1822
|
business: null,
|
|
1649
1823
|
noCampaign: !1
|
|
1650
1824
|
})
|
|
1651
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
|
+
}
|
|
1652
1992
|
}
|
|
1653
1993
|
};
|
|
1654
|
-
t.scaffoldGroup(),
|
|
1994
|
+
t.scaffoldGroup(), p("STAMP", {
|
|
1655
1995
|
business: null,
|
|
1656
1996
|
noCampaign: !1
|
|
1657
1997
|
});
|
|
1658
|
-
const
|
|
1998
|
+
const lt = {
|
|
1659
1999
|
_id: "",
|
|
1660
2000
|
intention: [],
|
|
1661
2001
|
name: "Spend and get voucher",
|
|
@@ -2053,7 +2393,7 @@ const Ge = {
|
|
|
2053
2393
|
amount: 1
|
|
2054
2394
|
}
|
|
2055
2395
|
},
|
|
2056
|
-
configs:
|
|
2396
|
+
configs: p("VOUCHER", {
|
|
2057
2397
|
name: "",
|
|
2058
2398
|
business: null,
|
|
2059
2399
|
noCampaign: !1
|
|
@@ -2062,7 +2402,7 @@ const Ge = {
|
|
|
2062
2402
|
};
|
|
2063
2403
|
({
|
|
2064
2404
|
...t.scaffoldGroup()
|
|
2065
|
-
},
|
|
2405
|
+
}, p("VOUCHER", {
|
|
2066
2406
|
name: "",
|
|
2067
2407
|
business: null,
|
|
2068
2408
|
noCampaign: !1
|
|
@@ -2073,7 +2413,7 @@ const Ge = {
|
|
|
2073
2413
|
({
|
|
2074
2414
|
...t.scaffoldGroup()
|
|
2075
2415
|
});
|
|
2076
|
-
const
|
|
2416
|
+
const rt = {
|
|
2077
2417
|
_id: "",
|
|
2078
2418
|
intention: [],
|
|
2079
2419
|
name: "Spend and earn points",
|
|
@@ -2448,7 +2788,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2448
2788
|
});
|
|
2449
2789
|
({
|
|
2450
2790
|
...t.scaffoldGroup()
|
|
2451
|
-
},
|
|
2791
|
+
}, p("VOUCHER", {
|
|
2452
2792
|
name: "",
|
|
2453
2793
|
business: null,
|
|
2454
2794
|
noCampaign: !1
|
|
@@ -2494,12 +2834,12 @@ t.setRuleToGroup(
|
|
|
2494
2834
|
"&&"
|
|
2495
2835
|
)
|
|
2496
2836
|
);
|
|
2497
|
-
t.scaffoldGroup(), t.scaffoldGroup(),
|
|
2837
|
+
t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
|
|
2498
2838
|
name: "Token",
|
|
2499
2839
|
business: null,
|
|
2500
2840
|
noCampaign: !1
|
|
2501
2841
|
});
|
|
2502
|
-
const
|
|
2842
|
+
const ct = {
|
|
2503
2843
|
_id: "",
|
|
2504
2844
|
intention: [],
|
|
2505
2845
|
name: "Welcome voucher",
|
|
@@ -2845,7 +3185,7 @@ const Be = {
|
|
|
2845
3185
|
amount: 1
|
|
2846
3186
|
}
|
|
2847
3187
|
},
|
|
2848
|
-
configs:
|
|
3188
|
+
configs: p("VOUCHER", {
|
|
2849
3189
|
name: "",
|
|
2850
3190
|
business: null,
|
|
2851
3191
|
noCampaign: !1
|
|
@@ -2876,7 +3216,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2876
3216
|
],
|
|
2877
3217
|
"&&"
|
|
2878
3218
|
)
|
|
2879
|
-
]),
|
|
3219
|
+
]), p("VOUCHER", {
|
|
2880
3220
|
name: "",
|
|
2881
3221
|
business: null,
|
|
2882
3222
|
noCampaign: !1
|
|
@@ -2899,7 +3239,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2899
3239
|
({
|
|
2900
3240
|
...t.scaffoldGroup()
|
|
2901
3241
|
});
|
|
2902
|
-
const
|
|
3242
|
+
const ae = e.enum([
|
|
2903
3243
|
"MEMBER_REWARD",
|
|
2904
3244
|
"PAID_LOYALTY",
|
|
2905
3245
|
"COLLECT_FEEDBACK",
|
|
@@ -2909,7 +3249,7 @@ const D = e.enum([
|
|
|
2909
3249
|
"BROADCAST",
|
|
2910
3250
|
"BIRTHDAY",
|
|
2911
3251
|
"GAME"
|
|
2912
|
-
]),
|
|
3252
|
+
]), ne = e.enum([
|
|
2913
3253
|
"text",
|
|
2914
3254
|
"number",
|
|
2915
3255
|
"textarea",
|
|
@@ -2935,88 +3275,91 @@ const D = e.enum([
|
|
|
2935
3275
|
"rule_bill",
|
|
2936
3276
|
"rule_feedback",
|
|
2937
3277
|
"rule_birthday",
|
|
2938
|
-
"promotion_game_type"
|
|
2939
|
-
|
|
3278
|
+
"promotion_game_type",
|
|
3279
|
+
"grab_effect",
|
|
3280
|
+
"grab_quota",
|
|
3281
|
+
"grab_conditions"
|
|
3282
|
+
]), oe = e.object({
|
|
2940
3283
|
label: e.string().optional(),
|
|
2941
3284
|
label_locale: e.record(e.string()).nullish(),
|
|
2942
3285
|
property: e.string().or(e.any()),
|
|
2943
|
-
type:
|
|
3286
|
+
type: ne,
|
|
2944
3287
|
extras: e.string().optional(),
|
|
2945
3288
|
isRuleChildren: e.boolean().optional()
|
|
2946
|
-
}),
|
|
3289
|
+
}), S = e.object({
|
|
2947
3290
|
not: e.boolean().optional(),
|
|
2948
3291
|
property: e.string(),
|
|
2949
3292
|
value: e.any()
|
|
2950
|
-
}),
|
|
3293
|
+
}), ie = e.object({
|
|
2951
3294
|
name: e.string().optional(),
|
|
2952
3295
|
name_locale: e.record(e.string()).nullish(),
|
|
2953
|
-
fields: e.array(
|
|
2954
|
-
condition:
|
|
2955
|
-
e.array(
|
|
3296
|
+
fields: e.array(oe),
|
|
3297
|
+
condition: S.optional().or(
|
|
3298
|
+
e.array(S)
|
|
2956
3299
|
)
|
|
2957
|
-
}),
|
|
3300
|
+
}), le = e.object({
|
|
2958
3301
|
name: e.string(),
|
|
2959
3302
|
name_locale: e.record(e.string()).nullish(),
|
|
2960
|
-
groups: e.array(
|
|
3303
|
+
groups: e.array(ie)
|
|
2961
3304
|
});
|
|
2962
3305
|
e.object({
|
|
2963
|
-
_id:
|
|
3306
|
+
_id: n,
|
|
2964
3307
|
name: e.string(),
|
|
2965
3308
|
name_locale: e.record(e.string()).nullish(),
|
|
2966
3309
|
description: e.string().nullish(),
|
|
2967
3310
|
description_locale: e.record(e.string()).nullish(),
|
|
2968
|
-
steps: e.array(
|
|
2969
|
-
intention: e.array(
|
|
3311
|
+
steps: e.array(le).min(1),
|
|
3312
|
+
intention: e.array(ae),
|
|
2970
3313
|
defaultValue: e.any()
|
|
2971
3314
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2972
|
-
const
|
|
3315
|
+
const re = {
|
|
2973
3316
|
collectionName: "Businesses",
|
|
2974
3317
|
transform: {
|
|
2975
3318
|
_id: "oid"
|
|
2976
3319
|
}
|
|
2977
3320
|
};
|
|
2978
3321
|
e.object({
|
|
2979
|
-
_id:
|
|
3322
|
+
_id: n,
|
|
2980
3323
|
ownerId: e.string(),
|
|
2981
3324
|
name: e.string(),
|
|
2982
3325
|
credit: e.number(),
|
|
2983
3326
|
forceSend: e.boolean().optional()
|
|
2984
|
-
}).describe(
|
|
2985
|
-
const
|
|
3327
|
+
}).describe(m.describe(re));
|
|
3328
|
+
const P = e.enum(["PHONE"]), ce = e.enum([
|
|
2986
3329
|
"MOCEAN",
|
|
2987
3330
|
"SLACK",
|
|
2988
3331
|
"SMS",
|
|
2989
3332
|
"EMAIL",
|
|
2990
3333
|
"WHATSAPP"
|
|
2991
|
-
]),
|
|
3334
|
+
]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
|
|
2992
3335
|
"General",
|
|
2993
3336
|
"Otp",
|
|
2994
3337
|
"Marketing",
|
|
2995
3338
|
"Ordering",
|
|
2996
3339
|
"MemberInvitation",
|
|
2997
3340
|
"MarketingPromotion"
|
|
2998
|
-
]),
|
|
2999
|
-
type:
|
|
3000
|
-
}),
|
|
3001
|
-
type: e.literal(
|
|
3002
|
-
provider:
|
|
3003
|
-
usage:
|
|
3004
|
-
}),
|
|
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([
|
|
3005
3348
|
"Accepted",
|
|
3006
3349
|
"PartiallyAccepted",
|
|
3007
3350
|
"Queued",
|
|
3008
3351
|
"Unknown",
|
|
3009
3352
|
"Failed"
|
|
3010
|
-
]),
|
|
3353
|
+
]), ge = e.enum([
|
|
3011
3354
|
"PENDING",
|
|
3012
3355
|
"SUBMITTED",
|
|
3013
3356
|
"SETTLED",
|
|
3014
3357
|
"FAILED"
|
|
3015
|
-
]),
|
|
3358
|
+
]), J = e.object({
|
|
3016
3359
|
channel: e.string(),
|
|
3017
3360
|
status: e.string(),
|
|
3018
3361
|
statusDetails: e.string().nullish()
|
|
3019
|
-
}),
|
|
3362
|
+
}), de = {
|
|
3020
3363
|
collectionName: "Notifications",
|
|
3021
3364
|
transform: {
|
|
3022
3365
|
_id: "oid",
|
|
@@ -3026,51 +3369,51 @@ const z = e.enum(["PHONE"]), k = e.enum([
|
|
|
3026
3369
|
}
|
|
3027
3370
|
};
|
|
3028
3371
|
e.object({
|
|
3029
|
-
_id:
|
|
3030
|
-
business:
|
|
3031
|
-
status:
|
|
3372
|
+
_id: n,
|
|
3373
|
+
business: n,
|
|
3374
|
+
status: pe,
|
|
3032
3375
|
ref: e.string().optional(),
|
|
3033
3376
|
title: e.string().optional(),
|
|
3034
3377
|
// Single-channel fields. Absent on multi-channel dispatches, which carry
|
|
3035
3378
|
// their content per channel in the submitted request instead.
|
|
3036
3379
|
target: e.string().optional(),
|
|
3037
3380
|
message: e.string().optional(),
|
|
3038
|
-
option:
|
|
3381
|
+
option: j.optional(),
|
|
3039
3382
|
// Multi-channel dispatch fields.
|
|
3040
|
-
campaign:
|
|
3041
|
-
member:
|
|
3383
|
+
campaign: n.nullish(),
|
|
3384
|
+
member: n.nullish(),
|
|
3042
3385
|
/**
|
|
3043
3386
|
* The scheduled run this dispatch belongs to. With campaign and member it
|
|
3044
3387
|
* identifies one intended send, so a redelivered queue job is recognised
|
|
3045
3388
|
* rather than sent twice.
|
|
3046
3389
|
*/
|
|
3047
3390
|
runAt: e.coerce.date().nullish(),
|
|
3048
|
-
mode:
|
|
3049
|
-
channels: e.array(
|
|
3391
|
+
mode: z.nullish(),
|
|
3392
|
+
channels: e.array(U).nullish(),
|
|
3050
3393
|
/**
|
|
3051
3394
|
* Local submission state, kept separate from the upstream outcome so an
|
|
3052
3395
|
* interrupted worker can tell "never sent" from "sent, result unknown".
|
|
3053
3396
|
*/
|
|
3054
|
-
state:
|
|
3055
|
-
outcome:
|
|
3397
|
+
state: ge.nullish(),
|
|
3398
|
+
outcome: E.nullish(),
|
|
3056
3399
|
/** Upstream correlation id, preserved even when the request failed. */
|
|
3057
3400
|
requestId: e.string().nullish(),
|
|
3058
|
-
attempts: e.array(
|
|
3401
|
+
attempts: e.array(J).nullish(),
|
|
3059
3402
|
/** Credit consumed upstream, recorded for reconciliation. */
|
|
3060
|
-
creditUsed:
|
|
3061
|
-
balanceAfter:
|
|
3403
|
+
creditUsed: d.nullish(),
|
|
3404
|
+
balanceAfter: d.nullish(),
|
|
3062
3405
|
error: e.string().nullish(),
|
|
3063
3406
|
createdAt: e.coerce.date().nullish(),
|
|
3064
3407
|
submittedAt: e.coerce.date().nullish(),
|
|
3065
3408
|
settledAt: e.coerce.date().nullish()
|
|
3066
|
-
}).describe(
|
|
3067
|
-
const
|
|
3409
|
+
}).describe(m.describe(de));
|
|
3410
|
+
const ue = e.object({
|
|
3068
3411
|
target: e.string(),
|
|
3069
3412
|
title: e.string().optional(),
|
|
3070
3413
|
message: e.string(),
|
|
3071
|
-
option:
|
|
3414
|
+
option: j,
|
|
3072
3415
|
ref: e.string().optional()
|
|
3073
|
-
}),
|
|
3416
|
+
}), he = e.object({
|
|
3074
3417
|
memberId: e.string(),
|
|
3075
3418
|
name: e.string().nullish(),
|
|
3076
3419
|
phoneNumber: e.string().nullish(),
|
|
@@ -3085,7 +3428,7 @@ const X = e.object({
|
|
|
3085
3428
|
e.object({
|
|
3086
3429
|
businessId: e.string(),
|
|
3087
3430
|
forceSend: e.boolean(),
|
|
3088
|
-
mode:
|
|
3431
|
+
mode: z,
|
|
3089
3432
|
channels: e.array(
|
|
3090
3433
|
e.enum(["SMS", "WHATSAPP", "EMAIL", "APP_INBOX", "PUSH_NOTIFICATION"])
|
|
3091
3434
|
),
|
|
@@ -3097,34 +3440,34 @@ e.object({
|
|
|
3097
3440
|
});
|
|
3098
3441
|
e.object({
|
|
3099
3442
|
requestId: e.string().nullish(),
|
|
3100
|
-
status:
|
|
3101
|
-
attempts: e.array(
|
|
3102
|
-
creditUsed:
|
|
3103
|
-
balance:
|
|
3443
|
+
status: E.nullish(),
|
|
3444
|
+
attempts: e.array(J).nullish(),
|
|
3445
|
+
creditUsed: d.nullish(),
|
|
3446
|
+
balance: d.nullish()
|
|
3104
3447
|
});
|
|
3105
|
-
const
|
|
3448
|
+
const _e = e.object({
|
|
3106
3449
|
campaignId: e.string(),
|
|
3107
3450
|
business: e.string(),
|
|
3108
3451
|
runAt: e.coerce.date(),
|
|
3109
|
-
recipient:
|
|
3452
|
+
recipient: he,
|
|
3110
3453
|
/** Personalised, editor-data-free content keyed by channel. */
|
|
3111
3454
|
content: e.record(e.string(), e.unknown()),
|
|
3112
|
-
mode:
|
|
3113
|
-
channels: e.array(
|
|
3455
|
+
mode: z,
|
|
3456
|
+
channels: e.array(U)
|
|
3114
3457
|
});
|
|
3115
3458
|
e.object({
|
|
3116
3459
|
campaignId: e.string(),
|
|
3117
3460
|
/** Absent only on multi-channel jobs, which carry `dispatch` instead. */
|
|
3118
|
-
notification:
|
|
3461
|
+
notification: ue.optional(),
|
|
3119
3462
|
business: e.string(),
|
|
3120
3463
|
/**
|
|
3121
3464
|
* Present only for multi-channel broadcasts. When set the job takes the
|
|
3122
3465
|
* multi-channel dispatch path; when absent the legacy single-channel path
|
|
3123
3466
|
* runs unchanged.
|
|
3124
3467
|
*/
|
|
3125
|
-
dispatch:
|
|
3126
|
-
}).superRefine((
|
|
3127
|
-
!
|
|
3468
|
+
dispatch: _e.optional()
|
|
3469
|
+
}).superRefine((o, a) => {
|
|
3470
|
+
!o.notification && !o.dispatch && a.addIssue({
|
|
3128
3471
|
code: e.ZodIssueCode.custom,
|
|
3129
3472
|
message: "Job must carry either a notification or a dispatch"
|
|
3130
3473
|
});
|
|
@@ -3133,19 +3476,19 @@ e.object({
|
|
|
3133
3476
|
phone: e.string(),
|
|
3134
3477
|
message: e.string()
|
|
3135
3478
|
});
|
|
3136
|
-
const
|
|
3479
|
+
const N = e.object({
|
|
3137
3480
|
name: e.string().optional(),
|
|
3138
3481
|
address: e.string()
|
|
3139
|
-
}),
|
|
3482
|
+
}), ye = e.object({
|
|
3140
3483
|
filename: e.string(),
|
|
3141
3484
|
content: e.instanceof(Uint8Array)
|
|
3142
3485
|
});
|
|
3143
3486
|
e.object({
|
|
3144
|
-
from:
|
|
3145
|
-
to: e.array(
|
|
3487
|
+
from: N.optional(),
|
|
3488
|
+
to: e.array(N),
|
|
3146
3489
|
subject: e.string(),
|
|
3147
3490
|
html: e.string().optional(),
|
|
3148
|
-
attachments: e.array(
|
|
3491
|
+
attachments: e.array(ye).optional()
|
|
3149
3492
|
});
|
|
3150
3493
|
e.object({
|
|
3151
3494
|
subject: e.string(),
|
|
@@ -3185,7 +3528,7 @@ e.object({
|
|
|
3185
3528
|
billId: e.string()
|
|
3186
3529
|
});
|
|
3187
3530
|
e.object({
|
|
3188
|
-
amount:
|
|
3531
|
+
amount: A,
|
|
3189
3532
|
member: e.string(),
|
|
3190
3533
|
bill: e.string(),
|
|
3191
3534
|
otp: e.string().nullish(),
|
|
@@ -3194,15 +3537,15 @@ e.object({
|
|
|
3194
3537
|
e.object({
|
|
3195
3538
|
orderId: e.string()
|
|
3196
3539
|
});
|
|
3197
|
-
var
|
|
3198
|
-
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);
|
|
3199
3542
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
3200
3543
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
3201
3544
|
e.enum(["quota"]);
|
|
3202
|
-
var
|
|
3203
|
-
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);
|
|
3204
3547
|
e.enum(["restaurant"]);
|
|
3205
|
-
const
|
|
3548
|
+
const fe = e.object({
|
|
3206
3549
|
label: e.string(),
|
|
3207
3550
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
3208
3551
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -3212,41 +3555,41 @@ const $ = e.object({
|
|
|
3212
3555
|
reason: e.string().optional()
|
|
3213
3556
|
});
|
|
3214
3557
|
e.object({
|
|
3215
|
-
_id:
|
|
3558
|
+
_id: n,
|
|
3216
3559
|
businessId: e.string(),
|
|
3217
3560
|
userId: e.string(),
|
|
3218
3561
|
email: e.string().nullish(),
|
|
3219
3562
|
phoneNo: e.string().nullish(),
|
|
3220
|
-
permissions: e.array(e.lazy(() =>
|
|
3563
|
+
permissions: e.array(e.lazy(() => fe))
|
|
3221
3564
|
}).describe(
|
|
3222
|
-
|
|
3565
|
+
m.describe({
|
|
3223
3566
|
collectionName: "PermissionUsers",
|
|
3224
3567
|
transform: {
|
|
3225
3568
|
_id: "oid"
|
|
3226
3569
|
}
|
|
3227
3570
|
})
|
|
3228
3571
|
);
|
|
3229
|
-
const
|
|
3572
|
+
const R = e.object({
|
|
3230
3573
|
userId: e.string(),
|
|
3231
3574
|
level: e.number(),
|
|
3232
3575
|
role: e.string().optional(),
|
|
3233
3576
|
businessId: e.string().optional(),
|
|
3234
3577
|
restaurantId: e.string().optional()
|
|
3235
|
-
}),
|
|
3578
|
+
}), be = e.function().args(e.any(), R).returns(e.boolean()), He = e.function().args(R).returns(e.promise(e.array(e.any())));
|
|
3236
3579
|
e.object({
|
|
3237
|
-
isAdmin:
|
|
3238
|
-
getRules:
|
|
3580
|
+
isAdmin: be,
|
|
3581
|
+
getRules: He
|
|
3239
3582
|
});
|
|
3240
3583
|
e.object({
|
|
3241
|
-
transactions: e.array(
|
|
3242
|
-
collections: e.array(
|
|
3584
|
+
transactions: e.array(F),
|
|
3585
|
+
collections: e.array(G)
|
|
3243
3586
|
});
|
|
3244
|
-
const
|
|
3587
|
+
const L = e.enum([
|
|
3245
3588
|
"ROCK_PAPER_SCISSOR"
|
|
3246
3589
|
]);
|
|
3247
|
-
|
|
3590
|
+
L.enum.ROCK_PAPER_SCISSOR + "";
|
|
3248
3591
|
e.object({
|
|
3249
|
-
type:
|
|
3592
|
+
type: L
|
|
3250
3593
|
});
|
|
3251
3594
|
e.object({
|
|
3252
3595
|
host: e.string().url(),
|
|
@@ -3255,7 +3598,7 @@ e.object({
|
|
|
3255
3598
|
roomId: e.string()
|
|
3256
3599
|
});
|
|
3257
3600
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
3258
|
-
const
|
|
3601
|
+
const ze = {
|
|
3259
3602
|
collectionName: "MarketingMaterials",
|
|
3260
3603
|
transform: {
|
|
3261
3604
|
_id: "oid",
|
|
@@ -3263,14 +3606,14 @@ const ae = {
|
|
|
3263
3606
|
}
|
|
3264
3607
|
};
|
|
3265
3608
|
e.object({
|
|
3266
|
-
_id:
|
|
3267
|
-
business:
|
|
3609
|
+
_id: n,
|
|
3610
|
+
business: n,
|
|
3268
3611
|
imageUrl: e.string().url(),
|
|
3269
3612
|
headline: e.string(),
|
|
3270
3613
|
caption: e.string(),
|
|
3271
3614
|
editedAt: e.coerce.date(),
|
|
3272
3615
|
deletedAt: e.coerce.date().optional()
|
|
3273
|
-
}).describe(
|
|
3616
|
+
}).describe(m.describe(ze));
|
|
3274
3617
|
e.object({
|
|
3275
3618
|
id: e.number(),
|
|
3276
3619
|
name: e.string(),
|
|
@@ -3290,12 +3633,12 @@ e.object({
|
|
|
3290
3633
|
phone: e.string().optional(),
|
|
3291
3634
|
email: e.string().optional()
|
|
3292
3635
|
});
|
|
3293
|
-
const
|
|
3636
|
+
const Te = e.enum([
|
|
3294
3637
|
"PENDING",
|
|
3295
3638
|
"SUCCESS",
|
|
3296
3639
|
"FAILED",
|
|
3297
3640
|
"RETRYING"
|
|
3298
|
-
]),
|
|
3641
|
+
]), Ce = {
|
|
3299
3642
|
collectionName: "WebhookLogs",
|
|
3300
3643
|
transform: {
|
|
3301
3644
|
_id: "oid",
|
|
@@ -3303,39 +3646,39 @@ const ne = e.enum([
|
|
|
3303
3646
|
}
|
|
3304
3647
|
};
|
|
3305
3648
|
e.object({
|
|
3306
|
-
_id:
|
|
3307
|
-
business:
|
|
3649
|
+
_id: n,
|
|
3650
|
+
business: n,
|
|
3308
3651
|
type: e.string(),
|
|
3309
3652
|
payload: e.record(e.any()),
|
|
3310
|
-
status:
|
|
3653
|
+
status: Te,
|
|
3311
3654
|
response: e.any().optional(),
|
|
3312
3655
|
error: e.string().optional()
|
|
3313
|
-
}).describe(
|
|
3314
|
-
const
|
|
3656
|
+
}).describe(m.describe(Ce));
|
|
3657
|
+
const ve = e.enum(["AUTO", "MANUAL"]);
|
|
3315
3658
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
3316
|
-
const
|
|
3317
|
-
_id:
|
|
3659
|
+
const x = e.object({
|
|
3660
|
+
_id: n,
|
|
3318
3661
|
name: e.string().min(1, "Name is required").max(50),
|
|
3319
|
-
type:
|
|
3320
|
-
event:
|
|
3321
|
-
}),
|
|
3662
|
+
type: ve,
|
|
3663
|
+
event: V.optional()
|
|
3664
|
+
}), Se = e.object({
|
|
3322
3665
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
3323
3666
|
to: e.number().int("Must be integer").nullish()
|
|
3324
|
-
}).superRefine((
|
|
3325
|
-
|
|
3667
|
+
}).superRefine((o, a) => {
|
|
3668
|
+
o.from && o.to && o.from > o.to && a.addIssue({
|
|
3326
3669
|
code: "custom",
|
|
3327
3670
|
message: "Max referral count must be more than min referral count"
|
|
3328
3671
|
});
|
|
3329
|
-
}),
|
|
3330
|
-
threshold:
|
|
3331
|
-
rewards: e.array(
|
|
3332
|
-
pf_reward: e.array(
|
|
3333
|
-
}),
|
|
3672
|
+
}), Ne = e.object({
|
|
3673
|
+
threshold: Se,
|
|
3674
|
+
rewards: e.array(n),
|
|
3675
|
+
pf_reward: e.array(T).optional()
|
|
3676
|
+
}), C = e.object({
|
|
3334
3677
|
id: e.string(),
|
|
3335
3678
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
3336
|
-
rule:
|
|
3337
|
-
rewards: e.array(
|
|
3338
|
-
}),
|
|
3679
|
+
rule: B.optional(),
|
|
3680
|
+
rewards: e.array(Ne)
|
|
3681
|
+
}), Ue = {
|
|
3339
3682
|
collectionName: "ReferralRecords",
|
|
3340
3683
|
transform: {
|
|
3341
3684
|
_id: "oid",
|
|
@@ -3344,25 +3687,25 @@ const j = e.object({
|
|
|
3344
3687
|
referee: "oid",
|
|
3345
3688
|
refereeReward: "oid"
|
|
3346
3689
|
}
|
|
3347
|
-
},
|
|
3690
|
+
}, Pe = e.object({
|
|
3348
3691
|
completedAt: e.coerce.date(),
|
|
3349
|
-
criteria:
|
|
3692
|
+
criteria: n,
|
|
3350
3693
|
ref: e.string()
|
|
3351
|
-
}),
|
|
3352
|
-
_id:
|
|
3353
|
-
business:
|
|
3354
|
-
referer:
|
|
3355
|
-
referee:
|
|
3356
|
-
criteria: e.array(
|
|
3357
|
-
reward: e.array(
|
|
3358
|
-
refereeReward: e.array(
|
|
3359
|
-
criteria_progress: e.array(
|
|
3694
|
+
}), je = e.object({
|
|
3695
|
+
_id: n,
|
|
3696
|
+
business: n,
|
|
3697
|
+
referer: n,
|
|
3698
|
+
referee: n,
|
|
3699
|
+
criteria: e.array(x),
|
|
3700
|
+
reward: e.array(C),
|
|
3701
|
+
refereeReward: e.array(n).optional(),
|
|
3702
|
+
criteria_progress: e.array(Pe),
|
|
3360
3703
|
status: e.string(),
|
|
3361
|
-
pf_referer:
|
|
3362
|
-
pf_referee:
|
|
3363
|
-
pf_refereeReward: e.array(
|
|
3364
|
-
}).describe(
|
|
3365
|
-
|
|
3704
|
+
pf_referer: g.optional(),
|
|
3705
|
+
pf_referee: g.optional(),
|
|
3706
|
+
pf_refereeReward: e.array(T).optional()
|
|
3707
|
+
}).describe(m.describe(Ue));
|
|
3708
|
+
je.pick({
|
|
3366
3709
|
_id: !0,
|
|
3367
3710
|
business: !0,
|
|
3368
3711
|
referer: !0,
|
|
@@ -3370,79 +3713,83 @@ me.pick({
|
|
|
3370
3713
|
criteria_progress: !0,
|
|
3371
3714
|
criteria: !0
|
|
3372
3715
|
}).extend({
|
|
3373
|
-
pf_referee:
|
|
3716
|
+
pf_referee: g.pick({
|
|
3374
3717
|
_id: !0,
|
|
3375
3718
|
name: !0,
|
|
3376
3719
|
phoneNumber: !0,
|
|
3377
3720
|
photoUrl: !0
|
|
3378
3721
|
})
|
|
3379
3722
|
});
|
|
3380
|
-
const
|
|
3723
|
+
const Ee = {
|
|
3381
3724
|
collectionName: "ReferralProgram",
|
|
3382
3725
|
transform: {
|
|
3383
3726
|
_id: "oid",
|
|
3384
3727
|
business: "oid"
|
|
3385
3728
|
}
|
|
3386
|
-
},
|
|
3387
|
-
_id:
|
|
3388
|
-
business:
|
|
3729
|
+
}, D = e.object({
|
|
3730
|
+
_id: n,
|
|
3731
|
+
business: n,
|
|
3389
3732
|
term_and_condition: e.string().optional(),
|
|
3390
|
-
refereeReward: e.array(
|
|
3391
|
-
reward: e.array(
|
|
3392
|
-
criteria: e.array(
|
|
3393
|
-
}).describe(
|
|
3733
|
+
refereeReward: e.array(n).optional(),
|
|
3734
|
+
reward: e.array(C),
|
|
3735
|
+
criteria: e.array(x)
|
|
3736
|
+
}).describe(m.describe(Ee));
|
|
3394
3737
|
e.object({
|
|
3395
|
-
referer:
|
|
3396
|
-
referee:
|
|
3397
|
-
business:
|
|
3738
|
+
referer: n,
|
|
3739
|
+
referee: n,
|
|
3740
|
+
business: n
|
|
3398
3741
|
});
|
|
3399
3742
|
e.object({
|
|
3400
|
-
program:
|
|
3743
|
+
program: D.pick({
|
|
3401
3744
|
_id: !0,
|
|
3402
3745
|
business: !0,
|
|
3403
3746
|
term_and_condition: !0
|
|
3404
3747
|
}).extend({
|
|
3405
|
-
reward:
|
|
3406
|
-
pf_refereeReward: e.array(
|
|
3748
|
+
reward: C.optional(),
|
|
3749
|
+
pf_refereeReward: e.array(T).optional()
|
|
3407
3750
|
}),
|
|
3408
3751
|
referralCount: e.number(),
|
|
3409
3752
|
successReferralCount: e.number(),
|
|
3410
|
-
referredBy:
|
|
3753
|
+
referredBy: g.pick({
|
|
3411
3754
|
_id: !0,
|
|
3412
3755
|
name: !0,
|
|
3413
3756
|
phoneNumber: !0,
|
|
3414
3757
|
photoUrl: !0
|
|
3415
3758
|
}).optional()
|
|
3416
3759
|
});
|
|
3417
|
-
|
|
3760
|
+
D.extend({
|
|
3418
3761
|
updateReferralRecord: e.boolean().optional()
|
|
3419
3762
|
});
|
|
3420
|
-
const
|
|
3763
|
+
const Je = e.object({
|
|
3421
3764
|
facebookPageId: e.string(),
|
|
3422
3765
|
pageName: e.string(),
|
|
3423
3766
|
pageProfileImageUrl: e.string(),
|
|
3424
3767
|
pageAccessToken: e.string().optional(),
|
|
3425
|
-
locationIds: e.array(
|
|
3426
|
-
}),
|
|
3427
|
-
locationId:
|
|
3768
|
+
locationIds: e.array(n)
|
|
3769
|
+
}), Oe = e.object({
|
|
3770
|
+
locationId: n.nullable(),
|
|
3428
3771
|
googleLocationName: e.string(),
|
|
3429
3772
|
displayName: e.string().optional()
|
|
3430
|
-
}),
|
|
3773
|
+
}), Ie = e.object({
|
|
3431
3774
|
accessToken: e.string().nullable(),
|
|
3432
3775
|
refreshToken: e.string().nullable(),
|
|
3433
3776
|
accessTokenExpiresAt: e.date().nullable(),
|
|
3434
|
-
locations: e.array(
|
|
3435
|
-
|
|
3777
|
+
locations: e.array(Oe),
|
|
3778
|
+
lastSyncTime: e.coerce.date().nullish(),
|
|
3779
|
+
syncFrequency: e.number().int().min(1).max(30).default(30)
|
|
3780
|
+
}), Re = e.object({
|
|
3436
3781
|
token: e.string().nullable(),
|
|
3437
|
-
pages: e.array(
|
|
3782
|
+
pages: e.array(Je),
|
|
3783
|
+
lastSyncTime: e.coerce.date().nullish(),
|
|
3784
|
+
syncFrequency: e.number().int().min(1).max(30).default(30)
|
|
3438
3785
|
});
|
|
3439
3786
|
e.object({
|
|
3440
|
-
_id:
|
|
3441
|
-
businessId:
|
|
3442
|
-
google:
|
|
3443
|
-
facebook:
|
|
3787
|
+
_id: n,
|
|
3788
|
+
businessId: n,
|
|
3789
|
+
google: Ie.nullable(),
|
|
3790
|
+
facebook: Re.nullable()
|
|
3444
3791
|
}).describe(
|
|
3445
|
-
|
|
3792
|
+
m.describe({
|
|
3446
3793
|
collectionName: "ReviewSourceConfig",
|
|
3447
3794
|
transform: {
|
|
3448
3795
|
_id: "oid",
|
|
@@ -3486,7 +3833,9 @@ e.object({
|
|
|
3486
3833
|
displayName: e.string().optional(),
|
|
3487
3834
|
locationId: e.string().nullable()
|
|
3488
3835
|
})
|
|
3489
|
-
)
|
|
3836
|
+
),
|
|
3837
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
3838
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
3490
3839
|
}).nullable(),
|
|
3491
3840
|
facebook: e.object({
|
|
3492
3841
|
token: e.string().nullable(),
|
|
@@ -3497,30 +3846,32 @@ e.object({
|
|
|
3497
3846
|
pageProfileImageUrl: e.string(),
|
|
3498
3847
|
locationIds: e.array(e.string())
|
|
3499
3848
|
})
|
|
3500
|
-
)
|
|
3849
|
+
),
|
|
3850
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
3851
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
3501
3852
|
}).nullable()
|
|
3502
3853
|
});
|
|
3503
|
-
const
|
|
3854
|
+
const u = e.object({
|
|
3504
3855
|
name: e.string(),
|
|
3505
3856
|
pictureUrl: e.string(),
|
|
3506
3857
|
phoneNumber: e.string().optional()
|
|
3507
|
-
}),
|
|
3858
|
+
}), Le = u.extend({
|
|
3508
3859
|
isAnonymous: e.boolean().optional()
|
|
3509
|
-
}),
|
|
3860
|
+
}), xe = u.extend({
|
|
3510
3861
|
id: e.string().optional()
|
|
3511
|
-
}),
|
|
3862
|
+
}), h = e.object({
|
|
3512
3863
|
comment: e.string(),
|
|
3513
3864
|
updateTime: e.coerce.date()
|
|
3514
3865
|
});
|
|
3515
3866
|
e.object({
|
|
3516
3867
|
comment: e.string().trim().min(1).max(4096)
|
|
3517
3868
|
});
|
|
3518
|
-
const
|
|
3869
|
+
const s = e.object({
|
|
3519
3870
|
externalId: e.string().optional(),
|
|
3520
3871
|
thumbnailUrl: e.string(),
|
|
3521
3872
|
thumbnailLabel: e.string(),
|
|
3522
3873
|
videoUrl: e.string().optional()
|
|
3523
|
-
}),
|
|
3874
|
+
}), De = {
|
|
3524
3875
|
collectionName: "Reviews",
|
|
3525
3876
|
transform: {
|
|
3526
3877
|
_id: "oid",
|
|
@@ -3528,31 +3879,31 @@ const l = e.object({
|
|
|
3528
3879
|
reviewerId: "oid",
|
|
3529
3880
|
restaurantId: "oid"
|
|
3530
3881
|
}
|
|
3531
|
-
},
|
|
3882
|
+
}, w = e.enum([
|
|
3532
3883
|
"google",
|
|
3533
3884
|
"facebook",
|
|
3534
3885
|
"feedme",
|
|
3535
3886
|
"feedvibe"
|
|
3536
3887
|
]);
|
|
3537
|
-
|
|
3888
|
+
w.options;
|
|
3538
3889
|
e.enum(["google", "facebook"]);
|
|
3539
|
-
const
|
|
3890
|
+
const we = e.enum([
|
|
3540
3891
|
"createTime_desc",
|
|
3541
3892
|
"createTime_asc",
|
|
3542
3893
|
"rating_asc",
|
|
3543
3894
|
"rating_desc"
|
|
3544
3895
|
]);
|
|
3545
3896
|
e.object({
|
|
3546
|
-
source:
|
|
3897
|
+
source: w.array().optional(),
|
|
3547
3898
|
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
3548
3899
|
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
3549
3900
|
locationId: e.string().optional(),
|
|
3550
3901
|
excludeDeleted: e.boolean().optional(),
|
|
3551
|
-
sort:
|
|
3902
|
+
sort: we.optional(),
|
|
3552
3903
|
limit: e.coerce.number().int().positive().optional(),
|
|
3553
3904
|
skip: e.coerce.number().int().min(0).optional()
|
|
3554
3905
|
});
|
|
3555
|
-
const
|
|
3906
|
+
const pt = e.object({
|
|
3556
3907
|
averageScore: e.number(),
|
|
3557
3908
|
total: e.number().int().nonnegative(),
|
|
3558
3909
|
starCounts: e.array(
|
|
@@ -3561,54 +3912,54 @@ const Ve = e.object({
|
|
|
3561
3912
|
count: e.number().int().nonnegative()
|
|
3562
3913
|
})
|
|
3563
3914
|
)
|
|
3564
|
-
}),
|
|
3915
|
+
}), _ = e.object({
|
|
3565
3916
|
name: e.string(),
|
|
3566
3917
|
pictureUrl: e.string().optional(),
|
|
3567
3918
|
phoneNumber: e.string().optional()
|
|
3568
|
-
}),
|
|
3919
|
+
}), Ae = _.extend({
|
|
3569
3920
|
_id: e.string().optional()
|
|
3570
|
-
}),
|
|
3921
|
+
}), Me = _.extend({
|
|
3571
3922
|
_id: e.string()
|
|
3572
|
-
}),
|
|
3923
|
+
}), Fe = _.extend({
|
|
3573
3924
|
isAnonymous: e.boolean().optional()
|
|
3574
|
-
}),
|
|
3925
|
+
}), Ge = _.extend({
|
|
3575
3926
|
id: e.string().optional()
|
|
3576
|
-
}),
|
|
3577
|
-
_id:
|
|
3927
|
+
}), y = e.object({
|
|
3928
|
+
_id: n,
|
|
3578
3929
|
comment: e.string(),
|
|
3579
3930
|
createTime: e.coerce.date(),
|
|
3580
3931
|
updateTime: e.coerce.date().nullish(),
|
|
3581
|
-
restaurantId:
|
|
3932
|
+
restaurantId: n,
|
|
3582
3933
|
restaurantName: e.string()
|
|
3583
|
-
}),
|
|
3934
|
+
}), ke = y.extend({
|
|
3584
3935
|
source: e.literal("google"),
|
|
3585
3936
|
externalId: e.string().min(1),
|
|
3586
3937
|
translatedComment: e.string().optional(),
|
|
3587
|
-
reviewer:
|
|
3588
|
-
reply:
|
|
3589
|
-
mediaItems: e.array(
|
|
3938
|
+
reviewer: Fe.optional(),
|
|
3939
|
+
reply: h.optional(),
|
|
3940
|
+
mediaItems: e.array(s),
|
|
3590
3941
|
starRating: e.number(),
|
|
3591
3942
|
locationName: e.string(),
|
|
3592
3943
|
locationDisplayName: e.string(),
|
|
3593
3944
|
originalUrl: e.string().optional()
|
|
3594
|
-
}),
|
|
3945
|
+
}), Be = y.extend({
|
|
3595
3946
|
source: e.literal("facebook"),
|
|
3596
3947
|
externalId: e.string().min(1),
|
|
3597
|
-
reviewer:
|
|
3948
|
+
reviewer: Ge.optional(),
|
|
3598
3949
|
isPositive: e.boolean().optional(),
|
|
3599
3950
|
pageId: e.string(),
|
|
3600
3951
|
pageName: e.string()
|
|
3601
|
-
}),
|
|
3952
|
+
}), Ve = y.extend({
|
|
3602
3953
|
source: e.literal("feedme"),
|
|
3603
|
-
reviewer:
|
|
3604
|
-
reply:
|
|
3954
|
+
reviewer: Ae.optional(),
|
|
3955
|
+
reply: h.optional(),
|
|
3605
3956
|
starRating: e.number(),
|
|
3606
|
-
mediaItems: e.array(
|
|
3957
|
+
mediaItems: e.array(s),
|
|
3607
3958
|
billId: e.string()
|
|
3608
|
-
}),
|
|
3959
|
+
}), We = y.extend({
|
|
3609
3960
|
source: e.literal("feedvibe"),
|
|
3610
3961
|
externalId: e.string().min(1),
|
|
3611
|
-
reviewer:
|
|
3962
|
+
reviewer: Me.optional(),
|
|
3612
3963
|
rating: e.object({
|
|
3613
3964
|
overall: e.number(),
|
|
3614
3965
|
food: e.number(),
|
|
@@ -3616,67 +3967,67 @@ const Ve = e.object({
|
|
|
3616
3967
|
atmosphere: e.number()
|
|
3617
3968
|
}),
|
|
3618
3969
|
verified: e.boolean(),
|
|
3619
|
-
mediaItems: e.array(
|
|
3970
|
+
mediaItems: e.array(s).default([])
|
|
3620
3971
|
});
|
|
3621
3972
|
e.discriminatedUnion("source", [
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3973
|
+
ke,
|
|
3974
|
+
Be,
|
|
3975
|
+
Ve,
|
|
3976
|
+
We
|
|
3626
3977
|
]);
|
|
3627
3978
|
e.object({
|
|
3628
3979
|
comment: e.string(),
|
|
3629
3980
|
starRating: e.number(),
|
|
3630
3981
|
billId: e.string(),
|
|
3631
3982
|
isAnonymous: e.boolean(),
|
|
3632
|
-
mediaItems: e.array(
|
|
3983
|
+
mediaItems: e.array(s).optional()
|
|
3633
3984
|
});
|
|
3634
3985
|
e.object({
|
|
3635
3986
|
name: e.string().trim().min(1),
|
|
3636
3987
|
phoneNumber: e.string().trim().min(1).optional()
|
|
3637
3988
|
});
|
|
3638
|
-
const
|
|
3639
|
-
_id:
|
|
3640
|
-
businessId:
|
|
3989
|
+
const f = e.object({
|
|
3990
|
+
_id: n,
|
|
3991
|
+
businessId: n,
|
|
3641
3992
|
comment: e.string(),
|
|
3642
3993
|
createTime: e.coerce.date(),
|
|
3643
3994
|
updateTime: e.coerce.date().nullish(),
|
|
3644
|
-
restaurantId:
|
|
3995
|
+
restaurantId: n,
|
|
3645
3996
|
restaurantName: e.string(),
|
|
3646
3997
|
deletedAt: e.coerce.date().optional()
|
|
3647
|
-
}),
|
|
3998
|
+
}), Ye = f.extend({
|
|
3648
3999
|
source: e.literal("google"),
|
|
3649
4000
|
externalId: e.string().min(1),
|
|
3650
4001
|
translatedComment: e.string().optional(),
|
|
3651
|
-
reviewer:
|
|
3652
|
-
reply:
|
|
3653
|
-
mediaItems: e.array(
|
|
4002
|
+
reviewer: Le.optional(),
|
|
4003
|
+
reply: h.optional(),
|
|
4004
|
+
mediaItems: e.array(s),
|
|
3654
4005
|
starRating: e.number(),
|
|
3655
4006
|
locationName: e.string(),
|
|
3656
4007
|
locationDisplayName: e.string(),
|
|
3657
4008
|
originalUrl: e.string().optional()
|
|
3658
|
-
}),
|
|
4009
|
+
}), Ke = f.extend({
|
|
3659
4010
|
source: e.literal("facebook"),
|
|
3660
4011
|
externalId: e.string().min(1),
|
|
3661
|
-
reviewer:
|
|
4012
|
+
reviewer: xe.optional(),
|
|
3662
4013
|
isPositive: e.boolean().optional(),
|
|
3663
4014
|
pageId: e.string(),
|
|
3664
4015
|
pageName: e.string()
|
|
3665
|
-
}),
|
|
4016
|
+
}), qe = f.extend({
|
|
3666
4017
|
source: e.literal("feedme"),
|
|
3667
4018
|
isAnonymous: e.boolean(),
|
|
3668
4019
|
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
3669
|
-
reviewerId:
|
|
3670
|
-
reviewer:
|
|
3671
|
-
reply:
|
|
4020
|
+
reviewerId: n.optional(),
|
|
4021
|
+
reviewer: u.optional(),
|
|
4022
|
+
reply: h.optional(),
|
|
3672
4023
|
starRating: e.number(),
|
|
3673
4024
|
billId: e.string(),
|
|
3674
|
-
mediaItems: e.array(
|
|
3675
|
-
}),
|
|
4025
|
+
mediaItems: e.array(s)
|
|
4026
|
+
}), Xe = f.extend({
|
|
3676
4027
|
source: e.literal("feedvibe"),
|
|
3677
4028
|
externalId: e.string().min(1),
|
|
3678
|
-
reviewerId:
|
|
3679
|
-
reviewer:
|
|
4029
|
+
reviewerId: n,
|
|
4030
|
+
reviewer: u,
|
|
3680
4031
|
rating: e.object({
|
|
3681
4032
|
overall: e.number(),
|
|
3682
4033
|
food: e.number(),
|
|
@@ -3684,23 +4035,29 @@ const d = e.object({
|
|
|
3684
4035
|
atmosphere: e.number()
|
|
3685
4036
|
}),
|
|
3686
4037
|
verified: e.boolean(),
|
|
3687
|
-
mediaItems: e.array(
|
|
4038
|
+
mediaItems: e.array(s).default([])
|
|
3688
4039
|
});
|
|
3689
4040
|
e.discriminatedUnion("source", [
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
]).describe(
|
|
4041
|
+
Ye,
|
|
4042
|
+
Ke,
|
|
4043
|
+
qe,
|
|
4044
|
+
Xe
|
|
4045
|
+
]).describe(m.describe(De));
|
|
3695
4046
|
export {
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
4047
|
+
ae as F,
|
|
4048
|
+
t as R,
|
|
4049
|
+
lt as S,
|
|
4050
|
+
it as T,
|
|
4051
|
+
ct as W,
|
|
4052
|
+
H as a,
|
|
4053
|
+
rt as b,
|
|
4054
|
+
C as c,
|
|
4055
|
+
Ne as d,
|
|
4056
|
+
x as e,
|
|
4057
|
+
$ as f,
|
|
4058
|
+
Z as g,
|
|
4059
|
+
pt as h,
|
|
4060
|
+
W as i,
|
|
4061
|
+
h as j,
|
|
4062
|
+
q as s
|
|
3706
4063
|
};
|