@graphcommerce/next-config 9.0.3 → 9.0.4-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,55 +1,54 @@
1
1
  /* eslint-disable */
2
2
  import { z } from 'zod'
3
- export type Maybe<T> = T | null;
4
- export type InputMaybe<T> = Maybe<T>;
5
- export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
6
- export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
7
- export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
8
- export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
9
- export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
3
+
4
+ export type Maybe<T> = T | null
5
+ export type InputMaybe<T> = Maybe<T>
6
+ export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }
7
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }
8
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }
9
+ export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = {
10
+ [_ in K]?: never
11
+ }
12
+ export type Incremental<T> =
13
+ | T
14
+ | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }
10
15
  /** All built-in and custom scalars, mapped to their actual values */
11
16
  export type Scalars = {
12
- ID: { input: string; output: string; }
13
- String: { input: string; output: string; }
14
- Boolean: { input: boolean; output: boolean; }
15
- Int: { input: number; output: number; }
16
- Float: { input: number; output: number; }
17
- };
18
-
19
- export type CartPermissions =
20
- | 'CUSTOMER_ONLY'
21
- | 'DISABLED'
22
- | 'ENABLED';
23
-
24
- export type CompareVariant =
25
- | 'CHECKBOX'
26
- | 'ICON';
27
-
28
- /** Configure whether the layout should be full width or should be constrained by a max breakpoint. Configurable in theme.ts */
29
- export type ContainerSizing =
30
- | 'BREAKPOINT'
31
- | 'FULL_WIDTH';
32
-
33
- export type CustomerAccountPermissions =
34
- | 'DISABLED'
35
- | 'DISABLE_REGISTRATION'
36
- | 'ENABLED';
17
+ ID: { input: string; output: string }
18
+ String: { input: string; output: string }
19
+ Boolean: { input: boolean; output: boolean }
20
+ Int: { input: number; output: number }
21
+ Float: { input: number; output: number }
22
+ }
23
+
24
+ export type CartPermissions = 'CUSTOMER_ONLY' | 'DISABLED' | 'ENABLED'
25
+
26
+ export type CompareVariant = 'CHECKBOX' | 'ICON'
27
+
28
+ /**
29
+ * Configure whether the layout should be full width or should be constrained by a max breakpoint.
30
+ * Configurable in theme.ts
31
+ */
32
+ export type ContainerSizing = 'BREAKPOINT' | 'FULL_WIDTH'
33
+
34
+ export type CustomerAccountPermissions = 'DISABLED' | 'DISABLE_REGISTRATION' | 'ENABLED'
37
35
 
38
36
  /** GoogleDatalayerConfig to allow enabling certain aspects of the datalayer */
39
37
  export type DatalayerConfig = {
40
38
  /** Enable core web vitals tracking for GraphCommerce */
41
- coreWebVitals?: InputMaybe<Scalars['Boolean']['input']>;
42
- };
39
+ coreWebVitals?: InputMaybe<Scalars['Boolean']['input']>
40
+ }
43
41
 
44
42
  /**
45
43
  * # GraphCommerce configuration system
46
44
  *
47
- * Global GraphCommerce configuration can be configured in your `graphcommerce.config.js` file
48
- * in the root of your project and are automatically validated on startup.
45
+ * Global GraphCommerce configuration can be configured in your `graphcommerce.config.js` file in
46
+ * the root of your project and are automatically validated on startup.
49
47
  *
50
48
  * ## Configuring with the configuration file.
51
49
  *
52
- * The configuration file is a javascript file that exports a `GraphCommerceConfig` object. See graphcommerce.config.js.example for an example.
50
+ * The configuration file is a javascript file that exports a `GraphCommerceConfig` object. See
51
+ * graphcommerce.config.js.example for an example.
53
52
  *
54
53
  * ## Using configuration
55
54
  *
@@ -76,8 +75,7 @@ export type DatalayerConfig = {
76
75
  * }
77
76
  * ```
78
77
  *
79
- * You can also use the configuration in your `.meshrc.yml` by accessing
80
- * `{graphCommerce.myField}`
78
+ * You can also use the configuration in your `.meshrc.yml` by accessing `{graphCommerce.myField}`
81
79
  *
82
80
  * ```yml
83
81
  * endpoint: '{graphCommerce.magentoEndpoint}'
@@ -86,24 +84,26 @@ export type DatalayerConfig = {
86
84
  * ## Environment variables to override configuration
87
85
  *
88
86
  * Configuration values can be overwriten by environment variables, with the following rules:
87
+ *
89
88
  * - Convert from camelCase to `SCREAMING_SNAKE_CASE`
90
89
  * - Prefix with `GC_`
91
90
  * - Arrays can be indexed with `_0`, `_1`, `_2`, etc.
92
91
  * - Objects can be accessed with `_<key>`.
93
92
  *
94
93
  * Examples:
94
+ *
95
95
  * - `limitSsg` -> `GC_LIMIT_SSG="1"`
96
96
  * - `storefront[0].locale` -> `GC_STOREFRONT_0_LOCALE="en"`
97
97
  * - `debug.pluginStatus` -> `GC_DEBUG_PLUGIN_STATUS="1"`
98
98
  *
99
- *
100
99
  * ## Exporting current configuration to environment variables
101
100
  *
102
101
  * You can export configuration by running `yarn graphcommerce export-config`
103
102
  *
104
103
  * ## Extending the configuration in your project
105
104
  *
106
- * Create a graphql/Config.graphqls file in your project and extend the GraphCommerceConfig, GraphCommerceStorefrontConfig inputs to add configuration.
105
+ * Create a graphql/Config.graphqls file in your project and extend the GraphCommerceConfig,
106
+ * GraphCommerceStorefrontConfig inputs to add configuration.
107
107
  *
108
108
  * ```graphql
109
109
  * extend input GraphCommerceConfig {
@@ -120,29 +120,32 @@ export type DatalayerConfig = {
120
120
  */
