@kumwe/studio-protocol 0.1.0-alpha.10

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.
Files changed (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +77 -0
  3. package/THIRD_PARTY_NOTICES.md +9 -0
  4. package/dist/generated/schema-models.d.ts +1968 -0
  5. package/dist/generated/schema-models.d.ts.map +1 -0
  6. package/dist/generated/schema-models.js +76 -0
  7. package/dist/generated/schema-models.js.map +1 -0
  8. package/dist/guards.d.ts +7 -0
  9. package/dist/guards.d.ts.map +1 -0
  10. package/dist/guards.js +374 -0
  11. package/dist/guards.js.map +1 -0
  12. package/dist/host-failure.d.ts +16 -0
  13. package/dist/host-failure.d.ts.map +1 -0
  14. package/dist/host-failure.js +27 -0
  15. package/dist/host-failure.js.map +1 -0
  16. package/dist/index.d.ts +7 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +6 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/schemas.d.ts +50 -0
  21. package/dist/schemas.d.ts.map +1 -0
  22. package/dist/schemas.js +144 -0
  23. package/dist/schemas.js.map +1 -0
  24. package/dist/types.d.ts +1256 -0
  25. package/dist/types.d.ts.map +1 -0
  26. package/dist/types.js +8 -0
  27. package/dist/types.js.map +1 -0
  28. package/package.json +42 -0
  29. package/schemas/authoring-message-catalog.schema.json +45 -0
  30. package/schemas/authoring-web-vector.schema.json +236 -0
  31. package/schemas/binding-projection-vector.schema.json +127 -0
  32. package/schemas/block-definition.schema.json +227 -0
  33. package/schemas/blueprint.schema.json +273 -0
  34. package/schemas/canonical-vector.schema.json +65 -0
  35. package/schemas/command-vector.schema.json +68 -0
  36. package/schemas/command.schema.json +410 -0
  37. package/schemas/common.schema.json +222 -0
  38. package/schemas/content-model.schema.json +216 -0
  39. package/schemas/corpus-manifest.schema.json +48 -0
  40. package/schemas/design-vocabulary.schema.json +91 -0
  41. package/schemas/entry.schema.json +32 -0
  42. package/schemas/field-adapter.schema.json +51 -0
  43. package/schemas/host-capabilities.schema.json +65 -0
  44. package/schemas/host-error.schema.json +42 -0
  45. package/schemas/host-operations.schema.json +162 -0
  46. package/schemas/host-request.schema.json +71 -0
  47. package/schemas/host-result.schema.json +19 -0
  48. package/schemas/host-sequence-vector.schema.json +342 -0
  49. package/schemas/host-vector.schema.json +199 -0
  50. package/schemas/inspector.schema.json +44 -0
  51. package/schemas/manifest.json +246 -0
  52. package/schemas/media-asset.schema.json +83 -0
  53. package/schemas/media-reference.schema.json +112 -0
  54. package/schemas/media-upload-grant.schema.json +48 -0
  55. package/schemas/media-upload-session.schema.json +109 -0
  56. package/schemas/media-vector.schema.json +123 -0
  57. package/schemas/migration.schema.json +41 -0
  58. package/schemas/pattern.schema.json +50 -0
  59. package/schemas/plugin-manifest.schema.json +126 -0
  60. package/schemas/preview-message.schema.json +583 -0
  61. package/schemas/preview-vector.schema.json +52 -0
  62. package/schemas/provenance.schema.json +57 -0
  63. package/schemas/renderer-web-vector.schema.json +160 -0
  64. package/schemas/rich-text-projection.schema.json +79 -0
  65. package/schemas/rich-text.schema.json +323 -0
  66. package/schemas/schema-profile-vector.schema.json +133 -0
  67. package/schemas/schema-profile.schema.json +201 -0
  68. package/schemas/studio-chart.schema.json +35 -0
  69. package/schemas/studio-config.schema.json +244 -0
  70. package/schemas/studio-drawing.schema.json +44 -0
  71. package/schemas/studio-money.schema.json +16 -0
  72. package/schemas/studio-presentation.schema.json +31 -0
  73. package/schemas/studio-release.schema.json +81 -0
  74. package/schemas/studio-table.schema.json +27 -0
  75. package/schemas/theme.schema.json +164 -0
  76. package/schemas/unresolved-contribution.schema.json +50 -0
  77. package/studio-release.json +18 -0
@@ -0,0 +1,410 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/command.schema.json",
4
+ "title": "Studio command",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "contractVersion",
9
+ "kind",
10
+ "id",
11
+ "type",
12
+ "artifactId",
13
+ "sessionGeneration",
14
+ "baseStateVersion",
15
+ "payload"
16
+ ],
17
+ "properties": {
18
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
19
+ "kind": { "const": "command" },
20
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
21
+ "type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
22
+ "artifactId": { "$ref": "common.schema.json#/$defs/stableId" },
23
+ "expectedRevision": { "$ref": "common.schema.json#/$defs/revision" },
24
+ "sessionGeneration": { "$ref": "common.schema.json#/$defs/revision" },
25
+ "baseStateVersion": { "type": "integer", "minimum": 0 },
26
+ "groupId": { "$ref": "common.schema.json#/$defs/stableId" },
27
+ "payload": {
28
+ "type": "object",
29
+ "maxProperties": 1000,
30
+ "propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
31
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
32
+ }
33
+ },
34
+ "allOf": [
35
+ {
36
+ "if": { "properties": { "type": { "const": "studio.command/insert-node" } } },
37
+ "then": { "properties": { "payload": { "$ref": "#/$defs/insertNode" } } }
38
+ },
39
+ {
40
+ "if": { "properties": { "type": { "const": "studio.command/remove-node" } } },
41
+ "then": { "properties": { "payload": { "$ref": "#/$defs/removeNode" } } }
42
+ },
43
+ {
44
+ "if": { "properties": { "type": { "const": "studio.command/restore-node" } } },
45
+ "then": { "properties": { "payload": { "$ref": "#/$defs/restoreNode" } } }
46
+ },
47
+ {
48
+ "if": { "properties": { "type": { "const": "studio.command/move-node" } } },
49
+ "then": { "properties": { "payload": { "$ref": "#/$defs/moveNode" } } }
50
+ },
51
+ {
52
+ "if": { "properties": { "type": { "const": "studio.command/duplicate-node" } } },
53
+ "then": { "properties": { "payload": { "$ref": "#/$defs/duplicateNode" } } }
54
+ },
55
+ {
56
+ "if": { "properties": { "type": { "const": "studio.command/reorder-children" } } },
57
+ "then": { "properties": { "payload": { "$ref": "#/$defs/reorderChildren" } } }
58
+ },
59
+ {
60
+ "if": { "properties": { "type": { "const": "studio.command/set-property" } } },
61
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setProperty" } } }
62
+ },
63
+ {
64
+ "if": { "properties": { "type": { "const": "studio.command/unset-property" } } },
65
+ "then": { "properties": { "payload": { "$ref": "#/$defs/unsetProperty" } } }
66
+ },
67
+ {
68
+ "if": { "properties": { "type": { "const": "studio.command/reset-inherited-property" } } },
69
+ "then": { "properties": { "payload": { "$ref": "#/$defs/resetInheritedProperty" } } }
70
+ },
71
+ {
72
+ "if": { "properties": { "type": { "const": "studio.command/set-size-role" } } },
73
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setSizeRole" } } }
74
+ },
75
+ {
76
+ "if": { "properties": { "type": { "const": "studio.command/unset-size-role" } } },
77
+ "then": { "properties": { "payload": { "$ref": "#/$defs/unsetSizeRole" } } }
78
+ },
79
+ {
80
+ "if": { "properties": { "type": { "const": "studio.command/set-binding" } } },
81
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setBinding" } } }
82
+ },
83
+ {
84
+ "if": { "properties": { "type": { "const": "studio.command/remove-binding" } } },
85
+ "then": { "properties": { "payload": { "$ref": "#/$defs/removeBinding" } } }
86
+ },
87
+ {
88
+ "if": { "properties": { "type": { "const": "studio.command/set-field-value" } } },
89
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setFieldValue" } } }
90
+ },
91
+ {
92
+ "if": { "properties": { "type": { "const": "studio.command/apply-pattern" } } },
93
+ "then": { "properties": { "payload": { "$ref": "#/$defs/applyPattern" } } }
94
+ },
95
+ {
96
+ "if": { "properties": { "type": { "const": "studio.command/add-model-field" } } },
97
+ "then": { "properties": { "payload": { "$ref": "#/$defs/addModelField" } } }
98
+ },
99
+ {
100
+ "if": { "properties": { "type": { "const": "studio.command/batch" } } },
101
+ "then": { "properties": { "payload": { "$ref": "#/$defs/batch" } } }
102
+ }
103
+ ],
104
+ "$defs": {
105
+ "destination": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": ["position"],
109
+ "properties": {
110
+ "parentNodeId": { "$ref": "common.schema.json#/$defs/stableId" },
111
+ "slot": { "$ref": "common.schema.json#/$defs/localName" },
112
+ "position": { "type": "integer", "minimum": 0, "maximum": 100000 }
113
+ },
114
+ "dependentRequired": {
115
+ "parentNodeId": ["slot"],
116
+ "slot": ["parentNodeId"]
117
+ }
118
+ },
119
+ "insertNode": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": ["node", "destination"],
123
+ "properties": {
124
+ "node": { "$ref": "blueprint.schema.json#/$defs/node" },
125
+ "destination": { "$ref": "#/$defs/destination" }
126
+ }
127
+ },
128
+ "removeNode": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": ["nodeId"],
132
+ "properties": {
133
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" }
134
+ }
135
+ },
136
+ "restoreNode": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["node", "destination"],
140
+ "properties": {
141
+ "node": { "$ref": "blueprint.schema.json#/$defs/node" },
142
+ "destination": { "$ref": "#/$defs/destination" }
143
+ }
144
+ },
145
+ "moveNode": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": ["nodeId", "destination"],
149
+ "properties": {
150
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
151
+ "destination": { "$ref": "#/$defs/destination" }
152
+ }
153
+ },
154
+ "duplicateNode": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": ["nodeId", "idMap"],
158
+ "properties": {
159
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
160
+ "destination": { "$ref": "#/$defs/destination" },
161
+ "idMap": {
162
+ "type": "object",
163
+ "minProperties": 1,
164
+ "maxProperties": 5000,
165
+ "propertyNames": { "$ref": "common.schema.json#/$defs/stableId" },
166
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/stableId" }
167
+ }
168
+ }
169
+ },
170
+ "reorderChildren": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": ["order"],
174
+ "properties": {
175
+ "parentNodeId": { "$ref": "common.schema.json#/$defs/stableId" },
176
+ "slot": { "$ref": "common.schema.json#/$defs/localName" },
177
+ "order": {
178
+ "type": "array",
179
+ "minItems": 1,
180
+ "maxItems": 10000,
181
+ "uniqueItems": true,
182
+ "items": { "$ref": "common.schema.json#/$defs/stableId" }
183
+ }
184
+ },
185
+ "dependentRequired": {
186
+ "parentNodeId": ["slot"],
187
+ "slot": ["parentNodeId"]
188
+ }
189
+ },
190
+ "setProperty": {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": ["nodeId", "property", "value"],
194
+ "properties": {
195
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
196
+ "property": { "$ref": "common.schema.json#/$defs/localName" },
197
+ "viewport": { "$ref": "common.schema.json#/$defs/localName" },
198
+ "value": { "$ref": "common.schema.json#/$defs/jsonValue" }
199
+ }
200
+ },
201
+ "unsetProperty": {
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "required": ["nodeId", "property"],
205
+ "properties": {
206
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
207
+ "property": { "$ref": "common.schema.json#/$defs/localName" },
208
+ "viewport": { "$ref": "common.schema.json#/$defs/localName" }
209
+ }
210
+ },
211
+ "resetInheritedProperty": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": ["nodeId", "property"],
215
+ "properties": {
216
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
217
+ "property": { "$ref": "common.schema.json#/$defs/localName" }
218
+ }
219
+ },
220
+ "setSizeRole": {
221
+ "type": "object",
222
+ "additionalProperties": false,
223
+ "required": ["nodeId", "axis", "role"],
224
+ "properties": {
225
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
226
+ "axis": { "$ref": "blueprint.schema.json#/$defs/sizeRoleAxis" },
227
+ "role": { "$ref": "common.schema.json#/$defs/localName" },
228
+ "viewport": { "$ref": "common.schema.json#/$defs/localName" }
229
+ }
230
+ },
231
+ "unsetSizeRole": {
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": ["nodeId", "axis"],
235
+ "properties": {
236
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
237
+ "axis": { "$ref": "blueprint.schema.json#/$defs/sizeRoleAxis" },
238
+ "viewport": { "$ref": "common.schema.json#/$defs/localName" }
239
+ }
240
+ },
241
+ "setBinding": {
242
+ "type": "object",
243
+ "additionalProperties": false,
244
+ "required": ["nodeId", "port", "binding"],
245
+ "properties": {
246
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
247
+ "port": { "$ref": "common.schema.json#/$defs/localName" },
248
+ "binding": { "$ref": "blueprint.schema.json#/$defs/binding" }
249
+ }
250
+ },
251
+ "removeBinding": {
252
+ "type": "object",
253
+ "additionalProperties": false,
254
+ "required": ["nodeId", "port"],
255
+ "properties": {
256
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
257
+ "port": { "$ref": "common.schema.json#/$defs/localName" }
258
+ }
259
+ },
260
+ "setFieldValue": {
261
+ "type": "object",
262
+ "additionalProperties": false,
263
+ "required": ["fieldPath", "value"],
264
+ "properties": {
265
+ "fieldPath": {
266
+ "type": "array",
267
+ "minItems": 1,
268
+ "maxItems": 32,
269
+ "items": { "$ref": "common.schema.json#/$defs/localName" }
270
+ },
271
+ "locale": { "$ref": "common.schema.json#/$defs/locale" },
272
+ "value": { "$ref": "common.schema.json#/$defs/jsonValue" }
273
+ }
274
+ },
275
+ "addModelField": {
276
+ "type": "object",
277
+ "additionalProperties": false,
278
+ "required": ["field"],
279
+ "properties": {
280
+ "field": { "$ref": "content-model.schema.json#/$defs/field" },
281
+ "position": { "type": "integer", "minimum": 0, "maximum": 1000 }
282
+ }
283
+ },
284
+ "applyPattern": {
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "required": ["pattern", "nodes", "destination", "idMap"],
288
+ "properties": {
289
+ "pattern": {
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "required": ["id", "version", "revision"],
293
+ "properties": {
294
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
295
+ "version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
296
+ "revision": { "$ref": "common.schema.json#/$defs/revision" }
297
+ }
298
+ },
299
+ "nodes": {
300
+ "type": "array",
301
+ "minItems": 1,
302
+ "maxItems": 100,
303
+ "items": { "$ref": "blueprint.schema.json#/$defs/node" }
304
+ },
305
+ "destination": { "$ref": "#/$defs/destination" },
306
+ "idMap": {
307
+ "type": "object",
308
+ "minProperties": 1,
309
+ "maxProperties": 5000,
310
+ "propertyNames": { "$ref": "common.schema.json#/$defs/stableId" },
311
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/stableId" }
312
+ }
313
+ }
314
+ },
315
+ "batch": {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "required": ["operations"],
319
+ "properties": {
320
+ "operations": {
321
+ "type": "array",
322
+ "minItems": 1,
323
+ "maxItems": 100,
324
+ "items": { "$ref": "#/$defs/batchOperation" }
325
+ }
326
+ }
327
+ },
328
+ "batchOperation": {
329
+ "type": "object",
330
+ "additionalProperties": false,
331
+ "required": ["type", "payload"],
332
+ "properties": {
333
+ "type": {
334
+ "allOf": [
335
+ { "$ref": "common.schema.json#/$defs/qualifiedName" },
336
+ {
337
+ "not": {
338
+ "enum": [
339
+ "studio.command/apply-pattern",
340
+ "studio.command/batch",
341
+ "studio.command/reset-inherited-property"
342
+ ]
343
+ }
344
+ }
345
+ ]
346
+ },
347
+ "payload": {
348
+ "type": "object",
349
+ "maxProperties": 1000,
350
+ "propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
351
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
352
+ }
353
+ },
354
+ "allOf": [
355
+ {
356
+ "if": { "properties": { "type": { "const": "studio.command/insert-node" } } },
357
+ "then": { "properties": { "payload": { "$ref": "#/$defs/insertNode" } } }
358
+ },
359
+ {
360
+ "if": { "properties": { "type": { "const": "studio.command/remove-node" } } },
361
+ "then": { "properties": { "payload": { "$ref": "#/$defs/removeNode" } } }
362
+ },
363
+ {
364
+ "if": { "properties": { "type": { "const": "studio.command/restore-node" } } },
365
+ "then": { "properties": { "payload": { "$ref": "#/$defs/restoreNode" } } }
366
+ },
367
+ {
368
+ "if": { "properties": { "type": { "const": "studio.command/move-node" } } },
369
+ "then": { "properties": { "payload": { "$ref": "#/$defs/moveNode" } } }
370
+ },
371
+ {
372
+ "if": { "properties": { "type": { "const": "studio.command/duplicate-node" } } },
373
+ "then": { "properties": { "payload": { "$ref": "#/$defs/duplicateNode" } } }
374
+ },
375
+ {
376
+ "if": { "properties": { "type": { "const": "studio.command/reorder-children" } } },
377
+ "then": { "properties": { "payload": { "$ref": "#/$defs/reorderChildren" } } }
378
+ },
379
+ {
380
+ "if": { "properties": { "type": { "const": "studio.command/set-property" } } },
381
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setProperty" } } }
382
+ },
383
+ {
384
+ "if": { "properties": { "type": { "const": "studio.command/unset-property" } } },
385
+ "then": { "properties": { "payload": { "$ref": "#/$defs/unsetProperty" } } }
386
+ },
387
+ {
388
+ "if": { "properties": { "type": { "const": "studio.command/set-size-role" } } },
389
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setSizeRole" } } }
390
+ },
391
+ {
392
+ "if": { "properties": { "type": { "const": "studio.command/unset-size-role" } } },
393
+ "then": { "properties": { "payload": { "$ref": "#/$defs/unsetSizeRole" } } }
394
+ },
395
+ {
396
+ "if": { "properties": { "type": { "const": "studio.command/set-binding" } } },
397
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setBinding" } } }
398
+ },
399
+ {
400
+ "if": { "properties": { "type": { "const": "studio.command/remove-binding" } } },
401
+ "then": { "properties": { "payload": { "$ref": "#/$defs/removeBinding" } } }
402
+ },
403
+ {
404
+ "if": { "properties": { "type": { "const": "studio.command/set-field-value" } } },
405
+ "then": { "properties": { "payload": { "$ref": "#/$defs/setFieldValue" } } }
406
+ }
407
+ ]
408
+ }
409
+ }
410
+ }
@@ -0,0 +1,222 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/common.schema.json",
4
+ "title": "Studio common contract types",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "$defs": {
8
+ "contractVersion": {
9
+ "type": "string",
10
+ "const": "0.1-draft"
11
+ },
12
+ "semanticVersion": {
13
+ "type": "string",
14
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?![\\s\\S])",
15
+ "maxLength": 100
16
+ },
17
+ "versionRange": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 120,
21
+ "pattern": "^[0-9A-Za-z.*+<>=~^| -]+(?![\\s\\S])"
22
+ },
23
+ "qualifiedName": {
24
+ "type": "string",
25
+ "pattern": "^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*/[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*(?![\\s\\S])",
26
+ "maxLength": 160
27
+ },
28
+ "localName": {
29
+ "type": "string",
30
+ "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*(?![\\s\\S])",
31
+ "not": { "enum": ["__proto__", "prototype", "constructor"] },
32
+ "maxLength": 100
33
+ },
34
+ "safeJsonMemberName": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 200,
38
+ "pattern": "^[^\\u0000-\\u001F\\u007F]+(?![\\s\\S])",
39
+ "not": { "enum": ["__proto__", "prototype", "constructor"] }
40
+ },
41
+ "packageRelativePath": {
42
+ "type": "string",
43
+ "pattern": "^[A-Za-z0-9@][A-Za-z0-9._@-]*(?:/[A-Za-z0-9@][A-Za-z0-9._@-]*)*(?![\\s\\S])",
44
+ "maxLength": 240
45
+ },
46
+ "stableId": {
47
+ "type": "string",
48
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
49
+ "not": { "enum": ["__proto__", "prototype", "constructor"] },
50
+ "maxLength": 240
51
+ },
52
+ "revision": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 200
56
+ },
57
+ "integrity": {
58
+ "type": "string",
59
+ "pattern": "^(?:sha256-[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]=|sha384-[A-Za-z0-9+/]{64}|sha512-[A-Za-z0-9+/]{85}[AQgw]==)(?![\\s\\S])",
60
+ "maxLength": 200
61
+ },
62
+ "locale": {
63
+ "type": "string",
64
+ "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*(?![\\s\\S])",
65
+ "maxLength": 50
66
+ },
67
+ "canonicalDecimal": {
68
+ "type": "string",
69
+ "pattern": "^(?:-?(?:0|[1-9][0-9]*)\\.[0-9]+|0|-?[1-9][0-9]*)(?![\\s\\S])",
70
+ "maxLength": 40
71
+ },
72
+ "currencyCode": {
73
+ "type": "string",
74
+ "pattern": "^[A-Z]{3}(?![\\s\\S])"
75
+ },
76
+ "moneyValue": {
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": ["amount", "currency"],
80
+ "properties": {
81
+ "amount": { "$ref": "#/$defs/canonicalDecimal" },
82
+ "currency": { "$ref": "#/$defs/currencyCode" }
83
+ }
84
+ },
85
+ "rfc3339Date": {
86
+ "type": "string",
87
+ "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])(?![\\s\\S])"
88
+ },
89
+ "rfc3339Instant": {
90
+ "type": "string",
91
+ "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9]:(?:[0-5][0-9]|60)(?:\\.[0-9]{1,9})?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])(?![\\s\\S])",
92
+ "maxLength": 40
93
+ },
94
+ "messageReference": {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": ["key"],
98
+ "properties": {
99
+ "key": { "$ref": "#/$defs/qualifiedName" },
100
+ "defaultMessage": {
101
+ "type": "string",
102
+ "minLength": 1,
103
+ "maxLength": 500
104
+ }
105
+ }
106
+ },
107
+ "ownerReference": {
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": ["id", "version"],
111
+ "properties": {
112
+ "id": { "$ref": "#/$defs/qualifiedName" },
113
+ "version": { "$ref": "#/$defs/semanticVersion" }
114
+ }
115
+ },
116
+ "artifactReference": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": ["id", "version"],
120
+ "properties": {
121
+ "id": { "$ref": "#/$defs/stableId" },
122
+ "version": { "$ref": "#/$defs/semanticVersion" },
123
+ "revision": { "$ref": "#/$defs/revision" },
124
+ "integrity": { "$ref": "#/$defs/integrity" }
125
+ }
126
+ },
127
+ "lockedArtifactReference": {
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": ["id", "version", "revision"],
131
+ "properties": {
132
+ "id": { "$ref": "#/$defs/stableId" },
133
+ "version": { "$ref": "#/$defs/semanticVersion" },
134
+ "revision": { "$ref": "#/$defs/revision" },
135
+ "integrity": { "$ref": "#/$defs/integrity" }
136
+ }
137
+ },
138
+ "resolvedEntryReference": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": ["id", "revision"],
142
+ "properties": {
143
+ "id": { "$ref": "#/$defs/stableId" },
144
+ "revision": { "$ref": "#/$defs/revision" },
145
+ "integrity": { "$ref": "#/$defs/integrity" }
146
+ }
147
+ },
148
+ "jsonValue": {
149
+ "oneOf": [
150
+ { "type": "null" },
151
+ { "type": "boolean" },
152
+ { "type": "number" },
153
+ { "type": "string" },
154
+ {
155
+ "type": "array",
156
+ "maxItems": 10000,
157
+ "items": { "$ref": "#/$defs/jsonValue" }
158
+ },
159
+ {
160
+ "type": "object",
161
+ "maxProperties": 10000,
162
+ "propertyNames": { "$ref": "#/$defs/safeJsonMemberName" },
163
+ "additionalProperties": { "$ref": "#/$defs/jsonValue" }
164
+ }
165
+ ]
166
+ },
167
+ "extensions": {
168
+ "type": "object",
169
+ "maxProperties": 100,
170
+ "propertyNames": { "$ref": "#/$defs/qualifiedName" },
171
+ "additionalProperties": { "$ref": "#/$defs/jsonValue" }
172
+ },
173
+ "diagnosticLocation": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "properties": {
177
+ "artifactId": { "$ref": "#/$defs/stableId" },
178
+ "nodeId": { "$ref": "#/$defs/stableId" },
179
+ "fieldPath": {
180
+ "type": "array",
181
+ "maxItems": 32,
182
+ "items": { "$ref": "#/$defs/localName" }
183
+ },
184
+ "jsonPointer": {
185
+ "type": "string",
186
+ "maxLength": 1000
187
+ }
188
+ }
189
+ },
190
+ "diagnostic": {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": ["code", "severity", "message"],
194
+ "properties": {
195
+ "code": { "$ref": "#/$defs/qualifiedName" },
196
+ "severity": {
197
+ "enum": ["information", "warning", "error", "blocking"]
198
+ },
199
+ "message": { "$ref": "#/$defs/messageReference" },
200
+ "location": { "$ref": "#/$defs/diagnosticLocation" },
201
+ "parameters": {
202
+ "type": "object",
203
+ "maxProperties": 20,
204
+ "propertyNames": { "$ref": "#/$defs/safeJsonMemberName" },
205
+ "additionalProperties": {
206
+ "oneOf": [
207
+ { "type": "string" },
208
+ { "type": "number" },
209
+ { "type": "boolean" },
210
+ { "type": "null" }
211
+ ]
212
+ }
213
+ },
214
+ "remediations": {
215
+ "type": "array",
216
+ "maxItems": 10,
217
+ "items": { "$ref": "#/$defs/qualifiedName" }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ }