@shoppexio/storefront 1.0.88 → 1.0.90
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 +19 -0
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -155,6 +155,12 @@ interface Shop {
|
|
|
155
155
|
feedback?: ShopFeedback;
|
|
156
156
|
trusted_checks?: TrustedChecks | null;
|
|
157
157
|
available_gateways?: string[];
|
|
158
|
+
payment_methods?: Array<{
|
|
159
|
+
id: string;
|
|
160
|
+
label: string;
|
|
161
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
162
|
+
}>;
|
|
163
|
+
stock_alerts_enabled?: boolean;
|
|
158
164
|
payment_gateways_fees?: unknown[];
|
|
159
165
|
reward_program_summary?: RewardProgramSummary | null;
|
|
160
166
|
}
|
|
@@ -221,6 +227,20 @@ interface Product {
|
|
|
221
227
|
title: string;
|
|
222
228
|
slug?: string | null;
|
|
223
229
|
description?: string | null;
|
|
230
|
+
/** One plain-text line the merchant wrote for under the title; null when unset. */
|
|
231
|
+
short_description?: string | null;
|
|
232
|
+
/** The merchant's word for one / several delivered units of a SERIALS product ("License key"); null when unset. */
|
|
233
|
+
label_singular?: string | null;
|
|
234
|
+
label_plural?: string | null;
|
|
235
|
+
/**
|
|
236
|
+
* The merchant's explicit service status for storefront `/status` pages; null
|
|
237
|
+
* when they set none (the product is then not listed there).
|
|
238
|
+
*/
|
|
239
|
+
service_status?: {
|
|
240
|
+
state: 'operational' | 'updating' | 'detected' | 'offline';
|
|
241
|
+
note: string | null;
|
|
242
|
+
updated_at: string;
|
|
243
|
+
} | null;
|
|
224
244
|
/** Merchant-defined description tabs; present when the shop configured them. */
|
|
225
245
|
description_tabs?: ProductDescriptionTab[];
|
|
226
246
|
product_highlights?: string[];
|
|
@@ -409,6 +429,8 @@ interface PriceVariant {
|
|
|
409
429
|
id: string;
|
|
410
430
|
label?: string;
|
|
411
431
|
title?: string;
|
|
432
|
+
/** The merchant's one-line note on this option ("1 seat"); absent when unset. */
|
|
433
|
+
description?: string;
|
|
412
434
|
price: number;
|
|
413
435
|
/**
|
|
414
436
|
* RAW local stock for this price variant only. `-1` (or any negative value)
|
|
@@ -487,6 +509,13 @@ interface ShopReviewsPage {
|
|
|
487
509
|
feedback: Feedback[];
|
|
488
510
|
pagination: CursorPagination;
|
|
489
511
|
summary: ShopReviewsSummary;
|
|
512
|
+
/**
|
|
513
|
+
* The product filter the API applied (the `product` passed in), or null for
|
|
514
|
+
* the whole shop. `getShopReviewsPage` fails a filtered request whose answer
|
|
515
|
+
* does not carry the same id, so a caller never gets another product's
|
|
516
|
+
* reviews from an API that ignored the filter.
|
|
517
|
+
*/
|
|
518
|
+
product?: string | null;
|
|
490
519
|
}
|
|
491
520
|
interface ProductBundle {
|
|
492
521
|
id?: string;
|
|
@@ -1701,6 +1730,8 @@ declare function validateCoupon(code: string, productOrOptions?: string | Coupon
|
|
|
1701
1730
|
* Note: Shoppex has shop-level feedback, not product-level reviews.
|
|
1702
1731
|
*/
|
|
1703
1732
|
|
|
1733
|
+
/** `code` of a filtered request the API answered without applying the filter. */
|
|
1734
|
+
declare const PRODUCT_FILTER_UNSUPPORTED = "reviews_product_filter_unsupported";
|
|
1704
1735
|
interface ShopReviewsPageOptions {
|
|
1705
1736
|
/**
|
|
1706
1737
|
* One product's reviews, by the product's public id (the `id` the catalog
|
|
@@ -2111,4 +2142,4 @@ declare const shoppex: {
|
|
|
2111
2142
|
mergeSettings: typeof mergeSettings;
|
|
2112
2143
|
};
|
|
2113
2144
|
|
|
2114
|
-
export { type AffiliateValidation, ApiError, type ApiResponse, type BlockDefinition, type BlockInstance, type BuyerRewardActivityItem, type BuyerRewards, CURRENCY_UNAVAILABLE_ERROR_CODE, type CartAddOptions, type CartAddon, type CartAppliedDiscount, type CartBasketMergeLine, type CartCodeSource, CartError, type CartItem, type CartItemUpdate, type CartLineIdentityInput, type CartMetadata, type CartPayload, type CartQuote, type CartQuoteLine, type CartStats, type Category, CheckoutCreateError, type CheckoutOptions, type CheckoutResult, type CouponValidation, type CouponValidationOptions, type CursorPagination, type CustomFieldDefinition, type CustomerEmailPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerTicketPayload, type EligibleBundleDeal, type EligibleBundleDealProduct, type EligibleCartDeal, type Feedback, type Invoice, type InvoiceProduct, type Menu, type MenuItem, NetworkError, NotInitializedError, type Page, type PageLayout, type PriceVariant, type Product, type ProductAddon, type ProductBundle, type ProductBundleProduct, type ProductCategory, type ProductDescriptionTab, type ProductFaq, type ProductFeedback, type ProductGroup, type ProductImage, type ProductVariant, type PublishedBuilderSettings, type PublishedThemeSettingsPayload, type ResellerCatalogQuery, type ResellerOrderItem, type ResellerOrdersQuery, type ResolvedThemeSettings, type RewardActionType, type RewardGrantStatus, type RewardProgramSummary, type RewardProgramTeaserItem, type RewardReason, type SDKResponse, type SearchOptions, type SectionDefinition, type SettingField, type Shop, type ShopFeedback, type ShopReviewsPage, type ShopReviewsSummary, type ShopTheme, type ShoppexConfig, ShoppexError, type ShoppexInitOptions, type StorefrontAddon, type StorefrontAddonBootstrap, type StorefrontAnnouncementBarAddon, type StorefrontCatalogSearchItem, type StorefrontContactTicketInput, type StorefrontContactTicketResult, type StorefrontCountdownBarAddon, type StorefrontCouponPopupModalAddon, type StorefrontCustomField, type StorefrontData, type StorefrontItem, type StorefrontOnlineUsers, type StorefrontPromoInfoCardAddon, type StorefrontRecentPurchasePopupAddon, type StorefrontRecentSaleEntry, type StorefrontRecentSales, type StorefrontSearchFilterOptions, type StorefrontSocialLinks, type Subscription, type SubscriptionFlags, type SubscriptionInterval, type ThemeBlockManifest, type ThemeConfig, type TrustedChecks, ValidationError, acceptResellerInvite, addFavorite, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createTicket, dashboard, shoppex as default, emailPreferences, enrollAsReseller, ensureCartLineId, favorites, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, order, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, removeFavorite, replyToTicket, requestOtp, reseller, resellerApiKeys, resellerCatalog, resellerOrder, resellerOrders, resellerWallet, resetLicenseHwid, resolveDefaults, resolveDisplayStock, resolveStorefrontApiBaseUrl, resolveStorefrontSocialLinks, resolveVariantStockValue, resumeSubscription, revokeAllSessions, revokeSession, searchMergedStorefrontCatalog, searchMergedStorefrontCatalogItems, sessions, shoppex, stripHtmlFromText, submitStorefrontContactTicket, subscriptionBillingHistory, ticket, touchStorefrontPresence, trackCartActivity, trackPageView, updateAvatar, updateEmailPreferences, updateProfile, validateStorefrontCustomFieldValue, verifyOtp, warranties };
|
|
2145
|
+
export { type AffiliateValidation, ApiError, type ApiResponse, type BlockDefinition, type BlockInstance, type BuyerRewardActivityItem, type BuyerRewards, CURRENCY_UNAVAILABLE_ERROR_CODE, type CartAddOptions, type CartAddon, type CartAppliedDiscount, type CartBasketMergeLine, type CartCodeSource, CartError, type CartItem, type CartItemUpdate, type CartLineIdentityInput, type CartMetadata, type CartPayload, type CartQuote, type CartQuoteLine, type CartStats, type Category, CheckoutCreateError, type CheckoutOptions, type CheckoutResult, type CouponValidation, type CouponValidationOptions, type CursorPagination, type CustomFieldDefinition, type CustomerEmailPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerTicketPayload, type EligibleBundleDeal, type EligibleBundleDealProduct, type EligibleCartDeal, type Feedback, type Invoice, type InvoiceProduct, type Menu, type MenuItem, NetworkError, NotInitializedError, PRODUCT_FILTER_UNSUPPORTED, type Page, type PageLayout, type PriceVariant, type Product, type ProductAddon, type ProductBundle, type ProductBundleProduct, type ProductCategory, type ProductDescriptionTab, type ProductFaq, type ProductFeedback, type ProductGroup, type ProductImage, type ProductVariant, type PublishedBuilderSettings, type PublishedThemeSettingsPayload, type ResellerCatalogQuery, type ResellerOrderItem, type ResellerOrdersQuery, type ResolvedThemeSettings, type RewardActionType, type RewardGrantStatus, type RewardProgramSummary, type RewardProgramTeaserItem, type RewardReason, type SDKResponse, type SearchOptions, type SectionDefinition, type SettingField, type Shop, type ShopFeedback, type ShopReviewsPage, type ShopReviewsSummary, type ShopTheme, type ShoppexConfig, ShoppexError, type ShoppexInitOptions, type StorefrontAddon, type StorefrontAddonBootstrap, type StorefrontAnnouncementBarAddon, type StorefrontCatalogSearchItem, type StorefrontContactTicketInput, type StorefrontContactTicketResult, type StorefrontCountdownBarAddon, type StorefrontCouponPopupModalAddon, type StorefrontCustomField, type StorefrontData, type StorefrontItem, type StorefrontOnlineUsers, type StorefrontPromoInfoCardAddon, type StorefrontRecentPurchasePopupAddon, type StorefrontRecentSaleEntry, type StorefrontRecentSales, type StorefrontSearchFilterOptions, type StorefrontSocialLinks, type Subscription, type SubscriptionFlags, type SubscriptionInterval, type ThemeBlockManifest, type ThemeConfig, type TrustedChecks, ValidationError, acceptResellerInvite, addFavorite, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createTicket, dashboard, shoppex as default, emailPreferences, enrollAsReseller, ensureCartLineId, favorites, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, order, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, removeFavorite, replyToTicket, requestOtp, reseller, resellerApiKeys, resellerCatalog, resellerOrder, resellerOrders, resellerWallet, resetLicenseHwid, resolveDefaults, resolveDisplayStock, resolveStorefrontApiBaseUrl, resolveStorefrontSocialLinks, resolveVariantStockValue, resumeSubscription, revokeAllSessions, revokeSession, searchMergedStorefrontCatalog, searchMergedStorefrontCatalogItems, sessions, shoppex, stripHtmlFromText, submitStorefrontContactTicket, subscriptionBillingHistory, ticket, touchStorefrontPresence, trackCartActivity, trackPageView, updateAvatar, updateEmailPreferences, updateProfile, validateStorefrontCustomFieldValue, verifyOtp, warranties };
|
package/dist/index.d.ts
CHANGED
|
@@ -155,6 +155,12 @@ interface Shop {
|
|
|
155
155
|
feedback?: ShopFeedback;
|
|
156
156
|
trusted_checks?: TrustedChecks | null;
|
|
157
157
|
available_gateways?: string[];
|
|
158
|
+
payment_methods?: Array<{
|
|
159
|
+
id: string;
|
|
160
|
+
label: string;
|
|
161
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
162
|
+
}>;
|
|
163
|
+
stock_alerts_enabled?: boolean;
|
|
158
164
|
payment_gateways_fees?: unknown[];
|
|
159
165
|
reward_program_summary?: RewardProgramSummary | null;
|
|
160
166
|
}
|
|
@@ -221,6 +227,20 @@ interface Product {
|
|
|
221
227
|
title: string;
|
|
222
228
|
slug?: string | null;
|
|
223
229
|
description?: string | null;
|
|
230
|
+
/** One plain-text line the merchant wrote for under the title; null when unset. */
|
|
231
|
+
short_description?: string | null;
|
|
232
|
+
/** The merchant's word for one / several delivered units of a SERIALS product ("License key"); null when unset. */
|
|
233
|
+
label_singular?: string | null;
|
|
234
|
+
label_plural?: string | null;
|
|
235
|
+
/**
|
|
236
|
+
* The merchant's explicit service status for storefront `/status` pages; null
|
|
237
|
+
* when they set none (the product is then not listed there).
|
|
238
|
+
*/
|
|
239
|
+
service_status?: {
|
|
240
|
+
state: 'operational' | 'updating' | 'detected' | 'offline';
|
|
241
|
+
note: string | null;
|
|
242
|
+
updated_at: string;
|
|
243
|
+
} | null;
|
|
224
244
|
/** Merchant-defined description tabs; present when the shop configured them. */
|
|
225
245
|
description_tabs?: ProductDescriptionTab[];
|
|
226
246
|
product_highlights?: string[];
|
|
@@ -409,6 +429,8 @@ interface PriceVariant {
|
|
|
409
429
|
id: string;
|
|
410
430
|
label?: string;
|
|
411
431
|
title?: string;
|
|
432
|
+
/** The merchant's one-line note on this option ("1 seat"); absent when unset. */
|
|
433
|
+
description?: string;
|
|
412
434
|
price: number;
|
|
413
435
|
/**
|
|
414
436
|
* RAW local stock for this price variant only. `-1` (or any negative value)
|
|
@@ -487,6 +509,13 @@ interface ShopReviewsPage {
|
|
|
487
509
|
feedback: Feedback[];
|
|
488
510
|
pagination: CursorPagination;
|
|
489
511
|
summary: ShopReviewsSummary;
|
|
512
|
+
/**
|
|
513
|
+
* The product filter the API applied (the `product` passed in), or null for
|
|
514
|
+
* the whole shop. `getShopReviewsPage` fails a filtered request whose answer
|
|
515
|
+
* does not carry the same id, so a caller never gets another product's
|
|
516
|
+
* reviews from an API that ignored the filter.
|
|
517
|
+
*/
|
|
518
|
+
product?: string | null;
|
|
490
519
|
}
|
|
491
520
|
interface ProductBundle {
|
|
492
521
|
id?: string;
|
|
@@ -1701,6 +1730,8 @@ declare function validateCoupon(code: string, productOrOptions?: string | Coupon
|
|
|
1701
1730
|
* Note: Shoppex has shop-level feedback, not product-level reviews.
|
|
1702
1731
|
*/
|
|
1703
1732
|
|
|
1733
|
+
/** `code` of a filtered request the API answered without applying the filter. */
|
|
1734
|
+
declare const PRODUCT_FILTER_UNSUPPORTED = "reviews_product_filter_unsupported";
|
|
1704
1735
|
interface ShopReviewsPageOptions {
|
|
1705
1736
|
/**
|
|
1706
1737
|
* One product's reviews, by the product's public id (the `id` the catalog
|
|
@@ -2111,4 +2142,4 @@ declare const shoppex: {
|
|
|
2111
2142
|
mergeSettings: typeof mergeSettings;
|
|
2112
2143
|
};
|
|
2113
2144
|
|
|
2114
|
-
export { type AffiliateValidation, ApiError, type ApiResponse, type BlockDefinition, type BlockInstance, type BuyerRewardActivityItem, type BuyerRewards, CURRENCY_UNAVAILABLE_ERROR_CODE, type CartAddOptions, type CartAddon, type CartAppliedDiscount, type CartBasketMergeLine, type CartCodeSource, CartError, type CartItem, type CartItemUpdate, type CartLineIdentityInput, type CartMetadata, type CartPayload, type CartQuote, type CartQuoteLine, type CartStats, type Category, CheckoutCreateError, type CheckoutOptions, type CheckoutResult, type CouponValidation, type CouponValidationOptions, type CursorPagination, type CustomFieldDefinition, type CustomerEmailPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerTicketPayload, type EligibleBundleDeal, type EligibleBundleDealProduct, type EligibleCartDeal, type Feedback, type Invoice, type InvoiceProduct, type Menu, type MenuItem, NetworkError, NotInitializedError, type Page, type PageLayout, type PriceVariant, type Product, type ProductAddon, type ProductBundle, type ProductBundleProduct, type ProductCategory, type ProductDescriptionTab, type ProductFaq, type ProductFeedback, type ProductGroup, type ProductImage, type ProductVariant, type PublishedBuilderSettings, type PublishedThemeSettingsPayload, type ResellerCatalogQuery, type ResellerOrderItem, type ResellerOrdersQuery, type ResolvedThemeSettings, type RewardActionType, type RewardGrantStatus, type RewardProgramSummary, type RewardProgramTeaserItem, type RewardReason, type SDKResponse, type SearchOptions, type SectionDefinition, type SettingField, type Shop, type ShopFeedback, type ShopReviewsPage, type ShopReviewsSummary, type ShopTheme, type ShoppexConfig, ShoppexError, type ShoppexInitOptions, type StorefrontAddon, type StorefrontAddonBootstrap, type StorefrontAnnouncementBarAddon, type StorefrontCatalogSearchItem, type StorefrontContactTicketInput, type StorefrontContactTicketResult, type StorefrontCountdownBarAddon, type StorefrontCouponPopupModalAddon, type StorefrontCustomField, type StorefrontData, type StorefrontItem, type StorefrontOnlineUsers, type StorefrontPromoInfoCardAddon, type StorefrontRecentPurchasePopupAddon, type StorefrontRecentSaleEntry, type StorefrontRecentSales, type StorefrontSearchFilterOptions, type StorefrontSocialLinks, type Subscription, type SubscriptionFlags, type SubscriptionInterval, type ThemeBlockManifest, type ThemeConfig, type TrustedChecks, ValidationError, acceptResellerInvite, addFavorite, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createTicket, dashboard, shoppex as default, emailPreferences, enrollAsReseller, ensureCartLineId, favorites, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, order, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, removeFavorite, replyToTicket, requestOtp, reseller, resellerApiKeys, resellerCatalog, resellerOrder, resellerOrders, resellerWallet, resetLicenseHwid, resolveDefaults, resolveDisplayStock, resolveStorefrontApiBaseUrl, resolveStorefrontSocialLinks, resolveVariantStockValue, resumeSubscription, revokeAllSessions, revokeSession, searchMergedStorefrontCatalog, searchMergedStorefrontCatalogItems, sessions, shoppex, stripHtmlFromText, submitStorefrontContactTicket, subscriptionBillingHistory, ticket, touchStorefrontPresence, trackCartActivity, trackPageView, updateAvatar, updateEmailPreferences, updateProfile, validateStorefrontCustomFieldValue, verifyOtp, warranties };
|
|
2145
|
+
export { type AffiliateValidation, ApiError, type ApiResponse, type BlockDefinition, type BlockInstance, type BuyerRewardActivityItem, type BuyerRewards, CURRENCY_UNAVAILABLE_ERROR_CODE, type CartAddOptions, type CartAddon, type CartAppliedDiscount, type CartBasketMergeLine, type CartCodeSource, CartError, type CartItem, type CartItemUpdate, type CartLineIdentityInput, type CartMetadata, type CartPayload, type CartQuote, type CartQuoteLine, type CartStats, type Category, CheckoutCreateError, type CheckoutOptions, type CheckoutResult, type CouponValidation, type CouponValidationOptions, type CursorPagination, type CustomFieldDefinition, type CustomerEmailPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerTicketPayload, type EligibleBundleDeal, type EligibleBundleDealProduct, type EligibleCartDeal, type Feedback, type Invoice, type InvoiceProduct, type Menu, type MenuItem, NetworkError, NotInitializedError, PRODUCT_FILTER_UNSUPPORTED, type Page, type PageLayout, type PriceVariant, type Product, type ProductAddon, type ProductBundle, type ProductBundleProduct, type ProductCategory, type ProductDescriptionTab, type ProductFaq, type ProductFeedback, type ProductGroup, type ProductImage, type ProductVariant, type PublishedBuilderSettings, type PublishedThemeSettingsPayload, type ResellerCatalogQuery, type ResellerOrderItem, type ResellerOrdersQuery, type ResolvedThemeSettings, type RewardActionType, type RewardGrantStatus, type RewardProgramSummary, type RewardProgramTeaserItem, type RewardReason, type SDKResponse, type SearchOptions, type SectionDefinition, type SettingField, type Shop, type ShopFeedback, type ShopReviewsPage, type ShopReviewsSummary, type ShopTheme, type ShoppexConfig, ShoppexError, type ShoppexInitOptions, type StorefrontAddon, type StorefrontAddonBootstrap, type StorefrontAnnouncementBarAddon, type StorefrontCatalogSearchItem, type StorefrontContactTicketInput, type StorefrontContactTicketResult, type StorefrontCountdownBarAddon, type StorefrontCouponPopupModalAddon, type StorefrontCustomField, type StorefrontData, type StorefrontItem, type StorefrontOnlineUsers, type StorefrontPromoInfoCardAddon, type StorefrontRecentPurchasePopupAddon, type StorefrontRecentSaleEntry, type StorefrontRecentSales, type StorefrontSearchFilterOptions, type StorefrontSocialLinks, type Subscription, type SubscriptionFlags, type SubscriptionInterval, type ThemeBlockManifest, type ThemeConfig, type TrustedChecks, ValidationError, acceptResellerInvite, addFavorite, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createTicket, dashboard, shoppex as default, emailPreferences, enrollAsReseller, ensureCartLineId, favorites, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, order, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, removeFavorite, replyToTicket, requestOtp, reseller, resellerApiKeys, resellerCatalog, resellerOrder, resellerOrders, resellerWallet, resetLicenseHwid, resolveDefaults, resolveDisplayStock, resolveStorefrontApiBaseUrl, resolveStorefrontSocialLinks, resolveVariantStockValue, resumeSubscription, revokeAllSessions, revokeSession, searchMergedStorefrontCatalog, searchMergedStorefrontCatalogItems, sessions, shoppex, stripHtmlFromText, submitStorefrontContactTicket, subscriptionBillingHistory, ticket, touchStorefrontPresence, trackCartActivity, trackPageView, updateAvatar, updateEmailPreferences, updateProfile, validateStorefrontCustomFieldValue, verifyOtp, warranties };
|
package/dist/index.js
CHANGED
|
@@ -5372,6 +5372,7 @@ function normalizeFeedback(raw, index) {
|
|
|
5372
5372
|
created_at
|
|
5373
5373
|
};
|
|
5374
5374
|
}
|
|
5375
|
+
var PRODUCT_FILTER_UNSUPPORTED = "reviews_product_filter_unsupported";
|
|
5375
5376
|
async function getShopReviewsPage(cursor, options = {}) {
|
|
5376
5377
|
const config = getConfig();
|
|
5377
5378
|
const query = new URLSearchParams();
|
|
@@ -5397,6 +5398,15 @@ async function getShopReviewsPage(cursor, options = {}) {
|
|
|
5397
5398
|
}
|
|
5398
5399
|
);
|
|
5399
5400
|
if (response.success && response.data) {
|
|
5401
|
+
if (product && response.data.product !== product) {
|
|
5402
|
+
return {
|
|
5403
|
+
success: false,
|
|
5404
|
+
message: "Reviews for a single product are not available from this store yet.",
|
|
5405
|
+
code: PRODUCT_FILTER_UNSUPPORTED,
|
|
5406
|
+
status: 200,
|
|
5407
|
+
responseReceived: true
|
|
5408
|
+
};
|
|
5409
|
+
}
|
|
5400
5410
|
return {
|
|
5401
5411
|
success: true,
|
|
5402
5412
|
data: {
|
|
@@ -6554,6 +6564,7 @@ export {
|
|
|
6554
6564
|
NetworkError,
|
|
6555
6565
|
NotInitializedError,
|
|
6556
6566
|
PAYABLE_AMOUNT_DECIMAL_PLACES,
|
|
6567
|
+
PRODUCT_FILTER_UNSUPPORTED,
|
|
6557
6568
|
ShoppexError,
|
|
6558
6569
|
ValidationError,
|
|
6559
6570
|
acceptResellerInvite,
|