@feedmepos/mf-connect 0.1.0-beta.4 → 0.1.0-beta.41
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-C7iDpCvx.js +426 -0
- package/dist/{App-BnQwjxIr.js → App-rOEspgIk.js} +397 -384
- package/dist/{Broadcast-y1kP18mo.js → Broadcast-CI61-FqI.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dj0JUMOk.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BL_KxlIX.js} +6 -8
- package/dist/Card-CUzEZnUC.js +894 -0
- package/dist/{Collections-DPfbZMg1.js → Collections-zYhQfAph.js} +28 -34
- package/dist/{Credit-QleM_b6q.js → Credit-D6G2xUEu.js} +14 -14
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxxmBzPu.js +2209 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-2hRTF1EJ.js → EffectSheet.vue_vue_type_style_index_0_lang-Drd0ZjdQ.js} +8 -8
- package/dist/{Experience-DGKj8ChY.js → Experience-Cqn6cpA4.js} +8 -8
- package/dist/{Game-BxRdzSma.js → Game-CGrL5xmK.js} +15 -15
- package/dist/Index-CCcuCcmL.js +255 -0
- package/dist/Marketing-DhZHedDV.js +20070 -0
- package/dist/{Member-CteeBDi2.js → Member-CB8o8wLL.js} +4 -4
- package/dist/MemberList-D6zRpcwU.js +1554 -0
- package/dist/MemberTransactions-HCaDl8dN.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ2M8huU.js → MessageInput.vue_vue_type_script_setup_true_lang-CqlGFgwF.js} +2 -2
- package/dist/{Mission-CZgXBa09.js → Mission-CexuwCSV.js} +98 -86
- package/dist/Overview-CZk3IHyA.js +1063 -0
- package/dist/{Point-C2vzEfRP.js → Point-DJ_sLiid.js} +23 -23
- package/dist/{Promotion-337OT0sP.js → Promotion-CWBpjPXQ.js} +53 -47
- package/dist/Record-CwT9Pmjn.js +337 -0
- package/dist/Reward-DhOIXKAB.js +432 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-UP4KtCK2.js +149 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BNw-CED0.js +1637 -0
- package/dist/Segment-BE7Bt2tH.js +566 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CDyT_cSb.js +181 -0
- package/dist/{Setting-DVK2594u.js → Setting-D1k2xVYx.js} +609 -586
- package/dist/Store-BzoJ_ZBZ.js +1743 -0
- package/dist/{StoreRewards-BpEmNueE.js → StoreRewards-OAPmCssF.js} +12 -12
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BIr5Zzij.js +1099 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DT48bSiH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C2fU1byp.js} +1 -1
- package/dist/{Tier-BwvOhyXR.js → Tier-IHJ7dlTI.js} +325 -317
- package/dist/{Title-DRPdKYRO.js → Title-C4KcQWk_.js} +197 -183
- package/dist/{Transaction-BnLvacwW.js → Transaction-B7SWRleT.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DOXLpM1y.js +130 -0
- package/dist/{Voucher-BQL8J_EA.js → Voucher-Dzh-oh1p.js} +40 -40
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DeTWCZF1.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B316b_ta.js → ZodTextField.vue_vue_type_script_setup_true_lang-rBa59HC1.js} +1 -1
- package/dist/{app-BVaQwBvq.js → app-BkSGMADw.js} +1 -1
- package/dist/{app-zO552-Dl.js → app-ZePrUEIY.js} +1183 -1154
- package/dist/app.js +1 -1
- package/dist/{business-BSl6NSdS.js → business-CG7GnAu5.js} +1 -1
- package/dist/campaign-BSH9FJHx.js +1810 -0
- package/dist/{campaign-CxN6mq_l.js → campaign-DFvmN5Ky.js} +2 -2
- package/dist/campaign.enum-CBlGXHp0.js +20 -0
- package/dist/campaign.fn-BszsH1EQ.js +758 -0
- package/dist/collectible.enum-Sd3QSyrd.js +19 -0
- package/dist/{collection.fn-C-2dyWp9.js → collection.fn-CIFllkyx.js} +2 -2
- package/dist/dto-DG2Ckvh4.js +214 -0
- package/dist/{effect-D8y0J47O.js → effect-CWSFIfZh.js} +9 -9
- package/dist/email-addresses-BCNsQNXA.js +705 -0
- package/dist/{export-BxTrifKO.js → export-DKe01mG4.js} +3 -3
- package/dist/{helper-bEmZlTwA.js → helper-Et1Q6YUA.js} +1 -1
- package/dist/{index-DHTYWfTs.js → index-Bk281EIF.js} +207 -195
- package/dist/{index-B2qriSSk.js → index-CHAvEqB_.js} +1 -1
- package/dist/index-CMEY40F9.js +32 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-C_WyKCqN.js → index-D4FT-dGm.js} +1 -1
- package/dist/{index-JBp0chol.js → index-D_sLK5cZ.js} +1500 -1479
- package/dist/{index-Dnv999nc.js → index-Dkl_Y2Ir.js} +1 -1
- package/dist/{index-Ckz-D_AP.js → index-Dlv6dpg5.js} +2188 -931
- package/dist/index-DrRQsR1a.js +44 -0
- package/dist/{index-DuYb25dY.js → index-DzZDUZ8E.js} +37 -4
- package/dist/index-F1sEdtX3.js +54 -0
- package/dist/index-RFzgIvoM.js +29000 -0
- package/dist/{index-BFWCbVq2.js → index-RhGXDJ8R.js} +1 -1
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-Tw7KabwI.js → index.esm2017-COLDuQQ-.js} +1 -1
- package/dist/{loading-60xYxow_.js → loading-DxppIZmv.js} +1714 -1720
- package/dist/{membership-43FU3EmV.js → membership-DIBN0bog.js} +52 -44
- package/dist/money-L7YJDctU.js +15 -0
- package/dist/number-BAUL1NQ9.js +12 -0
- package/dist/objectid-BXKVeU2w.js +145 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-Qjelc0jm.js +36 -0
- package/dist/{rule-DlHrKp8K.js → rule-BAqQRjqc.js} +180 -177
- package/dist/{rule-builder-CU8P8b8U.js → rule-builder-D2hQiWL6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-9StyN-b7.js → template-NVFsa0l_.js} +5 -5
- package/dist/trigger-qeiGHLZs.js +114 -0
- package/dist/{xlsx-CrRvm5Vs.js → usePagination-De7j-UtU.js} +3183 -2962
- package/dist/user-CKVD-V1i.js +54 -0
- package/dist/{vue-i18n-UKlvivrG.js → vue-i18n-CTdcKDi0.js} +2 -2
- package/package.json +8 -7
- package/dist/Analytic-BtldByrt.js +0 -622
- package/dist/Card-kW7k8kOl.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtI2rY4y.js +0 -2813
- package/dist/Marketing-CG4GQdax.js +0 -316
- package/dist/MemberList-CANkPyR0.js +0 -1733
- package/dist/MemberTransactions-CcCa21fY.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dh3naMXv.js +0 -1753
- package/dist/Segment-Clstp5D-.js +0 -437
- package/dist/Store-PnpBvIoo.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CrDhK2dt.js +0 -890
- package/dist/dto-B20bsdh6.js +0 -2770
- package/dist/index-BUCjM4jq.js +0 -29193
- package/dist/index-Ceu2PcnH.js +0 -206
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-D3DAgTFI.js +0 -762
- package/dist/index-Kjelmo0Y.js +0 -298
- package/dist/money-CmR3-qMz.js +0 -15
- package/dist/number-CZlrO6Sq.js +0 -12
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,113 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "fm-typo-en-body-lg-400 mb-4"
|
|
10
|
-
}, q = {
|
|
11
|
-
key: 1,
|
|
12
|
-
class: "fm-typo-en-body-lg-400"
|
|
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
|
-
}
|
|
37
|
-
},
|
|
38
|
-
emits: ["update:model-value"],
|
|
39
|
-
setup(n, { emit: w }) {
|
|
40
|
-
const _ = w, m = G(!1);
|
|
41
|
-
return (v, b) => {
|
|
42
|
-
const N = s("FmIcon"), U = s("FmField"), F = s("FmMenuItem"), B = s("FmPopover");
|
|
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
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}), ve = {
|
|
1
|
+
import { z as e, F as n, m as o } from "./loading-DxppIZmv.js";
|
|
2
|
+
import { c as v } from "./index-D_sLK5cZ.js";
|
|
3
|
+
import { R as t } from "./rule-builder-D2hQiWL6.js";
|
|
4
|
+
import { i } from "./helper-Et1Q6YUA.js";
|
|
5
|
+
import { y as E, z as O, A as I, B as p } from "./index-Dlv6dpg5.js";
|
|
6
|
+
import { F as r } from "./index-F1sEdtX3.js";
|
|
7
|
+
const $ = {
|
|
111
8
|
PROMOTION: {
|
|
112
9
|
name: "Promotion Template",
|
|
113
10
|
description: "Promotion template for campaign creation.",
|
|
@@ -160,26 +57,6 @@ const X = {
|
|
|
160
57
|
type: "effect"
|
|
161
58
|
}
|
|
162
59
|
]
|
|
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
60
|
}
|
|
184
61
|
]
|
|
185
62
|
},
|
|
@@ -440,7 +317,11 @@ const X = {
|
|
|
440
317
|
property: "campaign.code",
|
|
441
318
|
type: "text"
|
|
442
319
|
}
|
|
443
|
-
]
|
|
320
|
+
],
|
|
321
|
+
condition: {
|
|
322
|
+
property: "campaign.event.type",
|
|
323
|
+
value: "SIMPLE_CLAIM"
|
|
324
|
+
}
|
|
444
325
|
},
|
|
445
326
|
{
|
|
446
327
|
name: "Hide in App (FeedVibe)",
|
|
@@ -518,7 +399,7 @@ const X = {
|
|
|
518
399
|
// },
|
|
519
400
|
hideInApp: !0
|
|
520
401
|
},
|
|
521
|
-
configs:
|
|
402
|
+
configs: i("VOUCHER", {
|
|
522
403
|
name: "",
|
|
523
404
|
business: null,
|
|
524
405
|
noCampaign: !1
|
|
@@ -1232,7 +1113,9 @@ const X = {
|
|
|
1232
1113
|
amount: 1
|
|
1233
1114
|
},
|
|
1234
1115
|
config: {
|
|
1235
|
-
validityOption: {
|
|
1116
|
+
validityOption: {
|
|
1117
|
+
validForDay: 1
|
|
1118
|
+
}
|
|
1236
1119
|
}
|
|
1237
1120
|
}
|
|
1238
1121
|
}
|
|
@@ -1456,7 +1339,7 @@ const X = {
|
|
|
1456
1339
|
rewards: []
|
|
1457
1340
|
}
|
|
1458
1341
|
},
|
|
1459
|
-
configs:
|
|
1342
|
+
configs: i("GAME", {
|
|
1460
1343
|
name: "Token",
|
|
1461
1344
|
business: null,
|
|
1462
1345
|
noCampaign: !1
|
|
@@ -1697,27 +1580,27 @@ const X = {
|
|
|
1697
1580
|
type: "timeframe"
|
|
1698
1581
|
}
|
|
1699
1582
|
},
|
|
1700
|
-
configs:
|
|
1583
|
+
configs: i("STAMP", {
|
|
1701
1584
|
business: null,
|
|
1702
1585
|
noCampaign: !1
|
|
1703
1586
|
})
|
|
1704
1587
|
}
|
|
1705
1588
|
}
|
|
1706
1589
|
};
|
|
1707
|
-
t.scaffoldGroup(),
|
|
1590
|
+
t.scaffoldGroup(), i("STAMP", {
|
|
1708
1591
|
business: null,
|
|
1709
1592
|
noCampaign: !1
|
|
1710
1593
|
});
|
|
1711
1594
|
({
|
|
1712
1595
|
...t.scaffoldGroup()
|
|
1713
|
-
},
|
|
1596
|
+
}, i("VOUCHER", {
|
|
1714
1597
|
name: "",
|
|
1715
1598
|
business: null,
|
|
1716
1599
|
noCampaign: !1
|
|
1717
1600
|
}));
|
|
1718
1601
|
({
|
|
1719
1602
|
...t.scaffoldGroup()
|
|
1720
|
-
},
|
|
1603
|
+
}, i("VOUCHER", {
|
|
1721
1604
|
name: "",
|
|
1722
1605
|
business: null,
|
|
1723
1606
|
noCampaign: !1
|
|
@@ -1760,7 +1643,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1760
1643
|
});
|
|
1761
1644
|
({
|
|
1762
1645
|
...t.scaffoldGroup()
|
|
1763
|
-
},
|
|
1646
|
+
}, i("VOUCHER", {
|
|
1764
1647
|
name: "",
|
|
1765
1648
|
business: null,
|
|
1766
1649
|
noCampaign: !1
|
|
@@ -1806,14 +1689,14 @@ t.setRuleToGroup(
|
|
|
1806
1689
|
"&&"
|
|
1807
1690
|
)
|
|
1808
1691
|
);
|
|
1809
|
-
t.scaffoldGroup(), t.scaffoldGroup(),
|
|
1692
|
+
t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
|
|
1810
1693
|
name: "Token",
|
|
1811
1694
|
business: null,
|
|
1812
1695
|
noCampaign: !1
|
|
1813
1696
|
});
|
|
1814
1697
|
({
|
|
1815
1698
|
...t.scaffoldGroup()
|
|
1816
|
-
},
|
|
1699
|
+
}, i("VOUCHER", {
|
|
1817
1700
|
name: "",
|
|
1818
1701
|
business: null,
|
|
1819
1702
|
noCampaign: !1
|
|
@@ -1842,7 +1725,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1842
1725
|
],
|
|
1843
1726
|
"&&"
|
|
1844
1727
|
)
|
|
1845
|
-
]),
|
|
1728
|
+
]), i("VOUCHER", {
|
|
1846
1729
|
name: "",
|
|
1847
1730
|
business: null,
|
|
1848
1731
|
noCampaign: !1
|
|
@@ -1865,7 +1748,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1865
1748
|
({
|
|
1866
1749
|
...t.scaffoldGroup()
|
|
1867
1750
|
});
|
|
1868
|
-
const
|
|
1751
|
+
const L = e.enum([
|
|
1869
1752
|
"MEMBER_REWARD",
|
|
1870
1753
|
"PAID_LOYALTY",
|
|
1871
1754
|
"COLLECT_FEEDBACK",
|
|
@@ -1875,7 +1758,7 @@ const Q = e.enum([
|
|
|
1875
1758
|
"BROADCAST",
|
|
1876
1759
|
"BIRTHDAY",
|
|
1877
1760
|
"GAME"
|
|
1878
|
-
]),
|
|
1761
|
+
]), h = e.enum([
|
|
1879
1762
|
"text",
|
|
1880
1763
|
"number",
|
|
1881
1764
|
"textarea",
|
|
@@ -1902,95 +1785,95 @@ const Q = e.enum([
|
|
|
1902
1785
|
"rule_feedback",
|
|
1903
1786
|
"rule_birthday",
|
|
1904
1787
|
"promotion_game_type"
|
|
1905
|
-
]),
|
|
1788
|
+
]), R = e.object({
|
|
1906
1789
|
label: e.string().optional(),
|
|
1907
1790
|
property: e.string().or(e.any()),
|
|
1908
|
-
type:
|
|
1791
|
+
type: h,
|
|
1909
1792
|
extras: e.string().optional(),
|
|
1910
1793
|
isRuleChildren: e.boolean().optional()
|
|
1911
|
-
}),
|
|
1794
|
+
}), x = e.object({
|
|
1912
1795
|
name: e.string().optional(),
|
|
1913
|
-
fields: e.array(
|
|
1796
|
+
fields: e.array(R),
|
|
1914
1797
|
condition: e.object({
|
|
1915
1798
|
not: e.boolean().optional(),
|
|
1916
1799
|
property: e.string(),
|
|
1917
1800
|
value: e.any()
|
|
1918
1801
|
}).optional()
|
|
1919
|
-
}),
|
|
1802
|
+
}), C = e.object({
|
|
1920
1803
|
name: e.string(),
|
|
1921
|
-
groups: e.array(
|
|
1804
|
+
groups: e.array(x)
|
|
1922
1805
|
});
|
|
1923
1806
|
e.object({
|
|
1924
|
-
_id:
|
|
1807
|
+
_id: n,
|
|
1925
1808
|
name: e.string(),
|
|
1926
1809
|
description: e.string().nullish(),
|
|
1927
|
-
steps: e.array(
|
|
1928
|
-
intention: e.array(
|
|
1810
|
+
steps: e.array(C).min(1),
|
|
1811
|
+
intention: e.array(L),
|
|
1929
1812
|
defaultValue: e.any()
|
|
1930
1813
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
1931
|
-
const
|
|
1814
|
+
const T = {
|
|
1932
1815
|
collectionName: "Businesses",
|
|
1933
1816
|
transform: {
|
|
1934
1817
|
_id: "oid"
|
|
1935
1818
|
}
|
|
1936
1819
|
};
|
|
1937
1820
|
e.object({
|
|
1938
|
-
_id:
|
|
1821
|
+
_id: n,
|
|
1939
1822
|
ownerId: e.string(),
|
|
1940
1823
|
name: e.string(),
|
|
1941
1824
|
credit: e.number(),
|
|
1942
1825
|
forceSend: e.boolean().optional()
|
|
1943
|
-
}).describe(
|
|
1944
|
-
const
|
|
1826
|
+
}).describe(o.describe(T));
|
|
1827
|
+
const m = e.enum(["PHONE"]), D = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), S = e.enum(["PENDING", "COMPLETED", "FAILED"]), A = e.enum([
|
|
1945
1828
|
"General",
|
|
1946
1829
|
"Otp",
|
|
1947
1830
|
"Marketing",
|
|
1948
1831
|
"Ordering",
|
|
1949
1832
|
"MemberInvitation"
|
|
1950
|
-
]),
|
|
1951
|
-
type:
|
|
1952
|
-
}),
|
|
1953
|
-
type: e.literal(
|
|
1954
|
-
provider:
|
|
1955
|
-
usage:
|
|
1956
|
-
}),
|
|
1833
|
+
]), M = e.object({
|
|
1834
|
+
type: m
|
|
1835
|
+
}), s = M.extend({
|
|
1836
|
+
type: e.literal(m.enum.PHONE),
|
|
1837
|
+
provider: D,
|
|
1838
|
+
usage: A.optional()
|
|
1839
|
+
}), w = {
|
|
1957
1840
|
collectionName: "Notifications",
|
|
1958
1841
|
transform: { _id: "oid", business: "oid" }
|
|
1959
1842
|
};
|
|
1960
1843
|
e.object({
|
|
1961
|
-
_id:
|
|
1962
|
-
business:
|
|
1844
|
+
_id: n,
|
|
1845
|
+
business: n,
|
|
1963
1846
|
target: e.string(),
|
|
1964
1847
|
title: e.string().optional(),
|
|
1965
1848
|
message: e.string(),
|
|
1966
|
-
option:
|
|
1967
|
-
status:
|
|
1849
|
+
option: s,
|
|
1850
|
+
status: S,
|
|
1968
1851
|
ref: e.string().optional()
|
|
1969
|
-
}).describe(
|
|
1852
|
+
}).describe(o.describe(w));
|
|
1970
1853
|
e.object({
|
|
1971
1854
|
target: e.string(),
|
|
1972
1855
|
title: e.string().optional(),
|
|
1973
1856
|
message: e.string(),
|
|
1974
|
-
option:
|
|
1857
|
+
option: s,
|
|
1975
1858
|
ref: e.string().optional()
|
|
1976
1859
|
});
|
|
1977
1860
|
e.object({
|
|
1978
1861
|
phone: e.string(),
|
|
1979
1862
|
message: e.string()
|
|
1980
1863
|
});
|
|
1981
|
-
const
|
|
1864
|
+
const c = e.object({
|
|
1982
1865
|
name: e.string(),
|
|
1983
1866
|
address: e.string()
|
|
1984
|
-
}),
|
|
1867
|
+
}), N = e.object({
|
|
1985
1868
|
filename: e.string(),
|
|
1986
1869
|
content: e.instanceof(Uint8Array)
|
|
1987
1870
|
});
|
|
1988
1871
|
e.object({
|
|
1989
|
-
from:
|
|
1990
|
-
to: e.array(
|
|
1872
|
+
from: c.optional(),
|
|
1873
|
+
to: e.array(c),
|
|
1991
1874
|
subject: e.string(),
|
|
1992
1875
|
html: e.string().optional(),
|
|
1993
|
-
attachments: e.array(
|
|
1876
|
+
attachments: e.array(N).optional()
|
|
1994
1877
|
});
|
|
1995
1878
|
e.object({
|
|
1996
1879
|
subject: e.string(),
|
|
@@ -2023,15 +1906,15 @@ e.object({
|
|
|
2023
1906
|
claimIds: e.array(e.string()),
|
|
2024
1907
|
billId: e.string()
|
|
2025
1908
|
});
|
|
2026
|
-
var
|
|
2027
|
-
e.nativeEnum(
|
|
1909
|
+
var g = /* @__PURE__ */ ((a) => (a[a.feedMe = 0] = "feedMe", a[a.business = 1] = "business", a[a.restaurant = 2] = "restaurant", a))(g || {});
|
|
1910
|
+
e.nativeEnum(g);
|
|
2028
1911
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2029
1912
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2030
1913
|
e.enum(["quota"]);
|
|
2031
|
-
var
|
|
2032
|
-
e.nativeEnum(
|
|
1914
|
+
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 || {});
|
|
1915
|
+
e.nativeEnum(d);
|
|
2033
1916
|
e.enum(["restaurant"]);
|
|
2034
|
-
const
|
|
1917
|
+
const U = e.object({
|
|
2035
1918
|
label: e.string(),
|
|
2036
1919
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
2037
1920
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -2041,41 +1924,41 @@ const le = e.object({
|
|
|
2041
1924
|
reason: e.string().optional()
|
|
2042
1925
|
});
|
|
2043
1926
|
e.object({
|
|
2044
|
-
_id:
|
|
1927
|
+
_id: n,
|
|
2045
1928
|
businessId: e.string(),
|
|
2046
1929
|
userId: e.string(),
|
|
2047
1930
|
email: e.string().nullish(),
|
|
2048
1931
|
phoneNo: e.string().nullish(),
|
|
2049
|
-
permissions: e.array(e.lazy(() =>
|
|
1932
|
+
permissions: e.array(e.lazy(() => U))
|
|
2050
1933
|
}).describe(
|
|
2051
|
-
|
|
1934
|
+
o.describe({
|
|
2052
1935
|
collectionName: "PermissionUsers",
|
|
2053
1936
|
transform: {
|
|
2054
1937
|
_id: "oid"
|
|
2055
1938
|
}
|
|
2056
1939
|
})
|
|
2057
1940
|
);
|
|
2058
|
-
const
|
|
1941
|
+
const y = e.object({
|
|
2059
1942
|
userId: e.string(),
|
|
2060
1943
|
level: e.number(),
|
|
2061
1944
|
role: e.string().optional(),
|
|
2062
1945
|
businessId: e.string().optional(),
|
|
2063
1946
|
restaurantId: e.string().optional()
|
|
2064
|
-
}),
|
|
1947
|
+
}), F = e.function().args(e.any(), y).returns(e.boolean()), P = e.function().args(y).returns(e.promise(e.array(e.any())));
|
|
2065
1948
|
e.object({
|
|
2066
|
-
isAdmin:
|
|
2067
|
-
getRules:
|
|
1949
|
+
isAdmin: F,
|
|
1950
|
+
getRules: P
|
|
2068
1951
|
});
|
|
2069
1952
|
e.object({
|
|
2070
|
-
transactions: e.array(
|
|
2071
|
-
collections: e.array(
|
|
1953
|
+
transactions: e.array(E),
|
|
1954
|
+
collections: e.array(O)
|
|
2072
1955
|
});
|
|
2073
|
-
const
|
|
1956
|
+
const u = e.enum([
|
|
2074
1957
|
"ROCK_PAPER_SCISSOR"
|
|
2075
1958
|
]);
|
|
2076
|
-
|
|
1959
|
+
u.enum.ROCK_PAPER_SCISSOR + "";
|
|
2077
1960
|
e.object({
|
|
2078
|
-
type:
|
|
1961
|
+
type: u
|
|
2079
1962
|
});
|
|
2080
1963
|
e.object({
|
|
2081
1964
|
host: e.string().url(),
|
|
@@ -2102,8 +1985,137 @@ e.object({
|
|
|
2102
1985
|
phone: e.string().optional(),
|
|
2103
1986
|
email: e.string().optional()
|
|
2104
1987
|
});
|
|
1988
|
+
const B = e.enum([
|
|
1989
|
+
"PENDING",
|
|
1990
|
+
"SUCCESS",
|
|
1991
|
+
"FAILED",
|
|
1992
|
+
"RETRYING"
|
|
1993
|
+
]), G = {
|
|
1994
|
+
collectionName: "WebhookLogs",
|
|
1995
|
+
transform: {
|
|
1996
|
+
_id: "oid",
|
|
1997
|
+
business: "oid"
|
|
1998
|
+
}
|
|
1999
|
+
};
|
|
2000
|
+
e.object({
|
|
2001
|
+
_id: n,
|
|
2002
|
+
business: n,
|
|
2003
|
+
type: e.string(),
|
|
2004
|
+
payload: e.record(e.any()),
|
|
2005
|
+
status: B,
|
|
2006
|
+
response: e.any().optional(),
|
|
2007
|
+
error: e.string().optional()
|
|
2008
|
+
}).describe(o.describe(G));
|
|
2009
|
+
const H = e.enum(["AUTO", "MANUAL"]);
|
|
2010
|
+
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2011
|
+
const f = e.object({
|
|
2012
|
+
_id: n,
|
|
2013
|
+
name: e.string().min(1, "Name is required").max(50),
|
|
2014
|
+
type: H,
|
|
2015
|
+
event: I.optional()
|
|
2016
|
+
}), V = e.object({
|
|
2017
|
+
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2018
|
+
to: e.number().int("Must be integer").nullish()
|
|
2019
|
+
}).superRefine((a, b) => {
|
|
2020
|
+
a.from && a.to && a.from > a.to && b.addIssue({
|
|
2021
|
+
code: "custom",
|
|
2022
|
+
message: "Max referral count must be more than min referral count"
|
|
2023
|
+
});
|
|
2024
|
+
}), k = e.object({
|
|
2025
|
+
threshold: V,
|
|
2026
|
+
rewards: e.array(n),
|
|
2027
|
+
pf_reward: e.array(r).optional()
|
|
2028
|
+
}), l = e.object({
|
|
2029
|
+
id: e.string(),
|
|
2030
|
+
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2031
|
+
rule: v.optional(),
|
|
2032
|
+
rewards: e.array(k)
|
|
2033
|
+
}), j = {
|
|
2034
|
+
collectionName: "ReferralRecords",
|
|
2035
|
+
transform: {
|
|
2036
|
+
_id: "oid",
|
|
2037
|
+
business: "oid",
|
|
2038
|
+
referer: "oid",
|
|
2039
|
+
referee: "oid",
|
|
2040
|
+
refereeReward: "oid"
|
|
2041
|
+
}
|
|
2042
|
+
}, Y = e.object({
|
|
2043
|
+
completedAt: e.coerce.date(),
|
|
2044
|
+
criteria: n,
|
|
2045
|
+
ref: e.string()
|
|
2046
|
+
}), K = e.object({
|
|
2047
|
+
_id: n,
|
|
2048
|
+
business: n,
|
|
2049
|
+
referer: n,
|
|
2050
|
+
referee: n,
|
|
2051
|
+
criteria: e.array(f),
|
|
2052
|
+
reward: e.array(l),
|
|
2053
|
+
refereeReward: e.array(n).optional(),
|
|
2054
|
+
criteria_progress: e.array(Y),
|
|
2055
|
+
status: e.string(),
|
|
2056
|
+
pf_referer: p.optional(),
|
|
2057
|
+
pf_referee: p.optional(),
|
|
2058
|
+
pf_refereeReward: e.array(r).optional()
|
|
2059
|
+
}).describe(o.describe(j));
|
|
2060
|
+
K.pick({
|
|
2061
|
+
_id: !0,
|
|
2062
|
+
business: !0,
|
|
2063
|
+
referer: !0,
|
|
2064
|
+
referee: !0,
|
|
2065
|
+
criteria_progress: !0,
|
|
2066
|
+
criteria: !0
|
|
2067
|
+
}).extend({
|
|
2068
|
+
pf_referee: p.pick({
|
|
2069
|
+
_id: !0,
|
|
2070
|
+
name: !0,
|
|
2071
|
+
phoneNumber: !0,
|
|
2072
|
+
photoUrl: !0
|
|
2073
|
+
})
|
|
2074
|
+
});
|
|
2075
|
+
const W = {
|
|
2076
|
+
collectionName: "ReferralProgram",
|
|
2077
|
+
transform: {
|
|
2078
|
+
_id: "oid",
|
|
2079
|
+
business: "oid"
|
|
2080
|
+
}
|
|
2081
|
+
}, _ = e.object({
|
|
2082
|
+
_id: n,
|
|
2083
|
+
business: n,
|
|
2084
|
+
term_and_condition: e.string().optional(),
|
|
2085
|
+
refereeReward: e.array(n).optional(),
|
|
2086
|
+
reward: e.array(l),
|
|
2087
|
+
criteria: e.array(f)
|
|
2088
|
+
}).describe(o.describe(W));
|
|
2089
|
+
e.object({
|
|
2090
|
+
referer: n,
|
|
2091
|
+
referee: n,
|
|
2092
|
+
business: n
|
|
2093
|
+
});
|
|
2094
|
+
e.object({
|
|
2095
|
+
program: _.pick({
|
|
2096
|
+
_id: !0,
|
|
2097
|
+
business: !0,
|
|
2098
|
+
term_and_condition: !0
|
|
2099
|
+
}).extend({
|
|
2100
|
+
reward: l.optional(),
|
|
2101
|
+
pf_refereeReward: e.array(r).optional()
|
|
2102
|
+
}),
|
|
2103
|
+
referralCount: e.number(),
|
|
2104
|
+
successReferralCount: e.number(),
|
|
2105
|
+
referredBy: p.pick({
|
|
2106
|
+
_id: !0,
|
|
2107
|
+
name: !0,
|
|
2108
|
+
phoneNumber: !0,
|
|
2109
|
+
photoUrl: !0
|
|
2110
|
+
}).optional()
|
|
2111
|
+
});
|
|
2112
|
+
_.extend({
|
|
2113
|
+
updateReferralRecord: e.boolean().optional()
|
|
2114
|
+
});
|
|
2105
2115
|
export {
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2116
|
+
L as F,
|
|
2117
|
+
$ as T,
|
|
2118
|
+
k as a,
|
|
2119
|
+
f as b,
|
|
2120
|
+
l as c
|
|
2109
2121
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { g as s, S as o, b as i } from "./index-RFzgIvoM.js";
|
|
2
|
+
const a = () => {
|
|
3
|
+
const r = o.getBusinessId();
|
|
4
|
+
if (!r) throw new Error("Invalid business ID");
|
|
5
|
+
return i(`businesses/${r}/referral`, {
|
|
6
|
+
noIdRequired: !0
|
|
7
|
+
});
|
|
8
|
+
}, u = {
|
|
9
|
+
async read() {
|
|
10
|
+
return s(await a().get(""));
|
|
11
|
+
},
|
|
12
|
+
async update(r) {
|
|
13
|
+
return s(await a().put("", r));
|
|
14
|
+
},
|
|
15
|
+
async readRecords(r) {
|
|
16
|
+
const e = s(
|
|
17
|
+
await a().get("records", { params: r })
|
|
18
|
+
), t = e.resources.map((n) => ({
|
|
19
|
+
...n
|
|
20
|
+
}));
|
|
21
|
+
return {
|
|
22
|
+
meta: e.meta,
|
|
23
|
+
resources: t
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
async updateCriteriaProgress(r, e) {
|
|
27
|
+
return s(await a().post(`/records/${r}/progress`, e));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
u as r
|
|
32
|
+
};
|