@asteby/storefront 0.22.1 → 0.23.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.
@@ -1402,6 +1402,36 @@ type RegionPostalCode = {
1402
1402
  /** Every municipality the code covers, only when more than one (the form leaves the city editable and offers them). */
1403
1403
  cities?: string[];
1404
1404
  };
1405
+ /**
1406
+ * One candidate of `GET /storefront/address/suggest`. A SUGGESTION: only the postal-code catalog of the region pack is
1407
+ * authoritative for state, city and colonia, so a form uses `street` / `house_number` and treats the rest as hints.
1408
+ */
1409
+ type AddressSuggestion = {
1410
+ /** Opaque id of the candidate at its provider. */
1411
+ id?: string;
1412
+ /** The address as shown in the list. */
1413
+ label: string;
1414
+ street?: string;
1415
+ house_number?: string;
1416
+ neighborhood?: string;
1417
+ city?: string;
1418
+ province?: string;
1419
+ zip?: string;
1420
+ country?: string;
1421
+ lat?: number;
1422
+ lng?: number;
1423
+ precision?: 'rooftop' | 'street' | 'neighborhood' | 'postal_centroid' | 'locality' | 'region' | 'country';
1424
+ /** Key of the provider addon (`geo_photon`, ...). */
1425
+ source?: string;
1426
+ };
1427
+ /** `GET /storefront/address/suggest`. Never an error because the provider is missing or down. */
1428
+ type AddressSuggestions = {
1429
+ suggestions: AddressSuggestion[];
1430
+ /** `false`: the market has no suggestion provider; a form stops asking and stays manual. */
1431
+ available: boolean;
1432
+ /** `true`: there is a provider but it did not answer this time (timeout, outage). */
1433
+ degraded?: boolean;
1434
+ };
1405
1435
  /** `GET /storefront/region`: how the market formats, taxes, addresses and invoices. */