121
121
  export type GraphCommerceConfig = {
122
122
  /** Configuration for the SidebarGallery component */
123
- breadcrumbs?: InputMaybe<Scalars['Boolean']['input']>;
123
+ breadcrumbs?: InputMaybe<Scalars['Boolean']['input']>
124
124
  /**
125
125
  * The canonical base URL is used for SEO purposes.
126
126
  *
127
127
  * Examples:
128
+ *
128
129
  * - https://example.com
129
130
  * - https://example.com/en
130
131
  * - https://example.com/en-US
131
132
  */
132
- canonicalBaseUrl: Scalars['String']['input'];
133
+ canonicalBaseUrl: Scalars['String']['input']
133
134
  /**
134
- * Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax.
135
+ * Due to a limitation of the GraphQL API it is not possible to determine if a cart should be
136
+ * displayed including or excluding tax.
135
137
  *
136
138
  * When Magento's StoreConfig adds this value, this can be replaced.
137
139
  */
138
- cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']['input']>;
140
+ cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']['input']>
139
141
  /** Use compare functionality */
140
- compare?: InputMaybe<Scalars['Boolean']['input']>;
142
+ compare?: InputMaybe<Scalars['Boolean']['input']>
141
143
  /**
142
144
  * By default the compare feature is denoted with a 'compare ICON' (2 arrows facing one another).
143
- * This may be fine for experienced users, but for more clarity it's also possible to present the compare feature as a CHECKBOX accompanied by the 'Compare' label
145
+ * This may be fine for experienced users, but for more clarity it's also possible to present the
146
+ * compare feature as a CHECKBOX accompanied by the 'Compare' label
144
147
  */
145
- compareVariant?: InputMaybe<CompareVariant>;
148
+ compareVariant?: InputMaybe<CompareVariant>
146
149
  /**
147
150
  * If a simple product is part of a Configurable product page, should the simple product be
148
151
  * rendered as a configured option of the configurable product page?
@@ -152,52 +155,57 @@ export type GraphCommerceConfig = {
152
155
  * When the `products(filters: { url_key: { eq: 'simple-product' } }) { ... }` query is ran,
153
156
  * Magento also returns the Simple product and the Configurable product the simple belongs to.
154
157
  *
155
- * If that is the case we render the configurable product page instead of the simple product page but
156
- * the options to select the simple product are pre-selected.
158
+ * If that is the case we render the configurable product page instead of the simple product page
159
+ * but the options to select the simple product are pre-selected.
157
160
  */
158
- configurableVariantForSimple?: InputMaybe<Scalars['Boolean']['input']>;
161
+ configurableVariantForSimple?: InputMaybe<Scalars['Boolean']['input']>
159
162
  /**
160
- * When a user selects a variant, it will switch the values on the configurable page with the values of the configured variant.
163
+ * When a user selects a variant, it will switch the values on the configurable page with the
164
+ * values of the configured variant.
161
165
  *
162
166
  * Enabling options here will allow switching of those variants.
163
167
  */
164
- configurableVariantValues?: InputMaybe<MagentoConfigurableVariantValues>;
168
+ configurableVariantValues?: InputMaybe<MagentoConfigurableVariantValues>
165
169
  /** Configures the max width of the content (main content area) */
166
- containerSizingContent?: InputMaybe<ContainerSizing>;
170
+ containerSizingContent?: InputMaybe<ContainerSizing>
167
171
  /** Configures the max width of the shell (header, footer, overlays, etc.) */
168
- containerSizingShell?: InputMaybe<ContainerSizing>;
172
+ containerSizingShell?: InputMaybe<ContainerSizing>
169
173
  /**
170
- * Determines if cross sell items should be shown when the user already has the product in their cart. This will result in a product will popping off the screen when you add it to the cart.
174
+ * Determines if cross sell items should be shown when the user already has the product in their
175
+ * cart. This will result in a product will popping off the screen when you add it to the cart.
171
176
  *
172
177
  * Default: 'false'
173
178
  */
174
- crossSellsHideCartItems?: InputMaybe<Scalars['Boolean']['input']>;
179
+ crossSellsHideCartItems?: InputMaybe<Scalars['Boolean']['input']>
175
180
  /**
176
- * Determines if, after adding a cross-sell item to the cart, the user should be redirected to the cross-sell items of the product they just added.
181
+ * Determines if, after adding a cross-sell item to the cart, the user should be redirected to the
182
+ * cross-sell items of the product they just added.
177
183
  *
178
184
  * Default: 'false'
179
185
  */
180
- crossSellsRedirectItems?: InputMaybe<Scalars['Boolean']['input']>;
186
+ crossSellsRedirectItems?: InputMaybe<Scalars['Boolean']['input']>
181
187
  /** Enables the shipping notes field in the checkout */
182
- customerAddressNoteEnable?: InputMaybe<Scalars['Boolean']['input']>;
188
+ customerAddressNoteEnable?: InputMaybe<Scalars['Boolean']['input']>
183
189
  /**
184
190
  * Enables company fields inside the checkout:
191
+ *
185
192
  * - Company name
186
193
  * - VAT ID
187
194
  */
188
- customerCompanyFieldsEnable?: InputMaybe<Scalars['Boolean']['input']>;
195
+ customerCompanyFieldsEnable?: InputMaybe<Scalars['Boolean']['input']>
189
196
  /** Enable customer account deletion through the account section */
190
- customerDeleteEnabled?: InputMaybe<Scalars['Boolean']['input']>;
197
+ customerDeleteEnabled?: InputMaybe<Scalars['Boolean']['input']>
191
198
  /**
192
- * X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser while users are logged in. For example the products query can now be cached for logged in users.
199
+ * X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser while users
200
+ * are logged in. For example the products query can now be cached for logged in users.
193
201
  *
194
202
  * This can be disabled when Varnish is running out of available memory.
195
203
  */
196
- customerXMagentoCacheIdDisable?: InputMaybe<Scalars['Boolean']['input']>;
204
+ customerXMagentoCacheIdDisable?: InputMaybe<Scalars['Boolean']['input']>
197
205
  /** Datalayer config */
198
- dataLayer?: InputMaybe<DatalayerConfig>;
206
+ dataLayer?: InputMaybe<DatalayerConfig>
199
207
  /** Debug configuration for GraphCommerce */
200
- debug?: InputMaybe<GraphCommerceDebugConfig>;
208
+ debug?: InputMaybe<GraphCommerceDebugConfig>
201
209
  /**
202
210
  * Enables some demo specific code that is probably not useful for a project:
203
211
  *
@@ -205,17 +213,18 @@ export type GraphCommerceConfig = {
205
213
  * - Adds "dominant_color" attribute swatches to the product list items.
206
214
  * - Creates a big list items in the product list.
207
215
  */
208
- demoMode?: InputMaybe<Scalars['Boolean']['input']>;
216
+ demoMode?: InputMaybe<Scalars['Boolean']['input']>
209
217
  /**
210
- * Enable Guest Checkout Login:
211
- * During customer login, GraphCommerce queries Magento to determine whether
212
- * the customer account already exists or not. If not, the sign-up form is shown instead.
218
+ * Enable Guest Checkout Login: During customer login, GraphCommerce queries Magento to determine
219
+ * whether the customer account already exists or not. If not, the sign-up form is shown instead.
213
220
  *
214
- * For Magento versions, 2.4.7, 2.4.6-p1 and up, 2.4.5-p3 and up, 2.4.4-p4 and up, the following setting must be set to Yes
221
+ * For Magento versions, 2.4.7, 2.4.6-p1 and up, 2.4.5-p3 and up, 2.4.4-p4 and up, the following
222
+ * setting must be set to Yes
215
223
  *
216
- * `Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout Login`
224
+ * `Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout
225
+ * Login`
217
226
  */
218
- enableGuestCheckoutLogin?: InputMaybe<Scalars['Boolean']['input']>;
227
+ enableGuestCheckoutLogin?: InputMaybe<Scalars['Boolean']['input']>
219
228
  /**
220
229
  * See https://support.google.com/analytics/answer/9539598?hl=en
221
230
  *
@@ -223,184 +232,196 @@ export type GraphCommerceConfig = {
223
232
  *
224
233
  * To override the value for a specific locale, configure in i18n config.
225
234
  */
226
- googleAnalyticsId?: InputMaybe<Scalars['String']['input']>;
235
+ googleAnalyticsId?: InputMaybe<Scalars['String']['input']>
227
236
  /** To create an assetlinks.json file for the Android app. */
228
- googlePlaystore?: InputMaybe<GraphCommerceGooglePlaystoreConfig>;
237
+ googlePlaystore?: InputMaybe<GraphCommerceGooglePlaystoreConfig>
229
238
  /**
230
- * Google reCAPTCHA site key.
231
- * When using reCAPTCHA, this value is required, even if you are configuring different values for each locale.
239
+ * Google reCAPTCHA site key. When using reCAPTCHA, this value is required, even if you are
240
+ * configuring different values for each locale.
232
241
  *
233
242
  * Get a site key and a secret key from https://developers.google.com/recaptcha/docs/v3
234
243
  *
235
- * The secret key should be added in the Magento admin panel (Stores > Configuration > Security > Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible)
236
- * ReCAPTCHA can then be enabled/disabled for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA Storefront > Storefront)
244
+ * The secret key should be added in the Magento admin panel (Stores > Configuration > Security >
245
+ * Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible) ReCAPTCHA can then be enabled/disabled
246
+ * for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA
247
+ * Storefront > Storefront)
237
248
  */
238
- googleRecaptchaKey?: InputMaybe<Scalars['String']['input']>;
249
+ googleRecaptchaKey?: InputMaybe<Scalars['String']['input']>
239
250
  /**
240
251
  * The Google Tagmanager ID to be used on the site.
241
252
  *
242
253
  * This value is required even if you are configuring different values for each locale.
243
254
  */
244
- googleTagmanagerId?: InputMaybe<Scalars['String']['input']>;
255
+ googleTagmanagerId?: InputMaybe<Scalars['String']['input']>
245
256
  /**
246
- * The HyGraph endpoint.
247
- *
248
- * > Read-only endpoint that allows low latency and high read-throughput content delivery.
257
+ * The HyGraph endpoint.> Read-only endpoint that allows low latency and high read-throughput content delivery.
249
258
  *
250
259
  * Project settings -> API Access -> High Performance Read-only Content API
251
260
  */
252
- hygraphEndpoint: Scalars['String']['input'];
261
+ hygraphEndpoint: Scalars['String']['input']
253
262
  /**
254
263
  * Hygraph Management API. **Only used for migrations.**
255
264
  *
256
- * Optional: If the hygraphEndpoint is configured with the 'High Performance Content
257
- * API', this field is not required.
265
+ * Optional: If the hygraphEndpoint is configured with the 'High Performance Content API', this
266
+ * field is not required.
258
267
  */
259
- hygraphManagementApi?: InputMaybe<Scalars['String']['input']>;
268
+ hygraphManagementApi?: InputMaybe<Scalars['String']['input']>
260
269
  /**
261
270
  * Hygraph Project ID. **Only used for migrations.**
262
271
  *
263
- * Optional: If the hygraphEndpoint is configured with the 'High Performance Content
264
- * API', this field is not required.
272
+ * Optional: If the hygraphEndpoint is configured with the 'High Performance Content API', this
273
+ * field is not required.
265
274
  */
266
- hygraphProjectId?: InputMaybe<Scalars['String']['input']>;
275
+ hygraphProjectId?: InputMaybe<Scalars['String']['input']>
267
276
  /**
268
277
  * Hygraph Management SDK Authorization Token. **Only used for migrations.**
269
278
  *
270
279
  * Project settings -> API Access -> Permanent Auth Tokens
271
280
  *
272
- * 1. Click 'Add token' and give it a name, something like 'GraphCommerce Write Access Token' and keep stage on 'Published'.
281
+ * 1. Click 'Add token' and give it a name, something like 'GraphCommerce Write Access Token' and
282
+ * keep stage on 'Published'.
273
283
  * 2. Under 'Management API', click 'Yes, Initialize defaults'
274
- * 3. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for 'models', 'enumerations', 'fields', 'components' and 'sources'
275
- * - Update existing models
276
- * - Delete existing models
277
- * - Update existing fields
278
- * - Delete existing fields
279
- * - Update existing enumerations
280
- * - Delete existing enumerations
281
- * - Update existing components
282
- * - Delete existing components
283
- * - Update remote sources
284
- * - Delete remote sources
285
- * - Read existing environments
286
- * - Read public content views
287
- * - Create public content views
288
- * - Update public content views
289
- * - Delete public content views
290
- * - Can see schema view
291
- *
292
- * ```
293
- * GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph"
294
- * yarn graphcommerce hygraph-migrate
295
- * ```
296
- */
297
- hygraphWriteAccessToken?: InputMaybe<Scalars['String']['input']>;
284
+ * 3. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for 'models',
285
+ * 'enumerations', 'fields', 'components' and 'sources'
286
+ *
287
+ * - Update existing models
288
+ * - Delete existing models
289
+ * - Update existing fields
290
+ * - Delete existing fields
291
+ * - Update existing enumerations
292
+ * - Delete existing enumerations
293
+ * - Update existing components
294
+ * - Delete existing components
295
+ * - Update remote sources
296
+ * - Delete remote sources
297
+ * - Read existing environments
298
+ * - Read public content views
299
+ * - Create public content views
300
+ * - Update public content views
301
+ * - Delete public content views
302
+ * - Can see schema view
303
+ *
304
+ * GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph"
305
+ * yarn graphcommerce hygraph-migrate
306
+ */
307
+ hygraphWriteAccessToken?: InputMaybe<Scalars['String']['input']>
298
308
  /**
299
309
  * Limit the static generation of SSG when building.
300
310
  *
301
- * By default GraphCommerce will statically generate all product and category pages during build. This can take quite a long time, to skip this step set this value to true.
311
+ * By default GraphCommerce will statically generate all product and category pages during build.
312
+ * This can take quite a long time, to skip this step set this value to true.
302
313
  */
303
- limitSsg?: InputMaybe<Scalars['Boolean']['input']>;
314
+ limitSsg?: InputMaybe<Scalars['Boolean']['input']>
304
315
  /**
305
316
  * GraphQL Magento endpoint.
306
317
  *
307
318
  * Examples:
319
+ *
308
320
  * - https://magento2.test/graphql
309
321
  */
310
- magentoEndpoint: Scalars['String']['input'];
322
+ magentoEndpoint: Scalars['String']['input']
311
323
  /**
312
324
  * Version of the Magento backend.
313
325
  *
314
326
  * Values: 245, 246, 247 for Magento 2.4.5, 2.4.6, 2.4.7 respectively.
315
327
  */
316
- magentoVersion: Scalars['Int']['input'];
317
- /** Allows the option to require login or completely disable certain sections of the site, can be overriden per storeview with the storefrontConfig */
318
- permissions?: InputMaybe<GraphCommercePermissions>;
328
+ magentoVersion: Scalars['Int']['input']
329
+ /**
330
+ * Allows the option to require login or completely disable certain sections of the site, can be
331
+ * overriden per storeview with the storefrontConfig
332
+ */
333
+ permissions?: InputMaybe<GraphCommercePermissions>
319
334
  /** To enable next.js' preview mode, configure the secret you'd like to use. */
320
- previewSecret?: InputMaybe<Scalars['String']['input']>;
335
+ previewSecret?: InputMaybe<Scalars['String']['input']>
321
336
  /**
322
- * Layout how the filters are rendered.
323
- * DEFAULT: Will be rendered as horzontal chips on desktop and mobile
324
- * SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
337
+ * Layout how the filters are rendered. DEFAULT: Will be rendered as horzontal chips on desktop
338
+ * and mobile SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
325
339
  */
326
- productFiltersLayout?: InputMaybe<ProductFiltersLayout>;
340
+ productFiltersLayout?: InputMaybe<ProductFiltersLayout>
327
341
  /** Product filters with better UI for mobile and desktop. */
328
- productFiltersPro?: InputMaybe<Scalars['Boolean']['input']>;
342
+ productFiltersPro?: InputMaybe<Scalars['Boolean']['input']>
329
343
  /**
330
344
  * Pagination variant for the product listings.
331
345
  *
332
- * COMPACT means: "< Page X of Y >"
333
- * EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >"
346
+ * COMPACT means: "< Page X of Y >" EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >"
334
347
  */
335
- productListPaginationVariant?: InputMaybe<PaginationVariant>;
348
+ productListPaginationVariant?: InputMaybe<PaginationVariant>
336
349
  /**
337
350
  * By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
338
351
  *
339
- * Default: '/p/'
340
- * Example: '/product/'
352
+ * Default: '/p/' Example: '/product/'
341
353
  */
342
- productRoute?: InputMaybe<Scalars['String']['input']>;
354
+ productRoute?: InputMaybe<Scalars['String']['input']>
343
355
  /** Settings for recently viewed products */
344
- recentlyViewedProducts?: InputMaybe<RecentlyViewedProductsConfig>;
356
+ recentlyViewedProducts?: InputMaybe<RecentlyViewedProductsConfig>
345
357
  /**
346
- * Allow the site to be indexed by search engines.
347
- * If false, the robots.txt file will be set to disallow all.
358
+ * Allow the site to be indexed by search engines. If false, the robots.txt file will be set to
359
+ * disallow all.
348
360
  */
349
- robotsAllow?: InputMaybe<Scalars['Boolean']['input']>;
361
+ robotsAllow?: InputMaybe<Scalars['Boolean']['input']>
350
362
  /** Configuration for the SidebarGallery component */
351
- sidebarGallery?: InputMaybe<SidebarGalleryConfig>;
363
+ sidebarGallery?: InputMaybe<SidebarGalleryConfig>
352
364
  /** All storefront configuration for the project */
353
- storefront: Array<GraphCommerceStorefrontConfig>;
365
+ storefront: Array<GraphCommerceStorefrontConfig>
354
366
  /** Hide the wishlist functionality for guests. */
355
- wishlistHideForGuests?: InputMaybe<Scalars['Boolean']['input']>;
367
+ wishlistHideForGuests?: InputMaybe<Scalars['Boolean']['input']>
356
368
  /** Show a message when the product is added to the wishlist. */
357
- wishlistShowFeedbackMessage?: InputMaybe<Scalars['Boolean']['input']>;
358
- };
369
+ wishlistShowFeedbackMessage?: InputMaybe<Scalars['Boolean']['input']>
370
+ }
359
371
 
