@commercetools-frontend/application-config 0.0.0-CRAFT-1791-20251006162610
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/LICENSE +21 -0
- package/README.md +7 -0
- package/client.d.ts +26 -0
- package/custom-application.schema.json +301 -0
- package/custom-view.schema.json +248 -0
- package/dist/commercetools-frontend-application-config.cjs.d.ts +2 -0
- package/dist/commercetools-frontend-application-config.cjs.dev.js +1351 -0
- package/dist/commercetools-frontend-application-config.cjs.js +7 -0
- package/dist/commercetools-frontend-application-config.cjs.prod.js +1351 -0
- package/dist/commercetools-frontend-application-config.esm.js +1303 -0
- package/dist/declarations/src/constants.d.ts +34 -0
- package/dist/declarations/src/errors.d.ts +4 -0
- package/dist/declarations/src/formatters.d.ts +33 -0
- package/dist/declarations/src/index.d.ts +7 -0
- package/dist/declarations/src/load-config.d.ts +11 -0
- package/dist/declarations/src/process-config.d.ts +6 -0
- package/dist/declarations/src/sanitize-svg.d.ts +1 -0
- package/dist/declarations/src/schemas/generated/custom-application.schema.d.ts +164 -0
- package/dist/declarations/src/schemas/generated/custom-view.schema.d.ts +139 -0
- package/dist/declarations/src/ssr.d.ts +1 -0
- package/dist/declarations/src/types/generated/settings.d.ts +1653 -0
- package/dist/declarations/src/types.d.ts +108 -0
- package/dist/formatters-7f327585.cjs.prod.js +123 -0
- package/dist/formatters-882eafa8.esm.js +101 -0
- package/dist/formatters-a76b45b9.cjs.dev.js +123 -0
- package/package.json +73 -0
- package/ssr/dist/commercetools-frontend-application-config-ssr.cjs.d.ts +2 -0
- package/ssr/dist/commercetools-frontend-application-config-ssr.cjs.dev.js +29 -0
- package/ssr/dist/commercetools-frontend-application-config-ssr.cjs.js +7 -0
- package/ssr/dist/commercetools-frontend-application-config-ssr.cjs.prod.js +29 -0
- package/ssr/dist/commercetools-frontend-application-config-ssr.esm.js +16 -0
- package/ssr/package.json +4 -0
- package/tsconfig-mc-app.json +29 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) commercetools GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @commercetools-frontend/application-config
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
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
|
+
</p>
|
|
6
|
+
|
|
7
|
+
Check out the documentation for [configuring a Custom Application](https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config) and for [configuring a Custom View](https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-view-config).
|
package/client.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type CSSModuleClasses = { readonly [key: string]: string };
|
|
2
|
+
|
|
3
|
+
declare module '*.mod.css' {
|
|
4
|
+
const classes: CSSModuleClasses;
|
|
5
|
+
export default classes;
|
|
6
|
+
}
|
|
7
|
+
declare module '*.module.css' {
|
|
8
|
+
const classes: CSSModuleClasses;
|
|
9
|
+
export default classes;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.png' {
|
|
13
|
+
const src: string;
|
|
14
|
+
export default src;
|
|
15
|
+
}
|
|
16
|
+
declare module '*.react.svg' {
|
|
17
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
18
|
+
const ReactComponent: FunctionComponent<
|
|
19
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
20
|
+
>;
|
|
21
|
+
export default ReactComponent;
|
|
22
|
+
}
|
|
23
|
+
declare module '*.svg' {
|
|
24
|
+
const src: string;
|
|
25
|
+
export default src;
|
|
26
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "https://docs.commercetools.com/merchant-center-customizations/custom-application.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/merchant-center-customizations/tooling-and-configuration/custom-application-config#name",
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"description": {
|
|
21
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#description",
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"entryPointUriPath": {
|
|
25
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#entrypointuripath",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"cloudIdentifier": {
|
|
29
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#cloudidentifier",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"mcApiUrl": {
|
|
33
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#mcapiurl",
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"oAuthScopes": {
|
|
37
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#oauthscopes",
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"view": {
|
|
41
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-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/merchant-center-customizations/tooling-and-configuration/custom-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/merchant-center-customizations/tooling-and-configuration/custom-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/merchant-center-customizations/tooling-and-configuration/custom-application-config#additionaloauthscopesname",
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"view": {
|
|
77
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-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/merchant-center-customizations/tooling-and-configuration/custom-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/merchant-center-customizations/tooling-and-configuration/custom-application-config#env",
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"development": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"initialProjectKey": {
|
|
109
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-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/merchant-center-customizations/tooling-and-configuration/custom-application-config#envproductionapplicationid",
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"url": {
|
|
127
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#envproductionurl",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"cdnUrl": {
|
|
131
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-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/merchant-center-customizations/tooling-and-configuration/custom-application-config#additionalenv",
|
|
144
|
+
"type": "object"
|
|
145
|
+
},
|
|
146
|
+
"headers": {
|
|
147
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#headers",
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"csp": {
|
|
151
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-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
|
+
"media-src": {
|
|
173
|
+
"$ref": "#/definitions/cspDirective"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": ["connect-src"]
|
|
178
|
+
},
|
|
179
|
+
"permissionsPolicies": {
|
|
180
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#headerspermissionspolicies",
|
|
181
|
+
"type": "object"
|
|
182
|
+
},
|
|
183
|
+
"strictTransportSecurity": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"items": {
|
|
186
|
+
"enum": ["includeSubDomains", "preload"]
|
|
187
|
+
},
|
|
188
|
+
"uniqueItems": true,
|
|
189
|
+
"deprecated": true
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
},
|
|
194
|
+
"icon": {
|
|
195
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#icon",
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
"mainMenuLink": {
|
|
199
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#mainmenulink",
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"defaultLabel": {
|
|
203
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#mainmenulinkdefaultlabel",
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
"labelAllLocales": {
|
|
207
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#mainmenulinklabelalllocales",
|
|
208
|
+
"type": "array",
|
|
209
|
+
"default": [],
|
|
210
|
+
"items": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"properties": {
|
|
213
|
+
"locale": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"enum": ["en", "de", "es", "fr-FR", "pt-BR"]
|
|
216
|
+
},
|
|
217
|
+
"value": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"additionalProperties": false,
|
|
222
|
+
"required": ["locale", "value"]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"permissions": {
|
|
226
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#mainmenulinkpermissions",
|
|
227
|
+
"type": "array",
|
|
228
|
+
"default": [],
|
|
229
|
+
"items": {
|
|
230
|
+
"type": "string"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"additionalProperties": true,
|
|
235
|
+
"required": ["defaultLabel", "labelAllLocales", "permissions"]
|
|
236
|
+
},
|
|
237
|
+
"submenuLinks": {
|
|
238
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#submenulinks",
|
|
239
|
+
"default": [],
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"uriPath": {
|
|
245
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#submenulinksuripath",
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"defaultLabel": {
|
|
249
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#submenulinksdefaultlabel",
|
|
250
|
+
"type": "string"
|
|
251
|
+
},
|
|
252
|
+
"labelAllLocales": {
|
|
253
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#submenulinkslabelalllocales",
|
|
254
|
+
"type": "array",
|
|
255
|
+
"default": [],
|
|
256
|
+
"items": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"properties": {
|
|
259
|
+
"locale": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"enum": ["en", "de", "es", "fr-FR", "pt-BR"]
|
|
262
|
+
},
|
|
263
|
+
"value": {
|
|
264
|
+
"type": "string"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"required": ["locale", "value"]
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"permissions": {
|
|
272
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config#submenulinkspermissions",
|
|
273
|
+
"type": "array",
|
|
274
|
+
"default": [],
|
|
275
|
+
"items": {
|
|
276
|
+
"type": "string"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"additionalProperties": true,
|
|
281
|
+
"required": [
|
|
282
|
+
"uriPath",
|
|
283
|
+
"defaultLabel",
|
|
284
|
+
"labelAllLocales",
|
|
285
|
+
"permissions"
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"additionalProperties": true,
|
|
291
|
+
"required": [
|
|
292
|
+
"name",
|
|
293
|
+
"entryPointUriPath",
|
|
294
|
+
"cloudIdentifier",
|
|
295
|
+
"env",
|
|
296
|
+
"oAuthScopes",
|
|
297
|
+
"icon",
|
|
298
|
+
"mainMenuLink",
|
|
299
|
+
"submenuLinks"
|
|
300
|
+
]
|
|
301
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "https://docs.commercetools.com/merchant-center-customizations/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/merchant-center-customizations/tooling-and-configuration/custom-view-config#name",
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"description": {
|
|
21
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#description",
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"cloudIdentifier": {
|
|
25
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#cloudidentifier",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"mcApiUrl": {
|
|
29
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#mcapiurl",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"oAuthScopes": {
|
|
33
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#oauthscopes",
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"view": {
|
|
37
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#oauthscopesview",
|
|
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/merchant-center-customizations/tooling-and-configuration/custom-view-config#oauthscopesmanage",
|
|
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/merchant-center-customizations/tooling-and-configuration/custom-view-config#additionaloauthscopes",
|
|
62
|
+
"type": "array",
|
|
63
|
+
"default": [],
|
|
64
|
+
"uniqueItems": true,
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"name": {
|
|
69
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#additionaloauthscopesname",
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"view": {
|
|
73
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#additionaloauthscopesview",
|
|
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/merchant-center-customizations/tooling-and-configuration/custom-view-config#additionaloauthscopesmanage",
|
|
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/merchant-center-customizations/tooling-and-configuration/custom-view-config#env",
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"development": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"properties": {
|
|
104
|
+
"initialProjectKey": {
|
|
105
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#envdevelopmentinitialprojectkey",
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"teamId": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"hostUriPath": {
|
|
112
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#envdevelopmenthosturipath",
|
|
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/merchant-center-customizations/tooling-and-configuration/custom-view-config#envproductioncustomviewid",
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"url": {
|
|
127
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#envproductionurl",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"cdnUrl": {
|
|
131
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#envproductioncdnurl",
|
|
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/merchant-center-customizations/tooling-and-configuration/custom-view-config#additionalenv",
|
|
144
|
+
"type": "object"
|
|
145
|
+
},
|
|
146
|
+
"headers": {
|
|
147
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#headers",
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"csp": {
|
|
151
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-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
|
+
"media-src": {
|
|
173
|
+
"$ref": "#/definitions/cspDirective"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": ["connect-src"]
|
|
178
|
+
},
|
|
179
|
+
"permissionsPolicies": {
|
|
180
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#headerspermissionspolicies",
|
|
181
|
+
"type": "object"
|
|
182
|
+
},
|
|
183
|
+
"strictTransportSecurity": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"items": {
|
|
186
|
+
"enum": ["includeSubDomains", "preload"]
|
|
187
|
+
},
|
|
188
|
+
"uniqueItems": true,
|
|
189
|
+
"deprecated": true
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
},
|
|
194
|
+
"labelAllLocales": {
|
|
195
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#labelalllocales",
|
|
196
|
+
"type": "array",
|
|
197
|
+
"default": [],
|
|
198
|
+
"items": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"properties": {
|
|
201
|
+
"locale": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"enum": ["en", "de", "es", "fr-FR", "pt-BR"]
|
|
204
|
+
},
|
|
205
|
+
"value": {
|
|
206
|
+
"type": "string"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"additionalProperties": false,
|
|
210
|
+
"required": ["locale", "value"]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"type": {
|
|
214
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#type",
|
|
215
|
+
"type": "string",
|
|
216
|
+
"enum": ["CustomPanel"]
|
|
217
|
+
},
|
|
218
|
+
"typeSettings": {
|
|
219
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#typesettings",
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"size": {
|
|
223
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#typesettingssize",
|
|
224
|
+
"type": "string",
|
|
225
|
+
"enum": ["SMALL", "LARGE"]
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"locators": {
|
|
230
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config#locators",
|
|
231
|
+
"type": "array",
|
|
232
|
+
"default": [],
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"additionalProperties": true,
|
|
239
|
+
"required": [
|
|
240
|
+
"name",
|
|
241
|
+
"cloudIdentifier",
|
|
242
|
+
"env",
|
|
243
|
+
"oAuthScopes",
|
|
244
|
+
"labelAllLocales",
|
|
245
|
+
"type",
|
|
246
|
+
"locators"
|
|
247
|
+
]
|
|
248
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1hcHBsaWNhdGlvbi1jb25maWcuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|