@shoppexio/storefront 1.0.110 → 1.0.112

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/index.d.cts CHANGED
@@ -714,9 +714,7 @@ interface StorefrontAnnouncementBarAddon {
714
714
  link_label?: string | null;
715
715
  link_url?: string | null;
716
716
  dismissible: boolean;
717
- display_mode: 'static' | 'marquee';
718
- theme_preset: 'brand_blue' | 'emerald' | 'sunset' | 'rose' | 'charcoal' | 'custom';
719
- animation_speed_seconds: number;
717
+ look: 'theme' | 'accent' | 'custom';
720
718
  background_color: string;
721
719
  text_color: string;
722
720
  };
@@ -734,12 +732,9 @@ interface StorefrontCountdownBarAddon {
734
732
  link_label?: string | null;
735
733
  link_url?: string | null;
736
734
  dismissible: boolean;
737
- theme_preset: 'brand_blue' | 'emerald' | 'sunset' | 'rose' | 'charcoal' | 'custom';
735
+ look: 'theme' | 'accent' | 'custom';
738
736
  expired_behavior: 'hide' | 'message';
739
737
  expired_message?: string | null;
740
- density: 'compact' | 'comfortable';
741
- cta_style: 'subtle' | 'outline' | 'solid';
742
- timer_style: 'minimal' | 'boxed';
743
738
  background_color: string;
744
739
  text_color: string;
745
740
  };
