@feedmepos/mf-connect 0.0.16-beta.10 → 0.0.16-beta.12
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-BVk0jPDU.js → Analytic-DIc9BYb0.js} +32 -20
- package/dist/{App-BbAalq1k.js → App-BzzL9_Jw.js} +33 -27
- package/dist/Broadcast-dVPgK5QV.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-TnEPvafD.js} +18 -11
- package/dist/{Card-B5in1RMa.js → Card-Bj2Yd2pr.js} +178 -158
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-Fkb_zzqZ.js +453 -0
- package/dist/{Credit-Bc9EzdsC.js → Credit-DHn9OkE8.js} +78 -69
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C1ZXQski.js +2788 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D6mWny8y.js +344 -0
- package/dist/{Experience-CgKak5ik.js → Experience-DX3aJihS.js} +64 -55
- package/dist/{Game-QhfKqrN_.js → Game-CcVQvETd.js} +54 -45
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/{Marketing-CSx4N7UJ.js → Marketing-B9kykWEh.js} +79 -72
- package/dist/{Member-CY6WMD8D.js → Member-RoJSCSC5.js} +25 -22
- package/dist/{MemberList-8iRwm7Sz.js → MemberList-BUDxqMEK.js} +321 -307
- package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bh_tT1Rp.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Cj3-JHOX.js +432 -0
- package/dist/{Mission-BTy1p7lU.js → Mission-DDvgCLy0.js} +50 -40
- package/dist/{Point-A6B_ggSy.js → Point-BbPkt4kF.js} +67 -58
- package/dist/Promotion-DEo-lxpX.js +221 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BGjeTeqS.js +1751 -0
- package/dist/{Segment-CFVXtyEj.js → Segment-DAcpZWIN.js} +145 -130
- package/dist/{Setting-Jmtw-_DV.js → Setting-CgXohUPt.js} +167 -154
- package/dist/{Store-DQypT-7e.js → Store-BVyHbQ8o.js} +504 -489
- package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-sccMDbkj.js} +124 -108
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang--sdQ_l8g.js} +131 -123
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CXlkvt2u.js +139 -0
- package/dist/{Tier-D1jymeLK.js → Tier--P27XXbB.js} +144 -125
- package/dist/{Title-DN9DIP2k.js → Title-B27S3SxD.js} +107 -90
- package/dist/{Transaction-BAJvAoU6.js → Transaction-CYTtwwHY.js} +2 -2
- package/dist/Voucher-BZ8PKgO5.js +488 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-CnKzqAcN.js +53428 -0
- package/dist/app-FfENBuoE.js +5381 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +2 -1
- package/dist/business-CXyP9G7A.js +78 -0
- package/dist/campaign-0aM2KYOy.js +96 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/collection.fn-FicQhH1t.js +26 -0
- package/dist/dto-BiYLkVdL.js +1169 -0
- package/dist/effect-Cg-eNEjg.js +61 -0
- package/dist/{export-DjeNY5Pc.js → export-D7BuObOL.js} +19 -16
- package/dist/helper-DvD-D7c7.js +71 -0
- package/dist/index-B1Q0GAWp.js +95 -0
- package/dist/index-B4UZgSB-.js +28058 -0
- package/dist/index-B6c-fUij.js +203 -0
- package/dist/index-BP_5cfKa.js +38 -0
- package/dist/index-BRXg5Si1.js +2071 -0
- package/dist/index-BuDwICBJ.js +761 -0
- package/dist/index-CDMC-8iO.js +94 -0
- package/dist/index-CcZt3OrE.js +73 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DA-fzkRR.js +1737 -0
- package/dist/index-Dbd4WA4r.js +61 -0
- package/dist/index-Dkeb_9ER.js +8832 -0
- package/dist/index-DmdKoKk_.js +298 -0
- package/dist/index-G-88ujCM.js +3 -0
- package/dist/loading-uCNeZibp.js +32697 -0
- package/dist/lodash-B5I3zXaY.js +3678 -0
- package/dist/membership-DFRO9TyM.js +221 -0
- package/dist/moment-BWErdI6_.js +2578 -0
- package/dist/money-OtkT4Pzp.js +15 -0
- package/dist/number-Cg3NCouc.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/rule-Ch2HRiGw.js +1973 -0
- package/dist/rule-builder-B_M9yvEe.js +89 -0
- package/dist/template-1o0LbOoJ.js +190 -0
- package/dist/usePagination-BeF5K3M7.js +223 -0
- package/dist/vue-i18n-AtGIa4qH.js +2365 -0
- package/dist/xlsx-pChq0adn.js +15491 -0
- package/dist/zod-W_PvIofQ.js +90 -0
- package/package.json +3 -3
- package/dist/Collections-CFCZ9YIG.js +0 -4
- package/dist/MainLayout-JbHzENFy.js +0 -4
- package/dist/app-BpzzygYP.js +0 -87765
- package/dist/money-DKGIIplY.js +0 -15
- package/dist/number-tPodRxTN.js +0 -12
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { c as o } from "./index-B4UZgSB-.js";
|
|
2
|
+
function c(e) {
|
|
3
|
+
if (!e)
|
|
4
|
+
return null;
|
|
5
|
+
const n = o.Config.getCountry().currency.symbol;
|
|
6
|
+
function s(t) {
|
|
7
|
+
const r = o.Dinero.fromFdoDecimal({ decimal: t.adjustment.amount });
|
|
8
|
+
switch (t.adjustment.type) {
|
|
9
|
+
case "BY_PERCENTAGE":
|
|
10
|
+
return `${r.toObject().amount}% discount`;
|
|
11
|
+
case "BY_AMOUNT":
|
|
12
|
+
return `${n}${r.toUnit()} discount`;
|
|
13
|
+
case "TO_AMOUNT":
|
|
14
|
+
return `to ${n}${r.toUnit()}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function i(t) {
|
|
18
|
+
switch (t.options.target) {
|
|
19
|
+
case "BILL":
|
|
20
|
+
return "Bill Discount";
|
|
21
|
+
case "ITEM":
|
|
22
|
+
if (t.options.strategy.type === "SIMPLE")
|
|
23
|
+
return "Item Discount";
|
|
24
|
+
if (t.options.strategy.type === "BUY_X_GET_Y")
|
|
25
|
+
return "Buy X Get Y (same product set)";
|
|
26
|
+
if (t.options.strategy.type === "BUY_X_GET_Y_V2")
|
|
27
|
+
return "Buy X Get Y (mixed product set)";
|
|
28
|
+
if (t.options.strategy.type === "BUY_X_ITEM_A_GET_Y_ITEM_B")
|
|
29
|
+
return "Buy X Get Y (different product set)";
|
|
30
|
+
if (t.options.strategy.type === "COMBO")
|
|
31
|
+
return "Combo";
|
|
32
|
+
break;
|
|
33
|
+
case "PAYMENT":
|
|
34
|
+
return "Payment";
|
|
35
|
+
default:
|
|
36
|
+
throw new Error("Invalid effect target");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function u(t) {
|
|
40
|
+
if (t.options.target === "BILL" || t.options.target === "PAYMENT") {
|
|
41
|
+
const r = o.Dinero.fromFdoDecimal({
|
|
42
|
+
decimal: t.options.minPurchase
|
|
43
|
+
});
|
|
44
|
+
return r.toUnit() > 0 ? `min spend ${n}${r.toUnit()}` : "no min spend";
|
|
45
|
+
}
|
|
46
|
+
return "no min spend";
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
type: i(e),
|
|
50
|
+
adjustment: s(e),
|
|
51
|
+
requirements: u(e)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function m(e) {
|
|
55
|
+
const n = c(e);
|
|
56
|
+
return !e || !n ? null : Object.values(n).filter(Boolean).join(" | ");
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
m as e,
|
|
60
|
+
c as s
|
|
61
|
+
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
2
|
var b = (s, e, o) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
var d = (s, e, o) => b(s, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { u as a, w as f } from "./xlsx-pChq0adn.js";
|
|
5
|
+
import { u as h } from "./loading-uCNeZibp.js";
|
|
6
|
+
import { h as x } from "./moment-BWErdI6_.js";
|
|
7
|
+
import { m as w } from "./index-B1Q0GAWp.js";
|
|
8
|
+
class y {
|
|
6
9
|
constructor() {
|
|
7
|
-
|
|
10
|
+
d(this, "records", []);
|
|
8
11
|
}
|
|
9
12
|
addRecord(e) {
|
|
10
13
|
this.records.push(e);
|
|
@@ -17,7 +20,7 @@ class f {
|
|
|
17
20
|
return a.book_append_sheet(o, e, "Sheet1"), o;
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
|
-
class k extends
|
|
23
|
+
class k extends y {
|
|
21
24
|
}
|
|
22
25
|
const r = {
|
|
23
26
|
sortBy: "_id",
|
|
@@ -25,7 +28,7 @@ const r = {
|
|
|
25
28
|
rowsPerPage: 1e3,
|
|
26
29
|
page: 1,
|
|
27
30
|
rowsNumber: 0
|
|
28
|
-
}, { minor: _ } =
|
|
31
|
+
}, { minor: _ } = h;
|
|
29
32
|
async function S({
|
|
30
33
|
exporter: s,
|
|
31
34
|
readFunction: e,
|
|
@@ -40,21 +43,21 @@ async function S({
|
|
|
40
43
|
})).meta.totalResources ?? 0, n = r.rowsPerPage;
|
|
41
44
|
await _(
|
|
42
45
|
async () => {
|
|
43
|
-
for (let
|
|
44
|
-
const
|
|
46
|
+
for (let i = 0; i < c; i += n) {
|
|
47
|
+
const m = {
|
|
45
48
|
...r,
|
|
46
49
|
limit: n,
|
|
47
50
|
skip: r.page - 1,
|
|
48
51
|
sortBy: r.sortBy,
|
|
49
52
|
descending: r.descending
|
|
50
|
-
},
|
|
51
|
-
for (const l of
|
|
53
|
+
}, p = await e(m);
|
|
54
|
+
for (const l of p.resources) {
|
|
52
55
|
const u = o(l);
|
|
53
56
|
s.addRecord(u);
|
|
54
57
|
}
|
|
55
58
|
r.page++;
|
|
56
59
|
}
|
|
57
|
-
await
|
|
60
|
+
await f(
|
|
58
61
|
s.buildExcel(),
|
|
59
62
|
`${t}-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
60
63
|
{
|
|
@@ -70,25 +73,25 @@ async function S({
|
|
|
70
73
|
}
|
|
71
74
|
);
|
|
72
75
|
}
|
|
73
|
-
async function
|
|
76
|
+
async function E() {
|
|
74
77
|
return S({
|
|
75
78
|
exporter: new k(),
|
|
76
|
-
readFunction:
|
|
79
|
+
readFunction: w.readCards,
|
|
77
80
|
transformRecord: (s) => {
|
|
78
81
|
var e, o;
|
|
79
82
|
return {
|
|
80
83
|
CardNumber: s.serialNumber || "",
|
|
81
84
|
MemberId: ((e = s.pf_member) == null ? void 0 : e._id.toString()) || "",
|
|
82
85
|
Phone: ((o = s.pf_member) == null ? void 0 : o.phoneNumber) || "",
|
|
83
|
-
RedeemedAt: s.redeemedAt ?
|
|
86
|
+
RedeemedAt: s.redeemedAt ? x(s.redeemedAt).format("DD/MM/YYYY") : ""
|
|
84
87
|
};
|
|
85
88
|
},
|
|
86
89
|
filename: "cards"
|
|
87
90
|
});
|
|
88
91
|
}
|
|
89
92
|
export {
|
|
90
|
-
|
|
93
|
+
y as B,
|
|
91
94
|
k as C,
|
|
92
95
|
S as a,
|
|
93
|
-
|
|
96
|
+
E as e
|
|
94
97
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { i } from "./index-Dkeb_9ER.js";
|
|
2
|
+
function o(t, e) {
|
|
3
|
+
switch (t) {
|
|
4
|
+
case "COIN":
|
|
5
|
+
case "CREDIT":
|
|
6
|
+
case "POINT":
|
|
7
|
+
case "TIER":
|
|
8
|
+
case "TITLE":
|
|
9
|
+
return {
|
|
10
|
+
business: e.business,
|
|
11
|
+
name: e.name || "",
|
|
12
|
+
stackable: !0,
|
|
13
|
+
type: t,
|
|
14
|
+
options: {}
|
|
15
|
+
};
|
|
16
|
+
case "GAME":
|
|
17
|
+
return {
|
|
18
|
+
business: e.business,
|
|
19
|
+
name: e.name || "",
|
|
20
|
+
stackable: !1,
|
|
21
|
+
type: t,
|
|
22
|
+
options: {},
|
|
23
|
+
extras: {
|
|
24
|
+
gameType: "FORTUNE_WHEEL"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
case "VOUCHER":
|
|
28
|
+
return {
|
|
29
|
+
business: e.business,
|
|
30
|
+
name: e.name || "",
|
|
31
|
+
stackable: !1,
|
|
32
|
+
type: "VOUCHER",
|
|
33
|
+
options: {
|
|
34
|
+
enableTransfer: !1,
|
|
35
|
+
maxPerUser: null,
|
|
36
|
+
maxReceive: null,
|
|
37
|
+
maxUse: 1,
|
|
38
|
+
cooldown: 0,
|
|
39
|
+
validityOption: {}
|
|
40
|
+
},
|
|
41
|
+
extras: {
|
|
42
|
+
effect: null,
|
|
43
|
+
targetLocation: null
|
|
44
|
+
},
|
|
45
|
+
noCampaign: e.noCampaign === !0
|
|
46
|
+
};
|
|
47
|
+
case "STAMP":
|
|
48
|
+
return {
|
|
49
|
+
business: e.business,
|
|
50
|
+
name: e.name || "STAMP",
|
|
51
|
+
stackable: !0,
|
|
52
|
+
type: "STAMP",
|
|
53
|
+
options: {
|
|
54
|
+
maxPerUser: 1,
|
|
55
|
+
validityOption: {
|
|
56
|
+
followFirstReceive: !0
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
default:
|
|
61
|
+
throw new Error("Invalid collectible type");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function u(t) {
|
|
65
|
+
const { validAfter: e, validBefore: a } = t, { validForDay: s } = t, n = i(e).toDate(), r = i(a).toDate();
|
|
66
|
+
return e && a ? `${n.toLocaleDateString()} - ${r.toLocaleDateString()}` : e ? `Starts from ${n.toLocaleDateString()}` : a ? `Ends at ${r.toLocaleDateString()}` : s != null ? `Expires in ${s || "the same"} day${s > 1 ? "s" : ""} after claim` : "Always valid";
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
o as i,
|
|
70
|
+
u as t
|
|
71
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { g as t, S as n, b as u } from "./index-B4UZgSB-.js";
|
|
2
|
+
const a = () => {
|
|
3
|
+
const e = n.getBusinessId();
|
|
4
|
+
if (!e) throw new Error("Invalid business ID");
|
|
5
|
+
return u(`businesses/${e}/membership`, {
|
|
6
|
+
noIdRequired: !0
|
|
7
|
+
});
|
|
8
|
+
}, c = {
|
|
9
|
+
async read() {
|
|
10
|
+
return t(await a().get(""));
|
|
11
|
+
},
|
|
12
|
+
async update(e) {
|
|
13
|
+
return t(await a().put("", e));
|
|
14
|
+
},
|
|
15
|
+
async createTier(e) {
|
|
16
|
+
return t(await a().post("tier", e));
|
|
17
|
+
},
|
|
18
|
+
async updateTiers(e) {
|
|
19
|
+
return t(await a().put("tiers", e));
|
|
20
|
+
},
|
|
21
|
+
async createTitle(e) {
|
|
22
|
+
return t(await a().post("titles", e));
|
|
23
|
+
},
|
|
24
|
+
async updateTitle(e, r) {
|
|
25
|
+
return t(
|
|
26
|
+
await a().put(`titles/${e}`, r)
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
async deleteTitle(e) {
|
|
30
|
+
return t(await a().delete(`titles/${e}`));
|
|
31
|
+
},
|
|
32
|
+
async readStore() {
|
|
33
|
+
return t(await a().get("store"));
|
|
34
|
+
},
|
|
35
|
+
async readPayoutAccount() {
|
|
36
|
+
return t(
|
|
37
|
+
await a().get("store/payout-account")
|
|
38
|
+
);
|
|
39
|
+
},
|
|
40
|
+
async updateStore(e) {
|
|
41
|
+
return t(await a().put("store", e));
|
|
42
|
+
},
|
|
43
|
+
async updateStoreBundle(e) {
|
|
44
|
+
return t(
|
|
45
|
+
await a().put("store/bundle", e)
|
|
46
|
+
);
|
|
47
|
+
},
|
|
48
|
+
async readRewards() {
|
|
49
|
+
return t(await a().get("rewards"));
|
|
50
|
+
},
|
|
51
|
+
async readRewardById(e) {
|
|
52
|
+
return t(await a().get(`rewards/${e}`));
|
|
53
|
+
},
|
|
54
|
+
async readCollectionsByRewardId(e, r) {
|
|
55
|
+
const s = t(
|
|
56
|
+
await a().get(`/${e}/collections`, {
|
|
57
|
+
params: r
|
|
58
|
+
})
|
|
59
|
+
);
|
|
60
|
+
return {
|
|
61
|
+
meta: s.meta,
|
|
62
|
+
resources: s.resources
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
async createReward(e) {
|
|
66
|
+
return t(await a().post("rewards", e));
|
|
67
|
+
},
|
|
68
|
+
async readCards(e) {
|
|
69
|
+
const r = t(
|
|
70
|
+
await a().get("/cards", {
|
|
71
|
+
params: e
|
|
72
|
+
})
|
|
73
|
+
);
|
|
74
|
+
return {
|
|
75
|
+
meta: r.meta,
|
|
76
|
+
resources: r.resources
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
async createCards(e) {
|
|
80
|
+
return t(
|
|
81
|
+
await a().post("/cards", e)
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
async updateReward(e, r) {
|
|
85
|
+
return t(
|
|
86
|
+
await a().put(`rewards/${e}`, r)
|
|
87
|
+
);
|
|
88
|
+
},
|
|
89
|
+
async deleteReward(e) {
|
|
90
|
+
return t(await a().delete(`rewards/${e}`));
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
c as m
|
|
95
|
+
};
|