1406
1436
  type Region = {
1407
1437
  country_code: string;
@@ -1769,4 +1799,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
1769
1799
  /** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
1770
1800
  declare function safeExportFilename(name: unknown, fallback?: string): string;
1771
1801
 
1772
- export { type FiscalDocumentEvidence as $, type AccountDeleteInput as A, type Customer as B, type Cart as C, type CustomerCapabilities as D, type CustomerEmailChangeConfirmInput as E, type CustomerEmailChangeInput as F, type CustomerEmailChangeRequested as G, type CustomerEmailCodeInput as H, type CustomerIdentifier as I, type CustomerPasswordLoginInput as J, type CustomerPreferences as K, type CustomerRegisterInput as L, type CustomerRegisterResult as M, type CustomerResetPasswordInput as N, type CustomerSession as O, type CustomerSessionInfo as P, type CustomerSessionInput as Q, type CustomerSetPasswordInput as R, type CustomerUpdateInput as S, type CustomerVerifyRegistrationInput as T, type DataExportFile as U, type DeclineCode as V, type DeliveryInput as W, type DeliveryMethod as X, type DeliveryOptions as Y, type Facet as Z, type FacetValue as _, type Address as a, type PaymentPoint as a$, type FiscalDocumentSource as a0, type FiscalIdentity as a1, type FiscalIdentityInput as a2, type FiscalProfile as a3, type FiscalProfileInput as a4, type FiscalVerification as a5, type GeoHint as a6, type IdentityCapture as a7, type IdentityDocumentSpec as a8, type IdentityFieldRule as a9, type NextActionKind as aA, type Order as aB, type OrderLine as aC, type OrderPickup as aD, type OrderProblem as aE, type OrderProgress as aF, type OrderProgressStep as aG, type OrderSection as aH, type OrderShippingService as aI, type OrderStage as aJ, type OrderStepKey as aK, type OrderStepState as aL, type Page as aM, type PageInfo as aN, type PaymentAction as aO, type PaymentAttemptResult as aP, type PaymentAttemptStatus as aQ, type PaymentClient as aR, type PaymentClientCsp as aS, type PaymentConfig as aT, type PaymentFlow as aU, type PaymentInfo as aV, type PaymentMethod as aW, type PaymentMethods as aX, type PaymentNextStep as aY, type PaymentOption as aZ, type PaymentOptionKey as a_, type IdentityRulesV1 as aa, type IdentityStrategy as ab, type Image as ac, type InsufficientStockDetails as ad, type InsufficientStockLine as ae, type InvoiceAction as af, type InvoiceDoc as ag, type InvoiceFile as ah, type InvoiceFileKind as ai, type InvoiceReceiver as aj, type InvoiceRequest as ak, type InvoiceResult as al, type InvoiceStage as am, type InvoiceSummary as an, type InvoicingCapabilities as ao, type Location as ap, type LocationContacts as aq, type LocationKind as ar, type LocationListParams as as, type LocationPickup as at, type Menu as au, type MenuItem as av, type Money as aw, type MoneyRange as ax, type NearestLocation as ay, type NextAction as az, type AddressInput as b, isStorefrontError as b$, type PaymentSubmitInput as b0, type PaymentVoucher as b1, type PendingPayment as b2, type PendingPaymentVoucher as b3, type PickupOption as b4, type Product as b5, type ProductAttributeValue as b6, type ProductCategory as b7, type ProductConnection as b8, type ProductOption as b9, type ShipmentStatus as bA, type ShipmentsSummary as bB, type ShippingRate as bC, type Shop as bD, type ShopBranch as bE, type ShopContact as bF, type ShopPolicies as bG, type StockLevel as bH, StorefrontError as bI, type StorefrontErrorBody as bJ, type StorefrontErrorCode as bK, type StorefrontErrorInit as bL, type Subject as bM, type SubjectCatalog as bN, type SubjectCatalogNode as bO, type SubjectField as bP, type SubjectFieldType as bQ, type SubjectInput as bR, type SubjectKind as bS, type SubjectPatch as bT, type SubjectRef as bU, type Theme as bV, type TokenIntrospection as bW, type UnavailableRateProvider as bX, dataExportBytes as bY, isAccountDeleteBlocked as bZ, isReauthRequired as b_, type ProductSort as ba, type ProductVariant as bb, type PromotionAnnouncement as bc, type PromotionReward as bd, type PromotionTier as be, type PromotionsList as bf, type ReauthInput as bg, type ReauthResult as bh, type RecommendationPlacement as bi, type Refund as bj, type Region as bk, type RegionFiscalEntry as bl, type RegionFiscalId as bm, type RegionPaymentMethod as bn, type RegionPostalCode as bo, type RestockSubscriptionInput as bp, type RestockSubscriptionResult as bq, type ReturnRequest as br, type ReturnRequestInput as bs, type SEO as bt, type Section as bu, type SelectedOption as bv, type Shipment as bw, type ShipmentEvent as bx, type ShipmentKind as by, type ShipmentMap as bz, type Article as c, safeExportFilename as c0, type Availability as d, type AvailabilityStatus as e, type CartBuyer as f, type CartBuyerInput as g, type CartCost as h, type CartDelivery as i, type CartDiscountCode as j, type CartDiscountLine as k, type CartInvoice as l, type CartLine as m, type CartLineInput as n, type CartLineMerchandise as o, type CartLineProblem as p, type CartLineUpdateInput as q, type CartPromotions as r, type CartRecommendation as s, type CartRecommendations as t, type CheckoutInfo as u, type CheckoutInput as v, type CheckoutPayment as w, type CheckoutResult as x, type Collection as y, type Connection as z };
1802
+ export { type Facet as $, type AccountDeleteInput as A, type Collection as B, type Cart as C, type Connection as D, type Customer as E, type CustomerCapabilities as F, type CustomerEmailChangeConfirmInput as G, type CustomerEmailChangeInput as H, type CustomerEmailChangeRequested as I, type CustomerEmailCodeInput as J, type CustomerIdentifier as K, type CustomerPasswordLoginInput as L, type CustomerPreferences as M, type CustomerRegisterInput as N, type CustomerRegisterResult as O, type CustomerResetPasswordInput as P, type CustomerSession as Q, type CustomerSessionInfo as R, type CustomerSessionInput as S, type CustomerSetPasswordInput as T, type CustomerUpdateInput as U, type CustomerVerifyRegistrationInput as V, type DataExportFile as W, type DeclineCode as X, type DeliveryInput as Y, type DeliveryMethod as Z, type DeliveryOptions as _, type Address as a, type PaymentOption as a$, type FacetValue as a0, type FiscalDocumentEvidence as a1, type FiscalDocumentSource as a2, type FiscalIdentity as a3, type FiscalIdentityInput as a4, type FiscalProfile as a5, type FiscalProfileInput as a6, type FiscalVerification as a7, type GeoHint as a8, type IdentityCapture as a9, type NearestLocation as aA, type NextAction as aB, type NextActionKind as aC, type Order as aD, type OrderLine as aE, type OrderPickup as aF, type OrderProblem as aG, type OrderProgress as aH, type OrderProgressStep as aI, type OrderSection as aJ, type OrderShippingService as aK, type OrderStage as aL, type OrderStepKey as aM, type OrderStepState as aN, type Page as aO, type PageInfo as aP, type PaymentAction as aQ, type PaymentAttemptResult as aR, type PaymentAttemptStatus as aS, type PaymentClient as aT, type PaymentClientCsp as aU, type PaymentConfig as aV, type PaymentFlow as aW, type PaymentInfo as aX, type PaymentMethod as aY, type PaymentMethods as aZ, type PaymentNextStep as a_, type IdentityDocumentSpec as aa, type IdentityFieldRule as ab, type IdentityRulesV1 as ac, type IdentityStrategy as ad, type Image as ae, type InsufficientStockDetails as af, type InsufficientStockLine as ag, type InvoiceAction as ah, type InvoiceDoc as ai, type InvoiceFile as aj, type InvoiceFileKind as ak, type InvoiceReceiver as al, type InvoiceRequest as am, type InvoiceResult as an, type InvoiceStage as ao, type InvoiceSummary as ap, type InvoicingCapabilities as aq, type Location as ar, type LocationContacts as as, type LocationKind as at, type LocationListParams as au, type LocationPickup as av, type Menu as aw, type MenuItem as ax, type Money as ay, type MoneyRange as az, type AddressInput as b, isAccountDeleteBlocked as b$, type PaymentOptionKey as b0, type PaymentPoint as b1, type PaymentSubmitInput as b2, type PaymentVoucher as b3, type PendingPayment as b4, type PendingPaymentVoucher as b5, type PickupOption as b6, type Product as b7, type ProductAttributeValue as b8, type ProductCategory as b9, type ShipmentKind as bA, type ShipmentMap as bB, type ShipmentStatus as bC, type ShipmentsSummary as bD, type ShippingRate as bE, type Shop as bF, type ShopBranch as bG, type ShopContact as bH, type ShopPolicies as bI, type StockLevel as bJ, StorefrontError as bK, type StorefrontErrorBody as bL, type StorefrontErrorCode as bM, type StorefrontErrorInit as bN, type Subject as bO, type SubjectCatalog as bP, type SubjectCatalogNode as bQ, type SubjectField as bR, type SubjectFieldType as bS, type SubjectInput as bT, type SubjectKind as bU, type SubjectPatch as bV, type SubjectRef as bW, type Theme as bX, type TokenIntrospection as bY, type UnavailableRateProvider as bZ, dataExportBytes as b_, type ProductConnection as ba, type ProductOption as bb, type ProductSort as bc, type ProductVariant as bd, type PromotionAnnouncement as be, type PromotionReward as bf, type PromotionTier as bg, type PromotionsList as bh, type ReauthInput as bi, type ReauthResult as bj, type RecommendationPlacement as bk, type Refund as bl, type Region as bm, type RegionFiscalEntry as bn, type RegionFiscalId as bo, type RegionPaymentMethod as bp, type RegionPostalCode as bq, type RestockSubscriptionInput as br, type RestockSubscriptionResult as bs, type ReturnRequest as bt, type ReturnRequestInput as bu, type SEO as bv, type Section as bw, type SelectedOption as bx, type Shipment as by, type ShipmentEvent as bz, type AddressSuggestion as c, isReauthRequired as c0, isStorefrontError as c1, safeExportFilename as c2, type AddressSuggestions as d, type Article as e, type Availability as f, type AvailabilityStatus as g, type CartBuyer as h, type CartBuyerInput as i, type CartCost as j, type CartDelivery as k, type CartDiscountCode as l, type CartDiscountLine as m, type CartInvoice as n, type CartLine as o, type CartLineInput as p, type CartLineMerchandise as q, type CartLineProblem as r, type CartLineUpdateInput as s, type CartPromotions as t, type CartRecommendation as u, type CartRecommendations as v, type CheckoutInfo as w, type CheckoutInput as x, type CheckoutPayment as y, type CheckoutResult as z };
@@ -1402,6 +1402,36 @@ type RegionPostalCode = {
1402
1402
  /** Every municipality the code covers, only when more than one (the form leaves the city editable and offers them). */
1403
1403
  cities?: string[];
1404
1404
  };