360
372
  /** Debug configuration for GraphCommerce */
361
373
  export type GraphCommerceDebugConfig = {
362
374
  /** Enable debugging interface to debug sessions */
363
- cart?: InputMaybe<Scalars['Boolean']['input']>;
375
+ cart?: InputMaybe<Scalars['Boolean']['input']>
364
376
  /** Reports which plugins are enabled or disabled. */
365
- pluginStatus?: InputMaybe<Scalars['Boolean']['input']>;
377
+ pluginStatus?: InputMaybe<Scalars['Boolean']['input']>
366
378
  /** Enable debugging interface to debug sessions */
367
- sessions?: InputMaybe<Scalars['Boolean']['input']>;
379
+ sessions?: InputMaybe<Scalars['Boolean']['input']>
368
380
  /**
369
- * Cyclic dependencies can cause memory issues and other strange bugs.
370
- * This plugin will warn you when it detects a cyclic dependency.
381
+ * Cyclic dependencies can cause memory issues and other strange bugs. This plugin will warn you
382
+ * when it detects a cyclic dependency.
371
383
  *
372
384
  * When running into memory issues, it can be useful to enable this plugin.
373
385
  */
374
- webpackCircularDependencyPlugin?: InputMaybe<Scalars['Boolean']['input']>;
386
+ webpackCircularDependencyPlugin?: InputMaybe<Scalars['Boolean']['input']>
375
387
  /**
376
- * When updating packages it can happen that the same package is included with different versions in the same project.
388
+ * When updating packages it can happen that the same package is included with different versions
389
+ * in the same project.
377
390
  *
378
391
  * Issues that this can cause are:
392
+ *
379
393
  * - The same package is included multiple times in the bundle, increasing the bundle size.
380
- * - The Typescript types of the package are not compatible with each other, causing Typescript errors.
394
+ * - The Typescript types of the package are not compatible with each other, causing Typescript
395
+ * errors.
381
396
  */
382
- webpackDuplicatesPlugin?: InputMaybe<Scalars['Boolean']['input']>;
383
- };
397
+ webpackDuplicatesPlugin?: InputMaybe<Scalars['Boolean']['input']>
398
+ }
384
399
 
385
400
  /** See https://developer.android.com/training/app-links/verify-android-applinks#web-assoc */
386
401
  export type GraphCommerceGooglePlaystoreConfig = {
387
402
  /** The package name of the Android app. */
388
- packageName: Scalars['String']['input'];
403
+ packageName: Scalars['String']['input']
389
404
  /** The sha256 certificate fingerprint of the Android app. */
390
- sha256CertificateFingerprint: Scalars['String']['input'];
391
- };
405
+ sha256CertificateFingerprint: Scalars['String']['input']
406
+ }
392
407
 
393
408
  /** Permissions input */
394
409
  export type GraphCommercePermissions = {
395
- /** Changes the availability of the add to cart buttons and the cart page to either customer only or completely disables it. */
396
- cart?: InputMaybe<CartPermissions>;
410
+ /**
411
+ * Changes the availability of the add to cart buttons and the cart page to either customer only
412
+ * or completely disables it.
413
+ */
414
+ cart?: InputMaybe<CartPermissions>
397
415
  /** Changes the availability of the checkout to either customer only or completely disables it. */
398
- checkout?: InputMaybe<CartPermissions>;
399
- /** Enables / disabled the account section of the website. DISABLE_REGISTRATION will only disable the registration page. */
400
- customerAccount?: InputMaybe<CustomerAccountPermissions>;
416
+ checkout?: InputMaybe<CartPermissions>
417
+ /**
418
+ * Enables / disabled the account section of the website. DISABLE_REGISTRATION will only disable
419
+ * the registration page.
420
+ */
421
+ customerAccount?: InputMaybe<CustomerAccountPermissions>
401
422
  /** Allows the option to require login or completely disable the site. */
402
- website?: InputMaybe<WebsitePermissions>;
403
- };
423
+ website?: InputMaybe<WebsitePermissions>
424
+ }
404
425
 
