@shopify/hydrogen 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/esnext/components/CartProvider/CartActions.client.d.ts +4 -2
  2. package/dist/esnext/components/CartProvider/CartActions.client.js +20 -11
  3. package/dist/esnext/components/CartProvider/CartProvider.client.d.ts +4 -2
  4. package/dist/esnext/components/CartProvider/CartProvider.client.js +4 -2
  5. package/dist/esnext/components/CartProvider/cart-queries.js +10 -9
  6. package/dist/esnext/components/CartProvider/graphql/CartAttributesUpdateMutation.d.ts +2 -1
  7. package/dist/esnext/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.d.ts +2 -1
  8. package/dist/esnext/components/CartProvider/graphql/CartCreateMutation.d.ts +2 -1
  9. package/dist/esnext/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.d.ts +2 -1
  10. package/dist/esnext/components/CartProvider/graphql/CartFragment.d.ts +1 -1
  11. package/dist/esnext/components/CartProvider/graphql/CartLineAddMutation.d.ts +2 -1
  12. package/dist/esnext/components/CartProvider/graphql/CartLineRemoveMutation.d.ts +2 -1
  13. package/dist/esnext/components/CartProvider/graphql/CartLineUpdateMutation.d.ts +2 -1
  14. package/dist/esnext/components/CartProvider/graphql/CartNoteUpdateMutation.d.ts +2 -1
  15. package/dist/esnext/components/CartProvider/graphql/CartQuery.d.ts +2 -1
  16. package/dist/esnext/components/CartProvider/useCartAPIStateMachine.client.d.ts +4 -2
  17. package/dist/esnext/components/CartProvider/useCartAPIStateMachine.client.js +2 -1
  18. package/dist/esnext/storefront-api-types.d.ts +114 -95
  19. package/dist/esnext/storefront-api-types.js +2 -0
  20. package/dist/esnext/utilities/log/log.js +3 -2
  21. package/dist/esnext/version.d.ts +1 -1
  22. package/dist/esnext/version.js +1 -1
  23. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { AttributeInput, CartBuyerIdentityInput, CartInput, CartLineInput, CartLineUpdateInput, CountryCode } from '../../storefront-api-types.js';
1
+ import { AttributeInput, CartBuyerIdentityInput, CartInput, CartLineInput, CartLineUpdateInput, CountryCode, LanguageCode } from '../../storefront-api-types.js';
2
2
  import { CartAttributesUpdateMutation } from './graphql/CartAttributesUpdateMutation.js';
3
3
  import { CartBuyerIdentityUpdateMutation } from './graphql/CartBuyerIdentityUpdateMutation.js';
4
4
  import { CartCreateMutation } from './graphql/CartCreateMutation.js';
@@ -13,13 +13,15 @@ import { CartQueryQuery } from './graphql/CartQuery.js';
13
13
  *
