@sixtyninecommerce/client 0.24.0 → 0.25.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/README.md +21 -0
- package/dist/admin/forms.js +19 -0
- package/dist/admin/forms.js.map +1 -1
- package/dist/admin/http.d.ts +9 -0
- package/dist/admin/http.d.ts.map +1 -1
- package/dist/admin/http.js +3 -0
- package/dist/admin/http.js.map +1 -1
- package/dist/admin/index.d.ts +63 -0
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +67 -0
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/redirects.d.ts +6 -0
- package/dist/admin/redirects.d.ts.map +1 -1
- package/dist/admin/redirects.js +12 -0
- package/dist/admin/redirects.js.map +1 -1
- package/dist/admin/types.d.ts +63 -0
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/cache-tags.d.ts +19 -0
- package/dist/cache-tags.d.ts.map +1 -1
- package/dist/cache-tags.js +19 -0
- package/dist/cache-tags.js.map +1 -1
- package/dist/client.d.ts +17 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +17 -0
- package/dist/client.js.map +1 -1
- package/dist/commerce/age-verification.js +3 -3
- package/dist/commerce/age-verification.js.map +1 -1
- package/dist/commerce/branding.js +7 -0
- package/dist/commerce/branding.js.map +1 -1
- package/dist/commerce/cart.js +25 -0
- package/dist/commerce/cart.js.map +1 -1
- package/dist/commerce/checkout.d.ts +68 -0
- package/dist/commerce/checkout.d.ts.map +1 -1
- package/dist/commerce/checkout.js +83 -0
- package/dist/commerce/checkout.js.map +1 -1
- package/dist/commerce/customer.d.ts +58 -0
- package/dist/commerce/customer.d.ts.map +1 -1
- package/dist/commerce/customer.js +65 -0
- package/dist/commerce/customer.js.map +1 -1
- package/dist/commerce/pickup-location-parser.d.ts +18 -0
- package/dist/commerce/pickup-location-parser.d.ts.map +1 -1
- package/dist/commerce/pickup-location-parser.js +28 -0
- package/dist/commerce/pickup-location-parser.js.map +1 -1
- package/dist/commerce/placement-error.d.ts +52 -0
- package/dist/commerce/placement-error.d.ts.map +1 -1
- package/dist/commerce/placement-error.js +87 -0
- package/dist/commerce/placement-error.js.map +1 -1
- package/dist/commerce/products.d.ts +48 -0
- package/dist/commerce/products.d.ts.map +1 -1
- package/dist/commerce/products.js +92 -0
- package/dist/commerce/products.js.map +1 -1
- package/dist/commerce/queries.d.ts +113 -27
- package/dist/commerce/queries.d.ts.map +1 -1
- package/dist/commerce/queries.js +188 -2
- package/dist/commerce/queries.js.map +1 -1
- package/dist/commerce/quotes.js +33 -0
- package/dist/commerce/quotes.js.map +1 -1
- package/dist/commerce/saved-lists.d.ts +7 -7
- package/dist/commerce/saved-lists.d.ts.map +1 -1
- package/dist/commerce/saved-lists.js +1 -1
- package/dist/commerce/search.js +3 -0
- package/dist/commerce/search.js.map +1 -1
- package/dist/commerce/shipping.js +3 -3
- package/dist/commerce/shipping.js.map +1 -1
- package/dist/commerce/stock-notifications.d.ts +11 -0
- package/dist/commerce/stock-notifications.d.ts.map +1 -1
- package/dist/commerce/stock-notifications.js +11 -0
- package/dist/commerce/stock-notifications.js.map +1 -1
- package/dist/commerce/vat-validation.js +4 -4
- package/dist/commerce/vat-validation.js.map +1 -1
- package/dist/constants.d.ts +31 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +32 -0
- package/dist/constants.js.map +1 -1
- package/dist/content/asset-urls.d.ts +50 -0
- package/dist/content/asset-urls.d.ts.map +1 -1
- package/dist/content/asset-urls.js +92 -0
- package/dist/content/asset-urls.js.map +1 -1
- package/dist/content/assets.d.ts +15 -0
- package/dist/content/assets.d.ts.map +1 -1
- package/dist/content/assets.js +15 -0
- package/dist/content/assets.js.map +1 -1
- package/dist/content/collection-pages.d.ts +5 -0
- package/dist/content/collection-pages.d.ts.map +1 -1
- package/dist/content/collection-pages.js +8 -0
- package/dist/content/collection-pages.js.map +1 -1
- package/dist/content/collections.d.ts +14 -0
- package/dist/content/collections.d.ts.map +1 -1
- package/dist/content/collections.js +16 -0
- package/dist/content/collections.js.map +1 -1
- package/dist/content/filtered-products.d.ts +18 -0
- package/dist/content/filtered-products.d.ts.map +1 -1
- package/dist/content/filtered-products.js +16 -0
- package/dist/content/filtered-products.js.map +1 -1
- package/dist/content/form-field-types.d.ts +6 -0
- package/dist/content/form-field-types.d.ts.map +1 -1
- package/dist/content/form-field-types.js +12 -0
- package/dist/content/form-field-types.js.map +1 -1
- package/dist/content/forms.d.ts +16 -0
- package/dist/content/forms.d.ts.map +1 -1
- package/dist/content/forms.js +23 -0
- package/dist/content/forms.js.map +1 -1
- package/dist/content/items.d.ts +26 -0
- package/dist/content/items.d.ts.map +1 -1
- package/dist/content/items.js +33 -0
- package/dist/content/items.js.map +1 -1
- package/dist/content/resolve.js +6 -0
- package/dist/content/resolve.js.map +1 -1
- package/dist/content/sitemap.d.ts +5 -0
- package/dist/content/sitemap.d.ts.map +1 -1
- package/dist/content/sitemap.js +5 -0
- package/dist/content/sitemap.js.map +1 -1
- package/dist/core/context.js +6 -0
- package/dist/core/context.js.map +1 -1
- package/dist/core/headers.js +2 -0
- package/dist/core/headers.js.map +1 -1
- package/dist/core/http.d.ts +8 -0
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +89 -1
- package/dist/core/http.js.map +1 -1
- package/dist/credit/credit-status.js +2 -2
- package/dist/credit/credit-status.js.map +1 -1
- package/dist/credit/payment-terms.js +2 -2
- package/dist/credit/payment-terms.js.map +1 -1
- package/dist/currency/exchange.d.ts +11 -0
- package/dist/currency/exchange.d.ts.map +1 -1
- package/dist/currency/exchange.js +11 -0
- package/dist/currency/exchange.js.map +1 -1
- package/dist/errors.d.ts +50 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +48 -2
- package/dist/errors.js.map +1 -1
- package/dist/events/envelope.d.ts +36 -0
- package/dist/events/envelope.d.ts.map +1 -1
- package/dist/events/envelope.js +12 -0
- package/dist/events/envelope.js.map +1 -1
- package/dist/events/index.d.ts +13 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +13 -0
- package/dist/events/index.js.map +1 -1
- package/dist/events/payloads.d.ts +19 -0
- package/dist/events/payloads.d.ts.map +1 -1
- package/dist/events/payloads.js +12 -0
- package/dist/events/payloads.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/media/index.js +2 -0
- package/dist/media/index.js.map +1 -1
- package/dist/media/urls.d.ts +52 -0
- package/dist/media/urls.d.ts.map +1 -1
- package/dist/media/urls.js +38 -0
- package/dist/media/urls.js.map +1 -1
- package/dist/media/video.d.ts +16 -0
- package/dist/media/video.d.ts.map +1 -1
- package/dist/media/video.js +16 -0
- package/dist/media/video.js.map +1 -1
- package/dist/next/artifact-handler.d.ts +22 -0
- package/dist/next/artifact-handler.d.ts.map +1 -1
- package/dist/next/artifact-handler.js +22 -0
- package/dist/next/artifact-handler.js.map +1 -1
- package/dist/next/event-revalidate-handler.d.ts +67 -0
- package/dist/next/event-revalidate-handler.d.ts.map +1 -1
- package/dist/next/event-revalidate-handler.js +48 -0
- package/dist/next/event-revalidate-handler.js.map +1 -1
- package/dist/next/index.d.ts +6 -0
- package/dist/next/index.d.ts.map +1 -1
- package/dist/next/index.js +6 -0
- package/dist/next/index.js.map +1 -1
- package/dist/next/json-ld.d.ts +9 -0
- package/dist/next/json-ld.d.ts.map +1 -1
- package/dist/next/json-ld.js +9 -0
- package/dist/next/json-ld.js.map +1 -1
- package/dist/next/metadata.d.ts +18 -0
- package/dist/next/metadata.d.ts.map +1 -1
- package/dist/next/metadata.js +21 -0
- package/dist/next/metadata.js.map +1 -1
- package/dist/next/redirect-middleware.d.ts +39 -0
- package/dist/next/redirect-middleware.d.ts.map +1 -1
- package/dist/next/redirect-middleware.js +32 -0
- package/dist/next/redirect-middleware.js.map +1 -1
- package/dist/next/revalidate-handler.d.ts +30 -0
- package/dist/next/revalidate-handler.d.ts.map +1 -1
- package/dist/next/revalidate-handler.js +22 -0
- package/dist/next/revalidate-handler.js.map +1 -1
- package/dist/order-scope.d.ts +27 -0
- package/dist/order-scope.d.ts.map +1 -1
- package/dist/order-scope.js +29 -0
- package/dist/order-scope.js.map +1 -1
- package/dist/pricing/format.d.ts +17 -0
- package/dist/pricing/format.d.ts.map +1 -1
- package/dist/pricing/format.js +19 -0
- package/dist/pricing/format.js.map +1 -1
- package/dist/pricing/index.d.ts +8 -1
- package/dist/pricing/index.d.ts.map +1 -1
- package/dist/pricing/index.js +18 -2
- package/dist/pricing/index.js.map +1 -1
- package/dist/pricing/tax-display.d.ts +77 -0
- package/dist/pricing/tax-display.d.ts.map +1 -1
- package/dist/pricing/tax-display.js +85 -0
- package/dist/pricing/tax-display.js.map +1 -1
- package/dist/pricing/tiers.d.ts +9 -0
- package/dist/pricing/tiers.d.ts.map +1 -1
- package/dist/pricing/tiers.js +9 -0
- package/dist/pricing/tiers.js.map +1 -1
- package/dist/pricing/validation.d.ts +56 -1
- package/dist/pricing/validation.d.ts.map +1 -1
- package/dist/pricing/validation.js +61 -0
- package/dist/pricing/validation.js.map +1 -1
- package/dist/redirects/index.d.ts +1 -0
- package/dist/redirects/index.d.ts.map +1 -1
- package/dist/redirects/index.js +1 -0
- package/dist/redirects/index.js.map +1 -1
- package/dist/redirects/store.d.ts +20 -0
- package/dist/redirects/store.d.ts.map +1 -1
- package/dist/redirects/store.js +57 -0
- package/dist/redirects/store.js.map +1 -1
- package/dist/redirects/types.d.ts +24 -0
- package/dist/redirects/types.d.ts.map +1 -1
- package/dist/redirects/types.js +1 -0
- package/dist/redirects/types.js.map +1 -1
- package/dist/revalidation/event-plan.d.ts +48 -0
- package/dist/revalidation/event-plan.d.ts.map +1 -1
- package/dist/revalidation/event-plan.js +61 -0
- package/dist/revalidation/event-plan.js.map +1 -1
- package/dist/revalidation/event-verify.d.ts +25 -0
- package/dist/revalidation/event-verify.d.ts.map +1 -1
- package/dist/revalidation/event-verify.js +27 -0
- package/dist/revalidation/event-verify.js.map +1 -1
- package/dist/revalidation/types.d.ts +20 -0
- package/dist/revalidation/types.d.ts.map +1 -1
- package/dist/revalidation/types.js +10 -0
- package/dist/revalidation/types.js.map +1 -1
- package/dist/revalidation/url-context.d.ts +25 -0
- package/dist/revalidation/url-context.d.ts.map +1 -1
- package/dist/revalidation/url-context.js +17 -0
- package/dist/revalidation/url-context.js.map +1 -1
- package/dist/revalidation/verify.d.ts +8 -0
- package/dist/revalidation/verify.d.ts.map +1 -1
- package/dist/revalidation/verify.js +8 -0
- package/dist/revalidation/verify.js.map +1 -1
- package/dist/seo/ai.d.ts +17 -0
- package/dist/seo/ai.d.ts.map +1 -1
- package/dist/seo/ai.js +12 -0
- package/dist/seo/ai.js.map +1 -1
- package/dist/seo/alternates.js +13 -0
- package/dist/seo/alternates.js.map +1 -1
- package/dist/seo/artifacts.d.ts +13 -0
- package/dist/seo/artifacts.d.ts.map +1 -1
- package/dist/seo/artifacts.js +19 -0
- package/dist/seo/artifacts.js.map +1 -1
- package/dist/seo/canonical.d.ts +15 -0
- package/dist/seo/canonical.d.ts.map +1 -1
- package/dist/seo/canonical.js +24 -0
- package/dist/seo/canonical.js.map +1 -1
- package/dist/seo/index.js +6 -0
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/json-ld.d.ts +13 -0
- package/dist/seo/json-ld.d.ts.map +1 -1
- package/dist/seo/json-ld.js +32 -0
- package/dist/seo/json-ld.js.map +1 -1
- package/dist/seo/locale-tag.d.ts +31 -0
- package/dist/seo/locale-tag.d.ts.map +1 -1
- package/dist/seo/locale-tag.js +31 -0
- package/dist/seo/locale-tag.js.map +1 -1
- package/dist/seo/meta-tags.d.ts +29 -0
- package/dist/seo/meta-tags.d.ts.map +1 -1
- package/dist/seo/meta-tags.js +28 -0
- package/dist/seo/meta-tags.js.map +1 -1
- package/dist/seo/metadata-parser.d.ts +24 -0
- package/dist/seo/metadata-parser.d.ts.map +1 -1
- package/dist/seo/metadata-parser.js +38 -0
- package/dist/seo/metadata-parser.js.map +1 -1
- package/dist/seo/metadata-types.d.ts +16 -0
- package/dist/seo/metadata-types.d.ts.map +1 -1
- package/dist/seo/product-path.d.ts +96 -0
- package/dist/seo/product-path.d.ts.map +1 -1
- package/dist/seo/product-path.js +96 -0
- package/dist/seo/product-path.js.map +1 -1
- package/dist/seo/robots.d.ts +17 -0
- package/dist/seo/robots.d.ts.map +1 -1
- package/dist/seo/robots.js +12 -0
- package/dist/seo/robots.js.map +1 -1
- package/dist/seo/types.d.ts +39 -0
- package/dist/seo/types.d.ts.map +1 -1
- package/dist/seo/url-builder.d.ts +31 -0
- package/dist/seo/url-builder.d.ts.map +1 -1
- package/dist/seo/url-builder.js +36 -0
- package/dist/seo/url-builder.js.map +1 -1
- package/dist/types.d.ts +1163 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cache-tags.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cache-tag convention shared by this SDK's fetches and its revalidation
|
|
3
|
+
* handlers. One module, so the tag a fetch is stamped with and the tag an event
|
|
4
|
+
* purges can never be spelled differently.
|
|
5
|
+
*
|
|
6
|
+
* - `product:<productId>` — Vendure product id. Purged by `product.*` and
|
|
7
|
+
* `product_variant.price_changed`.
|
|
8
|
+
* - `collection:<collectionId>` — Vendure collection id. Purged by
|
|
9
|
+
* `collection.membership_changed`.
|
|
10
|
+
* - `seo-artifact` — the platform-rendered sitemap/robots/llms.txt proxied by
|
|
11
|
+
* `createSeoArtifactHandler`. The event handler purges it with every plan
|
|
12
|
+
* that revalidates anything; the legacy dispatcher lists it in every
|
|
13
|
+
* delivery's `tags`.
|
|
14
|
+
*/
|
|
1
15
|
export const SEO_ARTIFACT_TAG = 'seo-artifact';
|
|
2
16
|
export function productCacheTag(productId) {
|
|
3
17
|
return `product:${productId}`;
|
|
@@ -5,6 +19,11 @@ export function productCacheTag(productId) {
|
|
|
5
19
|
export function collectionCacheTag(collectionId) {
|
|
6
20
|
return `collection:${collectionId}`;
|
|
7
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* The tags a page resolved from a routes-manifest entry should read with: the
|
|
24
|
+
* entry's own id tag for a product or collection, none for a CMS page (content
|
|
25
|
+
* events revalidate those by path).
|
|
26
|
+
*/
|
|
8
27
|
export function cacheTagsForRoute(route) {
|
|
9
28
|
if (route.type === 'product')
|
|
10
29
|
return [productCacheTag(route.id)];
|
package/dist/cache-tags.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-tags.js","sourceRoot":"","sources":["../src/cache-tags.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cache-tags.js","sourceRoot":"","sources":["../src/cache-tags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE/C,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,OAAO,WAAW,SAAS,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,YAAoB;IACrD,OAAO,cAAc,YAAY,EAAE,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAqD;IACrF,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACjE,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACvE,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
import type { StorefrontClient, StorefrontClientConfig } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Create a storefront client.
|
|
4
|
+
*
|
|
5
|
+
* Resolves the channel from CMS and fetches Vendure channel custom fields
|
|
6
|
+
* before returning the fully initialized client.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const client = await createStorefrontClient({
|
|
11
|
+
* storeCode: 'fashion-store',
|
|
12
|
+
* cdnUrl: 'https://cdn.fashion-store.com',
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* const product = await client.commerce.getProduct('blue-shirt');
|
|
16
|
+
* const formatted = client.pricing.formatPrice(product.variants[0].price);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
2
19
|
export declare function createStorefrontClient(config: StorefrontClientConfig): Promise<StorefrontClient>;
|
|
3
20
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAc,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAc,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEvF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,gBAAgB,CAAC,CAwC3B"}
|
package/dist/client.js
CHANGED
|
@@ -9,6 +9,23 @@ import { createNavigationModule } from './navigation/index.js';
|
|
|
9
9
|
import { createPricingModule } from './pricing/index.js';
|
|
10
10
|
import { createRedirectsModule } from './redirects/index.js';
|
|
11
11
|
import { createSeoModule } from './seo/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* Create a storefront client.
|
|
14
|
+
*
|
|
15
|
+
* Resolves the channel from CMS and fetches Vendure channel custom fields
|
|
16
|
+
* before returning the fully initialized client.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const client = await createStorefrontClient({
|
|
21
|
+
* storeCode: 'fashion-store',
|
|
22
|
+
* cdnUrl: 'https://cdn.fashion-store.com',
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* const product = await client.commerce.getProduct('blue-shirt');
|
|
26
|
+
* const formatted = client.pricing.formatPrice(product.variants[0].price);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
12
29
|
export async function createStorefrontClient(config) {
|
|
13
30
|
const ctx = await createStoreContext(config);
|
|
14
31
|
const http = createHttpClient(ctx);
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,C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C;QAErC,WAAW,CAAC,IAAY;YACtB,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC;QAC1B,CAAC;QACD,WAAW;YACT,OAAO,GAAG,CAAC,YAAY,CAAC;QAC1B,CAAC;QACD,YAAY,CAAC,KAAa;YACxB,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;QACxB,CAAC;QACD,cAAc;YACZ,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;QACvB,CAAC;QACD,aAAa,CAAC,KAAwB;YACpC,GAAG,CAAC,UAAU,GAAG,KAAK,CAAC;QACzB,CAAC;QACD,aAAa;YACX,OAAO,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC;QAChC,CAAC;QACD,OAAO,CAAc,KAAa,EAAE,SAAmC;YACrE,OAAO,IAAI,CAAC,OAAO,CAAI,KAAK,EAAE,SAAS,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const AGE_VERIFICATION_STATUS = `
|
|
1
|
+
const AGE_VERIFICATION_STATUS = /* GraphQL */ `
|
|
2
2
|
query AgeVerificationStatus {
|
|
3
3
|
ageVerificationStatus {
|
|
4
4
|
required
|
|
@@ -8,7 +8,7 @@ const AGE_VERIFICATION_STATUS = `
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
`;
|
|
11
|
-
const SUBMIT_DATE_OF_BIRTH = `
|
|
11
|
+
const SUBMIT_DATE_OF_BIRTH = /* GraphQL */ `
|
|
12
12
|
mutation SubmitDateOfBirth($dateOfBirth: DateTime!) {
|
|
13
13
|
submitDateOfBirth(dateOfBirth: $dateOfBirth) {
|
|
14
14
|
required
|
|
@@ -18,7 +18,7 @@ const SUBMIT_DATE_OF_BIRTH = `
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
|
-
const CONFIRM_AGE = `
|
|
21
|
+
const CONFIRM_AGE = /* GraphQL */ `
|
|
22
22
|
mutation ConfirmAge {
|
|
23
23
|
confirmAge {
|
|
24
24
|
required
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"age-verification.js","sourceRoot":"","sources":["../../src/commerce/age-verification.ts"],"names":[],"mappings":"AAGA,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"age-verification.js","sourceRoot":"","sources":["../../src/commerce/age-verification.ts"],"names":[],"mappings":"AAGA,MAAM,uBAAuB,GAAG,aAAa,CAAC;;;;;;;;;CAS7C,CAAC;AAEF,MAAM,oBAAoB,GAAG,aAAa,CAAC;;;;;;;;;CAS1C,CAAC;AAEF,MAAM,WAAW,GAAG,aAAa,CAAC;;;;;;;;;CASjC,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAAC,IAAgB;IAC3D,OAAO;QACL,KAAK,CAAC,wBAAwB;YAC5B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,uBAAuB,CACxB,CAAC;YACF,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACpC,CAAC;QAED,KAAK,CAAC,iBAAiB,CAAC,WAAmB;YACzC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,oBAAoB,EACpB,EAAE,WAAW,EAAE,CAChB,CAAC;YACF,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAChC,CAAC;QAED,KAAK,CAAC,UAAU;YACd,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAwC,WAAW,CAAC,CAAC;YACpF,OAAO,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -14,6 +14,13 @@ export function createBrandingMethods(http, ctx) {
|
|
|
14
14
|
const uniqueIds = [...new Set(channelAssetIds)];
|
|
15
15
|
const data = await http.graphql(GET_BRANDING, { ids: uniqueIds }, options);
|
|
16
16
|
const channelAssetsById = new Map(data.brandingAssets.map((a) => [a.id, a]));
|
|
17
|
+
// The prefix-stripping resolver, not the raw prefixer. On a channel with
|
|
18
|
+
// its own CDN domain the white-label Worker rebuilds the R2 key as
|
|
19
|
+
// `${channelCode}/${requestPath}` (infrastructure/white-label-worker), so a
|
|
20
|
+
// URL that still carries `rollz/` resolves to `rollz/rollz/source/...` and
|
|
21
|
+
// 404s. The media module has always stripped it; branding did not, so logo,
|
|
22
|
+
// favicon and font files were broken on exactly the tenants that configure
|
|
23
|
+
// their own domain — the same defect as the og:image one this branch fixes.
|
|
17
24
|
const resolveAssetUrl = createContextAssetUrlResolver(ctx);
|
|
18
25
|
const toRef = (asset) => {
|
|
19
26
|
if (!asset)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branding.js","sourceRoot":"","sources":["../../src/commerce/branding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AASrE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAkB5C,MAAM,UAAU,qBAAqB,CAAC,IAAgB,EAAE,GAAiB;IACvE,OAAO;QACL,KAAK,CAAC,WAAW,CAAC,OAAwB;YACxC,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC;YACpC,MAAM,eAAe,GAAG;gBACtB,UAAU,CAAC,EAAE,CAAC,WAAW,CAAC;gBAC1B,UAAU,CAAC,EAAE,CAAC,eAAe,CAAC;gBAC9B,UAAU,CAAC,EAAE,CAAC,YAAY,CAAC;gBAC3B,UAAU,CAAC,EAAE,CAAC,cAAc,CAAC;aAC9B,CAAC,MAAM,CAAC,CAAC,EAAE,EAAgB,EAAE,CAAC,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YACpE,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;YAEhD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAS5B,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C,MAAM,CAAC;YAAE,OAAO,IAAI,CAAC;QACxF,MAAM,MAAM,GAA2B,EAAE,CAAC;QAC1C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAiC,CAAC,EAAE,CAAC;YACvE,IAAI,OAAO,CAAC,KAAK,QAAQ;gBAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/commerce/cart.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { MutationError } from '../errors.js';
|
|
2
2
|
import { insufficientStockLine, toMutationError } from './placement-error.js';
|
|
3
3
|
import { ACTIVE_ORDER, ADD_ITEMS_TO_CART, ADD_TO_CART, ADJUST_ORDER_LINE, APPLY_COUPON, REMOVE_ALL_ORDER_LINES, REMOVE_COUPON, REMOVE_ORDER_LINE, } from './queries.js';
|
|
4
|
+
/**
|
|
5
|
+
* Unwrap an `Order`-union cart mutation, throwing the ErrorResult members.
|
|
6
|
+
*
|
|
7
|
+
* An `InsufficientStockError` arrives as `error.code === 'INSUFFICIENT_STOCK'`
|
|
8
|
+
* with `error.lines[0]` naming the variant/line it is about, so a cart can
|
|
9
|
+
* highlight the offending row instead of showing "not enough stock" about
|
|
10
|
+
* nothing in particular. Remember the error doubles as a WARNING: a partial
|
|
11
|
+
* shortfall adds the line at the reduced quantity AND returns it — compare
|
|
12
|
+
* `quantityRequested` with `quantityAvailable` to tell the two apart.
|
|
13
|
+
*/
|
|
4
14
|
function unwrapOrderResult(data, operationField) {
|
|
5
15
|
const result = data[operationField];
|
|
6
16
|
if (!result) {
|
|
@@ -30,8 +40,23 @@ export function createCartMethods(http) {
|
|
|
30
40
|
if (!result) {
|
|
31
41
|
throw new MutationError('UNKNOWN_ERROR', 'No result from addItemsToOrder');
|
|
32
42
|
}
|
|
43
|
+
// addItemsToOrder is partial-success: items before the failing one are
|
|
44
|
+
// already on the order. Surface the first per-item error, but attach the
|
|
45
|
+
// partially-mutated order + every errorResult to `error.fields` so the
|
|
46
|
+
// caller can reconcile what landed (and avoid a double-add on retry).
|
|
47
|
+
//
|
|
48
|
+
// Spreading the failing entry is what puts its `inputIndex` (and the
|
|
49
|
+
// stock identity) on `error.fields`; every OTHER failing input keeps its
|
|
50
|
+
// own `inputIndex` on its `errorResults` entry, which is what maps a
|
|
51
|
+
// failure back to the INPUT the caller submitted.
|
|
33
52
|
const firstError = result.errorResults[0];
|
|
34
53
|
if (firstError) {
|
|
54
|
+
// `error.lines` is the UNION across every failing input, in input
|
|
55
|
+
// order. Deriving it from `firstError` alone would silently mark one
|
|
56
|
+
// row of a five-row failure — the caller would have to re-walk
|
|
57
|
+
// `fields.errorResults` to find the rest, which is the very work this
|
|
58
|
+
// hoist exists to remove. Entries that name no variant (an
|
|
59
|
+
// interceptor veto, an unattributed refusal) contribute nothing.
|
|
35
60
|
const lines = result.errorResults.reduce((acc, entry) => {
|
|
36
61
|
const line = entry.errorCode === 'INSUFFICIENT_STOCK_ERROR'
|
|
37
62
|
? insufficientStockLine(entry)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.js","sourceRoot":"","sources":["../../src/commerce/cart.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,iBAAiB,GAClB,MAAM,cAAc,CAAC;
|
|
1
|
+
{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;gBACN,QAAQ;aACT,CAAC,CAAC;YACH,OAAO,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,CAAC,cAAc,CAAC,MAAc;YACjC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAA0B,iBAAiB,EAAE;gBAC1E,MAAM;aACP,CAAC,CAAC;YACH,OAAO,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,CAAC,SAAS;YACb,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAA0B,sBAAsB,CAAC,CAAC;YACjF,OAAO,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;QACxD,CAAC;QAED,KAAK,CAAC,eAAe,CAAC,IAAY;YAChC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAA0B,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;YACjF,OAAO,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,CAAC,gBAAgB,CAAC,IAAY;YACjC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAA8B,aAAa,EAAE;gBAC1E,IAAI;aACL,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,gBAAgB,CAAC;QAC/B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,16 @@ import type { HttpClient, RequestOptions } from '../core/http.js';
|
|
|
2
2
|
import type { ActiveChannelOrderConstraints, AddressInput, CustomerDeliveryTerms, CustomerInput, Order, OrderPaymentIntent, PaymentInput, PaymentMethod, PickupLocation, PickupLocationSearchInput, ShippingMethod, StoreContext } from '../types.js';
|
|
3
3
|
export declare function createCheckoutMethods(http: HttpClient, ctx?: StoreContext): {
|
|
4
4
|
setCustomerForOrder(input: CustomerInput): Promise<Order>;
|
|
5
|
+
/**
|
|
6
|
+
* Set the order's delivery address.
|
|
7
|
+
*
|
|
8
|
+
* Also drops the cached tax display mode. The shopper's country is the
|
|
9
|
+
* FIRST thing the channel's display policy looks at and it is read from
|
|
10
|
+
* this address, so moving the order to a tax-exclusive country (US) flips
|
|
11
|
+
* the whole cart to net — the one input that changes the mode without
|
|
12
|
+
* changing the identity the cache is stamped with. The next
|
|
13
|
+
* `pricing.getTaxDisplayMode()` therefore re-resolves.
|
|
14
|
+
*/
|
|
5
15
|
setShippingAddress(input: AddressInput): Promise<Order>;
|
|
6
16
|
setBillingAddress(input: AddressInput): Promise<Order>;
|
|
7
17
|
getEligibleShippingMethods(): Promise<ShippingMethod[]>;
|
|
@@ -9,12 +19,70 @@ export declare function createCheckoutMethods(http: HttpClient, ctx?: StoreConte
|
|
|
9
19
|
setShippingMethod(ids: string[]): Promise<Order>;
|
|
10
20
|
applyPreferredShippingMethod(): Promise<Order>;
|
|
11
21
|
getEligiblePaymentMethods(): Promise<PaymentMethod[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Order minimums in effect on the active channel — for display and cart
|
|
24
|
+
* pre-validation (e.g. "Minimum order €375"). Checkout enforces them
|
|
25
|
+
* server-side at the ArrangingPayment transition regardless.
|
|
26
|
+
*/
|
|
12
27
|
getOrderConstraints(): Promise<ActiveChannelOrderConstraints>;
|
|
28
|
+
/**
|
|
29
|
+
* Tell the engine how the buyer intends to pay, and get the re-priced order
|
|
30
|
+
* back.
|
|
31
|
+
*
|
|
32
|
+
* Call it whenever the buyer picks or changes a payment method, BEFORE
|
|
33
|
+
* `transitionToArrangingPayment()` and `addPayment()`: `PAY_NOW` for an
|
|
34
|
+
* immediate method (iDEAL, card), `PAY_ON_ACCOUNT` for a net-terms method.
|
|
35
|
+
* A merchant may attach a discount to paying now, so the returned order's
|
|
36
|
+
* `discounts`, `promotions` and `totalWithTax` are what the buyer must be
|
|
37
|
+
* shown — this is the call that makes the cart total match the payment page.
|
|
38
|
+
*
|
|
39
|
+
* The intent is enforced at payment time: authorizing a pay-on-account
|
|
40
|
+
* method on an order marked `PAY_NOW` fails with
|
|
41
|
+
* `error.code === 'PAYMENT_INTENT_MISMATCH'`. Recover by calling this again
|
|
42
|
+
* with the other value and retrying the payment — never by hiding the
|
|
43
|
+
* error, since the totals differ between the two.
|
|
44
|
+
*
|
|
45
|
+
* Allowed while the order is a cart (`AddingItems`) or in
|
|
46
|
+
* `ArrangingPayment`; later states throw. Setting the same value twice is
|
|
47
|
+
* harmless.
|
|
48
|
+
*
|
|
49
|
+
* Acts on the session's active order, like every other checkout call here.
|
|
50
|
+
* It takes no `activeOrderInput`: the engine offers that argument only on a
|
|
51
|
+
* fixed list of core operations, so a storefront that runs two carts
|
|
52
|
+
* (consumer/trade) must select this one with the same `x-order-scope`
|
|
53
|
+
* header it sends on its other requests.
|
|
54
|
+
*
|
|
55
|
+
* The returned order is the only one that carries
|
|
56
|
+
* `customFields.paymentIntent`: ordinary cart reads do not select it, so
|
|
57
|
+
* this client keeps working against an engine that predates the field.
|
|
58
|
+
* Hold the buyer's choice in your own state and re-read it from here.
|
|
59
|
+
*
|
|
60
|
+
* @param intent - `PAY_NOW` or `PAY_ON_ACCOUNT`.
|
|
61
|
+
*/
|
|
13
62
|
setPaymentIntent(intent: OrderPaymentIntent): Promise<Order>;
|
|
14
63
|
transitionToArrangingPayment(): Promise<Order>;
|
|
15
64
|
addPayment(input: PaymentInput): Promise<Order>;
|
|
65
|
+
/**
|
|
66
|
+
* Search for pickup locations near a postcode for a given carrier.
|
|
67
|
+
* Carrier-agnostic — the backend dispatches to the configured provider
|
|
68
|
+
* (currently MyParcel; future Sendcloud/Hendriks).
|
|
69
|
+
*/
|
|
16
70
|
findPickupLocations(input: PickupLocationSearchInput): Promise<PickupLocation[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Persist the customer's chosen pickup location onto the active order.
|
|
73
|
+
* The backend re-validates the submitted location against the provider's
|
|
74
|
+
* current search results before persisting — clients cannot post
|
|
75
|
+
* arbitrary JSON.
|
|
76
|
+
*
|
|
77
|
+
* The argument is parsed at the SDK boundary so client code that hand-
|
|
78
|
+
* builds the location object (e.g. cached from an earlier session) gets
|
|
79
|
+
* a clear `StorefrontError` instead of an opaque `MutationError`.
|
|
80
|
+
*/
|
|
17
81
|
selectPickupLocation(location: PickupLocation): Promise<Order>;
|
|
82
|
+
/**
|
|
83
|
+
* Read the pickup location currently stored on the active order. Returns
|
|
84
|
+
* `null` when no selection has been made or there is no active order.
|
|
85
|
+
*/
|
|
18
86
|
getActivePickupLocation(): Promise<PickupLocation | null>;
|
|
19
87
|
};
|
|
20
88
|
//# sourceMappingURL=checkout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EACV,6BAA6B,EAC7B,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,KAAK,EACL,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,YAAY,EACb,MAAM,aAAa,CAAC;AAkDrB,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,YAAY;+BAErC,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EACV,6BAA6B,EAC7B,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,KAAK,EACL,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,YAAY,EACb,MAAM,aAAa,CAAC;AAkDrB,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,YAAY;+BAErC,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;IAK/D;;;;;;;;;OASG;8BAC6B,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;6BAU9B,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;kCAOxB,OAAO,CAAC,cAAc,EAAE,CAAC;+BAO5B,cAAc,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;2BAS1D,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC;oCAOhB,OAAO,CAAC,KAAK,CAAC;iCAKjB,OAAO,CAAC,aAAa,EAAE,CAAC;IAO3D;;;;OAIG;2BAC0B,OAAO,CAAC,6BAA6B,CAAC;IAOnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;6BAC4B,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC;oCAK5B,OAAO,CAAC,KAAK,CAAC;sBAK5B,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;IAOrD;;;;OAIG;+BAC8B,yBAAyB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAOtF;;;;;;;;;OASG;mCACkC,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC;IAQpE;;;OAGG;+BAC8B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;EAOlE"}
|
|
@@ -2,6 +2,20 @@ import { MutationError } from '../errors.js';
|
|
|
2
2
|
import { normalizePickupLocationInput, parseOptionalPickupLocation, parsePickupLocations, } from './pickup-location-parser.js';
|
|
3
3
|
import { toMutationError } from './placement-error.js';
|
|
4
4
|
import { ACTIVE_CHANNEL_ORDER_CONSTRAINTS, ACTIVE_ORDER_PICKUP_LOCATION, ADD_PAYMENT, APPLY_PREFERRED_SHIPPING_METHOD, ELIGIBLE_PAYMENT_METHODS, ELIGIBLE_SHIPPING_METHODS, MY_DELIVERY_TERMS, PICKUP_LOCATIONS, SET_ACTIVE_ORDER_PICKUP_LOCATION, SET_BILLING_ADDRESS, SET_CUSTOMER, SET_PAYMENT_INTENT, SET_SHIPPING_ADDRESS, SET_SHIPPING_METHOD, TRANSITION_TO_ARRANGING_PAYMENT, } from './queries.js';
|
|
5
|
+
/**
|
|
6
|
+
* Unwrap a `Result`-union mutation, throwing the ErrorResult members.
|
|
7
|
+
*
|
|
8
|
+
* Every refusal a checkout mutation can return is hoisted by
|
|
9
|
+
* `toMutationError`: `error.code` names WHY (`ORDER_MINIMUM_AMOUNT_NOT_MET`,
|
|
10
|
+
* `PAYMENT_TERMS_UNAVAILABLE`, …) and `error.message` is already the best
|
|
11
|
+
* shopper-safe prose available — `placement.customerMessage` when the engine
|
|
12
|
+
* supplied one, else a vetted operator reason (`transitionError` /
|
|
13
|
+
* `interceptorError`), else the ErrorResult's generic template.
|
|
14
|
+
* `paymentErrorMessage` is deliberately NOT part of that walk — it can carry
|
|
15
|
+
* acquirer/ERP detail a shopper must never read — so a declined payment
|
|
16
|
+
* without `placement` keeps the generic message; the raw text stays on
|
|
17
|
+
* `error.fields.paymentErrorMessage` (see `placement-error.ts`).
|
|
18
|
+
*/
|
|
5
19
|
function unwrapResult(data, field) {
|
|
6
20
|
const result = data[field];
|
|
7
21
|
if (!result) {
|
|
@@ -18,6 +32,16 @@ export function createCheckoutMethods(http, ctx) {
|
|
|
18
32
|
const data = await http.graphql(SET_CUSTOMER, { input });
|
|
19
33
|
return unwrapResult(data, 'setCustomerForOrder');
|
|
20
34
|
},
|
|
35
|
+
/**
|
|
36
|
+
* Set the order's delivery address.
|
|
37
|
+
*
|
|
38
|
+
* Also drops the cached tax display mode. The shopper's country is the
|
|
39
|
+
* FIRST thing the channel's display policy looks at and it is read from
|
|
40
|
+
* this address, so moving the order to a tax-exclusive country (US) flips
|
|
41
|
+
* the whole cart to net — the one input that changes the mode without
|
|
42
|
+
* changing the identity the cache is stamped with. The next
|
|
43
|
+
* `pricing.getTaxDisplayMode()` therefore re-resolves.
|
|
44
|
+
*/
|
|
21
45
|
async setShippingAddress(input) {
|
|
22
46
|
const data = await http.graphql(SET_SHIPPING_ADDRESS, {
|
|
23
47
|
input,
|
|
@@ -55,10 +79,49 @@ export function createCheckoutMethods(http, ctx) {
|
|
|
55
79
|
const data = await http.graphql(ELIGIBLE_PAYMENT_METHODS);
|
|
56
80
|
return data.eligiblePaymentMethods;
|
|
57
81
|
},
|
|
82
|
+
/**
|
|
83
|
+
* Order minimums in effect on the active channel — for display and cart
|
|
84
|
+
* pre-validation (e.g. "Minimum order €375"). Checkout enforces them
|
|
85
|
+
* server-side at the ArrangingPayment transition regardless.
|
|
86
|
+
*/
|
|
58
87
|
async getOrderConstraints() {
|
|
59
88
|
const data = await http.graphql(ACTIVE_CHANNEL_ORDER_CONSTRAINTS);
|
|
60
89
|
return data.activeChannelOrderConstraints;
|
|
61
90
|
},
|
|
91
|
+
/**
|
|
92
|
+
* Tell the engine how the buyer intends to pay, and get the re-priced order
|
|
93
|
+
* back.
|
|
94
|
+
*
|
|
95
|
+
* Call it whenever the buyer picks or changes a payment method, BEFORE
|
|
96
|
+
* `transitionToArrangingPayment()` and `addPayment()`: `PAY_NOW` for an
|
|
97
|
+
* immediate method (iDEAL, card), `PAY_ON_ACCOUNT` for a net-terms method.
|
|
98
|
+
* A merchant may attach a discount to paying now, so the returned order's
|
|
99
|
+
* `discounts`, `promotions` and `totalWithTax` are what the buyer must be
|
|
100
|
+
* shown — this is the call that makes the cart total match the payment page.
|
|
101
|
+
*
|
|
102
|
+
* The intent is enforced at payment time: authorizing a pay-on-account
|
|
103
|
+
* method on an order marked `PAY_NOW` fails with
|
|
104
|
+
* `error.code === 'PAYMENT_INTENT_MISMATCH'`. Recover by calling this again
|
|
105
|
+
* with the other value and retrying the payment — never by hiding the
|
|
106
|
+
* error, since the totals differ between the two.
|
|
107
|
+
*
|
|
108
|
+
* Allowed while the order is a cart (`AddingItems`) or in
|
|
109
|
+
* `ArrangingPayment`; later states throw. Setting the same value twice is
|
|
110
|
+
* harmless.
|
|
111
|
+
*
|
|
112
|
+
* Acts on the session's active order, like every other checkout call here.
|
|
113
|
+
* It takes no `activeOrderInput`: the engine offers that argument only on a
|
|
114
|
+
* fixed list of core operations, so a storefront that runs two carts
|
|
115
|
+
* (consumer/trade) must select this one with the same `x-order-scope`
|
|
116
|
+
* header it sends on its other requests.
|
|
117
|
+
*
|
|
118
|
+
* The returned order is the only one that carries
|
|
119
|
+
* `customFields.paymentIntent`: ordinary cart reads do not select it, so
|
|
120
|
+
* this client keeps working against an engine that predates the field.
|
|
121
|
+
* Hold the buyer's choice in your own state and re-read it from here.
|
|
122
|
+
*
|
|
123
|
+
* @param intent - `PAY_NOW` or `PAY_ON_ACCOUNT`.
|
|
124
|
+
*/
|
|
62
125
|
async setPaymentIntent(intent) {
|
|
63
126
|
const data = await http.graphql(SET_PAYMENT_INTENT, { intent });
|
|
64
127
|
return unwrapResult(data, 'setOrderPaymentIntent');
|
|
@@ -71,12 +134,28 @@ export function createCheckoutMethods(http, ctx) {
|
|
|
71
134
|
const data = await http.graphql(ADD_PAYMENT, { input });
|
|
72
135
|
return unwrapResult(data, 'addPaymentToOrder');
|
|
73
136
|
},
|
|
137
|
+
// --- Pickup locations (carrier-agnostic) ---
|
|
138
|
+
/**
|
|
139
|
+
* Search for pickup locations near a postcode for a given carrier.
|
|
140
|
+
* Carrier-agnostic — the backend dispatches to the configured provider
|
|
141
|
+
* (currently MyParcel; future Sendcloud/Hendriks).
|
|
142
|
+
*/
|
|
74
143
|
async findPickupLocations(input) {
|
|
75
144
|
const data = await http.graphql(PICKUP_LOCATIONS, {
|
|
76
145
|
input,
|
|
77
146
|
});
|
|
78
147
|
return parsePickupLocations(data.pickupLocations);
|
|
79
148
|
},
|
|
149
|
+
/**
|
|
150
|
+
* Persist the customer's chosen pickup location onto the active order.
|
|
151
|
+
* The backend re-validates the submitted location against the provider's
|
|
152
|
+
* current search results before persisting — clients cannot post
|
|
153
|
+
* arbitrary JSON.
|
|
154
|
+
*
|
|
155
|
+
* The argument is parsed at the SDK boundary so client code that hand-
|
|
156
|
+
* builds the location object (e.g. cached from an earlier session) gets
|
|
157
|
+
* a clear `StorefrontError` instead of an opaque `MutationError`.
|
|
158
|
+
*/
|
|
80
159
|
async selectPickupLocation(location) {
|
|
81
160
|
const normalized = normalizePickupLocationInput(location);
|
|
82
161
|
const data = await http.graphql(SET_ACTIVE_ORDER_PICKUP_LOCATION, {
|
|
@@ -84,6 +163,10 @@ export function createCheckoutMethods(http, ctx) {
|
|
|
84
163
|
});
|
|
85
164
|
return unwrapResult(data, 'setActiveOrderPickupLocation');
|
|
86
165
|
},
|
|
166
|
+
/**
|
|
167
|
+
* Read the pickup location currently stored on the active order. Returns
|
|
168
|
+
* `null` when no selection has been made or there is no active order.
|
|
169
|
+
*/
|
|
87
170
|
async getActivePickupLocation() {
|
|
88
171
|
const data = await http.graphql(ACTIVE_ORDER_PICKUP_LOCATION);
|
|
89
172
|
return parseOptionalPickupLocation(data.activeOrderPickupLocation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAe7C,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,gCAAgC,EAChC,4BAA4B,EAC5B,WAAW,EACX,+BAA+B,EAC/B,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings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,QAAQ,EAAE,UAAU;aACrB,CAAC,CAAC;YACH,OAAO,YAAY,CAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC;QAC5D,CAAC;QAED;;;WAGG;QACH,KAAK,CAAC,uBAAuB;YAC3B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,4BAA4B,CAC7B,CAAC;YACF,OAAO,2BAA2B,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QACrE,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +1,55 @@
|
|
|
1
1
|
import type { HttpClient, RequestOptions } from '../core/http.js';
|
|
2
2
|
import type { ActiveChannel, AddressInput, Country, Customer, CustomerAddress, CustomerInvoice, CustomerInvoicePdf, CustomerPriceList, LoginResult, Order, OrderListOptions, OrderSummary, PaginatedList, RegisterInput, ReorderSkipped, StoreContext, UpdateAddressInput, UpdateCustomerInput } from '../types.js';
|
|
3
3
|
export declare function createCustomerMethods(http: HttpClient, ctx?: StoreContext): {
|
|
4
|
+
/**
|
|
5
|
+
* Authenticate a customer against the active channel.
|
|
6
|
+
*
|
|
7
|
+
* Returns a discriminated {@link LoginResult}: on success the current
|
|
8
|
+
* user, otherwise a typed signal for imported accounts that have no
|
|
9
|
+
* migrated password (`password_reset_required` — a reset link has already
|
|
10
|
+
* been emailed) or accounts that are not yet verified
|
|
11
|
+
* (`account_not_verified`). Only a *genuine* bad password throws a
|
|
12
|
+
* `MutationError('INVALID_CREDENTIALS_ERROR')`.
|
|
13
|
+
*
|
|
14
|
+
* The platform's per-channel auth strategy surfaces these signals through
|
|
15
|
+
* `InvalidCredentialsError.authenticationError`; we translate them here so
|
|
16
|
+
* an imported customer is not wrongly told their password is wrong.
|
|
17
|
+
*/
|
|
4
18
|
login(email: string, password: string): Promise<LoginResult>;
|
|
5
19
|
register(input: RegisterInput): Promise<{
|
|
6
20
|
success: boolean;
|
|
7
21
|
}>;
|
|
22
|
+
/**
|
|
23
|
+
* End the customer session. Runs the Vendure `logout` mutation, then clears
|
|
24
|
+
* the SDK's stored auth token and fires `onAuthCleared` (the inverse of the
|
|
25
|
+
* `onAuthToken` signal login raises) so the consumer can drop the persisted
|
|
26
|
+
* token — otherwise the token stays live and subsequent requests keep
|
|
27
|
+
* sending it.
|
|
28
|
+
*/
|
|
8
29
|
logout(): Promise<void>;
|
|
9
30
|
verifyAccount(token: string, password?: string): Promise<{
|
|
10
31
|
id: string;
|
|
11
32
|
identifier: string;
|
|
12
33
|
}>;
|
|
13
34
|
refreshVerification(emailAddress: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Request a passwordless sign-in email (clickable link + 6-digit code) for
|
|
37
|
+
* the given address. Resolves whether or not an account exists
|
|
38
|
+
* (anti-enumeration) — only a real error (e.g. misconfigured auth) throws.
|
|
39
|
+
*/
|
|
14
40
|
requestMagicLink(emailAddress: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Consume a magic-link token (from the emailed link) and start a session.
|
|
43
|
+
* The auth token is captured automatically (fires `onAuthToken`), like login.
|
|
44
|
+
*/
|
|
15
45
|
loginWithMagicLink(token: string): Promise<{
|
|
16
46
|
id: string;
|
|
17
47
|
identifier: string;
|
|
18
48
|
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Consume a 6-digit magic-link code for the given email and start a session.
|
|
51
|
+
* Cross-device friendly: enter the code on the same device that requested it.
|
|
52
|
+
*/
|
|
19
53
|
loginWithMagicCode(emailAddress: string, code: string): Promise<{
|
|
20
54
|
id: string;
|
|
21
55
|
identifier: string;
|
|
@@ -29,6 +63,13 @@ export declare function createCustomerMethods(http: HttpClient, ctx?: StoreConte
|
|
|
29
63
|
requestEmailUpdate(password: string, newEmailAddress: string): Promise<void>;
|
|
30
64
|
updateEmail(token: string): Promise<void>;
|
|
31
65
|
getCurrentCustomer(): Promise<Customer | null>;
|
|
66
|
+
/**
|
|
67
|
+
* The price lists currently applying to the signed-in customer (contract,
|
|
68
|
+
* customer-direct, group, and channel-wide), sorted by resolution priority.
|
|
69
|
+
* Identity only — prices are already applied server-side; use this to label
|
|
70
|
+
* which lists the customer is on. Empty for anonymous visitors with no
|
|
71
|
+
* channel-wide lists.
|
|
72
|
+
*/
|
|
32
73
|
getActiveCustomerPriceLists(options?: RequestOptions): Promise<CustomerPriceList[]>;
|
|
33
74
|
updateCustomer(input: UpdateCustomerInput): Promise<Customer>;
|
|
34
75
|
getCustomerOrders(options?: OrderListOptions): Promise<PaginatedList<OrderSummary>>;
|
|
@@ -37,8 +78,25 @@ export declare function createCustomerMethods(http: HttpClient, ctx?: StoreConte
|
|
|
37
78
|
deleteAddress(id: string): Promise<void>;
|
|
38
79
|
getAvailableCountries(): Promise<Country[]>;
|
|
39
80
|
getOrderByCode(code: string): Promise<Order>;
|
|
81
|
+
/**
|
|
82
|
+
* Invoices issued for one of the signed-in customer's own orders.
|
|
83
|
+
* Requires authentication; other customers' order codes yield FORBIDDEN.
|
|
84
|
+
*/
|
|
40
85
|
getMyOrderInvoices(orderCode: string): Promise<CustomerInvoice[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Download one of the signed-in customer's own invoices. Returns the PDF
|
|
88
|
+
* bytes base64-encoded plus a suggested filename — decode with
|
|
89
|
+
* `atob`/`Buffer.from(base64, 'base64')` and serve as
|
|
90
|
+
* `application/pdf`.
|
|
91
|
+
*/
|
|
41
92
|
getMyInvoicePdf(invoiceId: string): Promise<CustomerInvoicePdf>;
|
|
93
|
+
/**
|
|
94
|
+
* Add every line of a previous order to the active cart ("buy again").
|
|
95
|
+
* Lines whose variants no longer exist or have insufficient stock are
|
|
96
|
+
* collected in `skipped` instead of throwing — the caller decides how to
|
|
97
|
+
* surface them. Lines are added sequentially so cart state is consistent
|
|
98
|
+
* if the caller aborts mid-way.
|
|
99
|
+
*/
|
|
42
100
|
reorder(orderCode: string): Promise<{
|
|
43
101
|
order: Order;
|
|
44
102
|
addedLines: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../src/commerce/customer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAyCrB,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,YAAY;
|
|
1
|
+
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../src/commerce/customer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAyCrB,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,YAAY;IAItE;;;;;;;;;;;;;OAaG;iBACgB,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;oBA6B5C,aAAa,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAKnE;;;;;;OAMG;cACa,OAAO,CAAC,IAAI,CAAC;yBASpB,MAAM,aACF,MAAM,GAChB,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,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