@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.70
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 +427 -0
- package/dist/{App-DalxIjTu.js → App-CcoU2SAx.js} +445 -420
- package/dist/AuditLogs-CiB6u06w.js +1886 -0
- package/dist/Bin-C2_1m5RT.js +166 -0
- package/dist/{Broadcast-uMAvsC--.js → Broadcast-TotIXDuJ.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CixQu3Pr.js} +6 -8
- package/dist/Card-Ce-_xMgS.js +896 -0
- package/dist/Collections-DKva6Doi.js +459 -0
- package/dist/{Credit-QlnatflM.js → Credit-BVUxIJ6C.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-BKEumoan.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-ah4bz-qR.js} +49 -49
- package/dist/{Experience-Czy41ifp.js → Experience-DV3384o0.js} +32 -30
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-DY83ti52.js +278 -0
- package/dist/Index-DEIaZ-2H.js +259 -0
- package/dist/Marketing-C2RwIlrg.js +20071 -0
- package/dist/Member-D4fc-wzd.js +333 -0
- package/dist/MemberList-DSMI6t_D.js +1598 -0
- package/dist/MemberTransactions-wXUlbbRq.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-DYS0klKm.js} +135 -120
- package/dist/Mission-P_KLDEpg.js +296 -0
- package/dist/Overview-8vc0f1D7.js +1078 -0
- package/dist/{Point-By6ogYy_.js → Point-B4Y0Pq60.js} +55 -53
- package/dist/{Promotion-DKcBr-RI.js → Promotion-C1CbesgZ.js} +65 -57
- package/dist/Queue-BlPA7PNH.js +244 -0
- package/dist/Record-Cl1qXSSk.js +340 -0
- package/dist/Reward-jy6-W1Eh.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-d5JNNNHf.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DYul_Nu8.js +1640 -0
- package/dist/Segment-B36Nrvxs.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-jN0xUFNR.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLFTNooB.js +186 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-H_Sehhgf.js +147 -0
- package/dist/Setting-AgQf2X4W.js +1931 -0
- package/dist/Store-D3Mm0pan.js +1841 -0
- package/dist/StoreRewards-L0VLWz8l.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Zl_cXXSD.js +1028 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b4mfueTj.js} +1 -1
- package/dist/{Tier-DvAs0-yx.js → Tier-DQq-375x.js} +327 -318
- package/dist/{Title-B_Trr39o.js → Title-OJxuBvaa.js} +224 -209
- package/dist/{Transaction-DCJw-b3H.js → Transaction-vgsYRfD7.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Cwi0mvC3.js +130 -0
- package/dist/Voucher-BFwLaoxe.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DNUBaNtJ.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-ms40eptZ.js} +1 -1
- package/dist/app-BQFTJ_hE.js +33357 -0
- package/dist/app-D7C3Fxfi.js +7077 -0
- package/dist/app.js +1 -1
- package/dist/{business-BC4-i1cU.js → business-vzpvmTdG.js} +1 -1
- package/dist/{campaign--0_yMbMV.js → campaign-BkxTDfsK.js} +2 -2
- package/dist/campaign-UQ8kMVeC.js +1810 -0
- package/dist/campaign.enum-BdT-e9h9.js +20 -0
- package/dist/campaign.fn-lc4ZhFCU.js +758 -0
- package/dist/collectible.enum-C8kd17Tz.js +19 -0
- package/dist/{collection.fn-3TwPe7aF.js → collection.fn-BIw1Y_tv.js} +2 -2
- package/dist/dto-CwzAhB8x.js +214 -0
- package/dist/{effect-BeR0LK61.js → effect-CJcvLlKG.js} +33 -16
- package/dist/email-addresses-BCJTQPT0.js +705 -0
- package/dist/{export-xeLLhqvh.js → export-URRwle1z.js} +5 -5
- package/dist/{helper-B5iqfKh8.js → helper-DccnE6zn.js} +1 -1
- package/dist/index-BiIZ7X6d.js +29556 -0
- package/dist/{index-CyKZ-SsN.js → index-BsRJ4kVb.js} +1 -1
- package/dist/{index-CU_d8jjU.js → index-C3lpXz_P.js} +1 -1
- package/dist/{index-Ct_wR519.js → index-CFA3EqId.js} +24 -21
- package/dist/{index-DP-dGMJC.js → index-CPRN3irj.js} +2230 -871
- package/dist/index-CaxFS90M.js +56 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-D4MX9e5q.js +115 -0
- package/dist/index-DrE9VkxR.js +32 -0
- package/dist/index-EOPRlB9V.js +54 -0
- package/dist/{index-CAn5heDe.js → index-FcxOGFKj.js} +48 -4
- package/dist/{index-Bh-uaaBG.js → index-OScGm4mF.js} +1506 -1480
- package/dist/{index-BOdtpNkP.js → index-ghSGvG-m.js} +266 -173
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CE1CQHrP.js} +121 -121
- package/dist/loading-B8zghYbj.js +71 -0
- package/dist/{membership-D0nqqWNZ.js → membership-DoJMF2T6.js} +54 -46
- package/dist/money-CTR0rXZw.js +15 -0
- package/dist/number-Bhgz9eFP.js +12 -0
- package/dist/objectid-DdVJrRBw.js +145 -0
- package/dist/{loading-C-JDVajU.js → plugins-B5mQ7CHT.js} +3871 -3943
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-DicsEEHe.js +36 -0
- package/dist/{rule-builder-BXt29Es4.js → rule-builder-BWb4JTrd.js} +1 -1
- package/dist/{rule-Dn_GgBCe.js → rule-s8siRar1.js} +185 -178
- package/dist/style.css +1 -1
- package/dist/{template-D2Oi3dxP.js → template-Qb5ozfLa.js} +5 -5
- package/dist/trigger-Bsb3Kj35.js +144 -0
- package/dist/user-DJ8aHRaM.js +54 -0
- package/dist/{vue-i18n-Dud8fvmw.js → vue-i18n-BG2U7GtN.js} +282 -282
- package/dist/{xlsx-CCRCidY2.js → xlsx-2QxyDFwt.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-BMpS6jWb.js +0 -622
- package/dist/Card-DV8-g69L.js +0 -825
- package/dist/Collections-DRafEHT1.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TDoMehSB.js +0 -2813
- package/dist/Game-CD3zSitz.js +0 -255
- package/dist/Marketing-NNes8z6Q.js +0 -316
- package/dist/Member-CTqBgYuV.js +0 -69
- package/dist/MemberList-B99tS5ce.js +0 -1733
- package/dist/MemberTransactions-D1YCXPOg.js +0 -38
- package/dist/Mission-XbBVKBiE.js +0 -261
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D1ESqEFO.js +0 -1753
- package/dist/Segment-B8cszL-F.js +0 -437
- package/dist/Setting-aZYABlMW.js +0 -1901
- package/dist/Store-Bx2tyJwe.js +0 -1511
- package/dist/StoreRewards-DTp9G6gw.js +0 -401
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2W7ly5Z.js +0 -890
- package/dist/Voucher-jqv3ji90.js +0 -490
- package/dist/app-WlcUVbFb.js +0 -5764
- package/dist/app-_w0hjM7u.js +0 -53428
- package/dist/dto-Ns2dLn1B.js +0 -2770
- package/dist/index-BWb9vRCi.js +0 -29193
- package/dist/index-CpU9aqyW.js +0 -206
- package/dist/index-CqO_ZvtD.js +0 -99
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DsNsA2uX.js +0 -298
- package/dist/index-WAMr3npT.js +0 -762
- package/dist/money-hdbrblud.js +0 -15
- package/dist/number-CRWGOZaW.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { g as t, a as n, S as c, b as o } from "./index-BiIZ7X6d.js";
|
|
2
|
+
const a = () => {
|
|
3
|
+
const s = c.getBusinessId();
|
|
4
|
+
if (!s) throw new Error("Invalid business ID");
|
|
5
|
+
return o(`businesses/${s}/transactions`, {
|
|
6
|
+
noIdRequired: !0
|
|
7
|
+
});
|
|
8
|
+
}, p = {
|
|
9
|
+
async readAll(s, e) {
|
|
10
|
+
const r = t(
|
|
11
|
+
await a().get("", {
|
|
12
|
+
params: { ...s, ...e }
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
return {
|
|
16
|
+
meta: r.meta,
|
|
17
|
+
resources: r.resources
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
async readStoreTransactions(s, e) {
|
|
21
|
+
const r = t(
|
|
22
|
+
await a().get("/store", {
|
|
23
|
+
params: { ...s, ...e }
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
return {
|
|
27
|
+
meta: r.meta,
|
|
28
|
+
resources: r.resources
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
async readBills(s, e, r) {
|
|
32
|
+
return (await n("").get(
|
|
33
|
+
`/restaurants/${s}/receipt?start=${e}&end=${r}`
|
|
34
|
+
)).data;
|
|
35
|
+
},
|
|
36
|
+
async readPurchaseCountByMember(s) {
|
|
37
|
+
return t(
|
|
38
|
+
await a().get(`/store/${s}`)
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
async readTransactionsByBill(s, e) {
|
|
42
|
+
return t(
|
|
43
|
+
await a().get(`/bill/${s}`, {
|
|
44
|
+
params: e
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
},
|
|
48
|
+
async revertTransaction(s) {
|
|
49
|
+
return t(
|
|
50
|
+
await a().post("/revert", s)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
p as t
|
|
56
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const d = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), R = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), C = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), A = /[^\p{L}\d]+/giu, n = "$1\0$2", L = "";
|
|
2
|
+
function h(r) {
|
|
3
|
+
let e = r.trim();
|
|
4
|
+
e = e.replace(d, n).replace(R, n), e = e.replace(A, "\0");
|
|
5
|
+
let c = 0, l = e.length;
|
|
6
|
+
for (; e.charAt(c) === "\0"; )
|
|
7
|
+
c++;
|
|
8
|
+
if (c === l)
|
|
9
|
+
return [];
|
|
10
|
+
for (; e.charAt(l - 1) === "\0"; )
|
|
11
|
+
l--;
|
|
12
|
+
return e.slice(c, l).split(/\0/g);
|
|
13
|
+
}
|
|
14
|
+
function w(r) {
|
|
15
|
+
const e = h(r);
|
|
16
|
+
for (let c = 0; c < e.length; c++) {
|
|
17
|
+
const l = e[c], t = C.exec(l);
|
|
18
|
+
if (t) {
|
|
19
|
+
const a = t.index + (t[1] ?? t[2]).length;
|
|
20
|
+
e.splice(c, 1, l.slice(0, a), l.slice(a));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return e;
|
|
24
|
+
}
|
|
25
|
+
function m(r, e) {
|
|
26
|
+
const [c, l, t] = P(r, e), a = i(e == null ? void 0 : e.locale), s = E(e == null ? void 0 : e.locale);
|
|
27
|
+
return c + l.map(x(a, s)).join((e == null ? void 0 : e.delimiter) ?? " ") + t;
|
|
28
|
+
}
|
|
29
|
+
function S(r, e) {
|
|
30
|
+
const [c, l, t] = P(r, e), a = i(e == null ? void 0 : e.locale), s = E(e == null ? void 0 : e.locale), f = x(a, s);
|
|
31
|
+
return c + l.map((u, _) => _ === 0 ? f(u) : a(u)).join((e == null ? void 0 : e.delimiter) ?? " ") + t;
|
|
32
|
+
}
|
|
33
|
+
function i(r) {
|
|
34
|
+
return r === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(r);
|
|
35
|
+
}
|
|
36
|
+
function E(r) {
|
|
37
|
+
return r === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(r);
|
|
38
|
+
}
|
|
39
|
+
function x(r, e) {
|
|
40
|
+
return (c) => `${e(c[0])}${r(c.slice(1))}`;
|
|
41
|
+
}
|
|
42
|
+
function P(r, e = {}) {
|
|
43
|
+
const c = e.split ?? (e.separateNumbers ? w : h), l = e.prefixCharacters ?? L, t = e.suffixCharacters ?? L;
|
|
44
|
+
let a = 0, s = r.length;
|
|
45
|
+
for (; a < r.length; ) {
|
|
46
|
+
const f = r.charAt(a);
|
|
47
|
+
if (!l.includes(f))
|
|
48
|
+
break;
|
|
49
|
+
a++;
|
|
50
|
+
}
|
|
51
|
+
for (; s > a; ) {
|
|
52
|
+
const f = s - 1, u = r.charAt(f);
|
|
53
|
+
if (!t.includes(u))
|
|
54
|
+
break;
|
|
55
|
+
s = f;
|
|
56
|
+
}
|
|
57
|
+
return [
|
|
58
|
+
r.slice(0, a),
|
|
59
|
+
c(r.slice(a, s)),
|
|
60
|
+
r.slice(s)
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
m as c,
|
|
65
|
+
S as s
|
|
66
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { g as a, S as n, b as o } from "./index-BiIZ7X6d.js";
|
|
2
|
+
const t = () => {
|
|
3
|
+
const e = n.getBusinessId();
|
|
4
|
+
if (!e) throw new Error("Invalid business ID");
|
|
5
|
+
return o(`businesses/${e}/campaigns`, {
|
|
6
|
+
// url: 'http://localhost:3000/portal/',
|
|
7
|
+
});
|
|
8
|
+
}, i = {
|
|
9
|
+
async readAllGrouped(e) {
|
|
10
|
+
const s = a(
|
|
11
|
+
await t().get("grouped", { params: e })
|
|
12
|
+
);
|
|
13
|
+
return {
|
|
14
|
+
meta: s.meta,
|
|
15
|
+
resources: s.resources
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
async readAll(e, s) {
|
|
19
|
+
const r = a(
|
|
20
|
+
await t().get("", {
|
|
21
|
+
params: { ...e, ...s }
|
|
22
|
+
})
|
|
23
|
+
);
|
|
24
|
+
return {
|
|
25
|
+
meta: r.meta,
|
|
26
|
+
resources: r.resources
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
async readById(e) {
|
|
30
|
+
return a(await t().get(`/${e}`));
|
|
31
|
+
},
|
|
32
|
+
async create(e) {
|
|
33
|
+
return a(await t().post("", e));
|
|
34
|
+
},
|
|
35
|
+
async update(e, s) {
|
|
36
|
+
return a(await t().put(e, s));
|
|
37
|
+
},
|
|
38
|
+
async delete(e) {
|
|
39
|
+
return a(await t().delete(e));
|
|
40
|
+
},
|
|
41
|
+
async readCollectionsByCampaignId(e, s) {
|
|
42
|
+
const r = a(
|
|
43
|
+
await t().get(`/${e}/collections`, {
|
|
44
|
+
params: s
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
return {
|
|
48
|
+
meta: r.meta,
|
|
49
|
+
resources: r.resources
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
async readTransactions(e) {
|
|
53
|
+
return a(
|
|
54
|
+
await t().get(
|
|
55
|
+
`/${e}/collections/transactions`
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
async createCollectionByCampaignId(e, s) {
|
|
60
|
+
return a(
|
|
61
|
+
await t().post(`/${e}/collections`, s)
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
async readGroups() {
|
|
65
|
+
return a(await t().get("/groups")) ?? [];
|
|
66
|
+
},
|
|
67
|
+
async readStats(e) {
|
|
68
|
+
return a(
|
|
69
|
+
await t().get("/stats", { params: e })
|
|
70
|
+
);
|
|
71
|
+
},
|
|
72
|
+
async createGroup(e) {
|
|
73
|
+
return a(await t().post("/groups", e));
|
|
74
|
+
},
|
|
75
|
+
async updateGroup(e, s) {
|
|
76
|
+
return a(
|
|
77
|
+
await t().put(`/groups/${e}`, s)
|
|
78
|
+
);
|
|
79
|
+
},
|
|
80
|
+
async deleteGroup(e) {
|
|
81
|
+
return a(await t().delete(`/groups/${e}`));
|
|
82
|
+
},
|
|
83
|
+
async sendCollection(e, s) {
|
|
84
|
+
return a(
|
|
85
|
+
await t().post(
|
|
86
|
+
`/${e}/collections/send`,
|
|
87
|
+
s
|
|
88
|
+
)
|
|
89
|
+
);
|
|
90
|
+
},
|
|
91
|
+
async syncAllPromotion() {
|
|
92
|
+
return a(
|
|
93
|
+
await t().post("/promotion/sync")
|
|
94
|
+
);
|
|
95
|
+
},
|
|
96
|
+
async readAllDeleted(e, s) {
|
|
97
|
+
const r = a(
|
|
98
|
+
await t().get("/bin", {
|
|
99
|
+
params: { ...e, ...s }
|
|
100
|
+
})
|
|
101
|
+
);
|
|
102
|
+
return {
|
|
103
|
+
meta: r.meta,
|
|
104
|
+
resources: r.resources
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
async restore(e) {
|
|
108
|
+
return a(
|
|
109
|
+
await t().post(`/${e}/restore`)
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
i as c
|
|
115
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { g as s, S as o, b as i } from "./index-BiIZ7X6d.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
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { F as o, e as t, g as a } from "./index-OScGm4mF.js";
|
|
2
|
+
import { z as e, F as i, m as d } from "./plugins-B5mQ7CHT.js";
|
|
3
|
+
import { F as c } from "./collectible.enum-C8kd17Tz.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
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { g as t, S as
|
|
1
|
+
import { g as t, S as c, b as u } from "./index-BiIZ7X6d.js";
|
|
2
2
|
const a = () => {
|
|
3
|
-
const e =
|
|
3
|
+
const e = c.getBusinessId();
|
|
4
4
|
if (!e) throw new Error("Invalid business ID");
|
|
5
5
|
return u(`businesses/${e}/membership`, {
|
|
6
6
|
noIdRequired: !0
|
|
7
7
|
});
|
|
8
|
-
},
|
|
8
|
+
}, d = {
|
|
9
9
|
async read() {
|
|
10
10
|
return t(await a().get(""));
|
|
11
11
|
},
|
|
@@ -45,6 +45,16 @@ const a = () => {
|
|
|
45
45
|
await a().put("store/bundle", e)
|
|
46
46
|
);
|
|
47
47
|
},
|
|
48
|
+
async sendBundle(e) {
|
|
49
|
+
return t(
|
|
50
|
+
await a().post("store/bundle/send", e)
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
async refundStoreTransaction(e) {
|
|
54
|
+
return t(
|
|
55
|
+
await a().post("store/refund", e)
|
|
56
|
+
);
|
|
57
|
+
},
|
|
48
58
|
async readRewards() {
|
|
49
59
|
return t(await a().get("rewards"));
|
|
50
60
|
},
|
|
@@ -81,6 +91,12 @@ const a = () => {
|
|
|
81
91
|
await a().post("/cards", e)
|
|
82
92
|
);
|
|
83
93
|
},
|
|
94
|
+
async updateCard(e) {
|
|
95
|
+
return t(await a().put("cards", e));
|
|
96
|
+
},
|
|
97
|
+
async deleteCard(e) {
|
|
98
|
+
return t(await a().delete(`cards/${e}`));
|
|
99
|
+
},
|
|
84
100
|
async updateReward(e, r) {
|
|
85
101
|
return t(
|
|
86
102
|
await a().put(`rewards/${e}`, r)
|
|
@@ -88,8 +104,36 @@ const a = () => {
|
|
|
88
104
|
},
|
|
89
105
|
async deleteReward(e) {
|
|
90
106
|
return t(await a().delete(`rewards/${e}`));
|
|
107
|
+
},
|
|
108
|
+
async getEmailAddresses() {
|
|
109
|
+
return t(await a().get("email-addresses"));
|
|
110
|
+
},
|
|
111
|
+
async readCollectionCountByMemberId(e, r) {
|
|
112
|
+
return t(
|
|
113
|
+
await a().get(`/collections/count/${e}`, {
|
|
114
|
+
params: { type: r }
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
},
|
|
118
|
+
async readCollectionsByMemberId(e, r, s) {
|
|
119
|
+
const n = t(
|
|
120
|
+
await a().get(`/collections/${e}`, {
|
|
121
|
+
params: { ...r, ...s }
|
|
122
|
+
})
|
|
123
|
+
);
|
|
124
|
+
return {
|
|
125
|
+
meta: n.meta,
|
|
126
|
+
resources: n.resources
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
async readMissionCountByMemberId(e) {
|
|
130
|
+
return t(
|
|
131
|
+
await a().get(
|
|
132
|
+
`/collections/mission/count/${e}`
|
|
133
|
+
)
|
|
134
|
+
);
|
|
91
135
|
}
|
|
92
136
|
};
|
|
93
137
|
export {
|
|
94
|
-
|
|
138
|
+
d as m
|
|
95
139
|
};
|