@shoppexio/storefront 1.0.81 → 1.0.84

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
@@ -1908,7 +1908,19 @@ declare function getMenu(title: string): Promise<SDKResponse<Menu>>;
1908
1908
  declare function getMenuBySlot(slot: NavigationMenuSlot): Promise<SDKResponse<Menu>>;
1909
1909
  declare function getMenuSlotTitles(slot: NavigationMenuSlot): string[];
1910
1910
 
1911
+ /**
1912
+ * Counts a page view. Call it once per page load or client-side navigation.
1913
+ * Passing the cart also records it for the live visitor map.
1914
+ */
1911
1915
  declare function trackPageView(cartValue?: number, itemCount?: number): Promise<void>;
1916
+ /**
1917
+ * Reports a cart change for the live visitor map without counting a page view
1918
+ * (`event_type: 'presence'`). Use it when the cart changes on a page that was
1919
+ * already counted. A cart state that any tab of this shop already reported is
1920
+ * not sent again, so a cross-tab `storage` echo of a change is not a second
1921
+ * ping.
1922
+ */
1923
+ declare function trackCartActivity(cartValue: number, itemCount: number): Promise<void>;
1912
1924
 
1913
1925
  /**
1914
1926
  * Anonymized recent-sales feed for storefront social proof (product title +
@@ -1917,6 +1929,12 @@ declare function trackPageView(cartValue?: number, itemCount?: number): Promise<
1917
1929
  */
1918
1930
  declare function getStorefrontRecentSales(): Promise<SDKResponse<StorefrontRecentSales>>;
1919
1931
  declare function getStorefrontOnlineUsers(): Promise<SDKResponse<StorefrontOnlineUsers>>;
1932
+ /**
1933
+ * Keeps this visitor's live presence fresh. The ping carries
1934
+ * `event_type: 'presence'`, so the server refreshes the live session without
1935
+ * counting a shop view: an idle tab that touches presence every minute must
1936
+ * not add a view every few minutes. Page views go through `trackPageView()`.
1937
+ */
1920
1938
  declare function touchStorefrontPresence(): Promise<SDKResponse<{
1921
1939
  pong: string;
1922
1940
  }>>;
@@ -2066,6 +2084,7 @@ declare const shoppex: {
2066
2084
  getMenuByTitle: typeof getMenuByTitle;
2067
2085
  getMenuSlotTitles: typeof getMenuSlotTitles;
2068
2086
  trackPageView: typeof trackPageView;
2087
+ trackCartActivity: typeof trackCartActivity;
2069
2088
  getStorefrontOnlineUsers: typeof getStorefrontOnlineUsers;
2070
2089
  getStorefrontRecentSales: typeof getStorefrontRecentSales;
2071
2090
  touchStorefrontPresence: typeof touchStorefrontPresence;
@@ -2080,4 +2099,4 @@ declare const shoppex: {
2080
2099
  mergeSettings: typeof mergeSettings;
2081
2100
  };
2082
2101
 
2083
- 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, trackPageView, updateAvatar, updateEmailPreferences, updateProfile, validateStorefrontCustomFieldValue, verifyOtp, warranties };
2102
+ 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 };
package/dist/index.d.ts CHANGED
@@ -1908,7 +1908,19 @@ declare function getMenu(title: string): Promise<SDKResponse<Menu>>;
1908
1908
  declare function getMenuBySlot(slot: NavigationMenuSlot): Promise<SDKResponse<Menu>>;
1909
1909
  declare function getMenuSlotTitles(slot: NavigationMenuSlot): string[];
1910
1910
 
1911
+ /**
1912
+ * Counts a page view. Call it once per page load or client-side navigation.
1913
+ * Passing the cart also records it for the live visitor map.
1914
+ */
1911
1915
  declare function trackPageView(cartValue?: number, itemCount?: number): Promise<void>;
1916
+ /**
1917
+ * Reports a cart change for the live visitor map without counting a page view
1918
+ * (`event_type: 'presence'`). Use it when the cart changes on a page that was
1919
+ * already counted. A cart state that any tab of this shop already reported is
1920
+ * not sent again, so a cross-tab `storage` echo of a change is not a second
1921
+ * ping.
1922
+ */
1923
+ declare function trackCartActivity(cartValue: number, itemCount: number): Promise<void>;
1912
1924
 
1913
1925
  /**
1914
1926
  * Anonymized recent-sales feed for storefront social proof (product title +
@@ -1917,6 +1929,12 @@ declare function trackPageView(cartValue?: number, itemCount?: number): Promise<
1917
1929
  */
