@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.50
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-D-yp03jJ.js +427 -0
- package/dist/{App-C8Qfnkhz.js → App-CeQWTGNK.js} +441 -420
- package/dist/AuditLogs-2qzwcMXR.js +1885 -0
- package/dist/Bin-D1b2NbbA.js +191 -0
- package/dist/{Broadcast-BK-1MQkL.js → Broadcast-bKF9mIns.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_q5K-cx.js} +6 -8
- package/dist/Card-BCAyfBLi.js +896 -0
- package/dist/{Collections-TA4iW1r0.js → Collections-Yz3F55bv.js} +27 -31
- package/dist/{Credit-Df9iFQjZ.js → Credit-Ceptt_g_.js} +17 -16
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-D3Bt-Vuu.js} +6 -6
- package/dist/{Experience-ByLFXKn6.js → Experience-DskHKzfo.js} +26 -25
- package/dist/{Game-B6Ez0pfW.js → Game-IJ6X0AXM.js} +21 -20
- package/dist/Index-CEl2y9X6.js +259 -0
- package/dist/Marketing-CWekLb4c.js +20071 -0
- package/dist/{Member-TobP1ISp.js → Member-BUZPQ5Lb.js} +4 -4
- package/dist/MemberList-BmVNqvbm.js +1598 -0
- package/dist/MemberTransactions-B3XhEOK_.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-C6YIbQtM.js} +6 -6
- package/dist/{Mission-D9uTVo0G.js → Mission-Ci9ed_ph.js} +97 -84
- package/dist/Overview-CU9uhC-k.js +1078 -0
- package/dist/{Point-4rDr-53e.js → Point-wuuR7AEb.js} +26 -25
- package/dist/{Promotion-BKO_dtQk.js → Promotion-BMi3kyE8.js} +55 -48
- package/dist/Record-Wmh-g8WY.js +340 -0
- package/dist/Reward-BL4lxhIB.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dbik0PEw.js +1637 -0
- package/dist/Segment-DObdjyYi.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BAuM6qP5.js +181 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfyRVxWM.js +147 -0
- package/dist/{Setting-B7oISD0D.js → Setting-Dqgnd7TR.js} +610 -586
- package/dist/Store--Z4So__g.js +1744 -0
- package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-DPFVXWwm.js} +33 -32
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js +939 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CGOmGozY.js} +1 -1
- package/dist/{Tier-DkxdNj-K.js → Tier-36IfhsnP.js} +327 -318
- package/dist/{Title-VFpCOsMO.js → Title-XH56OOug.js} +199 -184
- package/dist/{Transaction-BgKD8n2L.js → Transaction-BUQcSmBs.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BVCfeG5T.js +130 -0
- package/dist/Voucher-CvmH0kcF.js +353 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BQOD6uEf.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js} +1 -1
- package/dist/{app-DUl5dav5.js → app-DeW5_DB0.js} +1754 -1496
- package/dist/{app-DA-t-2Zt.js → app-TN8KEPMu.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-CeCitOY4.js → business-D1mLhSME.js} +1 -1
- package/dist/campaign-0tnkhu78.js +1810 -0
- package/dist/{campaign-CcLM6e4s.js → campaign-B-12Im0w.js} +2 -2
- package/dist/campaign.enum-C8m-HHZE.js +20 -0
- package/dist/campaign.fn-CxkhbK9i.js +758 -0
- package/dist/collectible.enum-6Syq-vQ6.js +19 -0
- package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUj75Jp2.js} +2 -2
- package/dist/dto-8wODhIIC.js +214 -0
- package/dist/{effect-Dt7rXOBy.js → effect-BEZEjcJu.js} +9 -9
- package/dist/email-addresses-PwjkdYYD.js +705 -0
- package/dist/{export-CyioiboQ.js → export-BB-0vgwy.js} +5 -5
- package/dist/{helper-FA_9AhGV.js → helper-DOt8-wns.js} +1 -1
- package/dist/{index-DLN4Kzz_.js → index-B1qUjniH.js} +1 -1
- package/dist/index-BTMIZz4v.js +44 -0
- package/dist/{index-igxrd5jC.js → index-By-GlmG7.js} +1500 -1479
- package/dist/index-C7zBkoZ4.js +115 -0
- package/dist/{index-CyNdsVrw.js → index-CNlHabtk.js} +1 -1
- package/dist/{index-DbbO3wip.js → index-CXGiIgdK.js} +48 -4
- package/dist/{index-C20XBD7G.js → index-Cjn1LVjC.js} +2192 -931
- package/dist/index-CpfUrdgw.js +29000 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-DZuEmMyY.js +54 -0
- package/dist/{index-CCdXvb92.js → index-D_zwqIhq.js} +1 -1
- package/dist/index-DabUEw_c.js +32 -0
- package/dist/{index-BiFueJiF.js → index-X-FfC49l.js} +258 -192
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-DJOUiVjR.js} +33 -33
- package/dist/loading-aCWVsOPY.js +71 -0
- package/dist/{membership-DFiY8aVd.js → membership-1etsHC5G.js} +54 -46
- package/dist/money-DzWRURZ5.js +15 -0
- package/dist/number-BxIQO1i3.js +12 -0
- package/dist/objectid-DjhmYkn-.js +145 -0
- package/dist/{loading-CZ0fiViM.js → plugins-CSPFAU50.js} +2990 -3062
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-Bh4Li9f0.js +36 -0
- package/dist/{rule-C3e1xTqN.js → rule-CHTTTUFB.js} +180 -177
- package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-OHfUJTIA.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-C2OKWd_e.js → template-ZGxXqkaC.js} +5 -5
- package/dist/trigger-Ogu5FDs0.js +144 -0
- package/dist/user-DBuU81tO.js +54 -0
- package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-CKpKQ6iE.js} +216 -216
- package/dist/{xlsx-CtXdl3ls.js → xlsx-DJDZBIeg.js} +1 -1
- package/package.json +9 -7
- package/dist/Analytic-C_ZFR5jh.js +0 -622
- package/dist/Card-C7dUFJKe.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
- package/dist/Marketing-BaqZUeVI.js +0 -316
- package/dist/MemberList-B9cutmEh.js +0 -1733
- package/dist/MemberTransactions-DRHA7AOF.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
- package/dist/Segment-Dj8nc3AE.js +0 -437
- package/dist/Store-CJ3wcohQ.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
- package/dist/Voucher-BbTLt8Pt.js +0 -490
- package/dist/dto-CRJma6eX.js +0 -2770
- package/dist/index-B1e0LtDe.js +0 -99
- package/dist/index-Be2ZYDy_.js +0 -298
- package/dist/index-CDkITvze.js +0 -762
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DPP5F3bT.js +0 -206
- package/dist/index-Dbo3DDwp.js +0 -29193
- package/dist/money-D8hUEfP4.js +0 -15
- package/dist/number-DL3GAeVt.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,113 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z as
|
|
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-CSPFAU50.js";
|
|
2
|
+
import { z as v, A as E, B as O, D as I, E as p } from "./index-Cjn1LVjC.js";
|
|
3
|
+
import { c as L } from "./index-By-GlmG7.js";
|
|
4
|
+
import { R as t } from "./rule-builder-OHfUJTIA.js";
|
|
5
|
+
import { i } from "./helper-DOt8-wns.js";
|
|
6
|
+
import { a as r } from "./index-DZuEmMyY.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.",
|
|
@@ -160,26 +113,6 @@ const X = {
|
|
|
160
113
|
type: "effect"
|
|
161
114
|
}
|
|
162
115
|
]
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
name: "connect.template.voucher_detail",
|
|
166
|
-
fields: [
|
|
167
|
-
{
|
|
168
|
-
label: "connect.template.voucher_name",
|
|
169
|
-
property: "configs.name",
|
|
170
|
-
type: "text"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
label: "connect.template.voucher_description",
|
|
174
|
-
property: "configs.description",
|
|
175
|
-
type: "textarea"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
label: "Voucher Image",
|
|
179
|
-
property: "configs.image",
|
|
180
|
-
type: "image"
|
|
181
|
-
}
|
|
182
|
-
]
|
|
183
116
|
}
|
|
184
117
|
]
|
|
185
118
|
},
|
|
@@ -522,7 +455,7 @@ const X = {
|
|
|
522
455
|
// },
|
|
523
456
|
hideInApp: !0
|
|
524
457
|
},
|
|
525
|
-
configs:
|
|
458
|
+
configs: i("VOUCHER", {
|
|
526
459
|
name: "",
|
|
527
460
|
business: null,
|
|
528
461
|
noCampaign: !1
|
|
@@ -1236,7 +1169,9 @@ const X = {
|
|
|
1236
1169
|
amount: 1
|
|
1237
1170
|
},
|
|
1238
1171
|
config: {
|
|
1239
|
-
validityOption: {
|
|
1172
|
+
validityOption: {
|
|
1173
|
+
validForDay: 1
|
|
1174
|
+
}
|
|
1240
1175
|
}
|
|
1241
1176
|
}
|
|
1242
1177
|
}
|
|
@@ -1460,7 +1395,7 @@ const X = {
|
|
|
1460
1395
|
rewards: []
|
|
1461
1396
|
}
|
|
1462
1397
|
},
|
|
1463
|
-
configs:
|
|
1398
|
+
configs: i("GAME", {
|
|
1464
1399
|
name: "Token",
|
|
1465
1400
|
business: null,
|
|
1466
1401
|
noCampaign: !1
|
|
@@ -1701,27 +1636,27 @@ const X = {
|
|
|
1701
1636
|
type: "timeframe"
|
|
1702
1637
|
}
|
|
1703
1638
|
},
|
|
1704
|
-
configs:
|
|
1639
|
+
configs: i("STAMP", {
|
|
1705
1640
|
business: null,
|
|
1706
1641
|
noCampaign: !1
|
|
1707
1642
|
})
|
|
1708
1643
|
}
|
|
1709
1644
|
}
|
|
1710
1645
|
};
|
|
1711
|
-
t.scaffoldGroup(),
|
|
1646
|
+
t.scaffoldGroup(), i("STAMP", {
|
|
1712
1647
|
business: null,
|
|
1713
1648
|
noCampaign: !1
|
|
1714
1649
|
});
|
|
1715
1650
|
({
|
|
1716
1651
|
...t.scaffoldGroup()
|
|
1717
|
-
},
|
|
1652
|
+
}, i("VOUCHER", {
|
|
1718
1653
|
name: "",
|
|
1719
1654
|
business: null,
|
|
1720
1655
|
noCampaign: !1
|
|
1721
1656
|
}));
|
|
1722
1657
|
({
|
|
1723
1658
|
...t.scaffoldGroup()
|
|
1724
|
-
},
|
|
1659
|
+
}, i("VOUCHER", {
|
|
1725
1660
|
name: "",
|
|
1726
1661
|
business: null,
|
|
1727
1662
|
noCampaign: !1
|
|
@@ -1764,7 +1699,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1764
1699
|
});
|
|
1765
1700
|
({
|
|
1766
1701
|
...t.scaffoldGroup()
|
|
1767
|
-
},
|
|
1702
|
+
}, i("VOUCHER", {
|
|
1768
1703
|
name: "",
|
|
1769
1704
|
business: null,
|
|
1770
1705
|
noCampaign: !1
|
|
@@ -1810,14 +1745,14 @@ t.setRuleToGroup(
|
|
|
1810
1745
|
"&&"
|
|
1811
1746
|
)
|
|
1812
1747
|
);
|
|
1813
|
-
t.scaffoldGroup(), t.scaffoldGroup(),
|
|
1748
|
+
t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
|
|
1814
1749
|
name: "Token",
|
|
1815
1750
|
business: null,
|
|
1816
1751
|
noCampaign: !1
|
|
1817
1752
|
});
|
|
1818
1753
|
({
|
|
1819
1754
|
...t.scaffoldGroup()
|
|
1820
|
-
},
|
|
1755
|
+
}, i("VOUCHER", {
|
|
1821
1756
|
name: "",
|
|
1822
1757
|
business: null,
|
|
1823
1758
|
noCampaign: !1
|
|
@@ -1846,7 +1781,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1846
1781
|
],
|
|
1847
1782
|
"&&"
|
|
1848
1783
|
)
|
|
1849
|
-
]),
|
|
1784
|
+
]), i("VOUCHER", {
|
|
1850
1785
|
name: "",
|
|
1851
1786
|
business: null,
|
|
1852
1787
|
noCampaign: !1
|
|
@@ -1869,7 +1804,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1869
1804
|
({
|
|
1870
1805
|
...t.scaffoldGroup()
|
|
1871
1806
|
});
|
|
1872
|
-
const
|
|
1807
|
+
const S = e.enum([
|
|
1873
1808
|
"MEMBER_REWARD",
|
|
1874
1809
|
"PAID_LOYALTY",
|
|
1875
1810
|
"COLLECT_FEEDBACK",
|
|
@@ -1879,7 +1814,7 @@ const Q = e.enum([
|
|
|
1879
1814
|
"BROADCAST",
|
|
1880
1815
|
"BIRTHDAY",
|
|
1881
1816
|
"GAME"
|
|
1882
|
-
]),
|
|
1817
|
+
]), D = e.enum([
|
|
1883
1818
|
"text",
|
|
1884
1819
|
"number",
|
|
1885
1820
|
"textarea",
|
|
@@ -1906,95 +1841,95 @@ const Q = e.enum([
|
|
|
1906
1841
|
"rule_feedback",
|
|
1907
1842
|
"rule_birthday",
|
|
1908
1843
|
"promotion_game_type"
|
|
1909
|
-
]),
|
|
1844
|
+
]), A = e.object({
|
|
1910
1845
|
label: e.string().optional(),
|
|
1911
1846
|
property: e.string().or(e.any()),
|
|
1912
|
-
type:
|
|
1847
|
+
type: D,
|
|
1913
1848
|
extras: e.string().optional(),
|
|
1914
1849
|
isRuleChildren: e.boolean().optional()
|
|
1915
|
-
}),
|
|
1850
|
+
}), M = e.object({
|
|
1916
1851
|
name: e.string().optional(),
|
|
1917
|
-
fields: e.array(
|
|
1852
|
+
fields: e.array(A),
|
|
1918
1853
|
condition: e.object({
|
|
1919
1854
|
not: e.boolean().optional(),
|
|
1920
1855
|
property: e.string(),
|
|
1921
1856
|
value: e.any()
|
|
1922
1857
|
}).optional()
|
|
1923
|
-
}),
|
|
1858
|
+
}), N = e.object({
|
|
1924
1859
|
name: e.string(),
|
|
1925
|
-
groups: e.array(
|
|
1860
|
+
groups: e.array(M)
|
|
1926
1861
|
});
|
|
1927
1862
|
e.object({
|
|
1928
|
-
_id:
|
|
1863
|
+
_id: n,
|
|
1929
1864
|
name: e.string(),
|
|
1930
1865
|
description: e.string().nullish(),
|
|
1931
|
-
steps: e.array(
|
|
1932
|
-
intention: e.array(
|
|
1866
|
+
steps: e.array(N).min(1),
|
|
1867
|
+
intention: e.array(S),
|
|
1933
1868
|
defaultValue: e.any()
|
|
1934
1869
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
1935
|
-
const
|
|
1870
|
+
const w = {
|
|
1936
1871
|
collectionName: "Businesses",
|
|
1937
1872
|
transform: {
|
|
1938
1873
|
_id: "oid"
|
|
1939
1874
|
}
|
|
1940
1875
|
};
|
|
1941
1876
|
e.object({
|
|
1942
|
-
_id:
|
|
1877
|
+
_id: n,
|
|
1943
1878
|
ownerId: e.string(),
|
|
1944
1879
|
name: e.string(),
|
|
1945
1880
|
credit: e.number(),
|
|
1946
1881
|
forceSend: e.boolean().optional()
|
|
1947
|
-
}).describe(
|
|
1948
|
-
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([
|
|
1949
1884
|
"General",
|
|
1950
1885
|
"Otp",
|
|
1951
1886
|
"Marketing",
|
|
1952
1887
|
"Ordering",
|
|
1953
1888
|
"MemberInvitation"
|
|
1954
|
-
]),
|
|
1955
|
-
type:
|
|
1956
|
-
}),
|
|
1957
|
-
type: e.literal(
|
|
1958
|
-
provider:
|
|
1959
|
-
usage:
|
|
1960
|
-
}),
|
|
1889
|
+
]), B = e.object({
|
|
1890
|
+
type: m
|
|
1891
|
+
}), s = B.extend({
|
|
1892
|
+
type: e.literal(m.enum.PHONE),
|
|
1893
|
+
provider: U,
|
|
1894
|
+
usage: P.optional()
|
|
1895
|
+
}), G = {
|
|
1961
1896
|
collectionName: "Notifications",
|
|
1962
1897
|
transform: { _id: "oid", business: "oid" }
|
|
1963
1898
|
};
|
|
1964
1899
|
e.object({
|
|
1965
|
-
_id:
|
|
1966
|
-
business:
|
|
1900
|
+
_id: n,
|
|
1901
|
+
business: n,
|
|
1967
1902
|
target: e.string(),
|
|
1968
1903
|
title: e.string().optional(),
|
|
1969
1904
|
message: e.string(),
|
|
1970
|
-
option:
|
|
1971
|
-
status:
|
|
1905
|
+
option: s,
|
|
1906
|
+
status: F,
|
|
1972
1907
|
ref: e.string().optional()
|
|
1973
|
-
}).describe(
|
|
1908
|
+
}).describe(o.describe(G));
|
|
1974
1909
|
e.object({
|
|
1975
1910
|
target: e.string(),
|
|
1976
1911
|
title: e.string().optional(),
|
|
1977
1912
|
message: e.string(),
|
|
1978
|
-
option:
|
|
1913
|
+
option: s,
|
|
1979
1914
|
ref: e.string().optional()
|
|
1980
1915
|
});
|
|
1981
1916
|
e.object({
|
|
1982
1917
|
phone: e.string(),
|
|
1983
1918
|
message: e.string()
|
|
1984
1919
|
});
|
|
1985
|
-
const
|
|
1920
|
+
const c = e.object({
|
|
1986
1921
|
name: e.string(),
|
|
1987
1922
|
address: e.string()
|
|
1988
|
-
}),
|
|
1923
|
+
}), H = e.object({
|
|
1989
1924
|
filename: e.string(),
|
|
1990
1925
|
content: e.instanceof(Uint8Array)
|
|
1991
1926
|
});
|
|
1992
1927
|
e.object({
|
|
1993
|
-
from:
|
|
1994
|
-
to: e.array(
|
|
1928
|
+
from: c.optional(),
|
|
1929
|
+
to: e.array(c),
|
|
1995
1930
|
subject: e.string(),
|
|
1996
1931
|
html: e.string().optional(),
|
|
1997
|
-
attachments: e.array(
|
|
1932
|
+
attachments: e.array(H).optional()
|
|
1998
1933
|
});
|
|
1999
1934
|
e.object({
|
|
2000
1935
|
subject: e.string(),
|
|
@@ -2027,15 +1962,15 @@ e.object({
|
|
|
2027
1962
|
claimIds: e.array(e.string()),
|
|
2028
1963
|
billId: e.string()
|
|
2029
1964
|
});
|
|
2030
|
-
var
|
|
2031
|
-
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);
|
|
2032
1967
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2033
1968
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2034
1969
|
e.enum(["quota"]);
|
|
2035
|
-
var
|
|
2036
|
-
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);
|
|
2037
1972
|
e.enum(["restaurant"]);
|
|
2038
|
-
const
|
|
1973
|
+
const V = e.object({
|
|
2039
1974
|
label: e.string(),
|
|
2040
1975
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
2041
1976
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -2045,41 +1980,41 @@ const le = e.object({
|
|
|
2045
1980
|
reason: e.string().optional()
|
|
2046
1981
|
});
|
|
2047
1982
|
e.object({
|
|
2048
|
-
_id:
|
|
1983
|
+
_id: n,
|
|
2049
1984
|
businessId: e.string(),
|
|
2050
1985
|
userId: e.string(),
|
|
2051
1986
|
email: e.string().nullish(),
|
|
2052
1987
|
phoneNo: e.string().nullish(),
|
|
2053
|
-
permissions: e.array(e.lazy(() =>
|
|
1988
|
+
permissions: e.array(e.lazy(() => V))
|
|
2054
1989
|
}).describe(
|
|
2055
|
-
|
|
1990
|
+
o.describe({
|
|
2056
1991
|
collectionName: "PermissionUsers",
|
|
2057
1992
|
transform: {
|
|
2058
1993
|
_id: "oid"
|
|
2059
1994
|
}
|
|
2060
1995
|
})
|
|
2061
1996
|
);
|
|
2062
|
-
const
|
|
1997
|
+
const y = e.object({
|
|
2063
1998
|
userId: e.string(),
|
|
2064
1999
|
level: e.number(),
|
|
2065
2000
|
role: e.string().optional(),
|
|
2066
2001
|
businessId: e.string().optional(),
|
|
2067
2002
|
restaurantId: e.string().optional()
|
|
2068
|
-
}),
|
|
2003
|
+
}), k = e.function().args(e.any(), y).returns(e.boolean()), j = e.function().args(y).returns(e.promise(e.array(e.any())));
|
|
2069
2004
|
e.object({
|
|
2070
|
-
isAdmin:
|
|
2071
|
-
getRules:
|
|
2005
|
+
isAdmin: k,
|
|
2006
|
+
getRules: j
|
|
2072
2007
|
});
|
|
2073
2008
|
e.object({
|
|
2074
|
-
transactions: e.array(
|
|
2075
|
-
collections: e.array(
|
|
2009
|
+
transactions: e.array(E),
|
|
2010
|
+
collections: e.array(O)
|
|
2076
2011
|
});
|
|
2077
|
-
const
|
|
2012
|
+
const u = e.enum([
|
|
2078
2013
|
"ROCK_PAPER_SCISSOR"
|
|
2079
2014
|
]);
|
|
2080
|
-
|
|
2015
|
+
u.enum.ROCK_PAPER_SCISSOR + "";
|
|
2081
2016
|
e.object({
|
|
2082
|
-
type:
|
|
2017
|
+
type: u
|
|
2083
2018
|
});
|
|
2084
2019
|
e.object({
|
|
2085
2020
|
host: e.string().url(),
|
|
@@ -2106,8 +2041,139 @@ e.object({
|
|
|
2106
2041
|
phone: e.string().optional(),
|
|
2107
2042
|
email: e.string().optional()
|
|
2108
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
|
+
});
|
|
2109
2171
|
export {
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
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
|
|
2113
2179
|
};
|