@commercetools-frontend/application-config 22.7.0 → 22.8.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.
@@ -1,9 +1,14 @@
1
1
  /// <reference types="node" />
2
2
  import type { ApplicationWindow } from '@commercetools-frontend/constants';
3
- import { CLOUD_IDENTIFIERS } from './constants';
4
- import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schema';
3
+ import { CLOUD_IDENTIFIERS, LOADED_CONFIG_TYPES } from './constants';
4
+ import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schemas/generated/custom-application.schema';
5
+ import type { JSONSchemaForCustomViewConfigurationFiles } from './schemas/generated/custom-view.schema';
6
+ import type { TCustomView } from './types/generated/settings';
5
7
  export type ConfigOptions = JSONSchemaForCustomApplicationConfigurationFiles;
8
+ export type ConfigOptionsForCustomApplication = JSONSchemaForCustomApplicationConfigurationFiles;
9
+ export type ConfigOptionsForCustomView = JSONSchemaForCustomViewConfigurationFiles;
6
10
  export type CloudIdentifier = (typeof CLOUD_IDENTIFIERS)[keyof typeof CLOUD_IDENTIFIERS];
11
+ export type LoadedConfigType = (typeof LOADED_CONFIG_TYPES)[keyof typeof LOADED_CONFIG_TYPES];
7
12
  type LocalizedFieldData = {
8
13
  locale: string;
9
14
  value: string;
@@ -34,8 +39,20 @@ export type CustomApplicationData = {
34
39
  mainMenuLink: CustomApplicationMenuLinkData;
35
40
  submenuLinks: CustomApplicationSubmenuLinkData[];
36
41
  };
42
+ export type CustomViewPermissionData = CustomApplicationPermissionData;
43
+ export type CustomViewData = {
44
+ id: string;
45
+ defaultLabel: string;
46
+ labelAllLocales: LocalizedFieldData[];
47
+ description?: string;
48
+ url: string;
49
+ permissions: CustomViewPermissionData[];
50
+ locators: string[];
51
+ type: TCustomView['type'];
52
+ typeSettings?: TCustomView['typeSettings'];
53
+ };
37
54
  export type ApplicationRuntimeConfig<AdditionalEnvironmentProperties extends {} = {}> = {
38
- data: CustomApplicationData;
55
+ data: CustomApplicationData | CustomViewData;
39
56
  env: AdditionalEnvironmentProperties & ApplicationWindow['app'];
40
57
  headers: JSONSchemaForCustomApplicationConfigurationFiles['headers'];
41
58
  };
@@ -3,6 +3,7 @@
3
3
  /// <reference types="node" />
4
4
  /// <reference types="node" />
5
5
  /// <reference types="node" />
6
+ /// <reference types="node" />
6
7
  import { CLOUD_IDENTIFIERS } from './constants';
7
8
  declare const mapCloudIdentifierToApiUrl: (key: (typeof CLOUD_IDENTIFIERS)[keyof typeof CLOUD_IDENTIFIERS]) => string;
8
9
  declare const getUniqueValues: (initialValues?: string[], additionalValues?: string[]) => string[];
@@ -1,5 +1,7 @@
1
- import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schema';
2
- export declare const validateConfig: (config: JSONSchemaForCustomApplicationConfigurationFiles) => void;
1
+ import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schemas/generated/custom-application.schema';
2
+ import type { JSONSchemaForCustomViewConfigurationFiles } from './schemas/generated/custom-view.schema';
3
+ import type { LoadedConfigType } from './types';
4
+ export declare const validateConfig: (configType: LoadedConfigType, config: JSONSchemaForCustomApplicationConfigurationFiles | JSONSchemaForCustomViewConfigurationFiles) => void;
3
5
  export declare const validateEntryPointUriPath: (config: JSONSchemaForCustomApplicationConfigurationFiles) => void;
4
6
  export declare const validateSubmenuLinks: (config: JSONSchemaForCustomApplicationConfigurationFiles) => void;
5
- export declare const validateAdditionalOAuthScopes: (config: JSONSchemaForCustomApplicationConfigurationFiles) => void;
7
+ export declare const validateAdditionalOAuthScopes: (config: JSONSchemaForCustomApplicationConfigurationFiles | JSONSchemaForCustomViewConfigurationFiles) => void;
@@ -32,8 +32,8 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
32
32
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
33
33
  var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
34
34
 
35
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
35
+ function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
36
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
37
37
  /**
38
38
  * The function formats the `entryPointUriPath` to a resource access key.
39
39
  * It makes the first character of the string and the next character after a special character an uppercase.
@@ -32,8 +32,8 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
32
32
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
33
33
  var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
34
34
 
35
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
35
+ function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
36
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
37
37
  /**
38
38
  * The function formats the `entryPointUriPath` to a resource access key.
39
39
  * It makes the first character of the string and the next character after a special character an uppercase.
@@ -14,8 +14,8 @@ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
14
14
  import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
15
15
  import upperFirst from 'lodash/upperFirst';
16
16
 
17
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
17
+ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context8 = ownKeys(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context9 = ownKeys(Object(t))).call(_context9, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
19
19
  /**
20
20
  * The function formats the `entryPointUriPath` to a resource access key.
21
21
  * It makes the first character of the string and the next character after a special character an uppercase.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-config",
3
- "version": "22.7.0",
3
+ "version": "22.8.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": {
@@ -40,32 +40,35 @@
40
40
  "README.md"
41
41
  ],
42
42
  "dependencies": {
43
- "@babel/core": "^7.20.12",
44
- "@babel/register": "^7.18.9",
45
- "@babel/runtime": "^7.20.13",
46
- "@babel/runtime-corejs3": "^7.20.13",
47
- "@commercetools-frontend/babel-preset-mc-app": "22.7.0",
43
+ "@babel/core": "^7.22.17",
44
+ "@babel/register": "^7.22.15",
45
+ "@babel/runtime": "^7.22.15",
46
+ "@babel/runtime-corejs3": "^7.22.15",
47
+ "@commercetools-frontend/babel-preset-mc-app": "22.8.0",
48
+ "@commercetools-frontend/constants": "22.8.0",
48
49
  "@types/dompurify": "^2.4.0",
49
- "@types/lodash": "^4.14.191",
50
- "@types/react": "^17.0.53",
50
+ "@types/lodash": "^4.14.198",
51
+ "@types/react": "^17.0.56",
51
52
  "ajv": "8.12.0",
52
- "core-js": "^3.28.0",
53
+ "core-js": "^3.32.2",
53
54
  "cosmiconfig": "7.1.0",
54
- "dompurify": "^2.4.4",
55
- "jsdom": "^21.1.1",
55
+ "dompurify": "^2.4.7",
56
+ "jsdom": "^21.1.2",
56
57
  "lodash": "4.17.21",
57
58
  "omit-empty-es": "1.1.3"
58
59
  },
59
60
  "devDependencies": {
60
- "@types/jsdom": "^21.1.1",
61
+ "@types/jsdom": "^21.1.2",
61
62
  "json-schema-to-typescript": "13.0.1",
62
63
  "shelljs": "0.8.5",
63
- "@commercetools-frontend/assets": "22.7.0"
64
+ "@commercetools-frontend/assets": "22.8.0"
64
65
  },
65
66
  "engines": {
66
67
  "node": "16.x || >=18.0.0"
67
68
  },
68
69
  "scripts": {
69
- "build:schema": "json2ts schema.json src/schema.ts --style.singleQuote --bannerComment '/* eslint-disable prettier/prettier */\n// This file was automatically generated by json-schema-to-typescript.\n// DO NOT MODIFY IT BY HAND. Instead, modify the source schema.json file.'"
70
+ "build-schema:custom-application": "json2ts custom-application.schema.json src/schemas/generated/custom-application.schema.ts --style.singleQuote --bannerComment '/* eslint-disable prettier/prettier */ // This file was automatically generated by json-schema-to-typescript.\n// DO NOT MODIFY IT BY HAND. Instead, modify the source custom-application.schema.json file and run the build-schema:custom-application npm script.'",
71
+ "build-schema:custom-view": "json2ts custom-view.schema.json src/schemas/generated/custom-view.schema.ts --style.singleQuote --bannerComment '/* eslint-disable prettier/prettier */ // This file was automatically generated by json-schema-to-typescript.\n// DO NOT MODIFY IT BY HAND. Instead, modify the source custom-view.schema.json file and run the build-schema:custom-view npm script.'",
72
+ "build-schemas": "pnpm build-schema:custom-application && pnpm build-schema:custom-view"
70
73
  }
