@sixtyninecommerce/client 0.21.1 → 0.22.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 +28 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -1
- package/dist/client.js.map +1 -1
- package/dist/commerce/cart.d.ts.map +1 -1
- package/dist/commerce/cart.js +13 -5
- package/dist/commerce/cart.js.map +1 -1
- package/dist/commerce/checkout.d.ts +3 -2
- package/dist/commerce/checkout.d.ts.map +1 -1
- package/dist/commerce/checkout.js +11 -7
- package/dist/commerce/checkout.js.map +1 -1
- package/dist/commerce/index.js +1 -1
- package/dist/commerce/index.js.map +1 -1
- package/dist/commerce/placement-error.d.ts +6 -0
- package/dist/commerce/placement-error.d.ts.map +1 -0
- package/dist/commerce/placement-error.js +84 -0
- package/dist/commerce/placement-error.js.map +1 -0
- package/dist/commerce/queries.d.ts +16 -11
- package/dist/commerce/queries.d.ts.map +1 -1
- package/dist/commerce/queries.js +83 -19
- package/dist/commerce/queries.js.map +1 -1
- package/dist/commerce/quotes.d.ts.map +1 -1
- package/dist/commerce/quotes.js +27 -12
- package/dist/commerce/quotes.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/content/asset-urls.d.ts +7 -0
- package/dist/content/asset-urls.d.ts.map +1 -0
- package/dist/content/asset-urls.js +96 -0
- package/dist/content/asset-urls.js.map +1 -0
- package/dist/content/collection-pages.d.ts +2 -2
- package/dist/content/collection-pages.d.ts.map +1 -1
- package/dist/content/collection-pages.js +8 -2
- package/dist/content/collection-pages.js.map +1 -1
- package/dist/content/collections.d.ts +2 -2
- package/dist/content/collections.d.ts.map +1 -1
- package/dist/content/collections.js +10 -3
- package/dist/content/collections.js.map +1 -1
- package/dist/content/index.js +4 -4
- package/dist/content/index.js.map +1 -1
- package/dist/content/items.d.ts +2 -2
- package/dist/content/items.d.ts.map +1 -1
- package/dist/content/items.js +18 -4
- package/dist/content/items.js.map +1 -1
- package/dist/content/resolve.d.ts +2 -2
- package/dist/content/resolve.d.ts.map +1 -1
- package/dist/content/resolve.js +8 -2
- package/dist/content/resolve.js.map +1 -1
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +1 -0
- package/dist/core/context.js.map +1 -1
- package/dist/core/headers.d.ts.map +1 -1
- package/dist/core/headers.js +4 -0
- package/dist/core/headers.js.map +1 -1
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +4 -1
- package/dist/core/http.js.map +1 -1
- package/dist/errors.d.ts +10 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -1
- package/dist/errors.js.map +1 -1
- package/dist/events/envelope.d.ts +24 -0
- package/dist/events/envelope.d.ts.map +1 -0
- package/dist/events/envelope.js +2 -0
- package/dist/events/envelope.js.map +1 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +2 -0
- package/dist/events/index.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/order-scope.d.ts +3 -0
- package/dist/order-scope.d.ts.map +1 -0
- package/dist/order-scope.js +6 -0
- package/dist/order-scope.js.map +1 -0
- package/dist/pricing/index.d.ts +3 -1
- package/dist/pricing/index.d.ts.map +1 -1
- package/dist/pricing/index.js +35 -2
- package/dist/pricing/index.js.map +1 -1
- package/dist/pricing/tax-display.d.ts +9 -0
- package/dist/pricing/tax-display.d.ts.map +1 -0
- package/dist/pricing/tax-display.js +81 -0
- package/dist/pricing/tax-display.js.map +1 -0
- package/dist/seo/alternates.d.ts.map +1 -1
- package/dist/seo/alternates.js +3 -1
- package/dist/seo/alternates.js.map +1 -1
- package/dist/seo/locale-tag.d.ts +4 -0
- package/dist/seo/locale-tag.d.ts.map +1 -0
- package/dist/seo/locale-tag.js +10 -0
- package/dist/seo/locale-tag.js.map +1 -0
- package/dist/seo/meta-tags.d.ts.map +1 -1
- package/dist/seo/meta-tags.js +15 -12
- package/dist/seo/meta-tags.js.map +1 -1
- package/dist/seo/types.d.ts +1 -0
- package/dist/seo/types.d.ts.map +1 -1
- package/dist/seo/url-builder.d.ts.map +1 -1
- package/dist/seo/url-builder.js +6 -4
- package/dist/seo/url-builder.js.map +1 -1
- package/dist/types.d.ts +75 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -141,7 +141,7 @@ const data = await client.graphql(`query { activeChannel { id } }`);
|
|
|
141
141
|
| `commerce` | Products, collections, property trees, search, cart, checkout, customer auth |
|
|
142
142
|
| `content` | CMS resolve, content items, assets, forms, content strings, menus |
|
|
143
143
|
| `navigation` | Unified route manifest, route lookup |
|
|
144
|
-
| `pricing` | Price formatting, tier lookup, order validation (pure
|
|
144
|
+
| `pricing` | Price formatting, tier lookup, order validation (pure), resolved tax display mode |
|
|
145
145
|
| `media` | CDN URLs, preset URLs, responsive image data (pure functions) |
|
|
146
146
|
| `currency` | Exchange rates, currency conversion |
|
|
147
147
|
|
|
@@ -270,6 +270,33 @@ if (nextTier) {
|
|
|
270
270
|
}
|
|
271
271
|
```
|
|
272
272
|
|
|
273
|
+
## Tax display (incl./excl. VAT)
|
|
274
|
+
|
|
275
|
+
`pricesIncludeTax` is the channel's **storage** mode — which of `price` / `priceWithTax` the merchant typed in. It is not the answer to "which figure does *this* shopper see". A channel can quote Dutch consumers gross (the law requires it), Dutch B2B buyers net, and US shoppers net (US sales tax varies by state and district, so a tax-inclusive price is simply wrong there).
|
|
276
|
+
|
|
277
|
+
The engine resolves that per request; ask it once and let the display helper follow:
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
// Once per request (SSR) or per session (client) — cheap and cached.
|
|
281
|
+
await client.pricing.getTaxDisplayMode(); // 'gross' | 'net'
|
|
282
|
+
|
|
283
|
+
// Then everywhere you render a price — no mode argument:
|
|
284
|
+
const display = client.pricing.selectDisplayPrice(variant);
|
|
285
|
+
client.pricing.formatPrice(display.amount); // display.isGross tells you which it is
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
| Method | Use |
|
|
289
|
+
|---|---|
|
|
290
|
+
| `getTaxDisplayMode({ refresh? })` | Resolve the mode from the server. Cached per identity; `refresh: true` forces a round-trip |
|
|
291
|
+
| `currentTaxDisplayMode()` | The last resolved mode, synchronously — for render paths |
|
|
292
|
+
| `selectDisplayPrice(variant, mode?)` | Picks `price`/`priceWithTax` (and the matching retail field). Omit `mode` to follow the resolved one; pass one only to override (a side-by-side table, a shopper-driven toggle) |
|
|
293
|
+
| `resolveTaxDisplayMode(policy, inputs)` | Pure preview of the same precedence rule — for a "who sees what" table |
|
|
294
|
+
| `parseTaxDisplayPolicy(activeChannel.customFields)` | Read the channel's policy (`taxDisplayDefault`, `taxDisplayB2b`, `taxExclusiveCountries`) |
|
|
295
|
+
|
|
296
|
+
Precedence, resolved server-side: **shopper's country is on the channel's tax-exclusive list → `net`**; else **B2B account (`activeCustomer.isB2B`) or the `trade` order scope → the channel's B2B setting**; else the channel default; else `pricesIncludeTax`. The country comes from the active order's shipping address, else the signed-in customer's default one — never from the currency or the locale.
|
|
297
|
+
|
|
298
|
+
The mode is re-resolved automatically after a sign-in/out, a `setOrderScope(...)`, and a `setShippingAddress(...)` (moving the cart to a listed country flips the whole cart to net). It never throws: an unreachable or older engine falls back to `pricesIncludeTax ? 'gross' : 'net'`, i.e. the behaviour before this existed.
|
|
299
|
+
|
|
273
300
|
## Product Documents
|
|
274
301
|
|
|
275
302
|
`commerce.getProduct(slug)` and `commerce.getProductById(id)` return a `documents: PublicProductDocument[]` field with downloadable files attached to the product (manuals, spec sheets, data sheets, certificates). The list is **already filtered by the current customer's visibility** before it leaves the server — the storefront just renders what it gets.
|
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,
|
|
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;AAmBvF,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,gBAAgB,CAAC,CAwC3B"}
|
package/dist/client.js
CHANGED
|
@@ -18,7 +18,7 @@ export async function createStorefrontClient(config) {
|
|
|
18
18
|
commerce: createCommerceModule(http, ctx),
|
|
19
19
|
content: createContentModule(http, ctx),
|
|
20
20
|
navigation: createNavigationModule(http),
|
|
21
|
-
pricing: createPricingModule(ctx),
|
|
21
|
+
pricing: createPricingModule(ctx, http),
|
|
22
22
|
media: createMediaModule(ctx),
|
|
23
23
|
currency: createCurrencyModule(http),
|
|
24
24
|
credit: createCreditModule(http),
|
|
@@ -36,6 +36,12 @@ export async function createStorefrontClient(config) {
|
|
|
36
36
|
clearAuthToken() {
|
|
37
37
|
ctx.authToken = null;
|
|
38
38
|
},
|
|
39
|
+
setOrderScope(scope) {
|
|
40
|
+
ctx.orderScope = scope;
|
|
41
|
+
},
|
|
42
|
+
getOrderScope() {
|
|
43
|
+
return ctx.orderScope ?? null;
|
|
44
|
+
},
|
|
39
45
|
graphql(query, variables) {
|
|
40
46
|
return http.graphql(query, variables);
|
|
41
47
|
},
|
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,g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C;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../src/commerce/cart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../src/commerce/cart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,KAAK,EAA0B,MAAM,aAAa,CAAC;AAgDjE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU;sBAEtB,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;yBAKlB,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;0BAS3D,KAAK,CAAC;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,GAC3D,OAAO,CAAC,KAAK,CAAC;2BAiDY,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;2BAQzC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;iBAOjC,OAAO,CAAC,KAAK,CAAC;0BAKL,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;2BAKtB,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;EAOvD"}
|
package/dist/commerce/cart.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MutationError } from '../errors.js';
|
|
2
|
+
import { insufficientStockLine, toMutationError } from './placement-error.js';
|
|
2
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';
|
|
3
4
|
function unwrapOrderResult(data, operationField) {
|
|
4
5
|
const result = data[operationField];
|
|
@@ -6,7 +7,7 @@ function unwrapOrderResult(data, operationField) {
|
|
|
6
7
|
throw new MutationError('UNKNOWN_ERROR', `No result from ${operationField}`);
|
|
7
8
|
}
|
|
8
9
|
if ('errorCode' in result) {
|
|
9
|
-
throw
|
|
10
|
+
throw toMutationError(result);
|
|
10
11
|
}
|
|
11
12
|
return result;
|
|
12
13
|
}
|
|
@@ -31,12 +32,19 @@ export function createCartMethods(http) {
|
|
|
31
32
|
}
|
|
32
33
|
const firstError = result.errorResults[0];
|
|
33
34
|
if (firstError) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const lines = result.errorResults.reduce((acc, entry) => {
|
|
36
|
+
const line = entry.errorCode === 'INSUFFICIENT_STOCK_ERROR'
|
|
37
|
+
? insufficientStockLine(entry)
|
|
38
|
+
: undefined;
|
|
39
|
+
if (line)
|
|
40
|
+
acc.push(line);
|
|
41
|
+
return acc;
|
|
42
|
+
}, []);
|
|
43
|
+
throw toMutationError(firstError, {
|
|
44
|
+
...firstError,
|
|
37
45
|
order: result.order,
|
|
38
46
|
errorResults: result.errorResults,
|
|
39
|
-
});
|
|
47
|
+
}, lines);
|
|
40
48
|
}
|
|
41
49
|
return result.order;
|
|
42
50
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.js","sourceRoot":"","sources":["../../src/commerce/cart.ts"],"names":[],"mappings":"AACA,O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AAiB,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HttpClient, RequestOptions } from '../core/http.js';
|
|
2
|
-
import type { ActiveChannelOrderConstraints, AddressInput, CustomerDeliveryTerms, CustomerInput, Order, PaymentInput, PaymentMethod, PickupLocation, PickupLocationSearchInput, ShippingMethod } from '../types.js';
|
|
3
|
-
export declare function createCheckoutMethods(http: HttpClient): {
|
|
2
|
+
import type { ActiveChannelOrderConstraints, AddressInput, CustomerDeliveryTerms, CustomerInput, Order, OrderPaymentIntent, PaymentInput, PaymentMethod, PickupLocation, PickupLocationSearchInput, ShippingMethod, StoreContext } from '../types.js';
|
|
3
|
+
export declare function createCheckoutMethods(http: HttpClient, ctx?: StoreContext): {
|
|
4
4
|
setCustomerForOrder(input: CustomerInput): Promise<Order>;
|
|
5
5
|
setShippingAddress(input: AddressInput): Promise<Order>;
|
|
6
6
|
setBillingAddress(input: AddressInput): Promise<Order>;
|
|
@@ -10,6 +10,7 @@ export declare function createCheckoutMethods(http: HttpClient): {
|
|
|
10
10
|
applyPreferredShippingMethod(): Promise<Order>;
|
|
11
11
|
getEligiblePaymentMethods(): Promise<PaymentMethod[]>;
|
|
12
12
|
getOrderConstraints(): Promise<ActiveChannelOrderConstraints>;
|
|
13
|
+
setPaymentIntent(intent: OrderPaymentIntent): Promise<Order>;
|
|
13
14
|
transitionToArrangingPayment(): Promise<Order>;
|
|
14
15
|
addPayment(input: PaymentInput): Promise<Order>;
|
|
15
16
|
findPickupLocations(input: PickupLocationSearchInput): Promise<PickupLocation[]>;
|
|
@@ -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,YAAY,EACZ,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,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;8BAe/B,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;2BAY9B,OAAO,CAAC,6BAA6B,CAAC;6BAyCpC,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC;oCAK5B,OAAO,CAAC,KAAK,CAAC;sBAK5B,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;+BAYpB,yBAAyB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;mCAiBjD,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC;+BAYnC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;EAOlE"}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { MutationError } from '../errors.js';
|
|
2
2
|
import { normalizePickupLocationInput, parseOptionalPickupLocation, parsePickupLocations, } from './pickup-location-parser.js';
|
|
3
|
-
import {
|
|
3
|
+
import { toMutationError } from './placement-error.js';
|
|
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';
|
|
4
5
|
function unwrapResult(data, field) {
|
|
5
6
|
const result = data[field];
|
|
6
7
|
if (!result) {
|
|
7
8
|
throw new MutationError('UNKNOWN_ERROR', `No result from ${field}`);
|
|
8
9
|
}
|
|
9
10
|
if ('errorCode' in result) {
|
|
10
|
-
|
|
11
|
-
? result.transitionError
|
|
12
|
-
: null;
|
|
13
|
-
const message = transitionError ?? result.message;
|
|
14
|
-
throw new MutationError(result.errorCode, message, result);
|
|
11
|
+
throw toMutationError(result);
|
|
15
12
|
}
|
|
16
13
|
return result;
|
|
17
14
|
}
|
|
18
|
-
export function createCheckoutMethods(http) {
|
|
15
|
+
export function createCheckoutMethods(http, ctx) {
|
|
19
16
|
return {
|
|
20
17
|
async setCustomerForOrder(input) {
|
|
21
18
|
const data = await http.graphql(SET_CUSTOMER, { input });
|
|
@@ -25,6 +22,9 @@ export function createCheckoutMethods(http) {
|
|
|
25
22
|
const data = await http.graphql(SET_SHIPPING_ADDRESS, {
|
|
26
23
|
input,
|
|
27
24
|
});
|
|
25
|
+
if (ctx) {
|
|
26
|
+
ctx.taxDisplay = null;
|
|
27
|
+
}
|
|
28
28
|
return unwrapResult(data, 'setOrderShippingAddress');
|
|
29
29
|
},
|
|
30
30
|
async setBillingAddress(input) {
|
|
@@ -59,6 +59,10 @@ export function createCheckoutMethods(http) {
|
|
|
59
59
|
const data = await http.graphql(ACTIVE_CHANNEL_ORDER_CONSTRAINTS);
|
|
60
60
|
return data.activeChannelOrderConstraints;
|
|
61
61
|
},
|
|
62
|
+
async setPaymentIntent(intent) {
|
|
63
|
+
const data = await http.graphql(SET_PAYMENT_INTENT, { intent });
|
|
64
|
+
return unwrapResult(data, 'setOrderPaymentIntent');
|
|
65
|
+
},
|
|
62
66
|
async transitionToArrangingPayment() {
|
|
63
67
|
const data = await http.graphql(TRANSITION_TO_ARRANGING_PAYMENT);
|
|
64
68
|
return unwrapResult(data, 'transitionOrderToState');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/commerce/checkout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
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;AAgBtB,SAAS,YAAY,CAAC,IAA6B,EAAE,KAAa;IAChE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAA4B,CAAC;IACtD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,aAAa,CAAC,eAAe,EAAE,kBAAkB,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;QAC1B,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,MAA0B,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAgB,EAAE,GAAkB;IACxE,OAAO;QACL,KAAK,CAAC,mBAAmB,CAAC,KAAoB;YAC5C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAA0B,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YAClF,OAAO,YAA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AC1D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAA0B,gCAAgC,EAAE;gBACzF,QAAQ,EAAE,UAAU;aACrB,CAAC,CAAC;YACH,OAAO,YAAY,CAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC;QAC5D,CAAC;QAMD,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"}
|
package/dist/commerce/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export function createCommerceModule(http, ctx) {
|
|
|
20
20
|
const products = createProductMethods(http);
|
|
21
21
|
const search = createSearchMethods(http);
|
|
22
22
|
const cart = createCartMethods(http);
|
|
23
|
-
const checkout = createCheckoutMethods(http);
|
|
23
|
+
const checkout = createCheckoutMethods(http, ctx);
|
|
24
24
|
const payments = createPaymentMethods(http);
|
|
25
25
|
const customer = createCustomerMethods(http, ctx);
|
|
26
26
|
const favorites = createFavoritesMethods(http);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commerce/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,E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AAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,aAAa,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,aAAa,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,kBAAkB,GAAG,+BAA+B,CAAC,IAAI,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAElD,OAAO;QACL,GAAG,QAAQ;QACX,GAAG,MAAM;QACT,GAAG,IAAI;QACP,GAAG,QAAQ;QACX,GAAG,QAAQ;QACX,GAAG,QAAQ;QACX,GAAG,SAAS;QACZ,GAAG,UAAU;QACb,GAAG,eAAe;QAClB,GAAG,OAAO;QACV,GAAG,eAAe;QAClB,GAAG,aAAa;QAChB,GAAG,MAAM;QACT,GAAG,OAAO;QACV,GAAG,aAAa;QAChB,GAAG,QAAQ;QACX,GAAG,kBAAkB;QACrB,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MutationError } from '../errors.js';
|
|
2
|
+
import type { PlacementRejection, PlacementRejectionLine } from '../types.js';
|
|
3
|
+
export declare function readPlacement(result: Record<string, unknown>): PlacementRejection | undefined;
|
|
4
|
+
export declare function insufficientStockLine(result: Record<string, unknown>): PlacementRejectionLine | undefined;
|
|
5
|
+
export declare function toMutationError(result: Record<string, unknown>, fields?: Record<string, unknown>, linesOverride?: PlacementRejectionLine[]): MutationError;
|
|
6
|
+
//# sourceMappingURL=placement-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placement-error.d.ts","sourceRoot":"","sources":["../../src/commerce/placement-error.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EACV,kBAAkB,EAElB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAgFrB,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,kBAAkB,GAAG,SAAS,CAiB7F;AAQD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,sBAAsB,GAAG,SAAS,CAEpC;AAmBD,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAU,EACxC,aAAa,CAAC,EAAE,sBAAsB,EAAE,GACvC,aAAa,CA+Bf"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { MutationError } from '../errors.js';
|
|
2
|
+
const REASON_FIELDS = ['transitionError', 'interceptorError'];
|
|
3
|
+
function nonEmpty(value) {
|
|
4
|
+
return typeof value === 'string' && value.trim().length > 0 ? value : undefined;
|
|
5
|
+
}
|
|
6
|
+
function readId(value) {
|
|
7
|
+
if (typeof value === 'string' && value.length > 0)
|
|
8
|
+
return value;
|
|
9
|
+
if (typeof value === 'number')
|
|
10
|
+
return String(value);
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
function readInt(value) {
|
|
14
|
+
return typeof value === 'number' ? value : undefined;
|
|
15
|
+
}
|
|
16
|
+
function readLine(raw) {
|
|
17
|
+
const productVariantId = readId(raw.productVariantId);
|
|
18
|
+
if (!productVariantId)
|
|
19
|
+
return undefined;
|
|
20
|
+
return {
|
|
21
|
+
productVariantId,
|
|
22
|
+
orderLineId: readId(raw.orderLineId),
|
|
23
|
+
sku: nonEmpty(raw.sku),
|
|
24
|
+
productName: nonEmpty(raw.productName),
|
|
25
|
+
productVariantName: nonEmpty(raw.productVariantName),
|
|
26
|
+
quantityRequested: readInt(raw.quantityRequested),
|
|
27
|
+
quantityAvailable: readInt(raw.quantityAvailable),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function readLines(raw) {
|
|
31
|
+
const lines = [];
|
|
32
|
+
for (const entry of raw) {
|
|
33
|
+
if (!entry || typeof entry !== 'object')
|
|
34
|
+
continue;
|
|
35
|
+
const line = readLine(entry);
|
|
36
|
+
if (line)
|
|
37
|
+
lines.push(line);
|
|
38
|
+
}
|
|
39
|
+
return lines;
|
|
40
|
+
}
|
|
41
|
+
export function readPlacement(result) {
|
|
42
|
+
const raw = result.placement;
|
|
43
|
+
if (!raw || typeof raw !== 'object')
|
|
44
|
+
return undefined;
|
|
45
|
+
const payload = raw;
|
|
46
|
+
const code = nonEmpty(payload.code);
|
|
47
|
+
if (!code)
|
|
48
|
+
return undefined;
|
|
49
|
+
const placement = {
|
|
50
|
+
...payload,
|
|
51
|
+
code,
|
|
52
|
+
linesTruncated: payload.linesTruncated === true,
|
|
53
|
+
};
|
|
54
|
+
if (Array.isArray(payload.lines))
|
|
55
|
+
placement.lines = readLines(payload.lines);
|
|
56
|
+
return placement;
|
|
57
|
+
}
|
|
58
|
+
export function insufficientStockLine(result) {
|
|
59
|
+
return readLine(result);
|
|
60
|
+
}
|
|
61
|
+
export function toMutationError(result, fields = result, linesOverride) {
|
|
62
|
+
const errorCode = nonEmpty(result.errorCode) ?? 'UNKNOWN_ERROR';
|
|
63
|
+
const placement = readPlacement(result);
|
|
64
|
+
const stockLine = errorCode === 'INSUFFICIENT_STOCK_ERROR' ? insufficientStockLine(result) : undefined;
|
|
65
|
+
const placementLines = placement?.lines?.length ? placement.lines : undefined;
|
|
66
|
+
const lines = linesOverride?.length
|
|
67
|
+
? linesOverride
|
|
68
|
+
: (placementLines ?? (stockLine ? [stockLine] : undefined));
|
|
69
|
+
const code = placement?.code ??
|
|
70
|
+
(errorCode === 'INSUFFICIENT_STOCK_ERROR'
|
|
71
|
+
? 'INSUFFICIENT_STOCK'
|
|
72
|
+
: undefined);
|
|
73
|
+
let reason;
|
|
74
|
+
for (const field of REASON_FIELDS) {
|
|
75
|
+
reason ??= nonEmpty(result[field]);
|
|
76
|
+
}
|
|
77
|
+
const message = nonEmpty(placement?.customerMessage) ?? reason ?? nonEmpty(result.message);
|
|
78
|
+
return new MutationError(errorCode, message ?? errorCode, fields, {
|
|
79
|
+
code,
|
|
80
|
+
placement,
|
|
81
|
+
lines,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=placement-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placement-error.js","sourceRoot":"","sources":["../../src/commerce/placement-error.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AA4B7C,MAAM,aAAa,GAAG,CAAC,iBAAiB,EAAE,kBAAkB,CAAU,CAAC;AAEvE,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAClF,CAAC;AAGD,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACpD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAQD,SAAS,QAAQ,CAAC,GAA4B;IAC5C,M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AK,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,IAAI,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE3F,OAAO,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,EAAE;QAChE,IAAI;QACJ,SAAS;QACT,KAAK;KACN,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -6,13 +6,13 @@ export declare const LIST_COLLECTIONS = "\n query ListCollections($options: Col
|
|
|
6
6
|
export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description position\n featuredAsset {\n source width height\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n parent { id }\n children { id name slug }\n customFields {\n isRoutable\n isCanonical\n noindex\n nofollow\n metaRobotsMaxImagePreview\n socialImageId\n socialOgType\n twitterCardType\n }\n translations {\n languageCode\n name\n slug\n customFields {\n seoTitle\n seoDescription\n canonicalUrl\n socialTitle\n socialDescription\n socialImageAlt\n }\n }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source width height presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
|
|
7
7
|
export declare const SEARCH_PRODUCTS = "\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n items {\n productId productVariantId productName slug description\n price { ... on SinglePrice { value } ... on PriceRange { min max } }\n priceWithTax { ... on SinglePrice { value } ... on PriceRange { min max } }\n currencyCode\n productAsset { preview focalPoint { x y } }\n collectionIds\n inStock\n }\n totalItems\n facetValues { facetValue { id name code facet { id name code } } count }\n }\n }\n";
|
|
8
8
|
export declare const ACTIVE_ORDER = "\n query ActiveOrder {\n activeOrder { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
|
|
9
|
-
export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable order { id } }\n }\n }\n";
|
|
10
|
-
export declare const ADJUST_ORDER_LINE = "\n mutation AdjustOrderLine($lineId: ID!, $quantity: Int!) {\n adjustOrderLine(orderLineId: $lineId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable }\n }\n }\n";
|
|
9
|
+
export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n order { id } }\n }\n }\n";
|
|
10
|
+
export declare const ADJUST_ORDER_LINE = "\n mutation AdjustOrderLine($lineId: ID!, $quantity: Int!) {\n adjustOrderLine(orderLineId: $lineId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n }\n }\n";
|
|
11
11
|
export declare const REMOVE_ORDER_LINE = "\n mutation RemoveOrderLine($lineId: ID!) {\n removeOrderLine(orderLineId: $lineId) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
|
|
12
12
|
export declare const APPLY_COUPON = "\n mutation ApplyCoupon($code: String!) {\n applyCouponCode(couponCode: $code) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on CouponCodeExpiredError { errorCode message couponCode }\n ... on CouponCodeInvalidError { errorCode message couponCode }\n ... on CouponCodeLimitError { errorCode message couponCode limit }\n }\n }\n";
|
|
13
13
|
export declare const REMOVE_COUPON = "\n mutation RemoveCoupon($code: String!) {\n removeCouponCode(couponCode: $code) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
|
|
14
14
|
export declare const REMOVE_ALL_ORDER_LINES = "\n mutation RemoveAllOrderLines {\n removeAllOrderLines {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
|
|
15
|
-
export declare const ADD_ITEMS_TO_CART = "\n mutation AddItemsToCart($inputs: [AddItemInput!]!) {\n addItemsToOrder(inputs: $inputs) {\n order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n errorResults {\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable }\n ... on OrderInterceptorError { errorCode message interceptorError }\n }\n }\n }\n";
|
|
15
|
+
export declare const ADD_ITEMS_TO_CART = "\n mutation AddItemsToCart($inputs: [AddItemInput!]!) {\n addItemsToOrder(inputs: $inputs) {\n order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n errorResults {\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n ... on OrderInterceptorError { errorCode message interceptorError }\n }\n }\n }\n";
|
|
16
16
|
export declare const SET_CUSTOMER = "\n mutation SetCustomer($input: CreateCustomerInput!) {\n setCustomerForOrder(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on AlreadyLoggedInError { errorCode message }\n ... on EmailAddressConflictError { errorCode message }\n ... on GuestCheckoutError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
|
|
17
17
|
export declare const SET_SHIPPING_ADDRESS = "\n mutation SetShippingAddress($input: CreateAddressInput!) {\n setOrderShippingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
|
|
18
18
|
export declare const SET_BILLING_ADDRESS = "\n mutation SetBillingAddress($input: CreateAddressInput!) {\n setOrderBillingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
|
|
@@ -21,8 +21,9 @@ export declare const MY_DELIVERY_TERMS = "\n query MyDeliveryTerms {\n myDel
|
|
|
21
21
|
export declare const SET_SHIPPING_METHOD = "\n mutation SetShippingMethod($ids: [ID!]!) {\n selectOrderDeliveryMethod(shippingMethodIds: $ids) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
|
|
22
22
|
export declare const APPLY_PREFERRED_SHIPPING_METHOD = "\n mutation ApplyPreferredShippingMethod {\n applyPreferredDeliveryMethod {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
|
|
23
23
|
export declare const ELIGIBLE_PAYMENT_METHODS = "\n query PaymentMethods {\n eligiblePaymentMethods {\n id name code description isEligible eligibilityMessage\n }\n }\n";
|
|
24
|
-
export declare const TRANSITION_TO_ARRANGING_PAYMENT = "\n mutation TransitionToArrangingPayment {\n transitionOrderToState(state: \"ArrangingPayment\") {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderStateTransitionError {
|
|
25
|
-
export declare const
|
|
24
|
+
export declare const TRANSITION_TO_ARRANGING_PAYMENT = "\n mutation TransitionToArrangingPayment {\n transitionOrderToState(state: \"ArrangingPayment\") {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n }\n }\n";
|
|
25
|
+
export declare const SET_PAYMENT_INTENT = "\n mutation SetOrderPaymentIntent($intent: OrderPaymentIntent!) {\n setOrderPaymentIntent(intent: $intent) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n customFields { paymentIntent }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
|
|
26
|
+
export declare const ADD_PAYMENT = "\n mutation AddPayment($input: PaymentInput!) {\n addPaymentToOrder(input: $input) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n }\n ... on OrderPaymentStateError { errorCode message }\n ... on IneligiblePaymentMethodError { errorCode message }\n ... on PaymentFailedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on PaymentDeclinedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
|
|
26
27
|
export declare const PICKUP_LOCATIONS = "\n query PickupLocations($input: PickupLocationSearchInput!) {\n pickupLocations(input: $input) {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
|
|
27
28
|
export declare const ACTIVE_ORDER_PICKUP_LOCATION = "\n query ActiveOrderPickupLocation {\n activeOrderPickupLocation {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
|
|
28
29
|
export declare const SET_ACTIVE_ORDER_PICKUP_LOCATION = "\n mutation SetActiveOrderPickupLocation($location: StoredPickupLocationInput!) {\n setActiveOrderPickupLocation(location: $location) {\n __typename\n ... on Order {\n id code state\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n";
|
|
@@ -33,7 +34,7 @@ export declare const CREATE_MOLLIE_PAYMENT_INTENT = "\n mutation CreateMolliePa
|
|
|
33
34
|
export declare const SYNC_MOLLIE_PAYMENT_STATUS = "\n mutation SyncMolliePaymentStatus($orderCode: String!) {\n syncMolliePaymentStatus(orderCode: $orderCode) {\n id\n code\n state\n }\n }\n";
|
|
34
35
|
export declare const LOGIN = "\n mutation Login($email: String!, $password: String!) {\n login(username: $email, password: $password) {\n ... on CurrentUser { id identifier }\n ... on InvalidCredentialsError { errorCode message authenticationError }\n ... on NotVerifiedError { errorCode message }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
|
|
35
36
|
export declare const REGISTER = "\n mutation Register($input: RegisterCustomerInput!) {\n registerCustomerAccount(input: $input) {\n ... on Success { success }\n ... on MissingPasswordError { errorCode message }\n ... on PasswordValidationError { errorCode message validationErrorMessage }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
|
|
36
|
-
export declare const GET_CURRENT_CUSTOMER = "\n query Me {\n activeCustomer {\n id firstName lastName emailAddress phoneNumber\n groups { id name }\n addresses {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n orders(options: { take: 10, sort: { createdAt: DESC } }) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
|
|
37
|
+
export declare const GET_CURRENT_CUSTOMER = "\n query Me {\n activeCustomer {\n id firstName lastName emailAddress phoneNumber\n groups { id name }\n isB2B\n addresses {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n orders(options: { take: 10, sort: { createdAt: DESC } }) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
|
|
37
38
|
export declare const ACTIVE_CUSTOMER_PRICE_LISTS = "\n query ActiveCustomerPriceLists {\n activeCustomerPriceLists { id name isContract }\n }\n";
|
|
38
39
|
export declare const GET_CUSTOMER_ORDERS = "\n query CustomerOrders($options: OrderListOptions) {\n activeCustomer {\n orders(options: $options) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
|
|
39
40
|
export declare const LOGOUT = "\n mutation Logout {\n logout { success }\n }\n";
|
|
@@ -57,7 +58,7 @@ export declare const FAVORITE_VARIANT_IDS = "\n query FavoriteVariantIds {\n
|
|
|
57
58
|
export declare const MY_FAVORITES = "\n query MyFavorites($options: FavoriteListOptions) {\n myFavorites(options: $options) {\n items {\n id\n productVariantId\n createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n product {\n id name slug\n featuredAsset {\n source width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n totalItems\n }\n }\n";
|
|
58
59
|
export declare const TOGGLE_FAVORITE = "\n mutation ToggleFavorite($productVariantId: ID!) {\n toggleFavorite(productVariantId: $productVariantId)\n }\n";
|
|
59
60
|
export declare const REMOVE_FAVORITE = "\n mutation RemoveFavorite($productVariantId: ID!) {\n removeFavorite(productVariantId: $productVariantId)\n }\n";
|
|
60
|
-
export declare const GET_ACTIVE_CHANNEL = "\n query ActiveChannel {\n activeChannel {\n id code\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n availableCurrencyCodes\n \n customFields {\n businessName businessDescription\n logoAssetId darkLogoAssetId coverAssetId faviconAssetId\n websiteUrl primaryColor\n contactEmail contactPhone\n legalName vatNumber registrationNumber\n addressLine1 addressLine2 city postalCode province country\n socialLinks\n commercePathPrefix commercePathPrefixTranslations productPathSegment\n cdnDomain maintenanceMode\n urlLocaleStrategy urlLocalePrefixDefault\n twitterHandle defaultOgImageId llmsTxtEnabled\n storefrontUrl quotesEnabled\n returnsEnabled returnWindowDays\n }\n\n }\n }\n";
|
|
61
|
+
export declare const GET_ACTIVE_CHANNEL = "\n query ActiveChannel {\n activeChannel {\n id code\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n availableCurrencyCodes\n \n customFields {\n businessName businessDescription\n logoAssetId darkLogoAssetId coverAssetId faviconAssetId\n websiteUrl primaryColor\n contactEmail contactPhone\n legalName vatNumber registrationNumber\n addressLine1 addressLine2 city postalCode province country\n socialLinks\n commercePathPrefix commercePathPrefixTranslations productPathSegment\n cdnDomain maintenanceMode\n urlLocaleStrategy urlLocalePrefixDefault\n twitterHandle defaultOgImageId llmsTxtEnabled\n storefrontUrl quotesEnabled\n returnsEnabled returnWindowDays\n taxDisplayDefault taxDisplayB2b taxExclusiveCountries\n }\n\n }\n }\n";
|
|
61
62
|
export declare const PROPERTY_GROUPS = "\n query PropertyGroups {\n productPropertyGroups {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength allowedCollectionIds filterableFieldSlugs }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n }\n";
|
|
62
63
|
export declare const PRODUCT_PROPERTIES = "\n query ProductProperties($productId: ID!) {\n productPropertyValues(productId: $productId) {\n group {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n values { id propertyId languageCode value }\n }\n }\n";
|
|
63
64
|
export declare const GET_PRODUCT_RECOMMENDATIONS = "\n query ProductRecommendations($productId: ID!, $groupSlug: String) {\n productRecommendations(productId: $productId, groupSlug: $groupSlug) {\n groupName\n groupSlug\n products {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
|
|
@@ -67,11 +68,15 @@ export declare const GET_EXCHANGE_RATE = "\n query ExchangeRate($targetCurrency
|
|
|
67
68
|
export declare const CONVERT_FROM_BASE = "\n query ConvertFromBase($amount: String!, $targetCurrency: String!) {\n convertFromBase(amount: $amount, targetCurrency: $targetCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
|
|
68
69
|
export declare const CONVERT_TO_BASE = "\n query ConvertToBase($amount: String!, $sourceCurrency: String!) {\n convertToBase(amount: $amount, sourceCurrency: $sourceCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
|
|
69
70
|
export declare const CONVERT_TO_MULTIPLE = "\n query ConvertToMultiple($amount: String!, $from: String!, $to: [String!]!) {\n convertToMultiple(amount: $amount, fromCurrency: $from, toCurrencies: $to) {\n currency amount rate\n }\n }\n";
|
|
70
|
-
export declare const MY_QUOTES
|
|
71
|
-
export declare const
|
|
72
|
-
export declare const
|
|
71
|
+
export declare const MY_QUOTES: string;
|
|
72
|
+
export declare const MY_QUOTES_LEGACY: string;
|
|
73
|
+
export declare const MY_QUOTE: string;
|
|
74
|
+
export declare const MY_QUOTE_LEGACY: string;
|
|
75
|
+
export declare const CREATE_QUOTE_REQUEST: string;
|
|
76
|
+
export declare const CREATE_QUOTE_REQUEST_LEGACY: string;
|
|
73
77
|
export declare const ACCEPT_QUOTE = "\n mutation AcceptQuote($id: ID!) {\n acceptQuote(id: $id) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
|
|
74
|
-
export declare const CANCEL_MY_QUOTE
|
|
78
|
+
export declare const CANCEL_MY_QUOTE: string;
|
|
79
|
+
export declare const CANCEL_MY_QUOTE_LEGACY: string;
|
|
75
80
|
export declare const GET_BRANDING = "\n query GetBranding($ids: [ID!]!) {\n activeChannel {\n id\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n }\n fontResources {\n id\n identifier\n kind\n family\n weights\n files {\n id\n source\n preview\n mimeType\n }\n }\n brandingAssets(ids: $ids) {\n id\n source\n preview\n mimeType\n }\n }\n";
|
|
76
81
|
export declare const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = "\n query ActiveChannelOrderConstraints {\n activeChannelOrderConstraints {\n minOrderAmountGross\n minOrderAmountNet\n minOrderQuantity\n fulfillmentMinOrderNet\n currencyCode\n customerIsExempt\n }\n }\n";
|
|
77
82
|
export declare const MY_ORDER_INVOICES = "\n query MyOrderInvoices($orderCode: String!) {\n myOrderInvoices(orderCode: $orderCode) {\n id invoiceNumber invoicedOn totalWithTax currencyCode languageCode createdAt\n }\n }\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAoCA,eAAO,M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