@feedmepos/mf-connect 0.1.14-prod → 0.1.16-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.
Files changed (89) hide show
  1. package/dist/{Analytic-MRp7gtO3.js → Analytic-9_JkMO2c.js} +18 -17
  2. package/dist/{App-BU3B2A-F.js → App-DfbUtaeM.js} +68 -64
  3. package/dist/Bin-BoolyqZn.js +165 -0
  4. package/dist/{Broadcast-DmciJlSU.js → Broadcast-8UwFqqzp.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJPOgBXj.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CjoVXqOG.js} +6 -7
  6. package/dist/{Card-Dq2cAgTi.js → Card-BFEc9Zgu.js} +78 -79
  7. package/dist/{Collections-B4x4VH1a.js → Collections-DqlqGVcv.js} +5 -5
  8. package/dist/{Credit-CVdT1KBU.js → Credit-BuKQEMU2.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BmjXu-U7.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BjCVR7D4.js} +27 -27
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-A_uosv-g.js → EffectSheet.vue_vue_type_style_index_0_lang-DXBqS4zs.js} +8 -8
  11. package/dist/{Experience-CEeXWbue.js → Experience-BTf5f-Kb.js} +8 -8
  12. package/dist/{Game-mx5c5ZhV.js → Game-Ci_39vHg.js} +8 -8
  13. package/dist/{Index-DQ1qadwz.js → Index-8JLenrzT.js} +9 -9
  14. package/dist/{Marketing-CciBZijv.js → Marketing-XAmIlYCx.js} +5 -5
  15. package/dist/{Member-C51SlKxj.js → Member-Bvxgoep1.js} +4 -4
  16. package/dist/MemberList-BvX98Yt-.js +1596 -0
  17. package/dist/MemberTransactions-DJt3aJ-h.js +45 -0
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DZu24zwy.js → MessageInput.vue_vue_type_script_setup_true_lang-OFqra1ac.js} +45 -33
  19. package/dist/{Mission-LpCnpKYD.js → Mission-D_CqN5Es.js} +8 -8
  20. package/dist/{Overview-DxvOqUao.js → Overview-FRebjePW.js} +62 -63
  21. package/dist/{Point-BmI7y6h6.js → Point-C_amiOK4.js} +8 -8
  22. package/dist/{Promotion-MHaOqrwu.js → Promotion-qt_pE8uB.js} +9 -9
  23. package/dist/{Record-75BxMATe.js → Record-2eAijNwr.js} +6 -6
  24. package/dist/{Reward-8VfyFuEt.js → Reward-DLNijsC9.js} +35 -35
  25. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D12_r-9X.js → RewardGroup.vue_vue_type_script_setup_true_lang-dsxs4d5k.js} +12 -13
  26. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BIdBxvN7.js → RuleGroup.vue_vue_type_script_setup_true_lang-BZ4ORSgp.js} +14 -15
  27. package/dist/{Segment-I9FUibZy.js → Segment-QKuGmThT.js} +13 -13
  28. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BGeR0-AG.js → SelectItems.vue_vue_type_script_setup_true_lang-C02QXf6B.js} +2 -2
  29. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DXpzjbIh.js +147 -0
  30. package/dist/Setting-GTro0uCw.js +1877 -0
  31. package/dist/{Store-CQkGNSSm.js → Store-CTxmlEVr.js} +55 -56
  32. package/dist/{StoreRewards-DOtjveqw.js → StoreRewards-Bm9NXXH2.js} +12 -12
  33. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Cf9IsQXS.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CrxFaBDj.js} +321 -354
  34. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DPmeW62s.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cf2JpXND.js} +1 -1
  35. package/dist/{Tier-DAj_5abZ.js → Tier-CB64ZbLz.js} +20 -21
  36. package/dist/{Title-DryO4wcO.js → Title-62HEE-nU.js} +20 -21
  37. package/dist/{Transaction-DpibVFU-.js → Transaction-CK9Igmnp.js} +2 -2
  38. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DoiPRPPo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DJB9g9bg.js} +6 -6
  39. package/dist/Voucher-CZLp6Mfd.js +353 -0
  40. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DRnVggfC.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DKunt5iP.js} +10 -10
  41. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzBcsSYS.js → ZodTextField.vue_vue_type_script_setup_true_lang-CP0wAVaD.js} +1 -1
  42. package/dist/{app-BoQTcBOD.js → app-BsOd2LLI.js} +651 -615
  43. package/dist/{app-BzPle2EI.js → app-D7g1W_8e.js} +1 -1
  44. package/dist/app.js +1 -1
  45. package/dist/{business-H9a63ymR.js → business-e0ErhqsW.js} +1 -1
  46. package/dist/{dto-BBLfD0Lh.js → campaign-CcRs_0FM.js} +610 -819
  47. package/dist/{campaign-CR-16mwD.js → campaign-CcdO3quq.js} +2 -2
  48. package/dist/{campaign.enum-DcaetYuk.js → campaign.enum-DSB0ntaX.js} +1 -1
  49. package/dist/{campaign.fn-BqGZqM77.js → campaign.fn-BSxLDscM.js} +133 -133
  50. package/dist/{collectible.enum-YKtiwQbt.js → collectible.enum-DR19JADq.js} +3 -3
  51. package/dist/{collection.fn-CI8lSAsC.js → collection.fn-Bm_oNhCa.js} +2 -2
  52. package/dist/dto-3LqyQCjQ.js +214 -0
  53. package/dist/{effect-36H79d0n.js → effect-BuC4ddqL.js} +1 -1
  54. package/dist/{email-addresses-drrACeqJ.js → email-addresses-FxQM5JQh.js} +1 -1
  55. package/dist/{export-BgnO3lJs.js → export-DB_vSJ5r.js} +5 -5
  56. package/dist/{helper-CcV9DZXq.js → helper-Czc_ykUT.js} +1 -1
  57. package/dist/index-0EgN5Vaf.js +115 -0
  58. package/dist/{index-Cidu1YZP.js → index-B-gmFyeP.js} +5 -5
  59. package/dist/{index-CB1CnEOn.js → index-C2Y3Z6cQ.js} +1 -1
  60. package/dist/{index-mgoYj6L9.js → index-CavK1FD8.js} +1 -1
  61. package/dist/{index-BEDXujqZ.js → index-DF7DfJ1p.js} +1 -1
  62. package/dist/{index-DydNNBhY.js → index-DJmQQbIZ.js} +29 -4
  63. package/dist/{index-CibFRBGu.js → index-DP1XHU5I.js} +6 -6
  64. package/dist/{index-BRTpdfj3.js → index-DTirkGj1.js} +2057 -1010
  65. package/dist/{index-ZycLk3NR.js → index-Dc_5fMdM.js} +1 -1
  66. package/dist/index-Dvp6UpsY.js +44 -0
  67. package/dist/{index-BPbhXWRp.js → index-KXIH9y_C.js} +12 -13
  68. package/dist/{index-DLAAi9ur.js → index-o3ez16Wf.js} +3 -3
  69. package/dist/{index.esm2017-QS_XhcBp.js → index.esm2017-DsCfyosK.js} +1 -1
  70. package/dist/{loading-LktVwV5k.js → loading-CsMKK-RP.js} +4 -4
  71. package/dist/{membership-7ETvXph3.js → membership-ChU9QHZQ.js} +6 -6
  72. package/dist/{money-BYszknw8.js → money-CG2aMqwR.js} +1 -1
  73. package/dist/{number-Dmd4vT4F.js → number-DOiTymUW.js} +1 -1
  74. package/dist/{objectid-BQtSeCVi.js → objectid-DEgIJB4V.js} +4 -4
  75. package/dist/{reward-DJGOX-D1.js → reward-bezIYRz1.js} +1 -1
  76. package/dist/{rule-D7jM4gdg.js → rule-BXvIZA60.js} +3 -3
  77. package/dist/{rule-builder-FO9UeYUJ.js → rule-builder-BD_t-4Oq.js} +1 -1
  78. package/dist/{template-C4Ddrpk1.js → template-CYa8Yqzb.js} +4 -4
  79. package/dist/{trigger-w7Q4qOMB.js → trigger-B2Ihm351.js} +13 -13
  80. package/dist/{usePagination-PH1OvyZM.js → usePagination-Dus-uVGw.js} +1 -1
  81. package/dist/{user-DRPXRVy2.js → user-BkIvuR0M.js} +1 -1
  82. package/dist/{vue-i18n-B49HKiTU.js → vue-i18n-BOO66JER.js} +112 -112
  83. package/package.json +1 -1
  84. package/dist/MemberList-D1x731cU.js +0 -1043
  85. package/dist/MemberTransactions-BpoTQHFQ.js +0 -38
  86. package/dist/Setting-B8V2I0EZ.js +0 -1871
  87. package/dist/Voucher-CSc0_dGX.js +0 -491
  88. package/dist/index-6RqtavHk.js +0 -1051
  89. package/dist/index-B5ii6hOh.js +0 -99
@@ -1,4 +1,4 @@
1
- import { z as e } from "./loading-LktVwV5k.js";
1
+ import { z as e } from "./loading-CsMKK-RP.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
- R as F,
18
- E as a
17
+ E as F,
18
+ R as a
19
19
  };
@@ -1,5 +1,5 @@
1
- import "./index-CibFRBGu.js";
2
- import "./loading-LktVwV5k.js";
1
+ import "./index-DP1XHU5I.js";
2
+ import "./loading-CsMKK-RP.js";
3
3
  function r(e) {
4
4
  switch (e) {
5
5
  case "PROMOTION":
@@ -0,0 +1,214 @@
1
+ import { F as i, z as t } from "./loading-CsMKK-RP.js";
2
+ import { w as y, a as r, x as h } from "./index-DTirkGj1.js";
3
+ import { F as u } from "./index-DP1XHU5I.js";
4
+ import { i as I, R as d } from "./rule-builder-BD_t-4Oq.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,4 +1,4 @@
1
- import { c as o } from "./index-DLAAi9ur.js";
1
+ import { c as o } from "./index-o3ez16Wf.js";
2
2
  function c(e) {
3
3
  if (!e)
4
4
  return null;
@@ -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-PH1OvyZM.js";
4
+ import { u as V } from "./usePagination-Dus-uVGw.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-PH1OvyZM.js";
5
- import { u as h } from "./loading-LktVwV5k.js";
4
+ import { u as a, w as f } from "./usePagination-Dus-uVGw.js";
5
+ import { u as h } from "./loading-CsMKK-RP.js";
6
6
  import { h as x } from "./moment-BWErdI6_.js";
7
- import { m as w } from "./index-DydNNBhY.js";
7
+ import { m as w } from "./index-DJmQQbIZ.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
- S as a,
96
- E as e
95
+ E as a,
96
+ S as e
97
97
  };
@@ -1,4 +1,4 @@
1
- import { h as i } from "./index-CibFRBGu.js";
1
+ import { h as i } from "./index-DP1XHU5I.js";
2
2
  function o(t, e) {
3
3
  switch (t) {
4
4
  case "COIN":
@@ -0,0 +1,115 @@
1
+ import { g as a, S as n, b as o } from "./index-o3ez16Wf.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,6 +1,6 @@
1
- import { F as o, e as t, g as a } from "./index-CibFRBGu.js";
2
- import { z as e, F as i, m as d } from "./loading-LktVwV5k.js";
3
- import { a as c } from "./collectible.enum-YKtiwQbt.js";
1
+ import { F as o, e as t, g as a } from "./index-DP1XHU5I.js";
2
+ import { z as e, F as i, m as d } from "./loading-CsMKK-RP.js";
3
+ import { F as c } from "./collectible.enum-DR19JADq.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
- b as F,
53
- u as a
52
+ u as F,
53
+ b as a
54
54
  };
@@ -1,3 +1,3 @@
1
1
  import "vue-router";
2
- import { R as o } from "./app-BoQTcBOD.js";
2
+ import { R as o } from "./app-BsOd2LLI.js";
3
3
  o["$connect-DASHBOARD"];
@@ -1,4 +1,4 @@
1
- import { z as t, F as e, m as i } from "./loading-LktVwV5k.js";
1
+ import { z as t, F as e, m as i } from "./loading-CsMKK-RP.js";
2
2
  const n = t.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]), s = {
3
3
  collectionName: "MarketingMaterials",
4
4
  transform: {
@@ -1,4 +1,4 @@
1
- import { g as s, S as o, b as i } from "./index-DLAAi9ur.js";
1
+ import { g as s, S as o, b as i } from "./index-o3ez16Wf.js";
2
2
  const a = () => {
3
3
  const r = o.getBusinessId();
4
4
  if (!r) throw new Error("Invalid business ID");
@@ -1,11 +1,11 @@
1
- import { g as t, S as n, b as u } from "./index-DLAAi9ur.js";
1
+ import { g as t, S as c, b as u } from "./index-o3ez16Wf.js";
2
2
  const a = () => {
3
- const e = n.getBusinessId();
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
- }, c = {
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
- c as m
131
+ o as m
107
132
  };
@@ -1,5 +1,5 @@
1
- import { z as b, F as On, m as Zv } from "./loading-LktVwV5k.js";
2
- import { a as Lt, F as $f } from "./collectible.enum-YKtiwQbt.js";
1
+ import { z as b, F as On, m as Zv } from "./loading-CsMKK-RP.js";
2
+ import { F as Lt, a as $f } from "./collectible.enum-DR19JADq.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
- ED as i,
8850
- _D as j,
8849
+ Hu as i,
8850
+ Bu as j,
8851
8851
  bD as k,
8852
8852
  VE as l,
8853
- Hu as m,
8854
- Bu as n
8853
+ ED as m,
8854
+ _D as n
8855
8855
  };