1918
1930
  declare function getStorefrontRecentSales(): Promise<SDKResponse<StorefrontRecentSales>>;
1919
1931
  declare function getStorefrontOnlineUsers(): Promise<SDKResponse<StorefrontOnlineUsers>>;
1932
+ /**
1933
+ * Keeps this visitor's live presence fresh. The ping carries
1934
+ * `event_type: 'presence'`, so the server refreshes the live session without
1935
+ * counting a shop view: an idle tab that touches presence every minute must
1936
+ * not add a view every few minutes. Page views go through `trackPageView()`.
1937
+ */
1920
1938
  declare function touchStorefrontPresence(): Promise<SDKResponse<{
1921
1939
  pong: string;
1922
1940
  }>>;
@@ -2066,6 +2084,7 @@ declare const shoppex: {
2066
2084
  getMenuByTitle: typeof getMenuByTitle;
2067
2085
  getMenuSlotTitles: typeof getMenuSlotTitles;
2068
2086
  trackPageView: typeof trackPageView;
2087
+ trackCartActivity: typeof trackCartActivity;
2069
2088
  getStorefrontOnlineUsers: typeof getStorefrontOnlineUsers;
2070
2089
  getStorefrontRecentSales: typeof getStorefrontRecentSales;
2071
2090
  touchStorefrontPresence: typeof touchStorefrontPresence;
@@ -2080,4 +2099,4 @@ declare const shoppex: {
2080
2099
  mergeSettings: typeof mergeSettings;
2081
2100
  };
2082
2101
 
2083
- 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, trackPageView, updateAvatar, updateEmailPreferences, updateProfile, validateStorefrontCustomFieldValue, verifyOtp, warranties };
2102
+ 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 };
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  union,
23
23
  unknown,
24
24
  url
25
- } from "./chunk-QNHOMMRG.js";
25
+ } from "./chunk-ROQI7BO6.js";
26
26
 
27
27
  // ../sdk/src/core/errors.ts
28
28
  var CURRENCY_UNAVAILABLE_ERROR_CODE = "errors.storefront.currency_unavailable";
