@asteby/storefront 0.21.1 → 0.22.1

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;
@@ -1372,6 +1399,8 @@ type RegionPostalCode = {
1372
1399
  province: string;
1373
1400
  city: string;
1374
1401
  neighborhoods: string[];
1402
+ /** Every municipality the code covers, only when more than one (the form leaves the city editable and offers them). */
1403
+ cities?: string[];
1375
1404
  };
1376
1405
  /** `GET /storefront/region`: how the market formats, taxes, addresses and invoices. */
1377
1406
  type Region = {
@@ -1740,4 +1769,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
1740
1769
  /** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
1741
1770
  declare function safeExportFilename(name: unknown, fallback?: string): string;
1742
1771
 
1743
- 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 PendingPaymentVoucher 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 OrderProblem as aA, type OrderProgress as aB, type OrderProgressStep as aC, type OrderSection as aD, type OrderShippingService as aE, type OrderStage as aF, type OrderStepKey as aG, type OrderStepState as aH, type Page as aI, type PageInfo as aJ, type PaymentAction as aK, type PaymentAttemptResult as aL, type PaymentAttemptStatus as aM, type PaymentClient as aN, type PaymentClientCsp as aO, type PaymentConfig as aP, type PaymentFlow as aQ, type PaymentInfo as aR, type PaymentMethod as aS, type PaymentMethods as aT, type PaymentNextStep as aU, type PaymentOption as aV, type PaymentOptionKey as aW, type PaymentPoint as aX, type PaymentSubmitInput as aY, type PaymentVoucher as aZ, type PendingPayment as a_, type InsufficientStockLine as aa, type InvoiceAction as ab, type InvoiceDoc as ac, type InvoiceFile as ad, type InvoiceFileKind as ae, type InvoiceReceiver as af, type InvoiceRequest as ag, type InvoiceResult as ah, type InvoiceStage as ai, type InvoiceSummary as aj, type InvoicingCapabilities as ak, type Location as al, type LocationContacts as am, type LocationKind as an, type LocationListParams as ao, type LocationPickup as ap, type Menu as aq, type MenuItem as ar, type Money as as, type MoneyRange as at, type NearestLocation as au, type NextAction as av, type NextActionKind as aw, type Order as ax, type OrderLine as ay, type OrderPickup as az, type AddressInput as b, type PickupOption as b0, type Product as b1, type ProductAttributeValue as b2, type ProductCategory as b3, type ProductConnection as b4, type ProductOption as b5, type ProductSort as b6, type ProductVariant as b7, type PromotionAnnouncement as b8, type PromotionReward as b9, type ShopBranch as bA, type ShopContact as bB, type ShopPolicies as bC, type StockLevel as bD, StorefrontError as bE, type StorefrontErrorBody as bF, type StorefrontErrorCode as bG, type StorefrontErrorInit as bH, type Subject as bI, type SubjectCatalog as bJ, type SubjectCatalogNode as bK, type SubjectField as bL, type SubjectFieldType as bM, type SubjectInput as bN, type SubjectKind as bO, type SubjectPatch as bP, type SubjectRef as bQ, type Theme as bR, type TokenIntrospection as bS, type UnavailableRateProvider as bT, dataExportBytes as bU, isAccountDeleteBlocked as bV, isReauthRequired as bW, isStorefrontError as bX, safeExportFilename as bY, type PromotionTier as ba, type PromotionsList as bb, type ReauthInput as bc, type ReauthResult as bd, type RecommendationPlacement as be, type Refund as bf, type Region as bg, type RegionFiscalEntry as bh, type RegionFiscalId as bi, type RegionPaymentMethod as bj, type RegionPostalCode as bk, type RestockSubscriptionInput as bl, type RestockSubscriptionResult as bm, type ReturnRequest as bn, type ReturnRequestInput as bo, type SEO as bp, type Section as bq, type SelectedOption as br, type Shipment as bs, type ShipmentEvent as bt, type ShipmentKind as bu, type ShipmentMap as bv, type ShipmentStatus as bw, type ShipmentsSummary as bx, type ShippingRate as by, type Shop 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 };
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 };
@@ -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;
@@ -1372,6 +1399,8 @@ type RegionPostalCode = {
1372
1399
  province: string;
1373
1400
  city: string;
1374
1401
  neighborhoods: string[];
1402
+ /** Every municipality the code covers, only when more than one (the form leaves the city editable and offers them). */
1403
+ cities?: string[];
1375
1404
  };
1376
1405
  /** `GET /storefront/region`: how the market formats, taxes, addresses and invoices. */