1405
+ /**
1406
+ * One candidate of `GET /storefront/address/suggest`. A SUGGESTION: only the postal-code catalog of the region pack is
1407
+ * authoritative for state, city and colonia, so a form uses `street` / `house_number` and treats the rest as hints.
1408
+ */
1409
+ type AddressSuggestion = {
1410
+ /** Opaque id of the candidate at its provider. */
1411
+ id?: string;
1412
+ /** The address as shown in the list. */
1413
+ label: string;
1414
+ street?: string;
1415
+ house_number?: string;
1416
+ neighborhood?: string;
1417
+ city?: string;
1418
+ province?: string;
1419
+ zip?: string;
1420
+ country?: string;
1421
+ lat?: number;
1422
+ lng?: number;
1423
+ precision?: 'rooftop' | 'street' | 'neighborhood' | 'postal_centroid' | 'locality' | 'region' | 'country';
1424
+ /** Key of the provider addon (`geo_photon`, ...). */
1425
+ source?: string;
1426
+ };
1427
+ /** `GET /storefront/address/suggest`. Never an error because the provider is missing or down. */
1428
+ type AddressSuggestions = {
1429
+ suggestions: AddressSuggestion[];
1430
+ /** `false`: the market has no suggestion provider; a form stops asking and stays manual. */
1431
+ available: boolean;
1432
+ /** `true`: there is a provider but it did not answer this time (timeout, outage). */
1433
+ degraded?: boolean;
1434
+ };
1405
1435
  /** `GET /storefront/region`: how the market formats, taxes, addresses and invoices. */
