@asteby/storefront 0.14.0 → 0.15.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.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { GeoPoint } from './geo.cjs';
2
2
  export { OpenStatus, OpeningHours } from './geo.cjs';
3
- import { a_ as ProductSort, bw as TokenIntrospection, bo as Shop, b6 as Region, aY as ProductConnection, aV as Product, y as Connection, x as Collection, ah as LocationListParams, ae as Location, an as NearestLocation, bs as StockLevel, ba as RestockSubscriptionInput, bb as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aL as PaymentMethods, O as DeliveryInput, a9 as InvoiceRequest, b4 as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, b3 as PromotionsList, aH as PaymentConfig, aQ as PaymentSubmitInput, aD as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, aq as Order, bd as ReturnRequestInput, bc as ReturnRequest, aa as InvoiceResult, aS as PendingPayment, a8 as InvoiceFileKind, a7 as InvoiceFile, A as Address, bv as Theme, aA as Page, aj as Menu, b as Article, bu as StorefrontErrorCode, a4 as InsufficientStockLine, al as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, a$ as ProductVariant, N as DeclineCode, aR as PaymentVoucher, aM as PaymentNextStep, q as CartPromotions, b1 as PromotionReward, a6 as InvoiceDoc, bh as Shipment, ao as NextAction, au as OrderProgress, bl as ShipmentStatus, bi as ShipmentEvent, P as DeliveryMethod, bx as UnavailableRateProvider } from './types-BuKb-zbi.cjs';
4
- export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as GeoHint, Z as IdentityCapture, _ as IdentityDocumentSpec, $ as IdentityFieldRule, a0 as IdentityRulesV1, a1 as IdentityStrategy, a2 as Image, a3 as InsufficientStockDetails, a5 as InvoiceAction, ab as InvoiceStage, ac as InvoiceSummary, ad as InvoicingCapabilities, af as LocationContacts, ag as LocationKind, ai as LocationPickup, ak as MenuItem, am as MoneyRange, ap as NextActionKind, ar as OrderLine, as as OrderPickup, at as OrderProblem, av as OrderProgressStep, aw as OrderSection, ax as OrderStage, ay as OrderStepKey, az as OrderStepState, aB as PageInfo, aC as PaymentAction, aE as PaymentAttemptStatus, aF as PaymentClient, aG as PaymentClientCsp, aI as PaymentFlow, aJ as PaymentInfo, aK as PaymentMethod, aN as PaymentOption, aO as PaymentOptionKey, aP as PaymentPoint, aT as PendingPaymentVoucher, aU as PickupOption, aW as ProductAttributeValue, aX as ProductCategory, aZ as ProductOption, b0 as PromotionAnnouncement, b2 as PromotionTier, b5 as Refund, b7 as RegionFiscalEntry, b8 as RegionFiscalId, b9 as RegionPaymentMethod, be as SEO, bf as Section, bg as SelectedOption, bj as ShipmentKind, bk as ShipmentMap, bm as ShipmentsSummary, bn as ShippingRate, bp as ShopBranch, bq as ShopContact, br as ShopPolicies, bt as StorefrontErrorBody } from './types-BuKb-zbi.cjs';
3
+ import { a_ as ProductSort, bx as TokenIntrospection, bp as Shop, b6 as Region, ba as RegionPostalCode, aY as ProductConnection, aV as Product, y as Connection, x as Collection, ah as LocationListParams, ae as Location, an as NearestLocation, bt as StockLevel, bb as RestockSubscriptionInput, bc as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aL as PaymentMethods, O as DeliveryInput, a9 as InvoiceRequest, b4 as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, b3 as PromotionsList, aH as PaymentConfig, aQ as PaymentSubmitInput, aD as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, aq as Order, be as ReturnRequestInput, bd as ReturnRequest, aa as InvoiceResult, aS as PendingPayment, a8 as InvoiceFileKind, a7 as InvoiceFile, A as Address, bw as Theme, aA as Page, aj as Menu, b as Article, bv as StorefrontErrorCode, a4 as InsufficientStockLine, al as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, a$ as ProductVariant, N as DeclineCode, aR as PaymentVoucher, aM as PaymentNextStep, q as CartPromotions, b1 as PromotionReward, a6 as InvoiceDoc, bi as Shipment, ao as NextAction, au as OrderProgress, bm as ShipmentStatus, bj as ShipmentEvent, P as DeliveryMethod, by as UnavailableRateProvider } from './types-cwXbVCwe.cjs';
4
+ export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as GeoHint, Z as IdentityCapture, _ as IdentityDocumentSpec, $ as IdentityFieldRule, a0 as IdentityRulesV1, a1 as IdentityStrategy, a2 as Image, a3 as InsufficientStockDetails, a5 as InvoiceAction, ab as InvoiceStage, ac as InvoiceSummary, ad as InvoicingCapabilities, af as LocationContacts, ag as LocationKind, ai as LocationPickup, ak as MenuItem, am as MoneyRange, ap as NextActionKind, ar as OrderLine, as as OrderPickup, at as OrderProblem, av as OrderProgressStep, aw as OrderSection, ax as OrderStage, ay as OrderStepKey, az as OrderStepState, aB as PageInfo, aC as PaymentAction, aE as PaymentAttemptStatus, aF as PaymentClient, aG as PaymentClientCsp, aI as PaymentFlow, aJ as PaymentInfo, aK as PaymentMethod, aN as PaymentOption, aO as PaymentOptionKey, aP as PaymentPoint, aT as PendingPaymentVoucher, aU as PickupOption, aW as ProductAttributeValue, aX as ProductCategory, aZ as ProductOption, b0 as PromotionAnnouncement, b2 as PromotionTier, b5 as Refund, b7 as RegionFiscalEntry, b8 as RegionFiscalId, b9 as RegionPaymentMethod, bf as SEO, bg as Section, bh as SelectedOption, bk as ShipmentKind, bl as ShipmentMap, bn as ShipmentsSummary, bo as ShippingRate, bq as ShopBranch, br as ShopContact, bs as ShopPolicies, bu as StorefrontErrorBody } from './types-cwXbVCwe.cjs';
5
5
 
