@commercetools-frontend/application-config 22.15.1 → 22.17.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.
@@ -0,0 +1,298 @@
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
+ }
@@ -0,0 +1,245 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "https://docs.commercetools.com/custom-applications/custom-view.schema.json",
4
+ "title": "JSON schema for Custom View 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/TODO",
18
+ "type": "string"
19
+ },
20
+ "description": {
21
+ "description": "See https://docs.commercetools.com/TODO",
22
+ "type": "string"
23
+ },
24
+ "cloudIdentifier": {
25
+ "description": "See https://docs.commercetools.com/TODO",
26
+ "type": "string"
27
+ },
28
+ "mcApiUrl": {
29
+ "description": "See https://docs.commercetools.com/TODO",
30
+ "type": "string"
31
+ },
32
+ "oAuthScopes": {
33
+ "description": "See https://docs.commercetools.com/TODO",
34
+ "type": "object",
35
+ "properties": {
36
+ "view": {
37
+ "description": "See https://docs.commercetools.com/TODO",
38
+ "type": "array",
39
+ "default": [],
40
+ "items": {
41
+ "type": "string",
42
+ "pattern": "view_(.*)"
43
+ },
44
+ "uniqueItems": true
45
+ },
46
+ "manage": {
47
+ "description": "See https://docs.commercetools.com/TODO",
48
+ "type": "array",
49
+ "default": [],
50
+ "items": {
51
+ "type": "string",
52
+ "pattern": "manage_(.*)"
53
+ },
54
+ "uniqueItems": true
55
+ }
56
+ },
57
+ "additionalProperties": false,
58
+ "required": ["view", "manage"]
59
+ },
60
+ "additionalOAuthScopes": {
61
+ "description": "See https://docs.commercetools.com/TODO",
62
+ "type": "array",
63
+ "default": [],
64
+ "uniqueItems": true,
65
+ "items": {
66
+ "type": "object",
67
+ "properties": {
68
+ "name": {
69
+ "description": "See https://docs.commercetools.com/TODO",
70
+ "type": "string"
71
+ },
72
+ "view": {
73
+ "description": "See https://docs.commercetools.com/TODO",
74
+ "type": "array",
75
+ "default": [],
76
+ "items": {
77
+ "type": "string",
78
+ "pattern": "view_(.*)"
79
+ },
80
+ "uniqueItems": true
81
+ },
82
+ "manage": {
83
+ "description": "See https://docs.commercetools.com/TODO",
84
+ "type": "array",
85
+ "default": [],
86
+ "items": {
87
+ "type": "string",
88
+ "pattern": "manage_(.*)"
89
+ },
90
+ "uniqueItems": true
91
+ }
92
+ },
93
+ "additionalProperties": false,
94
+ "required": ["name", "view", "manage"]
95
+ }
96
+ },
97
+ "env": {
98
+ "description": "See https://docs.commercetools.com/TODO",
99
+ "type": "object",
100
+ "properties": {
101
+ "development": {
102
+ "type": "object",
103
+ "properties": {
104
+ "initialProjectKey": {
105
+ "description": "See https://docs.commercetools.com/TODO",
106
+ "type": "string"
107
+ },
108
+ "teamId": {
109
+ "type": "string"
110
+ },
111
+ "hostUriPath": {
112
+ "description": "See https://docs.commercetools.com/TODO",
113
+ "type": "string"
114
+ }
115
+ },
116
+ "additionalProperties": false,
117
+ "required": ["initialProjectKey"]
118
+ },
119
+ "production": {
120
+ "type": "object",
121
+ "properties": {
122
+ "customViewId": {
123
+ "description": "See https://docs.commercetools.com/TODO",
124
+ "type": "string"
125
+ },
126
+ "url": {
127
+ "description": "See https://docs.commercetools.com/TODO",
128
+ "type": "string"
129
+ },
130
+ "cdnUrl": {
131
+ "description": "See https://docs.commercetools.com/TODO",
132
+ "type": "string"
133
+ }
134
+ },
135
+ "additionalProperties": false,
136
+ "required": ["customViewId", "url"]
137
+ }
138
+ },
139
+ "additionalProperties": false,
140
+ "required": ["development", "production"]
141
+ },
142
+ "additionalEnv": {
143
+ "description": "See https://docs.commercetools.com/TODO",
144
+ "type": "object"
145
+ },
146
+ "headers": {
147
+ "description": "See https://docs.commercetools.com/TODO",
148
+ "type": "object",
149
+ "properties": {
150
+ "csp": {
151
+ "description": "See https://docs.commercetools.com/TODO",
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/TODO",
178
+ "type": "object"
179
+ },
180
+ "strictTransportSecurity": {
181
+ "description": "See https://docs.commercetools.com/TODO",
182
+ "type": "array",
183
+ "items": {
184
+ "enum": ["includeSubDomains", "preload"]
185
+ },
186
+ "uniqueItems": true
187
+ }
188
+ },
189
+ "additionalProperties": false
190
+ },
191
+ "labelAllLocales": {
192
+ "description": "See https://docs.commercetools.com/TODO",
193
+ "type": "array",
194
+ "default": [],
195
+ "items": {
196
+ "type": "object",
197
+ "properties": {
198
+ "locale": {
199
+ "type": "string",
200
+ "enum": ["en", "de", "es", "fr-FR", "pt-BR", "zh-CN"]
201
+ },
202
+ "value": {
203
+ "type": "string"
204
+ }
205
+ },
206
+ "additionalProperties": false,
207
+ "required": ["locale", "value"]
208
+ }
209
+ },
210
+ "type": {
211
+ "description": "See https://docs.commercetools.com/TODO",
212
+ "type": "string",
213
+ "enum": ["CustomPanel"]
214
+ },
215
+ "typeSettings": {
216
+ "description": "See https://docs.commercetools.com/TODO",
217
+ "type": "object",
218
+ "properties": {
219
+ "size": {
220
+ "description": "See https://docs.commercetools.com/TODO",
221
+ "type": "string",
222
+ "enum": ["SMALL", "LARGE"]
223
+ }
224
+ }
225
+ },
226
+ "locators": {
227
+ "description": "See https://docs.commercetools.com/TODO",
228
+ "type": "array",
229
+ "default": [],
230
+ "items": {
231
+ "type": "string"
232
+ }
233
+ }
234
+ },
235
+ "additionalProperties": true,
236
+ "required": [
237
+ "name",
238
+ "cloudIdentifier",
239
+ "env",
240
+ "oAuthScopes",
241
+ "labelAllLocales",
242
+ "type",
243
+ "locators"
244
+ ]
245
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-config",
3
- "version": "22.15.1",
3
+ "version": "22.17.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": {
@@ -33,7 +33,8 @@
33
33
  "scripts",
34
34
  "ssr",
35
35
  "client.d.ts",
36
- "schema.json",
36
+ "custom-application.schema.json",
37
+ "custom-view.schema.json",
37
38
  "tsconfig-mc-app.json",
38
39
  "package.json",
39
40
  "LICENSE",
@@ -44,8 +45,8 @@
44
45
  "@babel/register": "^7.22.15",
45
46
  "@babel/runtime": "^7.22.15",
46
47
  "@babel/runtime-corejs3": "^7.22.15",
47
- "@commercetools-frontend/babel-preset-mc-app": "22.15.1",
48
- "@commercetools-frontend/constants": "22.15.1",
48
+ "@commercetools-frontend/babel-preset-mc-app": "22.17.0",
49
+ "@commercetools-frontend/constants": "22.17.0",
49
50
  "@types/dompurify": "^2.4.0",
50
51
  "@types/lodash": "^4.14.198",
51
52
  "@types/react": "^17.0.56",
@@ -61,7 +62,7 @@
61
62
  "@types/jsdom": "^21.1.2",
62
63
  "json-schema-to-typescript": "13.0.1",
63
64
  "shelljs": "0.8.5",
64
- "@commercetools-frontend/assets": "22.15.1"
65
+ "@commercetools-frontend/assets": "22.17.0"
65
66
  },
66
67
  "engines": {
67
68
  "node": "16.x || >=18.0.0"