@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/mockup.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { aV as Product, a$ as ProductVariant } from './types-BeTemDg6.js';
1
+ import { aV as Product, a$ as ProductVariant } from './types-CuamKhDe.js';
2
2
  import './geo.js';
3
3
 
4
4
  /**
package/dist/node.cjs CHANGED
@@ -47,7 +47,7 @@ function maskToken(token) {
47
47
  }
48
48
 
49
49
  // src/node.ts
50
- var SDK_VERSION = true ? "0.14.0" : "dev";
50
+ var SDK_VERSION = true ? "0.15.0" : "dev";
51
51
  function createFileTokenSource(file, options = {}) {
52
52
  const ttl = options.ttlMs ?? 3e4;
53
53
  const now = options.now ?? Date.now;
package/dist/node.js CHANGED
@@ -11,7 +11,7 @@ function maskToken(token) {
11
11
  }
12
12
 
13
13
  // src/node.ts
14
- var SDK_VERSION = true ? "0.14.0" : "dev";
14
+ var SDK_VERSION = true ? "0.15.0" : "dev";
15
15
  function createFileTokenSource(file, options = {}) {
16
16
  const ttl = options.ttlMs ?? 3e4;
17
17
  const now = options.now ?? Date.now;
@@ -1257,6 +1257,15 @@ type RegionPaymentMethod = {
1257
1257
  /** Payment forms the invoice may report for this method, comma separated; the first is the default (e.g. `04,28`). */
1258
1258
  fiscal_payment_form?: string;
1259
1259
  };
1260
+ /**
1261
+ * `GET /storefront/region/postal-code?zip=`: where a postal code is, in the region pack's own names (the same ones the
1262
+ * server validates the address state against). Shaped for `AddressFields.lookupPostalCode`.
1263
+ */
1264
+ type RegionPostalCode = {
1265
+ province: string;
1266
+ city: string;
1267
+ neighborhoods: string[];
1268
+ };
1260
1269
  /** `GET /storefront/region`: how the market formats, taxes, addresses and invoices. */