@@ -757,12 +752,10 @@ interface StorefrontPromoInfoCardAddon {
757
752
  body: string;
758
753
  link_label?: string | null;
759
754
  link_url?: string | null;
760
- theme_preset: 'indigo' | 'emerald' | 'amber' | 'rose' | 'slate' | 'custom';
755
+ look: 'theme' | 'custom';
761
756
  layout_style: 'compact' | 'feature' | 'alert';
762
- density: 'compact' | 'comfortable';
763
- cta_style: 'subtle' | 'outline' | 'solid';
764
- icon: 'sparkles' | 'megaphone' | 'gift' | 'truck' | 'shield' | 'support' | 'none';
765
- icon_visibility: 'show' | 'hide';
757
+ cta_style: 'link' | 'button';
758
+ icon: 'megaphone' | 'gift' | 'truck' | 'shield' | 'support' | 'none';
766
759
  background_color: string;
767
760
  text_color: string;
768
761
  accent_color: string;
@@ -800,7 +793,7 @@ interface StorefrontCouponPopupModalAddon {
800
793
  primary_button_label: string;
801
794
  secondary_button_label: string;
802
795
  disclaimer?: string | null;
803
- theme_preset: 'midnight' | 'ocean' | 'ember' | 'forest' | 'custom';
796
+ look: 'theme' | 'custom';
804
797
  trigger: 'delay' | 'exit_intent';
805
798
  delay_seconds: number;
806
799
  show_once_per_session: boolean;
@@ -1211,7 +1204,24 @@ declare function validateCartIntegrity(): boolean;
1211
1204
  declare function getCartStats(): CartStats;
1212
1205
  /** @internal — read by checkout(); exported only across module boundaries. */
1213
1206
  declare function getLatestQuoteToken(): string | null;
1214
- declare function quoteCart(coupon?: string, currency?: string): Promise<src.SDKResponse<CartQuote>>;
1207
+ /** The storefront worker's signed-in quote bridge (same origin as the page). */
1208
+ declare const CUSTOMER_CART_QUOTE_PATH = "/dashboard/api/cart-quote";
1209
+ interface QuoteCartOptions {
1210
+ /**
1211
+ * Quote through the storefront worker's same-origin bridge, which adds the
1212
+ * signed-in buyer's session so the server prices their spend-tier discount.
1213
+ * Only a storefront served by Shoppex has it; its identity read
1214
+ * (`/dashboard/api/identity`) names it as `quote_path` for a signed-in buyer.
1215
+ * Omitted, the quote goes to the API as a guest quote, as before.
1216
+ *
1217
+ * PRICING PATH. Quote and checkout must use the same buyer identity: a quote
1218
+ * through this bridge pairs with a checkout through `customerCheckoutPath`,
1219
+ * or `/from-cart` prices the invoice for a guest and refuses it as
1220
+ * `price_increased_since_quote`.
1221
+ */
1222
+ customerQuotePath?: typeof CUSTOMER_CART_QUOTE_PATH;
1223
+ }
1224
+ declare function quoteCart(coupon?: string, currency?: string, options?: QuoteCartOptions): Promise<src.SDKResponse<CartQuote>>;
1215
1225
 
1216
1226
  /**
1217
1227
  * SDK Configuration Management
@@ -2272,4 +2282,4 @@ declare const shoppex: {
2272
2282
  trackProductView: typeof src.trackProductView;
2273
2283
  };
2274
2284
 
2275
- 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 CustomerAffiliateLinkInput, type CustomerEmailPreferencesPatch, type CustomerInvoicePdf, type CustomerNotificationPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerSubscriptionPauseOptions, type CustomerSubscriptionPauseReason, 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, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createAffiliateLink, createTicket, dashboard, shoppex as default, discardTicketImage, emailPreferences, enrollAsReseller, ensureCartLineId, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, invoicePdf, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, notificationPreferences, order, orderReview, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, 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, trackProductView, undoSubscriptionCancel, updateAvatar, updateEmailPreferences, updateNotificationPreferences, updateProfile, uploadTicketImage, validateStorefrontCustomFieldValue, verifyOtp, warranties };
2285
+ 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 CustomerAffiliateLinkInput, type CustomerEmailPreferencesPatch, type CustomerInvoicePdf, type CustomerNotificationPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerSubscriptionPauseOptions, type CustomerSubscriptionPauseReason, 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 QuoteCartOptions, 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, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createAffiliateLink, createTicket, dashboard, shoppex as default, discardTicketImage, emailPreferences, enrollAsReseller, ensureCartLineId, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, invoicePdf, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, notificationPreferences, order, orderReview, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, 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, trackProductView, undoSubscriptionCancel, updateAvatar, updateEmailPreferences, updateNotificationPreferences, updateProfile, uploadTicketImage, validateStorefrontCustomFieldValue, verifyOtp, warranties };
package/dist/index.d.ts CHANGED
@@ -714,9 +714,7 @@ interface StorefrontAnnouncementBarAddon {
714
714
  link_label?: string | null;
715
715
  link_url?: string | null;
716
716
  dismissible: boolean;
717
- display_mode: 'static' | 'marquee';
718
- theme_preset: 'brand_blue' | 'emerald' | 'sunset' | 'rose' | 'charcoal' | 'custom';
719
- animation_speed_seconds: number;
717
+ look: 'theme' | 'accent' | 'custom';
720
718
  background_color: string;
721
719
  text_color: string;
722
720
  };
@@ -734,12 +732,9 @@ interface StorefrontCountdownBarAddon {
734
732
  link_label?: string | null;
735
733
  link_url?: string | null;
736
734
  dismissible: boolean;
737
- theme_preset: 'brand_blue' | 'emerald' | 'sunset' | 'rose' | 'charcoal' | 'custom';
735
+ look: 'theme' | 'accent' | 'custom';
738
736
  expired_behavior: 'hide' | 'message';
739
737
  expired_message?: string | null;
740
- density: 'compact' | 'comfortable';
741
- cta_style: 'subtle' | 'outline' | 'solid';
742
- timer_style: 'minimal' | 'boxed';
743
738
  background_color: string;
744
739
  text_color: string;
745
740
  };
@@ -757,12 +752,10 @@ interface StorefrontPromoInfoCardAddon {
757
752
  body: string;
758
753
  link_label?: string | null;
759
754
  link_url?: string | null;
760
- theme_preset: 'indigo' | 'emerald' | 'amber' | 'rose' | 'slate' | 'custom';
755
+ look: 'theme' | 'custom';
761
756
  layout_style: 'compact' | 'feature' | 'alert';
762
- density: 'compact' | 'comfortable';
763
- cta_style: 'subtle' | 'outline' | 'solid';
764
- icon: 'sparkles' | 'megaphone' | 'gift' | 'truck' | 'shield' | 'support' | 'none';
765
- icon_visibility: 'show' | 'hide';
757
+ cta_style: 'link' | 'button';
758
+ icon: 'megaphone' | 'gift' | 'truck' | 'shield' | 'support' | 'none';
766
759
  background_color: string;
767
760
  text_color: string;
768
761
  accent_color: string;
@@ -800,7 +793,7 @@ interface StorefrontCouponPopupModalAddon {
800
793
  primary_button_label: string;
801
794
  secondary_button_label: string;
802
795
  disclaimer?: string | null;
803
- theme_preset: 'midnight' | 'ocean' | 'ember' | 'forest' | 'custom';
796
+ look: 'theme' | 'custom';
804
797
  trigger: 'delay' | 'exit_intent';
805
798
  delay_seconds: number;
806
799
  show_once_per_session: boolean;
@@ -1211,7 +1204,24 @@ declare function validateCartIntegrity(): boolean;
1211
1204
  declare function getCartStats(): CartStats;
1212
1205
  /** @internal — read by checkout(); exported only across module boundaries. */
1213
1206
  declare function getLatestQuoteToken(): string | null;
1214
- declare function quoteCart(coupon?: string, currency?: string): Promise<src.SDKResponse<CartQuote>>;
1207
+ /** The storefront worker's signed-in quote bridge (same origin as the page). */
1208
+ declare const CUSTOMER_CART_QUOTE_PATH = "/dashboard/api/cart-quote";
1209
+ interface QuoteCartOptions {
1210
+ /**
1211
+ * Quote through the storefront worker's same-origin bridge, which adds the
1212
+ * signed-in buyer's session so the server prices their spend-tier discount.
1213
+ * Only a storefront served by Shoppex has it; its identity read
1214
+ * (`/dashboard/api/identity`) names it as `quote_path` for a signed-in buyer.
1215
+ * Omitted, the quote goes to the API as a guest quote, as before.
1216
+ *
1217
+ * PRICING PATH. Quote and checkout must use the same buyer identity: a quote
1218
+ * through this bridge pairs with a checkout through `customerCheckoutPath`,
1219
+ * or `/from-cart` prices the invoice for a guest and refuses it as
1220
+ * `price_increased_since_quote`.
1221
+ */
1222
+ customerQuotePath?: typeof CUSTOMER_CART_QUOTE_PATH;
1223
+ }
1224
+ declare function quoteCart(coupon?: string, currency?: string, options?: QuoteCartOptions): Promise<src.SDKResponse<CartQuote>>;
1215
1225
 
1216
1226
  /**
1217
1227
  * SDK Configuration Management
@@ -2272,4 +2282,4 @@ declare const shoppex: {
2272
2282
  trackProductView: typeof src.trackProductView;
2273
2283
  };
2274
2284
 
2275
- 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 CustomerAffiliateLinkInput, type CustomerEmailPreferencesPatch, type CustomerInvoicePdf, type CustomerNotificationPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerSubscriptionPauseOptions, type CustomerSubscriptionPauseReason, 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, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createAffiliateLink, createTicket, dashboard, shoppex as default, discardTicketImage, emailPreferences, enrollAsReseller, ensureCartLineId, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, invoicePdf, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, notificationPreferences, order, orderReview, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, 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, trackProductView, undoSubscriptionCancel, updateAvatar, updateEmailPreferences, updateNotificationPreferences, updateProfile, uploadTicketImage, validateStorefrontCustomFieldValue, verifyOtp, warranties };
2285
+ 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 CustomerAffiliateLinkInput, type CustomerEmailPreferencesPatch, type CustomerInvoicePdf, type CustomerNotificationPreferencesPatch, type CustomerProfilePatch, type CustomerSubscriptionCancelOptions, type CustomerSubscriptionPauseOptions, type CustomerSubscriptionPauseReason, 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 QuoteCartOptions, 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, affiliate, affiliateStats, applyForReseller, buildStorefrontContactMessage, buildStorefrontCustomFieldPayload, buildStorefrontProductLookup, cancelSubscription, claimWarranty, collectProductSearchHaystack, computeCartLineId, createAffiliateLink, createTicket, dashboard, shoppex as default, discardTicketImage, emailPreferences, enrollAsReseller, ensureCartLineId, fetchPublishedBuilderSettings, fetchPublishedThemeSettings, filterProductsBySearchQuery, getMenu, getMenuBySlot, getMenuByTitle, getMenuSlotTitles, getMenus, getMergedStorefrontProducts, getShopReviewsPage, getStorefrontGroupProducts, getStorefrontOnlineUsers, getStorefrontRecentSales, groupMatchesSearchQuery, invoicePdf, isProductInStock, isProductOutOfStock, isStorefrontCheckboxCustomFieldValueChecked, isVariantOutOfStock, logout, loyalty, me, mergeSettings, normalizeSearchQuery, normalizeStorefrontCustomFields, notificationPreferences, order, orderReview, orders, pauseSubscription, productMatchesSearchQuery, quoteResellerOrder, redeemLoyaltyPoints, removeAvatar, 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, trackProductView, undoSubscriptionCancel, updateAvatar, updateEmailPreferences, updateNotificationPreferences, updateProfile, uploadTicketImage, validateStorefrontCustomFieldValue, verifyOtp, warranties };
package/dist/index.js CHANGED
@@ -1956,17 +1956,25 @@ function clearLatestQuoteToken() {
1956
1956
  latestQuoteToken = null;
1957
1957
  quoteSequence += 1;
1958
1958
  }
1959
- async function quoteCart(coupon, currency) {
1959
+ var CUSTOMER_CART_QUOTE_PATH = "/dashboard/api/cart-quote";
1960
+ function resolveCartQuoteRequestTarget(options) {
1961
+ if (options?.customerQuotePath === CUSTOMER_CART_QUOTE_PATH && typeof window !== "undefined" && typeof window.location?.origin === "string") {
1962
+ return { endpoint: options.customerQuotePath, baseUrl: window.location.origin };
1963
+ }
1964
+ return { endpoint: "/v1/storefront/cart/quote" };
1965
+ }
1966
+ async function quoteCart(coupon, currency, options) {
1960
1967
  const sequence = quoteSequence += 1;
1961
1968
  const payload = getCartPayload(coupon);
1962
1969
  const normalizedCurrency = normalizeRequestedCurrency(currency) ?? resolveBuyerCurrency(getConfig().currency);
1963
- const response = await post("/v1/storefront/cart/quote", {
1970
+ const target = resolveCartQuoteRequestTarget(options);
1971
+ const response = await post(target.endpoint, {
1964
1972
  shop_slug: payload.store_slug,
1965
1973
  cart: payload.items,
1966
1974
  coupon: payload.coupon,
1967
1975
  affiliate_code: getAmbientAffiliateCodeForQuote() ?? void 0,
1968
1976
  currency: normalizedCurrency ?? void 0
1969
- });
1977
+ }, target.baseUrl ? { baseUrl: target.baseUrl } : void 0);
1970
1978
  if (sequence !== quoteSequence) return response;
1971
1979
  if (response.success) {
1972
1980
  latestQuoteToken = typeof response.data?.quote_token === "string" ? response.data.quote_token : null;