@asteby/storefront 0.11.0 → 0.11.2
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/README.md +5 -3
- package/dist/cli.js +65 -30
- package/dist/fiscal-document.d.cts +2 -2
- package/dist/fiscal-document.d.ts +2 -2
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/mock.cjs +4 -4
- package/dist/mock.cjs.map +1 -1
- package/dist/mock.d.cts +1 -1
- package/dist/mock.d.ts +1 -1
- package/dist/mock.js +4 -4
- package/dist/mock.js.map +1 -1
- package/dist/mockup.d.cts +1 -1
- package/dist/mockup.d.ts +1 -1
- package/dist/node.cjs +85 -31
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +59 -25
- package/dist/node.d.ts +59 -25
- package/dist/node.js +82 -31
- package/dist/node.js.map +1 -1
- package/dist/{types-C-Ley-Mt.d.cts → types-BQ7k6DwG.d.cts} +5 -1
- package/dist/{types-D7UJxrba.d.ts → types-D8nLoKyk.d.ts} +5 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GeoPoint } from './geo.cjs';
|
|
2
2
|
export { OpenStatus, OpeningHours } from './geo.cjs';
|
|
3
|
-
import { aJ as ProductSort, b8 as TokenIntrospection, b0 as Shop, aQ as Region, aH as ProductConnection, aE as Product, y as Connection, x as Collection, ad as LocationListParams, aa as Location, aj as NearestLocation, b4 as StockLevel, aU as RestockSubscriptionInput, aV as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aw as PaymentMethods, O as DeliveryInput, a5 as InvoiceRequest, aP as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, aO as PromotionsList, at as PaymentConfig, aB as PaymentSubmitInput, ap as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, ak as Order, aX as ReturnRequestInput, aW as ReturnRequest, a6 as InvoiceResult, A as Address, b7 as Theme, am as Page, af as Menu, b as Article, b6 as StorefrontErrorCode, a3 as InsufficientStockLine, ah as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, aK as ProductVariant, N as DeclineCode, aC as PaymentVoucher, ax as PaymentNextStep, q as CartPromotions, aM as PromotionReward, P as DeliveryMethod, b9 as UnavailableRateProvider } from './types-
|
|
4
|
-
export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as IdentityCapture, Z as IdentityDocumentSpec, _ as IdentityFieldRule, $ as IdentityRulesV1, a0 as IdentityStrategy, a1 as Image, a2 as InsufficientStockDetails, a4 as InvoiceAction, a7 as InvoiceStage, a8 as InvoiceSummary, a9 as InvoicingCapabilities, ab as LocationContacts, ac as LocationKind, ae as LocationPickup, ag as MenuItem, ai as MoneyRange, al as OrderLine, an as PageInfo, ao as PaymentAction, aq as PaymentAttemptStatus, ar as PaymentClient, as as PaymentClientCsp, au as PaymentFlow, av as PaymentMethod, ay as PaymentOption, az as PaymentOptionKey, aA as PaymentPoint, aD as PickupOption, aF as ProductAttributeValue, aG as ProductCategory, aI as ProductOption, aL as PromotionAnnouncement, aN as PromotionTier, aR as RegionFiscalEntry, aS as RegionFiscalId, aT as RegionPaymentMethod, aY as SEO, aZ as Section, a_ as SelectedOption, a$ as ShippingRate, b1 as ShopBranch, b2 as ShopContact, b3 as ShopPolicies, b5 as StorefrontErrorBody } from './types-
|
|
3
|
+
import { aJ as ProductSort, b8 as TokenIntrospection, b0 as Shop, aQ as Region, aH as ProductConnection, aE as Product, y as Connection, x as Collection, ad as LocationListParams, aa as Location, aj as NearestLocation, b4 as StockLevel, aU as RestockSubscriptionInput, aV as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aw as PaymentMethods, O as DeliveryInput, a5 as InvoiceRequest, aP as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, aO as PromotionsList, at as PaymentConfig, aB as PaymentSubmitInput, ap as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, ak as Order, aX as ReturnRequestInput, aW as ReturnRequest, a6 as InvoiceResult, A as Address, b7 as Theme, am as Page, af as Menu, b as Article, b6 as StorefrontErrorCode, a3 as InsufficientStockLine, ah as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, aK as ProductVariant, N as DeclineCode, aC as PaymentVoucher, ax as PaymentNextStep, q as CartPromotions, aM as PromotionReward, P as DeliveryMethod, b9 as UnavailableRateProvider } from './types-BQ7k6DwG.cjs';
|
|
4
|
+
export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as IdentityCapture, Z as IdentityDocumentSpec, _ as IdentityFieldRule, $ as IdentityRulesV1, a0 as IdentityStrategy, a1 as Image, a2 as InsufficientStockDetails, a4 as InvoiceAction, a7 as InvoiceStage, a8 as InvoiceSummary, a9 as InvoicingCapabilities, ab as LocationContacts, ac as LocationKind, ae as LocationPickup, ag as MenuItem, ai as MoneyRange, al as OrderLine, an as PageInfo, ao as PaymentAction, aq as PaymentAttemptStatus, ar as PaymentClient, as as PaymentClientCsp, au as PaymentFlow, av as PaymentMethod, ay as PaymentOption, az as PaymentOptionKey, aA as PaymentPoint, aD as PickupOption, aF as ProductAttributeValue, aG as ProductCategory, aI as ProductOption, aL as PromotionAnnouncement, aN as PromotionTier, aR as RegionFiscalEntry, aS as RegionFiscalId, aT as RegionPaymentMethod, aY as SEO, aZ as Section, a_ as SelectedOption, a$ as ShippingRate, b1 as ShopBranch, b2 as ShopContact, b3 as ShopPolicies, b5 as StorefrontErrorBody } from './types-BQ7k6DwG.cjs';
|
|
5
5
|
|
|
6
6
|
type QueryValue = string | number | boolean | null | undefined;
|
|
7
7
|
type QueryParams = Record<string, QueryValue | QueryValue[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GeoPoint } from './geo.js';
|
|
2
2
|
export { OpenStatus, OpeningHours } from './geo.js';
|
|
3
|
-
import { aJ as ProductSort, b8 as TokenIntrospection, b0 as Shop, aQ as Region, aH as ProductConnection, aE as Product, y as Connection, x as Collection, ad as LocationListParams, aa as Location, aj as NearestLocation, b4 as StockLevel, aU as RestockSubscriptionInput, aV as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aw as PaymentMethods, O as DeliveryInput, a5 as InvoiceRequest, aP as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, aO as PromotionsList, at as PaymentConfig, aB as PaymentSubmitInput, ap as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, ak as Order, aX as ReturnRequestInput, aW as ReturnRequest, a6 as InvoiceResult, A as Address, b7 as Theme, am as Page, af as Menu, b as Article, b6 as StorefrontErrorCode, a3 as InsufficientStockLine, ah as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, aK as ProductVariant, N as DeclineCode, aC as PaymentVoucher, ax as PaymentNextStep, q as CartPromotions, aM as PromotionReward, P as DeliveryMethod, b9 as UnavailableRateProvider } from './types-
|
|
4
|
-
export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as IdentityCapture, Z as IdentityDocumentSpec, _ as IdentityFieldRule, $ as IdentityRulesV1, a0 as IdentityStrategy, a1 as Image, a2 as InsufficientStockDetails, a4 as InvoiceAction, a7 as InvoiceStage, a8 as InvoiceSummary, a9 as InvoicingCapabilities, ab as LocationContacts, ac as LocationKind, ae as LocationPickup, ag as MenuItem, ai as MoneyRange, al as OrderLine, an as PageInfo, ao as PaymentAction, aq as PaymentAttemptStatus, ar as PaymentClient, as as PaymentClientCsp, au as PaymentFlow, av as PaymentMethod, ay as PaymentOption, az as PaymentOptionKey, aA as PaymentPoint, aD as PickupOption, aF as ProductAttributeValue, aG as ProductCategory, aI as ProductOption, aL as PromotionAnnouncement, aN as PromotionTier, aR as RegionFiscalEntry, aS as RegionFiscalId, aT as RegionPaymentMethod, aY as SEO, aZ as Section, a_ as SelectedOption, a$ as ShippingRate, b1 as ShopBranch, b2 as ShopContact, b3 as ShopPolicies, b5 as StorefrontErrorBody } from './types-
|
|
3
|
+
import { aJ as ProductSort, b8 as TokenIntrospection, b0 as Shop, aQ as Region, aH as ProductConnection, aE as Product, y as Connection, x as Collection, ad as LocationListParams, aa as Location, aj as NearestLocation, b4 as StockLevel, aU as RestockSubscriptionInput, aV as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aw as PaymentMethods, O as DeliveryInput, a5 as InvoiceRequest, aP as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, aO as PromotionsList, at as PaymentConfig, aB as PaymentSubmitInput, ap as PaymentAttemptResult, D as CustomerIdentifier, J as CustomerSessionInput, I as CustomerSession, B as CustomerCapabilities, F as CustomerRegisterInput, G as CustomerRegisterResult, M as CustomerVerifyRegistrationInput, E as CustomerPasswordLoginInput, K as CustomerSetPasswordInput, H as CustomerResetPasswordInput, z as Customer, L as CustomerUpdateInput, ak as Order, aX as ReturnRequestInput, aW as ReturnRequest, a6 as InvoiceResult, A as Address, b7 as Theme, am as Page, af as Menu, b as Article, b6 as StorefrontErrorCode, a3 as InsufficientStockLine, ah as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, aK as ProductVariant, N as DeclineCode, aC as PaymentVoucher, ax as PaymentNextStep, q as CartPromotions, aM as PromotionReward, P as DeliveryMethod, b9 as UnavailableRateProvider } from './types-D8nLoKyk.js';
|
|
4
|
+
export { e as CartBuyer, g as CartCost, h as CartDelivery, i as CartDiscountCode, j as CartDiscountLine, k as CartInvoice, l as CartLine, n as CartLineMerchandise, r as CartRecommendation, t as CheckoutInfo, v as CheckoutPayment, R as Facet, S as FacetValue, T as FiscalDocumentEvidence, U as FiscalDocumentSource, V as FiscalIdentity, W as FiscalIdentityInput, X as FiscalVerification, Y as IdentityCapture, Z as IdentityDocumentSpec, _ as IdentityFieldRule, $ as IdentityRulesV1, a0 as IdentityStrategy, a1 as Image, a2 as InsufficientStockDetails, a4 as InvoiceAction, a7 as InvoiceStage, a8 as InvoiceSummary, a9 as InvoicingCapabilities, ab as LocationContacts, ac as LocationKind, ae as LocationPickup, ag as MenuItem, ai as MoneyRange, al as OrderLine, an as PageInfo, ao as PaymentAction, aq as PaymentAttemptStatus, ar as PaymentClient, as as PaymentClientCsp, au as PaymentFlow, av as PaymentMethod, ay as PaymentOption, az as PaymentOptionKey, aA as PaymentPoint, aD as PickupOption, aF as ProductAttributeValue, aG as ProductCategory, aI as ProductOption, aL as PromotionAnnouncement, aN as PromotionTier, aR as RegionFiscalEntry, aS as RegionFiscalId, aT as RegionPaymentMethod, aY as SEO, aZ as Section, a_ as SelectedOption, a$ as ShippingRate, b1 as ShopBranch, b2 as ShopContact, b3 as ShopPolicies, b5 as StorefrontErrorBody } from './types-D8nLoKyk.js';
|
|
5
5
|
|
|
6
6
|
type QueryValue = string | number | boolean | null | undefined;
|
|
7
7
|
type QueryParams = Record<string, QueryValue | QueryValue[]>;
|
package/dist/index.js
CHANGED
|
@@ -301,7 +301,11 @@ function createStorefrontClient(config) {
|
|
|
301
301
|
* What the token in use is and can do (`GET {baseUrl}/_token`, a gateway route, not a `/storefront` one).
|
|
302
302
|
* Needs no scope, so it answers even when the token is under-provisioned: `missing_scopes` says what to repair.
|
|
303
303
|
*/
|
|
304
|
-
introspect: (options) =>
|
|
304
|
+
introspect: async (options) => {
|
|
305
|
+
const body = await get("/_token", void 0, options);
|
|
306
|
+
const env = body;
|
|
307
|
+
return typeof env?.success === "boolean" && env.data ? env.data : body;
|
|
308
|
+
}
|
|
305
309
|
},
|
|
306
310
|
/** Returns a new client that sends the given buyer session token. */
|
|
307
311
|
withCustomerToken(customerToken) {
|