@feedmepos/mf-connect 0.1.98-beta.1 → 0.1.98-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/dist/{App-EPNXLOQz.js → App-DEtGn29M.js} +7 -7
- package/dist/{AuditLogs-CadZXkap.js → AuditLogs-Mrm0iq9P.js} +9 -9
- package/dist/{Bin-CEWFX1MK.js → Bin-D9Pu0L6h.js} +8 -8
- package/dist/{Broadcast-DC8W46mc.js → Broadcast-BZDQtN8x.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DsojUEnT.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bxlbz-JW.js} +5 -5
- package/dist/{Card-BLFHOVL5.js → Card-BdMSuxr4.js} +18 -18
- package/dist/{Collections-CVQV9gAI.js → Collections-D2IOFKrJ.js} +7 -7
- package/dist/{Credit-Bvd1uiUU.js → Credit-BWyLeJpj.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DMHQ36PW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js} +30 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L8fftBYg.js → EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js} +6 -6
- package/dist/{Experience-bKhm3DP2.js → Experience-Dm5TDsKH.js} +9 -9
- package/dist/{FileSaver.min-CgnAdnBE.js → FileSaver.min-G6JMp965.js} +1 -1
- package/dist/{Game-BTZ5Ftp5.js → Game-BB81nS7Y.js} +10 -10
- package/dist/{Grab-DMuSoVGl.js → Grab-BXfBhrCM.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-hMmCNoZI.js → ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js} +1 -1
- package/dist/{Index-BNh-_EZa.js → Index-DfPPobH8.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-COoygUYu.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D0wKkrBj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Csse-q2U.js} +1 -1
- package/dist/{LoyaltyDashboard-Do06Mjzo.js → LoyaltyDashboard-BWC3rDDk.js} +4 -4
- package/dist/{MainLayout-C_Zu8e2b.js → MainLayout-DxAYEJg1.js} +1 -1
- package/dist/{Marketing-DHTow_lX.js → Marketing-CPQQG8Y9.js} +4 -4
- package/dist/{MarketingMaterialEdit-BZqVEaXl.js → MarketingMaterialEdit-ssilnzNw.js} +6 -6
- package/dist/{Member-DNQICbO9.js → Member-DmoUk3Dx.js} +11 -11
- package/dist/{MemberList-B5f-zT_3.js → MemberList-Cm2BWPrW.js} +25 -25
- package/dist/{MemberTransactions-BmmgHC1I.js → MemberTransactions-Cxr87RMl.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhlFz8So.js → MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js} +9 -9
- package/dist/{Mission-CyUldhj4.js → Mission-ChWPNxbI.js} +10 -10
- package/dist/{Overview-If_YcRY8.js → Overview-CfigslHq.js} +18 -18
- package/dist/{Point-DXgR4D2b.js → Point-Ko81Ny1q.js} +9 -9
- package/dist/{Promotion-8KrS5PGT.js → Promotion-CfyscRNN.js} +10 -10
- package/dist/{Queue-ypegp0sQ.js → Queue-B7kxDPZV.js} +10 -10
- package/dist/{Record-C1eVdBIL.js → Record-BGULqygn.js} +9 -9
- package/dist/Review-C7Nx6a5t.js +959 -0
- package/dist/{ReviewFacebookCallback-zNKnoxr_.js → ReviewFacebookCallback-DKmL0TYZ.js} +4 -4
- package/dist/ReviewGoogleCallback-C6iFFEfS.js +208 -0
- package/dist/{Reward-B_k-VLJn.js → Reward-C0w5c1Th.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BUl5B7lH.js → RewardGroup.vue_vue_type_script_setup_true_lang-CspVlyRZ.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D93zAujE.js → RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js} +13 -13
- package/dist/{Segment-PJLbJ6YE.js → Segment-I_p06AoA.js} +23 -23
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLwf6QCO.js → SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-VoddUHxA.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUwwzTTV.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DOXfYdxf.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2Nv32U5.js} +4 -4
- package/dist/{Setting-DItVUJHA.js → Setting-DOMSAMUz.js} +14 -14
- package/dist/{SettingAdvertisements-Bfvr60OW.js → SettingAdvertisements-IeGC6PHz.js} +12 -12
- package/dist/{Store-hyTJyNWv.js → Store-DLzj0qGi.js} +21 -21
- package/dist/{StoreRewards-B7c20AF5.js → StoreRewards-BPhAkGNl.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bl438tVa.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DpcaOgdN.js} +21 -21
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DBb3Zfuz.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js} +2 -2
- package/dist/{Tier-CuulnY8J.js → Tier-7MveQA4f.js} +22 -22
- package/dist/{Title-Bf9ZiFGW.js → Title-kyAzLGqm.js} +19 -19
- package/dist/{Transaction-reVAaf86.js → Transaction-Chl3d3Ai.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BZP9jfwG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js} +6 -6
- package/dist/{Voucher-E8R2cCl-.js → Voucher-CxIPPul5.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1mclPYkp.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-xP5smS4G.js → ZodTextField.vue_vue_type_script_setup_true_lang-CiOmadge.js} +2 -2
- package/dist/{app-BdRRCAGj.js → app-5YllsPJi.js} +76 -56
- package/dist/app.js +1 -1
- package/dist/{business-caUtvXxX.js → business-C0zArPJj.js} +1 -1
- package/dist/{campaign-CPtzFxiR.js → campaign-BHl5a5Z1.js} +10 -10
- package/dist/{campaign-CDFEhdIH.js → campaign-C_49MeEc.js} +1 -1
- package/dist/{campaign.enum-p1buII_I.js → campaign.enum-CHWTkc9k.js} +1 -1
- package/dist/{campaign.fn-DerIK7yj.js → campaign.fn-BtwnAETQ.js} +198 -198
- package/dist/{collectible.enum-CJ30_XmW.js → collectible.enum-BvoISTK3.js} +1 -1
- package/dist/{duplicateCampaign-DLfhHm07.js → duplicateCampaign-C27ikU2f.js} +2 -2
- package/dist/{effect-BJC34M9S.js → effect-CARgKjhU.js} +1 -1
- package/dist/{email-addresses-D1aYCi0p.js → email-addresses-CnTsfZHe.js} +2 -2
- package/dist/{export-ChFEuUc5.js → export-CO8-3Ob9.js} +3 -3
- package/dist/{helper-BNWd3eM2.js → helper-C617AZcV.js} +1 -1
- package/dist/{index-6ZSFSZ-H.js → index-9AxeGyVh.js} +159 -122
- package/dist/{index-CIin0Pv0.js → index-B0BE7PIS.js} +1 -1
- package/dist/{index-BoeHTTcl.js → index-B2ZvboNZ.js} +1 -1
- package/dist/{index-B4dazSVT.js → index-CEJgFylS.js} +12 -8
- package/dist/{index-B9xvXnEM.js → index-CFO8nwbC.js} +3 -3
- package/dist/{index-0SZADZbB.js → index-CMfyVF2h.js} +2 -2
- package/dist/{index-Br17eSOV.js → index-CtXx42Yb.js} +1 -1
- package/dist/{index-CeSEAz_T.js → index-DIcwj1r2.js} +1 -1
- package/dist/{index-DNsYSxpY.js → index-DMvP3cOz.js} +335 -323
- package/dist/{index-Dp3CLZSg.js → index-DNf6qgpV.js} +2 -2
- package/dist/{index-Do2cnzep.js → index-Da8trM3D.js} +1 -1
- package/dist/{index-BWQK3rqq.js → index-gPrU9b68.js} +3 -3
- package/dist/{index-Dcn4qaYt.js → index-hKv7PcTR.js} +1 -1
- package/dist/{index-CAVSuo6k.js → index-wL9aIsub.js} +3 -3
- package/dist/{index.esm2017-CYGo-PcK.js → index.esm2017-BFgbXDc8.js} +37 -37
- package/dist/{loading-DtPQnEA5.js → loading-BxpiUNaf.js} +1 -1
- package/dist/{lodash-BvTKz5Pn.js → lodash-rPOvq9te.js} +1 -1
- package/dist/{membership-Csnvqeql.js → membership-lfX5TNVQ.js} +3 -3
- package/dist/{money-CwRxILG1.js → money-CuUoYzPn.js} +1 -1
- package/dist/{number-qcECHCpu.js → number-DMk8hvKt.js} +1 -1
- package/dist/{objectid-BKWyHH4F.js → objectid-VPzb0Etb.js} +6 -6
- package/dist/{plugins-BBpKk0ld.js → plugins-CyYjHO_X.js} +3 -3
- package/dist/{reward-CX1axU5-.js → reward-BxwaSc-X.js} +1 -1
- package/dist/{rule-pKsATz8r.js → rule-76SluGaP.js} +3 -3
- package/dist/{template-BSuapoPb.js → template-ByceGw-A.js} +6 -6
- package/dist/{trigger-DnMktlx-.js → trigger-CxM5x3Sj.js} +5 -5
- package/dist/{useMarketingMaterialActions-Bu0-ny3z.js → useMarketingMaterialActions-CHXVZ61f.js} +3 -3
- package/dist/{usePagination-CzfJhepV.js → usePagination-BKfoMHBB.js} +1 -1
- package/dist/{user-BLDWqYm_.js → user-Cqjv0IpD.js} +1 -1
- package/dist/{vue-i18n-bssxjuw_.js → vue-i18n-Q-nKu_E3.js} +325 -325
- package/dist/{xlsx-xNwsJDub.js → xlsx-D1LobU8O.js} +1 -1
- package/dist/{zod-Cu18aMVT.js → zod-B5vUvKbD.js} +1 -1
- package/package.json +1 -1
- package/dist/Review-fsYAsdHU.js +0 -871
- package/dist/ReviewGoogleCallback-CpCT0ZYL.js +0 -213
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { z as e, F as
|
|
2
|
-
import { B as
|
|
3
|
-
import { _ as M, l as H, a as F } from "./index-
|
|
4
|
-
import { i as p } from "./helper-
|
|
5
|
-
import { a as
|
|
6
|
-
function
|
|
1
|
+
import { z as e, F as n, m, a as L } from "./index-gPrU9b68.js";
|
|
2
|
+
import { B as x, C as D, E as w, G as A, H as g, I as T, J as G } from "./index-DMvP3cOz.js";
|
|
3
|
+
import { _ as M, l as H, a as F } from "./index-wL9aIsub.js";
|
|
4
|
+
import { i as p } from "./helper-C617AZcV.js";
|
|
5
|
+
import { a as f } from "./index-CFO8nwbC.js";
|
|
6
|
+
function _(o, a) {
|
|
7
7
|
let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
8
8
|
const l = r.length;
|
|
9
|
-
for (let c = 0; c <
|
|
9
|
+
for (let c = 0; c < o; c++)
|
|
10
10
|
i += r.charAt(Math.floor(Math.random() * l));
|
|
11
11
|
return i;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return !
|
|
13
|
+
function y(o) {
|
|
14
|
+
return !o.property && "rules" in o;
|
|
15
15
|
}
|
|
16
|
-
function k(
|
|
17
|
-
return "property" in
|
|
16
|
+
function k(o) {
|
|
17
|
+
return "property" in o && !!o.property;
|
|
18
18
|
}
|
|
19
19
|
const B = "g_schedule";
|
|
20
|
-
function V(
|
|
21
|
-
return
|
|
20
|
+
function V(o) {
|
|
21
|
+
return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
|
|
22
22
|
`).trim();
|
|
23
23
|
}
|
|
24
|
-
function Y(
|
|
25
|
-
const i = M.cloneDeep(
|
|
24
|
+
function Y(o, a = !1) {
|
|
25
|
+
const i = M.cloneDeep(o);
|
|
26
26
|
if (k(i)) {
|
|
27
27
|
const r = i.conditions;
|
|
28
28
|
return !a && r && typeof r._rrule == "string" && (r._rrule = V(
|
|
29
29
|
r._rrule
|
|
30
30
|
)), i;
|
|
31
31
|
}
|
|
32
|
-
if (
|
|
32
|
+
if (y(i))
|
|
33
33
|
for (const r in i.rules) {
|
|
34
|
-
const l = i.rules[r], c = a ||
|
|
34
|
+
const l = i.rules[r], c = a || y(l) && l.name === B;
|
|
35
35
|
i.rules[r] = Y(
|
|
36
36
|
l,
|
|
37
37
|
c
|
|
@@ -42,14 +42,14 @@ function Y(n, a = !1) {
|
|
|
42
42
|
class t {
|
|
43
43
|
static scaffoldGroup(a) {
|
|
44
44
|
return {
|
|
45
|
-
name: a ?? `g_${
|
|
45
|
+
name: a ?? `g_${_(4)}`,
|
|
46
46
|
rules: {},
|
|
47
47
|
logic: ""
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
static scaffoldEntry(a) {
|
|
51
51
|
return {
|
|
52
|
-
name: `r_${
|
|
52
|
+
name: `r_${_(4)}`,
|
|
53
53
|
property: a ?? "",
|
|
54
54
|
conditions: {},
|
|
55
55
|
negated: !1
|
|
@@ -57,7 +57,7 @@ class t {
|
|
|
57
57
|
}
|
|
58
58
|
static constructEntry(a, i, r, l) {
|
|
59
59
|
return {
|
|
60
|
-
name: l ?? `e_${
|
|
60
|
+
name: l ?? `e_${_(4)}`,
|
|
61
61
|
property: a,
|
|
62
62
|
conditions: {
|
|
63
63
|
[i]: r
|
|
@@ -70,7 +70,7 @@ class t {
|
|
|
70
70
|
}
|
|
71
71
|
static constructLogic(a, i) {
|
|
72
72
|
const r = i ?? t.getLogic(a);
|
|
73
|
-
return Object.entries(a.rules).map(([l, c]) =>
|
|
73
|
+
return Object.entries(a.rules).map(([l, c]) => y(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
|
|
74
74
|
}
|
|
75
75
|
static setRuleToGroup(a, i, r) {
|
|
76
76
|
let l = H.cloneDeep(a);
|
|
@@ -167,18 +167,18 @@ const W = {
|
|
|
167
167
|
body: e.object({}).passthrough().nullish()
|
|
168
168
|
});
|
|
169
169
|
e.object({
|
|
170
|
-
_id:
|
|
170
|
+
_id: n,
|
|
171
171
|
user: e.string().length(28),
|
|
172
172
|
userName: e.string().min(1),
|
|
173
|
-
userPhoneNumber: e.string().refine((
|
|
173
|
+
userPhoneNumber: e.string().refine((o) => x(o)).nullish(),
|
|
174
174
|
moduleType: q,
|
|
175
|
-
business:
|
|
175
|
+
business: n.nullish(),
|
|
176
176
|
clientIp: e.string().nullish(),
|
|
177
177
|
timestamp: e.string().datetime(),
|
|
178
178
|
request: Q,
|
|
179
179
|
response: $
|
|
180
180
|
}).describe(m.describe(W));
|
|
181
|
-
const
|
|
181
|
+
const We = {
|
|
182
182
|
PROMOTION: {
|
|
183
183
|
name: "Promotion Template",
|
|
184
184
|
description: "Promotion template for campaign creation.",
|
|
@@ -2181,7 +2181,7 @@ const Z = e.enum([
|
|
|
2181
2181
|
groups: e.array(ae)
|
|
2182
2182
|
});
|
|
2183
2183
|
e.object({
|
|
2184
|
-
_id:
|
|
2184
|
+
_id: n,
|
|
2185
2185
|
name: e.string(),
|
|
2186
2186
|
name_locale: e.record(e.string()).nullish(),
|
|
2187
2187
|
description: e.string().nullish(),
|
|
@@ -2197,13 +2197,13 @@ const oe = {
|
|
|
2197
2197
|
}
|
|
2198
2198
|
};
|
|
2199
2199
|
e.object({
|
|
2200
|
-
_id:
|
|
2200
|
+
_id: n,
|
|
2201
2201
|
ownerId: e.string(),
|
|
2202
2202
|
name: e.string(),
|
|
2203
2203
|
credit: e.number(),
|
|
2204
2204
|
forceSend: e.boolean().optional()
|
|
2205
2205
|
}).describe(m.describe(oe));
|
|
2206
|
-
const
|
|
2206
|
+
const v = e.enum(["PHONE"]), ie = e.enum([
|
|
2207
2207
|
"MOCEAN",
|
|
2208
2208
|
"SLACK",
|
|
2209
2209
|
"SMS",
|
|
@@ -2217,9 +2217,9 @@ const T = e.enum(["PHONE"]), ie = e.enum([
|
|
|
2217
2217
|
"MemberInvitation",
|
|
2218
2218
|
"MarketingPromotion"
|
|
2219
2219
|
]), ce = e.object({
|
|
2220
|
-
type:
|
|
2221
|
-
}),
|
|
2222
|
-
type: e.literal(
|
|
2220
|
+
type: v
|
|
2221
|
+
}), S = ce.extend({
|
|
2222
|
+
type: e.literal(v.enum.PHONE),
|
|
2223
2223
|
provider: ie,
|
|
2224
2224
|
usage: re.optional()
|
|
2225
2225
|
}), pe = {
|
|
@@ -2227,12 +2227,12 @@ const T = e.enum(["PHONE"]), ie = e.enum([
|
|
|
2227
2227
|
transform: { _id: "oid", business: "oid" }
|
|
2228
2228
|
};
|
|
2229
2229
|
e.object({
|
|
2230
|
-
_id:
|
|
2231
|
-
business:
|
|
2230
|
+
_id: n,
|
|
2231
|
+
business: n,
|
|
2232
2232
|
target: e.string(),
|
|
2233
2233
|
title: e.string().optional(),
|
|
2234
2234
|
message: e.string(),
|
|
2235
|
-
option:
|
|
2235
|
+
option: S,
|
|
2236
2236
|
status: le,
|
|
2237
2237
|
ref: e.string().optional()
|
|
2238
2238
|
}).describe(m.describe(pe));
|
|
@@ -2240,7 +2240,7 @@ const me = e.object({
|
|
|
2240
2240
|
target: e.string(),
|
|
2241
2241
|
title: e.string().optional(),
|
|
2242
2242
|
message: e.string(),
|
|
2243
|
-
option:
|
|
2243
|
+
option: S,
|
|
2244
2244
|
ref: e.string().optional()
|
|
2245
2245
|
});
|
|
2246
2246
|
e.object({
|
|
@@ -2304,7 +2304,7 @@ e.object({
|
|
|
2304
2304
|
billId: e.string()
|
|
2305
2305
|
});
|
|
2306
2306
|
e.object({
|
|
2307
|
-
amount:
|
|
2307
|
+
amount: L,
|
|
2308
2308
|
member: e.string(),
|
|
2309
2309
|
bill: e.string(),
|
|
2310
2310
|
otp: e.string().nullish(),
|
|
@@ -2313,13 +2313,13 @@ e.object({
|
|
|
2313
2313
|
e.object({
|
|
2314
2314
|
orderId: e.string()
|
|
2315
2315
|
});
|
|
2316
|
-
var
|
|
2317
|
-
e.nativeEnum(
|
|
2316
|
+
var N = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(N || {});
|
|
2317
|
+
e.nativeEnum(N);
|
|
2318
2318
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2319
2319
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2320
2320
|
e.enum(["quota"]);
|
|
2321
|
-
var
|
|
2322
|
-
e.nativeEnum(
|
|
2321
|
+
var U = /* @__PURE__ */ ((o) => (o.marketing = "business::marketing", o.campaign = "business::campaign", o.counter = "business::counter", o.permission = "business::permission", o.role = "business::role", o))(U || {});
|
|
2322
|
+
e.nativeEnum(U);
|
|
2323
2323
|
e.enum(["restaurant"]);
|
|
2324
2324
|
const ge = e.object({
|
|
2325
2325
|
label: e.string(),
|
|
@@ -2331,7 +2331,7 @@ const ge = e.object({
|
|
|
2331
2331
|
reason: e.string().optional()
|
|
2332
2332
|
});
|
|
2333
2333
|
e.object({
|
|
2334
|
-
_id:
|
|
2334
|
+
_id: n,
|
|
2335
2335
|
businessId: e.string(),
|
|
2336
2336
|
userId: e.string(),
|
|
2337
2337
|
email: e.string().nullish(),
|
|
@@ -2345,27 +2345,27 @@ e.object({
|
|
|
2345
2345
|
}
|
|
2346
2346
|
})
|
|
2347
2347
|
);
|
|
2348
|
-
const
|
|
2348
|
+
const P = e.object({
|
|
2349
2349
|
userId: e.string(),
|
|
2350
2350
|
level: e.number(),
|
|
2351
2351
|
role: e.string().optional(),
|
|
2352
2352
|
businessId: e.string().optional(),
|
|
2353
2353
|
restaurantId: e.string().optional()
|
|
2354
|
-
}), de = e.function().args(e.any(),
|
|
2354
|
+
}), de = e.function().args(e.any(), P).returns(e.boolean()), ue = e.function().args(P).returns(e.promise(e.array(e.any())));
|
|
2355
2355
|
e.object({
|
|
2356
2356
|
isAdmin: de,
|
|
2357
|
-
getRules:
|
|
2357
|
+
getRules: ue
|
|
2358
2358
|
});
|
|
2359
2359
|
e.object({
|
|
2360
|
-
transactions: e.array(
|
|
2361
|
-
collections: e.array(
|
|
2360
|
+
transactions: e.array(D),
|
|
2361
|
+
collections: e.array(w)
|
|
2362
2362
|
});
|
|
2363
|
-
const
|
|
2363
|
+
const j = e.enum([
|
|
2364
2364
|
"ROCK_PAPER_SCISSOR"
|
|
2365
2365
|
]);
|
|
2366
|
-
|
|
2366
|
+
j.enum.ROCK_PAPER_SCISSOR + "";
|
|
2367
2367
|
e.object({
|
|
2368
|
-
type:
|
|
2368
|
+
type: j
|
|
2369
2369
|
});
|
|
2370
2370
|
e.object({
|
|
2371
2371
|
host: e.string().url(),
|
|
@@ -2374,7 +2374,7 @@ e.object({
|
|
|
2374
2374
|
roomId: e.string()
|
|
2375
2375
|
});
|
|
2376
2376
|
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
2377
|
-
const
|
|
2377
|
+
const he = {
|
|
2378
2378
|
collectionName: "MarketingMaterials",
|
|
2379
2379
|
transform: {
|
|
2380
2380
|
_id: "oid",
|
|
@@ -2382,13 +2382,13 @@ const ue = {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
};
|
|
2384
2384
|
e.object({
|
|
2385
|
-
_id:
|
|
2386
|
-
business:
|
|
2385
|
+
_id: n,
|
|
2386
|
+
business: n,
|
|
2387
2387
|
imageUrl: e.string().url(),
|
|
2388
2388
|
headline: e.string(),
|
|
2389
2389
|
caption: e.string(),
|
|
2390
2390
|
editedAt: e.coerce.date()
|
|
2391
|
-
}).describe(m.describe(
|
|
2391
|
+
}).describe(m.describe(he));
|
|
2392
2392
|
e.object({
|
|
2393
2393
|
id: e.number(),
|
|
2394
2394
|
name: e.string(),
|
|
@@ -2421,8 +2421,8 @@ const _e = e.enum([
|
|
|
2421
2421
|
}
|
|
2422
2422
|
};
|
|
2423
2423
|
e.object({
|
|
2424
|
-
_id:
|
|
2425
|
-
business:
|
|
2424
|
+
_id: n,
|
|
2425
|
+
business: n,
|
|
2426
2426
|
type: e.string(),
|
|
2427
2427
|
payload: e.record(e.any()),
|
|
2428
2428
|
status: _e,
|
|
@@ -2431,24 +2431,24 @@ e.object({
|
|
|
2431
2431
|
}).describe(m.describe(ye));
|
|
2432
2432
|
const fe = e.enum(["AUTO", "MANUAL"]);
|
|
2433
2433
|
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2434
|
-
const
|
|
2435
|
-
_id:
|
|
2434
|
+
const J = e.object({
|
|
2435
|
+
_id: n,
|
|
2436
2436
|
name: e.string().min(1, "Name is required").max(50),
|
|
2437
2437
|
type: fe,
|
|
2438
|
-
event:
|
|
2438
|
+
event: A.optional()
|
|
2439
2439
|
}), be = e.object({
|
|
2440
2440
|
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2441
2441
|
to: e.number().int("Must be integer").nullish()
|
|
2442
|
-
}).superRefine((
|
|
2443
|
-
|
|
2442
|
+
}).superRefine((o, a) => {
|
|
2443
|
+
o.from && o.to && o.from > o.to && a.addIssue({
|
|
2444
2444
|
code: "custom",
|
|
2445
2445
|
message: "Max referral count must be more than min referral count"
|
|
2446
2446
|
});
|
|
2447
2447
|
}), He = e.object({
|
|
2448
2448
|
threshold: be,
|
|
2449
|
-
rewards: e.array(
|
|
2450
|
-
pf_reward: e.array(
|
|
2451
|
-
}),
|
|
2449
|
+
rewards: e.array(n),
|
|
2450
|
+
pf_reward: e.array(f).optional()
|
|
2451
|
+
}), b = e.object({
|
|
2452
2452
|
id: e.string(),
|
|
2453
2453
|
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2454
2454
|
rule: F.optional(),
|
|
@@ -2464,21 +2464,21 @@ const j = e.object({
|
|
|
2464
2464
|
}
|
|
2465
2465
|
}, Ce = e.object({
|
|
2466
2466
|
completedAt: e.coerce.date(),
|
|
2467
|
-
criteria:
|
|
2467
|
+
criteria: n,
|
|
2468
2468
|
ref: e.string()
|
|
2469
2469
|
}), Te = e.object({
|
|
2470
|
-
_id:
|
|
2471
|
-
business:
|
|
2472
|
-
referer:
|
|
2473
|
-
referee:
|
|
2474
|
-
criteria: e.array(
|
|
2475
|
-
reward: e.array(
|
|
2476
|
-
refereeReward: e.array(
|
|
2470
|
+
_id: n,
|
|
2471
|
+
business: n,
|
|
2472
|
+
referer: n,
|
|
2473
|
+
referee: n,
|
|
2474
|
+
criteria: e.array(J),
|
|
2475
|
+
reward: e.array(b),
|
|
2476
|
+
refereeReward: e.array(n).optional(),
|
|
2477
2477
|
criteria_progress: e.array(Ce),
|
|
2478
2478
|
status: e.string(),
|
|
2479
2479
|
pf_referer: g.optional(),
|
|
2480
2480
|
pf_referee: g.optional(),
|
|
2481
|
-
pf_refereeReward: e.array(
|
|
2481
|
+
pf_refereeReward: e.array(f).optional()
|
|
2482
2482
|
}).describe(m.describe(ze));
|
|
2483
2483
|
Te.pick({
|
|
2484
2484
|
_id: !0,
|
|
@@ -2501,27 +2501,27 @@ const ve = {
|
|
|
2501
2501
|
_id: "oid",
|
|
2502
2502
|
business: "oid"
|
|
2503
2503
|
}
|
|
2504
|
-
},
|
|
2505
|
-
_id:
|
|
2506
|
-
business:
|
|
2504
|
+
}, E = e.object({
|
|
2505
|
+
_id: n,
|
|
2506
|
+
business: n,
|
|
2507
2507
|
term_and_condition: e.string().optional(),
|
|
2508
|
-
refereeReward: e.array(
|
|
2509
|
-
reward: e.array(
|
|
2510
|
-
criteria: e.array(
|
|
2508
|
+
refereeReward: e.array(n).optional(),
|
|
2509
|
+
reward: e.array(b),
|
|
2510
|
+
criteria: e.array(J)
|
|
2511
2511
|
}).describe(m.describe(ve));
|
|
2512
2512
|
e.object({
|
|
2513
|
-
referer:
|
|
2514
|
-
referee:
|
|
2515
|
-
business:
|
|
2513
|
+
referer: n,
|
|
2514
|
+
referee: n,
|
|
2515
|
+
business: n
|
|
2516
2516
|
});
|
|
2517
2517
|
e.object({
|
|
2518
|
-
program:
|
|
2518
|
+
program: E.pick({
|
|
2519
2519
|
_id: !0,
|
|
2520
2520
|
business: !0,
|
|
2521
2521
|
term_and_condition: !0
|
|
2522
2522
|
}).extend({
|
|
2523
|
-
reward:
|
|
2524
|
-
pf_refereeReward: e.array(
|
|
2523
|
+
reward: b.optional(),
|
|
2524
|
+
pf_refereeReward: e.array(f).optional()
|
|
2525
2525
|
}),
|
|
2526
2526
|
referralCount: e.number(),
|
|
2527
2527
|
successReferralCount: e.number(),
|
|
@@ -2532,7 +2532,7 @@ e.object({
|
|
|
2532
2532
|
photoUrl: !0
|
|
2533
2533
|
}).optional()
|
|
2534
2534
|
});
|
|
2535
|
-
|
|
2535
|
+
E.extend({
|
|
2536
2536
|
updateReferralRecord: e.boolean().optional()
|
|
2537
2537
|
});
|
|
2538
2538
|
const Se = e.object({
|
|
@@ -2540,21 +2540,23 @@ const Se = e.object({
|
|
|
2540
2540
|
pageName: e.string(),
|
|
2541
2541
|
pageProfileImageUrl: e.string(),
|
|
2542
2542
|
pageAccessToken: e.string().optional(),
|
|
2543
|
-
locationIds: e.array(
|
|
2543
|
+
locationIds: e.array(n)
|
|
2544
2544
|
}), Ne = e.object({
|
|
2545
|
-
locationId:
|
|
2545
|
+
locationId: n.nullable(),
|
|
2546
2546
|
googleLocationName: e.string(),
|
|
2547
2547
|
displayName: e.string().optional()
|
|
2548
2548
|
}), Ue = e.object({
|
|
2549
|
-
|
|
2549
|
+
accessToken: e.string().nullable(),
|
|
2550
|
+
refreshToken: e.string().nullable(),
|
|
2551
|
+
accessTokenExpiresAt: e.date().nullable(),
|
|
2550
2552
|
locations: e.array(Ne)
|
|
2551
2553
|
}), Pe = e.object({
|
|
2552
2554
|
token: e.string().nullable(),
|
|
2553
2555
|
pages: e.array(Se)
|
|
2554
2556
|
});
|
|
2555
2557
|
e.object({
|
|
2556
|
-
_id:
|
|
2557
|
-
businessId:
|
|
2558
|
+
_id: n,
|
|
2559
|
+
businessId: n,
|
|
2558
2560
|
google: Ue.nullable(),
|
|
2559
2561
|
facebook: Pe.nullable()
|
|
2560
2562
|
}).describe(
|
|
@@ -2567,7 +2569,9 @@ e.object({
|
|
|
2567
2569
|
})
|
|
2568
2570
|
);
|
|
2569
2571
|
e.object({
|
|
2570
|
-
|
|
2572
|
+
code: e.string(),
|
|
2573
|
+
redirectUri: e.string(),
|
|
2574
|
+
state: e.string()
|
|
2571
2575
|
});
|
|
2572
2576
|
e.object({
|
|
2573
2577
|
locations: e.array(
|
|
@@ -2592,7 +2596,8 @@ e.object({
|
|
|
2592
2596
|
e.object({
|
|
2593
2597
|
_id: e.string(),
|
|
2594
2598
|
google: e.object({
|
|
2595
|
-
|
|
2599
|
+
accessToken: e.string().nullable(),
|
|
2600
|
+
accessTokenExpiresAt: e.string().datetime().nullable(),
|
|
2596
2601
|
locations: e.array(
|
|
2597
2602
|
e.object({
|
|
2598
2603
|
googleLocationName: e.string(),
|
|
@@ -2613,17 +2618,18 @@ e.object({
|
|
|
2613
2618
|
)
|
|
2614
2619
|
}).nullable()
|
|
2615
2620
|
});
|
|
2616
|
-
const
|
|
2621
|
+
const O = e.object({
|
|
2617
2622
|
name: e.string(),
|
|
2618
2623
|
pictureUrl: e.string()
|
|
2619
|
-
}), je =
|
|
2624
|
+
}), je = O.extend({
|
|
2620
2625
|
isAnonymous: e.boolean().optional()
|
|
2621
|
-
}), Je =
|
|
2626
|
+
}), Je = O.extend({
|
|
2622
2627
|
id: e.string().optional()
|
|
2623
2628
|
}), d = e.object({
|
|
2624
2629
|
comment: e.string(),
|
|
2625
2630
|
updateTime: e.coerce.date()
|
|
2626
2631
|
}), s = e.object({
|
|
2632
|
+
externalId: e.string().optional(),
|
|
2627
2633
|
thumbnailUrl: e.string(),
|
|
2628
2634
|
thumbnailLabel: e.string(),
|
|
2629
2635
|
videoUrl: e.string().optional()
|
|
@@ -2631,6 +2637,7 @@ const E = e.object({
|
|
|
2631
2637
|
collectionName: "Reviews",
|
|
2632
2638
|
transform: {
|
|
2633
2639
|
_id: "oid",
|
|
2640
|
+
reviewerId: "oid",
|
|
2634
2641
|
locationId: "oid"
|
|
2635
2642
|
},
|
|
2636
2643
|
lookups: {
|
|
@@ -2643,8 +2650,13 @@ const E = e.object({
|
|
|
2643
2650
|
fromCollection: "Locations"
|
|
2644
2651
|
}
|
|
2645
2652
|
}
|
|
2646
|
-
},
|
|
2647
|
-
|
|
2653
|
+
}, I = e.enum([
|
|
2654
|
+
"google",
|
|
2655
|
+
"facebook",
|
|
2656
|
+
"feedme",
|
|
2657
|
+
"feedvibe"
|
|
2658
|
+
]);
|
|
2659
|
+
I.options;
|
|
2648
2660
|
e.enum(["google", "facebook"]);
|
|
2649
2661
|
const Oe = e.enum([
|
|
2650
2662
|
"createTime_desc",
|
|
@@ -2653,7 +2665,7 @@ const Oe = e.enum([
|
|
|
2653
2665
|
"rating_desc"
|
|
2654
2666
|
]);
|
|
2655
2667
|
e.object({
|
|
2656
|
-
source:
|
|
2668
|
+
source: I.array().optional(),
|
|
2657
2669
|
dateFrom: e.coerce.date().optional(),
|
|
2658
2670
|
dateTo: e.coerce.date().optional(),
|
|
2659
2671
|
locationId: e.string().optional(),
|
|
@@ -2661,19 +2673,19 @@ e.object({
|
|
|
2661
2673
|
limit: e.coerce.number().int().positive().optional(),
|
|
2662
2674
|
skip: e.coerce.number().int().min(0).optional()
|
|
2663
2675
|
});
|
|
2664
|
-
const
|
|
2676
|
+
const R = e.object({
|
|
2665
2677
|
name: e.string(),
|
|
2666
2678
|
pictureUrl: e.string()
|
|
2667
|
-
}), Ie =
|
|
2679
|
+
}), Ie = R.extend({
|
|
2668
2680
|
isAnonymous: e.boolean().optional()
|
|
2669
|
-
}), Re =
|
|
2681
|
+
}), Re = R.extend({
|
|
2670
2682
|
id: e.string().optional()
|
|
2671
|
-
}),
|
|
2672
|
-
_id:
|
|
2683
|
+
}), u = e.object({
|
|
2684
|
+
_id: n,
|
|
2673
2685
|
comment: e.string(),
|
|
2674
2686
|
createTime: e.coerce.date(),
|
|
2675
|
-
locationId:
|
|
2676
|
-
}), Le =
|
|
2687
|
+
locationId: n
|
|
2688
|
+
}), Le = u.extend({
|
|
2677
2689
|
source: e.literal("google"),
|
|
2678
2690
|
reviewer: Ie.optional(),
|
|
2679
2691
|
reply: d.optional(),
|
|
@@ -2681,25 +2693,37 @@ const I = e.object({
|
|
|
2681
2693
|
starRating: e.number(),
|
|
2682
2694
|
locationName: e.string(),
|
|
2683
2695
|
locationDisplayName: e.string()
|
|
2684
|
-
}), xe =
|
|
2696
|
+
}), xe = u.extend({
|
|
2685
2697
|
source: e.literal("facebook"),
|
|
2686
2698
|
reviewer: Re.optional(),
|
|
2687
2699
|
isPositive: e.boolean().optional(),
|
|
2688
2700
|
pageId: e.string(),
|
|
2689
2701
|
pageName: e.string()
|
|
2690
|
-
}), De =
|
|
2702
|
+
}), De = u.extend({
|
|
2691
2703
|
source: e.literal("feedme"),
|
|
2692
|
-
reviewer:
|
|
2704
|
+
reviewer: T,
|
|
2693
2705
|
reply: d.optional(),
|
|
2694
2706
|
starRating: e.number(),
|
|
2695
2707
|
location: G.optional(),
|
|
2696
2708
|
mediaItems: e.array(s),
|
|
2697
2709
|
billId: e.string()
|
|
2710
|
+
}), we = u.extend({
|
|
2711
|
+
source: e.literal("feedvibe"),
|
|
2712
|
+
reviewer: T.optional(),
|
|
2713
|
+
rating: e.object({
|
|
2714
|
+
overall: e.number(),
|
|
2715
|
+
food: e.number(),
|
|
2716
|
+
service: e.number(),
|
|
2717
|
+
atmosphere: e.number()
|
|
2718
|
+
}),
|
|
2719
|
+
verified: e.boolean(),
|
|
2720
|
+
mediaItems: e.array(s).default([])
|
|
2698
2721
|
});
|
|
2699
2722
|
e.discriminatedUnion("source", [
|
|
2700
2723
|
Le,
|
|
2701
2724
|
xe,
|
|
2702
|
-
De
|
|
2725
|
+
De,
|
|
2726
|
+
we
|
|
2703
2727
|
]);
|
|
2704
2728
|
e.object({
|
|
2705
2729
|
comment: e.string(),
|
|
@@ -2707,16 +2731,16 @@ e.object({
|
|
|
2707
2731
|
billId: e.string(),
|
|
2708
2732
|
mediaItems: e.array(s).optional()
|
|
2709
2733
|
});
|
|
2710
|
-
const
|
|
2711
|
-
_id:
|
|
2734
|
+
const h = e.object({
|
|
2735
|
+
_id: n,
|
|
2712
2736
|
externalId: e.string().optional(),
|
|
2713
2737
|
comment: e.string(),
|
|
2714
2738
|
createTime: e.coerce.date(),
|
|
2715
2739
|
// The marketing Location the review belongs to. For feedme reviews this is
|
|
2716
2740
|
// the restaurantId (Location._id === restaurantId); for google/facebook it
|
|
2717
2741
|
// is resolved from the review-source location/page mapping at sync time.
|
|
2718
|
-
locationId:
|
|
2719
|
-
}),
|
|
2742
|
+
locationId: n
|
|
2743
|
+
}), Ae = h.extend({
|
|
2720
2744
|
source: e.literal("google"),
|
|
2721
2745
|
reviewer: je.optional(),
|
|
2722
2746
|
reply: d.optional(),
|
|
@@ -2724,37 +2748,50 @@ const b = e.object({
|
|
|
2724
2748
|
starRating: e.number(),
|
|
2725
2749
|
locationName: e.string(),
|
|
2726
2750
|
locationDisplayName: e.string()
|
|
2727
|
-
}),
|
|
2751
|
+
}), Ge = h.extend({
|
|
2728
2752
|
source: e.literal("facebook"),
|
|
2729
2753
|
reviewer: Je.optional(),
|
|
2730
2754
|
isPositive: e.boolean().optional(),
|
|
2731
2755
|
pageId: e.string(),
|
|
2732
2756
|
pageName: e.string()
|
|
2733
|
-
}),
|
|
2757
|
+
}), Me = h.extend({
|
|
2734
2758
|
source: e.literal("feedme"),
|
|
2735
|
-
reviewerId:
|
|
2759
|
+
reviewerId: n,
|
|
2736
2760
|
reviewer: e.any().optional(),
|
|
2737
2761
|
reply: d.optional(),
|
|
2738
2762
|
starRating: e.number(),
|
|
2739
2763
|
billId: e.string(),
|
|
2740
2764
|
location: e.any().optional(),
|
|
2741
2765
|
mediaItems: e.array(s)
|
|
2766
|
+
}), Fe = h.extend({
|
|
2767
|
+
source: e.literal("feedvibe"),
|
|
2768
|
+
reviewerId: n,
|
|
2769
|
+
reviewer: e.any().optional(),
|
|
2770
|
+
rating: e.object({
|
|
2771
|
+
overall: e.number(),
|
|
2772
|
+
food: e.number(),
|
|
2773
|
+
service: e.number(),
|
|
2774
|
+
atmosphere: e.number()
|
|
2775
|
+
}),
|
|
2776
|
+
verified: e.boolean(),
|
|
2777
|
+
mediaItems: e.array(s).default([])
|
|
2742
2778
|
});
|
|
2743
2779
|
e.discriminatedUnion("source", [
|
|
2744
|
-
we,
|
|
2745
2780
|
Ae,
|
|
2746
|
-
Ge
|
|
2781
|
+
Ge,
|
|
2782
|
+
Me,
|
|
2783
|
+
Fe
|
|
2747
2784
|
]).describe(m.describe(Ee));
|
|
2748
2785
|
export {
|
|
2749
2786
|
Z as F,
|
|
2750
2787
|
t as R,
|
|
2751
|
-
|
|
2788
|
+
We as T,
|
|
2752
2789
|
k as a,
|
|
2753
2790
|
He as b,
|
|
2754
|
-
|
|
2755
|
-
|
|
2791
|
+
J as c,
|
|
2792
|
+
b as d,
|
|
2756
2793
|
X as e,
|
|
2757
2794
|
q as f,
|
|
2758
|
-
|
|
2795
|
+
y as i,
|
|
2759
2796
|
Y as s
|
|
2760
2797
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as n, S as
|
|
1
|
+
import { g as n, S as r, b as c } from "./index-DNf6qgpV.js";
|
|
2
2
|
const o = (e = "") => {
|
|
3
|
-
const s =
|
|
3
|
+
const s = r.getBusinessId();
|
|
4
4
|
if (!s) throw new Error("Invalid business ID");
|
|
5
|
-
return
|
|
6
|
-
},
|
|
5
|
+
return c(`businesses/${s}/${e}`);
|
|
6
|
+
}, g = {
|
|
7
7
|
async listReviews(e) {
|
|
8
8
|
const s = await o("reviews").get("", { params: e });
|
|
9
9
|
return n(s);
|
|
@@ -12,9 +12,13 @@ const o = (e = "") => {
|
|
|
12
12
|
const e = await o("reviews/config").get("");
|
|
13
13
|
return n(e);
|
|
14
14
|
},
|
|
15
|
-
async connectGoogle(e) {
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
async connectGoogle(e, s, t) {
|
|
16
|
+
const a = await o("reviews/config/google").post("", {
|
|
17
|
+
code: e,
|
|
18
|
+
redirectUri: s,
|
|
19
|
+
state: t
|
|
20
|
+
});
|
|
21
|
+
return n(a);
|
|
18
22
|
},
|
|
19
23
|
async updateGoogleLocations(e) {
|
|
20
24
|
const s = await o("reviews/config/google/locations").put("", { locations: e });
|
|
@@ -44,5 +48,5 @@ const o = (e = "") => {
|
|
|
44
48
|
}
|
|
45
49
|
};
|
|
46
50
|
export {
|
|
47
|
-
|
|
51
|
+
g as r
|
|
48
52
|
};
|