1261
1270
  type Region = {
1262
1271
  country_code: string;
@@ -1388,4 +1397,4 @@ type IdentityRulesV1 = {
1388
1397
  fields: IdentityFieldRule[];
1389
1398
  };
1390
1399
 
1391
- export type { IdentityFieldRule as $, Address as A, CustomerCapabilities as B, Cart as C, CustomerIdentifier as D, CustomerPasswordLoginInput as E, CustomerRegisterInput as F, CustomerRegisterResult as G, CustomerResetPasswordInput as H, CustomerSession as I, CustomerSessionInput as J, CustomerSetPasswordInput as K, CustomerUpdateInput as L, CustomerVerifyRegistrationInput as M, DeclineCode as N, DeliveryInput as O, DeliveryMethod as P, DeliveryOptions as Q, Facet as R, FacetValue as S, FiscalDocumentEvidence as T, FiscalDocumentSource as U, FiscalIdentity as V, FiscalIdentityInput as W, FiscalVerification as X, GeoHint as Y, IdentityCapture as Z, IdentityDocumentSpec as _, AddressInput as a, ProductVariant as a$, IdentityRulesV1 as a0, IdentityStrategy as a1, Image as a2, InsufficientStockDetails as a3, InsufficientStockLine as a4, InvoiceAction as a5, InvoiceDoc as a6, InvoiceFile as a7, InvoiceFileKind as a8, InvoiceRequest as a9, Page as aA, PageInfo as aB, PaymentAction as aC, PaymentAttemptResult as aD, PaymentAttemptStatus as aE, PaymentClient as aF, PaymentClientCsp as aG, PaymentConfig as aH, PaymentFlow as aI, PaymentInfo as aJ, PaymentMethod as aK, PaymentMethods as aL, PaymentNextStep as aM, PaymentOption as aN, PaymentOptionKey as aO, PaymentPoint as aP, PaymentSubmitInput as aQ, PaymentVoucher as aR, PendingPayment as aS, PendingPaymentVoucher as aT, PickupOption as aU, Product as aV, ProductAttributeValue as aW, ProductCategory as aX, ProductConnection as aY, ProductOption as aZ, ProductSort as a_, InvoiceResult as aa, InvoiceStage as ab, InvoiceSummary as ac, InvoicingCapabilities as ad, Location as ae, LocationContacts as af, LocationKind as ag, LocationListParams as ah, LocationPickup as ai, Menu as aj, MenuItem as ak, Money as al, MoneyRange as am, NearestLocation as an, NextAction as ao, NextActionKind as ap, Order as aq, OrderLine as ar, OrderPickup as as, OrderProblem as at, OrderProgress as au, OrderProgressStep as av, OrderSection as aw, OrderStage as ax, OrderStepKey as ay, OrderStepState as az, Article as b, PromotionAnnouncement as b0, PromotionReward as b1, PromotionTier as b2, PromotionsList as b3, RecommendationPlacement as b4, Refund as b5, Region as b6, RegionFiscalEntry as b7, RegionFiscalId as b8, RegionPaymentMethod as b9, RestockSubscriptionInput as ba, RestockSubscriptionResult as bb, ReturnRequest as bc, ReturnRequestInput as bd, SEO as be, Section as bf, SelectedOption as bg, Shipment as bh, ShipmentEvent as bi, ShipmentKind as bj, ShipmentMap as bk, ShipmentStatus as bl, ShipmentsSummary as bm, ShippingRate as bn, Shop as bo, ShopBranch as bp, ShopContact as bq, ShopPolicies as br, StockLevel as bs, StorefrontErrorBody as bt, StorefrontErrorCode as bu, Theme as bv, TokenIntrospection as bw, UnavailableRateProvider as bx, Availability as c, AvailabilityStatus as d, CartBuyer as e, CartBuyerInput as f, CartCost as g, CartDelivery as h, CartDiscountCode as i, CartDiscountLine as j, CartInvoice as k, CartLine as l, CartLineInput as m, CartLineMerchandise as n, CartLineProblem as o, CartLineUpdateInput as p, CartPromotions as q, CartRecommendation as r, CartRecommendations as s, CheckoutInfo as t, CheckoutInput as u, CheckoutPayment as v, CheckoutResult as w, Collection as x, Connection as y, Customer as z };
1400
+ export type { IdentityFieldRule as $, Address as A, CustomerCapabilities as B, Cart as C, CustomerIdentifier as D, CustomerPasswordLoginInput as E, CustomerRegisterInput as F, CustomerRegisterResult as G, CustomerResetPasswordInput as H, CustomerSession as I, CustomerSessionInput as J, CustomerSetPasswordInput as K, CustomerUpdateInput as L, CustomerVerifyRegistrationInput as M, DeclineCode as N, DeliveryInput as O, DeliveryMethod as P, DeliveryOptions as Q, Facet as R, FacetValue as S, FiscalDocumentEvidence as T, FiscalDocumentSource as U, FiscalIdentity as V, FiscalIdentityInput as W, FiscalVerification as X, GeoHint as Y, IdentityCapture as Z, IdentityDocumentSpec as _, AddressInput as a, ProductVariant as a$, IdentityRulesV1 as a0, IdentityStrategy as a1, Image as a2, InsufficientStockDetails as a3, InsufficientStockLine as a4, InvoiceAction as a5, InvoiceDoc as a6, InvoiceFile as a7, InvoiceFileKind as a8, InvoiceRequest as a9, Page as aA, PageInfo as aB, PaymentAction as aC, PaymentAttemptResult as aD, PaymentAttemptStatus as aE, PaymentClient as aF, PaymentClientCsp as aG, PaymentConfig as aH, PaymentFlow as aI, PaymentInfo as aJ, PaymentMethod as aK, PaymentMethods as aL, PaymentNextStep as aM, PaymentOption as aN, PaymentOptionKey as aO, PaymentPoint as aP, PaymentSubmitInput as aQ, PaymentVoucher as aR, PendingPayment as aS, PendingPaymentVoucher as aT, PickupOption as aU, Product as aV, ProductAttributeValue as aW, ProductCategory as aX, ProductConnection as aY, ProductOption as aZ, ProductSort as a_, InvoiceResult as aa, InvoiceStage as ab, InvoiceSummary as ac, InvoicingCapabilities as ad, Location as ae, LocationContacts as af, LocationKind as ag, LocationListParams as ah, LocationPickup as ai, Menu as aj, MenuItem as ak, Money as al, MoneyRange as am, NearestLocation as an, NextAction as ao, NextActionKind as ap, Order as aq, OrderLine as ar, OrderPickup as as, OrderProblem as at, OrderProgress as au, OrderProgressStep as av, OrderSection as aw, OrderStage as ax, OrderStepKey as ay, OrderStepState as az, Article as b, PromotionAnnouncement as b0, PromotionReward as b1, PromotionTier as b2, PromotionsList as b3, RecommendationPlacement as b4, Refund as b5, Region as b6, RegionFiscalEntry as b7, RegionFiscalId as b8, RegionPaymentMethod as b9, RegionPostalCode as ba, RestockSubscriptionInput as bb, RestockSubscriptionResult as bc, ReturnRequest as bd, ReturnRequestInput as be, SEO as bf, Section as bg, SelectedOption as bh, Shipment as bi, ShipmentEvent as bj, ShipmentKind as bk, ShipmentMap as bl, ShipmentStatus as bm, ShipmentsSummary as bn, ShippingRate as bo, Shop as bp, ShopBranch as bq, ShopContact as br, ShopPolicies as bs, StockLevel as bt, StorefrontErrorBody as bu, StorefrontErrorCode as bv, Theme as bw, TokenIntrospection as bx, UnavailableRateProvider as by, Availability as c, AvailabilityStatus as d, CartBuyer as e, CartBuyerInput as f, CartCost as g, CartDelivery as h, CartDiscountCode as i, CartDiscountLine as j, CartInvoice as k, CartLine as l, CartLineInput as m, CartLineMerchandise as n, CartLineProblem as o, CartLineUpdateInput as p, CartPromotions as q, CartRecommendation as r, CartRecommendations as s, CheckoutInfo as t, CheckoutInput as u, CheckoutPayment as v, CheckoutResult as w, Collection as x, Connection as y, Customer as z };
@@ -1257,6 +1257,15 @@ type RegionPaymentMethod = {
1257
1257
  /** Payment forms the invoice may report for this method, comma separated; the first is the default (e.g. `04,28`). */
1258
1258
  fiscal_payment_form?: string;
1259
1259
  };
1260
+ /**
1261
+ * `GET /storefront/region/postal-code?zip=`: where a postal code is, in the region pack's own names (the same ones the
1262
+ * server validates the address state against). Shaped for `AddressFields.lookupPostalCode`.
1263
+ */
1264
+ type RegionPostalCode = {
1265
+ province: string;
1266
+ city: string;
1267
+ neighborhoods: string[];
1268
+ };
1260
1269
  /** `GET /storefront/region`: how the market formats, taxes, addresses and invoices. */
1261
1270
  type Region = {
1262
1271
  country_code: string;
@@ -1388,4 +1397,4 @@ type IdentityRulesV1 = {
1388
1397
  fields: IdentityFieldRule[];
1389
1398
  };
1390
1399
 
1391
- export type { IdentityFieldRule as $, Address as A, CustomerCapabilities as B, Cart as C, CustomerIdentifier as D, CustomerPasswordLoginInput as E, CustomerRegisterInput as F, CustomerRegisterResult as G, CustomerResetPasswordInput as H, CustomerSession as I, CustomerSessionInput as J, CustomerSetPasswordInput as K, CustomerUpdateInput as L, CustomerVerifyRegistrationInput as M, DeclineCode as N, DeliveryInput as O, DeliveryMethod as P, DeliveryOptions as Q, Facet as R, FacetValue as S, FiscalDocumentEvidence as T, FiscalDocumentSource as U, FiscalIdentity as V, FiscalIdentityInput as W, FiscalVerification as X, GeoHint as Y, IdentityCapture as Z, IdentityDocumentSpec as _, AddressInput as a, ProductVariant as a$, IdentityRulesV1 as a0, IdentityStrategy as a1, Image as a2, InsufficientStockDetails as a3, InsufficientStockLine as a4, InvoiceAction as a5, InvoiceDoc as a6, InvoiceFile as a7, InvoiceFileKind as a8, InvoiceRequest as a9, Page as aA, PageInfo as aB, PaymentAction as aC, PaymentAttemptResult as aD, PaymentAttemptStatus as aE, PaymentClient as aF, PaymentClientCsp as aG, PaymentConfig as aH, PaymentFlow as aI, PaymentInfo as aJ, PaymentMethod as aK, PaymentMethods as aL, PaymentNextStep as aM, PaymentOption as aN, PaymentOptionKey as aO, PaymentPoint as aP, PaymentSubmitInput as aQ, PaymentVoucher as aR, PendingPayment as aS, PendingPaymentVoucher as aT, PickupOption as aU, Product as aV, ProductAttributeValue as aW, ProductCategory as aX, ProductConnection as aY, ProductOption as aZ, ProductSort as a_, InvoiceResult as aa, InvoiceStage as ab, InvoiceSummary as ac, InvoicingCapabilities as ad, Location as ae, LocationContacts as af, LocationKind as ag, LocationListParams as ah, LocationPickup as ai, Menu as aj, MenuItem as ak, Money as al, MoneyRange as am, NearestLocation as an, NextAction as ao, NextActionKind as ap, Order as aq, OrderLine as ar, OrderPickup as as, OrderProblem as at, OrderProgress as au, OrderProgressStep as av, OrderSection as aw, OrderStage as ax, OrderStepKey as ay, OrderStepState as az, Article as b, PromotionAnnouncement as b0, PromotionReward as b1, PromotionTier as b2, PromotionsList as b3, RecommendationPlacement as b4, Refund as b5, Region as b6, RegionFiscalEntry as b7, RegionFiscalId as b8, RegionPaymentMethod as b9, RestockSubscriptionInput as ba, RestockSubscriptionResult as bb, ReturnRequest as bc, ReturnRequestInput as bd, SEO as be, Section as bf, SelectedOption as bg, Shipment as bh, ShipmentEvent as bi, ShipmentKind as bj, ShipmentMap as bk, ShipmentStatus as bl, ShipmentsSummary as bm, ShippingRate as bn, Shop as bo, ShopBranch as bp, ShopContact as bq, ShopPolicies as br, StockLevel as bs, StorefrontErrorBody as bt, StorefrontErrorCode as bu, Theme as bv, TokenIntrospection as bw, UnavailableRateProvider as bx, Availability as c, AvailabilityStatus as d, CartBuyer as e, CartBuyerInput as f, CartCost as g, CartDelivery as h, CartDiscountCode as i, CartDiscountLine as j, CartInvoice as k, CartLine as l, CartLineInput as m, CartLineMerchandise as n, CartLineProblem as o, CartLineUpdateInput as p, CartPromotions as q, CartRecommendation as r, CartRecommendations as s, CheckoutInfo as t, CheckoutInput as u, CheckoutPayment as v, CheckoutResult as w, Collection as x, Connection as y, Customer as z };
1400
+ export type { IdentityFieldRule as $, Address as A, CustomerCapabilities as B, Cart as C, CustomerIdentifier as D, CustomerPasswordLoginInput as E, CustomerRegisterInput as F, CustomerRegisterResult as G, CustomerResetPasswordInput as H, CustomerSession as I, CustomerSessionInput as J, CustomerSetPasswordInput as K, CustomerUpdateInput as L, CustomerVerifyRegistrationInput as M, DeclineCode as N, DeliveryInput as O, DeliveryMethod as P, DeliveryOptions as Q, Facet as R, FacetValue as S, FiscalDocumentEvidence as T, FiscalDocumentSource as U, FiscalIdentity as V, FiscalIdentityInput as W, FiscalVerification as X, GeoHint as Y, IdentityCapture as Z, IdentityDocumentSpec as _, AddressInput as a, ProductVariant as a$, IdentityRulesV1 as a0, IdentityStrategy as a1, Image as a2, InsufficientStockDetails as a3, InsufficientStockLine as a4, InvoiceAction as a5, InvoiceDoc as a6, InvoiceFile as a7, InvoiceFileKind as a8, InvoiceRequest as a9, Page as aA, PageInfo as aB, PaymentAction as aC, PaymentAttemptResult as aD, PaymentAttemptStatus as aE, PaymentClient as aF, PaymentClientCsp as aG, PaymentConfig as aH, PaymentFlow as aI, PaymentInfo as aJ, PaymentMethod as aK, PaymentMethods as aL, PaymentNextStep as aM, PaymentOption as aN, PaymentOptionKey as aO, PaymentPoint as aP, PaymentSubmitInput as aQ, PaymentVoucher as aR, PendingPayment as aS, PendingPaymentVoucher as aT, PickupOption as aU, Product as aV, ProductAttributeValue as aW, ProductCategory as aX, ProductConnection as aY, ProductOption as aZ, ProductSort as a_, InvoiceResult as aa, InvoiceStage as ab, InvoiceSummary as ac, InvoicingCapabilities as ad, Location as ae, LocationContacts as af, LocationKind as ag, LocationListParams as ah, LocationPickup as ai, Menu as aj, MenuItem as ak, Money as al, MoneyRange as am, NearestLocation as an, NextAction as ao, NextActionKind as ap, Order as aq, OrderLine as ar, OrderPickup as as, OrderProblem as at, OrderProgress as au, OrderProgressStep as av, OrderSection as aw, OrderStage as ax, OrderStepKey as ay, OrderStepState as az, Article as b, PromotionAnnouncement as b0, PromotionReward as b1, PromotionTier as b2, PromotionsList as b3, RecommendationPlacement as b4, Refund as b5, Region as b6, RegionFiscalEntry as b7, RegionFiscalId as b8, RegionPaymentMethod as b9, RegionPostalCode as ba, RestockSubscriptionInput as bb, RestockSubscriptionResult as bc, ReturnRequest as bd, ReturnRequestInput as be, SEO as bf, Section as bg, SelectedOption as bh, Shipment as bi, ShipmentEvent as bj, ShipmentKind as bk, ShipmentMap as bl, ShipmentStatus as bm, ShipmentsSummary as bn, ShippingRate as bo, Shop as bp, ShopBranch as bq, ShopContact as br, ShopPolicies as bs, StockLevel as bt, StorefrontErrorBody as bu, StorefrontErrorCode as bv, Theme as bw, TokenIntrospection as bx, UnavailableRateProvider as by, Availability as c, AvailabilityStatus as d, CartBuyer as e, CartBuyerInput as f, CartCost as g, CartDelivery as h, CartDiscountCode as i, CartDiscountLine as j, CartInvoice as k, CartLine as l, CartLineInput as m, CartLineMerchandise as n, CartLineProblem as o, CartLineUpdateInput as p, CartPromotions as q, CartRecommendation as r, CartRecommendations as s, CheckoutInfo as t, CheckoutInput as u, CheckoutPayment as v, CheckoutResult as w, Collection as x, Connection as y, Customer as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/storefront",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Typed client for the Storefront API v1 (catalog, cart, checkout, customer, content) using only global fetch — Node 20+, edge runtimes and browsers — plus an in-memory mock of the whole contract and, in `@asteby/storefront/fiscal-document`, a country-agnostic engine that reads a buyer's fiscal document (PDF) in the browser or Node.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {