@feedmepos/mf-connect 0.1.0-beta.70 → 0.1.0-beta.71
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-DEQUEGlq.js → Analytic-CnF_WeRZ.js} +11 -11
- package/dist/{App-CcoU2SAx.js → App-DJwSTuRa.js} +10 -10
- package/dist/{AuditLogs-CiB6u06w.js → AuditLogs-RarW2PHL.js} +8 -8
- package/dist/{Bin-C2_1m5RT.js → Bin-BaixTvHW.js} +8 -8
- package/dist/{Broadcast-TotIXDuJ.js → Broadcast-8DEAMhyM.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CixQu3Pr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DPXoOupI.js} +6 -6
- package/dist/{Card-Ce-_xMgS.js → Card-DRwLZ-Mn.js} +15 -15
- package/dist/{Collections-DKva6Doi.js → Collections-WsPM9v03.js} +5 -5
- package/dist/{Credit-BVUxIJ6C.js → Credit-DMxRdTzt.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKEumoan.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bcj6o4Xi.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ah4bz-qR.js → EffectSheet.vue_vue_type_style_index_0_lang-CuJ8curT.js} +6 -6
- package/dist/{Experience-DV3384o0.js → Experience-B0BV4Tc_.js} +9 -9
- package/dist/{Game-DY83ti52.js → Game-Bu6kJJHx.js} +10 -10
- package/dist/{Index-DEIaZ-2H.js → Index-CX-aPFQt.js} +10 -10
- package/dist/{Marketing-C2RwIlrg.js → Marketing-CiVFwl6S.js} +6 -6
- package/dist/{Member-D4fc-wzd.js → Member-DZfTtt13.js} +5 -5
- package/dist/{MemberList-DSMI6t_D.js → MemberList-CscwsZnv.js} +24 -24
- package/dist/{MemberTransactions-wXUlbbRq.js → MemberTransactions-BWNs6bUm.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DYS0klKm.js → MessageInput.vue_vue_type_script_setup_true_lang-BrbRudIU.js} +17 -20
- package/dist/{Mission-P_KLDEpg.js → Mission-CyJ-9Qfl.js} +10 -10
- package/dist/{Overview-8vc0f1D7.js → Overview-DLyt6VId.js} +17 -17
- package/dist/{Point-B4Y0Pq60.js → Point-Cc_0-RKm.js} +9 -9
- package/dist/Promotion-KqA8nev2.js +289 -0
- package/dist/{Queue-BlPA7PNH.js → Queue-i8--zps9.js} +48 -43
- package/dist/{Record-Cl1qXSSk.js → Record-CLUO1JVc.js} +7 -7
- package/dist/{Reward-jy6-W1Eh.js → Reward-BEdUKQ3M.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-d5JNNNHf.js → RewardGroup.vue_vue_type_script_setup_true_lang-B9vnSbWj.js} +11 -11
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B8zw1TmO.js +1727 -0
- package/dist/{Segment-B36Nrvxs.js → Segment-B8sYajZG.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-jN0xUFNR.js → SelectItems.vue_vue_type_script_setup_true_lang-CmmI5Vwl.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLFTNooB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIcXjbJG.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-H_Sehhgf.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DY3FMuIf.js} +3 -3
- package/dist/{Setting-AgQf2X4W.js → Setting-DT8dRb2A.js} +10 -10
- package/dist/{Store-D3Mm0pan.js → Store-BhsPWRkR.js} +18 -18
- package/dist/{StoreRewards-L0VLWz8l.js → StoreRewards-Cx2WDZ3p.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Zl_cXXSD.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Byb7GOoh.js} +37 -37
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-b4mfueTj.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cb-FGTO9.js} +1 -1
- package/dist/{Tier-DQq-375x.js → Tier-kQy1vGwo.js} +19 -19
- package/dist/{Title-OJxuBvaa.js → Title-DKv8FqpX.js} +19 -19
- package/dist/{Transaction-vgsYRfD7.js → Transaction-CSLllOgl.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cwi0mvC3.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CvpBdNBn.js} +6 -6
- package/dist/{Voucher-BFwLaoxe.js → Voucher-BP6fmSwu.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DNUBaNtJ.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CxQEg_HW.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-ms40eptZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-aurdXO2X.js} +1 -1
- package/dist/{app-D7C3Fxfi.js → app-B3qgrQOd.js} +36 -34
- package/dist/{app-BQFTJ_hE.js → app-s3iL79De.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/business-DG2w8U-i.js +79 -0
- package/dist/{campaign-UQ8kMVeC.js → campaign-BP6Rz-AH.js} +9 -9
- package/dist/{campaign-BkxTDfsK.js → campaign-WPRZ4BRF.js} +2 -2
- package/dist/{campaign.enum-BdT-e9h9.js → campaign.enum-CoqrWNTZ.js} +1 -1
- package/dist/campaign.fn-BRPigTOA.js +758 -0
- package/dist/{collectible.enum-C8kd17Tz.js → collectible.enum-Dy4sxF43.js} +1 -1
- package/dist/{collection.fn-BIw1Y_tv.js → collection.fn-DGnLyYgV.js} +2 -2
- package/dist/{dto-CwzAhB8x.js → dto-xZ9I6-Jr.js} +4 -4
- package/dist/{effect-CJcvLlKG.js → effect-C0XoYTus.js} +1 -1
- package/dist/{email-addresses-BCJTQPT0.js → email-addresses-CJ87c7W1.js} +1 -1
- package/dist/{export-URRwle1z.js → export-qlV-AbEl.js} +3 -3
- package/dist/{helper-DccnE6zn.js → helper-DzYe8aNx.js} +1 -1
- package/dist/{index-ghSGvG-m.js → index-4vdSri7m.js} +6 -6
- package/dist/{index-C3lpXz_P.js → index-BfSj7cUl.js} +1 -1
- package/dist/{index-BiIZ7X6d.js → index-Bj0ULpXi.js} +1264 -1264
- package/dist/{index-D4MX9e5q.js → index-BnZ4yaMH.js} +1 -1
- package/dist/{index-EOPRlB9V.js → index-Bo5DJXxs.js} +3 -3
- package/dist/{index-CFA3EqId.js → index-BuvJH6SU.js} +1 -1
- package/dist/{index-DrE9VkxR.js → index-C2GEs8di.js} +1 -1
- package/dist/{index-BsRJ4kVb.js → index-CJuOTcCE.js} +1 -1
- package/dist/{index-CPRN3irj.js → index-DReysUPw.js} +4 -4
- package/dist/{index-FcxOGFKj.js → index-DgCjRb3o.js} +1 -1
- package/dist/{index-CaxFS90M.js → index-IwITtvVu.js} +1 -1
- package/dist/{index-OScGm4mF.js → index-n3wiQlbk.js} +2 -2
- package/dist/{index.esm2017-CE1CQHrP.js → index.esm2017-CkJhTmme.js} +175 -175
- package/dist/{loading-B8zghYbj.js → loading-DwJdwl4G.js} +1 -1
- package/dist/{membership-DoJMF2T6.js → membership-DvPK3h8f.js} +3 -3
- package/dist/{money-CTR0rXZw.js → money-C_WIbr_x.js} +1 -1
- package/dist/{number-Bhgz9eFP.js → number-ZeVoGhzP.js} +1 -1
- package/dist/objectid-8lkX6otO.js +145 -0
- package/dist/{plugins-B5mQ7CHT.js → plugins-D20keyDW.js} +1189 -1189
- package/dist/{reward-DicsEEHe.js → reward-CqnMEq_w.js} +1 -1
- package/dist/{rule-s8siRar1.js → rule-D7htGgWz.js} +3 -3
- package/dist/{rule-builder-BWb4JTrd.js → rule-builder-BbJpYQ0n.js} +1 -1
- package/dist/{template-Qb5ozfLa.js → template-BWQCVHm7.js} +4 -4
- package/dist/{trigger-Bsb3Kj35.js → trigger-DMuv0_O7.js} +4 -4
- package/dist/{user-DJ8aHRaM.js → user-C_v2C0qN.js} +1 -1
- package/dist/vue-i18n-N8_TEEd0.js +2365 -0
- package/dist/{xlsx-2QxyDFwt.js → xlsx-CsPDNSTo.js} +1 -1
- package/package.json +1 -1
- package/dist/Promotion-C1CbesgZ.js +0 -255
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DYul_Nu8.js +0 -1640
- package/dist/business-vzpvmTdG.js +0 -78
- package/dist/campaign.fn-lc4ZhFCU.js +0 -758
- package/dist/objectid-DdVJrRBw.js +0 -145
- package/dist/vue-i18n-BG2U7GtN.js +0 -2365
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ref as i, computed as f } from "vue";
|
|
2
|
-
import { defineStore as g } from "pinia";
|
|
3
|
-
import { useCoreStore as w } from "@feedmepos/mf-common";
|
|
4
|
-
import { a as y, g as r, A as I, S as b, b as S } from "./index-BiIZ7X6d.js";
|
|
5
|
-
const D = {
|
|
6
|
-
async readSettings(e) {
|
|
7
|
-
try {
|
|
8
|
-
return r(await y(`marketing-v2/${e}/setting`).get(""));
|
|
9
|
-
} catch (n) {
|
|
10
|
-
if (console.error(JSON.stringify(n)), n instanceof I)
|
|
11
|
-
return {
|
|
12
|
-
_id: e,
|
|
13
|
-
business: e,
|
|
14
|
-
apiVersion: "v1"
|
|
15
|
-
};
|
|
16
|
-
throw n;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}, o = () => {
|
|
20
|
-
const e = b.getBusinessId();
|
|
21
|
-
if (!e) throw new Error("Invalid business ID");
|
|
22
|
-
return S(`businesses/${e}/location`, {
|
|
23
|
-
noIdRequired: !0
|
|
24
|
-
});
|
|
25
|
-
}, u = {
|
|
26
|
-
async read() {
|
|
27
|
-
return r(await o().get(""));
|
|
28
|
-
},
|
|
29
|
-
async readDevices() {
|
|
30
|
-
return r(await o().get("devices"));
|
|
31
|
-
},
|
|
32
|
-
async unregisterDevice(e) {
|
|
33
|
-
await r(await o().delete(`devices/${e}`));
|
|
34
|
-
},
|
|
35
|
-
async getOtp(e) {
|
|
36
|
-
return r(await o().post(`${e}/otp`));
|
|
37
|
-
}
|
|
38
|
-
}, h = g("mf-connect-business", () => {
|
|
39
|
-
const e = i("v2"), n = i(!1), a = i([]), c = i([]);
|
|
40
|
-
async function l() {
|
|
41
|
-
const t = w().currentBusiness.value, s = await D.readSettings(t == null ? void 0 : t.id);
|
|
42
|
-
return n.value = s && "business" in s && s.premium == !0, e.value = (s == null ? void 0 : s.apiVersion) || "v1", n.value;
|
|
43
|
-
}
|
|
44
|
-
async function v() {
|
|
45
|
-
return a.value = await u.read(), a.value;
|
|
46
|
-
}
|
|
47
|
-
async function d() {
|
|
48
|
-
return c.value = await u.readDevices(), c.value;
|
|
49
|
-
}
|
|
50
|
-
function p(t) {
|
|
51
|
-
return a.value.find((s) => s._id === t);
|
|
52
|
-
}
|
|
53
|
-
const m = f(() => [
|
|
54
|
-
{ label: "All", value: null },
|
|
55
|
-
...a.value.map((t) => ({
|
|
56
|
-
label: t.name,
|
|
57
|
-
value: t._id
|
|
58
|
-
}))
|
|
59
|
-
]);
|
|
60
|
-
return {
|
|
61
|
-
// state
|
|
62
|
-
version: e,
|
|
63
|
-
isPremium: n,
|
|
64
|
-
locations: a,
|
|
65
|
-
locationDevices: c,
|
|
66
|
-
// actions
|
|
67
|
-
readPremium: l,
|
|
68
|
-
readLocations: v,
|
|
69
|
-
readLocationDevices: d,
|
|
70
|
-
locationById: p,
|
|
71
|
-
// getters
|
|
72
|
-
locationItems: m
|
|
73
|
-
};
|
|
74
|
-
});
|
|
75
|
-
export {
|
|
76
|
-
u as l,
|
|
77
|
-
h as u
|
|
78
|
-
};
|