405
426
  /** All storefront configuration for the project */
406
427
  export type GraphCommerceStorefrontConfig = {
@@ -408,144 +429,159 @@ export type GraphCommerceStorefrontConfig = {
408
429
  * The canonical base URL is used for SEO purposes.
409
430
  *
410
431
  * Examples:
432
+ *
411
433
  * - https://example.com
412
434
  * - https://example.com/en
413
435
  * - https://example.com/en-US
414
436
  */
415
- canonicalBaseUrl?: InputMaybe<Scalars['String']['input']>;
416
- /** Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax. */
417
- cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']['input']>;
437
+ canonicalBaseUrl?: InputMaybe<Scalars['String']['input']>
438
+ /**
439
+ * Due to a limitation of the GraphQL API it is not possible to determine if a cart should be
440
+ * displayed including or excluding tax.
441
+ */
442
+ cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']['input']>
418
443
  /**
419
444
  * Enables company fields inside the checkout:
445
+ *
420
446
  * - Company name
421
447
  * - VAT ID
422
448
  */
423
- customerCompanyFieldsEnable?: InputMaybe<Scalars['Boolean']['input']>;
449
+ customerCompanyFieldsEnable?: InputMaybe<Scalars['Boolean']['input']>
424
450
  /**
425
451
  * There can only be one entry with defaultLocale set to true.
452
+ *
426
453
  * - If there are more, the first one is used.
427
454
  * - If there is none, the first entry is used.
428
455
  */
429
- defaultLocale?: InputMaybe<Scalars['Boolean']['input']>;
456
+ defaultLocale?: InputMaybe<Scalars['Boolean']['input']>
430
457
  /** Domain configuration, must be a domain https://tools.ietf.org/html/rfc3986 */
431
- domain?: InputMaybe<Scalars['String']['input']>;
458
+ domain?: InputMaybe<Scalars['String']['input']>
432
459
  /**
433
460
  * Configure different Google Analytics IDs for different locales.
434
461
  *
435
462
  * To disable for a specific locale, set the value to null.
436
463
  */
437
- googleAnalyticsId?: InputMaybe<Scalars['String']['input']>;
464
+ googleAnalyticsId?: InputMaybe<Scalars['String']['input']>
438
465
  /** Locale specific google reCAPTCHA key. */
439
- googleRecaptchaKey?: InputMaybe<Scalars['String']['input']>;
466
+ googleRecaptchaKey?: InputMaybe<Scalars['String']['input']>
440
467
  /** The Google Tagmanager ID to be used per locale. */
441
- googleTagmanagerId?: InputMaybe<Scalars['String']['input']>;
442
- /** Add a gcms-locales header to make sure queries return in a certain language, can be an array to define fallbacks. */
443
- hygraphLocales?: InputMaybe<Array<Scalars['String']['input']>>;
468
+ googleTagmanagerId?: InputMaybe<Scalars['String']['input']>
469
+ /**
470
+ * Add a gcms-locales header to make sure queries return in a certain language, can be an array to
471
+ * define fallbacks.
472
+ */
473
+ hygraphLocales?: InputMaybe<Array<Scalars['String']['input']>>
444
474
  /** Custom locale used to load the .po files. Must be a valid locale, also used for Intl functions. */
445
- linguiLocale?: InputMaybe<Scalars['String']['input']>;
475
+ linguiLocale?: InputMaybe<Scalars['String']['input']>
446
476
  /**
447
- * Must be a [locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers) for automatic redirects to work.
477
+ * Must be a [locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers)
478
+ * for automatic redirects to work.
448
479
  *
449
- * This value can be used as a sub-path identifier only, make sure linguiLocale is configured for each URL.
480
+ * This value can be used as a sub-path identifier only, make sure linguiLocale is configured for
481
+ * each URL.
450
482
  */
451
- locale: Scalars['String']['input'];
483
+ locale: Scalars['String']['input']
452
484
  /**
453
485
  * Magento store code.
454
486
  *
455
487
  * Stores => All Stores => [Store View] => Store View Code
456
488
  *
457
489
  * Examples:
458
- * - default
459
- * - en-us
460
- * - b2b-us
490
+ *
491
+ * - Default
492
+ * - En-us
493
+ * - B2b-us
494
+ */
495
+ magentoStoreCode: Scalars['String']['input']
496
+ /**
497
+ * Allows the option to require login or completely disable certain sections of the site on a per
498
+ * store basis
461
499
  */
462
- magentoStoreCode: Scalars['String']['input'];
463
- /** Allows the option to require login or completely disable certain sections of the site on a per store basis */
464
- permissions?: InputMaybe<GraphCommercePermissions>;
500
+ permissions?: InputMaybe<GraphCommercePermissions>
465
501
  /**
466
- * Allow the site to be indexed by search engines.
467
- * If false, the robots.txt file will be set to disallow all.
502
+ * Allow the site to be indexed by search engines. If false, the robots.txt file will be set to
503
+ * disallow all.
468
504
  */
469
- robotsAllow?: InputMaybe<Scalars['Boolean']['input']>;
470
- };
505
+ robotsAllow?: InputMaybe<Scalars['Boolean']['input']>
506
+ }
471
507
 
472
- /** Options to configure which values will be replaced when a variant is selected on the product page. */
508
+ /**
509
+ * Options to configure which values will be replaced when a variant is selected on the product
510
+ * page.
511
+ */
473
512
  export type MagentoConfigurableVariantValues = {
474
513
  /** Use the name, description, short description and meta data from the configured variant */
475
- content?: InputMaybe<Scalars['Boolean']['input']>;
514
+ content?: InputMaybe<Scalars['Boolean']['input']>
476
515
  /**
477
- * This option enables the automatic update of product gallery images on the product page when a variant is selected,
478
- * provided that the gallery images for the selected variant differ from the currently displayed images.
516
+ * This option enables the automatic update of product gallery images on the product page when a
517
+ * variant is selected, provided that the gallery images for the selected variant differ from the
518
+ * currently displayed images.
479
519
  */
480
- gallery?: InputMaybe<Scalars['Boolean']['input']>;
520
+ gallery?: InputMaybe<Scalars['Boolean']['input']>
481
521
  /**
482
522
  * When a variant is selected the URL of the product will be changed in the address bar.
483
523
  *
484
524
  * This only happens when the actual variant is can be accessed by the URL.
485
525
  */
486
- url?: InputMaybe<Scalars['Boolean']['input']>;
487
- };
526
+ url?: InputMaybe<Scalars['Boolean']['input']>
527
+ }
488
528
 
