@feedmepos/mf-connect 0.1.14-prod → 0.1.15-prod
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-MRp7gtO3.js → Analytic-C7qqDS5D.js} +18 -17
- package/dist/{App-BU3B2A-F.js → App-DKZYz5r2.js} +68 -64
- package/dist/Bin-U7U1Vaju.js +165 -0
- package/dist/{Broadcast-DmciJlSU.js → Broadcast-BzChnp4V.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJPOgBXj.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BELIbS3v.js} +6 -7
- package/dist/{Card-Dq2cAgTi.js → Card-DAfZz7q5.js} +78 -79
- package/dist/{Collections-B4x4VH1a.js → Collections-joGRHyag.js} +5 -5
- package/dist/{Credit-CVdT1KBU.js → Credit-N1qDB4XC.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BmjXu-U7.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-J95iaF7a.js} +27 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-A_uosv-g.js → EffectSheet.vue_vue_type_style_index_0_lang-DwzQSmst.js} +8 -8
- package/dist/{Experience-CEeXWbue.js → Experience-D5GrDbft.js} +8 -8
- package/dist/{Game-mx5c5ZhV.js → Game-DI7BDPO_.js} +8 -8
- package/dist/{Index-DQ1qadwz.js → Index-CbuAJ2dE.js} +9 -9
- package/dist/{Marketing-CciBZijv.js → Marketing-BSqMfy70.js} +5 -5
- package/dist/{Member-C51SlKxj.js → Member-CGd5wNHJ.js} +4 -4
- package/dist/MemberList-DnS8KHYF.js +1596 -0
- package/dist/MemberTransactions-GAAX3aSV.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DZu24zwy.js → MessageInput.vue_vue_type_script_setup_true_lang-Bc2wcibo.js} +5 -5
- package/dist/{Mission-LpCnpKYD.js → Mission-BVM_1IJ8.js} +8 -8
- package/dist/{Overview-DxvOqUao.js → Overview-D2IYZCPn.js} +62 -63
- package/dist/{Point-BmI7y6h6.js → Point-B684quZM.js} +8 -8
- package/dist/{Promotion-MHaOqrwu.js → Promotion-DJOoRnxt.js} +9 -9
- package/dist/{Record-75BxMATe.js → Record-Bk74XVUj.js} +6 -6
- package/dist/{Reward-8VfyFuEt.js → Reward-BM0AGGL6.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D12_r-9X.js → RewardGroup.vue_vue_type_script_setup_true_lang-CuA2D52B.js} +12 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BIdBxvN7.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cxv3cZ1v.js} +14 -15
- package/dist/{Segment-I9FUibZy.js → Segment-DqOsH95n.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BGeR0-AG.js → SelectItems.vue_vue_type_script_setup_true_lang-ypjkVZkZ.js} +2 -2
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Qo0aOTI9.js +147 -0
- package/dist/{Setting-B8V2I0EZ.js → Setting-D6cRTVUl.js} +31 -31
- package/dist/{Store-CQkGNSSm.js → Store-DqtUurcv.js} +55 -56
- package/dist/{StoreRewards-DOtjveqw.js → StoreRewards-DPFMA3p9.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Cf9IsQXS.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CYqo5att.js} +321 -354
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DPmeW62s.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DxEV-6_4.js} +1 -1
- package/dist/{Tier-DAj_5abZ.js → Tier-CFd-HaGX.js} +20 -21
- package/dist/{Title-DryO4wcO.js → Title-CBktBb5l.js} +20 -21
- package/dist/{Transaction-DpibVFU-.js → Transaction-Bb8UU_lj.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DoiPRPPo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DBiUmz3C.js} +6 -6
- package/dist/Voucher-Bukem4U7.js +353 -0
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DRnVggfC.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CTbqVMCn.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzBcsSYS.js → ZodTextField.vue_vue_type_script_setup_true_lang-D8zMv7ks.js} +1 -1
- package/dist/{app-BoQTcBOD.js → app-BL2xIPMp.js} +102 -66
- package/dist/{app-BzPle2EI.js → app-CO6FVdHg.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-H9a63ymR.js → business-BMTDDe8v.js} +1 -1
- package/dist/{dto-BBLfD0Lh.js → campaign-C5TEfnWg.js} +610 -819
- package/dist/{campaign-CR-16mwD.js → campaign-CzpECNqa.js} +2 -2
- package/dist/{campaign.enum-DcaetYuk.js → campaign.enum-CVF3KbJ2.js} +1 -1
- package/dist/{campaign.fn-BqGZqM77.js → campaign.fn-WT1gfEwK.js} +110 -110
- package/dist/{collectible.enum-YKtiwQbt.js → collectible.enum-BW7-BEa-.js} +3 -3
- package/dist/{collection.fn-CI8lSAsC.js → collection.fn-BRsC9uPP.js} +2 -2
- package/dist/dto-B1tWHAjt.js +214 -0
- package/dist/{effect-36H79d0n.js → effect-4Ov4Jl68.js} +1 -1
- package/dist/{email-addresses-drrACeqJ.js → email-addresses-L25192f3.js} +1 -1
- package/dist/{export-BgnO3lJs.js → export-UEJjaL0g.js} +5 -5
- package/dist/{helper-CcV9DZXq.js → helper-BNBSbgdl.js} +1 -1
- package/dist/{index-mgoYj6L9.js → index-BWY2o9U9.js} +1 -1
- package/dist/index-BnWjqXOJ.js +115 -0
- package/dist/{index-DydNNBhY.js → index-BxwVs3Ot.js} +29 -4
- package/dist/index-Cg64BkVG.js +44 -0
- package/dist/{index-CibFRBGu.js → index-ChKwu49G.js} +6 -6
- package/dist/{index-ZycLk3NR.js → index-CtY-c-yc.js} +1 -1
- package/dist/{index-BPbhXWRp.js → index-D4iYmdD4.js} +12 -13
- package/dist/{index-BEDXujqZ.js → index-D8Qn3ZjQ.js} +1 -1
- package/dist/{index-Cidu1YZP.js → index-DpCBCiH_.js} +5 -5
- package/dist/{index-DLAAi9ur.js → index-DxjXJh5H.js} +3 -3
- package/dist/{index-BRTpdfj3.js → index-fdv6AHmk.js} +2057 -1010
- package/dist/{index-CB1CnEOn.js → index-jf1CG6wc.js} +1 -1
- package/dist/{index.esm2017-QS_XhcBp.js → index.esm2017-D-3LEGru.js} +1 -1
- package/dist/{loading-LktVwV5k.js → loading-CUp8ZsA0.js} +4 -4
- package/dist/{membership-7ETvXph3.js → membership-DwbiFGd7.js} +6 -6
- package/dist/{money-BYszknw8.js → money-BLrbHrdQ.js} +1 -1
- package/dist/{number-Dmd4vT4F.js → number--bZt83Nn.js} +1 -1
- package/dist/{objectid-BQtSeCVi.js → objectid-CCGQh_Y_.js} +4 -4
- package/dist/{reward-DJGOX-D1.js → reward-D99cFWcD.js} +1 -1
- package/dist/{rule-D7jM4gdg.js → rule-UpH1Y1i5.js} +3 -3
- package/dist/{rule-builder-FO9UeYUJ.js → rule-builder-ujLy6UTt.js} +1 -1
- package/dist/{template-C4Ddrpk1.js → template-FiuUP37O.js} +4 -4
- package/dist/{trigger-w7Q4qOMB.js → trigger-BZYtwSky.js} +13 -13
- package/dist/{usePagination-PH1OvyZM.js → usePagination-DDW-s6D3.js} +1 -1
- package/dist/{user-DRPXRVy2.js → user-BA3Sw5dU.js} +1 -1
- package/dist/{vue-i18n-B49HKiTU.js → vue-i18n-C5t_xZZj.js} +2 -2
- package/package.json +1 -1
- package/dist/MemberList-D1x731cU.js +0 -1043
- package/dist/MemberTransactions-BpoTQHFQ.js +0 -38
- package/dist/Voucher-CSc0_dGX.js +0 -491
- package/dist/index-6RqtavHk.js +0 -1051
- package/dist/index-B5ii6hOh.js +0 -99
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z as e } from "./loading-
|
|
1
|
+
import { z as e } from "./loading-CUp8ZsA0.js";
|
|
2
2
|
const E = e.enum([
|
|
3
3
|
"VOUCHER",
|
|
4
4
|
"CREDIT",
|
|
@@ -14,6 +14,6 @@ const E = e.enum([
|
|
|
14
14
|
E.enum.VOUCHER + "", E.enum.CREDIT + "", E.enum.POINT + "", E.enum.COIN + "", E.enum.TIER + "", E.enum.TITLE + "", E.enum.GAME + "", E.enum.STAMP + "", E.enum.REFERRAL + "";
|
|
15
15
|
const R = e.enum(["FORTUNE_WHEEL", "ROCK_PAPER_SCISSORS"]);
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
E as F,
|
|
18
|
+
R as a
|
|
19
19
|
};
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { F as i, z as t } from "./loading-CUp8ZsA0.js";
|
|
2
|
+
import { w as y, a as r, x as h } from "./index-fdv6AHmk.js";
|
|
3
|
+
import { F as u } from "./index-ChKwu49G.js";
|
|
4
|
+
import { i as I, R as d } from "./rule-builder-ujLy6UTt.js";
|
|
5
|
+
function N(a, e) {
|
|
6
|
+
var c, l;
|
|
7
|
+
if (!a) return;
|
|
8
|
+
const n = a.campaign;
|
|
9
|
+
if (!n) return;
|
|
10
|
+
const o = n.event.rule;
|
|
11
|
+
if (!o || !I(o)) {
|
|
12
|
+
e.addIssue({
|
|
13
|
+
code: "custom",
|
|
14
|
+
path: ["campaign", "event", "rule"],
|
|
15
|
+
params: {
|
|
16
|
+
i18n: { key: "zodCustom.campaign.rule_required", values: { type: n.event.type } }
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
switch (n.type) {
|
|
22
|
+
case "MISSION": {
|
|
23
|
+
n.earningOption.amount > n.mission.end && e.addIssue({
|
|
24
|
+
code: "custom",
|
|
25
|
+
path: ["campaign", "earningOption"],
|
|
26
|
+
params: {
|
|
27
|
+
i18n: { key: "zodCustom.campaign.earning_amount_exceed", values: { max: n.mission.end } }
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case "CREDIT": {
|
|
33
|
+
const p = (c = n.config) == null ? void 0 : c.validityOption;
|
|
34
|
+
(!p || ["validForDay", "validBefore"].every((g) => p[g] == null)) && e.addIssue({
|
|
35
|
+
code: "custom",
|
|
36
|
+
path: ["campaign", "config", "validityOption"],
|
|
37
|
+
params: {
|
|
38
|
+
i18n: { key: "zodCustom.campaign.credit_validity_required" }
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
switch (n.event.type) {
|
|
44
|
+
case "BILL_COMPLETED":
|
|
45
|
+
n.type === "MISSION" && n.rewards.length && (n.rewards.forEach((p, m) => {
|
|
46
|
+
(p.threshold < 0 || p.threshold > n.mission.end) && e.addIssue({
|
|
47
|
+
code: "custom",
|
|
48
|
+
path: ["campaign", "rewards", m, "threshold"],
|
|
49
|
+
params: {
|
|
50
|
+
i18n: { key: "zodCustom.campaign.reward_threshold_range" }
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}), (l = n.config) != null && l.validityOption.followFirstReceive || e.addIssue({
|
|
54
|
+
code: "custom",
|
|
55
|
+
path: ["campaign", "config", "validityOption"],
|
|
56
|
+
params: {
|
|
57
|
+
i18n: { key: "zodCustom.campaign.mission_first_receive" }
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
break;
|
|
61
|
+
case "SCHEDULE": {
|
|
62
|
+
if (!o.rules.g_schedule) {
|
|
63
|
+
e.addIssue({
|
|
64
|
+
code: "custom",
|
|
65
|
+
path: ["campaign", "event", "rule"],
|
|
66
|
+
params: {
|
|
67
|
+
i18n: { key: "zodCustom.campaign.schedule_period_required" }
|
|
68
|
+
},
|
|
69
|
+
fatal: !0
|
|
70
|
+
});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const p = d.getRules(
|
|
74
|
+
o.rules.g_schedule
|
|
75
|
+
), m = [
|
|
76
|
+
{
|
|
77
|
+
property: "trigger.date",
|
|
78
|
+
operator: ["_isOnDate", "_rrule"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
property: "trigger.time",
|
|
82
|
+
operator: ["_isOnTime"]
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
m.length == p.length && m.every((O) => p.some((C) => {
|
|
86
|
+
const f = d.simplify(C);
|
|
87
|
+
return f.property === O.property && O.operator.includes(f.operator);
|
|
88
|
+
})) || e.addIssue({
|
|
89
|
+
code: "custom",
|
|
90
|
+
path: ["campaign", "event", "rule"],
|
|
91
|
+
params: {
|
|
92
|
+
i18n: { key: "zodCustom.campaign.active_period_invalid" }
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
default: {
|
|
98
|
+
"earningOption" in n && n.earningOption.type != "FIXED" && e.addIssue({
|
|
99
|
+
code: "custom",
|
|
100
|
+
path: ["campaign", "earningOption"],
|
|
101
|
+
params: {
|
|
102
|
+
i18n: { key: "zodCustom.campaign.fixed_earning_required" }
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function D(a) {
|
|
110
|
+
var n;
|
|
111
|
+
if (a.campaign.type === "VOUCHER" && "configs" in a) {
|
|
112
|
+
const o = a.configs;
|
|
113
|
+
o.extras.targetLocation = a.campaign.targetLocation;
|
|
114
|
+
const c = Math.max(
|
|
115
|
+
a.campaign.earningOption.amount,
|
|
116
|
+
o.options.maxUse ?? 1
|
|
117
|
+
);
|
|
118
|
+
a.campaign.earningOption.amount = c, o.options.maxUse = c, a.campaign.earningOption = {
|
|
119
|
+
type: "FIXED",
|
|
120
|
+
amount: 1
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (a.campaign.type == "MISSION" && "configs" in a) {
|
|
124
|
+
const o = a.configs;
|
|
125
|
+
o.options.validityOption = (n = a.campaign.config) == null ? void 0 : n.validityOption;
|
|
126
|
+
}
|
|
127
|
+
const e = a.campaign.event;
|
|
128
|
+
return e.type != "BILL_COMPLETED" && e.rule && I(e.rule) && (e.rule = d.removeEntry(e.rule, "g_bill"), a.campaign.event = e), a;
|
|
129
|
+
}
|
|
130
|
+
function s(a) {
|
|
131
|
+
const e = h.optionsMap.get(a).extend({
|
|
132
|
+
_id: i.optional(),
|
|
133
|
+
collectible: t.string().nullish()
|
|
134
|
+
});
|
|
135
|
+
switch (a) {
|
|
136
|
+
case "VOUCHER":
|
|
137
|
+
return t.object({
|
|
138
|
+
campaign: e,
|
|
139
|
+
templateId: i,
|
|
140
|
+
configs: u,
|
|
141
|
+
updateCollections: t.boolean().optional(),
|
|
142
|
+
code: t.string().optional()
|
|
143
|
+
});
|
|
144
|
+
case "PROMOTION":
|
|
145
|
+
return t.object({
|
|
146
|
+
campaign: e,
|
|
147
|
+
templateId: i
|
|
148
|
+
});
|
|
149
|
+
case "POINT":
|
|
150
|
+
return t.object({
|
|
151
|
+
campaign: e,
|
|
152
|
+
templateId: i
|
|
153
|
+
});
|
|
154
|
+
case "CREDIT":
|
|
155
|
+
return t.object({
|
|
156
|
+
campaign: e,
|
|
157
|
+
templateId: i
|
|
158
|
+
});
|
|
159
|
+
case "BROADCAST":
|
|
160
|
+
return t.object({
|
|
161
|
+
campaign: e,
|
|
162
|
+
templateId: i
|
|
163
|
+
});
|
|
164
|
+
case "COIN":
|
|
165
|
+
return t.object({
|
|
166
|
+
campaign: e,
|
|
167
|
+
templateId: i
|
|
168
|
+
});
|
|
169
|
+
case "REWARD_POOL":
|
|
170
|
+
return t.object({
|
|
171
|
+
campaign: e,
|
|
172
|
+
templateId: i,
|
|
173
|
+
updateCollections: t.boolean().optional()
|
|
174
|
+
});
|
|
175
|
+
case "GAME":
|
|
176
|
+
return t.object({
|
|
177
|
+
campaign: e,
|
|
178
|
+
configs: u,
|
|
179
|
+
templateId: i,
|
|
180
|
+
updateCollections: t.boolean().optional()
|
|
181
|
+
});
|
|
182
|
+
case "MISSION":
|
|
183
|
+
return t.object({
|
|
184
|
+
campaign: e,
|
|
185
|
+
configs: u,
|
|
186
|
+
templateId: i,
|
|
187
|
+
updateCollections: t.boolean().optional()
|
|
188
|
+
});
|
|
189
|
+
default:
|
|
190
|
+
throw new Error("Not implemented");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const T = y.extend({
|
|
194
|
+
_id: i.optional(),
|
|
195
|
+
name: t.string().min(1).max(300),
|
|
196
|
+
business: i.optional(),
|
|
197
|
+
campaigns: t.array(i).optional()
|
|
198
|
+
}), A = {
|
|
199
|
+
[r.enum.VOUCHER]: s("VOUCHER"),
|
|
200
|
+
[r.enum.PROMOTION]: s("PROMOTION"),
|
|
201
|
+
[r.enum.POINT]: s("POINT"),
|
|
202
|
+
[r.enum.CREDIT]: s("CREDIT"),
|
|
203
|
+
[r.enum.BROADCAST]: s("BROADCAST"),
|
|
204
|
+
[r.enum.COIN]: s("COIN"),
|
|
205
|
+
[r.enum.REWARD_POOL]: s("REWARD_POOL"),
|
|
206
|
+
[r.enum.GAME]: s("GAME"),
|
|
207
|
+
[r.enum.MISSION]: s("MISSION")
|
|
208
|
+
};
|
|
209
|
+
export {
|
|
210
|
+
A as C,
|
|
211
|
+
T as F,
|
|
212
|
+
D as a,
|
|
213
|
+
N as c
|
|
214
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ur = Object.defineProperty;
|
|
2
2
|
var ir = (S, b, h) => b in S ? ur(S, b, { enumerable: !0, configurable: !0, writable: !0, value: h }) : S[b] = h;
|
|
3
3
|
var pn = (S, b, h) => ir(S, typeof b != "symbol" ? b + "" : b, h);
|
|
4
|
-
import { u as V } from "./usePagination-
|
|
4
|
+
import { u as V } from "./usePagination-DDW-s6D3.js";
|
|
5
5
|
import { g as ar } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
6
|
class fr {
|
|
7
7
|
constructor() {
|
|
@@ -1,10 +1,10 @@
|
|
|
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
3
|
var d = (s, e, o) => b(s, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
-
import { u as a, w as f } from "./usePagination-
|
|
5
|
-
import { u as h } from "./loading-
|
|
4
|
+
import { u as a, w as f } from "./usePagination-DDW-s6D3.js";
|
|
5
|
+
import { u as h } from "./loading-CUp8ZsA0.js";
|
|
6
6
|
import { h as x } from "./moment-BWErdI6_.js";
|
|
7
|
-
import { m as w } from "./index-
|
|
7
|
+
import { m as w } from "./index-BxwVs3Ot.js";
|
|
8
8
|
class y {
|
|
9
9
|
constructor() {
|
|
10
10
|
d(this, "records", []);
|
|
@@ -92,6 +92,6 @@ async function E() {
|
|
|
92
92
|
export {
|
|
93
93
|
y as B,
|
|
94
94
|
k as C,
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
E as a,
|
|
96
|
+
S as e
|
|
97
97
|
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { g as a, S as n, b as o } from "./index-DxjXJh5H.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
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { g as t, S as
|
|
1
|
+
import { g as t, S as c, b as u } from "./index-DxjXJh5H.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
|
+
}, o = {
|
|
9
9
|
async read() {
|
|
10
10
|
return t(await a().get(""));
|
|
11
11
|
},
|
|
@@ -100,8 +100,33 @@ const a = () => {
|
|
|
100
100
|
},
|
|
101
101
|
async deleteReward(e) {
|
|
102
102
|
return t(await a().delete(`rewards/${e}`));
|
|
103
|
+
},
|
|
104
|
+
async readCollectionCountByMemberId(e, r) {
|
|
105
|
+
return t(
|
|
106
|
+
await a().get(`/collections/count/${e}`, {
|
|
107
|
+
params: { type: r }
|
|
108
|
+
})
|
|
109
|
+
);
|
|
110
|
+
},
|
|
111
|
+
async readCollectionsByMemberId(e, r, s) {
|
|
112
|
+
const n = t(
|
|
113
|
+
await a().get(`/collections/${e}`, {
|
|
114
|
+
params: { ...r, ...s }
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
return {
|
|
118
|
+
meta: n.meta,
|
|
119
|
+
resources: n.resources
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
async readMissionCountByMemberId(e) {
|
|
123
|
+
return t(
|
|
124
|
+
await a().get(
|
|
125
|
+
`/collections/mission/count/${e}`
|
|
126
|
+
)
|
|
127
|
+
);
|
|
103
128
|
}
|
|
104
129
|
};
|
|
105
130
|
export {
|
|
106
|
-
|
|
131
|
+
o as m
|
|
107
132
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { g as r, a as n, S as o, b as c } from "./index-DxjXJh5H.js";
|
|
2
|
+
const a = () => {
|
|
3
|
+
const e = o.getBusinessId();
|
|
4
|
+
if (!e) throw new Error("Invalid business ID");
|
|
5
|
+
return c(`businesses/${e}/transactions`, {
|
|
6
|
+
noIdRequired: !0
|
|
7
|
+
});
|
|
8
|
+
}, d = {
|
|
9
|
+
async readAll(e, t) {
|
|
10
|
+
const s = r(
|
|
11
|
+
await a().get("", {
|
|
12
|
+
params: { ...e, ...t }
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
return {
|
|
16
|
+
meta: s.meta,
|
|
17
|
+
resources: s.resources
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
async readStoreTransactions(e, t) {
|
|
21
|
+
const s = r(
|
|
22
|
+
await a().get("/store", {
|
|
23
|
+
params: { ...e, ...t }
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
return {
|
|
27
|
+
meta: s.meta,
|
|
28
|
+
resources: s.resources
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
async readBills(e, t, s) {
|
|
32
|
+
return (await n("").get(
|
|
33
|
+
`/restaurants/${e}/receipt?start=${t}&end=${s}`
|
|
34
|
+
)).data;
|
|
35
|
+
},
|
|
36
|
+
async readPurchaseCountByMember(e) {
|
|
37
|
+
return r(
|
|
38
|
+
await a().get(`/store/${e}`)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
d as t
|
|
44
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as b, F as On, m as Zv } from "./loading-
|
|
2
|
-
import {
|
|
1
|
+
import { z as b, F as On, m as Zv } from "./loading-CUp8ZsA0.js";
|
|
2
|
+
import { F as Lt, a as $f } from "./collectible.enum-BW7-BEa-.js";
|
|
3
3
|
import { c as Hr, g as Vv } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
4
4
|
//! moment.js
|
|
5
5
|
//! version : 2.30.1
|
|
@@ -8846,10 +8846,10 @@ export {
|
|
|
8846
8846
|
wD as f,
|
|
8847
8847
|
ni as g,
|
|
8848
8848
|
O as h,
|
|
8849
|
-
|
|
8850
|
-
|
|
8849
|
+
Hu as i,
|
|
8850
|
+
Bu as j,
|
|
8851
8851
|
bD as k,
|
|
8852
8852
|
VE as l,
|
|
8853
|
-
|
|
8854
|
-
|
|
8853
|
+
ED as m,
|
|
8854
|
+
_D as n
|
|
8855
8855
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { z as e, F as a, m as o } from "./loading-
|
|
2
|
-
import { c as b } from "./index-
|
|
3
|
-
import { R as t } from "./rule-builder-
|
|
4
|
-
import { i } from "./helper-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const J = {
|
|
1
|
+
import { z as e, F as a, m as o } from "./loading-CUp8ZsA0.js";
|
|
2
|
+
import { c as b } from "./index-ChKwu49G.js";
|
|
3
|
+
import { R as t } from "./rule-builder-ujLy6UTt.js";
|
|
4
|
+
import { i } from "./helper-BNBSbgdl.js";
|
|
5
|
+
import { y as v, z as E, A as O, B as p } from "./index-fdv6AHmk.js";
|
|
6
|
+
import { a as r } from "./index-DpCBCiH_.js";
|
|
7
|
+
const Q = {
|
|
9
8
|
PROMOTION: {
|
|
10
9
|
name: "Promotion Template",
|
|
11
10
|
description: "Promotion template for campaign creation.",
|
|
@@ -1837,7 +1836,7 @@ const c = e.enum(["PHONE"]), T = e.enum(["MOCEAN", "SLACK"]), D = e.enum(["PENDI
|
|
|
1837
1836
|
type: e.literal(c.enum.PHONE),
|
|
1838
1837
|
provider: T,
|
|
1839
1838
|
usage: S.optional()
|
|
1840
|
-
}),
|
|
1839
|
+
}), A = {
|
|
1841
1840
|
collectionName: "Notifications",
|
|
1842
1841
|
transform: { _id: "oid", business: "oid" }
|
|
1843
1842
|
};
|
|
@@ -1850,7 +1849,7 @@ e.object({
|
|
|
1850
1849
|
option: m,
|
|
1851
1850
|
status: D,
|
|
1852
1851
|
ref: e.string().optional()
|
|
1853
|
-
}).describe(o.describe(
|
|
1852
|
+
}).describe(o.describe(A));
|
|
1854
1853
|
e.object({
|
|
1855
1854
|
target: e.string(),
|
|
1856
1855
|
title: e.string().optional(),
|
|
@@ -1897,7 +1896,7 @@ e.enum(["quota"]);
|
|
|
1897
1896
|
var g = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(g || {});
|
|
1898
1897
|
e.nativeEnum(g);
|
|
1899
1898
|
e.enum(["restaurant"]);
|
|
1900
|
-
const
|
|
1899
|
+
const w = e.object({
|
|
1901
1900
|
label: e.string(),
|
|
1902
1901
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
1903
1902
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -1912,7 +1911,7 @@ e.object({
|
|
|
1912
1911
|
userId: e.string(),
|
|
1913
1912
|
email: e.string().nullish(),
|
|
1914
1913
|
phoneNo: e.string().nullish(),
|
|
1915
|
-
permissions: e.array(e.lazy(() =>
|
|
1914
|
+
permissions: e.array(e.lazy(() => w))
|
|
1916
1915
|
}).describe(
|
|
1917
1916
|
o.describe({
|
|
1918
1917
|
collectionName: "PermissionUsers",
|
|
@@ -2076,7 +2075,7 @@ f.extend({
|
|
|
2076
2075
|
});
|
|
2077
2076
|
export {
|
|
2078
2077
|
I as F,
|
|
2079
|
-
|
|
2078
|
+
Q as T,
|
|
2080
2079
|
B as a,
|
|
2081
2080
|
u as b,
|
|
2082
2081
|
l as c
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as o, e as t, g as a } from "./index-
|
|
2
|
-
import { z as e, F as i, m as d } from "./loading-
|
|
3
|
-
import {
|
|
1
|
+
import { F as o, e as t, g as a } from "./index-ChKwu49G.js";
|
|
2
|
+
import { z as e, F as i, m as d } from "./loading-CUp8ZsA0.js";
|
|
3
|
+
import { F as c } from "./collectible.enum-BW7-BEa-.js";
|
|
4
4
|
const l = e.enum(["VOUCHER", "LOYALTY"]), n = e.object({
|
|
5
5
|
type: e.literal(l.enum.VOUCHER),
|
|
6
6
|
collectible: i,
|
|
@@ -49,6 +49,6 @@ u.extend({
|
|
|
49
49
|
updateCollection: e.boolean().optional()
|
|
50
50
|
});
|
|
51
51
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
u as F,
|
|
53
|
+
b as a
|
|
54
54
|
};
|