@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.50
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-D-yp03jJ.js +427 -0
- package/dist/{App-C8Qfnkhz.js → App-CeQWTGNK.js} +441 -420
- package/dist/AuditLogs-2qzwcMXR.js +1885 -0
- package/dist/Bin-D1b2NbbA.js +191 -0
- package/dist/{Broadcast-BK-1MQkL.js → Broadcast-bKF9mIns.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_q5K-cx.js} +6 -8
- package/dist/Card-BCAyfBLi.js +896 -0
- package/dist/{Collections-TA4iW1r0.js → Collections-Yz3F55bv.js} +27 -31
- package/dist/{Credit-Df9iFQjZ.js → Credit-Ceptt_g_.js} +17 -16
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-D3Bt-Vuu.js} +6 -6
- package/dist/{Experience-ByLFXKn6.js → Experience-DskHKzfo.js} +26 -25
- package/dist/{Game-B6Ez0pfW.js → Game-IJ6X0AXM.js} +21 -20
- package/dist/Index-CEl2y9X6.js +259 -0
- package/dist/Marketing-CWekLb4c.js +20071 -0
- package/dist/{Member-TobP1ISp.js → Member-BUZPQ5Lb.js} +4 -4
- package/dist/MemberList-BmVNqvbm.js +1598 -0
- package/dist/MemberTransactions-B3XhEOK_.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-C6YIbQtM.js} +6 -6
- package/dist/{Mission-D9uTVo0G.js → Mission-Ci9ed_ph.js} +97 -84
- package/dist/Overview-CU9uhC-k.js +1078 -0
- package/dist/{Point-4rDr-53e.js → Point-wuuR7AEb.js} +26 -25
- package/dist/{Promotion-BKO_dtQk.js → Promotion-BMi3kyE8.js} +55 -48
- package/dist/Record-Wmh-g8WY.js +340 -0
- package/dist/Reward-BL4lxhIB.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dbik0PEw.js +1637 -0
- package/dist/Segment-DObdjyYi.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BAuM6qP5.js +181 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfyRVxWM.js +147 -0
- package/dist/{Setting-B7oISD0D.js → Setting-Dqgnd7TR.js} +610 -586
- package/dist/Store--Z4So__g.js +1744 -0
- package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-DPFVXWwm.js} +33 -32
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js +939 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CGOmGozY.js} +1 -1
- package/dist/{Tier-DkxdNj-K.js → Tier-36IfhsnP.js} +327 -318
- package/dist/{Title-VFpCOsMO.js → Title-XH56OOug.js} +199 -184
- package/dist/{Transaction-BgKD8n2L.js → Transaction-BUQcSmBs.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BVCfeG5T.js +130 -0
- package/dist/Voucher-CvmH0kcF.js +353 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BQOD6uEf.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js} +1 -1
- package/dist/{app-DUl5dav5.js → app-DeW5_DB0.js} +1754 -1496
- package/dist/{app-DA-t-2Zt.js → app-TN8KEPMu.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-CeCitOY4.js → business-D1mLhSME.js} +1 -1
- package/dist/campaign-0tnkhu78.js +1810 -0
- package/dist/{campaign-CcLM6e4s.js → campaign-B-12Im0w.js} +2 -2
- package/dist/campaign.enum-C8m-HHZE.js +20 -0
- package/dist/campaign.fn-CxkhbK9i.js +758 -0
- package/dist/collectible.enum-6Syq-vQ6.js +19 -0
- package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUj75Jp2.js} +2 -2
- package/dist/dto-8wODhIIC.js +214 -0
- package/dist/{effect-Dt7rXOBy.js → effect-BEZEjcJu.js} +9 -9
- package/dist/email-addresses-PwjkdYYD.js +705 -0
- package/dist/{export-CyioiboQ.js → export-BB-0vgwy.js} +5 -5
- package/dist/{helper-FA_9AhGV.js → helper-DOt8-wns.js} +1 -1
- package/dist/{index-DLN4Kzz_.js → index-B1qUjniH.js} +1 -1
- package/dist/index-BTMIZz4v.js +44 -0
- package/dist/{index-igxrd5jC.js → index-By-GlmG7.js} +1500 -1479
- package/dist/index-C7zBkoZ4.js +115 -0
- package/dist/{index-CyNdsVrw.js → index-CNlHabtk.js} +1 -1
- package/dist/{index-DbbO3wip.js → index-CXGiIgdK.js} +48 -4
- package/dist/{index-C20XBD7G.js → index-Cjn1LVjC.js} +2192 -931
- package/dist/index-CpfUrdgw.js +29000 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-DZuEmMyY.js +54 -0
- package/dist/{index-CCdXvb92.js → index-D_zwqIhq.js} +1 -1
- package/dist/index-DabUEw_c.js +32 -0
- package/dist/{index-BiFueJiF.js → index-X-FfC49l.js} +258 -192
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-DJOUiVjR.js} +33 -33
- package/dist/loading-aCWVsOPY.js +71 -0
- package/dist/{membership-DFiY8aVd.js → membership-1etsHC5G.js} +54 -46
- package/dist/money-DzWRURZ5.js +15 -0
- package/dist/number-BxIQO1i3.js +12 -0
- package/dist/objectid-DjhmYkn-.js +145 -0
- package/dist/{loading-CZ0fiViM.js → plugins-CSPFAU50.js} +2990 -3062
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-Bh4Li9f0.js +36 -0
- package/dist/{rule-C3e1xTqN.js → rule-CHTTTUFB.js} +180 -177
- package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-OHfUJTIA.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-C2OKWd_e.js → template-ZGxXqkaC.js} +5 -5
- package/dist/trigger-Ogu5FDs0.js +144 -0
- package/dist/user-DBuU81tO.js +54 -0
- package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-CKpKQ6iE.js} +216 -216
- package/dist/{xlsx-CtXdl3ls.js → xlsx-DJDZBIeg.js} +1 -1
- package/package.json +9 -7
- package/dist/Analytic-C_ZFR5jh.js +0 -622
- package/dist/Card-C7dUFJKe.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
- package/dist/Marketing-BaqZUeVI.js +0 -316
- package/dist/MemberList-B9cutmEh.js +0 -1733
- package/dist/MemberTransactions-DRHA7AOF.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
- package/dist/Segment-Dj8nc3AE.js +0 -437
- package/dist/Store-CJ3wcohQ.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
- package/dist/Voucher-BbTLt8Pt.js +0 -490
- package/dist/dto-CRJma6eX.js +0 -2770
- package/dist/index-B1e0LtDe.js +0 -99
- package/dist/index-Be2ZYDy_.js +0 -298
- package/dist/index-CDkITvze.js +0 -762
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DPP5F3bT.js +0 -206
- package/dist/index-Dbo3DDwp.js +0 -29193
- package/dist/money-D8hUEfP4.js +0 -15
- package/dist/number-DL3GAeVt.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
package/dist/index-B1e0LtDe.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { g as e, S as n, b as o } from "./index-Dbo3DDwp.js";
|
|
2
|
-
const t = () => {
|
|
3
|
-
const a = n.getBusinessId();
|
|
4
|
-
if (!a) throw new Error("Invalid business ID");
|
|
5
|
-
return o(`businesses/${a}/campaigns`, {
|
|
6
|
-
// url: 'http://localhost:3000/portal/',
|
|
7
|
-
});
|
|
8
|
-
}, i = {
|
|
9
|
-
async readAllGrouped(a) {
|
|
10
|
-
const s = e(
|
|
11
|
-
await t().get("grouped", { params: a })
|
|
12
|
-
);
|
|
13
|
-
return {
|
|
14
|
-
meta: s.meta,
|
|
15
|
-
resources: s.resources
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
async readAll(a, s) {
|
|
19
|
-
const r = e(
|
|
20
|
-
await t().get("", {
|
|
21
|
-
params: { ...a, ...s }
|
|
22
|
-
})
|
|
23
|
-
);
|
|
24
|
-
return {
|
|
25
|
-
meta: r.meta,
|
|
26
|
-
resources: r.resources
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
async readById(a) {
|
|
30
|
-
return e(await t().get(`/${a}`));
|
|
31
|
-
},
|
|
32
|
-
async create(a) {
|
|
33
|
-
return e(await t().post("", a));
|
|
34
|
-
},
|
|
35
|
-
async update(a, s) {
|
|
36
|
-
return e(await t().put(a, s));
|
|
37
|
-
},
|
|
38
|
-
async delete(a) {
|
|
39
|
-
return e(await t().delete(a));
|
|
40
|
-
},
|
|
41
|
-
async readCollectionsByCampaignId(a, s) {
|
|
42
|
-
const r = e(
|
|
43
|
-
await t().get(`/${a}/collections`, {
|
|
44
|
-
params: s
|
|
45
|
-
})
|
|
46
|
-
);
|
|
47
|
-
return {
|
|
48
|
-
meta: r.meta,
|
|
49
|
-
resources: r.resources
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
async readTransactions(a) {
|
|
53
|
-
return e(
|
|
54
|
-
await t().get(
|
|
55
|
-
`/${a}/collections/transactions`
|
|
56
|
-
)
|
|
57
|
-
);
|
|
58
|
-
},
|
|
59
|
-
async createCollectionByCampaignId(a, s) {
|
|
60
|
-
return e(
|
|
61
|
-
await t().post(`/${a}/collections`, s)
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
async readGroups() {
|
|
65
|
-
return e(await t().get("/groups")) ?? [];
|
|
66
|
-
},
|
|
67
|
-
async readStats(a) {
|
|
68
|
-
return e(
|
|
69
|
-
await t().get("/stats", { params: a })
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
async createGroup(a) {
|
|
73
|
-
return e(await t().post("/groups", a));
|
|
74
|
-
},
|
|
75
|
-
async updateGroup(a, s) {
|
|
76
|
-
return e(
|
|
77
|
-
await t().put(`/groups/${a}`, s)
|
|
78
|
-
);
|
|
79
|
-
},
|
|
80
|
-
async deleteGroup(a) {
|
|
81
|
-
return e(await t().delete(`/groups/${a}`));
|
|
82
|
-
},
|
|
83
|
-
async sendCollection(a, s) {
|
|
84
|
-
return e(
|
|
85
|
-
await t().post(
|
|
86
|
-
`/${a}/collections/send`,
|
|
87
|
-
s
|
|
88
|
-
)
|
|
89
|
-
);
|
|
90
|
-
},
|
|
91
|
-
async syncAllPromotion() {
|
|
92
|
-
return e(
|
|
93
|
-
await t().post("/promotion/sync")
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
export {
|
|
98
|
-
i as c
|
|
99
|
-
};
|
package/dist/index-Be2ZYDy_.js
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import { z as e, F as t, g as f, e as s, d as r, m as a } from "./loading-CZ0fiViM.js";
|
|
2
|
-
import { e as l } from "./index-igxrd5jC.js";
|
|
3
|
-
import "vue";
|
|
4
|
-
const I = e.object({
|
|
5
|
-
icon: e.string(),
|
|
6
|
-
label: e.string(),
|
|
7
|
-
value: e.string()
|
|
8
|
-
}), E = e.object({
|
|
9
|
-
gatewayKey: e.enum([
|
|
10
|
-
"REVENUE_MONSTER",
|
|
11
|
-
"FEEDME",
|
|
12
|
-
"FEEDME_MEMBER_CREDIT",
|
|
13
|
-
"RAZER_MERCHANT_SERVICE"
|
|
14
|
-
]),
|
|
15
|
-
checkoutUrl: e.string().optional(),
|
|
16
|
-
checkoutId: e.string().optional(),
|
|
17
|
-
callbackUrl: e.string().optional(),
|
|
18
|
-
vcode: e.string().optional(),
|
|
19
|
-
merchantId: e.string().optional(),
|
|
20
|
-
amount: e.string().optional(),
|
|
21
|
-
currency: e.string().optional(),
|
|
22
|
-
returnUrl: e.string().optional(),
|
|
23
|
-
notifyUrl: e.string().optional(),
|
|
24
|
-
channels: e.array(I).optional(),
|
|
25
|
-
transactionId: e.string().optional()
|
|
26
|
-
});
|
|
27
|
-
e.object({
|
|
28
|
-
trx: e.lazy(() => M),
|
|
29
|
-
onlineTrx: E.optional(),
|
|
30
|
-
url: e.string().optional()
|
|
31
|
-
});
|
|
32
|
-
const d = e.enum(["POS", "APP"]), u = e.enum(["topupCount"]), F = e.object({
|
|
33
|
-
line1: e.string(),
|
|
34
|
-
line2: e.string().optional(),
|
|
35
|
-
state: e.string(),
|
|
36
|
-
city: e.string(),
|
|
37
|
-
postcode: e.string(),
|
|
38
|
-
country: e.string()
|
|
39
|
-
}), m = e.object({
|
|
40
|
-
name: e.string(),
|
|
41
|
-
regNo: e.string(),
|
|
42
|
-
address: F,
|
|
43
|
-
phoneNo: e.string(),
|
|
44
|
-
sstRegNo: e.string().optional()
|
|
45
|
-
}), p = e.object({
|
|
46
|
-
systemCode: e.string(),
|
|
47
|
-
inclusive: e.boolean()
|
|
48
|
-
}), P = e.object({
|
|
49
|
-
id: t,
|
|
50
|
-
dayToExpire: e.number()
|
|
51
|
-
}), T = e.object({
|
|
52
|
-
normal: e.coerce.number(),
|
|
53
|
-
free: e.object({
|
|
54
|
-
day: e.coerce.number(),
|
|
55
|
-
amount: e.coerce.number(),
|
|
56
|
-
remark: e.string().nullish()
|
|
57
|
-
}).nullish()
|
|
58
|
-
}), _ = e.object({
|
|
59
|
-
systemCode: e.string(),
|
|
60
|
-
taxCode: e.string()
|
|
61
|
-
}), j = e.object({
|
|
62
|
-
name: e.string(),
|
|
63
|
-
systemCode: e.string(),
|
|
64
|
-
taxCode: e.string(),
|
|
65
|
-
rate: f,
|
|
66
|
-
total: s
|
|
67
|
-
});
|
|
68
|
-
e.object({
|
|
69
|
-
canPurchase: e.boolean(),
|
|
70
|
-
reason: e.string()
|
|
71
|
-
});
|
|
72
|
-
e.object({
|
|
73
|
-
type: u
|
|
74
|
-
});
|
|
75
|
-
e.object({
|
|
76
|
-
type: u,
|
|
77
|
-
min: e.number().nullish(),
|
|
78
|
-
max: e.number().nullish()
|
|
79
|
-
});
|
|
80
|
-
const C = e.object({
|
|
81
|
-
options: e.object({
|
|
82
|
-
maxReceive: e.number().min(0).nullish(),
|
|
83
|
-
maxPerUser: e.number().min(0).nullish()
|
|
84
|
-
}),
|
|
85
|
-
rule: l.nullish()
|
|
86
|
-
}), N = (o, i) => {
|
|
87
|
-
const n = o;
|
|
88
|
-
n.isFeedvibe && r.Dinero.fromFdoDinero(n.price).toUnit() < 0.1 && i.addIssue({
|
|
89
|
-
code: "custom",
|
|
90
|
-
path: ["price"],
|
|
91
|
-
message: "Price must be at least RM10"
|
|
92
|
-
});
|
|
93
|
-
}, b = e.object({
|
|
94
|
-
_id: e.string(),
|
|
95
|
-
isFeedvibe: e.boolean().nullish(),
|
|
96
|
-
// conditions: z.array(FdoTopupCountCondition),
|
|
97
|
-
image: e.string().nullish(),
|
|
98
|
-
rule: l.nullish(),
|
|
99
|
-
name: e.string(),
|
|
100
|
-
price: s,
|
|
101
|
-
originalPrice: s.nullish(),
|
|
102
|
-
// new field to indicate coinPrice
|
|
103
|
-
coinPrice: e.number().nullish(),
|
|
104
|
-
titles: e.array(P),
|
|
105
|
-
credit: T,
|
|
106
|
-
taxes: e.array(_),
|
|
107
|
-
taxTotals: e.array(j),
|
|
108
|
-
priceWithTaxes: s.nullish(),
|
|
109
|
-
vouchers: e.array(t),
|
|
110
|
-
_inclusiveTaxes: e.array(p).nullish(),
|
|
111
|
-
_taxSystem: e.array(e.string()).nullish(),
|
|
112
|
-
stripePriceId: e.string().nullish(),
|
|
113
|
-
subscriptionValidity: e.number().min(1, "Must be at least 1 day").max(365, "Maximum is 365").nullish(),
|
|
114
|
-
redeemWithCode: e.boolean().nullish(),
|
|
115
|
-
internal: e.boolean().optional(),
|
|
116
|
-
hideInPos: e.boolean().optional(),
|
|
117
|
-
config: C.optional(),
|
|
118
|
-
pf_titles: e.array(e.any()).optional(),
|
|
119
|
-
pf_vouchers: e.array(e.any()).optional(),
|
|
120
|
-
pf_credit: e.number().optional()
|
|
121
|
-
}).superRefine((o, i) => {
|
|
122
|
-
var n, c;
|
|
123
|
-
o.stripePriceId && !o.subscriptionValidity && i.addIssue({
|
|
124
|
-
code: "custom",
|
|
125
|
-
message: "Validity is required when stripePriceId is provided",
|
|
126
|
-
path: ["subscriptionValidity"]
|
|
127
|
-
}), o.originalPrice && o.originalPrice.amount && o.originalPrice.amount < o.price.amount && i.addIssue({
|
|
128
|
-
code: "custom",
|
|
129
|
-
message: "Original price must be greater than price",
|
|
130
|
-
path: ["originalPrice"]
|
|
131
|
-
}), o.price.amount < 0 && i.addIssue({
|
|
132
|
-
code: "custom",
|
|
133
|
-
path: ["price"],
|
|
134
|
-
message: "Price cannot be less than 0"
|
|
135
|
-
}), o.coinPrice && o.coinPrice < 0 && i.addIssue({
|
|
136
|
-
code: "custom",
|
|
137
|
-
path: ["coinPrice"],
|
|
138
|
-
message: "Point price cannot be less than 0"
|
|
139
|
-
}), o.credit.normal < 0 && i.addIssue({
|
|
140
|
-
code: "custom",
|
|
141
|
-
path: ["credit", "normal"],
|
|
142
|
-
message: "Normal credit cannot be less than 0"
|
|
143
|
-
}), o.credit.free && (o.credit.free.amount < 0 && i.addIssue({
|
|
144
|
-
code: "custom",
|
|
145
|
-
path: ["credit", "free", "amount"],
|
|
146
|
-
message: "Free credit cannot be less than 0"
|
|
147
|
-
}), o.credit.free.amount && o.credit.free.day < 0 && i.addIssue({
|
|
148
|
-
code: "custom",
|
|
149
|
-
path: ["credit", "free", "day"],
|
|
150
|
-
message: "Expiry must be at least 0 (expire same day)"
|
|
151
|
-
})), o.credit.normal && o.coinPrice && i.addIssue({
|
|
152
|
-
code: "custom",
|
|
153
|
-
message: "Bundle redeem with point cannot set normal credit.",
|
|
154
|
-
path: ["credit", "normal"]
|
|
155
|
-
}), o.credit.normal > r.Dinero.fromFdoDinero(o.price).toUnit() && i.addIssue({
|
|
156
|
-
code: "custom",
|
|
157
|
-
message: `Normal credit cannot be more than price. Max: ${r.Dinero.fromFdoDinero(
|
|
158
|
-
o.price
|
|
159
|
-
).toUnit()}`,
|
|
160
|
-
path: ["credit", "normal"]
|
|
161
|
-
}), o.titles.length > 0 && o.titles.some((y) => y.dayToExpire < 0) && i.addIssue({
|
|
162
|
-
code: "custom",
|
|
163
|
-
path: ["titles"],
|
|
164
|
-
message: "Title expiry must be at least 0 day (expire same day)"
|
|
165
|
-
}), (((c = (n = o.config) == null ? void 0 : n.options) == null ? void 0 : c.maxPerUser) || 0) < 0 && i.addIssue({
|
|
166
|
-
code: "custom",
|
|
167
|
-
path: ["config.options.maxPerUser"],
|
|
168
|
-
message: "Max purchase per user cannot be negative"
|
|
169
|
-
});
|
|
170
|
-
}).superRefine(N), g = e.object({
|
|
171
|
-
name: e.string(),
|
|
172
|
-
bundles: e.array(b)
|
|
173
|
-
});
|
|
174
|
-
e.object({
|
|
175
|
-
_id: e.string(),
|
|
176
|
-
name: e.string(),
|
|
177
|
-
expiredAt: e.string()
|
|
178
|
-
});
|
|
179
|
-
const S = e.object({
|
|
180
|
-
apiKey: e.string(),
|
|
181
|
-
webhookSecret: e.string()
|
|
182
|
-
}), R = e.object({
|
|
183
|
-
company: m.nullish(),
|
|
184
|
-
inclusiveTaxes: e.array(p).nullish(),
|
|
185
|
-
stripe: S.optional()
|
|
186
|
-
}), x = {
|
|
187
|
-
collectionName: "Stores",
|
|
188
|
-
transform: {
|
|
189
|
-
_id: "oid",
|
|
190
|
-
business: "oid"
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
R.extend({
|
|
194
|
-
_id: t,
|
|
195
|
-
business: t,
|
|
196
|
-
categories: e.array(g)
|
|
197
|
-
}).describe(a.describe(x));
|
|
198
|
-
const D = e.object({
|
|
199
|
-
refundedAt: e.coerce.date(),
|
|
200
|
-
reason: e.string(),
|
|
201
|
-
transactions: e.array(t)
|
|
202
|
-
}), h = e.object({
|
|
203
|
-
type: e.enum(["ONLINE", "OFFLINE", "COIN", "STRIPE", "CARD", "FEEDVIBE"]),
|
|
204
|
-
extra: e.string().nullish()
|
|
205
|
-
}), U = {
|
|
206
|
-
collectionName: "StoreTransactions",
|
|
207
|
-
transform: {
|
|
208
|
-
_id: "oid",
|
|
209
|
-
business: "oid",
|
|
210
|
-
location: "oid",
|
|
211
|
-
member: "oid",
|
|
212
|
-
transactions: "oid"
|
|
213
|
-
},
|
|
214
|
-
lookups: {
|
|
215
|
-
member: {
|
|
216
|
-
fromCollection: "UsersV2",
|
|
217
|
-
as: "pf_member"
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}, M = e.object({
|
|
221
|
-
_id: t,
|
|
222
|
-
source: d,
|
|
223
|
-
// can be memberStorePurchase
|
|
224
|
-
ref: e.string(),
|
|
225
|
-
business: t,
|
|
226
|
-
company: m,
|
|
227
|
-
location: t.optional(),
|
|
228
|
-
member: t,
|
|
229
|
-
// createdAt: z.coerce.date(),
|
|
230
|
-
bundle: b,
|
|
231
|
-
transactions: e.array(t),
|
|
232
|
-
// array of transaction id (voucher, credit, title)
|
|
233
|
-
status: e.enum([
|
|
234
|
-
"PENDING_PAYMENT",
|
|
235
|
-
"PENDING_TRANSACTION",
|
|
236
|
-
"COMPLETED",
|
|
237
|
-
"REFUNDED"
|
|
238
|
-
]),
|
|
239
|
-
refund: D.nullish(),
|
|
240
|
-
paymentType: h.nullish(),
|
|
241
|
-
paymentRef: e.string().nullish(),
|
|
242
|
-
webhookUrl: e.string().optional(),
|
|
243
|
-
webhookSent: e.boolean().optional(),
|
|
244
|
-
pf_transactions: e.array(e.any()).optional(),
|
|
245
|
-
pf_member: e.any().optional(),
|
|
246
|
-
pf_location: e.any().optional(),
|
|
247
|
-
pf_ref: e.any().optional()
|
|
248
|
-
}).describe(a.describe(U));
|
|
249
|
-
e.object({
|
|
250
|
-
bundle: t,
|
|
251
|
-
member: e.string(),
|
|
252
|
-
ref: e.string(),
|
|
253
|
-
paymentType: h.nullish(),
|
|
254
|
-
withCoin: e.boolean().optional(),
|
|
255
|
-
card: e.string().optional(),
|
|
256
|
-
location: t.optional(),
|
|
257
|
-
source: d,
|
|
258
|
-
webhookUrl: e.string().optional()
|
|
259
|
-
});
|
|
260
|
-
e.object({
|
|
261
|
-
categories: e.array(g)
|
|
262
|
-
});
|
|
263
|
-
e.object({
|
|
264
|
-
id: t,
|
|
265
|
-
reason: e.string(),
|
|
266
|
-
location: t.optional()
|
|
267
|
-
});
|
|
268
|
-
e.object({
|
|
269
|
-
_id: t,
|
|
270
|
-
business: t,
|
|
271
|
-
user: t,
|
|
272
|
-
bundleId: e.string(),
|
|
273
|
-
transaction: e.array(t),
|
|
274
|
-
subscriptionId: e.string(),
|
|
275
|
-
expiredAt: e.coerce.date()
|
|
276
|
-
}).describe(
|
|
277
|
-
a.describe({
|
|
278
|
-
collectionName: "StoreSubscriptions",
|
|
279
|
-
transform: {
|
|
280
|
-
_id: "oid",
|
|
281
|
-
business: "oid",
|
|
282
|
-
user: "oid",
|
|
283
|
-
transaction: "oid",
|
|
284
|
-
expiredAt: "date"
|
|
285
|
-
}
|
|
286
|
-
})
|
|
287
|
-
);
|
|
288
|
-
e.object({
|
|
289
|
-
member: e.string(),
|
|
290
|
-
subscriptionId: e.string()
|
|
291
|
-
});
|
|
292
|
-
export {
|
|
293
|
-
R as F,
|
|
294
|
-
m as a,
|
|
295
|
-
F as b,
|
|
296
|
-
b as c,
|
|
297
|
-
M as d
|
|
298
|
-
};
|