@shoppexio/storefront 1.0.97 → 1.0.100
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 +12 -0
- package/dist/index.cjs +2493 -2490
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -125
- package/dist/index.d.ts +156 -125
- package/dist/index.js +2485 -2482
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
|
+
import * as src from 'src';
|
|
1
2
|
import { NavigationMenuSlot } from '@shoppex/contracts/navigation';
|
|
2
3
|
export { NavigationMenuSlot } from '@shoppex/contracts/navigation';
|
|
3
4
|
import { StorefrontDeliveryType } from '@shoppex/contracts/storefront-delivery-type';
|
|
4
|
-
import * as src from 'src';
|
|
5
5
|
import { createApiClient } from '@shoppex/contracts/api-client';
|
|
6
6
|
import { CustomerWarrantyClaimWire, CustomerPortalAffiliateCreateLinkWire, CustomerPortalDashboardWire, CustomerPortalPaginatedInvoicesWire, CustomerPortalInvoiceDetailWire, CustomerLoyaltyWire, CustomerLoyaltyRedeemWire, CustomerWarrantyListWire, CustomerPortalNotificationPreferencesWire } from '@shoppex/contracts/customer-account-wire';
|
|
7
7
|
export { CATALOG_UNIT_PRICE_DECIMAL_PLACES, CATALOG_UNIT_PRICE_FORMAT_OPTIONS, PAYABLE_AMOUNT_DECIMAL_PLACES, roundPayableAmount } from '@shoppex/contracts/catalog-unit-price';
|
|
8
8
|
|
|
9
|
-
interface CacheStats {
|
|
10
|
-
hits: number;
|
|
11
|
-
misses: number;
|
|
12
|
-
pendingRequests: number;
|
|
13
|
-
entries: number;
|
|
14
|
-
}
|
|
15
|
-
declare function getCacheStats(): CacheStats;
|
|
16
|
-
declare function clearCache(): void;
|
|
17
|
-
declare function invalidateCache(prefixOrKey: string): void;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Formatting Utilities
|
|
21
|
-
*/
|
|
22
|
-
declare function createFormatter(currency?: string, locale?: string): Intl.NumberFormat;
|
|
23
|
-
declare function formatPrice(amount: number | string, currency?: string, locale?: string): string;
|
|
24
|
-
|
|
25
9
|
/**
|
|
26
10
|
* SDK Configuration Types
|
|
27
11
|
*/
|
|
@@ -360,6 +344,16 @@ interface Product {
|
|
|
360
344
|
*/
|
|
361
345
|
addons_required?: boolean;
|
|
362
346
|
price_variants?: PriceVariant[];
|
|
347
|
+
/**
|
|
348
|
+
* The methods every option of this product can be paid with (shop methods
|
|
349
|
+
* narrowed by the product's and its variants' restriction), same shape as
|
|
350
|
+
* `shop.payment_methods`. Only the shop catalog payload carries it.
|
|
351
|
+
*/
|
|
352
|
+
payment_methods?: Array<{
|
|
353
|
+
id: string;
|
|
354
|
+
label: string;
|
|
355
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
356
|
+
}>;
|
|
363
357
|
volume_discounts?: unknown;
|
|
364
358
|
custom_fields?: string | unknown[] | null;
|
|
365
359
|
categories?: ProductCategory[];
|
|
@@ -457,10 +451,14 @@ interface ProductVariant {
|
|
|
457
451
|
is_featured?: boolean;
|
|
458
452
|
isFeatured?: boolean;
|
|
459
453
|
/**
|
|
460
|
-
*
|
|
461
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
462
|
-
*
|
|
454
|
+
* Who may see and buy this option. `private` is sold only through its direct
|
|
455
|
+
* link: the server lists it only on `getProduct(id, { variant })` naming it,
|
|
456
|
+
* never in product lists. `on_hold` is listed but cannot be bought (show it
|
|
457
|
+
* as unavailable, not sold out); the server refuses it in carts and checkout.
|
|
458
|
+
* Absent on servers older than variant visibility.
|
|
463
459
|
*/
|
|
460
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
461
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
464
462
|
is_private?: boolean;
|
|
465
463
|
/** License validity in days for this option. Zero means lifetime. */
|
|
466
464
|
license_period?: number | null;
|
|
@@ -521,10 +519,14 @@ interface PriceVariant {
|
|
|
521
519
|
is_featured?: boolean;
|
|
522
520
|
isFeatured?: boolean;
|
|
523
521
|
/**
|
|
524
|
-
*
|
|
525
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
526
|
-
*
|
|
522
|
+
* Who may see and buy this option. `private` is sold only through its direct
|
|
523
|
+
* link: the server lists it only on `getProduct(id, { variant })` naming it,
|
|
524
|
+
* never in product lists. `on_hold` is listed but cannot be bought (show it
|
|
525
|
+
* as unavailable, not sold out); the server refuses it in carts and checkout.
|
|
526
|
+
* Absent on servers older than variant visibility.
|
|
527
527
|
*/
|
|
528
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
529
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
528
530
|
is_private?: boolean;
|
|
529
531
|
/** License validity in days for this option. Zero means lifetime. */
|
|
530
532
|
license_period?: number | null;
|
|
@@ -1153,6 +1155,17 @@ interface CartQuote {
|
|
|
1153
1155
|
eligible_bundle_deals: EligibleBundleDeal[];
|
|
1154
1156
|
/** Per-line effective bounds and sellability — see CartQuoteLine. Absent on older backends. */
|
|
1155
1157
|
lines?: CartQuoteLine[];
|
|
1158
|
+
/**
|
|
1159
|
+
* The methods this cart can be paid with, in `shop.payment_methods` shape:
|
|
1160
|
+
* the shop's methods narrowed by every line's product restriction, the same
|
|
1161
|
+
* rule checkout applies. Draw the cart's "Pay with" row from this, not from
|
|
1162
|
+
* the shop list. Absent on older backends.
|
|
1163
|
+
*/
|
|
1164
|
+
payment_methods?: Array<{
|
|
1165
|
+
id: string;
|
|
1166
|
+
label: string;
|
|
1167
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
1168
|
+
}>;
|
|
1156
1169
|
/**
|
|
1157
1170
|
* TRUE when this cart already exceeds the shop's configured checkout maximum.
|
|
1158
1171
|
*
|
|
@@ -1182,6 +1195,86 @@ interface CartStats {
|
|
|
1182
1195
|
total_price_is_estimate: boolean;
|
|
1183
1196
|
}
|
|
1184
1197
|
|
|
1198
|
+
declare function getCartCoupon(): string | null;
|
|
1199
|
+
declare function getCartCouponSource(): CartCodeSource | null;
|
|
1200
|
+
declare function setCartCoupon(coupon: string | null | undefined, source?: CartCodeSource): string | null;
|
|
1201
|
+
declare function clearCartCoupon(): void;
|
|
1202
|
+
declare function getCart(): CartItem[];
|
|
1203
|
+
/** Resolve a cart line_id for product+variant. When multiple configs exist, returns the first line. */
|
|
1204
|
+
declare function resolveCartLineId(productId: string, variantId: string, cart?: CartItem[]): string;
|
|
1205
|
+
declare function getCartItemCount(): number;
|
|
1206
|
+
declare function addToCart(productId: string, variantId: string, quantity?: number, options?: CartAddOptions): void;
|
|
1207
|
+
declare function setCartItem(productId: string, variantId: string, quantity?: number, options?: CartAddOptions): void;
|
|
1208
|
+
/**
|
|
1209
|
+
* Patch one cart line.
|
|
1210
|
+
*
|
|
1211
|
+
* TRI-STATE BOUNDS: `min_quantity`/`max_quantity` accept `null` to DELETE the
|
|
1212
|
+
* stored bound — see {@link CartItemUpdate}. `undefined` (or an absent key)
|
|
1213
|
+
* leaves it alone, which is why a removed ceiling needs its own spelling.
|
|
1214
|
+
*
|
|
1215
|
+
* NO-OP UPDATES DO NOT WRITE. An update that leaves the cart byte-identical
|
|
1216
|
+
* returns without touching storage: no metadata bump, no `version` increment,
|
|
1217
|
+
* and — because the storage write is what other tabs observe — no `storage`
|
|
1218
|
+
* event. Writing anyway made an ineffective heal indistinguishable from a real
|
|
1219
|
+
* cart change, and two tabs healing the same line could hand the event back and
|
|
1220
|
+
* forth indefinitely. Line-shape healing of a legacy stored row is NOT this
|
|
1221
|
+
* function's job: `normalizeCartItems` clamps and repairs on every READ, which
|
|
1222
|
+
* is the chokepoint every access already flows through.
|
|
1223
|
+
*/
|
|
1224
|
+
declare function updateCartItem(lineId: string, updates: CartItemUpdate): void;
|
|
1225
|
+
declare function removeFromCart(lineId: string): void;
|
|
1226
|
+
/**
|
|
1227
|
+
* Discards the cart entirely — and with it the proof that describes it.
|
|
1228
|
+
*
|
|
1229
|
+
* PAYMENT PATH. `latestQuoteToken` is evidence about a specific cart, and this
|
|
1230
|
+
* is the one mutation after which that cart does not exist in any form. Held
|
|
1231
|
+
* across the clear, the proof outlives its subject: a caller that clears and
|
|
1232
|
+
* re-adds (Buy Now REPLACES the cart) hands `/from-cart` a token bound to the
|
|
1233
|
+
* previous cart's hash, which is refused as `quote_token_stale` — a hand-off
|
|
1234
|
+
* dead-ended by a proof nobody asked for. And with no re-quote in between there
|
|
1235
|
+
* is nothing to replace it with, so the retry is refused identically.
|
|
1236
|
+
*
|
|
1237
|
+
* Only this path clears it. Every OTHER mutation turns one cart into another
|
|
1238
|
+
* cart, where a proof that no longer matches is the server's to refuse: it
|
|
1239
|
+
* answers `quote_token_stale`, the surfaces re-quote, and the buyer approves the
|
|
1240
|
+
* new total. Dropping the proof there instead would silently remove the approved
|
|
1241
|
+
* -total ceiling from a checkout that raced the re-quote, which is the failure
|
|
1242
|
+
* the token exists to prevent.
|
|
1243
|
+
*/
|
|
1244
|
+
declare function clearCart(): void;
|
|
1245
|
+
declare function createCartBackup(): void;
|
|
1246
|
+
declare function restoreCartFromBackup(): boolean;
|
|
1247
|
+
declare function mergeBaskets(items: CartBasketMergeLine[]): CartItem[];
|
|
1248
|
+
declare function moveBasketItem(fromProductId: string, fromVariantId: string, toProductId: string, toVariantId: string): void;
|
|
1249
|
+
declare function validateCartIntegrity(): boolean;
|
|
1250
|
+
declare function getCartStats(): CartStats;
|
|
1251
|
+
/** @internal — read by checkout(); exported only across module boundaries. */
|
|
1252
|
+
declare function getLatestQuoteToken(): string | null;
|
|
1253
|
+
declare function quoteCart(coupon?: string, currency?: string): Promise<src.SDKResponse<CartQuote>>;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* SDK Configuration Management
|
|
1257
|
+
*/
|
|
1258
|
+
|
|
1259
|
+
declare function getConfig(): ShoppexConfig;
|
|
1260
|
+
declare function isInitialized(): boolean;
|
|
1261
|
+
|
|
1262
|
+
interface CacheStats {
|
|
1263
|
+
hits: number;
|
|
1264
|
+
misses: number;
|
|
1265
|
+
pendingRequests: number;
|
|
1266
|
+
entries: number;
|
|
1267
|
+
}
|
|
1268
|
+
declare function getCacheStats(): CacheStats;
|
|
1269
|
+
declare function clearCache(): void;
|
|
1270
|
+
declare function invalidateCache(prefixOrKey: string): void;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Formatting Utilities
|
|
1274
|
+
*/
|
|
1275
|
+
declare function createFormatter(currency?: string, locale?: string): Intl.NumberFormat;
|
|
1276
|
+
declare function formatPrice(amount: number | string, currency?: string, locale?: string): string;
|
|
1277
|
+
|
|
1185
1278
|
/**
|
|
1186
1279
|
* Pages Module
|
|
1187
1280
|
*
|
|
@@ -1482,63 +1575,6 @@ declare function buildCheckoutUrl(couponOrOptions?: string | CheckoutOptions, op
|
|
|
1482
1575
|
*/
|
|
1483
1576
|
declare function buildCheckoutUrlSync(): never;
|
|
1484
1577
|
|
|
1485
|
-
declare function getCartCoupon(): string | null;
|
|
1486
|
-
declare function getCartCouponSource(): CartCodeSource | null;
|
|
1487
|
-
declare function setCartCoupon(coupon: string | null | undefined, source?: CartCodeSource): string | null;
|
|
1488
|
-
declare function clearCartCoupon(): void;
|
|
1489
|
-
declare function getCart(): CartItem[];
|
|
1490
|
-
/** Resolve a cart line_id for product+variant. When multiple configs exist, returns the first line. */
|
|
1491
|
-
declare function resolveCartLineId(productId: string, variantId: string, cart?: CartItem[]): string;
|
|
1492
|
-
declare function getCartItemCount(): number;
|
|
1493
|
-
declare function addToCart(productId: string, variantId: string, quantity?: number, options?: CartAddOptions): void;
|
|
1494
|
-
declare function setCartItem(productId: string, variantId: string, quantity?: number, options?: CartAddOptions): void;
|
|
1495
|
-
/**
|
|
1496
|
-
* Patch one cart line.
|
|
1497
|
-
*
|
|
1498
|
-
* TRI-STATE BOUNDS: `min_quantity`/`max_quantity` accept `null` to DELETE the
|
|
1499
|
-
* stored bound — see {@link CartItemUpdate}. `undefined` (or an absent key)
|
|
1500
|
-
* leaves it alone, which is why a removed ceiling needs its own spelling.
|
|
1501
|
-
*
|
|
1502
|
-
* NO-OP UPDATES DO NOT WRITE. An update that leaves the cart byte-identical
|
|
1503
|
-
* returns without touching storage: no metadata bump, no `version` increment,
|
|
1504
|
-
* and — because the storage write is what other tabs observe — no `storage`
|
|
1505
|
-
* event. Writing anyway made an ineffective heal indistinguishable from a real
|
|
1506
|
-
* cart change, and two tabs healing the same line could hand the event back and
|
|
1507
|
-
* forth indefinitely. Line-shape healing of a legacy stored row is NOT this
|
|
1508
|
-
* function's job: `normalizeCartItems` clamps and repairs on every READ, which
|
|
1509
|
-
* is the chokepoint every access already flows through.
|
|
1510
|
-
*/
|
|
1511
|
-
declare function updateCartItem(lineId: string, updates: CartItemUpdate): void;
|
|
1512
|
-
declare function removeFromCart(lineId: string): void;
|
|
1513
|
-
/**
|
|
1514
|
-
* Discards the cart entirely — and with it the proof that describes it.
|
|
1515
|
-
*
|
|
1516
|
-
* PAYMENT PATH. `latestQuoteToken` is evidence about a specific cart, and this
|
|
1517
|
-
* is the one mutation after which that cart does not exist in any form. Held
|
|
1518
|
-
* across the clear, the proof outlives its subject: a caller that clears and
|
|
1519
|
-
* re-adds (Buy Now REPLACES the cart) hands `/from-cart` a token bound to the
|
|
1520
|
-
* previous cart's hash, which is refused as `quote_token_stale` — a hand-off
|
|
1521
|
-
* dead-ended by a proof nobody asked for. And with no re-quote in between there
|
|
1522
|
-
* is nothing to replace it with, so the retry is refused identically.
|
|
1523
|
-
*
|
|
1524
|
-
* Only this path clears it. Every OTHER mutation turns one cart into another
|
|
1525
|
-
* cart, where a proof that no longer matches is the server's to refuse: it
|
|
1526
|
-
* answers `quote_token_stale`, the surfaces re-quote, and the buyer approves the
|
|
1527
|
-
* new total. Dropping the proof there instead would silently remove the approved
|
|
1528
|
-
* -total ceiling from a checkout that raced the re-quote, which is the failure
|
|
1529
|
-
* the token exists to prevent.
|
|
1530
|
-
*/
|
|
1531
|
-
declare function clearCart(): void;
|
|
1532
|
-
declare function createCartBackup(): void;
|
|
1533
|
-
declare function restoreCartFromBackup(): boolean;
|
|
1534
|
-
declare function mergeBaskets(items: CartBasketMergeLine[]): CartItem[];
|
|
1535
|
-
declare function moveBasketItem(fromProductId: string, fromVariantId: string, toProductId: string, toVariantId: string): void;
|
|
1536
|
-
declare function validateCartIntegrity(): boolean;
|
|
1537
|
-
declare function getCartStats(): CartStats;
|
|
1538
|
-
/** @internal — read by checkout(); exported only across module boundaries. */
|
|
1539
|
-
declare function getLatestQuoteToken(): string | null;
|
|
1540
|
-
declare function quoteCart(coupon?: string, currency?: string): Promise<src.SDKResponse<CartQuote>>;
|
|
1541
|
-
|
|
1542
1578
|
/**
|
|
1543
1579
|
* Products Module
|
|
1544
1580
|
*
|
|
@@ -1600,18 +1636,13 @@ declare function getStoreBannerUrl(): Promise<string | null>;
|
|
|
1600
1636
|
type ApiClient = ReturnType<typeof createApiClient>;
|
|
1601
1637
|
/**
|
|
1602
1638
|
* Return a typed OpenAPI client bound to the SDK's configured API base URL.
|
|
1603
|
-
* The client is cached
|
|
1604
|
-
*
|
|
1639
|
+
* The client is cached for the config object it was built from: every init
|
|
1640
|
+
* creates a new config object, so a re-init rebuilds it. Keyed here instead of
|
|
1641
|
+
* reset from `initConfig`, so `core/config.ts` (which every SDK user loads)
|
|
1642
|
+
* does not import this module and its `openapi-fetch` dependency.
|
|
1605
1643
|
*/
|
|
1606
1644
|
declare function getTypedClient(token?: string): ApiClient;
|
|
1607
1645
|
|
|
1608
|
-
/**
|
|
1609
|
-
* SDK Configuration Management
|
|
1610
|
-
*/
|
|
1611
|
-
|
|
1612
|
-
declare function getConfig(): ShoppexConfig;
|
|
1613
|
-
declare function isInitialized(): boolean;
|
|
1614
|
-
|
|
1615
1646
|
/**
|
|
1616
1647
|
* SDK Error Classes
|
|
1617
1648
|
*/
|
|
@@ -2161,14 +2192,6 @@ declare const shoppex: {
|
|
|
2161
2192
|
resellerOrder: typeof resellerOrder;
|
|
2162
2193
|
resellerWallet: typeof resellerWallet;
|
|
2163
2194
|
resellerApiKeys: typeof resellerApiKeys;
|
|
2164
|
-
init: {
|
|
2165
|
-
(storeSlug: string, options?: src.ShoppexInitOptions): void;
|
|
2166
|
-
(options: src.ShoppexInitOptions & {
|
|
2167
|
-
storeId: string;
|
|
2168
|
-
}): void;
|
|
2169
|
-
};
|
|
2170
|
-
isInitialized: typeof isInitialized;
|
|
2171
|
-
getConfig: typeof getConfig;
|
|
2172
2195
|
client: typeof getTypedClient;
|
|
2173
2196
|
getStore: typeof getStore;
|
|
2174
2197
|
getStorefront: typeof getStorefront;
|
|
@@ -2179,38 +2202,12 @@ declare const shoppex: {
|
|
|
2179
2202
|
getStorefrontProductsPage: typeof getStorefrontProductsPage;
|
|
2180
2203
|
getProduct: typeof getProduct;
|
|
2181
2204
|
getCategories: typeof getCategories;
|
|
2182
|
-
getCart: typeof getCart;
|
|
2183
|
-
getCartItemCount: typeof getCartItemCount;
|
|
2184
|
-
getCartCoupon: typeof getCartCoupon;
|
|
2185
|
-
getCartCouponSource: typeof getCartCouponSource;
|
|
2186
|
-
setCartCoupon: typeof setCartCoupon;
|
|
2187
|
-
clearCartCoupon: typeof clearCartCoupon;
|
|
2188
|
-
addToCart: typeof addToCart;
|
|
2189
|
-
setCartItem: typeof setCartItem;
|
|
2190
|
-
updateCartItem: typeof updateCartItem;
|
|
2191
|
-
removeFromCart: typeof removeFromCart;
|
|
2192
|
-
clearCart: typeof clearCart;
|
|
2193
|
-
createCartBackup: typeof createCartBackup;
|
|
2194
|
-
restoreCartFromBackup: typeof restoreCartFromBackup;
|
|
2195
|
-
mergeBaskets: typeof mergeBaskets;
|
|
2196
|
-
moveBasketItem: typeof moveBasketItem;
|
|
2197
|
-
getCartStats: typeof getCartStats;
|
|
2198
|
-
validateCartIntegrity: typeof validateCartIntegrity;
|
|
2199
|
-
quoteCart: typeof quoteCart;
|
|
2200
|
-
getLatestQuoteToken: typeof getLatestQuoteToken;
|
|
2201
|
-
resolveCartLineId: typeof resolveCartLineId;
|
|
2202
2205
|
checkout: typeof checkout;
|
|
2203
2206
|
buildCheckoutUrl: typeof buildCheckoutUrl;
|
|
2204
2207
|
buildCheckoutUrlSync: typeof buildCheckoutUrlSync;
|
|
2205
2208
|
getRequestedCheckoutCurrency: typeof getRequestedCheckoutCurrency;
|
|
2206
|
-
captureAffiliateFromUrl: typeof captureAffiliateFromUrl;
|
|
2207
2209
|
validateAffiliateCode: typeof validateAffiliateCode;
|
|
2208
2210
|
applyAffiliateCode: typeof applyAffiliateCode;
|
|
2209
|
-
getAffiliateCode: typeof getAffiliateCode;
|
|
2210
|
-
getStoredAffiliate: typeof getStoredAffiliate;
|
|
2211
|
-
setAffiliateCode: typeof setAffiliateCode;
|
|
2212
|
-
clearAffiliateCode: typeof clearAffiliateCode;
|
|
2213
|
-
trackAffiliateEvent: typeof trackAffiliateEvent;
|
|
2214
2211
|
validateCoupon: typeof validateCoupon;
|
|
2215
2212
|
getShopReviews: typeof getShopReviews;
|
|
2216
2213
|
getShopReviewsPage: typeof src.getShopReviewsPage;
|
|
@@ -2225,8 +2222,6 @@ declare const shoppex: {
|
|
|
2225
2222
|
getMenuBySlot: typeof src.getMenuBySlot;
|
|
2226
2223
|
getMenuByTitle: typeof src.getMenuByTitle;
|
|
2227
2224
|
getMenuSlotTitles: typeof src.getMenuSlotTitles;
|
|
2228
|
-
trackPageView: typeof src.trackPageView;
|
|
2229
|
-
trackCartActivity: typeof src.trackCartActivity;
|
|
2230
2225
|
getStorefrontOnlineUsers: typeof src.getStorefrontOnlineUsers;
|
|
2231
2226
|
getStorefrontRecentSales: typeof src.getStorefrontRecentSales;
|
|
2232
2227
|
touchStorefrontPresence: typeof src.touchStorefrontPresence;
|
|
@@ -2239,6 +2234,42 @@ declare const shoppex: {
|
|
|
2239
2234
|
fetchPublishedThemeSettings: typeof src.fetchPublishedThemeSettings;
|
|
2240
2235
|
resolveDefaults: typeof src.resolveDefaults;
|
|
2241
2236
|
mergeSettings: typeof src.mergeSettings;
|
|
2237
|
+
init: {
|
|
2238
|
+
(storeSlug: string, options?: src.ShoppexInitOptions): void;
|
|
2239
|
+
(options: src.ShoppexInitOptions & {
|
|
2240
|
+
storeId: string;
|
|
2241
|
+
}): void;
|
|
2242
|
+
};
|
|
2243
|
+
isInitialized: typeof isInitialized;
|
|
2244
|
+
getConfig: typeof getConfig;
|
|
2245
|
+
getCart: typeof getCart;
|
|
2246
|
+
getCartItemCount: typeof getCartItemCount;
|
|
2247
|
+
getCartCoupon: typeof getCartCoupon;
|
|
2248
|
+
getCartCouponSource: typeof getCartCouponSource;
|
|
2249
|
+
setCartCoupon: typeof setCartCoupon;
|
|
2250
|
+
clearCartCoupon: typeof clearCartCoupon;
|
|
2251
|
+
addToCart: typeof addToCart;
|
|
2252
|
+
setCartItem: typeof setCartItem;
|
|
2253
|
+
updateCartItem: typeof updateCartItem;
|
|
2254
|
+
removeFromCart: typeof removeFromCart;
|
|
2255
|
+
clearCart: typeof clearCart;
|
|
2256
|
+
createCartBackup: typeof createCartBackup;
|
|
2257
|
+
restoreCartFromBackup: typeof restoreCartFromBackup;
|
|
2258
|
+
mergeBaskets: typeof mergeBaskets;
|
|
2259
|
+
moveBasketItem: typeof moveBasketItem;
|
|
2260
|
+
getCartStats: typeof getCartStats;
|
|
2261
|
+
validateCartIntegrity: typeof validateCartIntegrity;
|
|
2262
|
+
quoteCart: typeof quoteCart;
|
|
2263
|
+
getLatestQuoteToken: typeof getLatestQuoteToken;
|
|
2264
|
+
resolveCartLineId: typeof resolveCartLineId;
|
|
2265
|
+
captureAffiliateFromUrl: typeof captureAffiliateFromUrl;
|
|
2266
|
+
getAffiliateCode: typeof getAffiliateCode;
|
|
2267
|
+
getStoredAffiliate: typeof getStoredAffiliate;
|
|
2268
|
+
setAffiliateCode: typeof setAffiliateCode;
|
|
2269
|
+
clearAffiliateCode: typeof clearAffiliateCode;
|
|
2270
|
+
trackAffiliateEvent: typeof trackAffiliateEvent;
|
|
2271
|
+
trackPageView: typeof src.trackPageView;
|
|
2272
|
+
trackCartActivity: typeof src.trackCartActivity;
|
|
2242
2273
|
};
|
|
2243
2274
|
|
|
2244
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 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, createAffiliateLink, createTicket, dashboard, shoppex as default, emailPreferences, enrollAsReseller, ensureCartLineId, favorites, 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, 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, undoSubscriptionCancel, updateAvatar, updateEmailPreferences, updateNotificationPreferences, updateProfile, validateStorefrontCustomFieldValue, verifyOtp, warranties };
|