@@ -806,11 +806,13 @@ var CHECKOUT_METHOD_ORDER_KEYS = [
806
806
  "SHOPPEXPAY",
807
807
  "MONEYMOTION",
808
808
  "OVGC",
809
+ "MISTICPAY",
809
810
  "WHOP",
810
811
  "DODO",
811
812
  "MAVERICK",
812
813
  "CASHAPP",
813
814
  "VENMO",
815
+ "REWARBLE",
814
816
  "CRYPTO",
815
817
  "CUSTOMER_BALANCE",
816
818
  "EXTERNAL",
@@ -909,13 +911,15 @@ var FINANCE_GATEWAY_KEYS = [
909
911
  "SHOPPEXPAY",
910
912
  "MONEYMOTION",
911
913
  "OVGC",
914
+ "MISTICPAY",
912
915
  "WHOP",
913
916
  "DODO",
914
917
  "MAVERICK",
915
918
  "VENMO",
916
919
  "MOLLIE",
917
920
  "AUTHORIZENET",
918
- "NMI"
921
+ "NMI",
922
+ "REWARBLE"
919
923
  ];
920
924
  var FINANCE_GATEWAY_KEY_SET = new Set(
921
925
  FINANCE_GATEWAY_KEYS.map((gateway) => normalizeGatewayKey(gateway))
@@ -1259,6 +1263,11 @@ var checkoutStyleSlotValues = [
1259
1263
  "status.processing",
1260
1264
  "status.details",
1261
1265
  "status.wait_hint",
1266
+ // The seller's own wording on a paid order waiting for restock. Styleable but
1267
+ // NOT protected: the sentence that states the mechanics — delivery runs by
1268
+ // itself, nothing to resubmit — is `status.processing` above and stays
1269
+ // whatever a theme does with this one.
1270
+ "status.seller_stock_note",
1262
1271
  // The open order kept its gateway: the buyer is told which one, and why the
1263
1272
  // picker is gone.
1264
1273
  "status.method_locked",
@@ -2098,6 +2107,15 @@ var publicInvoiceWireProductSchema = external_exports.object({
2098
2107
  delivery_instruction_config: external_exports.unknown().optional(),
2099
2108
  delivery_instruction_label: external_exports.unknown().optional(),
2100
2109
  delivery_text: external_exports.string().nullable().optional(),
2110
+ // The seller's own wording for this product's delivery, published by
2111
+ // `InvoiceDataLoader` on every catalog-backed line. This schema strips what
2112
+ // it does not declare, so an undeclared field never reaches the buyer's page
2113
+ // however faithfully the API emits it — the four below are what the
2114
+ // completion page and the awaiting-stock card read.
2115
+ label_singular: external_exports.string().nullable().optional(),
2116
+ label_plural: external_exports.string().nullable().optional(),
2117
+ thank_you_message: external_exports.string().nullable().optional(),
2118
+ out_of_stock_message: external_exports.string().nullable().optional(),
2101
2119
  // Delivery wait as a bare COUNT. `0` and `null` both mean instant (the
2102
2120
  // digital-goods default); a positive value is a "within N <unit>" promise.
2103
2121
  delivery_time: external_exports.number().nullable().optional(),
@@ -2180,6 +2198,11 @@ var customerBalanceSchema = external_exports.object({
2180
2198
  available: external_exports.string(),
2181
2199
  currency: external_exports.string()
2182
2200
  });
2201
+ var voucherStoreCreditSchema = external_exports.object({
2202
+ gateway: external_exports.literal("REWARBLE"),
2203
+ amount: external_exports.string(),
2204
+ currency: external_exports.string()
2205
+ });
2183
2206
  var pricingBreakdownSchema = external_exports.object({
2184
2207
  affiliate_code: external_exports.string().nullable().optional(),
2185
2208
  already_paid: stringOrNumberSchema.nullable().optional(),
@@ -2436,6 +2459,7 @@ var publicInvoiceWireSchema = external_exports.object({
2436
2459
  custom_gateways: external_exports.array(customGatewaySchema).optional(),
2437
2460
  external_payment_adapters: external_exports.array(externalPaymentAdapterSchema).optional(),
2438
2461
  customer_balance: customerBalanceSchema.nullable().optional(),
2462
+ voucher_store_credit: voucherStoreCreditSchema.nullable().optional(),
2439
2463
  customer_email_masked: external_exports.string().nullable().optional(),
2440
2464
  dark_mode: external_exports.union([external_exports.literal(0), external_exports.literal(1)]).optional(),
2441
2465
  delivery: deliverySchema.optional(),
@@ -6032,12 +6056,54 @@ function resolveUtmParameters(storeSlug) {
6032
6056
  return Object.keys(stored).length > 0 ? stored : void 0;
6033
6057
  }
6034
6058
 
6059
+ // ../sdk/src/core/page-path.ts
6060
+ var MAX_PATH_LENGTH = 256;
6061
+ function resolveStorefrontPagePath() {
6062
+ if (typeof window === "undefined") return void 0;
6063
+ let pathname;
6064
+ try {
6065
+ const location = window.location;
6066
+ pathname = typeof location?.pathname === "string" && location.pathname ? location.pathname : new URL(String(location?.href ?? "")).pathname;
6067
+ } catch {
6068
+ return void 0;
6069
+ }
6070
+ if (!pathname || !pathname.startsWith("/")) return void 0;
6071
+ return pathname.slice(0, MAX_PATH_LENGTH);
6072
+ }
6073
+
6074
+ // ../sdk/src/core/page-tracker.ts
6075
+ var PLATFORM_PAGE_TRACKER_FLAG = "__shoppexPageTracker";
6076
+ function isPlatformPageTrackerActive() {
6077
+ if (typeof window === "undefined") return false;
6078
+ try {
6079
+ return Boolean(window[PLATFORM_PAGE_TRACKER_FLAG]);
6080
+ } catch {
6081
+ return false;
6082
+ }
6083
+ }
6084
+
6035
6085
  // ../sdk/src/modules/analytics.ts
6086
+ var REPORTED_CART_STORAGE_PREFIX = "reported_cart_";
6087
+ function reportedCartKey(storeSlug) {
6088
+ return `${REPORTED_CART_STORAGE_PREFIX}${storeSlug}`;
6089
+ }
6090
+ function cartSnapshot(cartValue, itemCount) {
6091
+ return `${cartValue ?? ""}|${itemCount ?? ""}`;
6092
+ }
6093
+ function rememberReportedCart(storeSlug, cartValue, itemCount) {
6094
+ setItem(reportedCartKey(storeSlug), cartSnapshot(cartValue, itemCount));
6095
+ }
6036
6096
  async function trackPageView(cartValue, itemCount) {
6037
6097
  if (!isInitialized()) return;
6038
6098
  if (typeof document === "undefined") return;
6099
+ const carriesCart = cartValue !== void 0 || itemCount !== void 0;
6100
+ if (isPlatformPageTrackerActive()) {
6101
+ if (carriesCart) await sendCartActivity(cartValue ?? 0, itemCount ?? 0);
6102
+ return;
6103
+ }
6039
6104
  const config = getConfig();
6040
6105
  const connectionId = getStorefrontConnectionId(config.storeSlug);
6106
+ if (carriesCart) rememberReportedCart(config.storeSlug, cartValue, itemCount);
6041
6107
  try {
6042
6108
  const endpoint = buildEndpoint("/v1/storefront/shops/:storeSlug/ping", {
6043
6109
  storeSlug: config.storeSlug
@@ -6050,12 +6116,40 @@ async function trackPageView(cartValue, itemCount) {
6050
6116
  cart_value: cartValue ?? void 0,
6051
6117
  item_count: itemCount ?? void 0,
6052
6118
  connection_id: connectionId ?? void 0,
6119
+ path: resolveStorefrontPagePath(),
6053
6120
  utm: resolveUtmParameters(config.storeSlug)
6054
6121
  })
6055
6122
  });
6056
6123
  } catch {
6057
6124
  }
6058
6125
  }
6126
+ async function trackCartActivity(cartValue, itemCount) {
6127
+ if (!isInitialized()) return;
6128
+ if (typeof document === "undefined") return;
6129
+ if (getItem(reportedCartKey(getConfig().storeSlug)) === cartSnapshot(cartValue, itemCount)) return;
6130
+ await sendCartActivity(cartValue, itemCount);
6131
+ }
6132
+ async function sendCartActivity(cartValue, itemCount) {
6133
+ const config = getConfig();
6134
+ rememberReportedCart(config.storeSlug, cartValue, itemCount);
6135
+ try {
6136
+ const endpoint = buildEndpoint("/v1/storefront/shops/:storeSlug/ping", {
6137
+ storeSlug: config.storeSlug
6138
+ });
6139
+ await fetch(`${config.apiBaseUrl}${endpoint}`, {
6140
+ method: "POST",
6141
+ headers: { "Content-Type": "application/json" },
6142
+ body: JSON.stringify({
6143
+ event_type: "presence",
6144
+ cart_value: cartValue,
6145
+ item_count: itemCount,
6146
+ connection_id: getStorefrontConnectionId(config.storeSlug) ?? void 0,
6147
+ path: resolveStorefrontPagePath()
6148
+ })
6149
+ });
6150
+ } catch {
6151
+ }
6152
+ }
6059
6153
 
6060
6154
  // ../sdk/src/modules/presence.ts
6061
6155
  async function getStorefrontRecentSales() {
@@ -6095,6 +6189,9 @@ async function touchStorefrontPresence() {
6095
6189
  if (typeof document === "undefined") {
6096
6190
  return { success: false, message: "Document is not available" };
6097
6191
  }
6192
+ if (isPlatformPageTrackerActive()) {
6193
+ return { success: true, message: "Presence is reported by the storefront page tracker" };
6194
+ }
6098
6195
  const config = getConfig();
6099
6196
  const shopId = getShopId();
6100
6197
  const endpoint = shopId ? buildEndpoint("/v1/storefront/shops/id/:id/ping", { id: shopId }) : buildEndpoint("/v1/storefront/shops/:storeSlug/ping", {
@@ -6103,8 +6200,10 @@ async function touchStorefrontPresence() {
6103
6200
  return post(
6104
6201
  endpoint,
6105
6202
  {
6203
+ event_type: "presence",
6106
6204
  referer: document.referrer || void 0,
6107
6205
  connection_id: getStorefrontConnectionId(config.storeSlug) ?? void 0,
6206
+ path: resolveStorefrontPagePath(),
6108
6207
  utm: resolveUtmParameters(config.storeSlug)
6109
6208
  },
6110
6209
  {
@@ -6321,6 +6420,7 @@ var shoppex = {
6321
6420
  getMenuSlotTitles,
6322
6421
  // Analytics
6323
6422
  trackPageView,
6423
+ trackCartActivity,
6324
6424
  getStorefrontOnlineUsers,
6325
6425
  getStorefrontRecentSales,
6326
6426
  touchStorefrontPresence,
@@ -6434,6 +6534,7 @@ export {
6434
6534
  subscriptionBillingHistory,
6435
6535
  ticket,
6436
6536
  touchStorefrontPresence,
6537
+ trackCartActivity,
6437
6538
  trackPageView,
6438
6539
  updateAvatar,
6439
6540
  updateEmailPreferences,