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