@asteby/storefront 0.20.0 → 0.22.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.
@@ -509,6 +509,11 @@ type Customer = {
509
509
  /** Saved fiscal data; `null`/absent when none. */
510
510
  fiscal?: FiscalIdentity | null;
511
511
  created_at: string;
512
+ /**
513
+ * The buyer proved they control `email` with a code (contract 1.15). `false` for an account registered without
514
+ * verification (the store had no mail connector) and when there is no e-mail. Absent on older servers: say nothing.
515
+ */
516
+ email_verified?: boolean;
512
517
  /** Preferred language, one of the store's (contract 1.9). Absent on older servers. */
513
518
  locale?: string | null;
514
519
  /** Notification preferences (contract 1.9). Absent on older servers. */
@@ -566,6 +571,11 @@ type CustomerCapabilities = {
566
571
  data_export?: boolean;
567
572
  /** The buyer can delete their account (`customer.deleteAccount`). Absent on older servers. */
568
573
  account_delete?: boolean;
574
+ /**
575
+ * The buyer can verify and change their e-mail from the account (`customer.email`; contract 1.15). It needs mail
576
+ * delivery, because the code goes to the NEW address. Absent on older servers: there is no such section.
577
+ */
578
+ email_change?: boolean;
569
579
  };
570
580
  /** `GET {gateway}/_token`: what the token in use is and what it can do. Needs no scope. */
571
581
  type TokenIntrospection = {
@@ -603,6 +613,23 @@ type CustomerSetPasswordInput = {
603
613
  password: string;
604
614
  current_password?: string;
605
615
  };
616
+ /** `customer.email.confirmVerification`: the 6-digit code mailed to the current address. */
617
+ type CustomerEmailCodeInput = {
618
+ code: string;
619
+ };
620
+ /** `customer.email.requestChange`: the new address. */
621
+ type CustomerEmailChangeInput = {
622
+ email: string;
623
+ };
624
+ /** `customer.email.confirmChange`: the same new address and the code that arrived there. */
625
+ type CustomerEmailChangeConfirmInput = {
626
+ email: string;
627
+ code: string;
628
+ };
629
+ /** The answer to asking for a change: always this, whether or not the new address has an account. */
630
+ type CustomerEmailChangeRequested = {
631
+ status: 'verification_required';
632
+ };
606
633
  type CustomerResetPasswordInput = {
607
634
  email: string;
608
635
  code: string;
@@ -705,6 +732,19 @@ type ShipmentsSummary = {
705
732
  carrier?: string | null;
706
733
  tracking_url?: string | null;
707
734
  };
735
+ /** Receiver of an issued invoice (contract 1.14): the fiscal data the buyer themselves gave. Never the issuer's. */
736
+ type InvoiceReceiver = {
737
+ /** Tax id of the receiver (MX: RFC). */
738
+ rfc?: string | null;
739
+ /** Legal name. */
740
+ name?: string | null;
741
+ /** Tax regime (MX: SAT code). */
742
+ tax_regime?: string | null;
743
+ /** Use of the invoice (MX: UsoCFDI). */
744
+ cfdi_use?: string | null;
745
+ /** Postal code of the fiscal address. */
746
+ postal_code?: string | null;
747
+ };
708
748
  /** An invoice or credit note of an order (extends `InvoiceSummary`). Links, when present, are short-lived and never the PAC's. */
709
749
  type InvoiceDoc = InvoiceSummary & {
710
750
  id: string;
@@ -719,6 +759,12 @@ type InvoiceDoc = InvoiceSummary & {
719
759
  /** Id of the invoice a credit note corrects. */
720
760
  related_to?: string | null;
721
761
  links_expire_at?: string | null;
762
+ /** Contract 1.14, issued invoices: payment method (MX: `PUE` | `PPD`). Absent = the server does not say. */
763
+ payment_method?: string | null;
764
+ /** Contract 1.14: payment form (MX: SAT code such as `04`). */
765
+ payment_form?: string | null;
766
+ /** Contract 1.14: who the invoice was issued to. */
767
+ receiver?: InvoiceReceiver | null;
722
768
  /** Invoice from a sandbox PAC: hide it or mark it "test, no fiscal validity". */
723
769
  test_mode?: boolean;
724
770
  environment?: 'production' | 'sandbox' | (string & {});
@@ -1721,4 +1767,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
1721
1767
  /** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
1722
1768
  declare function safeExportFilename(name: unknown, fallback?: string): string;
1723
1769
 
1724
- export { type FiscalProfile as $, type AccountDeleteInput as A, type Customer as B, type Cart as C, type CustomerCapabilities as D, type CustomerIdentifier as E, type CustomerPasswordLoginInput as F, type CustomerPreferences as G, type CustomerRegisterInput as H, type CustomerRegisterResult as I, type CustomerResetPasswordInput as J, type CustomerSession as K, type CustomerSessionInfo as L, type CustomerSessionInput as M, type CustomerSetPasswordInput as N, type CustomerUpdateInput as O, type CustomerVerifyRegistrationInput as P, type DataExportFile as Q, type DeclineCode as R, type DeliveryInput as S, type DeliveryMethod as T, type DeliveryOptions as U, type Facet as V, type FacetValue as W, type FiscalDocumentEvidence as X, type FiscalDocumentSource as Y, type FiscalIdentity as Z, type FiscalIdentityInput as _, type Address as a, type PickupOption as a$, type FiscalProfileInput as a0, type FiscalVerification as a1, type GeoHint as a2, type IdentityCapture as a3, type IdentityDocumentSpec as a4, type IdentityFieldRule as a5, type IdentityRulesV1 as a6, type IdentityStrategy as a7, type Image as a8, type InsufficientStockDetails as a9, type OrderProgress as aA, type OrderProgressStep as aB, type OrderSection as aC, type OrderShippingService as aD, type OrderStage as aE, type OrderStepKey as aF, type OrderStepState as aG, type Page as aH, type PageInfo as aI, type PaymentAction as aJ, type PaymentAttemptResult as aK, type PaymentAttemptStatus as aL, type PaymentClient as aM, type PaymentClientCsp as aN, type PaymentConfig as aO, type PaymentFlow as aP, type PaymentInfo as aQ, type PaymentMethod as aR, type PaymentMethods as aS, type PaymentNextStep as aT, type PaymentOption as aU, type PaymentOptionKey as aV, type PaymentPoint as aW, type PaymentSubmitInput as aX, type PaymentVoucher as aY, type PendingPayment as aZ, type PendingPaymentVoucher as a_, type InsufficientStockLine as aa, type InvoiceAction as ab, type InvoiceDoc as ac, type InvoiceFile as ad, type InvoiceFileKind as ae, type InvoiceRequest as af, type InvoiceResult as ag, type InvoiceStage as ah, type InvoiceSummary as ai, type InvoicingCapabilities as aj, type Location as ak, type LocationContacts as al, type LocationKind as am, type LocationListParams as an, type LocationPickup as ao, type Menu as ap, type MenuItem as aq, type Money as ar, type MoneyRange as as, type NearestLocation as at, type NextAction as au, type NextActionKind as av, type Order as aw, type OrderLine as ax, type OrderPickup as ay, type OrderProblem as az, type AddressInput as b, type Product as b0, type ProductAttributeValue as b1, type ProductCategory as b2, type ProductConnection as b3, type ProductOption as b4, type ProductSort as b5, type ProductVariant as b6, type PromotionAnnouncement as b7, type PromotionReward as b8, type PromotionTier as b9, type ShopContact as bA, type ShopPolicies as bB, type StockLevel as bC, StorefrontError as bD, type StorefrontErrorBody as bE, type StorefrontErrorCode as bF, type StorefrontErrorInit as bG, type Subject as bH, type SubjectCatalog as bI, type SubjectCatalogNode as bJ, type SubjectField as bK, type SubjectFieldType as bL, type SubjectInput as bM, type SubjectKind as bN, type SubjectPatch as bO, type SubjectRef as bP, type Theme as bQ, type TokenIntrospection as bR, type UnavailableRateProvider as bS, dataExportBytes as bT, isAccountDeleteBlocked as bU, isReauthRequired as bV, isStorefrontError as bW, safeExportFilename as bX, type PromotionsList as ba, type ReauthInput as bb, type ReauthResult as bc, type RecommendationPlacement as bd, type Refund as be, type Region as bf, type RegionFiscalEntry as bg, type RegionFiscalId as bh, type RegionPaymentMethod as bi, type RegionPostalCode as bj, type RestockSubscriptionInput as bk, type RestockSubscriptionResult as bl, type ReturnRequest as bm, type ReturnRequestInput as bn, type SEO as bo, type Section as bp, type SelectedOption as bq, type Shipment as br, type ShipmentEvent as bs, type ShipmentKind as bt, type ShipmentMap as bu, type ShipmentStatus as bv, type ShipmentsSummary as bw, type ShippingRate as bx, type Shop as by, type ShopBranch as bz, type Article as c, 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 };
1770
+ 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 };
@@ -509,6 +509,11 @@ type Customer = {
509
509
  /** Saved fiscal data; `null`/absent when none. */
510
510
  fiscal?: FiscalIdentity | null;
511
511
  created_at: string;
512
+ /**
513
+ * The buyer proved they control `email` with a code (contract 1.15). `false` for an account registered without
514
+ * verification (the store had no mail connector) and when there is no e-mail. Absent on older servers: say nothing.
515
+ */
516
+ email_verified?: boolean;
512
517
  /** Preferred language, one of the store's (contract 1.9). Absent on older servers. */
513
518
  locale?: string | null;
514
519
  /** Notification preferences (contract 1.9). Absent on older servers. */
@@ -566,6 +571,11 @@ type CustomerCapabilities = {
566
571
  data_export?: boolean;
567
572
  /** The buyer can delete their account (`customer.deleteAccount`). Absent on older servers. */
568
573
  account_delete?: boolean;
574
+ /**
575
+ * The buyer can verify and change their e-mail from the account (`customer.email`; contract 1.15). It needs mail
576
+ * delivery, because the code goes to the NEW address. Absent on older servers: there is no such section.
577
+ */
578
+ email_change?: boolean;
569
579
  };
570
580
  /** `GET {gateway}/_token`: what the token in use is and what it can do. Needs no scope. */
571
581
  type TokenIntrospection = {
@@ -603,6 +613,23 @@ type CustomerSetPasswordInput = {
603
613
  password: string;
604
614
  current_password?: string;
605
615
  };
616
+ /** `customer.email.confirmVerification`: the 6-digit code mailed to the current address. */
617
+ type CustomerEmailCodeInput = {
618
+ code: string;
619
+ };
620
+ /** `customer.email.requestChange`: the new address. */
621
+ type CustomerEmailChangeInput = {
622
+ email: string;
623
+ };
624
+ /** `customer.email.confirmChange`: the same new address and the code that arrived there. */
625
+ type CustomerEmailChangeConfirmInput = {
626
+ email: string;
627
+ code: string;
628
+ };
629
+ /** The answer to asking for a change: always this, whether or not the new address has an account. */
630
+ type CustomerEmailChangeRequested = {
631
+ status: 'verification_required';
632
+ };
606
633
  type CustomerResetPasswordInput = {
607
634
  email: string;
608
635
  code: string;
@@ -705,6 +732,19 @@ type ShipmentsSummary = {
705
732
  carrier?: string | null;
706
733
  tracking_url?: string | null;
707
734
  };
735
+ /** Receiver of an issued invoice (contract 1.14): the fiscal data the buyer themselves gave. Never the issuer's. */
736
+ type InvoiceReceiver = {
737
+ /** Tax id of the receiver (MX: RFC). */
738
+ rfc?: string | null;
739
+ /** Legal name. */
740
+ name?: string | null;
741
+ /** Tax regime (MX: SAT code). */
742
+ tax_regime?: string | null;
743
+ /** Use of the invoice (MX: UsoCFDI). */
744
+ cfdi_use?: string | null;
745
+ /** Postal code of the fiscal address. */
746
+ postal_code?: string | null;
747
+ };
708
748
  /** An invoice or credit note of an order (extends `InvoiceSummary`). Links, when present, are short-lived and never the PAC's. */
709
749
  type InvoiceDoc = InvoiceSummary & {
710
750
  id: string;
@@ -719,6 +759,12 @@ type InvoiceDoc = InvoiceSummary & {
719
759
  /** Id of the invoice a credit note corrects. */
720
760
  related_to?: string | null;
721
761
  links_expire_at?: string | null;
762
+ /** Contract 1.14, issued invoices: payment method (MX: `PUE` | `PPD`). Absent = the server does not say. */
763
+ payment_method?: string | null;
764
+ /** Contract 1.14: payment form (MX: SAT code such as `04`). */
765
+ payment_form?: string | null;
766
+ /** Contract 1.14: who the invoice was issued to. */
767
+ receiver?: InvoiceReceiver | null;
722
768
  /** Invoice from a sandbox PAC: hide it or mark it "test, no fiscal validity". */
723
769
  test_mode?: boolean;
724
770
  environment?: 'production' | 'sandbox' | (string & {});
@@ -1721,4 +1767,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
1721
1767
  /** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
1722
1768
  declare function safeExportFilename(name: unknown, fallback?: string): string;
1723
1769
 
1724
- export { type FiscalProfile as $, type AccountDeleteInput as A, type Customer as B, type Cart as C, type CustomerCapabilities as D, type CustomerIdentifier as E, type CustomerPasswordLoginInput as F, type CustomerPreferences as G, type CustomerRegisterInput as H, type CustomerRegisterResult as I, type CustomerResetPasswordInput as J, type CustomerSession as K, type CustomerSessionInfo as L, type CustomerSessionInput as M, type CustomerSetPasswordInput as N, type CustomerUpdateInput as O, type CustomerVerifyRegistrationInput as P, type DataExportFile as Q, type DeclineCode as R, type DeliveryInput as S, type DeliveryMethod as T, type DeliveryOptions as U, type Facet as V, type FacetValue as W, type FiscalDocumentEvidence as X, type FiscalDocumentSource as Y, type FiscalIdentity as Z, type FiscalIdentityInput as _, type Address as a, type PickupOption as a$, type FiscalProfileInput as a0, type FiscalVerification as a1, type GeoHint as a2, type IdentityCapture as a3, type IdentityDocumentSpec as a4, type IdentityFieldRule as a5, type IdentityRulesV1 as a6, type IdentityStrategy as a7, type Image as a8, type InsufficientStockDetails as a9, type OrderProgress as aA, type OrderProgressStep as aB, type OrderSection as aC, type OrderShippingService as aD, type OrderStage as aE, type OrderStepKey as aF, type OrderStepState as aG, type Page as aH, type PageInfo as aI, type PaymentAction as aJ, type PaymentAttemptResult as aK, type PaymentAttemptStatus as aL, type PaymentClient as aM, type PaymentClientCsp as aN, type PaymentConfig as aO, type PaymentFlow as aP, type PaymentInfo as aQ, type PaymentMethod as aR, type PaymentMethods as aS, type PaymentNextStep as aT, type PaymentOption as aU, type PaymentOptionKey as aV, type PaymentPoint as aW, type PaymentSubmitInput as aX, type PaymentVoucher as aY, type PendingPayment as aZ, type PendingPaymentVoucher as a_, type InsufficientStockLine as aa, type InvoiceAction as ab, type InvoiceDoc as ac, type InvoiceFile as ad, type InvoiceFileKind as ae, type InvoiceRequest as af, type InvoiceResult as ag, type InvoiceStage as ah, type InvoiceSummary as ai, type InvoicingCapabilities as aj, type Location as ak, type LocationContacts as al, type LocationKind as am, type LocationListParams as an, type LocationPickup as ao, type Menu as ap, type MenuItem as aq, type Money as ar, type MoneyRange as as, type NearestLocation as at, type NextAction as au, type NextActionKind as av, type Order as aw, type OrderLine as ax, type OrderPickup as ay, type OrderProblem as az, type AddressInput as b, type Product as b0, type ProductAttributeValue as b1, type ProductCategory as b2, type ProductConnection as b3, type ProductOption as b4, type ProductSort as b5, type ProductVariant as b6, type PromotionAnnouncement as b7, type PromotionReward as b8, type PromotionTier as b9, type ShopContact as bA, type ShopPolicies as bB, type StockLevel as bC, StorefrontError as bD, type StorefrontErrorBody as bE, type StorefrontErrorCode as bF, type StorefrontErrorInit as bG, type Subject as bH, type SubjectCatalog as bI, type SubjectCatalogNode as bJ, type SubjectField as bK, type SubjectFieldType as bL, type SubjectInput as bM, type SubjectKind as bN, type SubjectPatch as bO, type SubjectRef as bP, type Theme as bQ, type TokenIntrospection as bR, type UnavailableRateProvider as bS, dataExportBytes as bT, isAccountDeleteBlocked as bU, isReauthRequired as bV, isStorefrontError as bW, safeExportFilename as bX, type PromotionsList as ba, type ReauthInput as bb, type ReauthResult as bc, type RecommendationPlacement as bd, type Refund as be, type Region as bf, type RegionFiscalEntry as bg, type RegionFiscalId as bh, type RegionPaymentMethod as bi, type RegionPostalCode as bj, type RestockSubscriptionInput as bk, type RestockSubscriptionResult as bl, type ReturnRequest as bm, type ReturnRequestInput as bn, type SEO as bo, type Section as bp, type SelectedOption as bq, type Shipment as br, type ShipmentEvent as bs, type ShipmentKind as bt, type ShipmentMap as bu, type ShipmentStatus as bv, type ShipmentsSummary as bw, type ShippingRate as bx, type Shop as by, type ShopBranch as bz, type Article as c, 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 };
1770
+ 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 };
package/dist/cli.js CHANGED
@@ -477,6 +477,31 @@ function createStorefrontClient(config) {
477
477
  * A wrong credential is always the same `400`; too many tries is `429` (`StorefrontError.retryAfter`).
478
478
  */
479
479
  reauth: (input, options) => write("POST", "/storefront/customer/reauth", input, options),
480
+ /**
481
+ * The buyer's e-mail from their account (contract 1.15, `capabilities().email_change`). All four calls need the
482
+ * buyer's session; a wrong or expired code is always the same `400` on `code`, too many tries is `429`.
483
+ */
484
+ email: {
485
+ /**
486
+ * Mails a code to the account's CURRENT e-mail so it can be verified. `422` when it is already verified, the
487
+ * account has no e-mail or the store cannot send mail; `429` while a code was just sent.
488
+ */
489
+ requestVerification: (options) => write("POST", "/storefront/customer/email/verification", void 0, options),
490
+ /** Verifies the current e-mail with the code; answers the buyer with `email_verified: true`. */
491
+ confirmVerification: (input, options) => write("POST", "/storefront/customer/email/verification/confirm", input, options),
492
+ /**
493
+ * Asks to change the e-mail. Needs a recent `reauth` (`403 reauth_required`, see `isReauthRequired`). A code is
494
+ * sent to the NEW address and nothing changes until `confirmChange`. The answer is the same whether or not the
495
+ * new address already has an account (then nothing is sent and the code can never work): word your screen as
496
+ * «if the address can be used, we sent a code». `400` on `email` for an invalid or unchanged address.
497
+ */
498
+ requestChange: (input, options) => write("POST", "/storefront/customer/email/change", input, options),
499
+ /**
500
+ * Confirms the change with the code that arrived at the new address. The other sessions of the account are
501
+ * closed (the one making the call stays) and the answer is the buyer with the new, verified e-mail.
502
+ */
503
+ confirmChange: (input, options) => write("POST", "/storefront/customer/email/change/confirm", input, options)
504
+ },
480
505
  /**
481
506
  * The buyer's data as a JSON file (contract 1.9, `capabilities().data_export`). Needs a recent `reauth`. It is
482
507
  * built on request and is neither stored nor emailed: call it from YOUR server, stream the bytes
@@ -604,7 +629,7 @@ function repairPath(connectionName) {
604
629
  import { chmodSync, closeSync, existsSync, fsyncSync, mkdirSync, openSync, readFileSync, renameSync, statSync, unlinkSync, writeSync } from "fs";
605
630
  import { dirname, join, resolve } from "path";
606
631
  import { hostname } from "os";
607
- var SDK_VERSION = true ? "0.20.0" : "dev";
632
+ var SDK_VERSION = true ? "0.22.0" : "dev";
608
633
  function writeFileAtomic(file, content, mode = 384) {
609
634
  const dir = dirname(file);
610
635
  mkdirSync(dir, { recursive: true });
@@ -1,5 +1,5 @@
1
- import { Y as FiscalDocumentSource, bg as RegionFiscalEntry, a4 as IdentityDocumentSpec, X as FiscalDocumentEvidence, bh as RegionFiscalId, a6 as IdentityRulesV1 } from './account-settings-eGXCcSzz.cjs';
2
- export { a3 as IdentityCapture, a5 as IdentityFieldRule, a7 as IdentityStrategy } from './account-settings-eGXCcSzz.cjs';
1
+ import { a0 as FiscalDocumentSource, bl as RegionFiscalEntry, a8 as IdentityDocumentSpec, $ as FiscalDocumentEvidence, bm as RegionFiscalId, aa as IdentityRulesV1 } from './account-settings-Cj-yownd.cjs';
2
+ export { a7 as IdentityCapture, a9 as IdentityFieldRule, ab as IdentityStrategy } from './account-settings-Cj-yownd.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 { Y as FiscalDocumentSource, bg as RegionFiscalEntry, a4 as IdentityDocumentSpec, X as FiscalDocumentEvidence, bh as RegionFiscalId, a6 as IdentityRulesV1 } from './account-settings-BNDoVH3W.js';
2
- export { a3 as IdentityCapture, a5 as IdentityFieldRule, a7 as IdentityStrategy } from './account-settings-BNDoVH3W.js';
1
+ import { a0 as FiscalDocumentSource, bl as RegionFiscalEntry, a8 as IdentityDocumentSpec, $ as FiscalDocumentEvidence, bm as RegionFiscalId, aa as IdentityRulesV1 } from './account-settings-DYMmes8_.js';
2
+ export { a7 as IdentityCapture, a9 as IdentityFieldRule, ab as IdentityStrategy } from './account-settings-DYMmes8_.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
@@ -509,6 +509,31 @@ function createStorefrontClient(config) {
509
509
  * A wrong credential is always the same `400`; too many tries is `429` (`StorefrontError.retryAfter`).
510
510
  */
511
511
  reauth: (input, options) => write("POST", "/storefront/customer/reauth", input, options),
512
+ /**
513
+ * The buyer's e-mail from their account (contract 1.15, `capabilities().email_change`). All four calls need the
514
+ * buyer's session; a wrong or expired code is always the same `400` on `code`, too many tries is `429`.
515
+ */
516
+ email: {
517
+ /**
518
+ * Mails a code to the account's CURRENT e-mail so it can be verified. `422` when it is already verified, the
519
+ * account has no e-mail or the store cannot send mail; `429` while a code was just sent.
520
+ */
521
+ requestVerification: (options) => write("POST", "/storefront/customer/email/verification", void 0, options),
522
+ /** Verifies the current e-mail with the code; answers the buyer with `email_verified: true`. */
523
+ confirmVerification: (input, options) => write("POST", "/storefront/customer/email/verification/confirm", input, options),
524
+ /**
525
+ * Asks to change the e-mail. Needs a recent `reauth` (`403 reauth_required`, see `isReauthRequired`). A code is
526
+ * sent to the NEW address and nothing changes until `confirmChange`. The answer is the same whether or not the
527
+ * new address already has an account (then nothing is sent and the code can never work): word your screen as
528
+ * «if the address can be used, we sent a code». `400` on `email` for an invalid or unchanged address.
529
+ */
530
+ requestChange: (input, options) => write("POST", "/storefront/customer/email/change", input, options),
531
+ /**
532
+ * Confirms the change with the code that arrived at the new address. The other sessions of the account are
533
+ * closed (the one making the call stays) and the answer is the buyer with the new, verified e-mail.
534
+ */
535
+ confirmChange: (input, options) => write("POST", "/storefront/customer/email/change/confirm", input, options)
536
+ },
512
537
  /**
513
538
  * The buyer's data as a JSON file (contract 1.9, `capabilities().data_export`). Needs a recent `reauth`. It is
514
539
  * built on request and is neither stored nor emailed: call it from YOUR server, stream the bytes