@behio/storefront-sdk 0.31.1 → 0.32.0

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.
@@ -620,6 +620,14 @@ var CatalogModule = class {
620
620
  async checkGiftCard(code) {
621
621
  return this.client.request("GET", `/catalog/gift-cards/${encodeURIComponent(code)}/check`);
622
622
  }
623
+ /**
624
+ * Buy a gift card (GAP-39): creates a cart-independent order for the chosen
625
+ * amount. Redirect the customer to `paymentRedirectUrl` when present; the
626
+ * code is generated and emailed to the recipient once the order is paid.
627
+ */
628
+ async purchaseGiftCard(input) {
629
+ return this.client.request("POST", "/gift-cards/purchase", { body: input });
630
+ }
623
631
  /** List configured payment methods (filtered by currency). */
624
632
  async listPaymentMethods(opts) {
625
633
  const query = {};
@@ -924,6 +932,17 @@ var OrdersModule = class {
924
932
  headers: { "X-Order-Access": accessToken }
925
933
  });
926
934
  }
935
+ /**
936
+ * Guest digital download (GAP-07): mint a short-lived signed URL for a
937
+ * download grant on a guest-accessed order, using the order-access token from
938
+ * {@link verifyAccessCode}. Scoped to that one order.
939
+ */
940
+ async getAccessDownloadUrl(accessToken, downloadId) {
941
+ return this.client.request("POST", `/orders/access/downloads/${downloadId}/url`, {
942
+ auth: false,
943
+ headers: { "X-Order-Access": accessToken }
944
+ });
945
+ }
927
946
  };
928
947
  var CustomerModule = class {
929
948
  constructor(client) {
@@ -967,6 +986,22 @@ var CustomerModule = class {
967
986
  async getLoyalty() {
968
987
  return this.client.request("GET", "/customer/loyalty");
969
988
  }
989
+ /**
990
+ * Digital product delivery (GAP-07): list the logged-in customer's download
991
+ * grants across all their orders (file name, product, remaining downloads,
992
+ * expiry). Requires an authenticated customer session.
993
+ */
994
+ async getDownloads() {
995
+ return this.client.request("GET", "/customer/downloads");
996
+ }
997
+ /**
998
+ * Mint a short-lived signed URL for one download grant. Counts against the
999
+ * grant's download budget and enforces the max-download + expiry limits
1000
+ * server-side. Requires an authenticated customer session.
1001
+ */
1002
+ async getDownloadUrl(downloadId) {
1003
+ return this.client.request("POST", `/customer/downloads/${downloadId}/url`);
1004
+ }
970
1005
  };
971
1006
  var PagesModule = class {
972
1007
  constructor(client) {
@@ -620,6 +620,14 @@ var CatalogModule = class {
620
620
  async checkGiftCard(code) {
621
621
  return this.client.request("GET", `/catalog/gift-cards/${encodeURIComponent(code)}/check`);
622
622
  }
623
+ /**
624
+ * Buy a gift card (GAP-39): creates a cart-independent order for the chosen
625
+ * amount. Redirect the customer to `paymentRedirectUrl` when present; the
626
+ * code is generated and emailed to the recipient once the order is paid.
627
+ */
628
+ async purchaseGiftCard(input) {
629
+ return this.client.request("POST", "/gift-cards/purchase", { body: input });
630
+ }
623
631
  /** List configured payment methods (filtered by currency). */
624
632
  async listPaymentMethods(opts) {
625
633
  const query = {};
@@ -924,6 +932,17 @@ var OrdersModule = class {
924
932
  headers: { "X-Order-Access": accessToken }
925
933
  });
926
934
  }
935
+ /**
936
+ * Guest digital download (GAP-07): mint a short-lived signed URL for a
937
+ * download grant on a guest-accessed order, using the order-access token from
938
+ * {@link verifyAccessCode}. Scoped to that one order.
939
+ */
940
+ async getAccessDownloadUrl(accessToken, downloadId) {
941
+ return this.client.request("POST", `/orders/access/downloads/${downloadId}/url`, {
942
+ auth: false,
943
+ headers: { "X-Order-Access": accessToken }
944
+ });
945
+ }
927
946
  };
928
947
  var CustomerModule = class {
929
948
  constructor(client) {
@@ -967,6 +986,22 @@ var CustomerModule = class {
967
986
  async getLoyalty() {
968
987
  return this.client.request("GET", "/customer/loyalty");
969
988
  }
989
+ /**
990
+ * Digital product delivery (GAP-07): list the logged-in customer's download
991
+ * grants across all their orders (file name, product, remaining downloads,
992
+ * expiry). Requires an authenticated customer session.
993
+ */
994
+ async getDownloads() {
995
+ return this.client.request("GET", "/customer/downloads");
996
+ }
997
+ /**
998
+ * Mint a short-lived signed URL for one download grant. Counts against the
999
+ * grant's download budget and enforces the max-download + expiry limits
1000
+ * server-side. Requires an authenticated customer session.
1001
+ */
1002
+ async getDownloadUrl(downloadId) {
1003
+ return this.client.request("POST", `/customer/downloads/${downloadId}/url`);
1004
+ }
970
1005
  };
971
1006
  var PagesModule = class {
972
1007
  constructor(client) {
@@ -233,7 +233,15 @@ interface ProductVariant {
233
233
  id: string;
234
234
  sku: string;
235
235
  name: string;
236
- attributes: Record<string, string>;
236
+ /**
237
+ * Axis name/value pairs identifying this variant (e.g.
238
+ * `[{name: 'Barva', value: 'červená'}]`) — matches the wire shape the API
239
+ * actually sends. Join to `ProductDetail.variantAxes` by name + value.
240
+ */
241
+ attributes: Array<{
242
+ name: string;
243
+ value: string;
244
+ }>;
237
245
  /** `null` when prices are gated behind login for guests (B2B mode). */
238
246
  price: ProductPrice | null;
239
247
  inStock: boolean;
@@ -333,6 +341,28 @@ interface ProductMedia {
333
341
  order: number;
334
342
  variants: ProductMediaVariant[];
335
343
  }
344
+ /** One value on a variant axis, with optional merchant-configured swatch data. */
345
+ interface VariantAxisValue {
346
+ /** Human-readable value; matches `variant.attributes[].value` on this axis. */
347
+ value: string;
348
+ /** Hex color for SWATCH_COLOR rendering. */
349
+ swatchColor: string | null;
350
+ /** Image URL for SWATCH_IMAGE rendering. */
351
+ swatchImage: string | null;
352
+ }
353
+ /**
354
+ * A variant axis ("Barva", "Velikost") with the merchant's display
355
+ * configuration. `displayType` is "BUTTON" when the merchant has not
356
+ * configured the axis (the storefront's historical default). Join to
357
+ * `variants[].attributes` by axis `name` + `value`.
358
+ */
359
+ interface VariantAxis {
360
+ name: string;
361
+ displayType: 'DROPDOWN' | 'BUTTON' | 'SWATCH_COLOR' | 'SWATCH_IMAGE';
362
+ order: number;
363
+ /** Values present among the purchasable variants, in admin-defined order. */
364
+ values: VariantAxisValue[];
365
+ }
336
366
  interface ProductDetail extends ProductListItem {
337
367
  longDescription?: string;
338
368
  /** @deprecated Legacy per-listing images. Prefer `media`. */
@@ -349,6 +379,11 @@ interface ProductDetail extends ProductListItem {
349
379
  name: string;
350
380
  }>;
351
381
  variants: ProductVariant[];
382
+ /**
383
+ * Variant axes with display config (dropdown / buttons / swatches).
384
+ * Empty when the product has no variants.
385
+ */
386
+ variantAxes: VariantAxis[];
352
387
  volumePricing: ProductVolumePrice[];
353
388
  customFields: Record<string, unknown>;
354
389
  seo: {
@@ -368,6 +403,11 @@ interface ProductDetail extends ProductListItem {
368
403
  weight?: number | null;
369
404
  /** Weight unit: GRAM, KILOGRAM, TONNE */
370
405
  weightUnit?: string | null;
406
+ /**
407
+ * Digital product delivery (GAP-07): true when the product has at least one
408
+ * active digital asset (PDF, MP3, ...) delivered instantly after purchase.
409
+ */
410
+ isDigital?: boolean;
371
411
  }
372
412
  interface Category {
373
413
  id: string;
@@ -773,6 +813,13 @@ interface OrderDetail extends OrderListItem {
773
813
  fulfillmentStatus: FulfillmentStatus;
774
814
  statusHistory: OrderStatusHistory[];
775
815
  trackingToken?: string;
816
+ /**
817
+ * Digital product delivery (GAP-07): download grants for any digital assets
818
+ * on this order. Populated only for PAID orders; empty otherwise. Mint a
819
+ * short-lived signed URL with `customer.getDownloadUrl(id)` (logged in) or the
820
+ * guest order-access URL flow.
821
+ */
822
+ downloads: DigitalDownload[];
776
823
  /**
777
824
  * For redirect payment gateways (GoPay, ...), the hosted URL the
778
825
  * storefront must send the customer to in order to pay. Present only on
@@ -794,6 +841,46 @@ interface OrderAccessVerifyResponse {
794
841
  expiresIn: number;
795
842
  order: OrderDetail;
796
843
  }
844
+ /**
845
+ * A download grant: the right to fetch one digital asset (PDF, MP3, ...) that
846
+ * a customer purchased. Enforced budget: `downloadCount` of `maxDownloads`
847
+ * (null = unlimited), optional `expiresAt`.
848
+ */
849
+ interface DigitalDownload {
850
+ id: string;
851
+ /** Order this grant originates from (null for legacy/manual grants). */
852
+ orderId: string | null;
853
+ fileName: string;
854
+ /** Localized product name the file belongs to (may be null). */
855
+ productName: string | null;
856
+ /** Product slug for linking back to the PDP (may be null). */
857
+ productSlug: string | null;
858
+ fileSize: number;
859
+ mimeType: string;
860
+ version: string | null;
861
+ downloadCount: number;
862
+ /** Max downloads allowed (null = unlimited). */
863
+ maxDownloads: number | null;
864
+ /** Remaining downloads (null = unlimited). */
865
+ remainingDownloads: number | null;
866
+ lastDownloadAt: number | null;
867
+ /** Access expiry (epoch ms, null = never expires). */
868
+ expiresAt: number | null;
869
+ isExpired: boolean;
870
+ isMaxedOut: boolean;
871
+ createdAt: number;
872
+ }
873
+ /** Short-lived signed URL to fetch a purchased digital file. */
874
+ interface DownloadUrl {
875
+ /** Short-lived (15 min) signed URL. */
876
+ url: string;
877
+ fileName: string;
878
+ mimeType: string;
879
+ fileSize: number;
880
+ /** Remaining downloads after this one is counted (null = unlimited). */
881
+ remainingDownloads: number | null;
882
+ expiresAt: number | null;
883
+ }
797
884
  interface CustomerProfile {
798
885
  id: string;
799
886
  email: string;
@@ -1194,6 +1281,34 @@ interface GiftCardBalance {
1194
1281
  balance: number;
1195
1282
  currency: string;
1196
1283
  }
1284
+ /** Customer gift card purchase (GAP-39): amount + recipient + optional payment method. */
1285
+ interface GiftCardPurchaseInput {
1286
+ /** Gift card value in whole units of the currency (50 to 50000). */
1287
+ amount: number;
1288
+ /** Must be supported by the shop; defaults to the shop default currency. */
1289
+ currency?: string;
1290
+ /** Buyer contact; owns the order and gets the order confirmation. */
1291
+ buyerEmail: string;
1292
+ /** Receives the gift card code once the order is paid. */
1293
+ recipientEmail: string;
1294
+ recipientName?: string;
1295
+ personalMessage?: string;
1296
+ /** Online payment method id (from listPaymentMethods) to start payment right away. */
1297
+ paymentMethodId?: string;
1298
+ locale?: string;
1299
+ }
1300
+ interface GiftCardPurchaseResult {
1301
+ orderId: string;
1302
+ orderNumber: string;
1303
+ grandTotal: number;
1304
+ currency: string;
1305
+ /**
1306
+ * Hosted gateway URL to pay the order, or null (offline method / no method /
1307
+ * gateway init failed). The gift card is generated and emailed to the
1308
+ * recipient only AFTER the order is paid.
1309
+ */
1310
+ paymentRedirectUrl: string | null;
1311
+ }
1197
1312
  interface WishlistItem {
1198
1313
  id: string;
1199
1314
  productId: string;
@@ -1625,6 +1740,12 @@ declare class CatalogModule {
1625
1740
  }>>;
1626
1741
  /** Check a gift card code — returns validity and remaining balance */
1627
1742
  checkGiftCard(code: string): Promise<SdkResult<GiftCardBalance>>;
1743
+ /**
1744
+ * Buy a gift card (GAP-39): creates a cart-independent order for the chosen
1745
+ * amount. Redirect the customer to `paymentRedirectUrl` when present; the
1746
+ * code is generated and emailed to the recipient once the order is paid.
1747
+ */
1748
+ purchaseGiftCard(input: GiftCardPurchaseInput): Promise<SdkResult<GiftCardPurchaseResult>>;
1628
1749
  /** List configured payment methods (filtered by currency). */
1629
1750
  listPaymentMethods(opts?: {
1630
1751
  currency?: string;
@@ -1749,6 +1870,12 @@ declare class OrdersModule {
1749
1870
  * expires after 30 minutes.
1750
1871
  */
1751
1872
  getByAccessToken(accessToken: string): Promise<SdkResult<OrderDetail>>;
1873
+ /**
1874
+ * Guest digital download (GAP-07): mint a short-lived signed URL for a
1875
+ * download grant on a guest-accessed order, using the order-access token from
1876
+ * {@link verifyAccessCode}. Scoped to that one order.
1877
+ */
1878
+ getAccessDownloadUrl(accessToken: string, downloadId: string): Promise<SdkResult<DownloadUrl>>;
1752
1879
  }
1753
1880
  declare class CustomerModule {
1754
1881
  private client;
@@ -1775,6 +1902,20 @@ declare class CustomerModule {
1775
1902
  * recent transactions). Requires an authenticated customer session.
1776
1903
  */
1777
1904
  getLoyalty(): Promise<SdkResult<LoyaltySummary>>;
1905
+ /**
1906
+ * Digital product delivery (GAP-07): list the logged-in customer's download
1907
+ * grants across all their orders (file name, product, remaining downloads,
1908
+ * expiry). Requires an authenticated customer session.
1909
+ */
1910
+ getDownloads(): Promise<SdkResult<{
1911
+ items: DigitalDownload[];
1912
+ }>>;
1913
+ /**
1914
+ * Mint a short-lived signed URL for one download grant. Counts against the
1915
+ * grant's download budget and enforces the max-download + expiry limits
1916
+ * server-side. Requires an authenticated customer session.
1917
+ */
1918
+ getDownloadUrl(downloadId: string): Promise<SdkResult<DownloadUrl>>;
1778
1919
  }
1779
1920
  declare class PagesModule {
1780
1921
  private client;
@@ -1939,4 +2080,4 @@ declare class NewsletterModule {
1939
2080
  unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
1940
2081
  }
1941
2082
 
1942
- export { type BundleItem as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ProductReviewsResponse as D, type SubmitReviewInput as E, type FilterField as F, type GiftCardBalance as G, type ReturnableOrder as H, type ReturnStatus as I, type ReturnRequest as J, type SubmitReturnInput as K, type LoyaltySummary as L, type Menu as M, type NewsletterSubscribeResult as N, type OrderListItem as O, type ProductsQuery as P, type CookieConsent as Q, type RegisterInput as R, type ShopInfo as S, type CookieConsentInput as T, type QuoteRequest as U, type SubmitQuoteInput as V, type WishlistItem as W, type BackInStockSubscription as X, type AddToCartInput as Y, type AuthTokens as Z, BehioApiError as _, BehioStorefront as a, type ShippingQuoteInput as a$, type CartDiscount as a0, type CartItem as a1, type CheckoutAddress as a2, type FulfillmentStatus as a3, type LoginInput as a4, type MessageResponse as a5, type OrderItem as a6, type OrderStatus as a7, type PaymentStatus as a8, type ProductPrice as a9, type MenuItemType as aA, type NewsletterOptInDefault as aB, type OrderStatusHistory as aC, OrderStatuses as aD, type OrderTracking as aE, type PageAttachment as aF, PaymentStatuses as aG, type PickupPointHours as aH, type ProductAvailability as aI, type ProductMedia as aJ, type ProductMediaVariant as aK, ProductSort as aL, type ProductSortValue as aM, type ProductVolumePrice as aN, type QuoteItem as aO, type RegisterResult as aP, type RequestInterceptor as aQ, type RequestInterceptorConfig as aR, type ResponseInterceptor as aS, type ResponseInterceptorData as aT, type ReturnRequestItem as aU, type ReturnStatusItem as aV, type ReturnableOrderItem as aW, type SdkError as aX, type SdkResult as aY, type ShippingMethodSummary as aZ, type ShippingQuote as a_, type ProductReview as aa, type ProductVariant as ab, type AddressType as ac, AddressTypes as ad, type BadgeTone as ae, type BehioErrorCode as af, type BehioEventHandler as ag, type BehioEventType as ah, BehioNetworkError as ai, type CartBundleLine as aj, type CartBundleLineItem as ak, type CartItemProduct as al, type CartPromotion as am, type CheckoutPaymentMethod as an, type CheckoutSettings as ao, type DataGroupFieldType as ap, FulfillmentStatuses as aq, type GiftCardSummary as ar, type LoyaltyBalance as as, type LoyaltyNextTier as at, type LoyaltyProgram as au, type LoyaltyTier as av, type LoyaltyTierPerks as aw, type LoyaltyTransaction as ax, type MenuItem as ay, type MenuItemRef as az, type PaginatedResponse as b, type ShopScript as b0, type ShopScriptPlacement as b1, type ShopScriptType as b2, type StockBehavior as b3, err as b4, ok as b5, toSdkError as b6, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type PickupPointsInput as k, type PickupPoint as l, type NewsletterSubscribeInput as m, type NewsletterUnsubscribeResult as n, type OrderDetail as o, type OrderAccessRequestResponse as p, type OrderAccessVerifyResponse as q, type CheckoutInput as r, type PageDetail as s, type Page as t, type ShopScripts as u, type ShopSeo as v, type Bundle as w, type ProductGroup as x, type CrossSellItem as y, type ActivePromotion as z };
2083
+ export { type BundleItem as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ProductReviewsResponse as D, type SubmitReviewInput as E, type FilterField as F, type GiftCardBalance as G, type ReturnableOrder as H, type ReturnStatus as I, type ReturnRequest as J, type SubmitReturnInput as K, type LoyaltySummary as L, type Menu as M, type NewsletterSubscribeResult as N, type OrderListItem as O, type ProductsQuery as P, type CookieConsent as Q, type RegisterInput as R, type ShopInfo as S, type CookieConsentInput as T, type QuoteRequest as U, type SubmitQuoteInput as V, type WishlistItem as W, type BackInStockSubscription as X, type AddToCartInput as Y, type AuthTokens as Z, BehioApiError as _, BehioStorefront as a, type SdkError as a$, type CartDiscount as a0, type CartItem as a1, type CheckoutAddress as a2, type FulfillmentStatus as a3, type LoginInput as a4, type MessageResponse as a5, type OrderItem as a6, type OrderStatus as a7, type PaymentStatus as a8, type ProductPrice as a9, type LoyaltyTierPerks as aA, type LoyaltyTransaction as aB, type MenuItem as aC, type MenuItemRef as aD, type MenuItemType as aE, type NewsletterOptInDefault as aF, type OrderStatusHistory as aG, OrderStatuses as aH, type OrderTracking as aI, type PageAttachment as aJ, PaymentStatuses as aK, type PickupPointHours as aL, type ProductAvailability as aM, type ProductMedia as aN, type ProductMediaVariant as aO, ProductSort as aP, type ProductSortValue as aQ, type ProductVolumePrice as aR, type QuoteItem as aS, type RegisterResult as aT, type RequestInterceptor as aU, type RequestInterceptorConfig as aV, type ResponseInterceptor as aW, type ResponseInterceptorData as aX, type ReturnRequestItem as aY, type ReturnStatusItem as aZ, type ReturnableOrderItem as a_, type ProductReview as aa, type ProductVariant as ab, type AddressType as ac, AddressTypes as ad, type BadgeTone as ae, type BehioErrorCode as af, type BehioEventHandler as ag, type BehioEventType as ah, BehioNetworkError as ai, type CartBundleLine as aj, type CartBundleLineItem as ak, type CartItemProduct as al, type CartPromotion as am, type CheckoutPaymentMethod as an, type CheckoutSettings as ao, type DataGroupFieldType as ap, type DigitalDownload as aq, type DownloadUrl as ar, FulfillmentStatuses as as, type GiftCardPurchaseInput as at, type GiftCardPurchaseResult as au, type GiftCardSummary as av, type LoyaltyBalance as aw, type LoyaltyNextTier as ax, type LoyaltyProgram as ay, type LoyaltyTier as az, type PaginatedResponse as b, type SdkResult as b0, type ShippingMethodSummary as b1, type ShippingQuote as b2, type ShippingQuoteInput as b3, type ShopScript as b4, type ShopScriptPlacement as b5, type ShopScriptType as b6, type StockBehavior as b7, type VariantAxis as b8, type VariantAxisValue as b9, err as ba, ok as bb, toSdkError as bc, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type PickupPointsInput as k, type PickupPoint as l, type NewsletterSubscribeInput as m, type NewsletterUnsubscribeResult as n, type OrderDetail as o, type OrderAccessRequestResponse as p, type OrderAccessVerifyResponse as q, type CheckoutInput as r, type PageDetail as s, type Page as t, type ShopScripts as u, type ShopSeo as v, type Bundle as w, type ProductGroup as x, type CrossSellItem as y, type ActivePromotion as z };
@@ -233,7 +233,15 @@ interface ProductVariant {
233
233
  id: string;
234
234
  sku: string;
235
235
  name: string;
236
- attributes: Record<string, string>;
236
+ /**
237
+ * Axis name/value pairs identifying this variant (e.g.
238
+ * `[{name: 'Barva', value: 'červená'}]`) — matches the wire shape the API
239
+ * actually sends. Join to `ProductDetail.variantAxes` by name + value.
240
+ */
241
+ attributes: Array<{
242
+ name: string;
243
+ value: string;
244
+ }>;
237
245
  /** `null` when prices are gated behind login for guests (B2B mode). */
238
246
  price: ProductPrice | null;
239
247
  inStock: boolean;
@@ -333,6 +341,28 @@ interface ProductMedia {
333
341
  order: number;
334
342
  variants: ProductMediaVariant[];
335
343
  }
344
+ /** One value on a variant axis, with optional merchant-configured swatch data. */
345
+ interface VariantAxisValue {
346
+ /** Human-readable value; matches `variant.attributes[].value` on this axis. */
347
+ value: string;
348
+ /** Hex color for SWATCH_COLOR rendering. */
349
+ swatchColor: string | null;
350
+ /** Image URL for SWATCH_IMAGE rendering. */
351
+ swatchImage: string | null;
352
+ }
353
+ /**
354
+ * A variant axis ("Barva", "Velikost") with the merchant's display
355
+ * configuration. `displayType` is "BUTTON" when the merchant has not
356
+ * configured the axis (the storefront's historical default). Join to
357
+ * `variants[].attributes` by axis `name` + `value`.
358
+ */
359
+ interface VariantAxis {
360
+ name: string;
361
+ displayType: 'DROPDOWN' | 'BUTTON' | 'SWATCH_COLOR' | 'SWATCH_IMAGE';
362
+ order: number;
363
+ /** Values present among the purchasable variants, in admin-defined order. */
364
+ values: VariantAxisValue[];
365
+ }
336
366
  interface ProductDetail extends ProductListItem {
337
367
  longDescription?: string;
338
368
  /** @deprecated Legacy per-listing images. Prefer `media`. */
@@ -349,6 +379,11 @@ interface ProductDetail extends ProductListItem {
349
379
  name: string;
350
380
  }>;
351
381
  variants: ProductVariant[];
382
+ /**
383
+ * Variant axes with display config (dropdown / buttons / swatches).
384
+ * Empty when the product has no variants.
385
+ */
386
+ variantAxes: VariantAxis[];
352
387
  volumePricing: ProductVolumePrice[];
353
388
  customFields: Record<string, unknown>;
354
389
  seo: {
@@ -368,6 +403,11 @@ interface ProductDetail extends ProductListItem {
368
403
  weight?: number | null;
369
404
  /** Weight unit: GRAM, KILOGRAM, TONNE */
370
405
  weightUnit?: string | null;
406
+ /**
407
+ * Digital product delivery (GAP-07): true when the product has at least one
408
+ * active digital asset (PDF, MP3, ...) delivered instantly after purchase.
409
+ */
410
+ isDigital?: boolean;
371
411
  }
372
412
  interface Category {
373
413
  id: string;
@@ -773,6 +813,13 @@ interface OrderDetail extends OrderListItem {
773
813
  fulfillmentStatus: FulfillmentStatus;
774
814
  statusHistory: OrderStatusHistory[];
775
815
  trackingToken?: string;
816
+ /**
817
+ * Digital product delivery (GAP-07): download grants for any digital assets
818
+ * on this order. Populated only for PAID orders; empty otherwise. Mint a
819
+ * short-lived signed URL with `customer.getDownloadUrl(id)` (logged in) or the
820
+ * guest order-access URL flow.
821
+ */
822
+ downloads: DigitalDownload[];
776
823
  /**
777
824
  * For redirect payment gateways (GoPay, ...), the hosted URL the
778
825
  * storefront must send the customer to in order to pay. Present only on
@@ -794,6 +841,46 @@ interface OrderAccessVerifyResponse {
794
841
  expiresIn: number;
795
842
  order: OrderDetail;
796
843
  }
844
+ /**
845
+ * A download grant: the right to fetch one digital asset (PDF, MP3, ...) that
846
+ * a customer purchased. Enforced budget: `downloadCount` of `maxDownloads`
847
+ * (null = unlimited), optional `expiresAt`.
848
+ */
849
+ interface DigitalDownload {
850
+ id: string;
851
+ /** Order this grant originates from (null for legacy/manual grants). */
852
+ orderId: string | null;
853
+ fileName: string;
854
+ /** Localized product name the file belongs to (may be null). */
855
+ productName: string | null;
856
+ /** Product slug for linking back to the PDP (may be null). */
857
+ productSlug: string | null;
858
+ fileSize: number;
859
+ mimeType: string;
860
+ version: string | null;
861
+ downloadCount: number;
862
+ /** Max downloads allowed (null = unlimited). */
863
+ maxDownloads: number | null;
864
+ /** Remaining downloads (null = unlimited). */
865
+ remainingDownloads: number | null;
866
+ lastDownloadAt: number | null;
867
+ /** Access expiry (epoch ms, null = never expires). */
868
+ expiresAt: number | null;
869
+ isExpired: boolean;
870
+ isMaxedOut: boolean;
871
+ createdAt: number;
872
+ }
873
+ /** Short-lived signed URL to fetch a purchased digital file. */
874
+ interface DownloadUrl {
875
+ /** Short-lived (15 min) signed URL. */
876
+ url: string;
877
+ fileName: string;
878
+ mimeType: string;
879
+ fileSize: number;
880
+ /** Remaining downloads after this one is counted (null = unlimited). */
881
+ remainingDownloads: number | null;
882
+ expiresAt: number | null;
883
+ }
797
884
  interface CustomerProfile {
798
885
  id: string;
799
886
  email: string;
@@ -1194,6 +1281,34 @@ interface GiftCardBalance {
1194
1281
  balance: number;
1195
1282
  currency: string;
1196
1283
  }
1284
+ /** Customer gift card purchase (GAP-39): amount + recipient + optional payment method. */
1285
+ interface GiftCardPurchaseInput {
1286
+ /** Gift card value in whole units of the currency (50 to 50000). */
1287
+ amount: number;
1288
+ /** Must be supported by the shop; defaults to the shop default currency. */
1289
+ currency?: string;
1290
+ /** Buyer contact; owns the order and gets the order confirmation. */
1291
+ buyerEmail: string;
1292
+ /** Receives the gift card code once the order is paid. */
1293
+ recipientEmail: string;
1294
+ recipientName?: string;
1295
+ personalMessage?: string;
1296
+ /** Online payment method id (from listPaymentMethods) to start payment right away. */
1297
+ paymentMethodId?: string;
1298
+ locale?: string;
1299
+ }
1300
+ interface GiftCardPurchaseResult {
1301
+ orderId: string;
1302
+ orderNumber: string;
1303
+ grandTotal: number;
1304
+ currency: string;
1305
+ /**
1306
+ * Hosted gateway URL to pay the order, or null (offline method / no method /
1307
+ * gateway init failed). The gift card is generated and emailed to the
1308
+ * recipient only AFTER the order is paid.
1309
+ */
1310
+ paymentRedirectUrl: string | null;
1311
+ }
1197
1312
  interface WishlistItem {
1198
1313
  id: string;
1199
1314
  productId: string;
@@ -1625,6 +1740,12 @@ declare class CatalogModule {
1625
1740
  }>>;
1626
1741
  /** Check a gift card code — returns validity and remaining balance */
1627
1742
  checkGiftCard(code: string): Promise<SdkResult<GiftCardBalance>>;
1743
+ /**
1744
+ * Buy a gift card (GAP-39): creates a cart-independent order for the chosen
1745
+ * amount. Redirect the customer to `paymentRedirectUrl` when present; the
1746
+ * code is generated and emailed to the recipient once the order is paid.
1747
+ */
1748
+ purchaseGiftCard(input: GiftCardPurchaseInput): Promise<SdkResult<GiftCardPurchaseResult>>;
1628
1749
  /** List configured payment methods (filtered by currency). */
1629
1750
  listPaymentMethods(opts?: {
1630
1751
  currency?: string;
@@ -1749,6 +1870,12 @@ declare class OrdersModule {
1749
1870
  * expires after 30 minutes.
1750
1871
  */
1751
1872
  getByAccessToken(accessToken: string): Promise<SdkResult<OrderDetail>>;
1873
+ /**
1874
+ * Guest digital download (GAP-07): mint a short-lived signed URL for a
1875
+ * download grant on a guest-accessed order, using the order-access token from
1876
+ * {@link verifyAccessCode}. Scoped to that one order.
1877
+ */
1878
+ getAccessDownloadUrl(accessToken: string, downloadId: string): Promise<SdkResult<DownloadUrl>>;
1752
1879
  }
1753
1880
  declare class CustomerModule {
1754
1881
  private client;
@@ -1775,6 +1902,20 @@ declare class CustomerModule {
1775
1902
  * recent transactions). Requires an authenticated customer session.
1776
1903
  */
1777
1904
  getLoyalty(): Promise<SdkResult<LoyaltySummary>>;
1905
+ /**
1906
+ * Digital product delivery (GAP-07): list the logged-in customer's download
1907
+ * grants across all their orders (file name, product, remaining downloads,
1908
+ * expiry). Requires an authenticated customer session.
1909
+ */
1910
+ getDownloads(): Promise<SdkResult<{
1911
+ items: DigitalDownload[];
1912
+ }>>;
1913
+ /**
1914
+ * Mint a short-lived signed URL for one download grant. Counts against the
1915
+ * grant's download budget and enforces the max-download + expiry limits
1916
+ * server-side. Requires an authenticated customer session.
1917
+ */
1918
+ getDownloadUrl(downloadId: string): Promise<SdkResult<DownloadUrl>>;
1778
1919
  }
1779
1920
  declare class PagesModule {
1780
1921
  private client;
@@ -1939,4 +2080,4 @@ declare class NewsletterModule {
1939
2080
  unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
1940
2081
  }
1941
2082
 
1942
- export { type BundleItem as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ProductReviewsResponse as D, type SubmitReviewInput as E, type FilterField as F, type GiftCardBalance as G, type ReturnableOrder as H, type ReturnStatus as I, type ReturnRequest as J, type SubmitReturnInput as K, type LoyaltySummary as L, type Menu as M, type NewsletterSubscribeResult as N, type OrderListItem as O, type ProductsQuery as P, type CookieConsent as Q, type RegisterInput as R, type ShopInfo as S, type CookieConsentInput as T, type QuoteRequest as U, type SubmitQuoteInput as V, type WishlistItem as W, type BackInStockSubscription as X, type AddToCartInput as Y, type AuthTokens as Z, BehioApiError as _, BehioStorefront as a, type ShippingQuoteInput as a$, type CartDiscount as a0, type CartItem as a1, type CheckoutAddress as a2, type FulfillmentStatus as a3, type LoginInput as a4, type MessageResponse as a5, type OrderItem as a6, type OrderStatus as a7, type PaymentStatus as a8, type ProductPrice as a9, type MenuItemType as aA, type NewsletterOptInDefault as aB, type OrderStatusHistory as aC, OrderStatuses as aD, type OrderTracking as aE, type PageAttachment as aF, PaymentStatuses as aG, type PickupPointHours as aH, type ProductAvailability as aI, type ProductMedia as aJ, type ProductMediaVariant as aK, ProductSort as aL, type ProductSortValue as aM, type ProductVolumePrice as aN, type QuoteItem as aO, type RegisterResult as aP, type RequestInterceptor as aQ, type RequestInterceptorConfig as aR, type ResponseInterceptor as aS, type ResponseInterceptorData as aT, type ReturnRequestItem as aU, type ReturnStatusItem as aV, type ReturnableOrderItem as aW, type SdkError as aX, type SdkResult as aY, type ShippingMethodSummary as aZ, type ShippingQuote as a_, type ProductReview as aa, type ProductVariant as ab, type AddressType as ac, AddressTypes as ad, type BadgeTone as ae, type BehioErrorCode as af, type BehioEventHandler as ag, type BehioEventType as ah, BehioNetworkError as ai, type CartBundleLine as aj, type CartBundleLineItem as ak, type CartItemProduct as al, type CartPromotion as am, type CheckoutPaymentMethod as an, type CheckoutSettings as ao, type DataGroupFieldType as ap, FulfillmentStatuses as aq, type GiftCardSummary as ar, type LoyaltyBalance as as, type LoyaltyNextTier as at, type LoyaltyProgram as au, type LoyaltyTier as av, type LoyaltyTierPerks as aw, type LoyaltyTransaction as ax, type MenuItem as ay, type MenuItemRef as az, type PaginatedResponse as b, type ShopScript as b0, type ShopScriptPlacement as b1, type ShopScriptType as b2, type StockBehavior as b3, err as b4, ok as b5, toSdkError as b6, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type PickupPointsInput as k, type PickupPoint as l, type NewsletterSubscribeInput as m, type NewsletterUnsubscribeResult as n, type OrderDetail as o, type OrderAccessRequestResponse as p, type OrderAccessVerifyResponse as q, type CheckoutInput as r, type PageDetail as s, type Page as t, type ShopScripts as u, type ShopSeo as v, type Bundle as w, type ProductGroup as x, type CrossSellItem as y, type ActivePromotion as z };
2083
+ export { type BundleItem as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ProductReviewsResponse as D, type SubmitReviewInput as E, type FilterField as F, type GiftCardBalance as G, type ReturnableOrder as H, type ReturnStatus as I, type ReturnRequest as J, type SubmitReturnInput as K, type LoyaltySummary as L, type Menu as M, type NewsletterSubscribeResult as N, type OrderListItem as O, type ProductsQuery as P, type CookieConsent as Q, type RegisterInput as R, type ShopInfo as S, type CookieConsentInput as T, type QuoteRequest as U, type SubmitQuoteInput as V, type WishlistItem as W, type BackInStockSubscription as X, type AddToCartInput as Y, type AuthTokens as Z, BehioApiError as _, BehioStorefront as a, type SdkError as a$, type CartDiscount as a0, type CartItem as a1, type CheckoutAddress as a2, type FulfillmentStatus as a3, type LoginInput as a4, type MessageResponse as a5, type OrderItem as a6, type OrderStatus as a7, type PaymentStatus as a8, type ProductPrice as a9, type LoyaltyTierPerks as aA, type LoyaltyTransaction as aB, type MenuItem as aC, type MenuItemRef as aD, type MenuItemType as aE, type NewsletterOptInDefault as aF, type OrderStatusHistory as aG, OrderStatuses as aH, type OrderTracking as aI, type PageAttachment as aJ, PaymentStatuses as aK, type PickupPointHours as aL, type ProductAvailability as aM, type ProductMedia as aN, type ProductMediaVariant as aO, ProductSort as aP, type ProductSortValue as aQ, type ProductVolumePrice as aR, type QuoteItem as aS, type RegisterResult as aT, type RequestInterceptor as aU, type RequestInterceptorConfig as aV, type ResponseInterceptor as aW, type ResponseInterceptorData as aX, type ReturnRequestItem as aY, type ReturnStatusItem as aZ, type ReturnableOrderItem as a_, type ProductReview as aa, type ProductVariant as ab, type AddressType as ac, AddressTypes as ad, type BadgeTone as ae, type BehioErrorCode as af, type BehioEventHandler as ag, type BehioEventType as ah, BehioNetworkError as ai, type CartBundleLine as aj, type CartBundleLineItem as ak, type CartItemProduct as al, type CartPromotion as am, type CheckoutPaymentMethod as an, type CheckoutSettings as ao, type DataGroupFieldType as ap, type DigitalDownload as aq, type DownloadUrl as ar, FulfillmentStatuses as as, type GiftCardPurchaseInput as at, type GiftCardPurchaseResult as au, type GiftCardSummary as av, type LoyaltyBalance as aw, type LoyaltyNextTier as ax, type LoyaltyProgram as ay, type LoyaltyTier as az, type PaginatedResponse as b, type SdkResult as b0, type ShippingMethodSummary as b1, type ShippingQuote as b2, type ShippingQuoteInput as b3, type ShopScript as b4, type ShopScriptPlacement as b5, type ShopScriptType as b6, type StockBehavior as b7, type VariantAxis as b8, type VariantAxisValue as b9, err as ba, ok as bb, toSdkError as bc, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type PickupPointsInput as k, type PickupPoint as l, type NewsletterSubscribeInput as m, type NewsletterUnsubscribeResult as n, type OrderDetail as o, type OrderAccessRequestResponse as p, type OrderAccessVerifyResponse as q, type CheckoutInput as r, type PageDetail as s, type Page as t, type ShopScripts as u, type ShopSeo as v, type Bundle as w, type ProductGroup as x, type CrossSellItem as y, type ActivePromotion as z };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { z as ActivePromotion, Y as AddToCartInput, j as AddressDetail, A as AddressSuggestion, ac as AddressType, ad as AddressTypes, Z as AuthTokens, X as BackInStockSubscription, ae as BadgeTone, _ as BehioApiError, af as BehioErrorCode, ag as BehioEventHandler, ah as BehioEventType, ai as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, w as Bundle, $ as BundleItem, g as Cart, aj as CartBundleLine, ak as CartBundleLineItem, a0 as CartDiscount, a1 as CartItem, al as CartItemProduct, am as CartPromotion, C as Category, e as CategoryDetail, a2 as CheckoutAddress, r as CheckoutInput, an as CheckoutPaymentMethod, ao as CheckoutSettings, Q as CookieConsent, T as CookieConsentInput, y as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ap as DataGroupFieldType, F as FilterField, a3 as FulfillmentStatus, aq as FulfillmentStatuses, G as GiftCardBalance, ar as GiftCardSummary, a4 as LoginInput, as as LoyaltyBalance, at as LoyaltyNextTier, au as LoyaltyProgram, L as LoyaltySummary, av as LoyaltyTier, aw as LoyaltyTierPerks, ax as LoyaltyTransaction, M as Menu, ay as MenuItem, az as MenuItemRef, aA as MenuItemType, a5 as MessageResponse, aB as NewsletterOptInDefault, m as NewsletterSubscribeInput, N as NewsletterSubscribeResult, n as NewsletterUnsubscribeResult, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, o as OrderDetail, a6 as OrderItem, O as OrderListItem, a7 as OrderStatus, aC as OrderStatusHistory, aD as OrderStatuses, aE as OrderTracking, t as Page, aF as PageAttachment, s as PageDetail, b as PaginatedResponse, a8 as PaymentStatus, aG as PaymentStatuses, l as PickupPoint, aH as PickupPointHours, k as PickupPointsInput, aI as ProductAvailability, d as ProductDetail, x as ProductGroup, f as ProductLabel, c as ProductListItem, aJ as ProductMedia, aK as ProductMediaVariant, a9 as ProductPrice, aa as ProductReview, D as ProductReviewsResponse, aL as ProductSort, aM as ProductSortValue, ab as ProductVariant, aN as ProductVolumePrice, P as ProductsQuery, aO as QuoteItem, U as QuoteRequest, R as RegisterInput, aP as RegisterResult, aQ as RequestInterceptor, aR as RequestInterceptorConfig, aS as ResponseInterceptor, aT as ResponseInterceptorData, J as ReturnRequest, aU as ReturnRequestItem, I as ReturnStatus, aV as ReturnStatusItem, H as ReturnableOrder, aW as ReturnableOrderItem, aX as SdkError, aY as SdkResult, aZ as ShippingMethodSummary, a_ as ShippingQuote, a$ as ShippingQuoteInput, S as ShopInfo, b0 as ShopScript, b1 as ShopScriptPlacement, b2 as ShopScriptType, u as ShopScripts, v as ShopSeo, b3 as StockBehavior, V as SubmitQuoteInput, K as SubmitReturnInput, E as SubmitReviewInput, W as WishlistItem, b4 as err, b5 as ok, b6 as toSdkError } from './client-D1GZSa-N.mjs';
1
+ export { z as ActivePromotion, Y as AddToCartInput, j as AddressDetail, A as AddressSuggestion, ac as AddressType, ad as AddressTypes, Z as AuthTokens, X as BackInStockSubscription, ae as BadgeTone, _ as BehioApiError, af as BehioErrorCode, ag as BehioEventHandler, ah as BehioEventType, ai as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, w as Bundle, $ as BundleItem, g as Cart, aj as CartBundleLine, ak as CartBundleLineItem, a0 as CartDiscount, a1 as CartItem, al as CartItemProduct, am as CartPromotion, C as Category, e as CategoryDetail, a2 as CheckoutAddress, r as CheckoutInput, an as CheckoutPaymentMethod, ao as CheckoutSettings, Q as CookieConsent, T as CookieConsentInput, y as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ap as DataGroupFieldType, aq as DigitalDownload, ar as DownloadUrl, F as FilterField, a3 as FulfillmentStatus, as as FulfillmentStatuses, G as GiftCardBalance, at as GiftCardPurchaseInput, au as GiftCardPurchaseResult, av as GiftCardSummary, a4 as LoginInput, aw as LoyaltyBalance, ax as LoyaltyNextTier, ay as LoyaltyProgram, L as LoyaltySummary, az as LoyaltyTier, aA as LoyaltyTierPerks, aB as LoyaltyTransaction, M as Menu, aC as MenuItem, aD as MenuItemRef, aE as MenuItemType, a5 as MessageResponse, aF as NewsletterOptInDefault, m as NewsletterSubscribeInput, N as NewsletterSubscribeResult, n as NewsletterUnsubscribeResult, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, o as OrderDetail, a6 as OrderItem, O as OrderListItem, a7 as OrderStatus, aG as OrderStatusHistory, aH as OrderStatuses, aI as OrderTracking, t as Page, aJ as PageAttachment, s as PageDetail, b as PaginatedResponse, a8 as PaymentStatus, aK as PaymentStatuses, l as PickupPoint, aL as PickupPointHours, k as PickupPointsInput, aM as ProductAvailability, d as ProductDetail, x as ProductGroup, f as ProductLabel, c as ProductListItem, aN as ProductMedia, aO as ProductMediaVariant, a9 as ProductPrice, aa as ProductReview, D as ProductReviewsResponse, aP as ProductSort, aQ as ProductSortValue, ab as ProductVariant, aR as ProductVolumePrice, P as ProductsQuery, aS as QuoteItem, U as QuoteRequest, R as RegisterInput, aT as RegisterResult, aU as RequestInterceptor, aV as RequestInterceptorConfig, aW as ResponseInterceptor, aX as ResponseInterceptorData, J as ReturnRequest, aY as ReturnRequestItem, I as ReturnStatus, aZ as ReturnStatusItem, H as ReturnableOrder, a_ as ReturnableOrderItem, a$ as SdkError, b0 as SdkResult, b1 as ShippingMethodSummary, b2 as ShippingQuote, b3 as ShippingQuoteInput, S as ShopInfo, b4 as ShopScript, b5 as ShopScriptPlacement, b6 as ShopScriptType, u as ShopScripts, v as ShopSeo, b7 as StockBehavior, V as SubmitQuoteInput, K as SubmitReturnInput, E as SubmitReviewInput, b8 as VariantAxis, b9 as VariantAxisValue, W as WishlistItem, ba as err, bb as ok, bc as toSdkError } from './client-BOz1trRk.mjs';
2
2
 
3
3
  /**
4
4
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { z as ActivePromotion, Y as AddToCartInput, j as AddressDetail, A as AddressSuggestion, ac as AddressType, ad as AddressTypes, Z as AuthTokens, X as BackInStockSubscription, ae as BadgeTone, _ as BehioApiError, af as BehioErrorCode, ag as BehioEventHandler, ah as BehioEventType, ai as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, w as Bundle, $ as BundleItem, g as Cart, aj as CartBundleLine, ak as CartBundleLineItem, a0 as CartDiscount, a1 as CartItem, al as CartItemProduct, am as CartPromotion, C as Category, e as CategoryDetail, a2 as CheckoutAddress, r as CheckoutInput, an as CheckoutPaymentMethod, ao as CheckoutSettings, Q as CookieConsent, T as CookieConsentInput, y as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ap as DataGroupFieldType, F as FilterField, a3 as FulfillmentStatus, aq as FulfillmentStatuses, G as GiftCardBalance, ar as GiftCardSummary, a4 as LoginInput, as as LoyaltyBalance, at as LoyaltyNextTier, au as LoyaltyProgram, L as LoyaltySummary, av as LoyaltyTier, aw as LoyaltyTierPerks, ax as LoyaltyTransaction, M as Menu, ay as MenuItem, az as MenuItemRef, aA as MenuItemType, a5 as MessageResponse, aB as NewsletterOptInDefault, m as NewsletterSubscribeInput, N as NewsletterSubscribeResult, n as NewsletterUnsubscribeResult, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, o as OrderDetail, a6 as OrderItem, O as OrderListItem, a7 as OrderStatus, aC as OrderStatusHistory, aD as OrderStatuses, aE as OrderTracking, t as Page, aF as PageAttachment, s as PageDetail, b as PaginatedResponse, a8 as PaymentStatus, aG as PaymentStatuses, l as PickupPoint, aH as PickupPointHours, k as PickupPointsInput, aI as ProductAvailability, d as ProductDetail, x as ProductGroup, f as ProductLabel, c as ProductListItem, aJ as ProductMedia, aK as ProductMediaVariant, a9 as ProductPrice, aa as ProductReview, D as ProductReviewsResponse, aL as ProductSort, aM as ProductSortValue, ab as ProductVariant, aN as ProductVolumePrice, P as ProductsQuery, aO as QuoteItem, U as QuoteRequest, R as RegisterInput, aP as RegisterResult, aQ as RequestInterceptor, aR as RequestInterceptorConfig, aS as ResponseInterceptor, aT as ResponseInterceptorData, J as ReturnRequest, aU as ReturnRequestItem, I as ReturnStatus, aV as ReturnStatusItem, H as ReturnableOrder, aW as ReturnableOrderItem, aX as SdkError, aY as SdkResult, aZ as ShippingMethodSummary, a_ as ShippingQuote, a$ as ShippingQuoteInput, S as ShopInfo, b0 as ShopScript, b1 as ShopScriptPlacement, b2 as ShopScriptType, u as ShopScripts, v as ShopSeo, b3 as StockBehavior, V as SubmitQuoteInput, K as SubmitReturnInput, E as SubmitReviewInput, W as WishlistItem, b4 as err, b5 as ok, b6 as toSdkError } from './client-D1GZSa-N.js';
1
+ export { z as ActivePromotion, Y as AddToCartInput, j as AddressDetail, A as AddressSuggestion, ac as AddressType, ad as AddressTypes, Z as AuthTokens, X as BackInStockSubscription, ae as BadgeTone, _ as BehioApiError, af as BehioErrorCode, ag as BehioEventHandler, ah as BehioEventType, ai as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, w as Bundle, $ as BundleItem, g as Cart, aj as CartBundleLine, ak as CartBundleLineItem, a0 as CartDiscount, a1 as CartItem, al as CartItemProduct, am as CartPromotion, C as Category, e as CategoryDetail, a2 as CheckoutAddress, r as CheckoutInput, an as CheckoutPaymentMethod, ao as CheckoutSettings, Q as CookieConsent, T as CookieConsentInput, y as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ap as DataGroupFieldType, aq as DigitalDownload, ar as DownloadUrl, F as FilterField, a3 as FulfillmentStatus, as as FulfillmentStatuses, G as GiftCardBalance, at as GiftCardPurchaseInput, au as GiftCardPurchaseResult, av as GiftCardSummary, a4 as LoginInput, aw as LoyaltyBalance, ax as LoyaltyNextTier, ay as LoyaltyProgram, L as LoyaltySummary, az as LoyaltyTier, aA as LoyaltyTierPerks, aB as LoyaltyTransaction, M as Menu, aC as MenuItem, aD as MenuItemRef, aE as MenuItemType, a5 as MessageResponse, aF as NewsletterOptInDefault, m as NewsletterSubscribeInput, N as NewsletterSubscribeResult, n as NewsletterUnsubscribeResult, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, o as OrderDetail, a6 as OrderItem, O as OrderListItem, a7 as OrderStatus, aG as OrderStatusHistory, aH as OrderStatuses, aI as OrderTracking, t as Page, aJ as PageAttachment, s as PageDetail, b as PaginatedResponse, a8 as PaymentStatus, aK as PaymentStatuses, l as PickupPoint, aL as PickupPointHours, k as PickupPointsInput, aM as ProductAvailability, d as ProductDetail, x as ProductGroup, f as ProductLabel, c as ProductListItem, aN as ProductMedia, aO as ProductMediaVariant, a9 as ProductPrice, aa as ProductReview, D as ProductReviewsResponse, aP as ProductSort, aQ as ProductSortValue, ab as ProductVariant, aR as ProductVolumePrice, P as ProductsQuery, aS as QuoteItem, U as QuoteRequest, R as RegisterInput, aT as RegisterResult, aU as RequestInterceptor, aV as RequestInterceptorConfig, aW as ResponseInterceptor, aX as ResponseInterceptorData, J as ReturnRequest, aY as ReturnRequestItem, I as ReturnStatus, aZ as ReturnStatusItem, H as ReturnableOrder, a_ as ReturnableOrderItem, a$ as SdkError, b0 as SdkResult, b1 as ShippingMethodSummary, b2 as ShippingQuote, b3 as ShippingQuoteInput, S as ShopInfo, b4 as ShopScript, b5 as ShopScriptPlacement, b6 as ShopScriptType, u as ShopScripts, v as ShopSeo, b7 as StockBehavior, V as SubmitQuoteInput, K as SubmitReturnInput, E as SubmitReviewInput, b8 as VariantAxis, b9 as VariantAxisValue, W as WishlistItem, ba as err, bb as ok, bc as toSdkError } from './client-BOz1trRk.js';
2
2
 
3
3
  /**
4
4
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var _chunkJIAOZ5YWjs = require('./chunk-JIAOZ5YW.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkNG46DR3Ajs = require('./chunk-NG46DR3A.js');
17
+ var _chunk5OFVG2BOjs = require('./chunk-5OFVG2BO.js');
18
18
 
19
19
 
20
20
 
@@ -29,4 +29,4 @@ var _chunkNG46DR3Ajs = require('./chunk-NG46DR3A.js');
29
29
 
30
30
 
31
31
 
32
- exports.AddressTypes = _chunkNG46DR3Ajs.AddressTypes; exports.BehioApiError = _chunkNG46DR3Ajs.BehioApiError; exports.BehioNetworkError = _chunkNG46DR3Ajs.BehioNetworkError; exports.BehioStorefront = _chunkNG46DR3Ajs.BehioStorefront; exports.FulfillmentStatuses = _chunkNG46DR3Ajs.FulfillmentStatuses; exports.OrderStatuses = _chunkNG46DR3Ajs.OrderStatuses; exports.PaymentStatuses = _chunkNG46DR3Ajs.PaymentStatuses; exports.ProductSort = _chunkNG46DR3Ajs.ProductSort; exports.err = _chunkNG46DR3Ajs.err; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.ok = _chunkNG46DR3Ajs.ok; exports.toSdkError = _chunkNG46DR3Ajs.toSdkError; exports.trackEcommerceEvent = _chunkJIAOZ5YWjs.trackEcommerceEvent;
32
+ exports.AddressTypes = _chunk5OFVG2BOjs.AddressTypes; exports.BehioApiError = _chunk5OFVG2BOjs.BehioApiError; exports.BehioNetworkError = _chunk5OFVG2BOjs.BehioNetworkError; exports.BehioStorefront = _chunk5OFVG2BOjs.BehioStorefront; exports.FulfillmentStatuses = _chunk5OFVG2BOjs.FulfillmentStatuses; exports.OrderStatuses = _chunk5OFVG2BOjs.OrderStatuses; exports.PaymentStatuses = _chunk5OFVG2BOjs.PaymentStatuses; exports.ProductSort = _chunk5OFVG2BOjs.ProductSort; exports.err = _chunk5OFVG2BOjs.err; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.ok = _chunk5OFVG2BOjs.ok; exports.toSdkError = _chunk5OFVG2BOjs.toSdkError; exports.trackEcommerceEvent = _chunkJIAOZ5YWjs.trackEcommerceEvent;
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  err,
15
15
  ok,
16
16
  toSdkError
17
- } from "./chunk-O7HDB5R4.mjs";
17
+ } from "./chunk-Y7QAB75P.mjs";
18
18
  export {
19
19
  AddressTypes,
20
20
  BehioApiError,
package/dist/next.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-D1GZSa-N.mjs';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-BOz1trRk.mjs';
2
2
 
3
3
  interface GetBehioOptions extends Partial<BehioStorefrontConfig> {
4
4
  /** Override the cart session cookie name (default: "behio_cart_session"). */
package/dist/next.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-D1GZSa-N.js';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-BOz1trRk.js';
2
2
 
3
3
  interface GetBehioOptions extends Partial<BehioStorefrontConfig> {
4
4
  /** Override the cart session cookie name (default: "behio_cart_session"). */
package/dist/next.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkNG46DR3Ajs = require('./chunk-NG46DR3A.js');
3
+ var _chunk5OFVG2BOjs = require('./chunk-5OFVG2BO.js');
4
4
 
5
5
  // src/next.ts
6
6
  var _headers = require('next/headers');
@@ -18,7 +18,7 @@ async function getBehio(options = {}) {
18
18
  const locale = _nullishCoalesce(options.locale, () => ( process.env.BEHIO_LOCALE));
19
19
  const currency = _nullishCoalesce(options.currency, () => ( process.env.BEHIO_CURRENCY));
20
20
  const cookieName = _nullishCoalesce(options.cartCookieName, () => ( CART_COOKIE_NAME));
21
- const client = new (0, _chunkNG46DR3Ajs.BehioStorefront)({
21
+ const client = new (0, _chunk5OFVG2BOjs.BehioStorefront)({
22
22
  apiKey,
23
23
  ...baseUrl ? { baseUrl } : {},
24
24
  ...locale ? { locale } : {},
package/dist/next.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BehioStorefront
3
- } from "./chunk-O7HDB5R4.mjs";
3
+ } from "./chunk-Y7QAB75P.mjs";
4
4
 
5
5
  // src/next.ts
6
6
  import { cookies } from "next/headers";
package/dist/react.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
- import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, L as LoyaltySummary, k as PickupPointsInput, l as PickupPoint, N as NewsletterSubscribeResult, m as NewsletterSubscribeInput, n as NewsletterUnsubscribeResult, O as OrderListItem, o as OrderDetail, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, r as CheckoutInput, s as PageDetail, t as Page, S as ShopInfo, u as ShopScripts, v as ShopSeo, w as Bundle, x as ProductGroup, y as CrossSellItem, z as ActivePromotion, G as GiftCardBalance, W as WishlistItem, D as ProductReviewsResponse, E as SubmitReviewInput, H as ReturnableOrder, I as ReturnStatus, J as ReturnRequest, K as SubmitReturnInput, Q as CookieConsent, T as CookieConsentInput, U as QuoteRequest, V as SubmitQuoteInput, X as BackInStockSubscription } from './client-D1GZSa-N.mjs';
5
- export { Y as AddToCartInput, Z as AuthTokens, _ as BehioApiError, $ as BundleItem, a0 as CartDiscount, a1 as CartItem, a2 as CheckoutAddress, a3 as FulfillmentStatus, a4 as LoginInput, a5 as MessageResponse, a6 as OrderItem, a7 as OrderStatus, a8 as PaymentStatus, a9 as ProductPrice, aa as ProductReview, ab as ProductVariant } from './client-D1GZSa-N.mjs';
4
+ import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, L as LoyaltySummary, k as PickupPointsInput, l as PickupPoint, N as NewsletterSubscribeResult, m as NewsletterSubscribeInput, n as NewsletterUnsubscribeResult, O as OrderListItem, o as OrderDetail, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, r as CheckoutInput, s as PageDetail, t as Page, S as ShopInfo, u as ShopScripts, v as ShopSeo, w as Bundle, x as ProductGroup, y as CrossSellItem, z as ActivePromotion, G as GiftCardBalance, W as WishlistItem, D as ProductReviewsResponse, E as SubmitReviewInput, H as ReturnableOrder, I as ReturnStatus, J as ReturnRequest, K as SubmitReturnInput, Q as CookieConsent, T as CookieConsentInput, U as QuoteRequest, V as SubmitQuoteInput, X as BackInStockSubscription } from './client-BOz1trRk.mjs';
5
+ export { Y as AddToCartInput, Z as AuthTokens, _ as BehioApiError, $ as BundleItem, a0 as CartDiscount, a1 as CartItem, a2 as CheckoutAddress, a3 as FulfillmentStatus, a4 as LoginInput, a5 as MessageResponse, a6 as OrderItem, a7 as OrderStatus, a8 as PaymentStatus, a9 as ProductPrice, aa as ProductReview, ab as ProductVariant } from './client-BOz1trRk.mjs';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  export { EcommerceEventName, EcommerceItem, EcommercePayload, formatPrice, trackEcommerceEvent } from './index.mjs';
8
8
 
package/dist/react.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
- import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, L as LoyaltySummary, k as PickupPointsInput, l as PickupPoint, N as NewsletterSubscribeResult, m as NewsletterSubscribeInput, n as NewsletterUnsubscribeResult, O as OrderListItem, o as OrderDetail, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, r as CheckoutInput, s as PageDetail, t as Page, S as ShopInfo, u as ShopScripts, v as ShopSeo, w as Bundle, x as ProductGroup, y as CrossSellItem, z as ActivePromotion, G as GiftCardBalance, W as WishlistItem, D as ProductReviewsResponse, E as SubmitReviewInput, H as ReturnableOrder, I as ReturnStatus, J as ReturnRequest, K as SubmitReturnInput, Q as CookieConsent, T as CookieConsentInput, U as QuoteRequest, V as SubmitQuoteInput, X as BackInStockSubscription } from './client-D1GZSa-N.js';
5
- export { Y as AddToCartInput, Z as AuthTokens, _ as BehioApiError, $ as BundleItem, a0 as CartDiscount, a1 as CartItem, a2 as CheckoutAddress, a3 as FulfillmentStatus, a4 as LoginInput, a5 as MessageResponse, a6 as OrderItem, a7 as OrderStatus, a8 as PaymentStatus, a9 as ProductPrice, aa as ProductReview, ab as ProductVariant } from './client-D1GZSa-N.js';
4
+ import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, L as LoyaltySummary, k as PickupPointsInput, l as PickupPoint, N as NewsletterSubscribeResult, m as NewsletterSubscribeInput, n as NewsletterUnsubscribeResult, O as OrderListItem, o as OrderDetail, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, r as CheckoutInput, s as PageDetail, t as Page, S as ShopInfo, u as ShopScripts, v as ShopSeo, w as Bundle, x as ProductGroup, y as CrossSellItem, z as ActivePromotion, G as GiftCardBalance, W as WishlistItem, D as ProductReviewsResponse, E as SubmitReviewInput, H as ReturnableOrder, I as ReturnStatus, J as ReturnRequest, K as SubmitReturnInput, Q as CookieConsent, T as CookieConsentInput, U as QuoteRequest, V as SubmitQuoteInput, X as BackInStockSubscription } from './client-BOz1trRk.js';
5
+ export { Y as AddToCartInput, Z as AuthTokens, _ as BehioApiError, $ as BundleItem, a0 as CartDiscount, a1 as CartItem, a2 as CheckoutAddress, a3 as FulfillmentStatus, a4 as LoginInput, a5 as MessageResponse, a6 as OrderItem, a7 as OrderStatus, a8 as PaymentStatus, a9 as ProductPrice, aa as ProductReview, ab as ProductVariant } from './client-BOz1trRk.js';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  export { EcommerceEventName, EcommerceItem, EcommercePayload, formatPrice, trackEcommerceEvent } from './index.js';
8
8
 
package/dist/react.js CHANGED
@@ -4,7 +4,7 @@
4
4
  var _chunkJIAOZ5YWjs = require('./chunk-JIAOZ5YW.js');
5
5
 
6
6
 
7
- var _chunkNG46DR3Ajs = require('./chunk-NG46DR3A.js');
7
+ var _chunk5OFVG2BOjs = require('./chunk-5OFVG2BO.js');
8
8
 
9
9
  // src/react/provider.tsx
10
10
  var _react = require('react');
@@ -134,7 +134,7 @@ function BehioProvider({
134
134
  const [activeCurrency, setActiveCurrency] = _react.useState.call(void 0, resolveInitialCurrency);
135
135
  const clientRef = _react.useRef.call(void 0, null);
136
136
  if (!clientRef.current) {
137
- clientRef.current = new (0, _chunkNG46DR3Ajs.BehioStorefront)({
137
+ clientRef.current = new (0, _chunk5OFVG2BOjs.BehioStorefront)({
138
138
  apiKey,
139
139
  baseUrl,
140
140
  ...shopDomain ? { shopDomain } : {},
package/dist/react.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ZOZAJG6T.mjs";
5
5
  import {
6
6
  BehioStorefront
7
- } from "./chunk-O7HDB5R4.mjs";
7
+ } from "./chunk-Y7QAB75P.mjs";
8
8
 
9
9
  // src/react/provider.tsx
10
10
  import { useRef, useEffect, useMemo, useState, useCallback } from "react";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@behio/storefront-sdk",
3
- "version": "0.31.1",
4
- "description": "TypeScript SDK for Behio Headless E-Shop \u2014 core client + React hooks",
3
+ "version": "0.32.0",
4
+ "description": "TypeScript SDK for Behio Headless E-Shop core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",
7
7
  "main": "./dist/index.js",
@@ -63,4 +63,4 @@
63
63
  "tsup": "^8.0.0",
64
64
  "typescript": "^5.2.0"
65
65
  }
66
- }
66
+ }