6
6
  type QueryValue = string | number | boolean | null | undefined;
7
7
  type QueryParams = Record<string, QueryValue | QueryValue[]>;
@@ -191,6 +191,12 @@ declare function createStorefrontClient(config: StorefrontClientOptions): {
191
191
  * has no region configured.
192
192
  */
193
193
  region: (options?: RequestOptions) => Promise<Region | null>;
194
+ /**
195
+ * State and municipality of a postal code from the region pack (`null` when the code is not in its catalog, or the
196
+ * organization has no region pack). The source of `AddressFields.lookupPostalCode`: the state it fills is the one
197
+ * the server checks the address against.
198
+ */
199
+ postalCode: (zip: string, options?: RequestOptions) => Promise<RegionPostalCode | null>;
194
200
  products: {
195
201
  list: (params?: ProductListParams, options?: RequestOptions) => Promise<ProductConnection>;
196
202
  /** `null` when the product does not exist or is unpublished. */
@@ -881,4 +887,4 @@ type DeliveryNotices = {
881
887
  /** Splits `delivery.unavailable` into the `missing_weight` notice and the generic one. */
882
888
  declare function deliveryNotices(delivery: Pick<DeliveryOptions, 'unavailable' | 'partial'> | null | undefined): DeliveryNotices;
883
889
 
884
- export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
890
+ export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, RegionPostalCode, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { GeoPoint } from './geo.js';
2
2
  export { OpenStatus, OpeningHours } from './geo.js';
3
- import { a_ as ProductSort, bw as TokenIntrospection, bo as Shop, b6 as Region, aY as ProductConnection, aV as Product, y as Connection, x as Collection, ah as LocationListParams, ae as Location, an as NearestLocation, bs as StockLevel, ba as RestockSubscriptionInput, bb as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aL as PaymentMethods, O as DeliveryInput, a9 as InvoiceRequest, b4 as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, b3 as PromotionsList, aH as PaymentConfig, aQ as PaymentSubmitInput, aD as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, aq as Order, bd as ReturnRequestInput, bc as ReturnRequest, aa as InvoiceResult, aS as PendingPayment, a8 as InvoiceFileKind, a7 as InvoiceFile, A as Address, bv as Theme, aA as Page, aj as Menu, b as Article, bu as StorefrontErrorCode, a4 as InsufficientStockLine, al as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, a$ as ProductVariant, N as DeclineCode, aR as PaymentVoucher, aM as PaymentNextStep, q as CartPromotions, b1 as PromotionReward, a6 as InvoiceDoc, bh as Shipment, ao as NextAction, au as OrderProgress, bl as ShipmentStatus, bi as ShipmentEvent, P as DeliveryMethod, bx as UnavailableRateProvider } from './types-BeTemDg6.js';
4
- export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as GeoHint, Z as IdentityCapture, _ as IdentityDocumentSpec, $ as IdentityFieldRule, a0 as IdentityRulesV1, a1 as IdentityStrategy, a2 as Image, a3 as InsufficientStockDetails, a5 as InvoiceAction, ab as InvoiceStage, ac as InvoiceSummary, ad as InvoicingCapabilities, af as LocationContacts, ag as LocationKind, ai as LocationPickup, ak as MenuItem, am as MoneyRange, ap as NextActionKind, ar as OrderLine, as as OrderPickup, at as OrderProblem, av as OrderProgressStep, aw as OrderSection, ax as OrderStage, ay as OrderStepKey, az as OrderStepState, aB as PageInfo, aC as PaymentAction, aE as PaymentAttemptStatus, aF as PaymentClient, aG as PaymentClientCsp, aI as PaymentFlow, aJ as PaymentInfo, aK as PaymentMethod, aN as PaymentOption, aO as PaymentOptionKey, aP as PaymentPoint, aT as PendingPaymentVoucher, aU as PickupOption, aW as ProductAttributeValue, aX as ProductCategory, aZ as ProductOption, b0 as PromotionAnnouncement, b2 as PromotionTier, b5 as Refund, b7 as RegionFiscalEntry, b8 as RegionFiscalId, b9 as RegionPaymentMethod, be as SEO, bf as Section, bg as SelectedOption, bj as ShipmentKind, bk as ShipmentMap, bm as ShipmentsSummary, bn as ShippingRate, bp as ShopBranch, bq as ShopContact, br as ShopPolicies, bt as StorefrontErrorBody } from './types-BeTemDg6.js';
3
+ import { a_ as ProductSort, bx as TokenIntrospection, bp as Shop, b6 as Region, ba as RegionPostalCode, aY as ProductConnection, aV as Product, y as Connection, x as Collection, ah as LocationListParams, ae as Location, an as NearestLocation, bt as StockLevel, bb as RestockSubscriptionInput, bc as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aL as PaymentMethods, O as DeliveryInput, a9 as InvoiceRequest, b4 as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, b3 as PromotionsList, aH as PaymentConfig, aQ as PaymentSubmitInput, aD as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, aq as Order, be as ReturnRequestInput, bd as ReturnRequest, aa as InvoiceResult, aS as PendingPayment, a8 as InvoiceFileKind, a7 as InvoiceFile, A as Address, bw as Theme, aA as Page, aj as Menu, b as Article, bv as StorefrontErrorCode, a4 as InsufficientStockLine, al as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, a$ as ProductVariant, N as DeclineCode, aR as PaymentVoucher, aM as PaymentNextStep, q as CartPromotions, b1 as PromotionReward, a6 as InvoiceDoc, bi as Shipment, ao as NextAction, au as OrderProgress, bm as ShipmentStatus, bj as ShipmentEvent, P as DeliveryMethod, by as UnavailableRateProvider } from './types-CuamKhDe.js';
4
+ export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as GeoHint, Z as IdentityCapture, _ as IdentityDocumentSpec, $ as IdentityFieldRule, a0 as IdentityRulesV1, a1 as IdentityStrategy, a2 as Image, a3 as InsufficientStockDetails, a5 as InvoiceAction, ab as InvoiceStage, ac as InvoiceSummary, ad as InvoicingCapabilities, af as LocationContacts, ag as LocationKind, ai as LocationPickup, ak as MenuItem, am as MoneyRange, ap as NextActionKind, ar as OrderLine, as as OrderPickup, at as OrderProblem, av as OrderProgressStep, aw as OrderSection, ax as OrderStage, ay as OrderStepKey, az as OrderStepState, aB as PageInfo, aC as PaymentAction, aE as PaymentAttemptStatus, aF as PaymentClient, aG as PaymentClientCsp, aI as PaymentFlow, aJ as PaymentInfo, aK as PaymentMethod, aN as PaymentOption, aO as PaymentOptionKey, aP as PaymentPoint, aT as PendingPaymentVoucher, aU as PickupOption, aW as ProductAttributeValue, aX as ProductCategory, aZ as ProductOption, b0 as PromotionAnnouncement, b2 as PromotionTier, b5 as Refund, b7 as RegionFiscalEntry, b8 as RegionFiscalId, b9 as RegionPaymentMethod, bf as SEO, bg as Section, bh as SelectedOption, bk as ShipmentKind, bl as ShipmentMap, bn as ShipmentsSummary, bo as ShippingRate, bq as ShopBranch, br as ShopContact, bs as ShopPolicies, bu as StorefrontErrorBody } from './types-CuamKhDe.js';
5
5
 
6
6
  type QueryValue = string | number | boolean | null | undefined;
7
7
  type QueryParams = Record<string, QueryValue | QueryValue[]>;
@@ -191,6 +191,12 @@ declare function createStorefrontClient(config: StorefrontClientOptions): {
191
191
  * has no region configured.
192
192
  */
193
193
  region: (options?: RequestOptions) => Promise<Region | null>;
194
+ /**
195
+ * State and municipality of a postal code from the region pack (`null` when the code is not in its catalog, or the
196
+ * organization has no region pack). The source of `AddressFields.lookupPostalCode`: the state it fills is the one
197
+ * the server checks the address against.
198
+ */
199
+ postalCode: (zip: string, options?: RequestOptions) => Promise<RegionPostalCode | null>;
194
200
  products: {
195
201
  list: (params?: ProductListParams, options?: RequestOptions) => Promise<ProductConnection>;
196
202
  /** `null` when the product does not exist or is unpublished. */
@@ -881,4 +887,4 @@ type DeliveryNotices = {
881
887
  /** Splits `delivery.unavailable` into the `missing_weight` notice and the generic one. */
882
888
  declare function deliveryNotices(delivery: Pick<DeliveryOptions, 'unavailable' | 'partial'> | null | undefined): DeliveryNotices;
883
889
 
884
- export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
890
+ export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, RegionPostalCode, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
package/dist/index.js CHANGED
@@ -279,6 +279,12 @@ function createStorefrontClient(config) {
279
279
  * has no region configured.
280
280
  */
281
281
  region: (options) => getOrNull("/storefront/region", void 0, options),
282
+ /**
283
+ * State and municipality of a postal code from the region pack (`null` when the code is not in its catalog, or the
284
+ * organization has no region pack). The source of `AddressFields.lookupPostalCode`: the state it fills is the one
285
+ * the server checks the address against.
286
+ */
287
+ postalCode: (zip, options) => getOrNull("/storefront/region/postal-code", { zip: zip.trim() }, options),
282
288
  products: {
283
289
  list: (params, options) => get("/storefront/products", productListQuery(params), options),
284
290
  /** `null` when the product does not exist or is unpublished. */