71
74
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var formatters = require('../../dist/formatters-c6356c75.cjs.dev.js');
5
+ var formatters = require('../../dist/formatters-1566eda7.cjs.dev.js');
6
6
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
8
8
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var formatters = require('../../dist/formatters-4f8eba33.cjs.prod.js');
5
+ var formatters = require('../../dist/formatters-108c6fda.cjs.prod.js');
6
6
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
8
8
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -1,4 +1,4 @@
1
- export { a as entryPointUriPathToPermissionKeys, e as entryPointUriPathToResourceAccesses, f as formatEntryPointUriPathToResourceAccessKey, b as formatPermissionGroupNameToResourceAccessKey } from '../../dist/formatters-3609951b.esm.js';
1
+ export { a as entryPointUriPathToPermissionKeys, e as entryPointUriPathToResourceAccesses, f as formatEntryPointUriPathToResourceAccessKey, b as formatPermissionGroupNameToResourceAccessKey } from '../../dist/formatters-ff577549.esm.js';
2
2
  import '@babel/runtime-corejs3/core-js-stable/object/keys';
3
3
  import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
4
4
  import '@babel/runtime-corejs3/core-js-stable/instance/filter';
package/schema.json DELETED
@@ -1,298 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "https://docs.commercetools.com/custom-applications/schema.json",
4
- "title": "JSON schema for Custom Application configuration files",
5
- "type": "object",
6
- "definitions": {
7
- "cspDirective": {
8
- "type": "array",
9
- "items": {
10
- "type": "string"
11
- },
12
- "uniqueItems": true
13
- }
14
- },
15
- "properties": {
16
- "name": {
17
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#name",
18
- "type": "string"
19
- },
20
- "description": {
21
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#description",
22
- "type": "string"
23
- },
24
- "entryPointUriPath": {
25
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#entrypointuripath",
26
- "type": "string"
27
- },
28
- "cloudIdentifier": {
29
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#cloudidentifier",
30
- "type": "string"
31
- },
32
- "mcApiUrl": {
33
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mcapiurl",
34
- "type": "string"
35
- },
36
- "oAuthScopes": {
37
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopes",
38
- "type": "object",
39
- "properties": {
40
- "view": {
41
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesview",
42
- "type": "array",
43
- "default": [],
44
- "items": {
45
- "type": "string",
46
- "pattern": "view_(.*)"
47
- },
48
- "uniqueItems": true
49
- },
50
- "manage": {
51
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#oauthscopesmanage",
52
- "type": "array",
53
- "default": [],
54
- "items": {
55
- "type": "string",
56
- "pattern": "manage_(.*)"
57
- },
58
- "uniqueItems": true
59
- }
60
- },
61
- "additionalProperties": false,
62
- "required": ["view", "manage"]
63
- },
64
- "additionalOAuthScopes": {
65
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionaloauthscopes",
66
- "type": "array",
67
- "default": [],
68
- "uniqueItems": true,
69
- "items": {
70
- "type": "object",
71
- "properties": {
72
- "name": {
73
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionaloauthscopesname",
74
- "type": "string"
75
- },
76
- "view": {
77
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionaloauthscopesview",
78
- "type": "array",
79
- "default": [],
80
- "items": {
81
- "type": "string",
82
- "pattern": "view_(.*)"
83
- },
84
- "uniqueItems": true
85
- },
86
- "manage": {
87
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionaloauthscopesmanage",
88
- "type": "array",
89
- "default": [],
90
- "items": {
91
- "type": "string",
92
- "pattern": "manage_(.*)"
93
- },
94
- "uniqueItems": true
95
- }
96
- },
97
- "additionalProperties": false,
98
- "required": ["name", "view", "manage"]
99
- }
100
- },
101
- "env": {
102
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#env",
103
- "type": "object",
104
- "properties": {
105
- "development": {
106
- "type": "object",
107
- "properties": {
108
- "initialProjectKey": {
109
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envdevelopmentinitialprojectkey",
110
- "type": "string"
111
- },
112
- "teamId": {
113
- "type": "string"
114
- }
115
- },
116
- "additionalProperties": false,
117
- "required": ["initialProjectKey"]
118
- },
119
- "production": {
120
- "type": "object",
121
- "properties": {
122
- "applicationId": {
123
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionapplicationid",
124
- "type": "string"
125
- },
126
- "url": {
127
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductionurl",
128
- "type": "string"
129
- },
130
- "cdnUrl": {
131
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#envproductioncdnurl",
132
- "type": "string"
133
- }
134
- },
135
- "additionalProperties": false,
136
- "required": ["applicationId", "url"]
137
- }
138
- },
139
- "additionalProperties": false,
140
- "required": ["development", "production"]
141
- },
142
- "additionalEnv": {
143
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#additionalenv",
144
- "type": "object"
145
- },
146
- "headers": {
147
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headers",
148
- "type": "object",
149
- "properties": {
150
- "csp": {
151
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerscsp",
152
- "type": "object",
153
- "properties": {
154
- "connect-src": {
155
- "$ref": "#/definitions/cspDirective"
156
- },
157
- "font-src": {
158
- "$ref": "#/definitions/cspDirective"
159
- },
160
- "img-src": {
161
- "$ref": "#/definitions/cspDirective"
162
- },
163
- "script-src": {
164
- "$ref": "#/definitions/cspDirective"
165
- },
166
- "style-src": {
167
- "$ref": "#/definitions/cspDirective"
168
- },
169
- "frame-src": {
170
- "$ref": "#/definitions/cspDirective"
171
- }
172
- },
173
- "additionalProperties": false,
174
- "required": ["connect-src"]
175
- },
176
- "permissionsPolicies": {
177
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headerspermissionspolicies",
178
- "type": "object"
179
- },
180
- "strictTransportSecurity": {
181
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#headersstricttransportsecurity",
182
- "type": "array",
183
- "items": {
184
- "enum": ["includeSubDomains", "preload"]
185
- },
186
- "uniqueItems": true
187
- }
188
- },
189
- "additionalProperties": false
190
- },
191
- "icon": {
192
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#icon",
193
- "type": "string"
194
- },
195
- "mainMenuLink": {
196
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulink",
197
- "type": "object",
198
- "properties": {
199
- "defaultLabel": {
200
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkdefaultlabel",
201
- "type": "string"
202
- },
203
- "labelAllLocales": {
204
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinklabelalllocales",
205
- "type": "array",
206
- "default": [],
207
- "items": {
208
- "type": "object",
209
- "properties": {
210
- "locale": {
211
- "type": "string",
212
- "enum": ["en", "de", "es", "fr-FR", "pt-BR", "zh-CN"]
213
- },
214
- "value": {
215
- "type": "string"
216
- }
217
- },
218
- "additionalProperties": false,
219
- "required": ["locale", "value"]
220
- }
221
- },
222
- "permissions": {
223
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#mainmenulinkpermissions",
224
- "type": "array",
225
- "default": [],
226
- "items": {
227
- "type": "string"
228
- }
229
- }
230
- },
231
- "additionalProperties": true,
232
- "required": ["defaultLabel", "labelAllLocales", "permissions"]
233
- },
234
- "submenuLinks": {
235
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinks",
236
- "default": [],
237
- "type": "array",
238
- "items": {
239
- "type": "object",
240
- "properties": {
241
- "uriPath": {
242
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksuripath",
243
- "type": "string"
244
- },
245
- "defaultLabel": {
246
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinksdefaultlabel",
247
- "type": "string"
248
- },
249
- "labelAllLocales": {
250
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkslabelalllocales",
251
- "type": "array",
252
- "default": [],
253
- "items": {
254
- "type": "object",
255
- "properties": {
256
- "locale": {
257
- "type": "string",
258
- "enum": ["en", "de", "es", "fr-FR", "pt-BR", "zh-CN"]
259
- },
260
- "value": {
261
- "type": "string"
262
- }
263
- },
264
- "additionalProperties": false,
265
- "required": ["locale", "value"]
266
- }
267
- },
268
- "permissions": {
269
- "description": "See https://docs.commercetools.com/custom-applications/api-reference/application-config#submenulinkspermissions",
270
- "type": "array",
271
- "default": [],
272
- "items": {
273
- "type": "string"
274
- }
275
- }
276
- },
277
- "additionalProperties": true,
278
- "required": [
279
- "uriPath",
280
- "defaultLabel",
281
- "labelAllLocales",
282
- "permissions"
283
- ]
284
- }
285
- }
286
- },
287
- "additionalProperties": true,
288
- "required": [
289
- "name",
290
- "entryPointUriPath",
291
- "cloudIdentifier",
292
- "env",
293
- "oAuthScopes",
294
- "icon",
295
- "mainMenuLink",
296
- "submenuLinks"
297
- ]
298
- }