@feedmepos/mf-connect 0.1.0-beta.6 → 0.1.0-beta.61
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/Analytic-u9mtlxSv.js +427 -0
- package/dist/{App-C2616cfr.js → App-BwTQE7Ft.js} +445 -420
- package/dist/AuditLogs-BVMRclSw.js +1886 -0
- package/dist/Bin-Cca-XOkz.js +166 -0
- package/dist/{Broadcast-CqSwLTAq.js → Broadcast-DRQgpwdP.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrR9Pmtb.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CeUu_T1u.js} +6 -8
- package/dist/Card-CnbB_u31.js +896 -0
- package/dist/Collections-BjlfOSC3.js +459 -0
- package/dist/{Credit-CPcLgnsq.js → Credit-BoElrcx9.js} +36 -34
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B3WVwem6.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2buK6Dj.js → EffectSheet.vue_vue_type_style_index_0_lang-CGfpziKs.js} +18 -18
- package/dist/{Experience-BoBikt-x.js → Experience-SdGBf4vU.js} +32 -30
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/{Game-DR8PyYZa.js → Game-ChLHibpB.js} +39 -37
- package/dist/Index-D7Kq6uyf.js +259 -0
- package/dist/Marketing-BDajIqR_.js +20071 -0
- package/dist/Member-BPZryqWL.js +317 -0
- package/dist/MemberList-C52Dop8Z.js +1598 -0
- package/dist/MemberTransactions-DHU78kgS.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhtIZCjT.js → MessageInput.vue_vue_type_script_setup_true_lang-js1F2E4N.js} +83 -71
- package/dist/{Mission-CMpvz9zN.js → Mission-BQR3qjAu.js} +101 -87
- package/dist/Overview-BbLYWXjG.js +1078 -0
- package/dist/{Point-DkZn6p9s.js → Point-DbTcWJbQ.js} +55 -53
- package/dist/{Promotion-B7YzwPc_.js → Promotion-CIrpWBQD.js} +65 -57
- package/dist/Queue-B0Mfq2Vn.js +244 -0
- package/dist/Record-Z6ZrJeLc.js +340 -0
- package/dist/Reward-D6k0QFQA.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-GJ6j_jOh.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-gQxmX9ur.js +1637 -0
- package/dist/Segment-D6MF-EO8.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BWG-pz6F.js +181 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-HgorlHNz.js +147 -0
- package/dist/Setting--OFDS95z.js +1931 -0
- package/dist/Store-BqlRTC-c.js +1751 -0
- package/dist/{StoreRewards-6BzVwZqr.js → StoreRewards-BTu0IdDN.js} +33 -32
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BX053DJA.js +943 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B6cAveco.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BAkuqLwy.js} +1 -1
- package/dist/{Tier-CW-46oJS.js → Tier-CE9LYAEX.js} +327 -318
- package/dist/{Title-CE9rWVdi.js → Title-DOOASUMI.js} +199 -184
- package/dist/{Transaction-B21RrC4M.js → Transaction-DPxUOBP-.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CKwf0F_i.js +130 -0
- package/dist/Voucher-D69DD02z.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CFL0Nsez.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BiVZwBuG.js → ZodTextField.vue_vue_type_script_setup_true_lang-Byh6_EJM.js} +1 -1
- package/dist/app-C2u1t47T.js +7059 -0
- package/dist/app-DgfmbHZe.js +33357 -0
- package/dist/app.js +1 -1
- package/dist/{business-aHhRUXc0.js → business-BqCJB_vA.js} +1 -1
- package/dist/{campaign-DH9NUNf_.js → campaign-CWMPCmmU.js} +2 -2
- package/dist/campaign-D0dTbl5b.js +1810 -0
- package/dist/campaign.enum-DhE8N4pA.js +20 -0
- package/dist/campaign.fn-BpO-RQih.js +758 -0
- package/dist/collectible.enum-rWEc6Tsw.js +19 -0
- package/dist/{collection.fn-CYlsA-kW.js → collection.fn-biX2iFDQ.js} +2 -2
- package/dist/dto-3m7xZwfI.js +214 -0
- package/dist/{effect-LSc9YanX.js → effect-ZMGRxKCZ.js} +9 -9
- package/dist/email-addresses-lgY03bkq.js +705 -0
- package/dist/{export-Cf0-C5Ly.js → export-BOzeYUy8.js} +5 -5
- package/dist/{helper-CiZpeMCM.js → helper-CO29wun4.js} +1 -1
- package/dist/index-B3V7krW_.js +29000 -0
- package/dist/index-BVbiAxW8.js +115 -0
- package/dist/{index-D_83JP2i.js → index-Bvch9tuP.js} +48 -4
- package/dist/index-CYOwwy3h.js +44 -0
- package/dist/{index-D6cEOHP4.js → index-CbYXYVYp.js} +1501 -1480
- package/dist/{index-DtsDOuDx.js → index-ChrOXJDq.js} +24 -21
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-DNGenFnf.js +32 -0
- package/dist/{index-BVb5-Ht8.js → index-Dd22X409.js} +259 -173
- package/dist/{index-kPhrD63q.js → index-LYAWIqjk.js} +1 -1
- package/dist/index-Xh9cW6Y9.js +54 -0
- package/dist/{index-gxwjKu3-.js → index-XhqaicYu.js} +2212 -871
- package/dist/{index-DW3PRjPL.js → index-YsC4VklJ.js} +1 -1
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-B7oVYIbY.js → index.esm2017-CJ1flA6S.js} +121 -121
- package/dist/loading-CUs_CN1k.js +71 -0
- package/dist/{membership-Dw1ylJ9Y.js → membership-D-GVacos.js} +54 -46
- package/dist/money-CMtSALkX.js +15 -0
- package/dist/number-CDwwgAYM.js +12 -0
- package/dist/objectid-Bf9yKD81.js +145 -0
- package/dist/{loading-7yq1tinq.js → plugins-9sQTEyth.js} +3871 -3943
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-DblXGhWc.js +36 -0
- package/dist/{rule-C0Q_SHow.js → rule-Cy8cTzuw.js} +180 -177
- package/dist/{rule-builder-iu17XIof.js → rule-builder-Cn5vZgFN.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CyOanTMu.js → template-Cal94dUy.js} +5 -5
- package/dist/trigger-C1nwLSP8.js +144 -0
- package/dist/user-ir4Rn5bP.js +54 -0
- package/dist/{vue-i18n-B0fLJH7a.js → vue-i18n-eOHBBaH5.js} +243 -243
- package/dist/{xlsx-BYO_bB9J.js → xlsx-DulnT75_.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-muDf0oMG.js +0 -622
- package/dist/Card-bhLoK0ZV.js +0 -825
- package/dist/Collections-DjtsAiol.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-U_QZneS6.js +0 -2813
- package/dist/Marketing-Dny2nMUl.js +0 -316
- package/dist/Member-CP_smyk8.js +0 -69
- package/dist/MemberList-CR3eYI9p.js +0 -1733
- package/dist/MemberTransactions-RTx_lKFb.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cs67_GLE.js +0 -1753
- package/dist/Segment-Bb4gHt5V.js +0 -437
- package/dist/Setting-Xj0AVzh3.js +0 -1901
- package/dist/Store-BWRHQ6Ie.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BsFnT8BS.js +0 -890
- package/dist/Voucher-KK9fBI0u.js +0 -490
- package/dist/app-CjhXHUQv.js +0 -53428
- package/dist/app-Dvf_JNMf.js +0 -5764
- package/dist/dto-DArfyZAI.js +0 -2770
- package/dist/index-Bi_LGEtY.js +0 -99
- package/dist/index-CiQDG7Cm.js +0 -762
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DQfjSSMF.js +0 -206
- package/dist/index-DcxssxPi.js +0 -29193
- package/dist/index-DqJVH2kv.js +0 -298
- package/dist/money-CPd0XTNv.js +0 -15
- package/dist/number-BgXY4un8.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,113 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./index-
|
|
4
|
-
import { R as t } from "./rule-builder-
|
|
5
|
-
import { i
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, z = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, _e = /* @__PURE__ */ V({
|
|
14
|
-
__name: "CustomSelect",
|
|
15
|
-
props: {
|
|
16
|
-
label: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: !1
|
|
19
|
-
},
|
|
20
|
-
placeholder: {
|
|
21
|
-
type: String,
|
|
22
|
-
required: !1
|
|
23
|
-
},
|
|
24
|
-
items: {
|
|
25
|
-
type: Object,
|
|
26
|
-
required: !0
|
|
27
|
-
},
|
|
28
|
-
modelValue: {
|
|
29
|
-
type: Object
|
|
30
|
-
},
|
|
31
|
-
zIndex: {
|
|
32
|
-
type: Number
|
|
33
|
-
},
|
|
34
|
-
multiselect: {
|
|
35
|
-
type: Boolean
|
|
36
|
-
}
|
|
1
|
+
import { z as e, F as n, m as o } from "./plugins-9sQTEyth.js";
|
|
2
|
+
import { A as v, B as E, D as O, E as I, G as p } from "./index-XhqaicYu.js";
|
|
3
|
+
import { c as L } from "./index-CbYXYVYp.js";
|
|
4
|
+
import { R as t } from "./rule-builder-Cn5vZgFN.js";
|
|
5
|
+
import { i } from "./helper-CO29wun4.js";
|
|
6
|
+
import { a as r } from "./index-Xh9cW6Y9.js";
|
|
7
|
+
const h = {
|
|
8
|
+
collectionName: "AuditLogs",
|
|
9
|
+
transform: {
|
|
10
|
+
_id: "oid",
|
|
11
|
+
business: "oid",
|
|
12
|
+
timestamp: "date"
|
|
37
13
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return p(), O(B, {
|
|
44
|
-
"show-popover": I(m),
|
|
45
|
-
onPopoverChanged: b[0] || (b[0] = (a) => m.value = a),
|
|
46
|
-
"z-index": n.zIndex
|
|
47
|
-
}, {
|
|
48
|
-
"popover-button": g(() => [
|
|
49
|
-
L(v.$slots, "popover-button", {}, () => [
|
|
50
|
-
n.label ? (p(), d("div", X, u(n.label), 1)) : H("", !0),
|
|
51
|
-
h(U, null, {
|
|
52
|
-
append: g(() => [
|
|
53
|
-
L(v.$slots, "append"),
|
|
54
|
-
h(N, {
|
|
55
|
-
name: I(m) ? "expand_less" : "expand_more",
|
|
56
|
-
size: "md",
|
|
57
|
-
color: "black"
|
|
58
|
-
}, null, 8, ["name"])
|
|
59
|
-
]),
|
|
60
|
-
default: g(() => {
|
|
61
|
-
var a;
|
|
62
|
-
return [
|
|
63
|
-
n.multiselect ? (p(), d("div", q, u(n.items.filter((i) => {
|
|
64
|
-
var r;
|
|
65
|
-
return (r = n.modelValue) == null ? void 0 : r.includes(i.value);
|
|
66
|
-
}).map((i) => i.label).join(", ")), 1)) : (p(), d("div", {
|
|
67
|
-
key: 0,
|
|
68
|
-
class: x(["fm-typo-en-body-lg-400", {
|
|
69
|
-
"text-fm-color-typo-secondary": !n.items.find(
|
|
70
|
-
(i) => i.value == n.modelValue
|
|
71
|
-
)
|
|
72
|
-
}])
|
|
73
|
-
}, u(((a = n.items.find((i) => i.value == n.modelValue)) == null ? void 0 : a.label) || n.placeholder), 3))
|
|
74
|
-
];
|
|
75
|
-
}),
|
|
76
|
-
_: 3
|
|
77
|
-
})
|
|
78
|
-
])
|
|
79
|
-
]),
|
|
80
|
-
default: g(() => [
|
|
81
|
-
k("div", z, [
|
|
82
|
-
(p(!0), d(Y, null, j(n.items, (a) => {
|
|
83
|
-
var i, r;
|
|
84
|
-
return p(), O(F, {
|
|
85
|
-
class: x(`${n.multiselect ? (i = n.modelValue) != null && i.some((l) => l == a.value) ? "bg-fm-color-system-warning-100" : "" : n.modelValue == a.value}`),
|
|
86
|
-
"has-checkbox": n.multiselect,
|
|
87
|
-
key: a.value,
|
|
88
|
-
"model-value": n.multiselect ? (r = n.modelValue) == null ? void 0 : r.some((l) => l == a.value) : n.modelValue == a.value,
|
|
89
|
-
label: a.label,
|
|
90
|
-
onClick: (l) => {
|
|
91
|
-
var E;
|
|
92
|
-
if (l.stopPropagation(), !n.multiselect)
|
|
93
|
-
m.value = !1, _("update:model-value", a.value);
|
|
94
|
-
else {
|
|
95
|
-
const P = (E = n.modelValue) == null ? void 0 : E.some((y) => y == a.value);
|
|
96
|
-
_(
|
|
97
|
-
"update:model-value",
|
|
98
|
-
P ? (n.modelValue ?? []).filter((y) => y !== a.value) : [...n.modelValue ?? [], a.value]
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}, null, 8, ["class", "has-checkbox", "model-value", "label", "onClick"]);
|
|
103
|
-
}), 128))
|
|
104
|
-
])
|
|
105
|
-
]),
|
|
106
|
-
_: 3
|
|
107
|
-
}, 8, ["show-popover", "z-index"]);
|
|
108
|
-
};
|
|
14
|
+
lookups: {
|
|
15
|
+
business: {
|
|
16
|
+
as: "pf_business",
|
|
17
|
+
fromCollection: "Businesses"
|
|
18
|
+
}
|
|
109
19
|
}
|
|
110
|
-
}
|
|
20
|
+
}, T = e.enum([
|
|
21
|
+
"GET",
|
|
22
|
+
"POST",
|
|
23
|
+
"PUT",
|
|
24
|
+
"PATCH",
|
|
25
|
+
"DELETE",
|
|
26
|
+
"OPTIONS",
|
|
27
|
+
"HEAD",
|
|
28
|
+
"ALL"
|
|
29
|
+
]), R = e.enum([
|
|
30
|
+
"CAMPAIGN",
|
|
31
|
+
"LOCATION",
|
|
32
|
+
"MARKETING MATERIALS",
|
|
33
|
+
"MEMBERSHIP",
|
|
34
|
+
"STORE",
|
|
35
|
+
"TRANSACTION",
|
|
36
|
+
"SETTINGS",
|
|
37
|
+
"SEGMENTATION",
|
|
38
|
+
"USER"
|
|
39
|
+
]), C = e.object({
|
|
40
|
+
httpMethod: T,
|
|
41
|
+
url: e.string().min(1),
|
|
42
|
+
userAgent: e.string(),
|
|
43
|
+
host: e.string().min(1),
|
|
44
|
+
params: e.object({}).passthrough().nullish(),
|
|
45
|
+
query: e.object({}).passthrough().nullish(),
|
|
46
|
+
body: e.object({}).passthrough().nullish()
|
|
47
|
+
}), x = e.object({
|
|
48
|
+
statusCode: e.number().int().min(100).max(599),
|
|
49
|
+
body: e.object({}).passthrough().nullish()
|
|
50
|
+
});
|
|
51
|
+
e.object({
|
|
52
|
+
_id: n,
|
|
53
|
+
user: e.string().length(28),
|
|
54
|
+
userName: e.string().min(1),
|
|
55
|
+
userPhoneNumber: e.string().refine((a) => v(a)).nullish(),
|
|
56
|
+
moduleType: R,
|
|
57
|
+
business: n.nullish(),
|
|
58
|
+
clientIp: e.string().nullish(),
|
|
59
|
+
timestamp: e.string().datetime(),
|
|
60
|
+
request: C,
|
|
61
|
+
response: x
|
|
62
|
+
}).describe(o.describe(h));
|
|
63
|
+
const oe = {
|
|
111
64
|
PROMOTION: {
|
|
112
65
|
name: "Promotion Template",
|
|
113
66
|
description: "Promotion template for campaign creation.",
|
|
@@ -502,7 +455,7 @@ const X = {
|
|
|
502
455
|
// },
|
|
503
456
|
hideInApp: !0
|
|
504
457
|
},
|
|
505
|
-
configs:
|
|
458
|
+
configs: i("VOUCHER", {
|
|
506
459
|
name: "",
|
|
507
460
|
business: null,
|
|
508
461
|
noCampaign: !1
|
|
@@ -1216,7 +1169,9 @@ const X = {
|
|
|
1216
1169
|
amount: 1
|
|
1217
1170
|
},
|
|
1218
1171
|
config: {
|
|
1219
|
-
validityOption: {
|
|
1172
|
+
validityOption: {
|
|
1173
|
+
validForDay: 1
|
|
1174
|
+
}
|
|
1220
1175
|
}
|
|
1221
1176
|
}
|
|
1222
1177
|
}
|
|
@@ -1440,7 +1395,7 @@ const X = {
|
|
|
1440
1395
|
rewards: []
|
|
1441
1396
|
}
|
|
1442
1397
|
},
|
|
1443
|
-
configs:
|
|
1398
|
+
configs: i("GAME", {
|
|
1444
1399
|
name: "Token",
|
|
1445
1400
|
business: null,
|
|
1446
1401
|
noCampaign: !1
|
|
@@ -1681,27 +1636,27 @@ const X = {
|
|
|
1681
1636
|
type: "timeframe"
|
|
1682
1637
|
}
|
|
1683
1638
|
},
|
|
1684
|
-
configs:
|
|
1639
|
+
configs: i("STAMP", {
|
|
1685
1640
|
business: null,
|
|
1686
1641
|
noCampaign: !1
|
|
1687
1642
|
})
|
|
1688
1643
|
}
|
|
1689
1644
|
}
|
|
1690
1645
|
};
|
|
1691
|
-
t.scaffoldGroup(),
|
|
1646
|
+
t.scaffoldGroup(), i("STAMP", {
|
|
1692
1647
|
business: null,
|
|
1693
1648
|
noCampaign: !1
|
|
1694
1649
|
});
|
|
1695
1650
|
({
|
|
1696
1651
|
...t.scaffoldGroup()
|
|
1697
|
-
},
|
|
1652
|
+
}, i("VOUCHER", {
|
|
1698
1653
|
name: "",
|
|
1699
1654
|
business: null,
|
|
1700
1655
|
noCampaign: !1
|
|
1701
1656
|
}));
|
|
1702
1657
|
({
|
|
1703
1658
|
...t.scaffoldGroup()
|
|
1704
|
-
},
|
|
1659
|
+
}, i("VOUCHER", {
|
|
1705
1660
|
name: "",
|
|
1706
1661
|
business: null,
|
|
1707
1662
|
noCampaign: !1
|
|
@@ -1744,7 +1699,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1744
1699
|
});
|
|
1745
1700
|
({
|
|
1746
1701
|
...t.scaffoldGroup()
|
|
1747
|
-
},
|
|
1702
|
+
}, i("VOUCHER", {
|
|
1748
1703
|
name: "",
|
|
1749
1704
|
business: null,
|
|
1750
1705
|
noCampaign: !1
|
|
@@ -1790,14 +1745,14 @@ t.setRuleToGroup(
|
|
|
1790
1745
|
"&&"
|
|
1791
1746
|
)
|
|
1792
1747
|
);
|
|
1793
|
-
t.scaffoldGroup(), t.scaffoldGroup(),
|
|
1748
|
+
t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
|
|
1794
1749
|
name: "Token",
|
|
1795
1750
|
business: null,
|
|
1796
1751
|
noCampaign: !1
|
|
1797
1752
|
});
|
|
1798
1753
|
({
|
|
1799
1754
|
...t.scaffoldGroup()
|
|
1800
|
-
},
|
|
1755
|
+
}, i("VOUCHER", {
|
|
1801
1756
|
name: "",
|
|
1802
1757
|
business: null,
|
|
1803
1758
|
noCampaign: !1
|
|
@@ -1826,7 +1781,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1826
1781
|
],
|
|
1827
1782
|
"&&"
|
|
1828
1783
|
)
|
|
1829
|
-
]),
|
|
1784
|
+
]), i("VOUCHER", {
|
|
1830
1785
|
name: "",
|
|
1831
1786
|
business: null,
|
|
1832
1787
|
noCampaign: !1
|
|
@@ -1849,7 +1804,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1849
1804
|
({
|
|
1850
1805
|
...t.scaffoldGroup()
|
|
1851
1806
|
});
|
|
1852
|
-
const
|
|
1807
|
+
const S = e.enum([
|
|
1853
1808
|
"MEMBER_REWARD",
|
|
1854
1809
|
"PAID_LOYALTY",
|
|
1855
1810
|
"COLLECT_FEEDBACK",
|
|
@@ -1859,7 +1814,7 @@ const Q = e.enum([
|
|
|
1859
1814
|
"BROADCAST",
|
|
1860
1815
|
"BIRTHDAY",
|
|
1861
1816
|
"GAME"
|
|
1862
|
-
]),
|
|
1817
|
+
]), D = e.enum([
|
|
1863
1818
|
"text",
|
|
1864
1819
|
"number",
|
|
1865
1820
|
"textarea",
|
|
@@ -1886,95 +1841,95 @@ const Q = e.enum([
|
|
|
1886
1841
|
"rule_feedback",
|
|
1887
1842
|
"rule_birthday",
|
|
1888
1843
|
"promotion_game_type"
|
|
1889
|
-
]),
|
|
1844
|
+
]), A = e.object({
|
|
1890
1845
|
label: e.string().optional(),
|
|
1891
1846
|
property: e.string().or(e.any()),
|
|
1892
|
-
type:
|
|
1847
|
+
type: D,
|
|
1893
1848
|
extras: e.string().optional(),
|
|
1894
1849
|
isRuleChildren: e.boolean().optional()
|
|
1895
|
-
}),
|
|
1850
|
+
}), M = e.object({
|
|
1896
1851
|
name: e.string().optional(),
|
|
1897
|
-
fields: e.array(
|
|
1852
|
+
fields: e.array(A),
|
|
1898
1853
|
condition: e.object({
|
|
1899
1854
|
not: e.boolean().optional(),
|
|
1900
1855
|
property: e.string(),
|
|
1901
1856
|
value: e.any()
|
|
1902
1857
|
}).optional()
|
|
1903
|
-
}),
|
|
1858
|
+
}), N = e.object({
|
|
1904
1859
|
name: e.string(),
|
|
1905
|
-
groups: e.array(
|
|
1860
|
+
groups: e.array(M)
|
|
1906
1861
|
});
|
|
1907
1862
|
e.object({
|
|
1908
|
-
_id:
|
|
1863
|
+
_id: n,
|
|
1909
1864
|
name: e.string(),
|
|
1910
1865
|
description: e.string().nullish(),
|
|
1911
|
-
steps: e.array(
|
|
1912
|
-
intention: e.array(
|
|
1866
|
+
steps: e.array(N).min(1),
|
|
1867
|
+
intention: e.array(S),
|
|
1913
1868
|
defaultValue: e.any()
|
|
1914
1869
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
1915
|
-
const
|
|
1870
|
+
const w = {
|
|
1916
1871
|
collectionName: "Businesses",
|
|
1917
1872
|
transform: {
|
|
1918
1873
|
_id: "oid"
|
|
1919
1874
|
}
|
|
1920
1875
|
};
|
|
1921
1876
|
e.object({
|
|
1922
|
-
_id:
|
|
1877
|
+
_id: n,
|
|
1923
1878
|
ownerId: e.string(),
|
|
1924
1879
|
name: e.string(),
|
|
1925
1880
|
credit: e.number(),
|
|
1926
1881
|
forceSend: e.boolean().optional()
|
|
1927
|
-
}).describe(
|
|
1928
|
-
const
|
|
1882
|
+
}).describe(o.describe(w));
|
|
1883
|
+
const m = e.enum(["PHONE"]), U = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), F = e.enum(["PENDING", "COMPLETED", "FAILED"]), P = e.enum([
|
|
1929
1884
|
"General",
|
|
1930
1885
|
"Otp",
|
|
1931
1886
|
"Marketing",
|
|
1932
1887
|
"Ordering",
|
|
1933
1888
|
"MemberInvitation"
|
|
1934
|
-
]),
|
|
1935
|
-
type:
|
|
1936
|
-
}),
|
|
1937
|
-
type: e.literal(
|
|
1938
|
-
provider:
|
|
1939
|
-
usage:
|
|
1940
|
-
}),
|
|
1889
|
+
]), G = e.object({
|
|
1890
|
+
type: m
|
|
1891
|
+
}), s = G.extend({
|
|
1892
|
+
type: e.literal(m.enum.PHONE),
|
|
1893
|
+
provider: U,
|
|
1894
|
+
usage: P.optional()
|
|
1895
|
+
}), B = {
|
|
1941
1896
|
collectionName: "Notifications",
|
|
1942
1897
|
transform: { _id: "oid", business: "oid" }
|
|
1943
1898
|
};
|
|
1944
1899
|
e.object({
|
|
1945
|
-
_id:
|
|
1946
|
-
business:
|
|
1900
|
+
_id: n,
|
|
1901
|
+
business: n,
|
|
1947
1902
|
target: e.string(),
|
|
1948
1903
|
title: e.string().optional(),
|
|
1949
1904
|
message: e.string(),
|
|
1950
|
-
option:
|
|
1951
|
-
status:
|
|
1905
|
+
option: s,
|
|
1906
|
+
status: F,
|
|
1952
1907
|
ref: e.string().optional()
|
|
1953
|
-
}).describe(
|
|
1908
|
+
}).describe(o.describe(B));
|
|
1954
1909
|
e.object({
|
|
1955
1910
|
target: e.string(),
|
|
1956
1911
|
title: e.string().optional(),
|
|
1957
1912
|
message: e.string(),
|
|
1958
|
-
option:
|
|
1913
|
+
option: s,
|
|
1959
1914
|
ref: e.string().optional()
|
|
1960
1915
|
});
|
|
1961
1916
|
e.object({
|
|
1962
1917
|
phone: e.string(),
|
|
1963
1918
|
message: e.string()
|
|
1964
1919
|
});
|
|
1965
|
-
const
|
|
1966
|
-
name: e.string(),
|
|
1920
|
+
const c = e.object({
|
|
1921
|
+
name: e.string().optional(),
|
|
1967
1922
|
address: e.string()
|
|
1968
|
-
}),
|
|
1923
|
+
}), H = e.object({
|
|
1969
1924
|
filename: e.string(),
|
|
1970
1925
|
content: e.instanceof(Uint8Array)
|
|
1971
1926
|
});
|
|
1972
1927
|
e.object({
|
|
1973
|
-
from:
|
|
1974
|
-
to: e.array(
|
|
1928
|
+
from: c.optional(),
|
|
1929
|
+
to: e.array(c),
|
|
1975
1930
|
subject: e.string(),
|
|
1976
1931
|
html: e.string().optional(),
|
|
1977
|
-
attachments: e.array(
|
|
1932
|
+
attachments: e.array(H).optional()
|
|
1978
1933
|
});
|
|
1979
1934
|
e.object({
|
|
1980
1935
|
subject: e.string(),
|
|
@@ -2007,15 +1962,15 @@ e.object({
|
|
|
2007
1962
|
claimIds: e.array(e.string()),
|
|
2008
1963
|
billId: e.string()
|
|
2009
1964
|
});
|
|
2010
|
-
var
|
|
2011
|
-
e.nativeEnum(
|
|
1965
|
+
var g = /* @__PURE__ */ ((a) => (a[a.feedMe = 0] = "feedMe", a[a.business = 1] = "business", a[a.restaurant = 2] = "restaurant", a))(g || {});
|
|
1966
|
+
e.nativeEnum(g);
|
|
2012
1967
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2013
1968
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2014
1969
|
e.enum(["quota"]);
|
|
2015
|
-
var
|
|
2016
|
-
e.nativeEnum(
|
|
1970
|
+
var d = /* @__PURE__ */ ((a) => (a.marketing = "business::marketing", a.campaign = "business::campaign", a.counter = "business::counter", a.permission = "business::permission", a.role = "business::role", a))(d || {});
|
|
1971
|
+
e.nativeEnum(d);
|
|
2017
1972
|
e.enum(["restaurant"]);
|
|
2018
|
-
const
|
|
1973
|
+
const V = e.object({
|
|
2019
1974
|
label: e.string(),
|
|
2020
1975
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
2021
1976
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -2025,41 +1980,41 @@ const le = e.object({
|
|
|
2025
1980
|
reason: e.string().optional()
|
|
2026
1981
|
});
|
|
2027
1982
|
e.object({
|
|
2028
|
-
_id:
|
|
1983
|
+
_id: n,
|
|
2029
1984
|
businessId: e.string(),
|
|
2030
1985
|
userId: e.string(),
|
|
2031
1986
|
email: e.string().nullish(),
|
|
2032
1987
|
phoneNo: e.string().nullish(),
|
|
2033
|
-
permissions: e.array(e.lazy(() =>
|
|
1988
|
+
permissions: e.array(e.lazy(() => V))
|
|
2034
1989
|
}).describe(
|
|
2035
|
-
|
|
1990
|
+
o.describe({
|
|
2036
1991
|
collectionName: "PermissionUsers",
|
|
2037
1992
|
transform: {
|
|
2038
1993
|
_id: "oid"
|
|
2039
1994
|
}
|
|
2040
1995
|
})
|
|
2041
1996
|
);
|
|
2042
|
-
const
|
|
1997
|
+
const y = e.object({
|
|
2043
1998
|
userId: e.string(),
|
|
2044
1999
|
level: e.number(),
|
|
2045
2000
|
role: e.string().optional(),
|
|
2046
2001
|
businessId: e.string().optional(),
|
|
2047
2002
|
restaurantId: e.string().optional()
|
|
2048
|
-
}),
|
|
2003
|
+
}), k = e.function().args(e.any(), y).returns(e.boolean()), j = e.function().args(y).returns(e.promise(e.array(e.any())));
|
|
2049
2004
|
e.object({
|
|
2050
|
-
isAdmin:
|
|
2051
|
-
getRules:
|
|
2005
|
+
isAdmin: k,
|
|
2006
|
+
getRules: j
|
|
2052
2007
|
});
|
|
2053
2008
|
e.object({
|
|
2054
|
-
transactions: e.array(
|
|
2055
|
-
collections: e.array(
|
|
2009
|
+
transactions: e.array(E),
|
|
2010
|
+
collections: e.array(O)
|
|
2056
2011
|
});
|
|
2057
|
-
const
|
|
2012
|
+
const u = e.enum([
|
|
2058
2013
|
"ROCK_PAPER_SCISSOR"
|
|
2059
2014
|
]);
|
|
2060
|
-
|
|
2015
|
+
u.enum.ROCK_PAPER_SCISSOR + "";
|
|
2061
2016
|
e.object({
|
|
2062
|
-
type:
|
|
2017
|
+
type: u
|
|
2063
2018
|
});
|
|
2064
2019
|
e.object({
|
|
2065
2020
|
host: e.string().url(),
|
|
@@ -2086,8 +2041,139 @@ e.object({
|
|
|
2086
2041
|
phone: e.string().optional(),
|
|
2087
2042
|
email: e.string().optional()
|
|
2088
2043
|
});
|
|
2044
|
+
const Y = e.enum([
|
|
2045
|
+
"PENDING",
|
|
2046
|
+
"SUCCESS",
|
|
2047
|
+
"FAILED",
|
|
2048
|
+
"RETRYING"
|
|
2049
|
+
]), K = {
|
|
2050
|
+
collectionName: "WebhookLogs",
|
|
2051
|
+
transform: {
|
|
2052
|
+
_id: "oid",
|
|
2053
|
+
business: "oid"
|
|
2054
|
+
}
|
|
2055
|
+
};
|
|
2056
|
+
e.object({
|
|
2057
|
+
_id: n,
|
|
2058
|
+
business: n,
|
|
2059
|
+
type: e.string(),
|
|
2060
|
+
payload: e.record(e.any()),
|
|
2061
|
+
status: Y,
|
|
2062
|
+
response: e.any().optional(),
|
|
2063
|
+
error: e.string().optional()
|
|
2064
|
+
}).describe(o.describe(K));
|
|
2065
|
+
const W = e.enum(["AUTO", "MANUAL"]);
|
|
2066
|
+
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2067
|
+
const f = e.object({
|
|
2068
|
+
_id: n,
|
|
2069
|
+
name: e.string().min(1, "Name is required").max(50),
|
|
2070
|
+
type: W,
|
|
2071
|
+
event: I.optional()
|
|
2072
|
+
}), X = e.object({
|
|
2073
|
+
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2074
|
+
to: e.number().int("Must be integer").nullish()
|
|
2075
|
+
}).superRefine((a, b) => {
|
|
2076
|
+
a.from && a.to && a.from > a.to && b.addIssue({
|
|
2077
|
+
code: "custom",
|
|
2078
|
+
message: "Max referral count must be more than min referral count"
|
|
2079
|
+
});
|
|
2080
|
+
}), q = e.object({
|
|
2081
|
+
threshold: X,
|
|
2082
|
+
rewards: e.array(n),
|
|
2083
|
+
pf_reward: e.array(r).optional()
|
|
2084
|
+
}), l = e.object({
|
|
2085
|
+
id: e.string(),
|
|
2086
|
+
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2087
|
+
rule: L.optional(),
|
|
2088
|
+
rewards: e.array(q)
|
|
2089
|
+
}), Q = {
|
|
2090
|
+
collectionName: "ReferralRecords",
|
|
2091
|
+
transform: {
|
|
2092
|
+
_id: "oid",
|
|
2093
|
+
business: "oid",
|
|
2094
|
+
referer: "oid",
|
|
2095
|
+
referee: "oid",
|
|
2096
|
+
refereeReward: "oid"
|
|
2097
|
+
}
|
|
2098
|
+
}, J = e.object({
|
|
2099
|
+
completedAt: e.coerce.date(),
|
|
2100
|
+
criteria: n,
|
|
2101
|
+
ref: e.string()
|
|
2102
|
+
}), z = e.object({
|
|
2103
|
+
_id: n,
|
|
2104
|
+
business: n,
|
|
2105
|
+
referer: n,
|
|
2106
|
+
referee: n,
|
|
2107
|
+
criteria: e.array(f),
|
|
2108
|
+
reward: e.array(l),
|
|
2109
|
+
refereeReward: e.array(n).optional(),
|
|
2110
|
+
criteria_progress: e.array(J),
|
|
2111
|
+
status: e.string(),
|
|
2112
|
+
pf_referer: p.optional(),
|
|
2113
|
+
pf_referee: p.optional(),
|
|
2114
|
+
pf_refereeReward: e.array(r).optional()
|
|
2115
|
+
}).describe(o.describe(Q));
|
|
2116
|
+
z.pick({
|
|
2117
|
+
_id: !0,
|
|
2118
|
+
business: !0,
|
|
2119
|
+
referer: !0,
|
|
2120
|
+
referee: !0,
|
|
2121
|
+
criteria_progress: !0,
|
|
2122
|
+
criteria: !0
|
|
2123
|
+
}).extend({
|
|
2124
|
+
pf_referee: p.pick({
|
|
2125
|
+
_id: !0,
|
|
2126
|
+
name: !0,
|
|
2127
|
+
phoneNumber: !0,
|
|
2128
|
+
photoUrl: !0
|
|
2129
|
+
})
|
|
2130
|
+
});
|
|
2131
|
+
const Z = {
|
|
2132
|
+
collectionName: "ReferralProgram",
|
|
2133
|
+
transform: {
|
|
2134
|
+
_id: "oid",
|
|
2135
|
+
business: "oid"
|
|
2136
|
+
}
|
|
2137
|
+
}, _ = e.object({
|
|
2138
|
+
_id: n,
|
|
2139
|
+
business: n,
|
|
2140
|
+
term_and_condition: e.string().optional(),
|
|
2141
|
+
refereeReward: e.array(n).optional(),
|
|
2142
|
+
reward: e.array(l),
|
|
2143
|
+
criteria: e.array(f)
|
|
2144
|
+
}).describe(o.describe(Z));
|
|
2145
|
+
e.object({
|
|
2146
|
+
referer: n,
|
|
2147
|
+
referee: n,
|
|
2148
|
+
business: n
|
|
2149
|
+
});
|
|
2150
|
+
e.object({
|
|
2151
|
+
program: _.pick({
|
|
2152
|
+
_id: !0,
|
|
2153
|
+
business: !0,
|
|
2154
|
+
term_and_condition: !0
|
|
2155
|
+
}).extend({
|
|
2156
|
+
reward: l.optional(),
|
|
2157
|
+
pf_refereeReward: e.array(r).optional()
|
|
2158
|
+
}),
|
|
2159
|
+
referralCount: e.number(),
|
|
2160
|
+
successReferralCount: e.number(),
|
|
2161
|
+
referredBy: p.pick({
|
|
2162
|
+
_id: !0,
|
|
2163
|
+
name: !0,
|
|
2164
|
+
phoneNumber: !0,
|
|
2165
|
+
photoUrl: !0
|
|
2166
|
+
}).optional()
|
|
2167
|
+
});
|
|
2168
|
+
_.extend({
|
|
2169
|
+
updateReferralRecord: e.boolean().optional()
|
|
2170
|
+
});
|
|
2089
2171
|
export {
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2172
|
+
S as F,
|
|
2173
|
+
oe as T,
|
|
2174
|
+
q as a,
|
|
2175
|
+
f as b,
|
|
2176
|
+
l as c,
|
|
2177
|
+
T as d,
|
|
2178
|
+
R as e
|
|
2093
2179
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { F as o, e as t, g as a } from "./index-CbYXYVYp.js";
|
|
2
|
+
import { z as e, F as i, m as d } from "./plugins-9sQTEyth.js";
|
|
3
|
+
import { F as c } from "./collectible.enum-rWEc6Tsw.js";
|
|
4
|
+
const l = e.enum(["VOUCHER", "LOYALTY"]), n = e.object({
|
|
5
|
+
type: e.literal(l.enum.VOUCHER),
|
|
6
|
+
collectible: i,
|
|
7
|
+
collectibleConfig: e.lazy(() => o._def.right.options[0]),
|
|
8
|
+
earningOption: e.lazy(() => t)
|
|
9
|
+
}), s = e.object({
|
|
10
|
+
type: e.literal(l.enum.LOYALTY),
|
|
11
|
+
collectibleType: c,
|
|
12
|
+
collectible: i,
|
|
13
|
+
earningOption: e.lazy(() => t),
|
|
14
|
+
validityOption: e.lazy(() => a)
|
|
15
|
+
}), r = e.discriminatedUnion("type", [
|
|
16
|
+
n,
|
|
17
|
+
s
|
|
18
|
+
]), p = e.discriminatedUnion("type", [
|
|
19
|
+
n.extend({
|
|
20
|
+
collectible: i.nullish(),
|
|
21
|
+
business: i.nullish()
|
|
22
|
+
}),
|
|
23
|
+
s.extend({
|
|
24
|
+
collectible: i.nullish(),
|
|
25
|
+
collectibleConfig: o.nullish(),
|
|
26
|
+
business: i.nullish()
|
|
27
|
+
})
|
|
28
|
+
]), m = {
|
|
29
|
+
collectionName: "RewardTemplates",
|
|
30
|
+
transform: {
|
|
31
|
+
_id: "oid",
|
|
32
|
+
business: "oid",
|
|
33
|
+
deletedAt: "date"
|
|
34
|
+
}
|
|
35
|
+
}, b = e.object({
|
|
36
|
+
_id: i,
|
|
37
|
+
business: i,
|
|
38
|
+
name: e.string(),
|
|
39
|
+
option: r,
|
|
40
|
+
deletedAt: e.date().optional(),
|
|
41
|
+
collectibleConfig: e.lazy(() => o.nullish())
|
|
42
|
+
}).describe(d.describe(m)), u = b.extend({
|
|
43
|
+
_id: i.nullish(),
|
|
44
|
+
business: i.nullish(),
|
|
45
|
+
option: p,
|
|
46
|
+
name: e.string().min(1, { message: "Name is required" })
|
|
47
|
+
});
|
|
48
|
+
u.extend({
|
|
49
|
+
updateCollection: e.boolean().optional()
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
u as F,
|
|
53
|
+
b as a
|
|
54
|
+
};
|