@graphcommerce/next-config 9.0.4-canary.0 → 9.0.4-canary.10

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