1377
1406
  type Region = {
@@ -1740,4 +1769,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
1740
1769
  /** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
1741
1770
  declare function safeExportFilename(name: unknown, fallback?: string): string;
1742
1771
 
1743
- 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 PendingPaymentVoucher 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 OrderProblem as aA, type OrderProgress as aB, type OrderProgressStep as aC, type OrderSection as aD, type OrderShippingService as aE, type OrderStage as aF, type OrderStepKey as aG, type OrderStepState as aH, type Page as aI, type PageInfo as aJ, type PaymentAction as aK, type PaymentAttemptResult as aL, type PaymentAttemptStatus as aM, type PaymentClient as aN, type PaymentClientCsp as aO, type PaymentConfig as aP, type PaymentFlow as aQ, type PaymentInfo as aR, type PaymentMethod as aS, type PaymentMethods as aT, type PaymentNextStep as aU, type PaymentOption as aV, type PaymentOptionKey as aW, type PaymentPoint as aX, type PaymentSubmitInput as aY, type PaymentVoucher as aZ, type PendingPayment as a_, type InsufficientStockLine as aa, type InvoiceAction as ab, type InvoiceDoc as ac, type InvoiceFile as ad, type InvoiceFileKind as ae, type InvoiceReceiver as af, type InvoiceRequest as ag, type InvoiceResult as ah, type InvoiceStage as ai, type InvoiceSummary as aj, type InvoicingCapabilities as ak, type Location as al, type LocationContacts as am, type LocationKind as an, type LocationListParams as ao, type LocationPickup as ap, type Menu as aq, type MenuItem as ar, type Money as as, type MoneyRange as at, type NearestLocation as au, type NextAction as av, type NextActionKind as aw, type Order as ax, type OrderLine as ay, type OrderPickup as az, type AddressInput as b, type PickupOption as b0, type Product as b1, type ProductAttributeValue as b2, type ProductCategory as b3, type ProductConnection as b4, type ProductOption as b5, type ProductSort as b6, type ProductVariant as b7, type PromotionAnnouncement as b8, type PromotionReward as b9, type ShopBranch as bA, type ShopContact as bB, type ShopPolicies as bC, type StockLevel as bD, StorefrontError as bE, type StorefrontErrorBody as bF, type StorefrontErrorCode as bG, type StorefrontErrorInit as bH, type Subject as bI, type SubjectCatalog as bJ, type SubjectCatalogNode as bK, type SubjectField as bL, type SubjectFieldType as bM, type SubjectInput as bN, type SubjectKind as bO, type SubjectPatch as bP, type SubjectRef as bQ, type Theme as bR, type TokenIntrospection as bS, type UnavailableRateProvider as bT, dataExportBytes as bU, isAccountDeleteBlocked as bV, isReauthRequired as bW, isStorefrontError as bX, safeExportFilename as bY, type PromotionTier as ba, type PromotionsList as bb, type ReauthInput as bc, type ReauthResult as bd, type RecommendationPlacement as be, type Refund as bf, type Region as bg, type RegionFiscalEntry as bh, type RegionFiscalId as bi, type RegionPaymentMethod as bj, type RegionPostalCode as bk, type RestockSubscriptionInput as bl, type RestockSubscriptionResult as bm, type ReturnRequest as bn, type ReturnRequestInput as bo, type SEO as bp, type Section as bq, type SelectedOption as br, type Shipment as bs, type ShipmentEvent as bt, type ShipmentKind as bu, type ShipmentMap as bv, type ShipmentStatus as bw, type ShipmentsSummary as bx, type ShippingRate as by, type Shop 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 };
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 };
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.21.1" : "dev";
632
+ var SDK_VERSION = true ? "0.22.1" : "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, bh as RegionFiscalEntry, a4 as IdentityDocumentSpec, X as FiscalDocumentEvidence, bi as RegionFiscalId, a6 as IdentityRulesV1 } from './account-settings-BkShqX2k.cjs';
2
- export { a3 as IdentityCapture, a5 as IdentityFieldRule, a7 as IdentityStrategy } from './account-settings-BkShqX2k.cjs';
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';
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, bh as RegionFiscalEntry, a4 as IdentityDocumentSpec, X as FiscalDocumentEvidence, bi as RegionFiscalId, a6 as IdentityRulesV1 } from './account-settings-quulZwuF.js';
2
- export { a3 as IdentityCapture, a5 as IdentityFieldRule, a7 as IdentityStrategy } from './account-settings-quulZwuF.js';
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';
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