@feedmepos/mf-connect 0.1.0-beta.15 → 0.1.0-beta.17
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-BvsvVIaJ.js +424 -0
- package/dist/{App-BeD6_T_Z.js → App-B6i-kTvi.js} +40 -36
- package/dist/{Broadcast-Di-DP7MU.js → Broadcast-BMNY7jfz.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BszRUIC8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cl-VwkQw.js} +9 -8
- package/dist/Card-BUxMxMv3.js +685 -0
- package/dist/{Collections-kplzfC-n.js → Collections-fJ4dAA8O.js} +10 -9
- package/dist/{Credit-DrZdTG27.js → Credit-DeLJMW7U.js} +14 -14
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-KB_zk3f0.js +2199 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DE7rq_ro.js → EffectSheet.vue_vue_type_style_index_0_lang-Dy2q_1Kh.js} +8 -8
- package/dist/{Experience-BQz_RASv.js → Experience-DNlf2fYa.js} +8 -8
- package/dist/{Game-C5RUfcwo.js → Game-BXj3DErV.js} +15 -15
- package/dist/Index-FMFz2f9Z.js +218 -0
- package/dist/{Marketing-Ca00_q-k.js → Marketing-C8OjZOr2.js} +5 -5
- package/dist/{Member-B-9P7bbG.js → Member-BgwbYQrK.js} +4 -4
- package/dist/{MemberList-DoAOs_FC.js → MemberList-DMQUG_Kt.js} +251 -246
- package/dist/{MemberTransactions-D-qjANZL.js → MemberTransactions-CQO2cHn6.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DgWXNnd_.js → MessageInput.vue_vue_type_script_setup_true_lang-Ds_BwKa6.js} +2 -2
- package/dist/{Mission-DrKEtkuB.js → Mission-rHomcJXG.js} +15 -15
- package/dist/Overview-CmwJjXeT.js +864 -0
- package/dist/{Point-vO06ComP.js → Point-Du07BO13.js} +15 -15
- package/dist/{Promotion-DiJLB7iq.js → Promotion-B1gbbfk2.js} +53 -47
- package/dist/Record-0GtBWXRO.js +178 -0
- package/dist/Reward-aH7S8WL3.js +375 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-XdyqSqlC.js +138 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-E7ADhGR7.js +1597 -0
- package/dist/{Segment-x3OLFugO.js → Segment-Ci4BDnan.js} +65 -64
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-I2KT0px7.js +181 -0
- package/dist/{Setting-C27PXvat.js → Setting-Dc9rLPuI.js} +8 -8
- package/dist/{Store-Dn2A_coC.js → Store-B94H-jff.js} +13 -13
- package/dist/{StoreRewards-CZMCXl-k.js → StoreRewards-Cho91MDd.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DMsmMCOw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CDiZz1AW.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-j8UbHQpT.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BmEP5mI5.js} +1 -1
- package/dist/{Tier-BnbE3qLA.js → Tier-DO9pTl_C.js} +15 -15
- package/dist/{Title-BAGSqm5D.js → Title-CgQD-_3y.js} +15 -15
- package/dist/{Transaction-DWvA09mr.js → Transaction-DPmvpR7n.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CJa-Tkws.js +130 -0
- package/dist/{Voucher-CLgdPRSd.js → Voucher-Bq5Ev_fv.js} +31 -31
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DeQTAvCe.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DweS66z_.js → ZodTextField.vue_vue_type_script_setup_true_lang-DLFDd3Y3.js} +1 -1
- package/dist/{app-CEoOXnMP.js → app-BT6qeigc.js} +509 -391
- package/dist/{app-DbEoLwS2.js → app-CtaeuBcs.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-DIsK1ZSi.js → business-Db2WFn9o.js} +1 -1
- package/dist/{campaign-DilFl2u4.js → campaign-Bo2jmBiD.js} +2 -2
- package/dist/collectible.enum-BR9zmyJv.js +19 -0
- package/dist/{collection.fn-DOGveN-U.js → collection.fn-Drj_6HD1.js} +2 -2
- package/dist/{dto-D146MexX.js → dto-BH8EtK7z.js} +54 -54
- package/dist/{effect-BAoY-7Mo.js → effect-l8oNjQBm.js} +1 -1
- package/dist/{email-addresses-D4ptdJi7.js → email-addresses-CBqWAs9Z.js} +1 -1
- package/dist/{export-ZdS0ijA0.js → export-D6S3dr04.js} +3 -3
- package/dist/{helper-CYBvYPRB.js → helper-CS2Hx33Q.js} +1 -1
- package/dist/{index-sJUCCkLn.js → index-5mZIFDhm.js} +21 -17
- package/dist/{index-D5OipTW2.js → index-BfhjAqeE.js} +3 -3
- package/dist/{index-Dw-QQGVh.js → index-Bj5M_at2.js} +1 -1
- package/dist/{index-BJNzAvF6.js → index-BsfC7C2D.js} +1 -1
- package/dist/{index-Dwsdu9aR.js → index-C7kr1TMO.js} +209 -116
- package/dist/{index-CBd5MdRb.js → index-CATw-eQI.js} +1348 -1342
- package/dist/{index-VOFTSIqj.js → index-CVfN0Gmc.js} +2 -2
- package/dist/{index-r3--ddX3.js → index-CXEJbUAO.js} +1 -1
- package/dist/{index-fSC0-_uQ.js → index-CmN2dQk5.js} +55 -44
- package/dist/index-Ct847l9G.js +50 -0
- package/dist/index-D2d2rTPz.js +38 -0
- package/dist/{index-CyvTJWa0.js → index-DVryx2wz.js} +1 -1
- package/dist/{index-DXwoelMh.js → index-XoOcBFvx.js} +39 -35
- package/dist/{index-RKVC43XB.js → index-Z61r-lWj.js} +1 -1
- package/dist/{index.esm2017-ClQvLeXO.js → index.esm2017-Dg7M2BO7.js} +1 -1
- package/dist/{loading-DyvR-Q2q.js → loading-DxWIhKJX.js} +156 -153
- package/dist/{membership-DjHOR91O.js → membership-Df7gtzWJ.js} +51 -43
- package/dist/{money-C9nfcrN2.js → money-Ck4ZGH4F.js} +1 -1
- package/dist/{number-BH4v9H5s.js → number-D8umDJ-5.js} +1 -1
- package/dist/objectid-BGnepAUg.js +145 -0
- package/dist/reward-5b5G4KYr.js +36 -0
- package/dist/{rule-DdzmxL5G.js → rule-BcLntzKp.js} +4 -3
- package/dist/{rule-builder-C3LgxTPd.js → rule-builder-B_RDlrnZ.js} +1 -1
- package/dist/{template-CTOkKogt.js → template-C-myFW3k.js} +4 -4
- package/dist/trigger-CAK3-5M9.js +114 -0
- package/dist/usePagination-BeF5K3M7.js +223 -0
- package/dist/{vue-i18n-Dw456kF3.js → vue-i18n-BC0lAbnG.js} +248 -248
- package/dist/{usePagination-BLsmsO5l.js → xlsx-DNZb1t3l.js} +2962 -3183
- package/package.json +1 -1
- package/dist/Analytic-BudPZ7yo.js +0 -622
- package/dist/Card-BSUIJ4V3.js +0 -824
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DTxdtvAX.js +0 -2816
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BO8_N-Hl.js +0 -1762
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as e, F as t, g as f, e as s, d as r, m as a } from "./loading-
|
|
2
|
-
import {
|
|
1
|
+
import { z as e, F as t, g as f, e as s, d as r, m as a } from "./loading-DxWIhKJX.js";
|
|
2
|
+
import { c as l } from "./index-CATw-eQI.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
const I = e.object({
|
|
5
5
|
icon: e.string(),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { z as e, F as n, e as D, m as p } from "./loading-
|
|
2
|
-
import {
|
|
3
|
-
import { b as L } from "./index-
|
|
4
|
-
import { d as P, e as ee } from "./index-
|
|
5
|
-
import { d as ne } from "./index-
|
|
1
|
+
import { z as e, F as n, e as D, m as p } from "./loading-DxWIhKJX.js";
|
|
2
|
+
import { c as _, F as T, e as c, f as X, g as Z, i as m, j as Q, k as $ } from "./index-CATw-eQI.js";
|
|
3
|
+
import { b as L } from "./index-XoOcBFvx.js";
|
|
4
|
+
import { d as P, e as ee } from "./index-5mZIFDhm.js";
|
|
5
|
+
import { d as ne } from "./index-CVfN0Gmc.js";
|
|
6
6
|
const S = e.enum([
|
|
7
7
|
"VOUCHER",
|
|
8
8
|
"PROMOTION",
|
|
@@ -14,9 +14,9 @@ const S = e.enum([
|
|
|
14
14
|
"REWARD_POOL",
|
|
15
15
|
"GAME",
|
|
16
16
|
"MISSION"
|
|
17
|
-
]),
|
|
18
|
-
[
|
|
19
|
-
[
|
|
17
|
+
]), A = e.enum(["TIME_BASED_PROMOTION", "GAME_PROMOTION"]), Ke = {
|
|
18
|
+
[A.enum.TIME_BASED_PROMOTION]: "7.7.4",
|
|
19
|
+
[A.enum.GAME_PROMOTION]: "7.7.4"
|
|
20
20
|
};
|
|
21
21
|
e.object({
|
|
22
22
|
location: n,
|
|
@@ -81,7 +81,8 @@ const oe = {
|
|
|
81
81
|
"ISSUE_REWARD",
|
|
82
82
|
"MEMBER_REWARD",
|
|
83
83
|
"GAME_COMPLETED",
|
|
84
|
-
"PAGINATE_SCHEDULE"
|
|
84
|
+
"PAGINATE_SCHEDULE",
|
|
85
|
+
"REFERRAL_ADDED"
|
|
85
86
|
]), Je = i.extract([
|
|
86
87
|
"BILL_COMPLETED",
|
|
87
88
|
"FEEDBACK",
|
|
@@ -124,7 +125,11 @@ const ce = s.extend({
|
|
|
124
125
|
type: e.literal(i.enum.ISSUE_REWARD)
|
|
125
126
|
}), ge = s.extend({
|
|
126
127
|
type: e.literal(i.enum.GAME_COMPLETED)
|
|
127
|
-
})
|
|
128
|
+
});
|
|
129
|
+
s.extend({
|
|
130
|
+
type: e.literal(i.enum.REFERRAL_ADDED)
|
|
131
|
+
});
|
|
132
|
+
const be = e.discriminatedUnion("type", [
|
|
128
133
|
re,
|
|
129
134
|
ae,
|
|
130
135
|
de,
|
|
@@ -142,25 +147,25 @@ e.object({
|
|
|
142
147
|
ref: e.string(),
|
|
143
148
|
context: e.record(e.string(), e.any()).optional()
|
|
144
149
|
}).describe(JSON.stringify({ collectionName: "EventLogs" }));
|
|
145
|
-
const
|
|
150
|
+
const d = e.object({
|
|
146
151
|
type: i,
|
|
147
152
|
context: e.any(),
|
|
148
153
|
businessIds: e.array(n).optional(),
|
|
149
154
|
campaignIds: e.array(n).optional(),
|
|
150
155
|
slackWebhookUrl: e.string().optional(),
|
|
151
156
|
emittedAt: e.coerce.date().default(/* @__PURE__ */ new Date())
|
|
152
|
-
}), ye =
|
|
157
|
+
}), ye = d.extend({
|
|
153
158
|
type: e.literal(i.enum.BILL_COMPLETED),
|
|
154
159
|
context: e.object({
|
|
155
160
|
bill: ie,
|
|
156
161
|
rawBill: e.any()
|
|
157
162
|
})
|
|
158
|
-
}), Ce =
|
|
163
|
+
}), Ce = d.extend({
|
|
159
164
|
type: e.literal(i.enum.SCHEDULE),
|
|
160
165
|
context: e.object({
|
|
161
166
|
triggeredAt: e.coerce.date()
|
|
162
167
|
})
|
|
163
|
-
}), Re =
|
|
168
|
+
}), Re = d.extend({
|
|
164
169
|
type: e.literal(i.enum.PAGINATE_SCHEDULE),
|
|
165
170
|
context: e.object({
|
|
166
171
|
triggeredAt: e.coerce.date(),
|
|
@@ -168,28 +173,32 @@ const m = e.object({
|
|
|
168
173
|
skip: e.coerce.number(),
|
|
169
174
|
limit: e.coerce.number()
|
|
170
175
|
})
|
|
171
|
-
}), _e =
|
|
176
|
+
}), _e = d.extend({
|
|
172
177
|
type: e.literal(i.enum.FEEDBACK),
|
|
173
178
|
context: e.object({
|
|
174
179
|
feedback: se
|
|
175
180
|
})
|
|
176
|
-
}), Ie =
|
|
181
|
+
}), Ie = d.extend({
|
|
177
182
|
type: e.literal(i.enum.MEMBERSHIP_JOINED),
|
|
178
183
|
context: e.object({
|
|
179
184
|
user: L
|
|
180
185
|
})
|
|
181
|
-
}), he =
|
|
186
|
+
}), he = d.extend({
|
|
182
187
|
type: e.literal(i.enum.TIER_UPGRADED),
|
|
183
188
|
context: e.object({
|
|
184
189
|
transaction: P
|
|
185
190
|
})
|
|
186
|
-
}), fe =
|
|
191
|
+
}), fe = d.extend({
|
|
187
192
|
type: e.literal(i.enum.ISSUE_REWARD),
|
|
188
193
|
context: e.object({
|
|
189
194
|
transaction: P,
|
|
190
195
|
collection: ee
|
|
191
196
|
})
|
|
192
197
|
});
|
|
198
|
+
d.extend({
|
|
199
|
+
type: e.literal(i.enum.ISSUE_REWARD),
|
|
200
|
+
context: e.object({})
|
|
201
|
+
});
|
|
193
202
|
e.discriminatedUnion("type", [
|
|
194
203
|
ye,
|
|
195
204
|
Ce,
|
|
@@ -211,7 +220,7 @@ const Oe = e.object({
|
|
|
211
220
|
e.object({
|
|
212
221
|
type: Me
|
|
213
222
|
});
|
|
214
|
-
const
|
|
223
|
+
const Ae = e.object({
|
|
215
224
|
_id: n.optional(),
|
|
216
225
|
rule: _,
|
|
217
226
|
tierExpression: e.string().nullish(),
|
|
@@ -221,7 +230,7 @@ const Fe = e.object({
|
|
|
221
230
|
name: e.string().min(1),
|
|
222
231
|
image: e.string().nullish(),
|
|
223
232
|
option: Oe,
|
|
224
|
-
cycleOptions: e.array(e.lazy(() =>
|
|
233
|
+
cycleOptions: e.array(e.lazy(() => Ae)).nullish(),
|
|
225
234
|
member_count: e.number().optional()
|
|
226
235
|
});
|
|
227
236
|
I.partial({
|
|
@@ -229,7 +238,7 @@ I.partial({
|
|
|
229
238
|
});
|
|
230
239
|
const Ye = I.partial({
|
|
231
240
|
_id: !0
|
|
232
|
-
}),
|
|
241
|
+
}), Fe = {
|
|
233
242
|
collectionName: "Cards",
|
|
234
243
|
transform: {
|
|
235
244
|
_id: "oid",
|
|
@@ -260,7 +269,7 @@ e.object({
|
|
|
260
269
|
subscriptionBundle: e.string().nullish(),
|
|
261
270
|
pf_member: e.lazy(() => L).nullish(),
|
|
262
271
|
pf_transaction: e.lazy(() => ne).nullish()
|
|
263
|
-
}).describe(p.describe(
|
|
272
|
+
}).describe(p.describe(Fe));
|
|
264
273
|
const De = e.object({
|
|
265
274
|
length: e.coerce.number().optional(),
|
|
266
275
|
charset: e.string(),
|
|
@@ -327,7 +336,7 @@ const h = e.enum(["NO_REWARD", "VOUCHER", "LOYALTY"]), f = e.number().min(0, "We
|
|
|
327
336
|
U,
|
|
328
337
|
j,
|
|
329
338
|
N
|
|
330
|
-
]),
|
|
339
|
+
]), F = e.discriminatedUnion("type", [
|
|
331
340
|
U.extend({
|
|
332
341
|
collectible: n.nullish(),
|
|
333
342
|
business: n.nullish()
|
|
@@ -445,7 +454,7 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
445
454
|
brand: e.string().nullish(),
|
|
446
455
|
email: Ue.nullish(),
|
|
447
456
|
freeCreditAsDiscount: e.boolean().optional(),
|
|
448
|
-
pf_title: e.array(e.lazy(() =>
|
|
457
|
+
pf_title: e.array(e.lazy(() => m)).optional(),
|
|
449
458
|
pf_targetLocation: e.array(e.lazy(() => w)).optional(),
|
|
450
459
|
// new structure
|
|
451
460
|
group: e.string().nullish(),
|
|
@@ -543,7 +552,7 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
543
552
|
notify: e.boolean().optional(),
|
|
544
553
|
notifyMessage: e.lazy(() => E).optional(),
|
|
545
554
|
notifyCampaign: n.nullish(),
|
|
546
|
-
pf_collectible: e.lazy(() =>
|
|
555
|
+
pf_collectible: e.lazy(() => m).optional(),
|
|
547
556
|
pf_notifyCampaign: e.lazy(() => g).optional()
|
|
548
557
|
}), Ge = e.object({
|
|
549
558
|
gameType: e.string()
|
|
@@ -578,7 +587,7 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
578
587
|
notify: e.boolean().optional(),
|
|
579
588
|
notifyMessage: e.lazy(() => E).optional(),
|
|
580
589
|
notifyCampaign: n.nullish(),
|
|
581
|
-
pf_collectible: e.lazy(() =>
|
|
590
|
+
pf_collectible: e.lazy(() => m).optional(),
|
|
582
591
|
pf_notifyCampaign: e.lazy(() => g).optional()
|
|
583
592
|
}), V = l.extend({
|
|
584
593
|
type: e.literal(t.enum.CREDIT),
|
|
@@ -593,7 +602,7 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
593
602
|
notify: e.boolean().optional(),
|
|
594
603
|
notifyMessage: e.lazy(() => E).optional(),
|
|
595
604
|
notifyCampaign: n.nullish(),
|
|
596
|
-
pf_collectible: e.lazy(() =>
|
|
605
|
+
pf_collectible: e.lazy(() => m).optional(),
|
|
597
606
|
pf_notifyCampaign: e.lazy(() => g).optional()
|
|
598
607
|
}), g = l.extend({
|
|
599
608
|
type: e.literal(t.enum.BROADCAST),
|
|
@@ -618,7 +627,7 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
618
627
|
notify: e.boolean().optional(),
|
|
619
628
|
notifyMessage: e.lazy(() => E).optional(),
|
|
620
629
|
notifyCampaign: n.nullish(),
|
|
621
|
-
pf_collectible: e.lazy(() =>
|
|
630
|
+
pf_collectible: e.lazy(() => m).optional(),
|
|
622
631
|
pf_notifyCampaign: e.lazy(() => g).optional()
|
|
623
632
|
}), y = l.extend({
|
|
624
633
|
type: e.literal(t.enum.REWARD_POOL),
|
|
@@ -640,7 +649,7 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
640
649
|
earningOption: c,
|
|
641
650
|
collectible: n,
|
|
642
651
|
game: e.lazy(() => y).optional(),
|
|
643
|
-
pf_collectible: e.lazy(() =>
|
|
652
|
+
pf_collectible: e.lazy(() => m).optional(),
|
|
644
653
|
rewardPool: n.optional()
|
|
645
654
|
}), Y = l.extend({
|
|
646
655
|
type: e.literal(t.enum.MISSION),
|
|
@@ -651,7 +660,7 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
651
660
|
),
|
|
652
661
|
earningOption: c,
|
|
653
662
|
collectible: n,
|
|
654
|
-
pf_collectible: e.lazy(() =>
|
|
663
|
+
pf_collectible: e.lazy(() => m).optional(),
|
|
655
664
|
mission: e.lazy(() => Ne),
|
|
656
665
|
rewards: e.array(e.lazy(() => v)).min(1, "Requires at least 1 reward")
|
|
657
666
|
}), ze = {
|
|
@@ -729,13 +738,13 @@ const xe = e.enum(["PROGRESSIVE", "STAMP"]), Ne = e.object({
|
|
|
729
738
|
business: n.nullish()
|
|
730
739
|
}),
|
|
731
740
|
y.extend({
|
|
732
|
-
rewards: e.array(e.lazy(() =>
|
|
741
|
+
rewards: e.array(e.lazy(() => F)).min(1, "Requires at least 1 reward")
|
|
733
742
|
}),
|
|
734
743
|
J.extend({
|
|
735
744
|
business: n.nullish(),
|
|
736
745
|
game: y.extend({
|
|
737
746
|
business: n.nullish(),
|
|
738
|
-
rewards: e.array(e.lazy(() =>
|
|
747
|
+
rewards: e.array(e.lazy(() => F)).min(1, "Requires at least 1 reward")
|
|
739
748
|
})
|
|
740
749
|
}),
|
|
741
750
|
Y.extend({
|
|
@@ -747,17 +756,19 @@ export {
|
|
|
747
756
|
r as C,
|
|
748
757
|
Ye as F,
|
|
749
758
|
t as a,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
759
|
+
Xe as b,
|
|
760
|
+
F as c,
|
|
761
|
+
xe as d,
|
|
762
|
+
Pe as e,
|
|
763
|
+
Ne as f,
|
|
764
|
+
Ke as g,
|
|
765
|
+
S as h,
|
|
766
|
+
Ze as i,
|
|
767
|
+
$e as j,
|
|
768
|
+
Qe as k,
|
|
769
|
+
Je as l,
|
|
770
|
+
i as m,
|
|
771
|
+
be as n,
|
|
772
|
+
je as o,
|
|
762
773
|
qe as r
|
|
763
774
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { F as t, e as o, f as a } from "./index-CATw-eQI.js";
|
|
2
|
+
import { z as e, F as i, m as d } from "./loading-DxWIhKJX.js";
|
|
3
|
+
import { a as c } from "./collectible.enum-BR9zmyJv.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(() => t._def.right.options[0]),
|
|
8
|
+
earningOption: e.lazy(() => o)
|
|
9
|
+
}), s = e.object({
|
|
10
|
+
type: e.literal(l.enum.LOYALTY),
|
|
11
|
+
collecitbleType: c,
|
|
12
|
+
collectible: i,
|
|
13
|
+
earningOption: e.lazy(() => o),
|
|
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: t.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(() => t.nullish())
|
|
42
|
+
}).describe(d.describe(m)), T = b.extend({
|
|
43
|
+
_id: i.nullish(),
|
|
44
|
+
business: i.nullish(),
|
|
45
|
+
option: p
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
b as F,
|
|
49
|
+
T as a
|
|
50
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { g as s, S as c, b as o } from "./index-BfhjAqeE.js";
|
|
2
|
+
const a = () => {
|
|
3
|
+
const e = c.getBusinessId();
|
|
4
|
+
if (!e) throw new Error("Invalid business ID");
|
|
5
|
+
return o(`businesses/${e}/referral`, {
|
|
6
|
+
noIdRequired: !0
|
|
7
|
+
});
|
|
8
|
+
}, i = {
|
|
9
|
+
async read() {
|
|
10
|
+
return s(await a().get(""));
|
|
11
|
+
},
|
|
12
|
+
async update(e) {
|
|
13
|
+
return s(await a().put("", e));
|
|
14
|
+
},
|
|
15
|
+
async readReward() {
|
|
16
|
+
},
|
|
17
|
+
async updateReward() {
|
|
18
|
+
},
|
|
19
|
+
async deleteReward() {
|
|
20
|
+
},
|
|
21
|
+
async readRecords(e) {
|
|
22
|
+
const r = s(
|
|
23
|
+
await a().get("records", { params: e })
|
|
24
|
+
), t = r.resources.map((n) => ({
|
|
25
|
+
...n
|
|
26
|
+
}));
|
|
27
|
+
return {
|
|
28
|
+
meta: r.meta,
|
|
29
|
+
resources: t
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
async updateCriteriaProgress(e, r) {
|
|
33
|
+
return s(await a().post(`/records/${e}/progress`, r));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
i as r
|
|
38
|
+
};
|