489
- export type PaginationVariant =
490
- | 'COMPACT'
491
- | 'EXTENDED';
529
+ export type PaginationVariant = 'COMPACT' | 'EXTENDED'
492
530
 
493
- export type ProductFiltersLayout =
494
- | 'DEFAULT'
495
- | 'SIDEBAR';
531
+ export type ProductFiltersLayout = 'DEFAULT' | 'SIDEBAR'
496
532
 
497
533
  /** Settings for recently viewed products */
498
534
  export type RecentlyViewedProductsConfig = {
499
535
  /** Enable/disable recently viewed products */
500
- enabled?: InputMaybe<Scalars['Boolean']['input']>;
536
+ enabled?: InputMaybe<Scalars['Boolean']['input']>
501
537
  /** Number of recently viewed products to be stored in localStorage */
502
- maxCount?: InputMaybe<Scalars['Int']['input']>;
503
- };
538
+ maxCount?: InputMaybe<Scalars['Int']['input']>
539
+ }
504
540
 
505
541
  /** SidebarGalleryConfig will contain all configuration values for the Sidebar Gallery component. */
506
542
  export type SidebarGalleryConfig = {
507
543
  /** Variant used for the pagination */
508
- paginationVariant?: InputMaybe<SidebarGalleryPaginationVariant>;
509
- };
544
+ paginationVariant?: InputMaybe<SidebarGalleryPaginationVariant>
545
+ }
510
546
 
511
547
  /** Enumeration of all possible positions for the sidebar gallery thumbnails. */
512
- export type SidebarGalleryPaginationVariant =
513
- | 'DOTS'
514
- | 'THUMBNAILS_BOTTOM';
515
-
516
- export type WebsitePermissions =
517
- | 'ENABLED';
548
+ export type SidebarGalleryPaginationVariant = 'DOTS' | 'THUMBNAILS_BOTTOM'
518
549
 
550
+ export type WebsitePermissions = 'ENABLED'
519
551
 
520
552
  type Properties<T> = Required<{
521
- [K in keyof T]: z.ZodType<T[K], any, T[K]>;
522
- }>;
553
+ [K in keyof T]: z.ZodType<T[K], any, T[K]>
554
+ }>
523
555
 
524
- type definedNonNullAny = {};
556
+ type definedNonNullAny = {}
525
557
 
526
- export const isDefinedNonNullAny = (v: any): v is definedNonNullAny => v !== undefined && v !== null;
558
+ export const isDefinedNonNullAny = (v: any): v is definedNonNullAny => v !== undefined && v !== null
527
559
 
528
- export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v));
560
+ export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v))
529
561
 
530
- export const CartPermissionsSchema = z.enum(['CUSTOMER_ONLY', 'DISABLED', 'ENABLED']);
562
+ export const CartPermissionsSchema = z.enum(['CUSTOMER_ONLY', 'DISABLED', 'ENABLED'])
531
563
 
532
- export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']);
564
+ export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON'])
533
565
 
534
- export const ContainerSizingSchema = z.enum(['BREAKPOINT', 'FULL_WIDTH']);
566
+ export const ContainerSizingSchema = z.enum(['BREAKPOINT', 'FULL_WIDTH'])
535
567
 
536
- export const CustomerAccountPermissionsSchema = z.enum(['DISABLED', 'DISABLE_REGISTRATION', 'ENABLED']);
568
+ export const CustomerAccountPermissionsSchema = z.enum([
569
+ 'DISABLED',
570
+ 'DISABLE_REGISTRATION',
571
+ 'ENABLED',
572
+ ])
537
573
 
538
- export const PaginationVariantSchema = z.enum(['COMPACT', 'EXTENDED']);
574
+ export const PaginationVariantSchema = z.enum(['COMPACT', 'EXTENDED'])
539
575
 
540
- export const ProductFiltersLayoutSchema = z.enum(['DEFAULT', 'SIDEBAR']);
576
+ export const ProductFiltersLayoutSchema = z.enum(['DEFAULT', 'SIDEBAR'])
541
577
 
542
- export const SidebarGalleryPaginationVariantSchema = z.enum(['DOTS', 'THUMBNAILS_BOTTOM']);
578
+ export const SidebarGalleryPaginationVariantSchema = z.enum(['DOTS', 'THUMBNAILS_BOTTOM'])
543
579
 
544
- export const WebsitePermissionsSchema = z.enum(['ENABLED']);
580
+ export const WebsitePermissionsSchema = z.enum(['ENABLED'])
545
581
 
546
582
  export function DatalayerConfigSchema(): z.ZodObject<Properties<DatalayerConfig>> {
547
583
  return z.object({
548
- coreWebVitals: z.boolean().nullish()
584
+ coreWebVitals: z.boolean().nullish(),
549
585
  })
550
586
  }
551
587
 
@@ -555,11 +591,11 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
555
591
  canonicalBaseUrl: z.string().min(1),
556
592
  cartDisplayPricesInclTax: z.boolean().nullish(),
557
593
  compare: z.boolean().nullish(),
558
- compareVariant: CompareVariantSchema.default("ICON").nullish(),
594
+ compareVariant: CompareVariantSchema.default('ICON').nullish(),
559
595
  configurableVariantForSimple: z.boolean().default(false).nullish(),
560
596
  configurableVariantValues: MagentoConfigurableVariantValuesSchema().nullish(),
561
- containerSizingContent: ContainerSizingSchema.default("FULL_WIDTH").nullish(),
562
- containerSizingShell: ContainerSizingSchema.default("FULL_WIDTH").nullish(),
597
+ containerSizingContent: ContainerSizingSchema.default('FULL_WIDTH').nullish(),
598
+ containerSizingShell: ContainerSizingSchema.default('FULL_WIDTH').nullish(),
563
599
  crossSellsHideCartItems: z.boolean().default(false).nullish(),