1406
1436
  type Region = {
1407
1437
  country_code: string;
@@ -1769,4 +1799,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
1769
1799
  /** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
1770
1800
  declare function safeExportFilename(name: unknown, fallback?: string): string;
1771
1801
 
1772
- export { type FiscalDocumentEvidence as $, type AccountDeleteInput as A, type Customer as B, type Cart as C, type CustomerCapabilities as D, type CustomerEmailChangeConfirmInput as E, type CustomerEmailChangeInput as F, type CustomerEmailChangeRequested as G, type CustomerEmailCodeInput as H, type CustomerIdentifier as I, type CustomerPasswordLoginInput as J, type CustomerPreferences as K, type CustomerRegisterInput as L, type CustomerRegisterResult as M, type CustomerResetPasswordInput as N, type CustomerSession as O, type CustomerSessionInfo as P, type CustomerSessionInput as Q, type CustomerSetPasswordInput as R, type CustomerUpdateInput as S, type CustomerVerifyRegistrationInput as T, type DataExportFile as U, type DeclineCode as V, type DeliveryInput as W, type DeliveryMethod as X, type DeliveryOptions as Y, type Facet as Z, type FacetValue as _, type Address as a, type PaymentPoint as a$, type FiscalDocumentSource as a0, type FiscalIdentity as a1, type FiscalIdentityInput as a2, type FiscalProfile as a3, type FiscalProfileInput as a4, type FiscalVerification as a5, type GeoHint as a6, type IdentityCapture as a7, type IdentityDocumentSpec as a8, type IdentityFieldRule as a9, type NextActionKind as aA, type Order as aB, type OrderLine as aC, type OrderPickup as aD, type OrderProblem as aE, type OrderProgress as aF, type OrderProgressStep as aG, type OrderSection as aH, type OrderShippingService as aI, type OrderStage as aJ, type OrderStepKey as aK, type OrderStepState as aL, type Page as aM, type PageInfo as aN, type PaymentAction as aO, type PaymentAttemptResult as aP, type PaymentAttemptStatus as aQ, type PaymentClient as aR, type PaymentClientCsp as aS, type PaymentConfig as aT, type PaymentFlow as aU, type PaymentInfo as aV, type PaymentMethod as aW, type PaymentMethods as aX, type PaymentNextStep as aY, type PaymentOption as aZ, type PaymentOptionKey as a_, type IdentityRulesV1 as aa, type IdentityStrategy as ab, type Image as ac, type InsufficientStockDetails as ad, type InsufficientStockLine as ae, type InvoiceAction as af, type InvoiceDoc as ag, type InvoiceFile as ah, type InvoiceFileKind as ai, type InvoiceReceiver as aj, type InvoiceRequest as ak, type InvoiceResult as al, type InvoiceStage as am, type InvoiceSummary as an, type InvoicingCapabilities as ao, type Location as ap, type LocationContacts as aq, type LocationKind as ar, type LocationListParams as as, type LocationPickup as at, type Menu as au, type MenuItem as av, type Money as aw, type MoneyRange as ax, type NearestLocation as ay, type NextAction as az, type AddressInput as b, isStorefrontError as b$, type PaymentSubmitInput as b0, type PaymentVoucher as b1, type PendingPayment as b2, type PendingPaymentVoucher as b3, type PickupOption as b4, type Product as b5, type ProductAttributeValue as b6, type ProductCategory as b7, type ProductConnection as b8, type ProductOption as b9, type ShipmentStatus as bA, type ShipmentsSummary as bB, type ShippingRate as bC, type Shop as bD, type ShopBranch as bE, type ShopContact as bF, type ShopPolicies as bG, type StockLevel as bH, StorefrontError as bI, type StorefrontErrorBody as bJ, type StorefrontErrorCode as bK, type StorefrontErrorInit as bL, type Subject as bM, type SubjectCatalog as bN, type SubjectCatalogNode as bO, type SubjectField as bP, type SubjectFieldType as bQ, type SubjectInput as bR, type SubjectKind as bS, type SubjectPatch as bT, type SubjectRef as bU, type Theme as bV, type TokenIntrospection as bW, type UnavailableRateProvider as bX, dataExportBytes as bY, isAccountDeleteBlocked as bZ, isReauthRequired as b_, type ProductSort as ba, type ProductVariant as bb, type PromotionAnnouncement as bc, type PromotionReward as bd, type PromotionTier as be, type PromotionsList as bf, type ReauthInput as bg, type ReauthResult as bh, type RecommendationPlacement as bi, type Refund as bj, type Region as bk, type RegionFiscalEntry as bl, type RegionFiscalId as bm, type RegionPaymentMethod as bn, type RegionPostalCode as bo, type RestockSubscriptionInput as bp, type RestockSubscriptionResult as bq, type ReturnRequest as br, type ReturnRequestInput as bs, type SEO as bt, type Section as bu, type SelectedOption as bv, type Shipment as bw, type ShipmentEvent as bx, type ShipmentKind as by, type ShipmentMap as bz, type Article as c, safeExportFilename as c0, type Availability as d, type AvailabilityStatus as e, type CartBuyer as f, type CartBuyerInput as g, type CartCost as h, type CartDelivery as i, type CartDiscountCode as j, type CartDiscountLine as k, type CartInvoice as l, type CartLine as m, type CartLineInput as n, type CartLineMerchandise as o, type CartLineProblem as p, type CartLineUpdateInput as q, type CartPromotions as r, type CartRecommendation as s, type CartRecommendations as t, type CheckoutInfo as u, type CheckoutInput as v, type CheckoutPayment as w, type CheckoutResult as x, type Collection as y, type Connection as z };
1802
+ export { type Facet as $, type AccountDeleteInput as A, type Collection as B, type Cart as C, type Connection as D, type Customer as E, type CustomerCapabilities as F, type CustomerEmailChangeConfirmInput as G, type CustomerEmailChangeInput as H, type CustomerEmailChangeRequested as I, type CustomerEmailCodeInput as J, type CustomerIdentifier as K, type CustomerPasswordLoginInput as L, type CustomerPreferences as M, type CustomerRegisterInput as N, type CustomerRegisterResult as O, type CustomerResetPasswordInput as P, type CustomerSession as Q, type CustomerSessionInfo as R, type CustomerSessionInput as S, type CustomerSetPasswordInput as T, type CustomerUpdateInput as U, type CustomerVerifyRegistrationInput as V, type DataExportFile as W, type DeclineCode as X, type DeliveryInput as Y, type DeliveryMethod as Z, type DeliveryOptions as _, type Address as a, type PaymentOption as a$, type FacetValue as a0, type FiscalDocumentEvidence as a1, type FiscalDocumentSource as a2, type FiscalIdentity as a3, type FiscalIdentityInput as a4, type FiscalProfile as a5, type FiscalProfileInput as a6, type FiscalVerification as a7, type GeoHint as a8, type IdentityCapture as a9, type NearestLocation as aA, type NextAction as aB, type NextActionKind as aC, type Order as aD, type OrderLine as aE, type OrderPickup as aF, type OrderProblem as aG, type OrderProgress as aH, type OrderProgressStep as aI, type OrderSection as aJ, type OrderShippingService as aK, type OrderStage as aL, type OrderStepKey as aM, type OrderStepState as aN, type Page as aO, type PageInfo as aP, type PaymentAction as aQ, type PaymentAttemptResult as aR, type PaymentAttemptStatus as aS, type PaymentClient as aT, type PaymentClientCsp as aU, type PaymentConfig as aV, type PaymentFlow as aW, type PaymentInfo as aX, type PaymentMethod as aY, type PaymentMethods as aZ, type PaymentNextStep as a_, type IdentityDocumentSpec as aa, type IdentityFieldRule as ab, type IdentityRulesV1 as ac, type IdentityStrategy as ad, type Image as ae, type InsufficientStockDetails as af, type InsufficientStockLine as ag, type InvoiceAction as ah, type InvoiceDoc as ai, type InvoiceFile as aj, type InvoiceFileKind as ak, type InvoiceReceiver as al, type InvoiceRequest as am, type InvoiceResult as an, type InvoiceStage as ao, type InvoiceSummary as ap, type InvoicingCapabilities as aq, type Location as ar, type LocationContacts as as, type LocationKind as at, type LocationListParams as au, type LocationPickup as av, type Menu as aw, type MenuItem as ax, type Money as ay, type MoneyRange as az, type AddressInput as b, isAccountDeleteBlocked as b$, type PaymentOptionKey as b0, type PaymentPoint as b1, type PaymentSubmitInput as b2, type PaymentVoucher as b3, type PendingPayment as b4, type PendingPaymentVoucher as b5, type PickupOption as b6, type Product as b7, type ProductAttributeValue as b8, type ProductCategory as b9, type ShipmentKind as bA, type ShipmentMap as bB, type ShipmentStatus as bC, type ShipmentsSummary as bD, type ShippingRate as bE, type Shop as bF, type ShopBranch as bG, type ShopContact as bH, type ShopPolicies as bI, type StockLevel as bJ, StorefrontError as bK, type StorefrontErrorBody as bL, type StorefrontErrorCode as bM, type StorefrontErrorInit as bN, type Subject as bO, type SubjectCatalog as bP, type SubjectCatalogNode as bQ, type SubjectField as bR, type SubjectFieldType as bS, type SubjectInput as bT, type SubjectKind as bU, type SubjectPatch as bV, type SubjectRef as bW, type Theme as bX, type TokenIntrospection as bY, type UnavailableRateProvider as bZ, dataExportBytes as b_, type ProductConnection as ba, type ProductOption as bb, type ProductSort as bc, type ProductVariant as bd, type PromotionAnnouncement as be, type PromotionReward as bf, type PromotionTier as bg, type PromotionsList as bh, type ReauthInput as bi, type ReauthResult as bj, type RecommendationPlacement as bk, type Refund as bl, type Region as bm, type RegionFiscalEntry as bn, type RegionFiscalId as bo, type RegionPaymentMethod as bp, type RegionPostalCode as bq, type RestockSubscriptionInput as br, type RestockSubscriptionResult as bs, type ReturnRequest as bt, type ReturnRequestInput as bu, type SEO as bv, type Section as bw, type SelectedOption as bx, type Shipment as by, type ShipmentEvent as bz, type AddressSuggestion as c, isReauthRequired as c0, isStorefrontError as c1, safeExportFilename as c2, type AddressSuggestions as d, type Article as e, type Availability as f, type AvailabilityStatus as g, type CartBuyer as h, type CartBuyerInput as i, type CartCost as j, type CartDelivery as k, type CartDiscountCode as l, type CartDiscountLine as m, type CartInvoice as n, type CartLine as o, type CartLineInput as p, type CartLineMerchandise as q, type CartLineProblem as r, type CartLineUpdateInput as s, type CartPromotions as t, type CartRecommendation as u, type CartRecommendations as v, type CheckoutInfo as w, type CheckoutInput as x, type CheckoutPayment as y, type CheckoutResult as z };
package/dist/cli.js CHANGED
@@ -334,6 +334,22 @@ function createStorefrontClient(config) {
334
334
  * the server checks the address against.
335
335
  */
336
336
  postalCode: (zip, options) => getOrNull("/storefront/region/postal-code", { zip: zip.trim() }, options),
337
+ /**
338
+ * Street and number suggestions for the address form (`GET /storefront/address/suggest`), from the geocoding
339
+ * provider the market is assigned (a self-hosted Photon, ...). The server drops candidates of another country, postal
340
+ * code or state than the catalog's, and answers `{ suggestions: [], available: false }` when there is no provider:
341
+ * it never fails because of one. `q` needs at least 3 characters (the call rejects shorter ones without a request).
342
+ * Browser forms call it through `AddressFields.suggestAddress`; do not call it per keystroke without a debounce.
343
+ */
344
+ addressSuggest: (params, options) => {
345
+ const q = params.q.trim().replace(/\s+/g, " ");
346
+ if ([...q].length < 3) return Promise.reject(new RangeError("addressSuggest: q needs at least 3 characters"));
347
+ return get(
348
+ "/storefront/address/suggest",
349
+ { q, country: params.country?.toUpperCase(), zip: params.zip?.trim(), limit: params.limit, lat: params.lat, lng: params.lng, locale: params.locale },
350
+ options
351
+ );
352
+ },
337
353
  products: {
338
354
  list: (params, options) => get("/storefront/products", productListQuery(params), options),
339
355
  /** `null` when the product does not exist or is unpublished. */
@@ -629,7 +645,7 @@ function repairPath(connectionName) {
629
645
  import { chmodSync, closeSync, existsSync, fsyncSync, mkdirSync, openSync, readFileSync, renameSync, statSync, unlinkSync, writeSync } from "fs";
630
646
  import { dirname, join, resolve } from "path";
631
647
  import { hostname } from "os";
632
- var SDK_VERSION = true ? "0.22.1" : "dev";
648
+ var SDK_VERSION = true ? "0.23.0" : "dev";
633
649
  function writeFileAtomic(file, content, mode = 384) {
634
650
  const dir = dirname(file);
635
651
  mkdirSync(dir, { recursive: true });
@@ -1,5 +1,5 @@
1
- import { a0 as FiscalDocumentSource, bl as RegionFiscalEntry, a8 as IdentityDocumentSpec, $ as FiscalDocumentEvidence, bm as RegionFiscalId, aa as IdentityRulesV1 } from './account-settings-DZGcveuu.cjs';
2
- export { a7 as IdentityCapture, a9 as IdentityFieldRule, ab as IdentityStrategy } from './account-settings-DZGcveuu.cjs';
1
+ import { a2 as FiscalDocumentSource, bn as RegionFiscalEntry, aa as IdentityDocumentSpec, a1 as FiscalDocumentEvidence, bo as RegionFiscalId, ac as IdentityRulesV1 } from './account-settings-BdKj3jWb.cjs';
2
+ export { a9 as IdentityCapture, ab as IdentityFieldRule, ad as IdentityStrategy } from './account-settings-BdKj3jWb.cjs';
3
3
  import './geo.cjs';
4
4
 
5
5
  /** A value read from a document: text, or the codes of a catalog (`multiple` fields). */
@@ -1,5 +1,5 @@
1
- import { a0 as FiscalDocumentSource, bl as RegionFiscalEntry, a8 as IdentityDocumentSpec, $ as FiscalDocumentEvidence, bm as RegionFiscalId, aa as IdentityRulesV1 } from './account-settings-CwEnn5sR.js';
2
- export { a7 as IdentityCapture, a9 as IdentityFieldRule, ab as IdentityStrategy } from './account-settings-CwEnn5sR.js';
1
+ import { a2 as FiscalDocumentSource, bn as RegionFiscalEntry, aa as IdentityDocumentSpec, a1 as FiscalDocumentEvidence, bo as RegionFiscalId, ac as IdentityRulesV1 } from './account-settings-DHg2RUOH.js';
2
+ export { a9 as IdentityCapture, ab as IdentityFieldRule, ad as IdentityStrategy } from './account-settings-DHg2RUOH.js';
3
3
  import './geo.js';
4
4
 
5
5
  /** A value read from a document: text, or the codes of a catalog (`multiple` fields). */
package/dist/index.cjs CHANGED
@@ -366,6 +366,22 @@ function createStorefrontClient(config) {
366
366
  * the server checks the address against.
367
367
  */
368
368
  postalCode: (zip, options) => getOrNull("/storefront/region/postal-code", { zip: zip.trim() }, options),
369
+ /**
370
+ * Street and number suggestions for the address form (`GET /storefront/address/suggest`), from the geocoding
371
+ * provider the market is assigned (a self-hosted Photon, ...). The server drops candidates of another country, postal
372
+ * code or state than the catalog's, and answers `{ suggestions: [], available: false }` when there is no provider:
373
+ * it never fails because of one. `q` needs at least 3 characters (the call rejects shorter ones without a request).
374
+ * Browser forms call it through `AddressFields.suggestAddress`; do not call it per keystroke without a debounce.
375
+ */
376
+ addressSuggest: (params, options) => {
377
+ const q = params.q.trim().replace(/\s+/g, " ");
378
+ if ([...q].length < 3) return Promise.reject(new RangeError("addressSuggest: q needs at least 3 characters"));
379
+ return get(
380
+ "/storefront/address/suggest",
381
+ { q, country: params.country?.toUpperCase(), zip: params.zip?.trim(), limit: params.limit, lat: params.lat, lng: params.lng, locale: params.locale },
382
+ options
383
+ );
384
+ },
369
385
  products: {
370
386
  list: (params, options) => get("/storefront/products", productListQuery(params), options),
371
387
  /** `null` when the product does not exist or is unpublished. */