@asteby/storefront 0.26.0 → 0.27.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/{account-settings-BnhDUPWx.d.ts → account-settings-Cio2mAvd.d.ts} +40 -1
- package/dist/{account-settings-C0r3jJ72.d.cts → account-settings-DghDmuaI.d.cts} +40 -1
- package/dist/cli.js +21 -1
- package/dist/fiscal-document.d.cts +2 -2
- package/dist/fiscal-document.d.ts +2 -2
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/mock.d.cts +1 -1
- package/dist/mock.d.ts +1 -1
- package/dist/mockup.d.cts +1 -1
- package/dist/mockup.d.ts +1 -1
- package/dist/node.cjs +1 -1
- package/dist/node.js +1 -1
- package/package.json +1 -1
|
@@ -733,6 +733,45 @@ type Shipment = {
|
|
|
733
733
|
events: ShipmentEvent[];
|
|
734
734
|
map?: ShipmentMap | null;
|
|
735
735
|
};
|
|
736
|
+
/** A scan of the public tracking view. `lat` / `lng` only when the carrier reports coordinates (city precision at most). */
|
|
737
|
+
type TrackingEventView = ShipmentEvent & {
|
|
738
|
+
lat?: number | null;
|
|
739
|
+
lng?: number | null;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* What the public "track my order" lookup returns: only the movement of the parcel. Never a name, an address, the lines
|
|
743
|
+
* or the totals of the order, and never a `label_url`. `events` is newest first.
|
|
744
|
+
*/
|
|
745
|
+
type TrackingView = {
|
|
746
|
+
status: ShipmentStatus;
|
|
747
|
+
carrier?: string | null;
|
|
748
|
+
carrier_logo_key?: string | null;
|
|
749
|
+
tracking_number?: string | null;
|
|
750
|
+
/** `https` only. */
|
|
751
|
+
tracking_url?: string | null;
|
|
752
|
+
/** `YYYY-MM-DD` or an instant. */
|
|
753
|
+
eta?: string | null;
|
|
754
|
+
updated_at?: string | null;
|
|
755
|
+
events: TrackingEventView[];
|
|
756
|
+
map?: ShipmentMap | null;
|
|
757
|
+
};
|
|
758
|
+
/** Order number + the email of the order, or only the guide printed on the parcel. */
|
|
759
|
+
type TrackingLookupInput = {
|
|
760
|
+
order_number: string;
|
|
761
|
+
email: string;
|
|
762
|
+
} | {
|
|
763
|
+
tracking_number: string;
|
|
764
|
+
};
|
|
765
|
+
/** One shape for every failure so the answer never tells an existing order from a missing one. */
|
|
766
|
+
type TrackingLookupResult = {
|
|
767
|
+
status: 'found';
|
|
768
|
+
tracking: TrackingView;
|
|
769
|
+
} | {
|
|
770
|
+
status: 'not_found' | 'unavailable';
|
|
771
|
+
} | {
|
|
772
|
+
status: 'rate_limited';
|
|
773
|
+
retryAfter?: number;
|
|
774
|
+
};
|
|
736
775
|
/** List-view summary of the shipments of an order. */
|
|
737
776
|
type ShipmentsSummary = {
|
|
738
777
|
count: number;
|
|
@@ -1844,4 +1883,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
|
|
|
1844
1883
|
/** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
|
|
1845
1884
|
declare function safeExportFilename(name: unknown, fallback?: string): string;
|
|
1846
1885
|
|
|
1847
|
-
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 PaymentMethod 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 Money as aA, type MoneyRange as aB, type NearestLocation as aC, type NextAction as aD, type NextActionKind as aE, type Order as aF, type OrderLine as aG, type OrderPickup as aH, type OrderProblem as aI, type OrderProgress as aJ, type OrderProgressStep as aK, type OrderRef as aL, type OrderSection as aM, type OrderShippingService as aN, type OrderStage as aO, type OrderStepKey as aP, type OrderStepState as aQ, type Page as aR, type PageInfo as aS, type PaymentAction as aT, type PaymentAttemptResult as aU, type PaymentAttemptStatus as aV, type PaymentClient as aW, type PaymentClientCsp as aX, type PaymentConfig as aY, type PaymentFlow as aZ, type PaymentInfo 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 InvoiceConnection as ai, type InvoiceDoc as aj, type InvoiceFile as ak, type InvoiceFileKind as al, type InvoiceListNode as am, type InvoiceReceiver as an, type InvoiceRequest as ao, type InvoiceResult as ap, type InvoiceStage as aq, type InvoiceSummary as ar, type InvoicingCapabilities as as, type Location as at, type LocationContacts as au, type LocationKind as av, type LocationListParams as aw, type LocationPickup as ax, type Menu as ay, type MenuItem as az, type AddressInput as b, type SubjectRef as b$, type PaymentMethods as b0, type PaymentNextStep as b1, type PaymentOption as b2, type PaymentOptionKey as b3, type PaymentPoint as b4, type PaymentSubmitInput as b5, type PaymentVoucher as b6, type PendingPayment as b7, type PendingPaymentVoucher as b8, type PickupOption as b9, type SelectedOption as bA, type Shipment as bB, type ShipmentConnection as bC, type ShipmentEvent as bD, type ShipmentKind as bE, type ShipmentListNode as bF, type ShipmentMap as bG, type ShipmentStatus as bH, type ShipmentsSummary as bI, type ShippingRate as bJ, type Shop as bK, type ShopBranch as bL, type ShopContact as bM, type ShopPolicies as bN, type StockLevel as bO, StorefrontError as bP, type StorefrontErrorBody as bQ, type StorefrontErrorCode as bR, type StorefrontErrorInit as bS, type Subject as bT, type SubjectCatalog as bU, type SubjectCatalogNode as bV, type SubjectField as bW, type SubjectFieldType as bX, type SubjectInput as bY, type SubjectKind as bZ, type SubjectPatch as b_, type Product as ba, type ProductAttributeValue as bb, type ProductCategory as bc, type ProductConnection as bd, type ProductOption as be, type ProductSort as bf, type ProductVariant as bg, type PromotionAnnouncement as bh, type PromotionReward as bi, type PromotionTier as bj, type PromotionsList as bk, type ReauthInput as bl, type ReauthResult as bm, type RecommendationPlacement as bn, type Refund as bo, type Region as bp, type RegionFiscalEntry as bq, type RegionFiscalId as br, type RegionPaymentMethod as bs, type RegionPostalCode as bt, type RestockSubscriptionInput as bu, type RestockSubscriptionResult as bv, type ReturnRequest as bw, type ReturnRequestInput as bx, type SEO as by, type Section as bz, type AddressSuggestion as c, type Theme as c0, type TokenIntrospection as c1, type
|
|
1886
|
+
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 PaymentMethod 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 Money as aA, type MoneyRange as aB, type NearestLocation as aC, type NextAction as aD, type NextActionKind as aE, type Order as aF, type OrderLine as aG, type OrderPickup as aH, type OrderProblem as aI, type OrderProgress as aJ, type OrderProgressStep as aK, type OrderRef as aL, type OrderSection as aM, type OrderShippingService as aN, type OrderStage as aO, type OrderStepKey as aP, type OrderStepState as aQ, type Page as aR, type PageInfo as aS, type PaymentAction as aT, type PaymentAttemptResult as aU, type PaymentAttemptStatus as aV, type PaymentClient as aW, type PaymentClientCsp as aX, type PaymentConfig as aY, type PaymentFlow as aZ, type PaymentInfo 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 InvoiceConnection as ai, type InvoiceDoc as aj, type InvoiceFile as ak, type InvoiceFileKind as al, type InvoiceListNode as am, type InvoiceReceiver as an, type InvoiceRequest as ao, type InvoiceResult as ap, type InvoiceStage as aq, type InvoiceSummary as ar, type InvoicingCapabilities as as, type Location as at, type LocationContacts as au, type LocationKind as av, type LocationListParams as aw, type LocationPickup as ax, type Menu as ay, type MenuItem as az, type AddressInput as b, type SubjectRef as b$, type PaymentMethods as b0, type PaymentNextStep as b1, type PaymentOption as b2, type PaymentOptionKey as b3, type PaymentPoint as b4, type PaymentSubmitInput as b5, type PaymentVoucher as b6, type PendingPayment as b7, type PendingPaymentVoucher as b8, type PickupOption as b9, type SelectedOption as bA, type Shipment as bB, type ShipmentConnection as bC, type ShipmentEvent as bD, type ShipmentKind as bE, type ShipmentListNode as bF, type ShipmentMap as bG, type ShipmentStatus as bH, type ShipmentsSummary as bI, type ShippingRate as bJ, type Shop as bK, type ShopBranch as bL, type ShopContact as bM, type ShopPolicies as bN, type StockLevel as bO, StorefrontError as bP, type StorefrontErrorBody as bQ, type StorefrontErrorCode as bR, type StorefrontErrorInit as bS, type Subject as bT, type SubjectCatalog as bU, type SubjectCatalogNode as bV, type SubjectField as bW, type SubjectFieldType as bX, type SubjectInput as bY, type SubjectKind as bZ, type SubjectPatch as b_, type Product as ba, type ProductAttributeValue as bb, type ProductCategory as bc, type ProductConnection as bd, type ProductOption as be, type ProductSort as bf, type ProductVariant as bg, type PromotionAnnouncement as bh, type PromotionReward as bi, type PromotionTier as bj, type PromotionsList as bk, type ReauthInput as bl, type ReauthResult as bm, type RecommendationPlacement as bn, type Refund as bo, type Region as bp, type RegionFiscalEntry as bq, type RegionFiscalId as br, type RegionPaymentMethod as bs, type RegionPostalCode as bt, type RestockSubscriptionInput as bu, type RestockSubscriptionResult as bv, type ReturnRequest as bw, type ReturnRequestInput as bx, type SEO as by, type Section as bz, type AddressSuggestion as c, type Theme as c0, type TokenIntrospection as c1, type TrackingEventView as c2, type TrackingLookupInput as c3, type TrackingLookupResult as c4, type TrackingView as c5, type UnavailableRateProvider as c6, dataExportBytes as c7, isAccountDeleteBlocked as c8, isReauthRequired as c9, isStorefrontError as ca, safeExportFilename as cb, 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 };
|
|
@@ -733,6 +733,45 @@ type Shipment = {
|
|
|
733
733
|
events: ShipmentEvent[];
|
|
734
734
|
map?: ShipmentMap | null;
|
|
735
735
|
};
|
|
736
|
+
/** A scan of the public tracking view. `lat` / `lng` only when the carrier reports coordinates (city precision at most). */
|
|
737
|
+
type TrackingEventView = ShipmentEvent & {
|
|
738
|
+
lat?: number | null;
|
|
739
|
+
lng?: number | null;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* What the public "track my order" lookup returns: only the movement of the parcel. Never a name, an address, the lines
|
|
743
|
+
* or the totals of the order, and never a `label_url`. `events` is newest first.
|
|
744
|
+
*/
|
|
745
|
+
type TrackingView = {
|
|
746
|
+
status: ShipmentStatus;
|
|
747
|
+
carrier?: string | null;
|
|
748
|
+
carrier_logo_key?: string | null;
|
|
749
|
+
tracking_number?: string | null;
|
|
750
|
+
/** `https` only. */
|
|
751
|
+
tracking_url?: string | null;
|
|
752
|
+
/** `YYYY-MM-DD` or an instant. */
|
|
753
|
+
eta?: string | null;
|
|
754
|
+
updated_at?: string | null;
|
|
755
|
+
events: TrackingEventView[];
|
|
756
|
+
map?: ShipmentMap | null;
|
|
757
|
+
};
|
|
758
|
+
/** Order number + the email of the order, or only the guide printed on the parcel. */
|
|
759
|
+
type TrackingLookupInput = {
|
|
760
|
+
order_number: string;
|
|
761
|
+
email: string;
|
|
762
|
+
} | {
|
|
763
|
+
tracking_number: string;
|
|
764
|
+
};
|
|
765
|
+
/** One shape for every failure so the answer never tells an existing order from a missing one. */
|
|
766
|
+
type TrackingLookupResult = {
|
|
767
|
+
status: 'found';
|
|
768
|
+
tracking: TrackingView;
|
|
769
|
+
} | {
|
|
770
|
+
status: 'not_found' | 'unavailable';
|
|
771
|
+
} | {
|
|
772
|
+
status: 'rate_limited';
|
|
773
|
+
retryAfter?: number;
|
|
774
|
+
};
|
|
736
775
|
/** List-view summary of the shipments of an order. */
|
|
737
776
|
type ShipmentsSummary = {
|
|
738
777
|
count: number;
|
|
@@ -1844,4 +1883,4 @@ declare function dataExportBytes(file: Pick<DataExportFile, 'content_base64'>):
|
|
|
1844
1883
|
/** A download filename that is safe in a `Content-Disposition` header: no path, quotes, control characters or spaces. */
|
|
1845
1884
|
declare function safeExportFilename(name: unknown, fallback?: string): string;
|
|
1846
1885
|
|
|
1847
|
-
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 PaymentMethod 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 Money as aA, type MoneyRange as aB, type NearestLocation as aC, type NextAction as aD, type NextActionKind as aE, type Order as aF, type OrderLine as aG, type OrderPickup as aH, type OrderProblem as aI, type OrderProgress as aJ, type OrderProgressStep as aK, type OrderRef as aL, type OrderSection as aM, type OrderShippingService as aN, type OrderStage as aO, type OrderStepKey as aP, type OrderStepState as aQ, type Page as aR, type PageInfo as aS, type PaymentAction as aT, type PaymentAttemptResult as aU, type PaymentAttemptStatus as aV, type PaymentClient as aW, type PaymentClientCsp as aX, type PaymentConfig as aY, type PaymentFlow as aZ, type PaymentInfo 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 InvoiceConnection as ai, type InvoiceDoc as aj, type InvoiceFile as ak, type InvoiceFileKind as al, type InvoiceListNode as am, type InvoiceReceiver as an, type InvoiceRequest as ao, type InvoiceResult as ap, type InvoiceStage as aq, type InvoiceSummary as ar, type InvoicingCapabilities as as, type Location as at, type LocationContacts as au, type LocationKind as av, type LocationListParams as aw, type LocationPickup as ax, type Menu as ay, type MenuItem as az, type AddressInput as b, type SubjectRef as b$, type PaymentMethods as b0, type PaymentNextStep as b1, type PaymentOption as b2, type PaymentOptionKey as b3, type PaymentPoint as b4, type PaymentSubmitInput as b5, type PaymentVoucher as b6, type PendingPayment as b7, type PendingPaymentVoucher as b8, type PickupOption as b9, type SelectedOption as bA, type Shipment as bB, type ShipmentConnection as bC, type ShipmentEvent as bD, type ShipmentKind as bE, type ShipmentListNode as bF, type ShipmentMap as bG, type ShipmentStatus as bH, type ShipmentsSummary as bI, type ShippingRate as bJ, type Shop as bK, type ShopBranch as bL, type ShopContact as bM, type ShopPolicies as bN, type StockLevel as bO, StorefrontError as bP, type StorefrontErrorBody as bQ, type StorefrontErrorCode as bR, type StorefrontErrorInit as bS, type Subject as bT, type SubjectCatalog as bU, type SubjectCatalogNode as bV, type SubjectField as bW, type SubjectFieldType as bX, type SubjectInput as bY, type SubjectKind as bZ, type SubjectPatch as b_, type Product as ba, type ProductAttributeValue as bb, type ProductCategory as bc, type ProductConnection as bd, type ProductOption as be, type ProductSort as bf, type ProductVariant as bg, type PromotionAnnouncement as bh, type PromotionReward as bi, type PromotionTier as bj, type PromotionsList as bk, type ReauthInput as bl, type ReauthResult as bm, type RecommendationPlacement as bn, type Refund as bo, type Region as bp, type RegionFiscalEntry as bq, type RegionFiscalId as br, type RegionPaymentMethod as bs, type RegionPostalCode as bt, type RestockSubscriptionInput as bu, type RestockSubscriptionResult as bv, type ReturnRequest as bw, type ReturnRequestInput as bx, type SEO as by, type Section as bz, type AddressSuggestion as c, type Theme as c0, type TokenIntrospection as c1, type
|
|
1886
|
+
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 PaymentMethod 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 Money as aA, type MoneyRange as aB, type NearestLocation as aC, type NextAction as aD, type NextActionKind as aE, type Order as aF, type OrderLine as aG, type OrderPickup as aH, type OrderProblem as aI, type OrderProgress as aJ, type OrderProgressStep as aK, type OrderRef as aL, type OrderSection as aM, type OrderShippingService as aN, type OrderStage as aO, type OrderStepKey as aP, type OrderStepState as aQ, type Page as aR, type PageInfo as aS, type PaymentAction as aT, type PaymentAttemptResult as aU, type PaymentAttemptStatus as aV, type PaymentClient as aW, type PaymentClientCsp as aX, type PaymentConfig as aY, type PaymentFlow as aZ, type PaymentInfo 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 InvoiceConnection as ai, type InvoiceDoc as aj, type InvoiceFile as ak, type InvoiceFileKind as al, type InvoiceListNode as am, type InvoiceReceiver as an, type InvoiceRequest as ao, type InvoiceResult as ap, type InvoiceStage as aq, type InvoiceSummary as ar, type InvoicingCapabilities as as, type Location as at, type LocationContacts as au, type LocationKind as av, type LocationListParams as aw, type LocationPickup as ax, type Menu as ay, type MenuItem as az, type AddressInput as b, type SubjectRef as b$, type PaymentMethods as b0, type PaymentNextStep as b1, type PaymentOption as b2, type PaymentOptionKey as b3, type PaymentPoint as b4, type PaymentSubmitInput as b5, type PaymentVoucher as b6, type PendingPayment as b7, type PendingPaymentVoucher as b8, type PickupOption as b9, type SelectedOption as bA, type Shipment as bB, type ShipmentConnection as bC, type ShipmentEvent as bD, type ShipmentKind as bE, type ShipmentListNode as bF, type ShipmentMap as bG, type ShipmentStatus as bH, type ShipmentsSummary as bI, type ShippingRate as bJ, type Shop as bK, type ShopBranch as bL, type ShopContact as bM, type ShopPolicies as bN, type StockLevel as bO, StorefrontError as bP, type StorefrontErrorBody as bQ, type StorefrontErrorCode as bR, type StorefrontErrorInit as bS, type Subject as bT, type SubjectCatalog as bU, type SubjectCatalogNode as bV, type SubjectField as bW, type SubjectFieldType as bX, type SubjectInput as bY, type SubjectKind as bZ, type SubjectPatch as b_, type Product as ba, type ProductAttributeValue as bb, type ProductCategory as bc, type ProductConnection as bd, type ProductOption as be, type ProductSort as bf, type ProductVariant as bg, type PromotionAnnouncement as bh, type PromotionReward as bi, type PromotionTier as bj, type PromotionsList as bk, type ReauthInput as bl, type ReauthResult as bm, type RecommendationPlacement as bn, type Refund as bo, type Region as bp, type RegionFiscalEntry as bq, type RegionFiscalId as br, type RegionPaymentMethod as bs, type RegionPostalCode as bt, type RestockSubscriptionInput as bu, type RestockSubscriptionResult as bv, type ReturnRequest as bw, type ReturnRequestInput as bx, type SEO as by, type Section as bz, type AddressSuggestion as c, type Theme as c0, type TokenIntrospection as c1, type TrackingEventView as c2, type TrackingLookupInput as c3, type TrackingLookupResult as c4, type TrackingView as c5, type UnavailableRateProvider as c6, dataExportBytes as c7, isAccountDeleteBlocked as c8, isReauthRequired as c9, isStorefrontError as ca, safeExportFilename as cb, 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
|
@@ -458,6 +458,26 @@ function createStorefrontClient(config) {
|
|
|
458
458
|
*/
|
|
459
459
|
get: (id, options) => getOrNull(`/storefront/checkouts/${enc(id)}`, void 0, options)
|
|
460
460
|
},
|
|
461
|
+
/**
|
|
462
|
+
* Public "where is my order" lookup (`POST /storefront/customer/track`): by order number + email, or by the guide
|
|
463
|
+
* printed on the parcel. No buyer session. Every failure is one of three plain answers, so a miss never tells a
|
|
464
|
+
* real order from an unknown one: `not_found`, `rate_limited` (with `retryAfter` seconds when known) or
|
|
465
|
+
* `unavailable` (the server or the network failed). Needs the store to enable the route.
|
|
466
|
+
*/
|
|
467
|
+
tracking: {
|
|
468
|
+
lookup: async (input, options) => {
|
|
469
|
+
try {
|
|
470
|
+
const tracking = await write("POST", "/storefront/customer/track", input, options);
|
|
471
|
+
return tracking && Array.isArray(tracking.events) ? { status: "found", tracking } : { status: "not_found" };
|
|
472
|
+
} catch (err) {
|
|
473
|
+
if (err instanceof StorefrontError) {
|
|
474
|
+
if (err.status === 429) return err.retryAfter ? { status: "rate_limited", retryAfter: err.retryAfter } : { status: "rate_limited" };
|
|
475
|
+
if (err.status === 400 || err.status === 404 || err.status === 422) return { status: "not_found" };
|
|
476
|
+
}
|
|
477
|
+
return { status: "unavailable" };
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
},
|
|
461
481
|
customer: {
|
|
462
482
|
/** Sends a one-time code by email or SMS/WhatsApp. */
|
|
463
483
|
requestOtp: (identifier, options) => write("POST", "/storefront/customer/otp", identifier, options),
|
|
@@ -711,7 +731,7 @@ function repairPath(connectionName) {
|
|
|
711
731
|
import { chmodSync, closeSync, existsSync, fsyncSync, mkdirSync, openSync, readFileSync, renameSync, statSync, unlinkSync, writeSync } from "fs";
|
|
712
732
|
import { dirname, join, resolve } from "path";
|
|
713
733
|
import { hostname } from "os";
|
|
714
|
-
var SDK_VERSION = true ? "0.
|
|
734
|
+
var SDK_VERSION = true ? "0.27.0" : "dev";
|
|
715
735
|
function writeFileAtomic(file, content, mode = 384) {
|
|
716
736
|
const dir = dirname(file);
|
|
717
737
|
mkdirSync(dir, { recursive: true });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a2 as FiscalDocumentSource, bq as RegionFiscalEntry, aa as IdentityDocumentSpec, a1 as FiscalDocumentEvidence, br as RegionFiscalId, ac as IdentityRulesV1 } from './account-settings-
|
|
2
|
-
export { a9 as IdentityCapture, ab as IdentityFieldRule, ad as IdentityStrategy } from './account-settings-
|
|
1
|
+
import { a2 as FiscalDocumentSource, bq as RegionFiscalEntry, aa as IdentityDocumentSpec, a1 as FiscalDocumentEvidence, br as RegionFiscalId, ac as IdentityRulesV1 } from './account-settings-DghDmuaI.cjs';
|
|
2
|
+
export { a9 as IdentityCapture, ab as IdentityFieldRule, ad as IdentityStrategy } from './account-settings-DghDmuaI.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 { a2 as FiscalDocumentSource, bq as RegionFiscalEntry, aa as IdentityDocumentSpec, a1 as FiscalDocumentEvidence, br as RegionFiscalId, ac as IdentityRulesV1 } from './account-settings-
|
|
2
|
-
export { a9 as IdentityCapture, ab as IdentityFieldRule, ad as IdentityStrategy } from './account-settings-
|
|
1
|
+
import { a2 as FiscalDocumentSource, bq as RegionFiscalEntry, aa as IdentityDocumentSpec, a1 as FiscalDocumentEvidence, br as RegionFiscalId, ac as IdentityRulesV1 } from './account-settings-Cio2mAvd.js';
|
|
2
|
+
export { a9 as IdentityCapture, ab as IdentityFieldRule, ad as IdentityStrategy } from './account-settings-Cio2mAvd.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
|
@@ -490,6 +490,26 @@ function createStorefrontClient(config) {
|
|
|
490
490
|
*/
|
|
491
491
|
get: (id, options) => getOrNull(`/storefront/checkouts/${enc(id)}`, void 0, options)
|
|
492
492
|
},
|
|
493
|
+
/**
|
|
494
|
+
* Public "where is my order" lookup (`POST /storefront/customer/track`): by order number + email, or by the guide
|
|
495
|
+
* printed on the parcel. No buyer session. Every failure is one of three plain answers, so a miss never tells a
|
|
496
|
+
* real order from an unknown one: `not_found`, `rate_limited` (with `retryAfter` seconds when known) or
|
|
497
|
+
* `unavailable` (the server or the network failed). Needs the store to enable the route.
|
|
498
|
+
*/
|
|
499
|
+
tracking: {
|
|
500
|
+
lookup: async (input, options) => {
|
|
501
|
+
try {
|
|
502
|
+
const tracking = await write("POST", "/storefront/customer/track", input, options);
|
|
503
|
+
return tracking && Array.isArray(tracking.events) ? { status: "found", tracking } : { status: "not_found" };
|
|
504
|
+
} catch (err) {
|
|
505
|
+
if (err instanceof StorefrontError) {
|
|
506
|
+
if (err.status === 429) return err.retryAfter ? { status: "rate_limited", retryAfter: err.retryAfter } : { status: "rate_limited" };
|
|
507
|
+
if (err.status === 400 || err.status === 404 || err.status === 422) return { status: "not_found" };
|
|
508
|
+
}
|
|
509
|
+
return { status: "unavailable" };
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
493
513
|
customer: {
|
|
494
514
|
/** Sends a one-time code by email or SMS/WhatsApp. */
|
|
495
515
|
requestOtp: (identifier, options) => write("POST", "/storefront/customer/otp", identifier, options),
|