564
600
  crossSellsRedirectItems: z.boolean().default(false).nullish(),
565
601
  customerAddressNoteEnable: z.boolean().nullish(),
@@ -583,46 +619,54 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
583
619
  magentoVersion: z.number(),
584
620
  permissions: GraphCommercePermissionsSchema().nullish(),
585
621
  previewSecret: z.string().nullish(),
586
- productFiltersLayout: ProductFiltersLayoutSchema.default("DEFAULT").nullish(),
622
+ productFiltersLayout: ProductFiltersLayoutSchema.default('DEFAULT').nullish(),
587
623
  productFiltersPro: z.boolean().nullish(),
588
- productListPaginationVariant: PaginationVariantSchema.default("COMPACT").nullish(),
624
+ productListPaginationVariant: PaginationVariantSchema.default('COMPACT').nullish(),
589
625
  productRoute: z.string().nullish(),
590
626
  recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(),
591
627
  robotsAllow: z.boolean().nullish(),
592
628
  sidebarGallery: SidebarGalleryConfigSchema().nullish(),
593
629
  storefront: z.array(GraphCommerceStorefrontConfigSchema()),
594
630
  wishlistHideForGuests: z.boolean().nullish(),
595
- wishlistShowFeedbackMessage: z.boolean().nullish()
631
+ wishlistShowFeedbackMessage: z.boolean().nullish(),
596
632
  })
597
633
  }
598
634
 
599
- export function GraphCommerceDebugConfigSchema(): z.ZodObject<Properties<GraphCommerceDebugConfig>> {
635
+ export function GraphCommerceDebugConfigSchema(): z.ZodObject<
636
+ Properties<GraphCommerceDebugConfig>
637
+ > {
600
638
  return z.object({
601
639
  cart: z.boolean().nullish(),
602
640
  pluginStatus: z.boolean().nullish(),
603
641
  sessions: z.boolean().nullish(),
604
642
  webpackCircularDependencyPlugin: z.boolean().nullish(),
605
- webpackDuplicatesPlugin: z.boolean().nullish()
643
+ webpackDuplicatesPlugin: z.boolean().nullish(),
606
644
  })
607
645
  }
608
646
 
609
- export function GraphCommerceGooglePlaystoreConfigSchema(): z.ZodObject<Properties<GraphCommerceGooglePlaystoreConfig>> {
647
+ export function GraphCommerceGooglePlaystoreConfigSchema(): z.ZodObject<
648
+ Properties<GraphCommerceGooglePlaystoreConfig>
649
+ > {
610
650
  return z.object({
611
651
  packageName: z.string().min(1),
612
- sha256CertificateFingerprint: z.string().min(1)
652
+ sha256CertificateFingerprint: z.string().min(1),
613
653
  })
614
654
  }
615
655
 
616
- export function GraphCommercePermissionsSchema(): z.ZodObject<Properties<GraphCommercePermissions>> {
656
+ export function GraphCommercePermissionsSchema(): z.ZodObject<
657
+ Properties<GraphCommercePermissions>
658
+ > {
617
659
  return z.object({
618
660
  cart: CartPermissionsSchema.nullish(),
619
661
  checkout: CartPermissionsSchema.nullish(),
620
662
  customerAccount: CustomerAccountPermissionsSchema.nullish(),
621
- website: WebsitePermissionsSchema.nullish()
663
+ website: WebsitePermissionsSchema.nullish(),
622
664
  })
623
665
  }
624
666
 
625
- export function GraphCommerceStorefrontConfigSchema(): z.ZodObject<Properties<GraphCommerceStorefrontConfig>> {
667
+ export function GraphCommerceStorefrontConfigSchema(): z.ZodObject<
668
+ Properties<GraphCommerceStorefrontConfig>
669
+ > {
626
670
  return z.object({
627
671
  canonicalBaseUrl: z.string().nullish(),
628
672
  cartDisplayPricesInclTax: z.boolean().nullish(),
@@ -637,27 +681,31 @@ export function GraphCommerceStorefrontConfigSchema(): z.ZodObject<Properties<Gr
637
681
  locale: z.string().min(1),
638
682
  magentoStoreCode: z.string().min(1),
639
683
  permissions: GraphCommercePermissionsSchema().nullish(),
640
- robotsAllow: z.boolean().nullish()
684
+ robotsAllow: z.boolean().nullish(),
641
685
  })
642
686
  }
643
687
 
644
- export function MagentoConfigurableVariantValuesSchema(): z.ZodObject<Properties<MagentoConfigurableVariantValues>> {
688
+ export function MagentoConfigurableVariantValuesSchema(): z.ZodObject<
689
+ Properties<MagentoConfigurableVariantValues>
690
+ > {
645
691
  return z.object({
646
692
  content: z.boolean().nullish(),
647
693
  gallery: z.boolean().nullish(),
648
- url: z.boolean().nullish()
694
+ url: z.boolean().nullish(),
649
695
  })
650
696
  }
651
697
 
652
- export function RecentlyViewedProductsConfigSchema(): z.ZodObject<Properties<RecentlyViewedProductsConfig>> {
698
+ export function RecentlyViewedProductsConfigSchema(): z.ZodObject<
699
+ Properties<RecentlyViewedProductsConfig>
700
+ > {
653
701
  return z.object({
654
702
  enabled: z.boolean().nullish(),
655
- maxCount: z.number().nullish()
703
+ maxCount: z.number().nullish(),
656
704
  })
657
705
  }
658
706
 
659
707
  export function SidebarGalleryConfigSchema(): z.ZodObject<Properties<SidebarGalleryConfig>> {
660
708
  return z.object({
661
- paginationVariant: SidebarGalleryPaginationVariantSchema.nullish()
709
+ paginationVariant: SidebarGalleryPaginationVariantSchema.nullish(),
662
710
  })
663
711
  }