@shoppexio/storefront 1.0.107 → 1.0.109
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/CHANGELOG.md +14 -0
- package/dist/{chunk-P7MN6RXP.js → chunk-RA26HK3B.js} +41 -2
- package/dist/{chunk-P7MN6RXP.js.map → chunk-RA26HK3B.js.map} +1 -1
- package/dist/customer.cjs +51 -37
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.d.cts +2 -7
- package/dist/customer.d.ts +2 -7
- package/dist/customer.js +12 -37
- package/dist/customer.js.map +1 -1
- package/dist/index.cjs +44 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -17
- package/dist/index.d.ts +33 -17
- package/dist/index.js +5 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -33,7 +33,6 @@ __export(src_exports, {
|
|
|
33
33
|
ShoppexError: () => ShoppexError,
|
|
34
34
|
ValidationError: () => ValidationError,
|
|
35
35
|
acceptResellerInvite: () => acceptResellerInvite,
|
|
36
|
-
addFavorite: () => addFavorite,
|
|
37
36
|
affiliate: () => affiliate,
|
|
38
37
|
affiliateStats: () => affiliateStats,
|
|
39
38
|
applyForReseller: () => applyForReseller,
|
|
@@ -52,7 +51,6 @@ __export(src_exports, {
|
|
|
52
51
|
emailPreferences: () => emailPreferences,
|
|
53
52
|
enrollAsReseller: () => enrollAsReseller,
|
|
54
53
|
ensureCartLineId: () => ensureCartLineId,
|
|
55
|
-
favorites: () => favorites,
|
|
56
54
|
fetchPublishedBuilderSettings: () => fetchPublishedBuilderSettings,
|
|
57
55
|
fetchPublishedThemeSettings: () => fetchPublishedThemeSettings,
|
|
58
56
|
filterProductsBySearchQuery: () => filterProductsBySearchQuery,
|
|
@@ -87,7 +85,6 @@ __export(src_exports, {
|
|
|
87
85
|
quoteResellerOrder: () => quoteResellerOrder,
|
|
88
86
|
redeemLoyaltyPoints: () => redeemLoyaltyPoints,
|
|
89
87
|
removeAvatar: () => removeAvatar,
|
|
90
|
-
removeFavorite: () => removeFavorite,
|
|
91
88
|
replyToTicket: () => replyToTicket,
|
|
92
89
|
requestOtp: () => requestOtp,
|
|
93
90
|
reseller: () => reseller,
|
|
@@ -2815,8 +2812,10 @@ function priceVariantToProductVariant(variant) {
|
|
|
2815
2812
|
cloudflareImageId: variant.cloudflareImageId,
|
|
2816
2813
|
image_url: variant.image_url,
|
|
2817
2814
|
imageUrl: variant.imageUrl,
|
|
2815
|
+
is_featured: variant.is_featured,
|
|
2818
2816
|
visibility: variant.visibility,
|
|
2819
|
-
is_private: variant.is_private
|
|
2817
|
+
is_private: variant.is_private,
|
|
2818
|
+
license_period: variant.license_period
|
|
2820
2819
|
};
|
|
2821
2820
|
}
|
|
2822
2821
|
function normalizeProduct(product) {
|
|
@@ -24286,6 +24285,23 @@ var customerPortalInvoiceDetailSchema = external_exports.object({
|
|
|
24286
24285
|
currency: external_exports.string()
|
|
24287
24286
|
}),
|
|
24288
24287
|
currentPaymentAttemptId: nullableStringSchema,
|
|
24288
|
+
/**
|
|
24289
|
+
* The goods went to a gift recipient or wait for a reveal, so a delivered
|
|
24290
|
+
* line without `deliverySummary` was withheld, not empty. Optional so
|
|
24291
|
+
* payloads from before the field parse; absent states nothing.
|
|
24292
|
+
*/
|
|
24293
|
+
deliveryWithheld: external_exports.boolean().optional(),
|
|
24294
|
+
/**
|
|
24295
|
+
* What became of money an expired order took: NONE when no payment is
|
|
24296
|
+
* recorded; null unless EXPIRED. Optional so payloads from before the field parse.
|
|
24297
|
+
*/
|
|
24298
|
+
expiredPayment: external_exports.enum(["NONE", "IN_REVIEW", "HELD", "SETTLED", "REFUNDED"]).nullable().optional(),
|
|
24299
|
+
/**
|
|
24300
|
+
* When the paying attempt completed; null until one has. Kept on a disputed
|
|
24301
|
+
* or refunded order, so the status decides whether it reads as paid.
|
|
24302
|
+
* Optional so payloads from before the field parse.
|
|
24303
|
+
*/
|
|
24304
|
+
paidAt: nullableStringSchema.optional(),
|
|
24289
24305
|
lineItems: external_exports.array(external_exports.object({
|
|
24290
24306
|
id: external_exports.string(),
|
|
24291
24307
|
productTitle: external_exports.string(),
|
|
@@ -24566,7 +24582,23 @@ var customerPortalSubscriptionSummarySchema = external_exports.object({
|
|
|
24566
24582
|
}).nullable().optional(),
|
|
24567
24583
|
pause_limit: external_exports.object({ pauses_per_year: external_exports.number(), available_again_at: external_exports.string() }).nullable().optional(),
|
|
24568
24584
|
// The Discord roles a pause takes ([] none); null when not known. Optional for deploy order.
|
|
24569
|
-
pause_access_roles: external_exports.array(external_exports.string()).nullable().optional()
|
|
24585
|
+
pause_access_roles: external_exports.array(external_exports.string()).nullable().optional(),
|
|
24586
|
+
// The running coupon term (`SubscriptionCouponTermView`, loadSubscriptionCouponTermView); null
|
|
24587
|
+
// without one. Amounts are the renewal-pricing function's, in `currency`. Same deploy order.
|
|
24588
|
+
discount: external_exports.object({
|
|
24589
|
+
code: external_exports.string(),
|
|
24590
|
+
discount_type: external_exports.enum(["PERCENTAGE", "FIXED"]),
|
|
24591
|
+
discount_value: external_exports.string(),
|
|
24592
|
+
max_discount: nullableStringSchema,
|
|
24593
|
+
currency: external_exports.string(),
|
|
24594
|
+
duration: external_exports.enum(["ONCE", "REPEATING", "FOREVER"]),
|
|
24595
|
+
payments_total: external_exports.number().nullable(),
|
|
24596
|
+
payments_used: external_exports.number(),
|
|
24597
|
+
discounted_amount: external_exports.string(),
|
|
24598
|
+
full_amount: external_exports.string(),
|
|
24599
|
+
discount_amount: external_exports.string(),
|
|
24600
|
+
next_amount: external_exports.string()
|
|
24601
|
+
}).nullable().optional()
|
|
24570
24602
|
});
|
|
24571
24603
|
var customerLoyaltySchema = external_exports.object({
|
|
24572
24604
|
enabled: external_exports.boolean(),
|
|
@@ -24625,6 +24657,12 @@ var customerPortalDashboardSchema = external_exports.object({
|
|
|
24625
24657
|
email: external_exports.string(),
|
|
24626
24658
|
name: external_exports.string()
|
|
24627
24659
|
}),
|
|
24660
|
+
/*
|
|
24661
|
+
* A merchant's portal link opened this session: the redeem and sign-in routes
|
|
24662
|
+
* refuse it with a 403. Undeclared here, the SDK stripped it and the code
|
|
24663
|
+
* storefront kept offering Redeem until the confirm failed.
|
|
24664
|
+
*/
|
|
24665
|
+
opened_by_portal_link: external_exports.boolean(),
|
|
24628
24666
|
stats: external_exports.object({
|
|
24629
24667
|
invoices_count: external_exports.number(),
|
|
24630
24668
|
licenses_count: external_exports.number(),
|
|
@@ -24848,6 +24886,7 @@ function orders(options = {}) {
|
|
|
24848
24886
|
if (options.page !== void 0) query.set("page", String(options.page));
|
|
24849
24887
|
if (options.limit !== void 0) query.set("limit", String(options.limit));
|
|
24850
24888
|
if (options.status) query.set("status", options.status);
|
|
24889
|
+
if (options.statusGroup) query.set("status_group", options.statusGroup);
|
|
24851
24890
|
if (options.search) query.set("q", options.search);
|
|
24852
24891
|
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
24853
24892
|
return requestCustomer(`/invoices${suffix}`, { schema: customerPortalPaginatedInvoicesSchema });
|
|
@@ -24961,15 +25000,6 @@ function undoSubscriptionCancel(uniqid) {
|
|
|
24961
25000
|
body: {}
|
|
24962
25001
|
});
|
|
24963
25002
|
}
|
|
24964
|
-
function favorites() {
|
|
24965
|
-
return requestCustomer("/favorites");
|
|
24966
|
-
}
|
|
24967
|
-
function addFavorite(productUniqid) {
|
|
24968
|
-
return requestCustomer(`/favorites/${encodeURIComponent(productUniqid)}`, { method: "PUT" });
|
|
24969
|
-
}
|
|
24970
|
-
function removeFavorite(productUniqid) {
|
|
24971
|
-
return requestCustomer(`/favorites/${encodeURIComponent(productUniqid)}`, { method: "DELETE" });
|
|
24972
|
-
}
|
|
24973
25003
|
function affiliate() {
|
|
24974
25004
|
return requestCustomer("/affiliate");
|
|
24975
25005
|
}
|
|
@@ -25135,9 +25165,6 @@ var shoppex = {
|
|
|
25135
25165
|
pauseSubscription,
|
|
25136
25166
|
resumeSubscription,
|
|
25137
25167
|
undoSubscriptionCancel,
|
|
25138
|
-
favorites,
|
|
25139
|
-
addFavorite,
|
|
25140
|
-
removeFavorite,
|
|
25141
25168
|
affiliate,
|
|
25142
25169
|
affiliateStats,
|
|
25143
25170
|
createAffiliateLink,
|
|
@@ -25189,7 +25216,6 @@ if (typeof window !== "undefined") {
|
|
|
25189
25216
|
ShoppexError,
|
|
25190
25217
|
ValidationError,
|
|
25191
25218
|
acceptResellerInvite,
|
|
25192
|
-
addFavorite,
|
|
25193
25219
|
affiliate,
|
|
25194
25220
|
affiliateStats,
|
|
25195
25221
|
applyForReseller,
|
|
@@ -25207,7 +25233,6 @@ if (typeof window !== "undefined") {
|
|
|
25207
25233
|
emailPreferences,
|
|
25208
25234
|
enrollAsReseller,
|
|
25209
25235
|
ensureCartLineId,
|
|
25210
|
-
favorites,
|
|
25211
25236
|
fetchPublishedBuilderSettings,
|
|
25212
25237
|
fetchPublishedThemeSettings,
|
|
25213
25238
|
filterProductsBySearchQuery,
|
|
@@ -25242,7 +25267,6 @@ if (typeof window !== "undefined") {
|
|
|
25242
25267
|
quoteResellerOrder,
|
|
25243
25268
|
redeemLoyaltyPoints,
|
|
25244
25269
|
removeAvatar,
|
|
25245
|
-
removeFavorite,
|
|
25246
25270
|
replyToTicket,
|
|
25247
25271
|
requestOtp,
|
|
25248
25272
|
reseller,
|