14
14
  * See [cart API graphql mutations](https://shopify.dev/api/storefront/2022-07/objects/Cart)
15
15
  */
16
- export declare function useCartActions({ numCartLines, cartFragment, countryCode, }: {
16
+ export declare function useCartActions({ numCartLines, cartFragment, countryCode, languageCode, }: {
17
17
  /** Maximum number of cart lines to fetch. Defaults to 250 cart lines. */
18
18
  numCartLines?: number;
19
19
  /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/latest/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */
20
20
  cartFragment: string;
21
21
  /** The ISO country code for i18n. */
22
22
  countryCode?: CountryCode;
23
+ /** The ISO country code for i18n. */
24
+ languageCode?: LanguageCode;
23
25
  }): {
24
26
  cartFetch: (cartId: string) => Promise<{
25
27
  data: CartQueryQuery | undefined;
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useMemo } from 'react';
2
- import { CountryCode, } from '../../storefront-api-types.js';
2
+ import { CountryCode, LanguageCode, } from '../../storefront-api-types.js';
3
3
  import { CartAttributesUpdate, CartBuyerIdentityUpdate, CartCreate, CartDiscountCodesUpdate, CartLineAdd, CartLineRemove, CartLineUpdate, CartNoteUpdate, CartQuery, } from './cart-queries.js';
4
4
  import { useCartFetch } from './hooks.client.js';
5
5
  /**
@@ -7,7 +7,7 @@ import { useCartFetch } from './hooks.client.js';
7
7
  *
8
8
  * See [cart API graphql mutations](https://shopify.dev/api/storefront/2022-07/objects/Cart)
9
9
  */
10
- export function useCartActions({ numCartLines, cartFragment, countryCode = CountryCode.Us, }) {
10
+ export function useCartActions({ numCartLines, cartFragment, countryCode = CountryCode.Us, languageCode = LanguageCode.En, }) {
11
11
  const fetchCart = useCartFetch();
12
12
  const cartFetch = useCallback((cartId) => {
13
13
  return fetchCart({
@@ -16,9 +16,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
16
16
  id: cartId,
17
17
  numCartLines,
18
18
  country: countryCode,
19
+ language: languageCode,
19
20
  },
20
21
  });
21
- }, [fetchCart, cartFragment, numCartLines, countryCode]);
22
+ }, [fetchCart, cartFragment, numCartLines, countryCode, languageCode]);
22
23
  const cartCreate = useCallback((cart) => {
23
24
  return fetchCart({
24
25
  query: CartCreate(cartFragment),
@@ -26,9 +27,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
26
27
  input: cart,
27
28
  numCartLines,
28
29
  country: countryCode,
30
+ language: languageCode,
29
31
  },
30
32
  });
31
- }, [cartFragment, countryCode, fetchCart, numCartLines]);
33
+ }, [cartFragment, countryCode, fetchCart, numCartLines, languageCode]);
32
34
  const cartLineAdd = useCallback((cartId, lines) => {
33
35
  return fetchCart({
34
36
  query: CartLineAdd(cartFragment),
@@ -37,9 +39,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
37
39
  lines,
38
40
  numCartLines,
39
41
  country: countryCode,
42
+ language: languageCode,
40
43
  },
41
44
  });
42
- }, [cartFragment, countryCode, fetchCart, numCartLines]);
45
+ }, [cartFragment, countryCode, fetchCart, numCartLines, languageCode]);
43
46
  const cartLineUpdate = useCallback((cartId, lines) => {
44
47
  return fetchCart({
45
48
  query: CartLineUpdate(cartFragment),
@@ -48,9 +51,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
48
51
  lines,
49
52
  numCartLines,
50
53
  country: countryCode,
54
+ language: languageCode,
51
55
  },
52
56
  });
53
- }, [cartFragment, countryCode, fetchCart, numCartLines]);
57
+ }, [cartFragment, countryCode, fetchCart, numCartLines, languageCode]);
54
58
  const cartLineRemove = useCallback((cartId, lines) => {
55
59
  return fetchCart({
56
60
  query: CartLineRemove(cartFragment),
@@ -59,9 +63,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
59
63
  lines,
60
64
  numCartLines,
61
65
  country: countryCode,
66
+ language: languageCode,
62
67
  },
63
68
  });
64
- }, [cartFragment, countryCode, fetchCart, numCartLines]);
69
+ }, [cartFragment, countryCode, fetchCart, numCartLines, languageCode]);
65
70
  const noteUpdate = useCallback((cartId, note) => {
66
71
  return fetchCart({
67
72
  query: CartNoteUpdate(cartFragment),
@@ -70,9 +75,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
70
75
  note,
71
76
  numCartLines,
72
77
  country: countryCode,
78
+ language: languageCode,
73
79
  },
74
80
  });
75
- }, [fetchCart, cartFragment, numCartLines, countryCode]);
81
+ }, [fetchCart, cartFragment, numCartLines, countryCode, languageCode]);
76
82
  const buyerIdentityUpdate = useCallback((cartId, buyerIdentity) => {
77
83
  return fetchCart({
78
84
  query: CartBuyerIdentityUpdate(cartFragment),
@@ -81,9 +87,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
81
87
  buyerIdentity,
82
88
  numCartLines,
83
89
  country: countryCode,
90
+ language: languageCode,
84
91
  },
85
92
  });
86
- }, [cartFragment, countryCode, fetchCart, numCartLines]);
93
+ }, [cartFragment, countryCode, fetchCart, numCartLines, languageCode]);
87
94
  const cartAttributesUpdate = useCallback((cartId, attributes) => {
88
95
  return fetchCart({
89
96
  query: CartAttributesUpdate(cartFragment),
@@ -92,9 +99,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
92
99
  attributes,
93
100
  numCartLines,
94
101
  country: countryCode,
102
+ language: languageCode,
95
103
  },
96
104
  });
97
- }, [cartFragment, countryCode, fetchCart, numCartLines]);
105
+ }, [cartFragment, countryCode, fetchCart, numCartLines, languageCode]);
98
106
  const discountCodesUpdate = useCallback((cartId, discountCodes) => {
99
107
  return fetchCart({
100
108
  query: CartDiscountCodesUpdate(cartFragment),
@@ -103,9 +111,10 @@ export function useCartActions({ numCartLines, cartFragment, countryCode = Count
103
111
  discountCodes,
104
112
  numCartLines,
105
113
  country: countryCode,
114
+ language: languageCode,
106
115
  },
107
116
  });
108
- }, [cartFragment, countryCode, fetchCart, numCartLines]);
117
+ }, [cartFragment, countryCode, fetchCart, numCartLines, languageCode]);
109
118
  return useMemo(() => ({
110
119
  cartFetch,
111
120
  cartCreate,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { CartFragmentFragment } from './graphql/CartFragment.js';
3
- import { CartBuyerIdentityInput, CountryCode } from '../../storefront-api-types.js';
4
- export declare function CartProvider({ children, numCartLines, onCreate, onLineAdd, onLineRemove, onLineUpdate, onNoteUpdate, onBuyerIdentityUpdate, onAttributesUpdate, onDiscountCodesUpdate, onCreateComplete, onLineAddComplete, onLineRemoveComplete, onLineUpdateComplete, onNoteUpdateComplete, onBuyerIdentityUpdateComplete, onAttributesUpdateComplete, onDiscountCodesUpdateComplete, data: cart, cartFragment, customerAccessToken, countryCode, }: {
3
+ import { CartBuyerIdentityInput, CountryCode, LanguageCode } from '../../storefront-api-types.js';
4
+ export declare function CartProvider({ children, numCartLines, onCreate, onLineAdd, onLineRemove, onLineUpdate, onNoteUpdate, onBuyerIdentityUpdate, onAttributesUpdate, onDiscountCodesUpdate, onCreateComplete, onLineAddComplete, onLineRemoveComplete, onLineUpdateComplete, onNoteUpdateComplete, onBuyerIdentityUpdateComplete, onAttributesUpdateComplete, onDiscountCodesUpdateComplete, data: cart, cartFragment, customerAccessToken, countryCode, languageCode, }: {
5
5
  /** Any `ReactNode` elements. */
6
6
  children: React.ReactNode;
7
7
  /** Maximum number of cart lines to fetch. Defaults to 250 cart lines. */
@@ -46,4 +46,6 @@ export declare function CartProvider({ children, numCartLines, onCreate, onLineA
46
46
  customerAccessToken?: CartBuyerIdentityInput['customerAccessToken'];
47
47
  /** The ISO country code for i18n. */
48
48
  countryCode?: CountryCode;
49
+ /** The ISO language code for i18n. */
50
+ languageCode?: LanguageCode;
49
51
  }): JSX.Element;
@@ -5,9 +5,10 @@ import { useCartAPIStateMachine } from './useCartAPIStateMachine.client.js';
5
5
  import { CART_ID_STORAGE_KEY } from './constants.js';
6
6
  import { ClientAnalytics } from '../../foundation/Analytics/ClientAnalytics.js';
7
7
  import { useLocalization } from '../../hooks/useLocalization/useLocalization.js';
8
- export function CartProvider({ children, numCartLines, onCreate, onLineAdd, onLineRemove, onLineUpdate, onNoteUpdate, onBuyerIdentityUpdate, onAttributesUpdate, onDiscountCodesUpdate, onCreateComplete, onLineAddComplete, onLineRemoveComplete, onLineUpdateComplete, onNoteUpdateComplete, onBuyerIdentityUpdateComplete, onAttributesUpdateComplete, onDiscountCodesUpdateComplete, data: cart, cartFragment = defaultCartFragment, customerAccessToken, countryCode, }) {
9
- const { country } = useLocalization();
8
+ export function CartProvider({ children, numCartLines, onCreate, onLineAdd, onLineRemove, onLineUpdate, onNoteUpdate, onBuyerIdentityUpdate, onAttributesUpdate, onDiscountCodesUpdate, onCreateComplete, onLineAddComplete, onLineRemoveComplete, onLineUpdateComplete, onNoteUpdateComplete, onBuyerIdentityUpdateComplete, onAttributesUpdateComplete, onDiscountCodesUpdateComplete, data: cart, cartFragment = defaultCartFragment, customerAccessToken, countryCode, languageCode, }) {
9
+ const { country, language } = useLocalization();
10
10
  countryCode = (countryCode ?? country.isoCode).toUpperCase();
11
+ languageCode = (languageCode ?? language.isoCode).toUpperCase();
11
12
  if (countryCode)
12
13
  countryCode = countryCode.toUpperCase();
13
14
  const [prevCountryCode, setPrevCountryCode] = useState(countryCode);
@@ -136,6 +137,7 @@ export function CartProvider({ children, numCartLines, onCreate, onLineAdd, onLi
136
137
  data: cart,
137
138
  cartFragment,
138
139
  countryCode,
140
+ languageCode,
139
141
  onCartActionEntry,
140
142
  onCartActionOptimisticUI,
141
143
  onCartActionComplete,
@@ -1,5 +1,5 @@
1
1
  export const CartLineAdd = (cartFragment) => `
2
- mutation CartLineAdd($cartId: ID!, $lines: [CartLineInput!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
2
+ mutation CartLineAdd($cartId: ID!, $lines: [CartLineInput!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
3
3
  cartLinesAdd(cartId: $cartId, lines: $lines) {
4
4
  cart {
5
5
  ...CartFragment
@@ -10,7 +10,7 @@ mutation CartLineAdd($cartId: ID!, $lines: [CartLineInput!]!, $numCartLines: Int
10
10
  ${cartFragment}
11
11
  `;
12
12
  export const CartCreate = (cartFragment) => `
13
- mutation CartCreate($input: CartInput!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
13
+ mutation CartCreate($input: CartInput!, $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
14
14
  cartCreate(input: $input) {
15
15
  cart {
16
16
  ...CartFragment
@@ -21,7 +21,7 @@ mutation CartCreate($input: CartInput!, $numCartLines: Int = 250, $country: Coun
21
21
  ${cartFragment}
22
22
  `;
23
23
  export const CartLineRemove = (cartFragment) => `
24
- mutation CartLineRemove($cartId: ID!, $lines: [ID!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
24
+ mutation CartLineRemove($cartId: ID!, $lines: [ID!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
25
25
  cartLinesRemove(cartId: $cartId, lineIds: $lines) {
26
26
  cart {
27
27
  ...CartFragment
@@ -32,7 +32,7 @@ mutation CartLineRemove($cartId: ID!, $lines: [ID!]!, $numCartLines: Int = 250,
32
32
  ${cartFragment}
33
33
  `;
34
34
  export const CartLineUpdate = (cartFragment) => `
35
- mutation CartLineUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
35
+ mutation CartLineUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
36
36
  cartLinesUpdate(cartId: $cartId, lines: $lines) {
37
37
  cart {
38
38
  ...CartFragment
@@ -43,7 +43,7 @@ mutation CartLineUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!, $numCartL
43
43
  ${cartFragment}
44
44
  `;
45
45
  export const CartNoteUpdate = (cartFragment) => `
46
- mutation CartNoteUpdate($cartId: ID!, $note: String, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
46
+ mutation CartNoteUpdate($cartId: ID!, $note: String, $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
47
47
  cartNoteUpdate(cartId: $cartId, note: $note) {
48
48
  cart {
49
49
  ...CartFragment
@@ -59,7 +59,8 @@ mutation CartBuyerIdentityUpdate(
59
59
  $buyerIdentity: CartBuyerIdentityInput!
60
60
  $numCartLines: Int = 250
61
61
  $country: CountryCode = ZZ
62
- ) @inContext(country: $country) {
62
+ $language: LanguageCode
63
+ ) @inContext(country: $country, language: $language) {
63
64
  cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: $buyerIdentity) {
64
65
  cart {
65
66
  ...CartFragment
@@ -70,7 +71,7 @@ mutation CartBuyerIdentityUpdate(
70
71
  ${cartFragment}
71
72
  `;
72
73
  export const CartAttributesUpdate = (cartFragment) => `
73
- mutation CartAttributesUpdate($attributes: [AttributeInput!]!, $cartId: ID!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
74
+ mutation CartAttributesUpdate($attributes: [AttributeInput!]!, $cartId: ID!, $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
74
75
  cartAttributesUpdate(attributes: $attributes, cartId: $cartId) {
75
76
  cart {
76
77
  ...CartFragment
@@ -81,7 +82,7 @@ mutation CartAttributesUpdate($attributes: [AttributeInput!]!, $cartId: ID!, $nu
81
82
  ${cartFragment}
82
83
  `;
83
84
  export const CartDiscountCodesUpdate = (cartFragment) => `
84
- mutation CartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!], $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
85
+ mutation CartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!], $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
85
86
  cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
86
87
  cart {
87
88
  ...CartFragment
@@ -92,7 +93,7 @@ mutation CartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!], $numCa
92
93
  ${cartFragment}
93
94
  `;
94
95
  export const CartQuery = (cartFragment) => `
95
- query CartQuery($id: ID!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {
96
+ query CartQuery($id: ID!, $numCartLines: Int = 250, $country: CountryCode = ZZ, $language: LanguageCode) @inContext(country: $country, language: $language) {
96
97
  cart(id: $id) {
97
98
  ...CartFragment
98
99
  }
@@ -2,12 +2,13 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartAttributesUpdateMutationVariables = Types.Exact<{
7
7
  attributes: Array<Types.AttributeInput> | Types.AttributeInput;
8
8
  cartId: Types.Scalars['ID'];
9
9
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
10
10
  country?: Types.InputMaybe<Types.CountryCode>;
11
+ language?: Types.InputMaybe<Types.LanguageCode>;
11
12
  }>;
12
13
  export declare type CartAttributesUpdateMutation = {
13
14
  __typename?: 'Mutation';
@@ -2,12 +2,13 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartBuyerIdentityUpdateMutationVariables = Types.Exact<{
7
7
  cartId: Types.Scalars['ID'];
8
8
  buyerIdentity: Types.CartBuyerIdentityInput;
9
9
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
10
10
  country?: Types.InputMaybe<Types.CountryCode>;
11
+ language?: Types.InputMaybe<Types.LanguageCode>;
11
12
  }>;
12
13
  export declare type CartBuyerIdentityUpdateMutation = {
13
14
  __typename?: 'Mutation';
@@ -2,11 +2,12 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartCreateMutationVariables = Types.Exact<{
7
7
  input: Types.CartInput;
8
8
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
9
9
  country?: Types.InputMaybe<Types.CountryCode>;
10
+ language?: Types.InputMaybe<Types.LanguageCode>;
10
11
  }>;
11
12
  export declare type CartCreateMutation = {
12
13
  __typename?: 'Mutation';
@@ -2,12 +2,13 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartDiscountCodesUpdateMutationVariables = Types.Exact<{
7
7
  cartId: Types.Scalars['ID'];
8
8
  discountCodes?: Types.InputMaybe<Array<Types.Scalars['String']> | Types.Scalars['String']>;
9
9
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
10
10
  country?: Types.InputMaybe<Types.CountryCode>;
11
+ language?: Types.InputMaybe<Types.LanguageCode>;
11
12
  }>;
12
13
  export declare type CartDiscountCodesUpdateMutation = {
13
14
  __typename?: 'Mutation';
@@ -2,7 +2,7 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartFragmentFragment = {
7
7
  __typename?: 'Cart';
8
8
  } & Pick<Types.Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note'> & {
@@ -2,12 +2,13 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartLineAddMutationVariables = Types.Exact<{
7
7
  cartId: Types.Scalars['ID'];
8
8
  lines: Array<Types.CartLineInput> | Types.CartLineInput;
9
9
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
10
10
  country?: Types.InputMaybe<Types.CountryCode>;
11
+ language?: Types.InputMaybe<Types.LanguageCode>;
11
12
  }>;
12
13
  export declare type CartLineAddMutation = {
13
14
  __typename?: 'Mutation';
@@ -2,12 +2,13 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartLineRemoveMutationVariables = Types.Exact<{
7
7
  cartId: Types.Scalars['ID'];
8
8
  lines: Array<Types.Scalars['ID']> | Types.Scalars['ID'];
9
9
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
10
10
  country?: Types.InputMaybe<Types.CountryCode>;
11
+ language?: Types.InputMaybe<Types.LanguageCode>;
11
12
  }>;
12
13
  export declare type CartLineRemoveMutation = {
13
14
  __typename?: 'Mutation';
@@ -2,12 +2,13 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartLineUpdateMutationVariables = Types.Exact<{
7
7
  cartId: Types.Scalars['ID'];
8
8
  lines: Array<Types.CartLineUpdateInput> | Types.CartLineUpdateInput;
9
9
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
10
10
  country?: Types.InputMaybe<Types.CountryCode>;
11
+ language?: Types.InputMaybe<Types.LanguageCode>;
11
12
  }>;
12
13
  export declare type CartLineUpdateMutation = {
13
14
  __typename?: 'Mutation';
@@ -2,12 +2,13 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartNoteUpdateMutationVariables = Types.Exact<{
7
7
  cartId: Types.Scalars['ID'];
8
8
  note?: Types.InputMaybe<Types.Scalars['String']>;
9
9
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
10
10
  country?: Types.InputMaybe<Types.CountryCode>;
11
+ language?: Types.InputMaybe<Types.LanguageCode>;
11
12
  }>;
12
13
  export declare type CartNoteUpdateMutation = {
13
14
  __typename?: 'Mutation';
@@ -2,11 +2,12 @@
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
3
3
  * Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
4
4
  */
5
- import * as Types from '../../../storefront-api-types.js';
5
+ import * as Types from '../../../storefront-api-types';
6
6
  export declare type CartQueryQueryVariables = Types.Exact<{
7
7
  id: Types.Scalars['ID'];
8
8
  numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
9
9
  country?: Types.InputMaybe<Types.CountryCode>;
10
+ language?: Types.InputMaybe<Types.LanguageCode>;
10
11
  }>;
11
12
  export declare type CartQueryQuery = {
12
13
  __typename?: 'QueryRoot';
@@ -1,8 +1,8 @@
1
1
  import { StateMachine } from '@xstate/fsm';
2
2
  import { CartFragmentFragment } from './graphql/CartFragment.js';
3
3
  import { Cart, CartMachineActionEvent, CartMachineContext, CartMachineEvent, CartMachineFetchResultEvent, CartMachineTypeState } from './types.js';
4
- import { CountryCode } from '../../storefront-api-types.js';
5
- export declare function useCartAPIStateMachine({ numCartLines, onCartActionEntry, onCartActionOptimisticUI, onCartActionComplete, data: cart, cartFragment, countryCode, }: {
4
+ import { CountryCode, LanguageCode } from '../../storefront-api-types.js';
5
+ export declare function useCartAPIStateMachine({ numCartLines, onCartActionEntry, onCartActionOptimisticUI, onCartActionComplete, data: cart, cartFragment, countryCode, languageCode, }: {
6
6
  /** Maximum number of cart lines to fetch. Defaults to 250 cart lines. */
7
7
  numCartLines?: number;
8
8
  /** A callback that is invoked just before a Cart API action executes. */
@@ -17,5 +17,7 @@ export declare function useCartAPIStateMachine({ numCartLines, onCartActionEntry
17
17
  cartFragment: string;
18
18
  /** The ISO country code for i18n. */
19
19
  countryCode?: CountryCode;
20
+ /** The ISO country code for i18n. */
21
+ languageCode?: LanguageCode;
20
22
  }): readonly [StateMachine.State<CartMachineContext, CartMachineEvent, CartMachineTypeState>, (event: "CART_FETCH" | "CART_CREATE" | "CART_SET" | "CARTLINE_ADD" | "CARTLINE_REMOVE" | "CARTLINE_UPDATE" | "NOTE_UPDATE" | "BUYER_IDENTITY_UPDATE" | "CART_ATTRIBUTES_UPDATE" | "DISCOUNT_CODES_UPDATE" | "CART_COMPLETED" | "RESOLVE" | "ERROR" | CartMachineEvent) => void, StateMachine.Service<CartMachineContext, CartMachineEvent, CartMachineTypeState>];
21
23
  export declare function cartFromGraphQL(cart: CartFragmentFragment): Cart;
@@ -129,11 +129,12 @@ function createCartMachine(initialCart) {
129
129
  },
130
130
  });
131
131
  }
132
- export function useCartAPIStateMachine({ numCartLines, onCartActionEntry, onCartActionOptimisticUI, onCartActionComplete, data: cart, cartFragment, countryCode, }) {
132
+ export function useCartAPIStateMachine({ numCartLines, onCartActionEntry, onCartActionOptimisticUI, onCartActionComplete, data: cart, cartFragment, countryCode, languageCode, }) {
133
133
  const { cartFetch, cartCreate, cartLineAdd, cartLineUpdate, cartLineRemove, noteUpdate, buyerIdentityUpdate, cartAttributesUpdate, discountCodesUpdate, } = useCartActions({
134
134
  numCartLines,
135
135
  cartFragment,
136
136
  countryCode,
137
+ languageCode,
137
138
  });
138
139
  const cartMachine = useMemo(() => createCartMachine(cart), [cart]);
139
140
  const [state, send, service] = useMachine(cartMachine, {
@@ -49,7 +49,7 @@ export declare type Scalars = {
49
49
  * A string containing HTML code. Refer to the [HTML spec](https://html.spec.whatwg.org/#elements-3) for a
50
50
  * complete list of HTML elements.
51
51
  *
52
- * Example value: `"<p>Grey cotton knit sweater.</p>"`.
52
+ * Example value: `"<p>Grey cotton knit sweater.</p>"`
53
53
  *
54
54
  */
55
55
  HTML: string;
@@ -118,7 +118,7 @@ export declare type AppliedGiftCard = Node & {
118
118
  * @deprecated Use `balance` instead.
119
119
  */
120
120
  balanceV2: MoneyV2;
121
- /** A globally-unique identifier. */
121
+ /** A globally-unique ID. */
122
122
  id: Scalars['ID'];
123
123
  /** The last characters of the gift card. */
124
124
  lastCharacters: Scalars['String'];
@@ -152,7 +152,7 @@ export declare type Article = HasMetafields & Node & OnlineStorePublishable & {
152
152
  *
153
153
  */
154
154
  handle: Scalars['String'];
155
- /** A globally-unique identifier. */
155
+ /** A globally-unique ID. */
156
156
  id: Scalars['ID'];
157
157
  /** The image associated with the article. */
158
158
  image?: Maybe<Image>;
@@ -266,7 +266,7 @@ export declare type Attribute = {
266
266
  /** Value of the attribute. */
267
267
  value?: Maybe<Scalars['String']>;
268
268
  };
269
- /** Specifies the input fields required for an attribute. */
269
+ /** The input fields for an attribute. */
270
270
  export declare type AttributeInput = {
271
271
  /** Key or name of the attribute. */
272
272
  key: Scalars['String'];
@@ -317,7 +317,7 @@ export declare type Blog = HasMetafields & Node & OnlineStorePublishable & {
317
317
  *
318
318
  */
319
319
  handle: Scalars['String'];
320
- /** A globally-unique identifier. */
320
+ /** A globally-unique ID. */
321
321
  id: Scalars['ID'];
322
322
  /** Returns a metafield found by namespace and key. */
323
323
  metafield?: Maybe<Metafield>;
@@ -396,7 +396,7 @@ export declare enum BlogSortKeys {
396
396
  Title = "TITLE"
397
397
  }
398
398
  /**
399
- * The store's branding configuration.
399
+ * The store's [branding configuration](https://help.shopify.com/en/manual/promoting-marketing/managing-brand-assets).
400
400
  *
401
401
  */
402
402
  export declare type Brand = {
@@ -464,7 +464,7 @@ export declare type Cart = Node & {
464
464
  attribute?: Maybe<Attribute>;
465
465
  /** The attributes associated with the cart. Attributes are represented as key-value pairs. */
466
466
  attributes: Array<Attribute>;
467
- /** Information about the buyer that is interacting with the cart. */
467
+ /** Information about the buyer that's interacting with the cart. */
468
468
  buyerIdentity: CartBuyerIdentity;
469
469
  /** The URL of the checkout for the cart. */
470
470
  checkoutUrl: Scalars['URL'];
@@ -494,11 +494,11 @@ export declare type Cart = Node & {
494
494
  * @deprecated Use `cost` instead.
495
495
  */
496
496
  estimatedCost: CartEstimatedCost;
497
- /** A globally-unique identifier. */
497
+ /** A globally-unique ID. */
498
498
  id: Scalars['ID'];
499
499
  /** A list of lines containing information about the items the customer intends to purchase. */
500
500
  lines: CartLineConnection;
501
- /** A note that is associated with the cart. For example, the note can be a personalized message to the buyer. */
501
+ /** A note that's associated with the cart. For example, the note can be a personalized message to the buyer. */
502
502
  note?: Maybe<Scalars['String']>;
503
503
  /** The total number of items in the cart. */
504
504
  totalQuantity: Scalars['Int'];
@@ -573,9 +573,9 @@ export declare type CartBuyerIdentity = {
573
573
  *
574
574
  */
575
575
  deliveryAddressPreferences: Array<DeliveryAddress>;
576
- /** The email address of the buyer that is interacting with the cart. */
576
+ /** The email address of the buyer that's interacting with the cart. */
577
577
  email?: Maybe<Scalars['String']>;
578
- /** The phone number of the buyer that is interacting with the cart. */
578
+ /** The phone number of the buyer that's interacting with the cart. */
579
579
  phone?: Maybe<Scalars['String']>;
580
580
  };
581
581
  /**
@@ -778,7 +778,7 @@ export declare type CartEstimatedCost = {
778
778
  /** The estimated tax amount for the customer to pay at checkout. */
779
779
  totalTaxAmount?: Maybe<MoneyV2>;
780
780
  };
781
- /** Specifies the input fields to create a cart. */
781
+ /** The input fields to create a cart. */
782
782
  export declare type CartInput = {
783
783
  /** An array of key-value pairs that contains additional information about the cart. */
784
784
  attributes?: InputMaybe<Array<AttributeInput>>;
@@ -796,7 +796,7 @@ export declare type CartInput = {
796
796
  discountCodes?: InputMaybe<Array<Scalars['String']>>;
797
797
  /** A list of merchandise lines to add to the cart. */
798
798
  lines?: InputMaybe<Array<CartLineInput>>;
799
- /** A note that is associated with the cart. For example, the note can be a personalized message to the buyer. */
799
+ /** A note that's associated with the cart. For example, the note can be a personalized message to the buyer. */
800
800
  note?: InputMaybe<Scalars['String']>;
801
801
  };
802
802
  /** Represents information about the merchandise in the cart. */
@@ -815,7 +815,7 @@ export declare type CartLine = Node & {
815
815
  * @deprecated Use `cost` instead.
816
816
  */
817
817
  estimatedCost: CartLineEstimatedCost;
818
- /** A globally-unique identifier. */
818
+ /** A globally-unique ID. */
819
819
  id: Scalars['ID'];
820
820
  /** The merchandise that the buyer intends to purchase. */
821
821
  merchandise: Merchandise;
@@ -876,28 +876,28 @@ export declare type CartLineEstimatedCost = {
876
876
  /** The estimated total cost of the merchandise line. */
877
877
  totalAmount: MoneyV2;
878
878
  };
879
- /** Specifies the input fields to create a merchandise line on a cart. */
879
+ /** The input fields to create a merchandise line on a cart. */
880
880
  export declare type CartLineInput = {
881
881
  /** An array of key-value pairs that contains additional information about the merchandise line. */
882
882
  attributes?: InputMaybe<Array<AttributeInput>>;
883
- /** The identifier of the merchandise that the buyer intends to purchase. */
883
+ /** The ID of the merchandise that the buyer intends to purchase. */
884
884
  merchandiseId: Scalars['ID'];
885
885
  /** The quantity of the merchandise. */
886
886
  quantity?: InputMaybe<Scalars['Int']>;
887
- /** The identifier of the selling plan that the merchandise is being purchased with. */
887
+ /** The ID of the selling plan that the merchandise is being purchased with. */
888
888
  sellingPlanId?: InputMaybe<Scalars['ID']>;
889
889
  };
890
- /** Specifies the input fields to update a line item on a cart. */
890
+ /** The input fields to update a line item on a cart. */
891
891
  export declare type CartLineUpdateInput = {
892
892
  /** An array of key-value pairs that contains additional information about the merchandise line. */
893
893
  attributes?: InputMaybe<Array<AttributeInput>>;
894
- /** The identifier of the merchandise line. */
894
+ /** The ID of the merchandise line. */
895
895
  id: Scalars['ID'];
896
- /** The identifier of the merchandise for the line item. */
896
+ /** The ID of the merchandise for the line item. */
897
897
  merchandiseId?: InputMaybe<Scalars['ID']>;
898
898
  /** The quantity of the line item. */
899
899
  quantity?: InputMaybe<Scalars['Int']>;
900
- /** The identifier of the selling plan that the merchandise is being purchased with. */
900
+ /** The ID of the selling plan that the merchandise is being purchased with. */
901
901
  sellingPlanId?: InputMaybe<Scalars['ID']>;
902
902
  };
903
903
  /** Return type for `cartLinesAdd` mutation. */
@@ -980,13 +980,13 @@ export declare type Checkout = Node & {
980
980
  createdAt: Scalars['DateTime'];
981
981
  /** The currency code for the checkout. */
982
982
  currencyCode: CurrencyCode;
983
- /** A list of extra information that is added to the checkout. */
983
+ /** A list of extra information that's added to the checkout. */
984
984
  customAttributes: Array<Attribute>;
985
985
  /** Discounts that have been applied on the checkout. */
986
986
  discountApplications: DiscountApplicationConnection;
987
987
  /** The email attached to this checkout. */
988
988
  email?: Maybe<Scalars['String']>;
989
- /** A globally-unique identifier. */
989
+ /** A globally-unique ID. */
990
990
  id: Scalars['ID'];
991
991
  /** A list of line item objects, each one containing information about an item in the checkout. */
992
992
  lineItems: CheckoutLineItemConnection;
@@ -996,7 +996,7 @@ export declare type Checkout = Node & {
996
996
  note?: Maybe<Scalars['String']>;
997
997
  /** The resulting order from a paid checkout. */
998
998
  order?: Maybe<Order>;
999
- /** The Order Status Page for this Checkout, null when checkout is not completed. */
999
+ /** The Order Status Page for this Checkout, null when checkout isn't completed. */
1000
1000
  orderStatusUrl?: Maybe<Scalars['URL']>;
1001
1001
  /** The amount left to be paid. This is equal to the cost of the line items, taxes, and shipping, minus discounts and gift cards. */
1002
1002
  paymentDue: MoneyV2;
@@ -1022,7 +1022,7 @@ export declare type Checkout = Node & {
1022
1022
  *
1023
1023
  */
1024
1024
  shippingDiscountAllocations: Array<DiscountAllocation>;
1025
- /** Once a shipping rate is selected by the customer it is transitioned to a `shipping_line` object. */
1025
+ /** Once a shipping rate is selected by the customer it's transitioned to a `shipping_line` object. */
1026
1026
  shippingLine?: Maybe<ShippingRate>;
1027
1027
  /** The price at checkout before shipping and taxes. */
1028
1028
  subtotalPrice: MoneyV2;
@@ -1072,7 +1072,7 @@ export declare type CheckoutLineItemsArgs = {
1072
1072
  last?: InputMaybe<Scalars['Int']>;
1073
1073
  reverse?: InputMaybe<Scalars['Boolean']>;
1074
1074
  };
1075
- /** Specifies the fields required to update a checkout's attributes. */
1075
+ /** The input fields required to update a checkout's attributes. */
1076
1076
  export declare type CheckoutAttributesUpdateV2Input = {
1077
1077
  /**
1078
1078
  * Allows setting partial addresses on a Checkout, skipping the full validation of attributes.
@@ -1082,7 +1082,7 @@ export declare type CheckoutAttributesUpdateV2Input = {
1082
1082
  *
1083
1083
  */
1084
1084
  allowPartialAddresses?: InputMaybe<Scalars['Boolean']>;
1085
- /** A list of extra information that is added to the checkout. */
1085
+ /** A list of extra information that's added to the checkout. */
1086
1086
  customAttributes?: InputMaybe<Array<AttributeInput>>;
1087
1087
  /** The text of an optional note that a shop owner can attach to the checkout. */
1088
1088
  note?: InputMaybe<Scalars['String']>;
@@ -1106,7 +1106,7 @@ export declare type CheckoutBuyerIdentity = {
1106
1106
  /** The country code for the checkout. For example, `CA`. */
1107
1107
  countryCode?: Maybe<CountryCode>;
1108
1108
  };
1109
- /** Specifies the identity of the customer associated with the checkout. */
1109
+ /** The input fields for the identity of the customer associated with the checkout. */
1110
1110
  export declare type CheckoutBuyerIdentityInput = {
1111
1111
  /**
1112
1112
  * The country code of one of the shop's
@@ -1159,7 +1159,7 @@ export declare type CheckoutCompleteWithTokenizedPaymentV3Payload = {
1159
1159
  */
1160
1160
  userErrors: Array<UserError>;
1161
1161
  };
1162
- /** Specifies the fields required to create a checkout. */
1162
+ /** The input fields required to create a checkout. */
1163
1163
  export declare type CheckoutCreateInput = {
1164
1164
  /**
1165
1165
  * Allows setting partial addresses on a Checkout, skipping the full validation of attributes.
@@ -1170,7 +1170,7 @@ export declare type CheckoutCreateInput = {
1170
1170
  allowPartialAddresses?: InputMaybe<Scalars['Boolean']>;
1171
1171
  /** The identity of the customer associated with the checkout. */
1172
1172
  buyerIdentity?: InputMaybe<CheckoutBuyerIdentityInput>;
1173
- /** A list of extra information that is added to the checkout. */
1173
+ /** A list of extra information that's added to the checkout. */
1174
1174
  customAttributes?: InputMaybe<Array<AttributeInput>>;
1175
1175
  /** The email with which the customer wants to checkout. */
1176
1176
  email?: InputMaybe<Scalars['String']>;
@@ -1277,6 +1277,8 @@ export declare enum CheckoutErrorCode {
1277
1277
  CustomerAlreadyUsedOncePerCustomerDiscountNotice = "CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE",
1278
1278
  /** Discount already applied. */
1279
1279
  DiscountAlreadyApplied = "DISCOUNT_ALREADY_APPLIED",
1280
+ /** Discount code isn't working right now. Please contact us for help. */
1281
+ DiscountCodeApplicationFailed = "DISCOUNT_CODE_APPLICATION_FAILED",
1280
1282
  /** Discount disabled. */
1281
1283
  DiscountDisabled = "DISCOUNT_DISABLED",
1282
1284
  /** Discount expired. */
@@ -1387,7 +1389,7 @@ export declare type CheckoutLineItem = Node & {
1387
1389
  customAttributes: Array<Attribute>;
1388
1390
  /** The discounts that have been allocated onto the checkout line item by discount applications. */
1389
1391
  discountAllocations: Array<DiscountAllocation>;
1390
- /** A globally-unique identifier. */
1392
+ /** A globally-unique ID. */
1391
1393
  id: Scalars['ID'];
1392
1394
  /** The quantity of the line item. */
1393
1395
  quantity: Scalars['Int'];
@@ -1422,24 +1424,24 @@ export declare type CheckoutLineItemEdge = {
1422
1424
  /** The item at the end of CheckoutLineItemEdge. */
1423
1425
  node: CheckoutLineItem;
1424
1426
  };
1425
- /** Specifies the input fields to create a line item on a checkout. */
1427
+ /** The input fields to create a line item on a checkout. */
1426
1428
  export declare type CheckoutLineItemInput = {
1427
1429
  /** Extra information in the form of an array of Key-Value pairs about the line item. */
1428
1430
  customAttributes?: InputMaybe<Array<AttributeInput>>;
1429
1431
  /** The quantity of the line item. */
1430
1432
  quantity: Scalars['Int'];
1431
- /** The identifier of the product variant for the line item. */
1433
+ /** The ID of the product variant for the line item. */
1432
1434
  variantId: Scalars['ID'];
1433
1435
  };
1434
- /** Specifies the input fields to update a line item on the checkout. */
1436
+ /** The input fields to update a line item on the checkout. */
1435
1437
  export declare type CheckoutLineItemUpdateInput = {
1436
1438
  /** Extra information in the form of an array of Key-Value pairs about the line item. */
1437
1439
  customAttributes?: InputMaybe<Array<AttributeInput>>;
1438
- /** The identifier of the line item. */
1440
+ /** The ID of the line item. */
1439
1441
  id?: InputMaybe<Scalars['ID']>;
1440
1442
  /** The quantity of the line item. */
1441
1443
  quantity?: InputMaybe<Scalars['Int']>;
1442
- /** The variant identifier of the line item. */
1444
+ /** The variant ID of the line item. */
1443
1445
  variantId?: InputMaybe<Scalars['ID']>;
1444
1446
  };
1445
1447
  /** Return type for `checkoutLineItemsAdd` mutation. */
@@ -1538,7 +1540,7 @@ export declare type Collection = HasMetafields & Node & OnlineStorePublishable &
1538
1540
  *
1539
1541
  */
1540
1542
  handle: Scalars['String'];
1541
- /** A globally-unique identifier. */
1543
+ /** A globally-unique ID. */
1542
1544
  id: Scalars['ID'];
1543
1545
  /** Image associated with the collection. */
1544
1546
  image?: Maybe<Image>;
@@ -1631,7 +1633,7 @@ export declare type Comment = Node & {
1631
1633
  content: Scalars['String'];
1632
1634
  /** The content of the comment, complete with HTML formatting. */
1633
1635
  contentHtml: Scalars['HTML'];
1634
- /** A globally-unique identifier. */
1636
+ /** A globally-unique ID. */
1635
1637
  id: Scalars['ID'];
1636
1638
  };
1637
1639
  /** A comment on an article. */
@@ -2589,7 +2591,7 @@ export declare type Customer = HasMetafields & {
2589
2591
  email?: Maybe<Scalars['String']>;
2590
2592
  /** The customer’s first name. */
2591
2593
  firstName?: Maybe<Scalars['String']>;
2592
- /** A unique identifier for the customer. */
2594
+ /** A unique ID for the customer. */
2593
2595
  id: Scalars['ID'];
2594
2596
  /** The customer's most recently updated, incomplete checkout. */
2595
2597
  lastIncompleteCheckout?: Maybe<Checkout>;
@@ -2652,7 +2654,7 @@ export declare type CustomerAccessToken = {
2652
2654
  /** The date and time when the customer access token expires. */
2653
2655
  expiresAt: Scalars['DateTime'];
2654
2656
  };
2655
- /** Specifies the input fields required to create a customer access token. */
2657
+ /** The input fields required to create a customer access token. */
2656
2658
  export declare type CustomerAccessTokenCreateInput = {
2657
2659
  /** The email associated to the customer. */
2658
2660
  email: Scalars['String'];
@@ -2708,7 +2710,7 @@ export declare type CustomerActivateByUrlPayload = {
2708
2710
  /** The list of errors that occurred from executing the mutation. */
2709
2711
  customerUserErrors: Array<CustomerUserError>;
2710
2712
  };
2711
- /** Specifies the input fields required to activate a customer. */
2713
+ /** The input fields to activate a customer. */
2712
2714
  export declare type CustomerActivateInput = {
2713
2715
  /** The activation token required to activate the customer. */
2714
2716
  activationToken: Scalars['String'];
@@ -2769,7 +2771,7 @@ export declare type CustomerAddressUpdatePayload = {
2769
2771
  */
2770
2772
  userErrors: Array<UserError>;
2771
2773
  };
2772
- /** The fields required to create a new customer. */
2774
+ /** The input fields to create a new customer. */
2773
2775
  export declare type CustomerCreateInput = {
2774
2776
  /** Indicates whether the customer has consented to be sent marketing material via email. */
2775
2777
  acceptsMarketing?: InputMaybe<Scalars['Boolean']>;
@@ -2874,7 +2876,7 @@ export declare type CustomerResetByUrlPayload = {
2874
2876
  */
2875
2877
  userErrors: Array<UserError>;
2876
2878
  };
2877
- /** Specifies the fields required to reset a customers password. */
2879
+ /** The input fields to reset a customer's password. */
2878
2880
  export declare type CustomerResetInput = {
2879
2881
  /** New password that will be set as part of the reset password process. */
2880
2882
  password: Scalars['String'];
@@ -2896,7 +2898,7 @@ export declare type CustomerResetPayload = {
2896
2898
  */
2897
2899
  userErrors: Array<UserError>;
2898
2900
  };
2899
- /** Specifies the fields required to update the Customer information. */
2901
+ /** The input fields to update the Customer information. */
2900
2902
  export declare type CustomerUpdateInput = {
2901
2903
  /** Indicates whether the customer has consented to be sent marketing material via email. */
2902
2904
  acceptsMarketing?: InputMaybe<Scalars['Boolean']>;
@@ -3116,7 +3118,7 @@ export declare type ExternalVideo = Media & Node & {
3116
3118
  embeddedUrl: Scalars['URL'];
3117
3119
  /** The host of the external video. */
3118
3120
  host: MediaHost;
3119
- /** A globally-unique identifier. */
3121
+ /** A globally-unique ID. */
3120
3122
  id: Scalars['ID'];
3121
3123
  /** The media content type. */
3122
3124
  mediaContentType: MediaContentType;
@@ -3240,7 +3242,7 @@ export declare type GenericFile = Node & {
3240
3242
  __typename?: 'GenericFile';
3241
3243
  /** A word or phrase to indicate the contents of a file. */
3242
3244
  alt?: Maybe<Scalars['String']>;
3243
- /** A globally-unique identifier. */
3245
+ /** A globally-unique ID. */
3244
3246
  id: Scalars['ID'];
3245
3247
  /** The MIME type of the file. */
3246
3248
  mimeType?: Maybe<Scalars['String']>;
@@ -3251,7 +3253,7 @@ export declare type GenericFile = Node & {
3251
3253
  /** The URL of the file. */
3252
3254
  url?: Maybe<Scalars['URL']>;
3253
3255
  };
3254
- /** Used to specify a geographical location. */
3256
+ /** The input fields used to specify a geographical location. */
3255
3257
  export declare type GeoCoordinateInput = {
3256
3258
  /** The coordinate's latitude value. */
3257
3259
  latitude: Scalars['Float'];
@@ -3277,7 +3279,7 @@ export declare type HasMetafieldsMetafieldArgs = {
3277
3279
  export declare type HasMetafieldsMetafieldsArgs = {
3278
3280
  identifiers: Array<HasMetafieldsIdentifier>;
3279
3281
  };
3280
- /** Identifies a metafield on an owner resource by namespace and key. */
3282
+ /** The input fields to identify a metafield on an owner resource by namespace and key. */
3281
3283
  export declare type HasMetafieldsIdentifier = {
3282
3284
  /** The identifier for the metafield. */
3283
3285
  key: Scalars['String'];
@@ -3289,9 +3291,9 @@ export declare type Image = {
3289
3291
  __typename?: 'Image';
3290
3292
  /** A word or phrase to share the nature or contents of an image. */
3291
3293
  altText?: Maybe<Scalars['String']>;
3292
- /** The original height of the image in pixels. Returns `null` if the image is not hosted by Shopify. */
3294
+ /** The original height of the image in pixels. Returns `null` if the image isn't hosted by Shopify. */
3293
3295
  height?: Maybe<Scalars['Int']>;
3294
- /** A unique identifier for the image. */
3296
+ /** A unique ID for the image. */
3295
3297
  id?: Maybe<Scalars['ID']>;
3296
3298
  /**
3297
3299
  * The location of the original image as a URL.
@@ -3310,7 +3312,7 @@ export declare type Image = {
3310
3312
  * The location of the transformed image as a URL.
3311
3313
  *
3312
3314
  * All transformation arguments are considered "best-effort". If they can be applied to an image, they will be.
3313
- * Otherwise any transformations which an image type does not support will be ignored.
3315
+ * Otherwise any transformations which an image type doesn't support will be ignored.
3314
3316
  *
3315
3317
  * @deprecated Use `url(transform:)` instead
3316
3318
  */
@@ -3326,7 +3328,7 @@ export declare type Image = {
3326
3328
  *
3327
3329
  */
3328
3330
  url: Scalars['URL'];
3329
- /** The original width of the image in pixels. Returns `null` if the image is not hosted by Shopify. */
3331
+ /** The original width of the image in pixels. Returns `null` if the image isn't hosted by Shopify. */
3330
3332
  width?: Maybe<Scalars['Int']>;
3331
3333
  };
3332
3334
  /** Represents an image resource. */
@@ -3716,7 +3718,7 @@ export declare type Location = Node & {
3716
3718
  __typename?: 'Location';
3717
3719
  /** The address of the location. */
3718
3720
  address: LocationAddress;
3719
- /** A globally-unique identifier. */
3721
+ /** A globally-unique ID. */
3720
3722
  id: Scalars['ID'];
3721
3723
  /** The name of the location. */
3722
3724
  name: Scalars['String'];
@@ -3836,7 +3838,7 @@ export declare type MailingAddress = Node & {
3836
3838
  formatted: Array<Scalars['String']>;
3837
3839
  /** A comma-separated list of the values for city, province, and country. */
3838
3840
  formattedArea?: Maybe<Scalars['String']>;
3839
- /** A globally-unique identifier. */
3841
+ /** A globally-unique ID. */
3840
3842
  id: Scalars['ID'];
3841
3843
  /** The last name of the customer. */
3842
3844
  lastName?: Maybe<Scalars['String']>;
@@ -3897,7 +3899,7 @@ export declare type MailingAddressEdge = {
3897
3899
  /** The item at the end of MailingAddressEdge. */
3898
3900
  node: MailingAddress;
3899
3901
  };
3900
- /** Specifies the fields accepted to create or update a mailing address. */
3902
+ /** The input fields to create or update a mailing address. */
3901
3903
  export declare type MailingAddressInput = {
3902
3904
  /**
3903
3905
  * The first line of the address. Typically the street address or PO Box number.
@@ -4012,7 +4014,7 @@ export declare type MediaImage = Media & Node & {
4012
4014
  __typename?: 'MediaImage';
4013
4015
  /** A word or phrase to share the nature or contents of a media. */
4014
4016
  alt?: Maybe<Scalars['String']>;
4015
- /** A globally-unique identifier. */
4017
+ /** A globally-unique ID. */
4016
4018
  id: Scalars['ID'];
4017
4019
  /** The image for the media. */
4018
4020
  image?: Maybe<Image>;
@@ -4022,14 +4024,15 @@ export declare type MediaImage = Media & Node & {
4022
4024
  previewImage?: Maybe<Image>;
4023
4025
  };
4024
4026
  /**
4025
- * A menu used for navigation within a storefront.
4027
+ * A [navigation menu](https://help.shopify.com/manual/online-store/menus-and-links) representing a hierarchy
4028
+ * of hyperlinks (items).
4026
4029
  *
4027
4030
  */
4028
4031
  export declare type Menu = Node & {
4029
4032
  __typename?: 'Menu';
4030
4033
  /** The menu's handle. */
4031
4034
  handle: Scalars['String'];
4032
- /** A globally-unique identifier. */
4035
+ /** A globally-unique ID. */
4033
4036
  id: Scalars['ID'];
4034
4037
  /** The menu's child items. */
4035
4038
  items: Array<MenuItem>;
@@ -4044,7 +4047,7 @@ export declare type Menu = Node & {
4044
4047
  */
4045
4048
  export declare type MenuItem = Node & {
4046
4049
  __typename?: 'MenuItem';
4047
- /** A globally-unique identifier. */
4050
+ /** A globally-unique ID. */
4048
4051
  id: Scalars['ID'];
4049
4052
  /** The menu item's child items. */
4050
4053
  items: Array<MenuItem>;
@@ -4097,27 +4100,27 @@ export declare type Metafield = Node & {
4097
4100
  createdAt: Scalars['DateTime'];
4098
4101
  /** The description of a metafield. */
4099
4102
  description?: Maybe<Scalars['String']>;
4100
- /** A globally-unique identifier. */
4103
+ /** A globally-unique ID. */
4101
4104
  id: Scalars['ID'];
4102
- /** The key name for a metafield. */
4105
+ /** The unique identifier for the metafield within its namespace. */
4103
4106
  key: Scalars['String'];
4104
- /** The namespace for a metafield. */
4107
+ /** The container for a group of metafields that the metafield is associated with. */
4105
4108
  namespace: Scalars['String'];
4106
- /** The parent object that the metafield belongs to. */
4109
+ /** The type of resource that the metafield is attached to. */
4107
4110
  parentResource: MetafieldParentResource;
4108
- /** Returns a reference object if the metafield definition's type is a resource reference. */
4111
+ /** Returns a reference object if the metafield's type is a resource reference. */
4109
4112
  reference?: Maybe<MetafieldReference>;
4110
4113
  /** A list of reference objects if the metafield's type is a resource reference list. */
4111
4114
  references?: Maybe<MetafieldReferenceConnection>;
4112
4115
  /**
4113
4116
  * The type name of the metafield.
4114
- * See the list of [supported types](https://shopify.dev/apps/metafields/definitions/types).
4117
+ * Refer to the list of [supported types](https://shopify.dev/apps/metafields/definitions/types).
4115
4118
  *
4116
4119
  */
4117
4120
  type: Scalars['String'];
4118
- /** The date and time when the storefront metafield was updated. */
4121
+ /** The date and time when the metafield was last updated. */
4119
4122
  updatedAt: Scalars['DateTime'];
4120
- /** The value of a metafield. */
4123
+ /** The data stored in the metafield. Always stored as a string, regardless of the metafield's type. */
4121
4124
  value: Scalars['String'];
4122
4125
  };
4123
4126
  /**
@@ -4185,7 +4188,7 @@ export declare type Model3d = Media & Node & {
4185
4188
  __typename?: 'Model3d';
4186
4189
  /** A word or phrase to share the nature or contents of a media. */
4187
4190
  alt?: Maybe<Scalars['String']>;
4188
- /** A globally-unique identifier. */
4191
+ /** A globally-unique ID. */
4189
4192
  id: Scalars['ID'];
4190
4193
  /** The media content type. */
4191
4194
  mediaContentType: MediaContentType;
@@ -4206,7 +4209,7 @@ export declare type Model3dSource = {
4206
4209
  /** The URL of the 3d model. */
4207
4210
  url: Scalars['String'];
4208
4211
  };
4209
- /** Specifies the fields for a monetary value with currency. */
4212
+ /** The input fields for a monetary value with currency. */
4210
4213
  export declare type MoneyInput = {
4211
4214
  /** Decimal money amount. */
4212
4215
  amount: Scalars['Decimal'];
@@ -4333,12 +4336,9 @@ export declare type Mutation = {
4333
4336
  * customer password.
4334
4337
  *
4335
4338
  * This mutation is throttled by IP. With authenticated access,
4336
- * a value provided to
4337
4339
  * you can provide a [`Shopify-Storefront-Buyer-IP`](https://shopify.dev/api/usage/authentication#optional-ip-header) instead of the request IP.
4338
- * instead of the request IP.
4339
4340
  *
4340
- * Ensure that the value provided to
4341
- * `Shopify-Storefront-Buyer-IP` is trusted. Unthrottled access to this
4341
+ * Make sure that the value provided to `Shopify-Storefront-Buyer-IP` is trusted. Unthrottled access to this
4342
4342
  * mutation presents a security risk.
4343
4343
  *
4344
4344
  */
@@ -4565,7 +4565,7 @@ export declare type MutationCustomerUpdateArgs = {
4565
4565
  *
4566
4566
  */
4567
4567
  export declare type Node = {
4568
- /** A globally-unique identifier. */
4568
+ /** A globally-unique ID. */
4569
4569
  id: Scalars['ID'];
4570
4570
  };
4571
4571
  /** Represents a resource that can be published to the Online Store sales channel. */
@@ -4582,7 +4582,7 @@ export declare type Order = HasMetafields & Node & {
4582
4582
  canceledAt?: Maybe<Scalars['DateTime']>;
4583
4583
  /** The code of the currency used for the payment. */
4584
4584
  currencyCode: CurrencyCode;
4585
- /** The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes are not included unless the order is a taxes-included order. */
4585
+ /** The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes aren't included unless the order is a taxes-included order. */
4586
4586
  currentSubtotalPrice: MoneyV2;
4587
4587
  /** The total cost of duties for the order, including refunds. */
4588
4588
  currentTotalDuties?: Maybe<MoneyV2>;
@@ -4604,7 +4604,7 @@ export declare type Order = HasMetafields & Node & {
4604
4604
  financialStatus?: Maybe<OrderFinancialStatus>;
4605
4605
  /** The fulfillment status for the order. */
4606
4606
  fulfillmentStatus: OrderFulfillmentStatus;
4607
- /** A globally-unique identifier. */
4607
+ /** A globally-unique ID. */
4608
4608
  id: Scalars['ID'];
4609
4609
  /** List of the order’s line items. */
4610
4610
  lineItems: OrderLineItemConnection;
@@ -4800,7 +4800,7 @@ export declare type OrderLineItem = {
4800
4800
  discountAllocations: Array<DiscountAllocation>;
4801
4801
  /** The total price of the line item, including discounts, and displayed in the presentment currency. */
4802
4802
  discountedTotalPrice: MoneyV2;
4803
- /** The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it is displayed in the presentment currency. */
4803
+ /** The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it's displayed in the presentment currency. */
4804
4804
  originalTotalPrice: MoneyV2;
4805
4805
  /** The number of products variants associated to the line item. */
4806
4806
  quantity: Scalars['Int'];
@@ -4859,7 +4859,7 @@ export declare type Page = HasMetafields & Node & OnlineStorePublishable & {
4859
4859
  createdAt: Scalars['DateTime'];
4860
4860
  /** A human-friendly unique string for the page automatically generated from its title. */
4861
4861
  handle: Scalars['String'];
4862
- /** A globally-unique identifier. */
4862
+ /** A globally-unique ID. */
4863
4863
  id: Scalars['ID'];
4864
4864
  /** Returns a metafield found by namespace and key. */
4865
4865
  metafield?: Maybe<Metafield>;
@@ -4913,6 +4913,7 @@ export declare type PageEdge = {
4913
4913
  /**
4914
4914
  * Returns information about pagination in a connection, in accordance with the
4915
4915
  * [Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo).
4916
+ * For more information, please read our [GraphQL Pagination Usage Guide](https://shopify.dev/api/usage/pagination-graphql).
4916
4917
  *
4917
4918
  */
4918
4919
  export declare type PageInfo = {
@@ -4959,7 +4960,7 @@ export declare type Payment = Node & {
4959
4960
  creditCard?: Maybe<CreditCard>;
4960
4961
  /** A message describing a processing error during asynchronous processing. */
4961
4962
  errorMessage?: Maybe<Scalars['String']>;
4962
- /** A globally-unique identifier. */
4963
+ /** A globally-unique ID. */
4963
4964
  id: Scalars['ID'];
4964
4965
  /**
4965
4966
  * A client-side generated token to identify a payment and perform idempotent operations.
@@ -4990,7 +4991,7 @@ export declare type PaymentSettings = {
4990
4991
  currencyCode: CurrencyCode;
4991
4992
  /** A list of enabled currencies (ISO 4217 format) that the shop accepts. Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. */
4992
4993
  enabledPresentmentCurrencies: Array<CurrencyCode>;
4993
- /** The shop’s Shopify Payments account id. */
4994
+ /** The shop’s Shopify Payments account ID. */
4994
4995
  shopifyPaymentsAccountId?: Maybe<Scalars['String']>;
4995
4996
  /** List of the digital wallets which the shop supports. */
4996
4997
  supportedDigitalWallets: Array<DigitalWallet>;
@@ -5008,7 +5009,10 @@ export declare enum PaymentTokenType {
5008
5009
  /** Vault payment token type. */
5009
5010
  Vault = "VAULT"
5010
5011
  }
5011
- /** A filter used to view a subset of products in a collection matching a specific price range. */
5012
+ /**
5013
+ * The input fields for a filter used to view a subset of products in a collection matching a specific price range.
5014
+ *
5015
+ */
5012
5016
  export declare type PriceRangeFilter = {
5013
5017
  /** The maximum price in the range. Empty indicates no max price. */
5014
5018
  max?: InputMaybe<Scalars['Float']>;
@@ -5054,7 +5058,7 @@ export declare type Product = HasMetafields & Node & OnlineStorePublishable & {
5054
5058
  *
5055
5059
  */
5056
5060
  handle: Scalars['String'];
5057
- /** A globally-unique identifier. */
5061
+ /** A globally-unique ID. */
5058
5062
  id: Scalars['ID'];
5059
5063
  /** List of images associated with the product. */
5060
5064
  images: ImageConnection;
@@ -5258,7 +5262,12 @@ export declare type ProductEdge = {
5258
5262
  /** The item at the end of ProductEdge. */
5259
5263
  node: Product;
5260
5264
  };
5261
- /** A filter used to view a subset of products in a collection. */
5265
+ /**
5266
+ * The input fields for a filter used to view a subset of products in a collection.
5267
+ * By default, the `available` and `price` filters are enabled. Filters are customized with the Shopify Search & Discovery app.
5268
+ * Learn more about [customizing storefront filtering](https://help.shopify.com/manual/online-store/themes/customizing-themes/storefront-filters).
5269
+ *
5270
+ */
5262
5271
  export declare type ProductFilter = {
5263
5272
  /** Filter on if the product is available for sale. */
5264
5273
  available?: InputMaybe<Scalars['Boolean']>;
@@ -5311,7 +5320,7 @@ export declare enum ProductMediaSortKeys {
5311
5320
  */
5312
5321
  export declare type ProductOption = Node & {
5313
5322
  __typename?: 'ProductOption';
5314
- /** A globally-unique identifier. */
5323
+ /** A globally-unique ID. */
5315
5324
  id: Scalars['ID'];
5316
5325
  /** The product option’s name. */
5317
5326
  name: Scalars['String'];
@@ -5367,7 +5376,7 @@ export declare type ProductVariant = HasMetafields & Node & {
5367
5376
  compareAtPriceV2?: Maybe<MoneyV2>;
5368
5377
  /** Whether a product is out of stock but still available for purchase (used for backorders). */
5369
5378
  currentlyNotInStock: Scalars['Boolean'];
5370
- /** A globally-unique identifier. */
5379
+ /** A globally-unique ID. */
5371
5380
  id: Scalars['ID'];
5372
5381
  /**
5373
5382
  * Image associated with the product variant. This field falls back to the product image if no image is available.
@@ -5508,7 +5517,11 @@ export declare type QueryRoot = {
5508
5517
  collectionByHandle?: Maybe<Collection>;
5509
5518
  /** List of the shop’s collections. */
5510
5519
  collections: CollectionConnection;
5511
- /** Find a customer by its access token. */
5520
+ /**
5521
+ * The customer associated with the given access token. Tokens are obtained by using the
5522
+ * [`customerAccessTokenCreate` mutation](https://shopify.dev/docs/api/storefront/latest/mutations/customerAccessTokenCreate).
5523
+ *
5524
+ */
5512
5525
  customer?: Maybe<Customer>;
5513
5526
  /** Returns the localized experiences configured for the shop. */
5514
5527
  localization: Localization;
@@ -5519,7 +5532,10 @@ export declare type QueryRoot = {
5519
5532
  *
5520
5533
  */
5521
5534
  locations: LocationConnection;
5522
- /** A storefront menu. */
5535
+ /**
5536
+ * Retrieve a [navigation menu](https://help.shopify.com/manual/online-store/menus-and-links) by its handle.
5537
+ *
5538
+ */
5523
5539
  menu?: Maybe<Menu>;
5524
5540
  /** Returns a specific node by ID. */
5525
5541
  node?: Maybe<AppliedGiftCard | Article | Blog | Cart | CartLine | Checkout | CheckoutLineItem | Collection | Comment | ExternalVideo | GenericFile | Location | MailingAddress | MediaImage | Menu | MenuItem | Metafield | Model3d | Order | Page | Payment | Product | ProductOption | ProductVariant | Shop | ShopPolicy | UrlRedirect | Video>;
@@ -5739,7 +5755,7 @@ export declare type SelectedOption = {
5739
5755
  /** The product option’s value. */
5740
5756
  value: Scalars['String'];
5741
5757
  };
5742
- /** Specifies the input fields required for a selected option. */
5758
+ /** The input fields required for a selected option. */
5743
5759
  export declare type SelectedOptionInput = {
5744
5760
  /** The product option’s name. */
5745
5761
  name: Scalars['String'];
@@ -5753,7 +5769,7 @@ export declare type SellingPlan = {
5753
5769
  checkoutCharge: SellingPlanCheckoutCharge;
5754
5770
  /** The description of the selling plan. */
5755
5771
  description?: Maybe<Scalars['String']>;
5756
- /** A globally-unique identifier. */
5772
+ /** A globally-unique ID. */
5757
5773
  id: Scalars['ID'];
5758
5774
  /** The name of the selling plan. For example, '6 weeks of prepaid granola, delivered weekly'. */
5759
5775
  name: Scalars['String'];
@@ -5973,7 +5989,7 @@ export declare type Shop = HasMetafields & Node & {
5973
5989
  brand?: Maybe<Brand>;
5974
5990
  /** A description of the shop. */
5975
5991
  description?: Maybe<Scalars['String']>;
5976
- /** A globally-unique identifier. */
5992
+ /** A globally-unique ID. */
5977
5993
  id: Scalars['ID'];
5978
5994
  /** Returns a metafield found by namespace and key. */
5979
5995
  metafield?: Maybe<Metafield>;
@@ -6019,7 +6035,7 @@ export declare type ShopPolicy = Node & {
6019
6035
  body: Scalars['String'];
6020
6036
  /** Policy’s handle. */
6021
6037
  handle: Scalars['String'];
6022
- /** A globally-unique identifier. */
6038
+ /** A globally-unique ID. */
6023
6039
  id: Scalars['ID'];
6024
6040
  /** Policy’s title. */
6025
6041
  title: Scalars['String'];
@@ -6038,7 +6054,7 @@ export declare type ShopPolicyWithDefault = {
6038
6054
  body: Scalars['String'];
6039
6055
  /** The handle of the policy. */
6040
6056
  handle: Scalars['String'];
6041
- /** The unique identifier of the policy. A default policy doesn't have an ID. */
6057
+ /** The unique ID of the policy. A default policy doesn't have an ID. */
6042
6058
  id?: Maybe<Scalars['ID']>;
6043
6059
  /** The title of the policy. */
6044
6060
  title: Scalars['String'];
@@ -6121,7 +6137,7 @@ export declare type TokenizedPaymentInputV3 = {
6121
6137
  paymentAmount: MoneyInput;
6122
6138
  /** A simple string or JSON containing the required payment data for the tokenized payment. */
6123
6139
  paymentData: Scalars['String'];
6124
- /** Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. */
6140
+ /** Whether to execute the payment in test mode, if possible. Test mode isn't supported in production stores. Defaults to `false`. */
6125
6141
  test?: InputMaybe<Scalars['Boolean']>;
6126
6142
  /** The type of payment token. */
6127
6143
  type: PaymentTokenType;
@@ -6278,7 +6294,10 @@ export declare type UserError = DisplayableError & {
6278
6294
  /** The error message. */
6279
6295
  message: Scalars['String'];
6280
6296
  };
6281
- /** A filter used to view a subset of products in a collection matching a specific variant option. */
6297
+ /**
6298
+ * The input fields for a filter used to view a subset of products in a collection matching a specific variant option.
6299
+ *
6300
+ */
6282
6301
  export declare type VariantOptionFilter = {
6283
6302
  /** The name of the variant option to filter on. */
6284
6303
  name: Scalars['String'];
@@ -6290,7 +6309,7 @@ export declare type Video = Media & Node & {
6290
6309
  __typename?: 'Video';
6291
6310
  /** A word or phrase to share the nature or contents of a media. */
6292
6311
  alt?: Maybe<Scalars['String']>;
6293
- /** A globally-unique identifier. */
6312
+ /** A globally-unique ID. */
6294
6313
  id: Scalars['ID'];
6295
6314
  /** The media content type. */
6296
6315
  mediaContentType: MediaContentType;
@@ -81,6 +81,8 @@ export var CheckoutErrorCode;
81
81
  CheckoutErrorCode["CustomerAlreadyUsedOncePerCustomerDiscountNotice"] = "CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE";
82
82
  /** Discount already applied. */
83
83
  CheckoutErrorCode["DiscountAlreadyApplied"] = "DISCOUNT_ALREADY_APPLIED";
84
+ /** Discount code isn't working right now. Please contact us for help. */
85
+ CheckoutErrorCode["DiscountCodeApplicationFailed"] = "DISCOUNT_CODE_APPLICATION_FAILED";
84
86
  /** Discount disabled. */
85
87
  CheckoutErrorCode["DiscountDisabled"] = "DISCOUNT_DISABLED";
86
88
  /** Discount expired. */
@@ -14,11 +14,12 @@ const defaultLogger = {
14
14
  },
15
15
  error(context, error, ...extra) {
16
16
  const url = context ? ` ${context.url}` : '';
17
+ const extraMessage = extra.length ? `\n${extra.join('\n')}` : '';
17
18
  if (error instanceof Error) {
18
- console.error(red(`Error processing route:${url}\n${error.stack}`));
19
+ console.error(red(`Error processing route:${url}\n${error.stack}${extraMessage}`));
19
20
  }
20
21
  else {
21
- console.error(red(`Error:${url} ${error}`));
22
+ console.error(red(`Error:${url} ${error}${extraMessage}`));
22
23
  }
23
24
  },
24
25
  fatal(context, ...args) {
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "1.7.0";
1
+ export declare const LIB_VERSION = "1.7.2";
@@ -1 +1 @@
1
- export const LIB_VERSION = '1.7.0';
1
+ export const LIB_VERSION = '1.7.2';
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "engines": {
8
8
  "node": ">=14"
9
9
  },
10
- "version": "1.7.0",
10
+ "version": "1.7.2",
11
11
  "description": "Modern custom Shopify storefronts",
12
12
  "license": "MIT",
13
13
  "main": "dist/esnext/index.js",