@feedmepos/mf-connect 0.1.111-prod → 0.1.113-beta.3
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-D3pYl3WL.js → App-YfpYV7C0.js} +738 -689
- package/dist/AuditLogs-kD0_HO_p.js +2016 -0
- package/dist/{Bin-DOZqpbYH.js → Bin-Dr-Xp3pn.js} +8 -8
- package/dist/Broadcast-CEbHu2xA.js +306 -0
- package/dist/{CampaignAnalytic-cFKvCgxX.js → CampaignAnalytic-DDiGxPwp.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B0eVEubS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cc_Yho9-.js} +49 -32
- package/dist/Card-BUnwg0eM.js +1086 -0
- package/dist/{Collections-9QK5hbLo.js → Collections-CKyBkKq2.js} +197 -185
- package/dist/{Credit-8Ouy4O9a.js → Credit-CJOXWLV1.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CJA-yunY.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DmEBLeNI.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ce5R4Un6.js +4442 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Dv0q3B8m.js → EffectSheet.vue_vue_type_style_index_0_lang-CMFmlqfF.js} +32 -32
- package/dist/{Experience-DMh4hR1S.js → Experience-C_Am5CTY.js} +32 -31
- package/dist/{FileSaver.min-Bx9mdUgJ.js → FileSaver.min-CueAGbjq.js} +1 -1
- package/dist/{Game-CL0TZvg1.js → Game-B6GO_LVU.js} +19 -18
- package/dist/GiftCardSetup-CVLDDpI2.js +748 -0
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Bz5kIfoM.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-isfGhKO1.js} +7 -7
- package/dist/{Goals-Dz5Vp-lj.js → Goals-BX-sMV2V.js} +4 -4
- package/dist/Grab-Bh335Srh.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CaPDI3vY.js → ImageInput.vue_vue_type_script_setup_true_lang-srSgUY3e.js} +1 -1
- package/dist/{Index-kH8aAegB.js → Index-CyXRbwcm.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CFrgC3Ka.js → LocationPicker.vue_vue_type_script_setup_true_lang-S3GB2Ems.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DPIFLdBc.js → LottieAnimation.vue_vue_type_script_setup_true_lang-ZlWHXwXZ.js} +1 -1
- package/dist/{LoyaltyDashboard-BBxEoWol.js → LoyaltyDashboard-DrTq8oiu.js} +15 -15
- package/dist/MainLayout-KbKkpX5n.js +4 -0
- package/dist/{MainLayout-2BLwDyHQ.js → MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js} +5 -4
- package/dist/{Marketing-C4OnSV-c.js → Marketing-DQT1MWQg.js} +4 -4
- package/dist/MarketingMaterialEdit-fSqr53-M.js +1037 -0
- package/dist/{Member-CT9WwxP0.js → Member-DwDUCzlv.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C7yznkUn.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaQ4Lw8f.js} +43 -49
- package/dist/{MemberImportHistory-B__BFID7.js → MemberImportHistory-D4ezvJGZ.js} +7 -7
- package/dist/{MemberList-DgLI4wty.js → MemberList-DFieV7Qk.js} +103 -105
- package/dist/{MemberTransactions-UFx_DZYe.js → MemberTransactions-BPOXyAuC.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BFjZA8Y6.js → MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js} +4821 -4690
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Df9bxbUl.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CX8bk_IQ.js} +1 -1
- package/dist/{Mission-CawzGzDu.js → Mission-nErb05Es.js} +22 -21
- package/dist/{Overview-D19oSo24.js → Overview-7G31a7B-.js} +58 -56
- package/dist/{Overview-CAtTlEVa.js → Overview-DuJr_hAg.js} +145 -144
- package/dist/{Point-BPAGmKAj.js → Point-PWDLemD4.js} +22 -21
- package/dist/{Promotion-B0Uf9vjL.js → Promotion-N80Tj8M6.js} +137 -131
- package/dist/{Queue-CJEAFss_.js → Queue-M7ZpgiMT.js} +49 -47
- package/dist/{Record-s6hSQG2P.js → Record-NhxrdvWv.js} +9 -9
- package/dist/{Review-DhNCbAOm.js → Review-DiAaAzIG.js} +2 -2
- package/dist/ReviewFacebookCallback-JdyxFbNl.js +225 -0
- package/dist/{ReviewGoogleCallback-D8ENWii2.js → ReviewGoogleCallback-BXbI3Bsh.js} +5 -5
- package/dist/{Reward-BT00QsXL.js → Reward-yTaOqOT8.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DaZDGhbm.js → RewardGroup.vue_vue_type_script_setup_true_lang-BWPfjZ9K.js} +26 -24
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js +1923 -0
- package/dist/{Segment-BuGhX9zg.js → Segment-DE9Bcd6R.js} +287 -287
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DB718_4P.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-pmv0cb4J.js} +37 -35
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CkgXxy0C.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BeWwkTix.js} +4 -4
- package/dist/Setting-C0JAxIRT.js +574 -0
- package/dist/{SettingAdvertisements-aqFErKAr.js → SettingAdvertisements-DxueyKU8.js} +12 -12
- package/dist/Settings-Cs46AcxZ.js +286 -0
- package/dist/Store-DqQae9nE.js +2629 -0
- package/dist/{StoreRewards-D2pTL2oA.js → StoreRewards-JxSUsOzJ.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-qgrBtUNX.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D7ifzgsI.js +7007 -0
- package/dist/{Tier-OyE8oH2r.js → Tier-DWhgWush.js} +2576 -686
- package/dist/{Title-DAl7CKL_.js → Title-DUNeMdz8.js} +104 -101
- package/dist/Transaction-DAv-LVhC.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C0yHxQVr.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cih-9IoW.js} +26 -26
- package/dist/{Voucher-D2QGWSxs.js → Voucher-uLTq9RSK.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bt2YB745.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BevVL_Kx.js} +16 -16
- package/dist/WhatsappAccount-BpXQ4q0P.js +158 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js +39 -0
- package/dist/WhatsappBot-DB4NRZMd.js +589 -0
- package/dist/WhatsappBotLogs-DDN4H_bv.js +372 -0
- package/dist/WhatsappBotSettings-Bkv1VNwF.js +387 -0
- package/dist/WhatsappBotTickets-DAKgnE6T.js +162 -0
- package/dist/WhatsappLayout-DSnq84Uo.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-1BvxPD-k.js +195 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzCL64Jo.js → ZodTextField.vue_vue_type_script_setup_true_lang-CR-F0x1r.js} +2 -2
- package/dist/{app-QxosLNkH.js → app-Devzv4gO.js} +12854 -9732
- package/dist/app.js +4 -3
- package/dist/base.export-CCSMkvAm.js +75 -0
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-CbqG6NXr.js → business-BjAmUqNA.js} +1 -1
- package/dist/campaign-C5c47GqT.js +400 -0
- package/dist/{campaign-Rj7oDBnN.js → campaign-CTe-T5Gd.js} +31 -25
- package/dist/{campaign.enum-B7vdNYKd.js → campaign.enum-Dx-Zo68Q.js} +3 -2
- package/dist/campaign.fn-DxAO8A5b.js +776 -0
- package/dist/{collectible.enum-BsQseg7-.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-EbUIyB1X.js → collection.fn-C9l-OtNt.js} +2 -2
- package/dist/currency-mwm4AWXK.js +7 -0
- package/dist/duplicateCampaign-BbC4AwQ1.js +51 -0
- package/dist/{effect-B_91OlcX.js → effect-D8ba9z0K.js} +1 -1
- package/dist/{email-addresses-DXnYZG-e.js → email-addresses-BR5J6_Jz.js} +2 -2
- package/dist/feature-flag-C-5NdFW8.js +868 -0
- package/dist/feature-flag-CNcU4_3r.js +50 -0
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-_uhiXya1.js → helper-D9cEaMIv.js} +1 -1
- package/dist/index-0H82-X0n.js +80 -0
- package/dist/{index-Cp7oHMm3.js → index-B1jP-_Z_.js} +691 -229
- package/dist/{index-BZ2b0Pk6.js → index-B7HH6vKF.js} +8 -7
- package/dist/{index-tbo0pMIu.js → index-BFaZp6Et.js} +29 -15
- package/dist/index-B_gzo75q.js +53 -0
- package/dist/{index-DlQJZNwD.js → index-BfoDdVQS.js} +22 -6
- package/dist/{index-CDm0BWa3.js → index-BvY2hQac.js} +1 -1
- package/dist/index-Byg4ztr-.js +902 -0
- package/dist/{index-BWgc2-Qz.js → index-CZfqqrVu.js} +4 -3
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-xuFTeVrb.js → index-CmzjBrHR.js} +11 -9
- package/dist/{index-BBihP1s2.js → index-Ct6YjTIW.js} +2 -2
- package/dist/{index-Df4l6y-S.js → index-D34iYRdc.js} +1900 -2121
- package/dist/{index-DuhRCI0L.js → index-D4k1G2oE.js} +4 -4
- package/dist/{index-uuNGb1nv.js → index-DnepoNWn.js} +8028 -10766
- package/dist/index-Drmh0FT-.js +14571 -0
- package/dist/{index-DlGnYR5y.js → index-DtcUCknS.js} +2700 -2613
- package/dist/{index-C_1iqF1Q.js → index-DwTBiVts.js} +1 -1
- package/dist/{index-CWUmrVo_.js → index-OvnHt5x5.js} +800 -793
- package/dist/index-RwNlbTO8.js +115 -0
- package/dist/{index-CzYxnDWP.js → index-VqAbYyHH.js} +11 -6
- package/dist/{index-DzBzClHP.js → index-yGSko6Eq.js} +1 -1
- package/dist/{index.esm2017-B72iWwk_.js → index.esm2017-DLb2VyCT.js} +156 -156
- package/dist/{loading-rIhCiB_S.js → loading-CUNk5u1d.js} +1 -1
- package/dist/{lodash-B6fOjfjd.js → lodash-BJXravls.js} +1 -1
- package/dist/{member-import-CbHn7zss.js → member-import-DjYoddBi.js} +6 -5
- package/dist/{membership-DkJN7jyQ.js → membership-ByJUFP8f.js} +3 -3
- package/dist/{money-ChbDx6Nq.js → money-Bf2IEMJJ.js} +1 -1
- package/dist/{number-9TEd27Ku.js → number-CRBHrRUL.js} +1 -1
- package/dist/objectid-58gyOvdR.js +145 -0
- package/dist/{onboarding-BN3MKVRs.js → onboarding-CQ3lw7eY.js} +25 -25
- package/dist/{onboardingSetup-D9xhdgS3.js → onboardingSetup-CsdZKGFk.js} +2 -2
- package/dist/{plugins-CCibSJZa.js → plugins-iTZLbJGy.js} +3 -3
- package/dist/{MarketingMaterialEdit-DFhpsI2-.js → remy-icon-BhUGu2NI.js} +2 -1031
- package/dist/{reward-DjasF-NL.js → reward-DTN6JpEd.js} +1 -1
- package/dist/{rule-DqeChj0e.js → rule-BYACNQOL.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template--Vr0PCjB.js +188 -0
- package/dist/{timezone-D0nC1LDx.js → timezone-DwzjOED-.js} +1 -1
- package/dist/{transaction.fn-BkF4Ad2z.js → transaction.fn-DapYe3n7.js} +2 -2
- package/dist/{trigger-CxpXoQJO.js → trigger-D8r76yb0.js} +18 -18
- package/dist/{useMarketingMaterialActions-p0-fyMkm.js → useMarketingMaterialActions-CdMmibPE.js} +3 -3
- package/dist/{usePagination-CrC-1v4L.js → usePagination-BRcQJkO1.js} +1 -1
- package/dist/useWhatsappAccount-BOJ8fz84.js +62 -0
- package/dist/{user-CrylHgF1.js → user-vBZFKqXQ.js} +1 -1
- package/dist/vue-i18n-Cw6fF11e.js +2365 -0
- package/dist/{xlsx-CJNYF7-l.js → xlsx-Muy_Rjhk.js} +440 -440
- package/dist/{zod-Dzn9S95S.js → zod-CCPTOeUz.js} +1 -1
- package/package.json +12 -3
- package/dist/Broadcast-DZ4SP99P.js +0 -271
- package/dist/Card-B5ni027Q.js +0 -911
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYxswo-Z.js +0 -2430
- package/dist/ReviewFacebookCallback-DeZqcpJo.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BvxbKSkB.js +0 -1882
- package/dist/Setting-BOWPp05N.js +0 -2036
- package/dist/Settings-DekXvE-R.js +0 -179
- package/dist/Store-DpVlMuau.js +0 -1998
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNDv6eiZ.js +0 -1009
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C-C3RSeW.js +0 -142
- package/dist/Transaction-mvKzTgLx.js +0 -39
- package/dist/campaign-Co4Lq-Wz.js +0 -228
- package/dist/campaign.fn-DolD3lYJ.js +0 -776
- package/dist/export-D0hWZSfH.js +0 -97
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/index-aCuOvuEC.js +0 -45
- package/dist/objectid-CGol1NeA.js +0 -145
- package/dist/rule-builder-DT854ycI.js +0 -102
- package/dist/template-BeCVA0-N.js +0 -236
- package/dist/vue-i18n-BjtkXdmG.js +0 -2365
|
@@ -1,10 +1,187 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { F as n, m, b as A } from "./index-DnepoNWn.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-D34iYRdc.js";
|
|
4
|
+
import { _ as k, l as v, f as B } from "./index-DtcUCknS.js";
|
|
5
|
+
import { i as p } from "./helper-D9cEaMIv.js";
|
|
6
|
+
import { d as z, b as U, e as d } from "./index-Drmh0FT-.js";
|
|
7
|
+
import { c as V } from "./index-Byg4ztr-.js";
|
|
8
|
+
import { F as T } from "./index-B7HH6vKF.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 = {
|
|
8
185
|
PROMOTION: {
|
|
9
186
|
name: "Promotion Template",
|
|
10
187
|
description: "Promotion template for campaign creation.",
|
|
@@ -410,7 +587,7 @@ const Je = {
|
|
|
410
587
|
// },
|
|
411
588
|
hideInApp: !0
|
|
412
589
|
},
|
|
413
|
-
configs:
|
|
590
|
+
configs: p("VOUCHER", {
|
|
414
591
|
name: "",
|
|
415
592
|
business: null,
|
|
416
593
|
noCampaign: !1
|
|
@@ -1400,7 +1577,7 @@ const Je = {
|
|
|
1400
1577
|
rewards: []
|
|
1401
1578
|
}
|
|
1402
1579
|
},
|
|
1403
|
-
configs:
|
|
1580
|
+
configs: p("GAME", {
|
|
1404
1581
|
name: "Token",
|
|
1405
1582
|
business: null,
|
|
1406
1583
|
noCampaign: !1
|
|
@@ -1641,18 +1818,184 @@ const Je = {
|
|
|
1641
1818
|
type: "timeframe"
|
|
1642
1819
|
}
|
|
1643
1820
|
},
|
|
1644
|
-
configs:
|
|
1821
|
+
configs: p("STAMP", {
|
|
1645
1822
|
business: null,
|
|
1646
1823
|
noCampaign: !1
|
|
1647
1824
|
})
|
|
1648
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
|
+
}
|
|
1649
1992
|
}
|
|
1650
1993
|
};
|
|
1651
|
-
t.scaffoldGroup(),
|
|
1994
|
+
t.scaffoldGroup(), p("STAMP", {
|
|
1652
1995
|
business: null,
|
|
1653
1996
|
noCampaign: !1
|
|
1654
1997
|
});
|
|
1655
|
-
const
|
|
1998
|
+
const lt = {
|
|
1656
1999
|
_id: "",
|
|
1657
2000
|
intention: [],
|
|
1658
2001
|
name: "Spend and get voucher",
|
|
@@ -2050,7 +2393,7 @@ const Ee = {
|
|
|
2050
2393
|
amount: 1
|
|
2051
2394
|
}
|
|
2052
2395
|
},
|
|
2053
|
-
configs:
|
|
2396
|
+
configs: p("VOUCHER", {
|
|
2054
2397
|
name: "",
|
|
2055
2398
|
business: null,
|
|
2056
2399
|
noCampaign: !1
|
|
@@ -2059,7 +2402,7 @@ const Ee = {
|
|
|
2059
2402
|
};
|
|
2060
2403
|
({
|
|
2061
2404
|
...t.scaffoldGroup()
|
|
2062
|
-
},
|
|
2405
|
+
}, p("VOUCHER", {
|
|
2063
2406
|
name: "",
|
|
2064
2407
|
business: null,
|
|
2065
2408
|
noCampaign: !1
|
|
@@ -2070,7 +2413,7 @@ const Ee = {
|
|
|
2070
2413
|
({
|
|
2071
2414
|
...t.scaffoldGroup()
|
|
2072
2415
|
});
|
|
2073
|
-
const
|
|
2416
|
+
const rt = {
|
|
2074
2417
|
_id: "",
|
|
2075
2418
|
intention: [],
|
|
2076
2419
|
name: "Spend and earn points",
|
|
@@ -2445,7 +2788,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2445
2788
|
});
|
|
2446
2789
|
({
|
|
2447
2790
|
...t.scaffoldGroup()
|
|
2448
|
-
},
|
|
2791
|
+
}, p("VOUCHER", {
|
|
2449
2792
|
name: "",
|
|
2450
2793
|
business: null,
|
|
2451
2794
|
noCampaign: !1
|
|
@@ -2491,12 +2834,12 @@ t.setRuleToGroup(
|
|
|
2491
2834
|
"&&"
|
|
2492
2835
|
)
|
|
2493
2836
|
);
|
|
2494
|
-
t.scaffoldGroup(), t.scaffoldGroup(),
|
|
2837
|
+
t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
|
|
2495
2838
|
name: "Token",
|
|
2496
2839
|
business: null,
|
|
2497
2840
|
noCampaign: !1
|
|
2498
2841
|
});
|
|
2499
|
-
const
|
|
2842
|
+
const ct = {
|
|
2500
2843
|
_id: "",
|
|
2501
2844
|
intention: [],
|
|
2502
2845
|
name: "Welcome voucher",
|
|
@@ -2842,7 +3185,7 @@ const Ie = {
|
|
|
2842
3185
|
amount: 1
|
|
2843
3186
|
}
|
|
2844
3187
|
},
|
|
2845
|
-
configs:
|
|
3188
|
+
configs: p("VOUCHER", {
|
|
2846
3189
|
name: "",
|
|
2847
3190
|
business: null,
|
|
2848
3191
|
noCampaign: !1
|
|
@@ -2873,7 +3216,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2873
3216
|
],
|
|
2874
3217
|
"&&"
|
|
2875
3218
|
)
|
|
2876
|
-
]),
|
|
3219
|
+
]), p("VOUCHER", {
|
|
2877
3220
|
name: "",
|
|
2878
3221
|
business: null,
|
|
2879
3222
|
noCampaign: !1
|
|
@@ -2896,7 +3239,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
2896
3239
|
({
|
|
2897
3240
|
...t.scaffoldGroup()
|
|
2898
3241
|
});
|
|
2899
|
-
const
|
|
3242
|
+
const ae = e.enum([
|
|
2900
3243
|
"MEMBER_REWARD",
|
|
2901
3244
|
"PAID_LOYALTY",
|
|
2902
3245
|
"COLLECT_FEEDBACK",
|
|
@@ -2906,7 +3249,7 @@ const O = e.enum([
|
|
|
2906
3249
|
"BROADCAST",
|
|
2907
3250
|
"BIRTHDAY",
|
|
2908
3251
|
"GAME"
|
|
2909
|
-
]),
|
|
3252
|
+
]), ne = e.enum([
|
|
2910
3253
|
"text",
|
|
2911
3254
|
"number",
|
|
2912
3255
|
"textarea",
|
|
@@ -2932,115 +3275,220 @@ const O = e.enum([
|
|
|
2932
3275
|
"rule_bill",
|
|
2933
3276
|
"rule_feedback",
|
|
2934
3277
|
"rule_birthday",
|
|
2935
|
-
"promotion_game_type"
|
|
2936
|
-
|
|
3278
|
+
"promotion_game_type",
|
|
3279
|
+
"grab_effect",
|
|
3280
|
+
"grab_quota",
|
|
3281
|
+
"grab_conditions"
|
|
3282
|
+
]), oe = e.object({
|
|
2937
3283
|
label: e.string().optional(),
|
|
2938
3284
|
label_locale: e.record(e.string()).nullish(),
|
|
2939
3285
|
property: e.string().or(e.any()),
|
|
2940
|
-
type:
|
|
3286
|
+
type: ne,
|
|
2941
3287
|
extras: e.string().optional(),
|
|
2942
3288
|
isRuleChildren: e.boolean().optional()
|
|
2943
|
-
}),
|
|
3289
|
+
}), S = e.object({
|
|
2944
3290
|
not: e.boolean().optional(),
|
|
2945
3291
|
property: e.string(),
|
|
2946
3292
|
value: e.any()
|
|
2947
|
-
}),
|
|
3293
|
+
}), ie = e.object({
|
|
2948
3294
|
name: e.string().optional(),
|
|
2949
3295
|
name_locale: e.record(e.string()).nullish(),
|
|
2950
|
-
fields: e.array(
|
|
2951
|
-
condition:
|
|
2952
|
-
e.array(
|
|
3296
|
+
fields: e.array(oe),
|
|
3297
|
+
condition: S.optional().or(
|
|
3298
|
+
e.array(S)
|
|
2953
3299
|
)
|
|
2954
|
-
}),
|
|
3300
|
+
}), le = e.object({
|
|
2955
3301
|
name: e.string(),
|
|
2956
3302
|
name_locale: e.record(e.string()).nullish(),
|
|
2957
|
-
groups: e.array(
|
|
3303
|
+
groups: e.array(ie)
|
|
2958
3304
|
});
|
|
2959
3305
|
e.object({
|
|
2960
|
-
_id:
|
|
3306
|
+
_id: n,
|
|
2961
3307
|
name: e.string(),
|
|
2962
3308
|
name_locale: e.record(e.string()).nullish(),
|
|
2963
3309
|
description: e.string().nullish(),
|
|
2964
3310
|
description_locale: e.record(e.string()).nullish(),
|
|
2965
|
-
steps: e.array(
|
|
2966
|
-
intention: e.array(
|
|
3311
|
+
steps: e.array(le).min(1),
|
|
3312
|
+
intention: e.array(ae),
|
|
2967
3313
|
defaultValue: e.any()
|
|
2968
3314
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2969
|
-
const
|
|
3315
|
+
const re = {
|
|
2970
3316
|
collectionName: "Businesses",
|
|
2971
3317
|
transform: {
|
|
2972
3318
|
_id: "oid"
|
|
2973
3319
|
}
|
|
2974
3320
|
};
|
|
2975
3321
|
e.object({
|
|
2976
|
-
_id:
|
|
3322
|
+
_id: n,
|
|
2977
3323
|
ownerId: e.string(),
|
|
2978
3324
|
name: e.string(),
|
|
2979
3325
|
credit: e.number(),
|
|
2980
3326
|
forceSend: e.boolean().optional()
|
|
2981
|
-
}).describe(
|
|
2982
|
-
const
|
|
3327
|
+
}).describe(m.describe(re));
|
|
3328
|
+
const P = e.enum(["PHONE"]), ce = e.enum([
|
|
2983
3329
|
"MOCEAN",
|
|
2984
3330
|
"SLACK",
|
|
2985
3331
|
"SMS",
|
|
2986
3332
|
"EMAIL",
|
|
2987
3333
|
"WHATSAPP"
|
|
2988
|
-
]),
|
|
3334
|
+
]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
|
|
2989
3335
|
"General",
|
|
2990
3336
|
"Otp",
|
|
2991
3337
|
"Marketing",
|
|
2992
3338
|
"Ordering",
|
|
2993
3339
|
"MemberInvitation",
|
|
2994
3340
|
"MarketingPromotion"
|
|
2995
|
-
]),
|
|
2996
|
-
type:
|
|
2997
|
-
}),
|
|
2998
|
-
type: e.literal(
|
|
2999
|
-
provider:
|
|
3000
|
-
usage:
|
|
3001
|
-
}),
|
|
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 = {
|
|
3002
3363
|
collectionName: "Notifications",
|
|
3003
|
-
transform: {
|
|
3364
|
+
transform: {
|
|
3365
|
+
_id: "oid",
|
|
3366
|
+
business: "oid",
|
|
3367
|
+
campaign: "oid",
|
|
3368
|
+
member: "oid"
|
|
3369
|
+
}
|
|
3004
3370
|
};
|
|
3005
3371
|
e.object({
|
|
3006
|
-
_id:
|
|
3007
|
-
business:
|
|
3008
|
-
|
|
3372
|
+
_id: n,
|
|
3373
|
+
business: n,
|
|
3374
|
+
status: pe,
|
|
3375
|
+
ref: e.string().optional(),
|
|
3009
3376
|
title: e.string().optional(),
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
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({
|
|
3016
3411
|
target: e.string(),
|
|
3017
3412
|
title: e.string().optional(),
|
|
3018
3413
|
message: e.string(),
|
|
3019
|
-
option:
|
|
3414
|
+
option: j,
|
|
3020
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())
|
|
3021
3440
|
});
|
|
3022
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({
|
|
3023
3449
|
campaignId: e.string(),
|
|
3024
|
-
|
|
3025
|
-
|
|
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
|
+
});
|
|
3026
3474
|
});
|
|
3027
3475
|
e.object({
|
|
3028
3476
|
phone: e.string(),
|
|
3029
3477
|
message: e.string()
|
|
3030
3478
|
});
|
|
3031
|
-
const
|
|
3479
|
+
const N = e.object({
|
|
3032
3480
|
name: e.string().optional(),
|
|
3033
3481
|
address: e.string()
|
|
3034
|
-
}),
|
|
3482
|
+
}), ye = e.object({
|
|
3035
3483
|
filename: e.string(),
|
|
3036
3484
|
content: e.instanceof(Uint8Array)
|
|
3037
3485
|
});
|
|
3038
3486
|
e.object({
|
|
3039
|
-
from:
|
|
3040
|
-
to: e.array(
|
|
3487
|
+
from: N.optional(),
|
|
3488
|
+
to: e.array(N),
|
|
3041
3489
|
subject: e.string(),
|
|
3042
3490
|
html: e.string().optional(),
|
|
3043
|
-
attachments: e.array(
|
|
3491
|
+
attachments: e.array(ye).optional()
|
|
3044
3492
|
});
|
|
3045
3493
|
e.object({
|
|
3046
3494
|
subject: e.string(),
|
|
@@ -3080,7 +3528,7 @@ e.object({
|
|
|
3080
3528
|
billId: e.string()
|
|
3081
3529
|
});
|
|
3082
3530
|
e.object({
|
|
3083
|
-
amount:
|
|
3531
|
+
amount: A,
|
|
3084
3532
|
member: e.string(),
|
|
3085
3533
|
bill: e.string(),
|
|
3086
3534
|
otp: e.string().nullish(),
|
|
@@ -3089,15 +3537,15 @@ e.object({
|
|
|
3089
3537
|
e.object({
|
|
3090
3538
|
orderId: e.string()
|
|
3091
3539
|
});
|
|
3092
|
-
var
|
|
3093
|
-
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);
|
|
3094
3542
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
3095
3543
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
3096
3544
|
e.enum(["quota"]);
|
|
3097
|
-
var
|
|
3098
|
-
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);
|
|
3099
3547
|
e.enum(["restaurant"]);
|
|
3100
|
-
const
|
|
3548
|
+
const fe = e.object({
|
|
3101
3549
|
label: e.string(),
|
|
3102
3550
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
3103
3551
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -3107,41 +3555,41 @@ const V = e.object({
|
|
|
3107
3555
|
reason: e.string().optional()
|
|
3108
3556
|
});
|
|
3109
3557
|
e.object({
|
|
3110
|
-
_id:
|
|
3558
|
+
_id: n,
|
|
3111
3559
|
businessId: e.string(),
|
|
3112
3560
|
userId: e.string(),
|
|
3113
3561
|
email: e.string().nullish(),
|
|
3114
3562
|
phoneNo: e.string().nullish(),
|
|
3115
|
-
permissions: e.array(e.lazy(() =>
|
|
3563
|
+
permissions: e.array(e.lazy(() => fe))
|
|
3116
3564
|
}).describe(
|
|
3117
|
-
|
|
3565
|
+
m.describe({
|
|
3118
3566
|
collectionName: "PermissionUsers",
|
|
3119
3567
|
transform: {
|
|
3120
3568
|
_id: "oid"
|
|
3121
3569
|
}
|
|
3122
3570
|
})
|
|
3123
3571
|
);
|
|
3124
|
-
const
|
|
3572
|
+
const R = e.object({
|
|
3125
3573
|
userId: e.string(),
|
|
3126
3574
|
level: e.number(),
|
|
3127
3575
|
role: e.string().optional(),
|
|
3128
3576
|
businessId: e.string().optional(),
|
|
3129
3577
|
restaurantId: e.string().optional()
|
|
3130
|
-
}),
|
|
3578
|
+
}), be = e.function().args(e.any(), R).returns(e.boolean()), He = e.function().args(R).returns(e.promise(e.array(e.any())));
|
|
3131
3579
|
e.object({
|
|
3132
|
-
isAdmin:
|
|
3133
|
-
getRules:
|
|
3580
|
+
isAdmin: be,
|
|
3581
|
+
getRules: He
|
|
3134
3582
|
});
|
|
3135
3583
|
e.object({
|
|
3136
|
-
transactions: e.array(
|
|
3137
|
-
collections: e.array(
|
|
3584
|
+
transactions: e.array(F),
|
|
3585
|
+
collections: e.array(G)
|
|
3138
3586
|
});
|
|
3139
|
-
const
|
|
3587
|
+
const L = e.enum([
|
|
3140
3588
|
"ROCK_PAPER_SCISSOR"
|
|
3141
3589
|
]);
|
|
3142
|
-
|
|
3590
|
+
L.enum.ROCK_PAPER_SCISSOR + "";
|
|
3143
3591
|
e.object({
|
|
3144
|
-
type:
|
|
3592
|
+
type: L
|
|
3145
3593
|
});
|
|
3146
3594
|
e.object({
|
|
3147
3595
|
host: e.string().url(),
|
|
@@ -3150,7 +3598,7 @@ e.object({
|
|
|
3150
3598
|
roomId: e.string()
|
|
3151
3599
|
});
|
|
3152
3600
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
3153
|
-
const
|
|
3601
|
+
const ze = {
|
|
3154
3602
|
collectionName: "MarketingMaterials",
|
|
3155
3603
|
transform: {
|
|
3156
3604
|
_id: "oid",
|
|
@@ -3158,13 +3606,13 @@ const K = {
|
|
|
3158
3606
|
}
|
|
3159
3607
|
};
|
|
3160
3608
|
e.object({
|
|
3161
|
-
_id:
|
|
3162
|
-
business:
|
|
3609
|
+
_id: n,
|
|
3610
|
+
business: n,
|
|
3163
3611
|
imageUrl: e.string().url(),
|
|
3164
3612
|
headline: e.string(),
|
|
3165
3613
|
caption: e.string(),
|
|
3166
3614
|
editedAt: e.coerce.date()
|
|
3167
|
-
}).describe(
|
|
3615
|
+
}).describe(m.describe(ze));
|
|
3168
3616
|
e.object({
|
|
3169
3617
|
id: e.number(),
|
|
3170
3618
|
name: e.string(),
|
|
@@ -3184,12 +3632,12 @@ e.object({
|
|
|
3184
3632
|
phone: e.string().optional(),
|
|
3185
3633
|
email: e.string().optional()
|
|
3186
3634
|
});
|
|
3187
|
-
const
|
|
3635
|
+
const Te = e.enum([
|
|
3188
3636
|
"PENDING",
|
|
3189
3637
|
"SUCCESS",
|
|
3190
3638
|
"FAILED",
|
|
3191
3639
|
"RETRYING"
|
|
3192
|
-
]),
|
|
3640
|
+
]), Ce = {
|
|
3193
3641
|
collectionName: "WebhookLogs",
|
|
3194
3642
|
transform: {
|
|
3195
3643
|
_id: "oid",
|
|
@@ -3197,39 +3645,39 @@ const X = e.enum([
|
|
|
3197
3645
|
}
|
|
3198
3646
|
};
|
|
3199
3647
|
e.object({
|
|
3200
|
-
_id:
|
|
3201
|
-
business:
|
|
3648
|
+
_id: n,
|
|
3649
|
+
business: n,
|
|
3202
3650
|
type: e.string(),
|
|
3203
3651
|
payload: e.record(e.any()),
|
|
3204
|
-
status:
|
|
3652
|
+
status: Te,
|
|
3205
3653
|
response: e.any().optional(),
|
|
3206
3654
|
error: e.string().optional()
|
|
3207
|
-
}).describe(
|
|
3208
|
-
const
|
|
3655
|
+
}).describe(m.describe(Ce));
|
|
3656
|
+
const ve = e.enum(["AUTO", "MANUAL"]);
|
|
3209
3657
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
3210
|
-
const
|
|
3211
|
-
_id:
|
|
3658
|
+
const x = e.object({
|
|
3659
|
+
_id: n,
|
|
3212
3660
|
name: e.string().min(1, "Name is required").max(50),
|
|
3213
|
-
type:
|
|
3214
|
-
event:
|
|
3215
|
-
}),
|
|
3661
|
+
type: ve,
|
|
3662
|
+
event: V.optional()
|
|
3663
|
+
}), Se = e.object({
|
|
3216
3664
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
3217
3665
|
to: e.number().int("Must be integer").nullish()
|
|
3218
|
-
}).superRefine((
|
|
3219
|
-
|
|
3666
|
+
}).superRefine((o, a) => {
|
|
3667
|
+
o.from && o.to && o.from > o.to && a.addIssue({
|
|
3220
3668
|
code: "custom",
|
|
3221
3669
|
message: "Max referral count must be more than min referral count"
|
|
3222
3670
|
});
|
|
3223
|
-
}),
|
|
3224
|
-
threshold:
|
|
3225
|
-
rewards: e.array(
|
|
3226
|
-
pf_reward: e.array(
|
|
3227
|
-
}),
|
|
3671
|
+
}), Ne = e.object({
|
|
3672
|
+
threshold: Se,
|
|
3673
|
+
rewards: e.array(n),
|
|
3674
|
+
pf_reward: e.array(T).optional()
|
|
3675
|
+
}), C = e.object({
|
|
3228
3676
|
id: e.string(),
|
|
3229
3677
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
3230
|
-
rule:
|
|
3231
|
-
rewards: e.array(
|
|
3232
|
-
}),
|
|
3678
|
+
rule: B.optional(),
|
|
3679
|
+
rewards: e.array(Ne)
|
|
3680
|
+
}), Ue = {
|
|
3233
3681
|
collectionName: "ReferralRecords",
|
|
3234
3682
|
transform: {
|
|
3235
3683
|
_id: "oid",
|
|
@@ -3238,25 +3686,25 @@ const T = e.object({
|
|
|
3238
3686
|
referee: "oid",
|
|
3239
3687
|
refereeReward: "oid"
|
|
3240
3688
|
}
|
|
3241
|
-
},
|
|
3689
|
+
}, Pe = e.object({
|
|
3242
3690
|
completedAt: e.coerce.date(),
|
|
3243
|
-
criteria:
|
|
3691
|
+
criteria: n,
|
|
3244
3692
|
ref: e.string()
|
|
3245
|
-
}),
|
|
3246
|
-
_id:
|
|
3247
|
-
business:
|
|
3248
|
-
referer:
|
|
3249
|
-
referee:
|
|
3250
|
-
criteria: e.array(
|
|
3251
|
-
reward: e.array(
|
|
3252
|
-
refereeReward: e.array(
|
|
3253
|
-
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),
|
|
3254
3702
|
status: e.string(),
|
|
3255
|
-
pf_referer:
|
|
3256
|
-
pf_referee:
|
|
3257
|
-
pf_refereeReward: e.array(
|
|
3258
|
-
}).describe(
|
|
3259
|
-
|
|
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({
|
|
3260
3708
|
_id: !0,
|
|
3261
3709
|
business: !0,
|
|
3262
3710
|
referer: !0,
|
|
@@ -3264,79 +3712,83 @@ ae.pick({
|
|
|
3264
3712
|
criteria_progress: !0,
|
|
3265
3713
|
criteria: !0
|
|
3266
3714
|
}).extend({
|
|
3267
|
-
pf_referee:
|
|
3715
|
+
pf_referee: g.pick({
|
|
3268
3716
|
_id: !0,
|
|
3269
3717
|
name: !0,
|
|
3270
3718
|
phoneNumber: !0,
|
|
3271
3719
|
photoUrl: !0
|
|
3272
3720
|
})
|
|
3273
3721
|
});
|
|
3274
|
-
const
|
|
3722
|
+
const Ee = {
|
|
3275
3723
|
collectionName: "ReferralProgram",
|
|
3276
3724
|
transform: {
|
|
3277
3725
|
_id: "oid",
|
|
3278
3726
|
business: "oid"
|
|
3279
3727
|
}
|
|
3280
|
-
},
|
|
3281
|
-
_id:
|
|
3282
|
-
business:
|
|
3728
|
+
}, D = e.object({
|
|
3729
|
+
_id: n,
|
|
3730
|
+
business: n,
|
|
3283
3731
|
term_and_condition: e.string().optional(),
|
|
3284
|
-
refereeReward: e.array(
|
|
3285
|
-
reward: e.array(
|
|
3286
|
-
criteria: e.array(
|
|
3287
|
-
}).describe(
|
|
3732
|
+
refereeReward: e.array(n).optional(),
|
|
3733
|
+
reward: e.array(C),
|
|
3734
|
+
criteria: e.array(x)
|
|
3735
|
+
}).describe(m.describe(Ee));
|
|
3288
3736
|
e.object({
|
|
3289
|
-
referer:
|
|
3290
|
-
referee:
|
|
3291
|
-
business:
|
|
3737
|
+
referer: n,
|
|
3738
|
+
referee: n,
|
|
3739
|
+
business: n
|
|
3292
3740
|
});
|
|
3293
3741
|
e.object({
|
|
3294
|
-
program:
|
|
3742
|
+
program: D.pick({
|
|
3295
3743
|
_id: !0,
|
|
3296
3744
|
business: !0,
|
|
3297
3745
|
term_and_condition: !0
|
|
3298
3746
|
}).extend({
|
|
3299
|
-
reward:
|
|
3300
|
-
pf_refereeReward: e.array(
|
|
3747
|
+
reward: C.optional(),
|
|
3748
|
+
pf_refereeReward: e.array(T).optional()
|
|
3301
3749
|
}),
|
|
3302
3750
|
referralCount: e.number(),
|
|
3303
3751
|
successReferralCount: e.number(),
|
|
3304
|
-
referredBy:
|
|
3752
|
+
referredBy: g.pick({
|
|
3305
3753
|
_id: !0,
|
|
3306
3754
|
name: !0,
|
|
3307
3755
|
phoneNumber: !0,
|
|
3308
3756
|
photoUrl: !0
|
|
3309
3757
|
}).optional()
|
|
3310
3758
|
});
|
|
3311
|
-
|
|
3759
|
+
D.extend({
|
|
3312
3760
|
updateReferralRecord: e.boolean().optional()
|
|
3313
3761
|
});
|
|
3314
|
-
const
|
|
3762
|
+
const Je = e.object({
|
|
3315
3763
|
facebookPageId: e.string(),
|
|
3316
3764
|
pageName: e.string(),
|
|
3317
3765
|
pageProfileImageUrl: e.string(),
|
|
3318
3766
|
pageAccessToken: e.string().optional(),
|
|
3319
|
-
locationIds: e.array(
|
|
3320
|
-
}),
|
|
3321
|
-
locationId:
|
|
3767
|
+
locationIds: e.array(n)
|
|
3768
|
+
}), Oe = e.object({
|
|
3769
|
+
locationId: n.nullable(),
|
|
3322
3770
|
googleLocationName: e.string(),
|
|
3323
3771
|
displayName: e.string().optional()
|
|
3324
|
-
}),
|
|
3772
|
+
}), Ie = e.object({
|
|
3325
3773
|
accessToken: e.string().nullable(),
|
|
3326
3774
|
refreshToken: e.string().nullable(),
|
|
3327
3775
|
accessTokenExpiresAt: e.date().nullable(),
|
|
3328
|
-
locations: e.array(
|
|
3329
|
-
|
|
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({
|
|
3330
3780
|
token: e.string().nullable(),
|
|
3331
|
-
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)
|
|
3332
3784
|
});
|
|
3333
3785
|
e.object({
|
|
3334
|
-
_id:
|
|
3335
|
-
businessId:
|
|
3336
|
-
google:
|
|
3337
|
-
facebook:
|
|
3786
|
+
_id: n,
|
|
3787
|
+
businessId: n,
|
|
3788
|
+
google: Ie.nullable(),
|
|
3789
|
+
facebook: Re.nullable()
|
|
3338
3790
|
}).describe(
|
|
3339
|
-
|
|
3791
|
+
m.describe({
|
|
3340
3792
|
collectionName: "ReviewSourceConfig",
|
|
3341
3793
|
transform: {
|
|
3342
3794
|
_id: "oid",
|
|
@@ -3380,7 +3832,9 @@ e.object({
|
|
|
3380
3832
|
displayName: e.string().optional(),
|
|
3381
3833
|
locationId: e.string().nullable()
|
|
3382
3834
|
})
|
|
3383
|
-
)
|
|
3835
|
+
),
|
|
3836
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
3837
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
3384
3838
|
}).nullable(),
|
|
3385
3839
|
facebook: e.object({
|
|
3386
3840
|
token: e.string().nullable(),
|
|
@@ -3391,30 +3845,32 @@ e.object({
|
|
|
3391
3845
|
pageProfileImageUrl: e.string(),
|
|
3392
3846
|
locationIds: e.array(e.string())
|
|
3393
3847
|
})
|
|
3394
|
-
)
|
|
3848
|
+
),
|
|
3849
|
+
lastSyncTime: e.string().datetime().nullable(),
|
|
3850
|
+
syncFrequency: e.number().int().min(1).max(30)
|
|
3395
3851
|
}).nullable()
|
|
3396
3852
|
});
|
|
3397
|
-
const
|
|
3853
|
+
const u = e.object({
|
|
3398
3854
|
name: e.string(),
|
|
3399
3855
|
pictureUrl: e.string(),
|
|
3400
3856
|
phoneNumber: e.string().optional()
|
|
3401
|
-
}),
|
|
3857
|
+
}), Le = u.extend({
|
|
3402
3858
|
isAnonymous: e.boolean().optional()
|
|
3403
|
-
}),
|
|
3859
|
+
}), xe = u.extend({
|
|
3404
3860
|
id: e.string().optional()
|
|
3405
|
-
}),
|
|
3861
|
+
}), h = e.object({
|
|
3406
3862
|
comment: e.string(),
|
|
3407
3863
|
updateTime: e.coerce.date()
|
|
3408
3864
|
});
|
|
3409
3865
|
e.object({
|
|
3410
3866
|
comment: e.string().trim().min(1).max(4096)
|
|
3411
3867
|
});
|
|
3412
|
-
const
|
|
3868
|
+
const s = e.object({
|
|
3413
3869
|
externalId: e.string().optional(),
|
|
3414
3870
|
thumbnailUrl: e.string(),
|
|
3415
3871
|
thumbnailLabel: e.string(),
|
|
3416
3872
|
videoUrl: e.string().optional()
|
|
3417
|
-
}),
|
|
3873
|
+
}), De = {
|
|
3418
3874
|
collectionName: "Reviews",
|
|
3419
3875
|
transform: {
|
|
3420
3876
|
_id: "oid",
|
|
@@ -3422,31 +3878,31 @@ const l = e.object({
|
|
|
3422
3878
|
reviewerId: "oid",
|
|
3423
3879
|
restaurantId: "oid"
|
|
3424
3880
|
}
|
|
3425
|
-
},
|
|
3881
|
+
}, w = e.enum([
|
|
3426
3882
|
"google",
|
|
3427
3883
|
"facebook",
|
|
3428
3884
|
"feedme",
|
|
3429
3885
|
"feedvibe"
|
|
3430
3886
|
]);
|
|
3431
|
-
|
|
3887
|
+
w.options;
|
|
3432
3888
|
e.enum(["google", "facebook"]);
|
|
3433
|
-
const
|
|
3889
|
+
const we = e.enum([
|
|
3434
3890
|
"createTime_desc",
|
|
3435
3891
|
"createTime_asc",
|
|
3436
3892
|
"rating_asc",
|
|
3437
3893
|
"rating_desc"
|
|
3438
3894
|
]);
|
|
3439
3895
|
e.object({
|
|
3440
|
-
source:
|
|
3896
|
+
source: w.array().optional(),
|
|
3441
3897
|
dateFrom: e.string().datetime({ offset: !0 }).optional(),
|
|
3442
3898
|
dateTo: e.string().datetime({ offset: !0 }).optional(),
|
|
3443
3899
|
locationId: e.string().optional(),
|
|
3444
3900
|
excludeDeleted: e.boolean().optional(),
|
|
3445
|
-
sort:
|
|
3901
|
+
sort: we.optional(),
|
|
3446
3902
|
limit: e.coerce.number().int().positive().optional(),
|
|
3447
3903
|
skip: e.coerce.number().int().min(0).optional()
|
|
3448
3904
|
});
|
|
3449
|
-
const
|
|
3905
|
+
const pt = e.object({
|
|
3450
3906
|
averageScore: e.number(),
|
|
3451
3907
|
total: e.number().int().nonnegative(),
|
|
3452
3908
|
starCounts: e.array(
|
|
@@ -3455,54 +3911,54 @@ const Re = e.object({
|
|
|
3455
3911
|
count: e.number().int().nonnegative()
|
|
3456
3912
|
})
|
|
3457
3913
|
)
|
|
3458
|
-
}),
|
|
3914
|
+
}), _ = e.object({
|
|
3459
3915
|
name: e.string(),
|
|
3460
3916
|
pictureUrl: e.string().optional(),
|
|
3461
3917
|
phoneNumber: e.string().optional()
|
|
3462
|
-
}),
|
|
3918
|
+
}), Ae = _.extend({
|
|
3463
3919
|
_id: e.string().optional()
|
|
3464
|
-
}),
|
|
3920
|
+
}), Me = _.extend({
|
|
3465
3921
|
_id: e.string()
|
|
3466
|
-
}),
|
|
3922
|
+
}), Fe = _.extend({
|
|
3467
3923
|
isAnonymous: e.boolean().optional()
|
|
3468
|
-
}),
|
|
3924
|
+
}), Ge = _.extend({
|
|
3469
3925
|
id: e.string().optional()
|
|
3470
|
-
}),
|
|
3471
|
-
_id:
|
|
3926
|
+
}), y = e.object({
|
|
3927
|
+
_id: n,
|
|
3472
3928
|
comment: e.string(),
|
|
3473
3929
|
createTime: e.coerce.date(),
|
|
3474
3930
|
updateTime: e.coerce.date().nullish(),
|
|
3475
|
-
restaurantId:
|
|
3931
|
+
restaurantId: n,
|
|
3476
3932
|
restaurantName: e.string()
|
|
3477
|
-
}),
|
|
3933
|
+
}), ke = y.extend({
|
|
3478
3934
|
source: e.literal("google"),
|
|
3479
3935
|
externalId: e.string().min(1),
|
|
3480
3936
|
translatedComment: e.string().optional(),
|
|
3481
|
-
reviewer:
|
|
3482
|
-
reply:
|
|
3483
|
-
mediaItems: e.array(
|
|
3937
|
+
reviewer: Fe.optional(),
|
|
3938
|
+
reply: h.optional(),
|
|
3939
|
+
mediaItems: e.array(s),
|
|
3484
3940
|
starRating: e.number(),
|
|
3485
3941
|
locationName: e.string(),
|
|
3486
3942
|
locationDisplayName: e.string(),
|
|
3487
3943
|
originalUrl: e.string().optional()
|
|
3488
|
-
}),
|
|
3944
|
+
}), Be = y.extend({
|
|
3489
3945
|
source: e.literal("facebook"),
|
|
3490
3946
|
externalId: e.string().min(1),
|
|
3491
|
-
reviewer:
|
|
3947
|
+
reviewer: Ge.optional(),
|
|
3492
3948
|
isPositive: e.boolean().optional(),
|
|
3493
3949
|
pageId: e.string(),
|
|
3494
3950
|
pageName: e.string()
|
|
3495
|
-
}),
|
|
3951
|
+
}), Ve = y.extend({
|
|
3496
3952
|
source: e.literal("feedme"),
|
|
3497
|
-
reviewer:
|
|
3498
|
-
reply:
|
|
3953
|
+
reviewer: Ae.optional(),
|
|
3954
|
+
reply: h.optional(),
|
|
3499
3955
|
starRating: e.number(),
|
|
3500
|
-
mediaItems: e.array(
|
|
3956
|
+
mediaItems: e.array(s),
|
|
3501
3957
|
billId: e.string()
|
|
3502
|
-
}),
|
|
3958
|
+
}), We = y.extend({
|
|
3503
3959
|
source: e.literal("feedvibe"),
|
|
3504
3960
|
externalId: e.string().min(1),
|
|
3505
|
-
reviewer:
|
|
3961
|
+
reviewer: Me.optional(),
|
|
3506
3962
|
rating: e.object({
|
|
3507
3963
|
overall: e.number(),
|
|
3508
3964
|
food: e.number(),
|
|
@@ -3510,67 +3966,67 @@ const Re = e.object({
|
|
|
3510
3966
|
atmosphere: e.number()
|
|
3511
3967
|
}),
|
|
3512
3968
|
verified: e.boolean(),
|
|
3513
|
-
mediaItems: e.array(
|
|
3969
|
+
mediaItems: e.array(s).default([])
|
|
3514
3970
|
});
|
|
3515
3971
|
e.discriminatedUnion("source", [
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3972
|
+
ke,
|
|
3973
|
+
Be,
|
|
3974
|
+
Ve,
|
|
3975
|
+
We
|
|
3520
3976
|
]);
|
|
3521
3977
|
e.object({
|
|
3522
3978
|
comment: e.string(),
|
|
3523
3979
|
starRating: e.number(),
|
|
3524
3980
|
billId: e.string(),
|
|
3525
3981
|
isAnonymous: e.boolean(),
|
|
3526
|
-
mediaItems: e.array(
|
|
3982
|
+
mediaItems: e.array(s).optional()
|
|
3527
3983
|
});
|
|
3528
3984
|
e.object({
|
|
3529
3985
|
name: e.string().trim().min(1),
|
|
3530
3986
|
phoneNumber: e.string().trim().min(1).optional()
|
|
3531
3987
|
});
|
|
3532
|
-
const
|
|
3533
|
-
_id:
|
|
3534
|
-
businessId:
|
|
3988
|
+
const f = e.object({
|
|
3989
|
+
_id: n,
|
|
3990
|
+
businessId: n,
|
|
3535
3991
|
comment: e.string(),
|
|
3536
3992
|
createTime: e.coerce.date(),
|
|
3537
3993
|
updateTime: e.coerce.date().nullish(),
|
|
3538
|
-
restaurantId:
|
|
3994
|
+
restaurantId: n,
|
|
3539
3995
|
restaurantName: e.string(),
|
|
3540
3996
|
deletedAt: e.coerce.date().optional()
|
|
3541
|
-
}),
|
|
3997
|
+
}), Ye = f.extend({
|
|
3542
3998
|
source: e.literal("google"),
|
|
3543
3999
|
externalId: e.string().min(1),
|
|
3544
4000
|
translatedComment: e.string().optional(),
|
|
3545
|
-
reviewer:
|
|
3546
|
-
reply:
|
|
3547
|
-
mediaItems: e.array(
|
|
4001
|
+
reviewer: Le.optional(),
|
|
4002
|
+
reply: h.optional(),
|
|
4003
|
+
mediaItems: e.array(s),
|
|
3548
4004
|
starRating: e.number(),
|
|
3549
4005
|
locationName: e.string(),
|
|
3550
4006
|
locationDisplayName: e.string(),
|
|
3551
4007
|
originalUrl: e.string().optional()
|
|
3552
|
-
}),
|
|
4008
|
+
}), Ke = f.extend({
|
|
3553
4009
|
source: e.literal("facebook"),
|
|
3554
4010
|
externalId: e.string().min(1),
|
|
3555
|
-
reviewer:
|
|
4011
|
+
reviewer: xe.optional(),
|
|
3556
4012
|
isPositive: e.boolean().optional(),
|
|
3557
4013
|
pageId: e.string(),
|
|
3558
4014
|
pageName: e.string()
|
|
3559
|
-
}),
|
|
4015
|
+
}), qe = f.extend({
|
|
3560
4016
|
source: e.literal("feedme"),
|
|
3561
4017
|
isAnonymous: e.boolean(),
|
|
3562
4018
|
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
3563
|
-
reviewerId:
|
|
3564
|
-
reviewer:
|
|
3565
|
-
reply:
|
|
4019
|
+
reviewerId: n.optional(),
|
|
4020
|
+
reviewer: u.optional(),
|
|
4021
|
+
reply: h.optional(),
|
|
3566
4022
|
starRating: e.number(),
|
|
3567
4023
|
billId: e.string(),
|
|
3568
|
-
mediaItems: e.array(
|
|
3569
|
-
}),
|
|
4024
|
+
mediaItems: e.array(s)
|
|
4025
|
+
}), Xe = f.extend({
|
|
3570
4026
|
source: e.literal("feedvibe"),
|
|
3571
4027
|
externalId: e.string().min(1),
|
|
3572
|
-
reviewerId:
|
|
3573
|
-
reviewer:
|
|
4028
|
+
reviewerId: n,
|
|
4029
|
+
reviewer: u,
|
|
3574
4030
|
rating: e.object({
|
|
3575
4031
|
overall: e.number(),
|
|
3576
4032
|
food: e.number(),
|
|
@@ -3578,23 +4034,29 @@ const g = e.object({
|
|
|
3578
4034
|
atmosphere: e.number()
|
|
3579
4035
|
}),
|
|
3580
4036
|
verified: e.boolean(),
|
|
3581
|
-
mediaItems: e.array(
|
|
4037
|
+
mediaItems: e.array(s).default([])
|
|
3582
4038
|
});
|
|
3583
4039
|
e.discriminatedUnion("source", [
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
]).describe(
|
|
4040
|
+
Ye,
|
|
4041
|
+
Ke,
|
|
4042
|
+
qe,
|
|
4043
|
+
Xe
|
|
4044
|
+
]).describe(m.describe(De));
|
|
3589
4045
|
export {
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
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
|
+
C as c,
|
|
4054
|
+
Ne as d,
|
|
4055
|
+
x 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
|
|
3600
4062
|
};
|