@commercetools-frontend/application-config 21.0.0-rc.1 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,47 +4,4 @@
4
4
  <a href="https://www.npmjs.com/package/@commercetools-frontend/application-config"><img src="https://badgen.net/npm/v/@commercetools-frontend/application-config" alt="Latest release (latest dist-tag)" /></a> <a href="https://www.npmjs.com/package/@commercetools-frontend/application-config"><img src="https://badgen.net/npm/v/@commercetools-frontend/application-config/next" alt="Latest release (next dist-tag)" /></a> <a href="https://bundlephobia.com/result?p=@commercetools-frontend/application-config"><img src="https://badgen.net/bundlephobia/minzip/@commercetools-frontend/application-config" alt="Minified + GZipped size" /></a> <a href="https://github.com/commercetools/merchant-center-application-kit/blob/main/LICENSE"><img src="https://badgen.net/github/license/commercetools/merchant-center-application-kit" alt="GitHub license" /></a>
5
5
  </p>
6
6
 
7
- This package contains utilities for configuring Custom Applications.
8
-
9
- ## Install
10
-
11
- ```bash
12
- $ npm install --save @commercetools-frontend/application-config
13
- ```
14
-
15
- ## Configuration format
16
-
17
- A Custom Application must be configured with a single JSON configuration file. The file name can be one of:
18
-
19
- - `.custom-application-configrc`
20
- - `.custom-application-config.json`
21
- - `custom-application-config.json`
22
-
23
- The file is automatically loaded, as long as it is found in the project's root folder. For that, the package uses the [cosmiconfig](https://www.npmjs.com/package/cosmiconfig) library.
24
-
25
- The configuration file is in the format of a JSON schema that is also part of this package. The configuration file itself is validated when starting the Custom Application against the JSON schema.
26
-
27
- By default the configuration file uses the `NODE_ENV` variable to determine which configuration to use. This can be overridden by using the custom environment variable `MC_APP_ENV`.
28
-
29
- In the [test fixtures](./test/fixtures) folder you can see some examples of configuration.
30
-
31
- ### JSON Schema
32
-
33
- To enable JSON schema validation for the Custom Application configuration, you can add a reference as a URL to the `schema.json` file provided in this package.
34
-
35
- **Example setup for VSCode**
36
-
37
- In the VSCode settings (either user settings or workspace settings), reference the schema JSON as described below:
38
-
39
- ```json
40
- "json.schemas": [
41
- {
42
- "fileMatch": [
43
- "/.custom-application-configrc",
44
- "/.custom-application-config.json",
45
- "/custom-application-config.json"
46
- ],
47
- "url": "https://docs.commercetools.com/custom-applications/schema.json"
48
- }
49
- ]
50
- ```
7
+ Check out the [documentation](https://docs.commercetools.com/custom-applications/api-reference/application-config) for more information.
@@ -157,16 +157,20 @@ var schemaJson = {
157
157
  },
158
158
  properties: {
159
159
  name: {
160
- description: "The name of the Custom Application",
160
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#name",
161
+ type: "string"
162
+ },
163
+ description: {
164
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#description",
161
165
  type: "string"
162
166
  },
163
167
  entryPointUriPath: {
164
- description: "The unique route path of the Custom Application. This is the identifier that the Merchant Center Proxy uses to match the HTTP request and to forward it to the Custom Application URL (https://docs.commercetools.com/custom-applications/api-reference/application-config).",
168
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#entrypointuripath",
165
169
  type: "string",
166
170
  pattern: "^[^\\-_]([0-9a-z]|[\\-_](?![\\-_])){2,64}[^\\-_]$"
167
171
  },
168
172
  cloudIdentifier: {
169
- description: "The cloud identifier where the Custom Application is running. This value is used to derive the Merchant Center API URL. Alternatively you can use the `mcApiUrl` property.",
173
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#cloudidentifier",
170
174
  type: "string",
171
175
  oneOf: [
172
176
  {
@@ -184,15 +188,15 @@ var schemaJson = {
184
188
  ]
185
189
  },
186
190
  mcApiUrl: {
187
- description: "The URL of the Merchant Center API. We usually recommend to use the `cloudIdentifier` option to avoid possible typos.",
191
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mcapiurl",
188
192
  type: "string"
189
193
  },
190
194
  oAuthScopes: {
191
- description: "The requested OAuth Scopes for this Custom Application.",
195
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopes",
192
196
  type: "object",
193
197
  properties: {
194
198
  view: {
195
- description: "The list of view-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
199
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesview",
196
200
  type: "array",
197
201
  "default": [
198
202
  ],
@@ -203,7 +207,7 @@ var schemaJson = {
203
207
  uniqueItems: true
204
208
  },
205
209
  manage: {
206
- description: "The list of manage-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
210
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesmanage",
207
211
  type: "array",
208
212
  "default": [
209
213
  ],
@@ -221,19 +225,17 @@ var schemaJson = {
221
225
  ]
222
226
  },
223
227
  env: {
224
- description: "This is an object of keys that represents different environments (for example `production`). The environment used depends on the environment variable `MC_APP_ENV`. If `MC_APP_ENV` isn't set then `NODE_ENV` will be used. If neither is set, it defaults to `development`",
228
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#env",
225
229
  type: "object",
226
230
  properties: {
227
231
  development: {
228
- description: "Configuration for development only",
229
232
  type: "object",
230
233
  properties: {
231
234
  initialProjectKey: {
232
- description: "The initial project key that the Custom Application is requesting access for. This is only used in development.",
235
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envdevelopmentinitialprojectkey",
233
236
  type: "string"
234
237
  },
235
238
  teamId: {
236
- description: "The ID of an existing team. This can be used for granting access on behalf of the permissions assigned to that team and project.",
237
239
  type: "string"
238
240
  }
239
241
  },
@@ -243,19 +245,18 @@ var schemaJson = {
243
245
  ]
244
246
  },
245
247
  production: {
246
- description: "Configuration for production only",
247
248
  type: "object",
248
249
  properties: {
249
250
  applicationId: {
250
- description: "The ID of the Custom Application (when you register the application in the Merchant Center)",
251
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionapplicationid",
251
252
  type: "string"
252
253
  },
253
254
  url: {
254
- description: "The URL where the Custom Application is hosted",
255
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionurl",
255
256
  type: "string"
256
257
  },
257
258
  cdnUrl: {
258
- description: "The URL where the Custom Application static assets are hosted, like an external CDN. If the static assets are hosted alongside the Custom Application, you can omit this option and the Custom Application URL will be used instead.",
259
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductioncdnurl",
259
260
  type: "string"
260
261
  }
261
262
  },
@@ -273,15 +274,15 @@ var schemaJson = {
273
274
  ]
274
275
  },
275
276
  additionalEnv: {
276
- description: "Additional environment values unique to your Custom Application that are injected in the application context.",
277
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionalenv",
277
278
  type: "object"
278
279
  },
279
280
  headers: {
280
- description: "Configuration for HTTP headers",
281
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headers",
281
282
  type: "object",
282
283
  properties: {
283
284
  csp: {
284
- description: "Configuration for the HTTP Content-Security-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy)",
285
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerscsp",
285
286
  type: "object",
286
287
  properties: {
287
288
  "connect-src": {
@@ -309,15 +310,15 @@ var schemaJson = {
309
310
  ]
310
311
  },
311
312
  featurePolicies: {
312
- description: "Configuration for the HTTP Feature-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy)",
313
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersfeaturepolicies",
313
314
  type: "object"
314
315
  },
315
316
  permissionsPolicies: {
316
- description: "Configuration for the HTTP Permissions-Policy header (https://github.com/w3c/webappsec-permissions-policy/blob/main/permissions-policy-explainer.md)",
317
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerspermissionspolicies",
317
318
  type: "object"
318
319
  },
319
320
  strictTransportSecurity: {
320
- description: "Additional configuration for the HTTP Strict-Transport-Security header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security)",
321
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersstricttransportsecurity",
321
322
  type: "array",
322
323
  items: {
323
324
  "enum": [
@@ -331,19 +332,19 @@ var schemaJson = {
331
332
  additionalProperties: false
332
333
  },
333
334
  icon: {
334
- description: "The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.",
335
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#icon",
335
336
  type: "string"
336
337
  },
337
338
  mainMenuLink: {
338
- description: "Configuration for the main menu link on the left-side navbar.",
339
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulink",
339
340
  type: "object",
340
341
  properties: {
341
342
  defaultLabel: {
342
- description: "A default label to be rendered if there is no matching localized label for the user locale.",
343
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkdefaultlabel",
343
344
  type: "string"
344
345
  },
345
346
  labelAllLocales: {
346
- description: "Localized label based on the application locales available from the user profile.",
347
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinklabelalllocales",
347
348
  type: "array",
348
349
  "default": [
349
350
  ],
@@ -362,7 +363,6 @@ var schemaJson = {
362
363
  ]
363
364
  },
364
365
  value: {
365
- description: "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
366
366
  type: "string"
367
367
  }
368
368
  },
@@ -374,7 +374,7 @@ var schemaJson = {
374
374
  }
375
375
  },
376
376
  permissions: {
377
- description: "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
377
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkpermissions",
378
378
  type: "array",
379
379
  "default": [
380
380
  ],
@@ -391,7 +391,7 @@ var schemaJson = {
391
391
  ]
392
392
  },
393
393
  submenuLinks: {
394
- description: "Configuration for the submenu links on the left-side navbar.",
394
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinks",
395
395
  "default": [
396
396
  ],
397
397
  type: "array",
@@ -399,15 +399,15 @@ var schemaJson = {
399
399
  type: "object",
400
400
  properties: {
401
401
  uriPath: {
402
- description: "Route path relative to the entry point URI path of the Custom Application.",
402
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksuripath",
403
403
  type: "string"
404
404
  },
405
405
  defaultLabel: {
406
- description: "A default label to be rendered if there is no matching localized label for the user locale.",
406
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksdefaultlabel",
407
407
  type: "string"
408
408
  },
409
409
  labelAllLocales: {
410
- description: "Localized label based on the application locales available from the user profile.",
410
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkslabelalllocales",
411
411
  type: "array",
412
412
  "default": [
413
413
  ],
@@ -426,7 +426,6 @@ var schemaJson = {
426
426
  ]
427
427
  },
428
428
  value: {
429
- description: "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
430
429
  type: "string"
431
430
  }
432
431
  },
@@ -438,7 +437,7 @@ var schemaJson = {
438
437
  }
439
438
  },
440
439
  permissions: {
441
- description: "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
440
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkspermissions",
442
441
  type: "array",
443
442
  "default": [
444
443
  ],
@@ -761,7 +760,8 @@ var processConfig = function processConfig() {
761
760
  authorizeUrl: [// In case the MC API url points to localhost, we need to point
762
761
  // to a local running dev login page to handle the workflow properly.
763
762
  mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
764
- initialProjectKey: appConfig.env.development.initialProjectKey,
763
+ initialProjectKey: // For the `account` application, we should unset the projectKey.
764
+ appConfig.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey,
765
765
  teamId: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId,
766
766
  oAuthScopes: appConfig.oAuthScopes
767
767
  }),
@@ -157,16 +157,20 @@ var schemaJson = {
157
157
  },
158
158
  properties: {
159
159
  name: {
160
- description: "The name of the Custom Application",
160
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#name",
161
+ type: "string"
162
+ },
163
+ description: {
164
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#description",
161
165
  type: "string"
162
166
  },
163
167
  entryPointUriPath: {
164
- description: "The unique route path of the Custom Application. This is the identifier that the Merchant Center Proxy uses to match the HTTP request and to forward it to the Custom Application URL (https://docs.commercetools.com/custom-applications/api-reference/application-config).",
168
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#entrypointuripath",
165
169
  type: "string",
166
170
  pattern: "^[^\\-_]([0-9a-z]|[\\-_](?![\\-_])){2,64}[^\\-_]$"
167
171
  },
168
172
  cloudIdentifier: {
169
- description: "The cloud identifier where the Custom Application is running. This value is used to derive the Merchant Center API URL. Alternatively you can use the `mcApiUrl` property.",
173
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#cloudidentifier",
170
174
  type: "string",
171
175
  oneOf: [
172
176
  {
@@ -184,15 +188,15 @@ var schemaJson = {
184
188
  ]
185
189
  },
186
190
  mcApiUrl: {
187
- description: "The URL of the Merchant Center API. We usually recommend to use the `cloudIdentifier` option to avoid possible typos.",
191
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mcapiurl",
188
192
  type: "string"
189
193
  },
190
194
  oAuthScopes: {
191
- description: "The requested OAuth Scopes for this Custom Application.",
195
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopes",
192
196
  type: "object",
193
197
  properties: {
194
198
  view: {
195
- description: "The list of view-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
199
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesview",
196
200
  type: "array",
197
201
  "default": [
198
202
  ],
@@ -203,7 +207,7 @@ var schemaJson = {
203
207
  uniqueItems: true
204
208
  },
205
209
  manage: {
206
- description: "The list of manage-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
210
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesmanage",
207
211
  type: "array",
208
212
  "default": [
209
213
  ],
@@ -221,19 +225,17 @@ var schemaJson = {
221
225
  ]
222
226
  },
223
227
  env: {
224
- description: "This is an object of keys that represents different environments (for example `production`). The environment used depends on the environment variable `MC_APP_ENV`. If `MC_APP_ENV` isn't set then `NODE_ENV` will be used. If neither is set, it defaults to `development`",
228
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#env",
225
229
  type: "object",
226
230
  properties: {
227
231
  development: {
228
- description: "Configuration for development only",
229
232
  type: "object",
230
233
  properties: {
231
234
  initialProjectKey: {
232
- description: "The initial project key that the Custom Application is requesting access for. This is only used in development.",
235
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envdevelopmentinitialprojectkey",
233
236
  type: "string"
234
237
  },
235
238
  teamId: {
236
- description: "The ID of an existing team. This can be used for granting access on behalf of the permissions assigned to that team and project.",
237
239
  type: "string"
238
240
  }
239
241
  },
@@ -243,19 +245,18 @@ var schemaJson = {
243
245
  ]
244
246
  },
245
247
  production: {
246
- description: "Configuration for production only",
247
248
  type: "object",
248
249
  properties: {
249
250
  applicationId: {
250
- description: "The ID of the Custom Application (when you register the application in the Merchant Center)",
251
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionapplicationid",
251
252
  type: "string"
252
253
  },
253
254
  url: {
254
- description: "The URL where the Custom Application is hosted",
255
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionurl",
255
256
  type: "string"
256
257
  },
257
258
  cdnUrl: {
258
- description: "The URL where the Custom Application static assets are hosted, like an external CDN. If the static assets are hosted alongside the Custom Application, you can omit this option and the Custom Application URL will be used instead.",
259
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductioncdnurl",
259
260
  type: "string"
260
261
  }
261
262
  },
@@ -273,15 +274,15 @@ var schemaJson = {
273
274
  ]
274
275
  },
275
276
  additionalEnv: {
276
- description: "Additional environment values unique to your Custom Application that are injected in the application context.",
277
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionalenv",
277
278
  type: "object"
278
279
  },
279
280
  headers: {
280
- description: "Configuration for HTTP headers",
281
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headers",
281
282
  type: "object",
282
283
  properties: {
283
284
  csp: {
284
- description: "Configuration for the HTTP Content-Security-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy)",
285
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerscsp",
285
286
  type: "object",
286
287
  properties: {
287
288
  "connect-src": {
@@ -309,15 +310,15 @@ var schemaJson = {
309
310
  ]
310
311
  },
311
312
  featurePolicies: {
312
- description: "Configuration for the HTTP Feature-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy)",
313
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersfeaturepolicies",
313
314
  type: "object"
314
315
  },
315
316
  permissionsPolicies: {
316
- description: "Configuration for the HTTP Permissions-Policy header (https://github.com/w3c/webappsec-permissions-policy/blob/main/permissions-policy-explainer.md)",
317
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerspermissionspolicies",
317
318
  type: "object"
318
319
  },
319
320
  strictTransportSecurity: {
320
- description: "Additional configuration for the HTTP Strict-Transport-Security header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security)",
321
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersstricttransportsecurity",
321
322
  type: "array",
322
323
  items: {
323
324
  "enum": [
@@ -331,19 +332,19 @@ var schemaJson = {
331
332
  additionalProperties: false
332
333
  },
333
334
  icon: {
334
- description: "The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.",
335
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#icon",
335
336
  type: "string"
336
337
  },
337
338
  mainMenuLink: {
338
- description: "Configuration for the main menu link on the left-side navbar.",
339
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulink",
339
340
  type: "object",
340
341
  properties: {
341
342
  defaultLabel: {
342
- description: "A default label to be rendered if there is no matching localized label for the user locale.",
343
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkdefaultlabel",
343
344
  type: "string"
344
345
  },
345
346
  labelAllLocales: {
346
- description: "Localized label based on the application locales available from the user profile.",
347
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinklabelalllocales",
347
348
  type: "array",
348
349
  "default": [
349
350
  ],
@@ -362,7 +363,6 @@ var schemaJson = {
362
363
  ]
363
364
  },
364
365
  value: {
365
- description: "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
366
366
  type: "string"
367
367
  }
368
368
  },
@@ -374,7 +374,7 @@ var schemaJson = {
374
374
  }
375
375
  },
376
376
  permissions: {
377
- description: "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
377
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkpermissions",
378
378
  type: "array",
379
379
  "default": [
380
380
  ],
@@ -391,7 +391,7 @@ var schemaJson = {
391
391
  ]
392
392
  },
393
393
  submenuLinks: {
394
- description: "Configuration for the submenu links on the left-side navbar.",
394
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinks",
395
395
  "default": [
396
396
  ],
397
397
  type: "array",
@@ -399,15 +399,15 @@ var schemaJson = {
399
399
  type: "object",
400
400
  properties: {
401
401
  uriPath: {
402
- description: "Route path relative to the entry point URI path of the Custom Application.",
402
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksuripath",
403
403
  type: "string"
404
404
  },
405
405
  defaultLabel: {
406
- description: "A default label to be rendered if there is no matching localized label for the user locale.",
406
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksdefaultlabel",
407
407
  type: "string"
408
408
  },
409
409
  labelAllLocales: {
410
- description: "Localized label based on the application locales available from the user profile.",
410
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkslabelalllocales",
411
411
  type: "array",
412
412
  "default": [
413
413
  ],
@@ -426,7 +426,6 @@ var schemaJson = {
426
426
  ]
427
427
  },
428
428
  value: {
429
- description: "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
430
429
  type: "string"
431
430
  }
432
431
  },
@@ -438,7 +437,7 @@ var schemaJson = {
438
437
  }
439
438
  },
440
439
  permissions: {
441
- description: "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
440
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkspermissions",
442
441
  type: "array",
443
442
  "default": [
444
443
  ],
@@ -761,7 +760,8 @@ var processConfig = function processConfig() {
761
760
  authorizeUrl: [// In case the MC API url points to localhost, we need to point
762
761
  // to a local running dev login page to handle the workflow properly.
763
762
  mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
764
- initialProjectKey: appConfig.env.development.initialProjectKey,
763
+ initialProjectKey: // For the `account` application, we should unset the projectKey.
764
+ appConfig.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey,
765
765
  teamId: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId,
766
766
  oAuthScopes: appConfig.oAuthScopes
767
767
  }),
@@ -129,16 +129,20 @@ var schemaJson = {
129
129
  },
130
130
  properties: {
131
131
  name: {
132
- description: "The name of the Custom Application",
132
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#name",
133
+ type: "string"
134
+ },
135
+ description: {
136
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#description",
133
137
  type: "string"
134
138
  },
135
139
  entryPointUriPath: {
136
- description: "The unique route path of the Custom Application. This is the identifier that the Merchant Center Proxy uses to match the HTTP request and to forward it to the Custom Application URL (https://docs.commercetools.com/custom-applications/api-reference/application-config).",
140
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#entrypointuripath",
137
141
  type: "string",
138
142
  pattern: "^[^\\-_]([0-9a-z]|[\\-_](?![\\-_])){2,64}[^\\-_]$"
139
143
  },
140
144
  cloudIdentifier: {
141
- description: "The cloud identifier where the Custom Application is running. This value is used to derive the Merchant Center API URL. Alternatively you can use the `mcApiUrl` property.",
145
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#cloudidentifier",
142
146
  type: "string",
143
147
  oneOf: [
144
148
  {
@@ -156,15 +160,15 @@ var schemaJson = {
156
160
  ]
157
161
  },
158
162
  mcApiUrl: {
159
- description: "The URL of the Merchant Center API. We usually recommend to use the `cloudIdentifier` option to avoid possible typos.",
163
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mcapiurl",
160
164
  type: "string"
161
165
  },
162
166
  oAuthScopes: {
163
- description: "The requested OAuth Scopes for this Custom Application.",
167
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopes",
164
168
  type: "object",
165
169
  properties: {
166
170
  view: {
167
- description: "The list of view-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
171
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesview",
168
172
  type: "array",
169
173
  "default": [
170
174
  ],
@@ -175,7 +179,7 @@ var schemaJson = {
175
179
  uniqueItems: true
176
180
  },
177
181
  manage: {
178
- description: "The list of manage-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
182
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesmanage",
179
183
  type: "array",
180
184
  "default": [
181
185
  ],
@@ -193,19 +197,17 @@ var schemaJson = {
193
197
  ]
194
198
  },
195
199
  env: {
196
- description: "This is an object of keys that represents different environments (for example `production`). The environment used depends on the environment variable `MC_APP_ENV`. If `MC_APP_ENV` isn't set then `NODE_ENV` will be used. If neither is set, it defaults to `development`",
200
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#env",
197
201
  type: "object",
198
202
  properties: {
199
203
  development: {
200
- description: "Configuration for development only",
201
204
  type: "object",
202
205
  properties: {
203
206
  initialProjectKey: {
204
- description: "The initial project key that the Custom Application is requesting access for. This is only used in development.",
207
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envdevelopmentinitialprojectkey",
205
208
  type: "string"
206
209
  },
207
210
  teamId: {
208
- description: "The ID of an existing team. This can be used for granting access on behalf of the permissions assigned to that team and project.",
209
211
  type: "string"
210
212
  }
211
213
  },
@@ -215,19 +217,18 @@ var schemaJson = {
215
217
  ]
216
218
  },
217
219
  production: {
218
- description: "Configuration for production only",
219
220
  type: "object",
220
221
  properties: {
221
222
  applicationId: {
222
- description: "The ID of the Custom Application (when you register the application in the Merchant Center)",
223
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionapplicationid",
223
224
  type: "string"
224
225
  },
225
226
  url: {
226
- description: "The URL where the Custom Application is hosted",
227
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionurl",
227
228
  type: "string"
228
229
  },
229
230
  cdnUrl: {
230
- description: "The URL where the Custom Application static assets are hosted, like an external CDN. If the static assets are hosted alongside the Custom Application, you can omit this option and the Custom Application URL will be used instead.",
231
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductioncdnurl",
231
232
  type: "string"
232
233
  }
233
234
  },
@@ -245,15 +246,15 @@ var schemaJson = {
245
246
  ]
246
247
  },
247
248
  additionalEnv: {
248
- description: "Additional environment values unique to your Custom Application that are injected in the application context.",
249
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionalenv",
249
250
  type: "object"
250
251
  },
251
252
  headers: {
252
- description: "Configuration for HTTP headers",
253
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headers",
253
254
  type: "object",
254
255
  properties: {
255
256
  csp: {
256
- description: "Configuration for the HTTP Content-Security-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy)",
257
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerscsp",
257
258
  type: "object",
258
259
  properties: {
259
260
  "connect-src": {
@@ -281,15 +282,15 @@ var schemaJson = {
281
282
  ]
282
283
  },
283
284
  featurePolicies: {
284
- description: "Configuration for the HTTP Feature-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy)",
285
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersfeaturepolicies",
285
286
  type: "object"
286
287
  },
287
288
  permissionsPolicies: {
288
- description: "Configuration for the HTTP Permissions-Policy header (https://github.com/w3c/webappsec-permissions-policy/blob/main/permissions-policy-explainer.md)",
289
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerspermissionspolicies",
289
290
  type: "object"
290
291
  },
291
292
  strictTransportSecurity: {
292
- description: "Additional configuration for the HTTP Strict-Transport-Security header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security)",
293
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersstricttransportsecurity",
293
294
  type: "array",
294
295
  items: {
295
296
  "enum": [
@@ -303,19 +304,19 @@ var schemaJson = {
303
304
  additionalProperties: false
304
305
  },
305
306
  icon: {
306
- description: "The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.",
307
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#icon",
307
308
  type: "string"
308
309
  },
309
310
  mainMenuLink: {
310
- description: "Configuration for the main menu link on the left-side navbar.",
311
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulink",
311
312
  type: "object",
312
313
  properties: {
313
314
  defaultLabel: {
314
- description: "A default label to be rendered if there is no matching localized label for the user locale.",
315
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkdefaultlabel",
315
316
  type: "string"
316
317
  },
317
318
  labelAllLocales: {
318
- description: "Localized label based on the application locales available from the user profile.",
319
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinklabelalllocales",
319
320
  type: "array",
320
321
  "default": [
321
322
  ],
@@ -334,7 +335,6 @@ var schemaJson = {
334
335
  ]
335
336
  },
336
337
  value: {
337
- description: "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
338
338
  type: "string"
339
339
  }
340
340
  },
@@ -346,7 +346,7 @@ var schemaJson = {
346
346
  }
347
347
  },
348
348
  permissions: {
349
- description: "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
349
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkpermissions",
350
350
  type: "array",
351
351
  "default": [
352
352
  ],
@@ -363,7 +363,7 @@ var schemaJson = {
363
363
  ]
364
364
  },
365
365
  submenuLinks: {
366
- description: "Configuration for the submenu links on the left-side navbar.",
366
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinks",
367
367
  "default": [
368
368
  ],
369
369
  type: "array",
@@ -371,15 +371,15 @@ var schemaJson = {
371
371
  type: "object",
372
372
  properties: {
373
373
  uriPath: {
374
- description: "Route path relative to the entry point URI path of the Custom Application.",
374
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksuripath",
375
375
  type: "string"
376
376
  },
377
377
  defaultLabel: {
378
- description: "A default label to be rendered if there is no matching localized label for the user locale.",
378
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksdefaultlabel",
379
379
  type: "string"
380
380
  },
381
381
  labelAllLocales: {
382
- description: "Localized label based on the application locales available from the user profile.",
382
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkslabelalllocales",
383
383
  type: "array",
384
384
  "default": [
385
385
  ],
@@ -398,7 +398,6 @@ var schemaJson = {
398
398
  ]
399
399
  },
400
400
  value: {
401
- description: "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
402
401
  type: "string"
403
402
  }
404
403
  },
@@ -410,7 +409,7 @@ var schemaJson = {
410
409
  }
411
410
  },
412
411
  permissions: {
413
- description: "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
412
+ description: "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkspermissions",
414
413
  type: "array",
415
414
  "default": [
416
415
  ],
@@ -733,7 +732,8 @@ var processConfig = function processConfig() {
733
732
  authorizeUrl: [// In case the MC API url points to localhost, we need to point
734
733
  // to a local running dev login page to handle the workflow properly.
735
734
  mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
736
- initialProjectKey: appConfig.env.development.initialProjectKey,
735
+ initialProjectKey: // For the `account` application, we should unset the projectKey.
736
+ appConfig.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey,
737
737
  teamId: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId,
738
738
  oAuthScopes: appConfig.oAuthScopes
739
739
  }),
@@ -2,6 +2,7 @@ export declare type EnvVariablePlaceholder = string;
2
2
  export declare type CspDirective = string[];
3
3
  export interface JSONSchemaForCustomApplicationConfigurationFiles {
4
4
  name: string;
5
+ description?: string;
5
6
  entryPointUriPath: string;
6
7
  cloudIdentifier: (('gcp-au' | 'gcp-eu' | 'gcp-us' | 'aws-fra' | 'aws-ohio') | EnvVariablePlaceholder) & string;
7
8
  mcApiUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-config",
3
- "version": "21.0.0-rc.1",
3
+ "version": "21.0.0",
4
4
  "description": "Configuration utilities for building Custom Applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -8,7 +8,7 @@
8
8
  "url": "https://github.com/commercetools/merchant-center-application-kit.git",
9
9
  "directory": "packages/application-config"
10
10
  },
11
- "homepage": "https://docs.commercetools.com/custom-applications",
11
+ "homepage": "https://docs.commercetools.com/custom-applications/api-reference/application-config",
12
12
  "keywords": ["javascript", "frontend", "react", "toolkit", "config"],
13
13
  "license": "MIT",
14
14
  "publishConfig": {
@@ -31,7 +31,7 @@
31
31
  "@babel/register": "^7.16.9",
32
32
  "@babel/runtime": "^7.16.7",
33
33
  "@babel/runtime-corejs3": "^7.16.8",
34
- "@commercetools-frontend/babel-preset-mc-app": "21.0.0-rc.1",
34
+ "@commercetools-frontend/babel-preset-mc-app": "21.0.0",
35
35
  "ajv": "8.9.0",
36
36
  "core-js": "^3.20.3",
37
37
  "cosmiconfig": "7.0.1",
package/schema.json CHANGED
@@ -18,16 +18,20 @@
18
18
  },
19
19
  "properties": {
20
20
  "name": {
21
- "description": "The name of the Custom Application",
21
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#name",
22
+ "type": "string"
23
+ },
24
+ "description": {
25
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#description",
22
26
  "type": "string"
23
27
  },
24
28
  "entryPointUriPath": {
25
- "description": "The unique route path of the Custom Application. This is the identifier that the Merchant Center Proxy uses to match the HTTP request and to forward it to the Custom Application URL (https://docs.commercetools.com/custom-applications/api-reference/application-config).",
29
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#entrypointuripath",
26
30
  "type": "string",
27
31
  "pattern": "^[^\\-_]([0-9a-z]|[\\-_](?![\\-_])){2,64}[^\\-_]$"
28
32
  },
29
33
  "cloudIdentifier": {
30
- "description": "The cloud identifier where the Custom Application is running. This value is used to derive the Merchant Center API URL. Alternatively you can use the `mcApiUrl` property.",
34
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#cloudidentifier",
31
35
  "type": "string",
32
36
  "oneOf": [
33
37
  {
@@ -39,15 +43,15 @@
39
43
  ]
40
44
  },
41
45
  "mcApiUrl": {
42
- "description": "The URL of the Merchant Center API. We usually recommend to use the `cloudIdentifier` option to avoid possible typos.",
46
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mcapiurl",
43
47
  "type": "string"
44
48
  },
45
49
  "oAuthScopes": {
46
- "description": "The requested OAuth Scopes for this Custom Application.",
50
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopes",
47
51
  "type": "object",
48
52
  "properties": {
49
53
  "view": {
50
- "description": "The list of view-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
54
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesview",
51
55
  "type": "array",
52
56
  "default": [],
53
57
  "items": {
@@ -57,7 +61,7 @@
57
61
  "uniqueItems": true
58
62
  },
59
63
  "manage": {
60
- "description": "The list of manage-only OAuth Scopes (https://docs.commercetools.com/api/scopes).",
64
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesmanage",
61
65
  "type": "array",
62
66
  "default": [],
63
67
  "items": {
@@ -71,19 +75,17 @@
71
75
  "required": ["view", "manage"]
72
76
  },
73
77
  "env": {
74
- "description": "This is an object of keys that represents different environments (for example `production`). The environment used depends on the environment variable `MC_APP_ENV`. If `MC_APP_ENV` isn't set then `NODE_ENV` will be used. If neither is set, it defaults to `development`",
78
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#env",
75
79
  "type": "object",
76
80
  "properties": {
77
81
  "development": {
78
- "description": "Configuration for development only",
79
82
  "type": "object",
80
83
  "properties": {
81
84
  "initialProjectKey": {
82
- "description": "The initial project key that the Custom Application is requesting access for. This is only used in development.",
85
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envdevelopmentinitialprojectkey",
83
86
  "type": "string"
84
87
  },
85
88
  "teamId": {
86
- "description": "The ID of an existing team. This can be used for granting access on behalf of the permissions assigned to that team and project.",
87
89
  "type": "string"
88
90
  }
89
91
  },
@@ -91,19 +93,18 @@
91
93
  "required": ["initialProjectKey"]
92
94
  },
93
95
  "production": {
94
- "description": "Configuration for production only",
95
96
  "type": "object",
96
97
  "properties": {
97
98
  "applicationId": {
98
- "description": "The ID of the Custom Application (when you register the application in the Merchant Center)",
99
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionapplicationid",
99
100
  "type": "string"
100
101
  },
101
102
  "url": {
102
- "description": "The URL where the Custom Application is hosted",
103
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionurl",
103
104
  "type": "string"
104
105
  },
105
106
  "cdnUrl": {
106
- "description": "The URL where the Custom Application static assets are hosted, like an external CDN. If the static assets are hosted alongside the Custom Application, you can omit this option and the Custom Application URL will be used instead.",
107
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductioncdnurl",
107
108
  "type": "string"
108
109
  }
109
110
  },
@@ -115,15 +116,15 @@
115
116
  "required": ["development", "production"]
116
117
  },
117
118
  "additionalEnv": {
118
- "description": "Additional environment values unique to your Custom Application that are injected in the application context.",
119
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionalenv",
119
120
  "type": "object"
120
121
  },
121
122
  "headers": {
122
- "description": "Configuration for HTTP headers",
123
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headers",
123
124
  "type": "object",
124
125
  "properties": {
125
126
  "csp": {
126
- "description": "Configuration for the HTTP Content-Security-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy)",
127
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerscsp",
127
128
  "type": "object",
128
129
  "properties": {
129
130
  "connect-src": {
@@ -149,15 +150,15 @@
149
150
  "required": ["connect-src"]
150
151
  },
151
152
  "featurePolicies": {
152
- "description": "Configuration for the HTTP Feature-Policy header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy)",
153
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersfeaturepolicies",
153
154
  "type": "object"
154
155
  },
155
156
  "permissionsPolicies": {
156
- "description": "Configuration for the HTTP Permissions-Policy header (https://github.com/w3c/webappsec-permissions-policy/blob/main/permissions-policy-explainer.md)",
157
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerspermissionspolicies",
157
158
  "type": "object"
158
159
  },
159
160
  "strictTransportSecurity": {
160
- "description": "Additional configuration for the HTTP Strict-Transport-Security header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security)",
161
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersstricttransportsecurity",
161
162
  "type": "array",
162
163
  "items": {
163
164
  "enum": ["includeSubDomains", "preload"]
@@ -168,19 +169,19 @@
168
169
  "additionalProperties": false
169
170
  },
170
171
  "icon": {
171
- "description": "The SVG icon that represents this application. Pass the raw SVG string or a path to an SVG file, for example a relative path `${path:./app.svg}`, or a path from a module `${path:@commercetools-frontend/assets/application-icons/rocket.svg}`.",
172
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#icon",
172
173
  "type": "string"
173
174
  },
174
175
  "mainMenuLink": {
175
- "description": "Configuration for the main menu link on the left-side navbar.",
176
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulink",
176
177
  "type": "object",
177
178
  "properties": {
178
179
  "defaultLabel": {
179
- "description": "A default label to be rendered if there is no matching localized label for the user locale.",
180
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkdefaultlabel",
180
181
  "type": "string"
181
182
  },
182
183
  "labelAllLocales": {
183
- "description": "Localized label based on the application locales available from the user profile.",
184
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinklabelalllocales",
184
185
  "type": "array",
185
186
  "default": [],
186
187
  "items": {
@@ -191,7 +192,6 @@
191
192
  "enum": ["en", "de", "es", "fr-FR", "zh-CN", "ja"]
192
193
  },
193
194
  "value": {
194
- "description": "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
195
195
  "type": "string"
196
196
  }
197
197
  },
@@ -200,7 +200,7 @@
200
200
  }
201
201
  },
202
202
  "permissions": {
203
- "description": "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
203
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkpermissions",
204
204
  "type": "array",
205
205
  "default": [],
206
206
  "items": {
@@ -212,22 +212,22 @@
212
212
  "required": ["defaultLabel", "labelAllLocales", "permissions"]
213
213
  },
214
214
  "submenuLinks": {
215
- "description": "Configuration for the submenu links on the left-side navbar.",
215
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinks",
216
216
  "default": [],
217
217
  "type": "array",
218
218
  "items": {
219
219
  "type": "object",
220
220
  "properties": {
221
221
  "uriPath": {
222
- "description": "Route path relative to the entry point URI path of the Custom Application.",
222
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksuripath",
223
223
  "type": "string"
224
224
  },
225
225
  "defaultLabel": {
226
- "description": "A default label to be rendered if there is no matching localized label for the user locale.",
226
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksdefaultlabel",
227
227
  "type": "string"
228
228
  },
229
229
  "labelAllLocales": {
230
- "description": "Localized label based on the application locales available from the user profile.",
230
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkslabelalllocales",
231
231
  "type": "array",
232
232
  "default": [],
233
233
  "items": {
@@ -238,7 +238,6 @@
238
238
  "enum": ["en", "de", "es", "fr-FR", "zh-CN", "ja"]
239
239
  },
240
240
  "value": {
241
- "description": "A label for the specific locale or a reference to a translated message. For example `${intl:en:Menu.Avengers}` which looks for the message key `Menu.Avengers` in the `src/i18n/data/en.json`",
242
241
  "type": "string"
243
242
  }
244
243
  },
@@ -247,7 +246,7 @@
247
246
  }
248
247
  },
249
248
  "permissions": {
250
- "description": "Set the visibility of the menu link. Permission values are derived from the `entryPointUriPath`. Users must have at least one permission to see the Custom Application in the Merchant Center menu.",
249
+ "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkspermissions",
251
250
  "type": "array",
252
251
  "default": [],
253
252
  "items": {