@asteby/storefront 0.15.0 → 0.16.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.
- package/dist/cli.js +13 -1
- package/dist/fiscal-document.cjs +72 -8
- package/dist/fiscal-document.cjs.map +1 -1
- package/dist/fiscal-document.d.cts +34 -4
- package/dist/fiscal-document.d.ts +34 -4
- package/dist/fiscal-document.js +71 -9
- package/dist/fiscal-document.js.map +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/mock.cjs +121 -1
- package/dist/mock.cjs.map +1 -1
- package/dist/mock.d.cts +3 -1
- package/dist/mock.d.ts +3 -1
- package/dist/mock.js +121 -1
- 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 +1 -1
- package/dist/node.js +1 -1
- package/dist/{types-cwXbVCwe.d.cts → types-C5nEQicj.d.cts} +52 -1
- package/dist/{types-CuamKhDe.d.ts → types-DSHzYSHU.d.ts} +52 -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 {
|
|
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,
|
|
3
|
+
import { b0 as ProductSort, bz as TokenIntrospection, br as Shop, b8 as Region, bc as RegionPostalCode, a_ as ProductConnection, aX as Product, y as Connection, x as Collection, aj as LocationListParams, ag as Location, ap as NearestLocation, bv as StockLevel, bd as RestockSubscriptionInput, be as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aN as PaymentMethods, O as DeliveryInput, ab as InvoiceRequest, b6 as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, b5 as PromotionsList, aJ as PaymentConfig, aS as PaymentSubmitInput, aF 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, as as Order, bg as ReturnRequestInput, bf as ReturnRequest, ac as InvoiceResult, aU as PendingPayment, aa as InvoiceFileKind, a9 as InvoiceFile, X as FiscalProfile, Y as FiscalProfileInput, A as Address, by as Theme, aC as Page, al as Menu, b as Article, bx as StorefrontErrorCode, a6 as InsufficientStockLine, an as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, b1 as ProductVariant, N as DeclineCode, aT as PaymentVoucher, aO as PaymentNextStep, q as CartPromotions, b3 as PromotionReward, a8 as InvoiceDoc, bk as Shipment, aq as NextAction, aw as OrderProgress, bo as ShipmentStatus, bl as ShipmentEvent, P as DeliveryMethod, bA as UnavailableRateProvider } from './types-C5nEQicj.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, Z as FiscalVerification, _ as GeoHint, $ as IdentityCapture, a0 as IdentityDocumentSpec, a1 as IdentityFieldRule, a2 as IdentityRulesV1, a3 as IdentityStrategy, a4 as Image, a5 as InsufficientStockDetails, a7 as InvoiceAction, ad as InvoiceStage, ae as InvoiceSummary, af as InvoicingCapabilities, ah as LocationContacts, ai as LocationKind, ak as LocationPickup, am as MenuItem, ao as MoneyRange, ar as NextActionKind, at as OrderLine, au as OrderPickup, av as OrderProblem, ax as OrderProgressStep, ay as OrderSection, az as OrderStage, aA as OrderStepKey, aB as OrderStepState, aD as PageInfo, aE as PaymentAction, aG as PaymentAttemptStatus, aH as PaymentClient, aI as PaymentClientCsp, aK as PaymentFlow, aL as PaymentInfo, aM as PaymentMethod, aP as PaymentOption, aQ as PaymentOptionKey, aR as PaymentPoint, aV as PendingPaymentVoucher, aW as PickupOption, aY as ProductAttributeValue, aZ as ProductCategory, a$ as ProductOption, b2 as PromotionAnnouncement, b4 as PromotionTier, b7 as Refund, b9 as RegionFiscalEntry, ba as RegionFiscalId, bb as RegionPaymentMethod, bh as SEO, bi as Section, bj as SelectedOption, bm as ShipmentKind, bn as ShipmentMap, bp as ShipmentsSummary, bq as ShippingRate, bs as ShopBranch, bt as ShopContact, bu as ShopPolicies, bw as StorefrontErrorBody } from './types-C5nEQicj.cjs';
|
|
5
5
|
|
|
6
6
|
type QueryValue = string | number | boolean | null | undefined;
|
|
7
7
|
type QueryParams = Record<string, QueryValue | QueryValue[]>;
|
|
@@ -340,6 +340,18 @@ declare function createStorefrontClient(config: StorefrontClientOptions): {
|
|
|
340
340
|
* (`invoiceFileBytes`). `null` when the order, the document or the file does not exist or is not the buyer's.
|
|
341
341
|
*/
|
|
342
342
|
invoiceFile: (orderId: string, invoiceId: string, kind: InvoiceFileKind, options?: RequestOptions) => Promise<InvoiceFile | null>;
|
|
343
|
+
/**
|
|
344
|
+
* Saved fiscal profiles of the buyer (contract 1.9, `capabilities().fiscal_profiles`). Personal data: private,
|
|
345
|
+
* never cached, never logged. `422` with `field: 'fiscal.<field>'` when the region rejects a value; `409` for a
|
|
346
|
+
* repeated tax id or past the limit; `404` for a profile that is not the buyer's.
|
|
347
|
+
*/
|
|
348
|
+
fiscalProfiles: {
|
|
349
|
+
list: (options?: RequestOptions) => Promise<FiscalProfile[]>;
|
|
350
|
+
create: (profile: FiscalProfileInput, options?: WriteOptions) => Promise<FiscalProfile>;
|
|
351
|
+
update: (id: string, profile: FiscalProfileInput, options?: WriteOptions) => Promise<FiscalProfile>;
|
|
352
|
+
/** Physical delete (a profile leaves nothing behind). A saved default passes to another profile. */
|
|
353
|
+
delete: (id: string, options?: WriteOptions) => Promise<void>;
|
|
354
|
+
};
|
|
343
355
|
addresses: {
|
|
344
356
|
list: (options?: RequestOptions) => Promise<{
|
|
345
357
|
nodes: Address[];
|
|
@@ -887,4 +899,4 @@ type DeliveryNotices = {
|
|
|
887
899
|
/** Splits `delivery.unavailable` into the `missing_weight` notice and the generic one. */
|
|
888
900
|
declare function deliveryNotices(delivery: Pick<DeliveryOptions, 'unavailable' | 'partial'> | null | undefined): DeliveryNotices;
|
|
889
901
|
|
|
890
|
-
export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, RegionPostalCode, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
|
|
902
|
+
export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, FiscalProfile, FiscalProfileInput, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, RegionPostalCode, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
|
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 {
|
|
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,
|
|
3
|
+
import { b0 as ProductSort, bz as TokenIntrospection, br as Shop, b8 as Region, bc as RegionPostalCode, a_ as ProductConnection, aX as Product, y as Connection, x as Collection, aj as LocationListParams, ag as Location, ap as NearestLocation, bv as StockLevel, bd as RestockSubscriptionInput, be as RestockSubscriptionResult, m as CartLineInput, C as Cart, p as CartLineUpdateInput, f as CartBuyerInput, a as AddressInput, Q as DeliveryOptions, aN as PaymentMethods, O as DeliveryInput, ab as InvoiceRequest, b6 as RecommendationPlacement, s as CartRecommendations, u as CheckoutInput, w as CheckoutResult, b5 as PromotionsList, aJ as PaymentConfig, aS as PaymentSubmitInput, aF 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, as as Order, bg as ReturnRequestInput, bf as ReturnRequest, ac as InvoiceResult, aU as PendingPayment, aa as InvoiceFileKind, a9 as InvoiceFile, X as FiscalProfile, Y as FiscalProfileInput, A as Address, by as Theme, aC as Page, al as Menu, b as Article, bx as StorefrontErrorCode, a6 as InsufficientStockLine, an as Money, d as AvailabilityStatus, o as CartLineProblem, c as Availability, b1 as ProductVariant, N as DeclineCode, aT as PaymentVoucher, aO as PaymentNextStep, q as CartPromotions, b3 as PromotionReward, a8 as InvoiceDoc, bk as Shipment, aq as NextAction, aw as OrderProgress, bo as ShipmentStatus, bl as ShipmentEvent, P as DeliveryMethod, bA as UnavailableRateProvider } from './types-DSHzYSHU.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, Z as FiscalVerification, _ as GeoHint, $ as IdentityCapture, a0 as IdentityDocumentSpec, a1 as IdentityFieldRule, a2 as IdentityRulesV1, a3 as IdentityStrategy, a4 as Image, a5 as InsufficientStockDetails, a7 as InvoiceAction, ad as InvoiceStage, ae as InvoiceSummary, af as InvoicingCapabilities, ah as LocationContacts, ai as LocationKind, ak as LocationPickup, am as MenuItem, ao as MoneyRange, ar as NextActionKind, at as OrderLine, au as OrderPickup, av as OrderProblem, ax as OrderProgressStep, ay as OrderSection, az as OrderStage, aA as OrderStepKey, aB as OrderStepState, aD as PageInfo, aE as PaymentAction, aG as PaymentAttemptStatus, aH as PaymentClient, aI as PaymentClientCsp, aK as PaymentFlow, aL as PaymentInfo, aM as PaymentMethod, aP as PaymentOption, aQ as PaymentOptionKey, aR as PaymentPoint, aV as PendingPaymentVoucher, aW as PickupOption, aY as ProductAttributeValue, aZ as ProductCategory, a$ as ProductOption, b2 as PromotionAnnouncement, b4 as PromotionTier, b7 as Refund, b9 as RegionFiscalEntry, ba as RegionFiscalId, bb as RegionPaymentMethod, bh as SEO, bi as Section, bj as SelectedOption, bm as ShipmentKind, bn as ShipmentMap, bp as ShipmentsSummary, bq as ShippingRate, bs as ShopBranch, bt as ShopContact, bu as ShopPolicies, bw as StorefrontErrorBody } from './types-DSHzYSHU.js';
|
|
5
5
|
|
|
6
6
|
type QueryValue = string | number | boolean | null | undefined;
|
|
7
7
|
type QueryParams = Record<string, QueryValue | QueryValue[]>;
|
|
@@ -340,6 +340,18 @@ declare function createStorefrontClient(config: StorefrontClientOptions): {
|
|
|
340
340
|
* (`invoiceFileBytes`). `null` when the order, the document or the file does not exist or is not the buyer's.
|
|
341
341
|
*/
|
|
342
342
|
invoiceFile: (orderId: string, invoiceId: string, kind: InvoiceFileKind, options?: RequestOptions) => Promise<InvoiceFile | null>;
|
|
343
|
+
/**
|
|
344
|
+
* Saved fiscal profiles of the buyer (contract 1.9, `capabilities().fiscal_profiles`). Personal data: private,
|
|
345
|
+
* never cached, never logged. `422` with `field: 'fiscal.<field>'` when the region rejects a value; `409` for a
|
|
346
|
+
* repeated tax id or past the limit; `404` for a profile that is not the buyer's.
|
|
347
|
+
*/
|
|
348
|
+
fiscalProfiles: {
|
|
349
|
+
list: (options?: RequestOptions) => Promise<FiscalProfile[]>;
|
|
350
|
+
create: (profile: FiscalProfileInput, options?: WriteOptions) => Promise<FiscalProfile>;
|
|
351
|
+
update: (id: string, profile: FiscalProfileInput, options?: WriteOptions) => Promise<FiscalProfile>;
|
|
352
|
+
/** Physical delete (a profile leaves nothing behind). A saved default passes to another profile. */
|
|
353
|
+
delete: (id: string, options?: WriteOptions) => Promise<void>;
|
|
354
|
+
};
|
|
343
355
|
addresses: {
|
|
344
356
|
list: (options?: RequestOptions) => Promise<{
|
|
345
357
|
nodes: Address[];
|
|
@@ -887,4 +899,4 @@ type DeliveryNotices = {
|
|
|
887
899
|
/** Splits `delivery.unavailable` into the `missing_weight` notice and the generic one. */
|
|
888
900
|
declare function deliveryNotices(delivery: Pick<DeliveryOptions, 'unavailable' | 'partial'> | null | undefined): DeliveryNotices;
|
|
889
901
|
|
|
890
|
-
export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, RegionPostalCode, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
|
|
902
|
+
export { Address, AddressInput, Article, type ArticleListParams, Availability, type AvailabilityLocale, type AvailabilityMessageKey, type AvailabilityMessages, AvailabilityStatus, type AvailabilityTone, type AvailabilityView, type AvailabilityViewOptions, CLIENT_IP_HEADER, COUNTRY_HEADERS, Cart, CartBuyerInput, CartLineInput, CartLineProblem, type CartLineProblemView, CartLineUpdateInput, CartPromotions, CartRecommendations, CheckoutInput, CheckoutResult, Collection, type CollectionListParams, Connection, Customer, CustomerCapabilities, CustomerIdentifier, CustomerPasswordLoginInput, CustomerRegisterInput, CustomerRegisterResult, CustomerResetPasswordInput, CustomerSession, CustomerSessionInput, CustomerSetPasswordInput, CustomerUpdateInput, CustomerVerifyRegistrationInput, DeclineCode, type DeliveryChoice, type DeliveryChoiceKind, DeliveryInput, DeliveryMethod, type DeliveryNotices, DeliveryOptions, type DiagnoseOptions, type DiscountBarState, type DiscountBarView, type FetchLike, FiscalProfile, FiscalProfileInput, type FormatMoneyOptions, GeoPoint, InsufficientStockLine, InvoiceDoc, InvoiceFile, InvoiceFileKind, type InvoiceGroup, InvoiceRequest, InvoiceResult, Location, LocationListParams, MISSING_WEIGHT, type MarketInfo, type MarketSuggestion, Menu, Money, NOTE_MAX_LENGTH, NearestLocation, NextAction, Order, OrderProgress, PAYMENT_CHOICE_REFUSED_FIELD, PICKUP_STEPS, Page, type PaginationParams, PaymentAttemptResult, PaymentConfig, type PaymentErrorClass, type PaymentErrorClassKind, type PaymentErrorKind, type PaymentErrorLike, type PaymentErrorView, type PaymentLocale, type PaymentMessageKey, type PaymentMessages, PaymentMethods, PaymentNextStep, type PaymentOutcome, type PaymentOutcomeKind, PaymentSubmitInput, PaymentVoucher, PendingPayment, type PreviewOptions, Product, ProductConnection, type ProductListParams, ProductSort, ProductVariant, type PromoProgressView, type PromotionLocale, type PromotionMessageKey, type PromotionMessages, PromotionReward, PromotionsList, type QueryParams, type QueryValue, RecommendationPlacement, Region, RegionPostalCode, type RequestOptions, type ResolveAvailabilityOptions, RestockSubscriptionInput, RestockSubscriptionResult, ReturnRequest, ReturnRequestInput, SHIPPING_STEPS, Shipment, ShipmentEvent, ShipmentStatus, type ShippingBarState, type ShippingBarView, Shop, StockLevel, type StorefrontClient, type StorefrontClientOptions, StorefrontError, StorefrontErrorCode, type StorefrontErrorInit, type StorefrontRequestContext, type StorefrontResponseContext, Theme, TokenIntrospection, UnavailableRateProvider, type WriteOptions, appendParams, availabilityLocale, availabilityMessages, availabilityView, cartLineProblemView, clampPercent, classifyPaymentError, createStorefrontClient, declineMessage, declineMessageKey, deliveryInput, deliveryNotices, diagnose, formatAvailabilityMessage, formatMoney, formatVoucherExpiry, generateIdempotencyKey, groupInvoiceDocs, hreflangLinks, invoiceFileBytes, isStorefrontError, isTestInvoice, isTestShipment, isTokenPublishable, maskToken, negotiateLocale, nextAction, normalizeClientIp, normalizeNote, opsSaysNotRetryable, orderProgress, orderShipments, parseDelivery, parseMoney, parseProductFilters, paymentErrorView, paymentIdempotencyKey, paymentMessages, paymentOutcome, preferredLanguages, productAvailability, productListQuery, promoProgressView, promotionMessages, repairPath, resolveAvailability, rewardLabel, safeHttpsUrl, safeInvoiceFilename, safeTrackingUrl, schemaAvailability, shipmentsStatus, sortTrackingEvents, storefrontDomainHeader, suggestMarket, toMoney, visitorCountry };
|
package/dist/index.js
CHANGED
|
@@ -448,6 +448,18 @@ function createStorefrontClient(config) {
|
|
|
448
448
|
}
|
|
449
449
|
return { filename: file.filename, content_type: file.content_type, content_base64: file.content_base64 };
|
|
450
450
|
},
|
|
451
|
+
/**
|
|
452
|
+
* Saved fiscal profiles of the buyer (contract 1.9, `capabilities().fiscal_profiles`). Personal data: private,
|
|
453
|
+
* never cached, never logged. `422` with `field: 'fiscal.<field>'` when the region rejects a value; `409` for a
|
|
454
|
+
* repeated tax id or past the limit; `404` for a profile that is not the buyer's.
|
|
455
|
+
*/
|
|
456
|
+
fiscalProfiles: {
|
|
457
|
+
list: async (options) => (await get("/storefront/customer/fiscal-profiles", void 0, { ...options, cache: "no-store" })).nodes,
|
|
458
|
+
create: (profile, options) => write("POST", "/storefront/customer/fiscal-profiles", profile, options),
|
|
459
|
+
update: (id, profile, options) => write("PATCH", `/storefront/customer/fiscal-profiles/${enc(id)}`, profile, options),
|
|
460
|
+
/** Physical delete (a profile leaves nothing behind). A saved default passes to another profile. */
|
|
461
|
+
delete: (id, options) => write("DELETE", `/storefront/customer/fiscal-profiles/${enc(id)}`, void 0, options)
|
|
462
|
+
},
|
|
451
463
|
addresses: {
|
|
452
464
|
list: (options) => get("/storefront/customer/addresses", void 0, options),
|
|
453
465
|
create: (address, options) => write("POST", "/storefront/customer/addresses", address, options),
|