@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.
- package/LICENSE +21 -0
- package/README.md +77 -0
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/generated/schema-models.d.ts +1968 -0
- package/dist/generated/schema-models.d.ts.map +1 -0
- package/dist/generated/schema-models.js +76 -0
- package/dist/generated/schema-models.js.map +1 -0
- package/dist/guards.d.ts +7 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +374 -0
- package/dist/guards.js.map +1 -0
- package/dist/host-failure.d.ts +16 -0
- package/dist/host-failure.d.ts.map +1 -0
- package/dist/host-failure.js +27 -0
- package/dist/host-failure.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas.d.ts +50 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +144 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +1256 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -0
- package/schemas/authoring-message-catalog.schema.json +45 -0
- package/schemas/authoring-web-vector.schema.json +236 -0
- package/schemas/binding-projection-vector.schema.json +127 -0
- package/schemas/block-definition.schema.json +227 -0
- package/schemas/blueprint.schema.json +273 -0
- package/schemas/canonical-vector.schema.json +65 -0
- package/schemas/command-vector.schema.json +68 -0
- package/schemas/command.schema.json +410 -0
- package/schemas/common.schema.json +222 -0
- package/schemas/content-model.schema.json +216 -0
- package/schemas/corpus-manifest.schema.json +48 -0
- package/schemas/design-vocabulary.schema.json +91 -0
- package/schemas/entry.schema.json +32 -0
- package/schemas/field-adapter.schema.json +51 -0
- package/schemas/host-capabilities.schema.json +65 -0
- package/schemas/host-error.schema.json +42 -0
- package/schemas/host-operations.schema.json +162 -0
- package/schemas/host-request.schema.json +71 -0
- package/schemas/host-result.schema.json +19 -0
- package/schemas/host-sequence-vector.schema.json +342 -0
- package/schemas/host-vector.schema.json +199 -0
- package/schemas/inspector.schema.json +44 -0
- package/schemas/manifest.json +246 -0
- package/schemas/media-asset.schema.json +83 -0
- package/schemas/media-reference.schema.json +112 -0
- package/schemas/media-upload-grant.schema.json +48 -0
- package/schemas/media-upload-session.schema.json +109 -0
- package/schemas/media-vector.schema.json +123 -0
- package/schemas/migration.schema.json +41 -0
- package/schemas/pattern.schema.json +50 -0
- package/schemas/plugin-manifest.schema.json +126 -0
- package/schemas/preview-message.schema.json +583 -0
- package/schemas/preview-vector.schema.json +52 -0
- package/schemas/provenance.schema.json +57 -0
- package/schemas/renderer-web-vector.schema.json +160 -0
- package/schemas/rich-text-projection.schema.json +79 -0
- package/schemas/rich-text.schema.json +323 -0
- package/schemas/schema-profile-vector.schema.json +133 -0
- package/schemas/schema-profile.schema.json +201 -0
- package/schemas/studio-chart.schema.json +35 -0
- package/schemas/studio-config.schema.json +244 -0
- package/schemas/studio-drawing.schema.json +44 -0
- package/schemas/studio-money.schema.json +16 -0
- package/schemas/studio-presentation.schema.json +31 -0
- package/schemas/studio-release.schema.json +81 -0
- package/schemas/studio-table.schema.json +27 -0
- package/schemas/theme.schema.json +164 -0
- package/schemas/unresolved-contribution.schema.json +50 -0
- package/studio-release.json +18 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/media-reference.schema.json",
|
|
4
|
+
"title": "Studio persisted media reference",
|
|
5
|
+
"description": "A small, usage-specific reference stored in an artifact. It contains no URL, binary data, storage path, credential, or host delivery authority.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "kind", "assetId", "usage", "accessibility"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
11
|
+
"kind": { "const": "media-reference" },
|
|
12
|
+
"assetId": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
13
|
+
"assetRevision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
14
|
+
"usage": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
15
|
+
"renditionIntent": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["role"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"role": { "$ref": "common.schema.json#/$defs/localName" },
|
|
21
|
+
"fit": { "enum": ["contain", "cover", "fill", "scale-down"] },
|
|
22
|
+
"preferredMediaTypes": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"maxItems": 10,
|
|
25
|
+
"uniqueItems": true,
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[a-z0-9!#$&^_.+-]+/[a-z0-9!#$&^_.+-]+(?![\\s\\S])",
|
|
29
|
+
"maxLength": 200
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"focalPoint": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["x", "y"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"x": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
40
|
+
"y": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"cropIntent": {
|
|
44
|
+
"oneOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["mode", "width", "height"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"mode": { "const": "aspect-ratio" },
|
|
51
|
+
"width": { "type": "integer", "minimum": 1, "maximum": 10000 },
|
|
52
|
+
"height": { "type": "integer", "minimum": 1, "maximum": 10000 }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["mode", "x", "y", "width", "height"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"mode": { "const": "rectangle" },
|
|
61
|
+
"x": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
62
|
+
"y": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
63
|
+
"width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
64
|
+
"height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"accessibility": {
|
|
70
|
+
"oneOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["mode", "altText"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"mode": { "const": "informative" },
|
|
77
|
+
"altText": { "type": "string", "minLength": 1, "maxLength": 5000 },
|
|
78
|
+
"caption": { "type": "string", "maxLength": 20000 }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["mode"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"mode": { "const": "decorative" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": ["mode", "altFieldPath"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"mode": { "const": "bound" },
|
|
95
|
+
"altFieldPath": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"minItems": 1,
|
|
98
|
+
"maxItems": 32,
|
|
99
|
+
"items": { "$ref": "common.schema.json#/$defs/localName" }
|
|
100
|
+
},
|
|
101
|
+
"captionFieldPath": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"minItems": 1,
|
|
104
|
+
"maxItems": 32,
|
|
105
|
+
"items": { "$ref": "common.schema.json#/$defs/localName" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/media-upload-grant.schema.json",
|
|
4
|
+
"title": "Studio media upload grant",
|
|
5
|
+
"description": "The host's authorization to transfer one upload. Bytes never cross the JSON port: the host issues a short-lived, single-purpose destination it controls and the client transfers directly to it, so custody, quotas and storage placement stay host-owned and a large body never traverses the port transport. A grant authorizes exactly the declared upload and expires; it is not a credential the client may reuse, cache, or apply to another upload.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["expiresAt", "method", "plan", "uploadId", "url"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"expiresAt": {
|
|
11
|
+
"description": "When the grant stops being honoured. A client that has not completed by then re-authorizes rather than retrying against a dead destination.",
|
|
12
|
+
"$ref": "common.schema.json#/$defs/rfc3339Instant"
|
|
13
|
+
},
|
|
14
|
+
"headers": {
|
|
15
|
+
"description": "Headers the client must send verbatim on the transfer. They carry no user credential and are never logged by the client.",
|
|
16
|
+
"type": "object",
|
|
17
|
+
"maxProperties": 20,
|
|
18
|
+
"propertyNames": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^[A-Za-z][A-Za-z0-9-]*(?![\\s\\S])",
|
|
21
|
+
"maxLength": 100
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": { "type": "string", "maxLength": 2000 }
|
|
24
|
+
},
|
|
25
|
+
"method": { "enum": ["POST", "PUT"] },
|
|
26
|
+
"plan": {
|
|
27
|
+
"description": "The bounded transfer plan the host derived from its policy. The client transfers within it and never negotiates a larger bound.",
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["maximumBytes", "resumable"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"chunkBytes": { "type": "integer", "minimum": 1024, "maximum": 1073741824 },
|
|
33
|
+
"maximumBytes": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
34
|
+
"resumable": { "type": "boolean" }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"uploadId": {
|
|
38
|
+
"description": "The opaque host-issued upload identity used to complete or abort the transfer.",
|
|
39
|
+
"$ref": "common.schema.json#/$defs/stableId"
|
|
40
|
+
},
|
|
41
|
+
"url": {
|
|
42
|
+
"description": "The absolute https destination the host controls. It is never an author-supplied value and never a Studio-derived address.",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^https://",
|
|
45
|
+
"maxLength": 2000
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/media-upload-session.schema.json",
|
|
4
|
+
"title": "Studio media upload session",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["contractVersion", "kind", "id", "request", "state", "progress"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
10
|
+
"kind": { "const": "media-upload-session" },
|
|
11
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
12
|
+
"request": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["filename", "mediaType", "byteSize", "purpose"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"filename": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 255,
|
|
21
|
+
"pattern": "^[^\\u0000-\\u001F\\u007F/\\\\]+(?![\\s\\S])"
|
|
22
|
+
},
|
|
23
|
+
"mediaType": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*/[a-z0-9][a-z0-9!#$&^_.+-]*(?![\\s\\S])",
|
|
26
|
+
"maxLength": 120
|
|
27
|
+
},
|
|
28
|
+
"byteSize": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
29
|
+
"purpose": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
30
|
+
"checksum": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"plan": { "$ref": "#/$defs/plan" },
|
|
34
|
+
"state": {
|
|
35
|
+
"enum": [
|
|
36
|
+
"requested",
|
|
37
|
+
"authorized",
|
|
38
|
+
"transferring",
|
|
39
|
+
"verifying",
|
|
40
|
+
"complete",
|
|
41
|
+
"failed",
|
|
42
|
+
"cancelled"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"progress": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["transferredBytes", "totalBytes"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"transferredBytes": { "type": "integer", "minimum": 0, "maximum": 1099511627776 },
|
|
51
|
+
"totalBytes": { "type": "integer", "minimum": 0, "maximum": 1099511627776 }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"asset": { "$ref": "#/$defs/acceptedAsset" },
|
|
55
|
+
"failure": { "$ref": "common.schema.json#/$defs/diagnostic" }
|
|
56
|
+
},
|
|
57
|
+
"allOf": [
|
|
58
|
+
{
|
|
59
|
+
"if": { "properties": { "state": { "const": "complete" } }, "required": ["state"] },
|
|
60
|
+
"then": {
|
|
61
|
+
"properties": { "asset": { "$ref": "#/$defs/acceptedAsset" } },
|
|
62
|
+
"required": ["asset"]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"if": { "properties": { "state": { "const": "failed" } }, "required": ["state"] },
|
|
67
|
+
"then": {
|
|
68
|
+
"properties": { "failure": { "$ref": "common.schema.json#/$defs/diagnostic" } },
|
|
69
|
+
"required": ["failure"]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"if": {
|
|
74
|
+
"properties": { "state": { "enum": ["authorized", "transferring", "verifying"] } },
|
|
75
|
+
"required": ["state"]
|
|
76
|
+
},
|
|
77
|
+
"then": {
|
|
78
|
+
"properties": { "plan": { "$ref": "#/$defs/plan" } },
|
|
79
|
+
"required": ["plan"]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"if": { "properties": { "state": { "const": "requested" } }, "required": ["state"] },
|
|
84
|
+
"then": { "not": { "required": ["asset"] } }
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"$defs": {
|
|
88
|
+
"acceptedAsset": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["id", "revision", "state"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
94
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
95
|
+
"state": { "enum": ["processing", "ready", "rejected", "quarantined"] }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"plan": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"required": ["maximumBytes", "resumable"],
|
|
102
|
+
"properties": {
|
|
103
|
+
"maximumBytes": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
104
|
+
"chunkBytes": { "type": "integer", "minimum": 1024, "maximum": 1073741824 },
|
|
105
|
+
"resumable": { "type": "boolean" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/media-vector.schema.json",
|
|
4
|
+
"title": "Studio canonical media policy vector",
|
|
5
|
+
"description": "One canonical upload-policy decision: a host-declared policy, an upload request, and either the deterministic policy-derived plan or a stable failure code, optionally extended with cancellation and retry legality for the media-upload-session state machine.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "kind", "id", "description", "policy", "request", "expect"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
11
|
+
"kind": { "const": "media-vector" },
|
|
12
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
13
|
+
"description": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"maxLength": 500
|
|
17
|
+
},
|
|
18
|
+
"policy": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["acceptedMediaTypes", "maximumBytes", "resumable"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"acceptedMediaTypes": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"minItems": 1,
|
|
26
|
+
"maxItems": 100,
|
|
27
|
+
"items": { "$ref": "#/$defs/mediaType" }
|
|
28
|
+
},
|
|
29
|
+
"chunkBytes": { "type": "integer", "minimum": 1024, "maximum": 1073741824 },
|
|
30
|
+
"maximumBytes": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
31
|
+
"resumable": { "type": "boolean" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"request": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["filename", "mediaType", "byteSize", "purpose"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"filename": {
|
|
40
|
+
"description": "Deliberately looser than the media-upload-session request shape so rejection vectors can carry filenames the canonical contract refuses.",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"maxLength": 500
|
|
43
|
+
},
|
|
44
|
+
"mediaType": { "$ref": "#/$defs/mediaType" },
|
|
45
|
+
"byteSize": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
46
|
+
"purpose": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
47
|
+
"checksum": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"expect": {
|
|
51
|
+
"oneOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["outcome", "plan"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"outcome": { "const": "accepted" },
|
|
58
|
+
"plan": { "$ref": "#/$defs/plan" }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["outcome", "code"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"outcome": { "const": "rejected" },
|
|
67
|
+
"code": { "$ref": "#/$defs/failureCode" },
|
|
68
|
+
"messageMustNotContain": {
|
|
69
|
+
"description": "Raw request or policy values the user-facing failure message MUST NOT echo.",
|
|
70
|
+
"type": "array",
|
|
71
|
+
"minItems": 1,
|
|
72
|
+
"maxItems": 10,
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1,
|
|
76
|
+
"maxLength": 200
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"cancel": {
|
|
84
|
+
"description": "Cancellation legality: the session state during which cancel() is issued and the resulting terminal state. Cancellation from an active state ends in cancelled; cancellation after completion is a no-op.",
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": ["during", "finalState"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"during": { "enum": ["complete", "requested", "transferring", "verifying"] },
|
|
90
|
+
"finalState": { "enum": ["cancelled", "complete"] }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"retry": {
|
|
94
|
+
"description": "Retry legality for a rejected request: retry is legal only from the failed state and always runs under a fresh session identity with the identical request.",
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["freshSession"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"freshSession": { "const": true }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"$defs": {
|
|
104
|
+
"failureCode": {
|
|
105
|
+
"enum": ["studio.media/upload-failed", "studio.media/upload-too-large"]
|
|
106
|
+
},
|
|
107
|
+
"mediaType": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*/[a-z0-9][a-z0-9!#$&^_.+-]*(?![\\s\\S])",
|
|
110
|
+
"maxLength": 120
|
|
111
|
+
},
|
|
112
|
+
"plan": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": ["maximumBytes", "resumable"],
|
|
116
|
+
"properties": {
|
|
117
|
+
"maximumBytes": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
118
|
+
"chunkBytes": { "type": "integer", "minimum": 1024, "maximum": 1073741824 },
|
|
119
|
+
"resumable": { "type": "boolean" }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/migration.schema.json",
|
|
4
|
+
"title": "Studio migration declaration",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"version",
|
|
12
|
+
"owner",
|
|
13
|
+
"label",
|
|
14
|
+
"artifactKinds",
|
|
15
|
+
"sourceVersions",
|
|
16
|
+
"targetVersion",
|
|
17
|
+
"lossClassification"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
21
|
+
"kind": { "const": "migration" },
|
|
22
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
23
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
24
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
25
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
26
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
27
|
+
"artifactKinds": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"minItems": 1,
|
|
30
|
+
"maxItems": 5,
|
|
31
|
+
"uniqueItems": true,
|
|
32
|
+
"items": {
|
|
33
|
+
"enum": ["block-definition", "blueprint", "content-model", "entry", "theme"]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"sourceVersions": { "$ref": "common.schema.json#/$defs/versionRange" },
|
|
37
|
+
"targetVersion": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
38
|
+
"lossClassification": { "enum": ["lossless", "lossy"] },
|
|
39
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/pattern.schema.json",
|
|
4
|
+
"title": "Studio composition pattern",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"version",
|
|
12
|
+
"revision",
|
|
13
|
+
"owner",
|
|
14
|
+
"label",
|
|
15
|
+
"blockDependencies",
|
|
16
|
+
"roots"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
20
|
+
"kind": { "const": "pattern" },
|
|
21
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
22
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
23
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
24
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
25
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
26
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
27
|
+
"blockDependencies": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"maxItems": 200,
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["type", "version", "revision"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
36
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
37
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
38
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"roots": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"minItems": 1,
|
|
45
|
+
"maxItems": 100,
|
|
46
|
+
"items": { "$ref": "blueprint.schema.json#/$defs/node" }
|
|
47
|
+
},
|
|
48
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/plugin-manifest.schema.json",
|
|
4
|
+
"title": "Studio plugin manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"version",
|
|
12
|
+
"owner",
|
|
13
|
+
"label",
|
|
14
|
+
"activation",
|
|
15
|
+
"entryModules",
|
|
16
|
+
"contributions",
|
|
17
|
+
"requiredCapabilities",
|
|
18
|
+
"optionalCapabilities",
|
|
19
|
+
"dependencies",
|
|
20
|
+
"permissions"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
24
|
+
"kind": { "const": "plugin-manifest" },
|
|
25
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
26
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
27
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
28
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
29
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
30
|
+
"activation": { "enum": ["declarative", "executable"] },
|
|
31
|
+
"entryModules": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"maxItems": 10,
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["realm", "path", "integrity"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"realm": { "enum": ["application", "worker", "sandboxed-frame"] },
|
|
40
|
+
"path": { "$ref": "common.schema.json#/$defs/packageRelativePath" },
|
|
41
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"contributions": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"maxItems": 5000,
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["kind", "id", "version", "resource", "integrity"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"kind": {
|
|
54
|
+
"enum": [
|
|
55
|
+
"block",
|
|
56
|
+
"command",
|
|
57
|
+
"design-vocabulary",
|
|
58
|
+
"field-adapter",
|
|
59
|
+
"inspector",
|
|
60
|
+
"locale",
|
|
61
|
+
"migration",
|
|
62
|
+
"panel",
|
|
63
|
+
"pattern",
|
|
64
|
+
"renderer-capability",
|
|
65
|
+
"test-fixture",
|
|
66
|
+
"transform"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
70
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
71
|
+
"resource": { "$ref": "common.schema.json#/$defs/packageRelativePath" },
|
|
72
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" },
|
|
73
|
+
"executable": { "type": "boolean", "default": false }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"requiredCapabilities": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"maxItems": 100,
|
|
80
|
+
"items": { "$ref": "#/$defs/capabilityRequirement" }
|
|
81
|
+
},
|
|
82
|
+
"optionalCapabilities": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"maxItems": 100,
|
|
85
|
+
"items": { "$ref": "#/$defs/capabilityRequirement" }
|
|
86
|
+
},
|
|
87
|
+
"dependencies": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"maxItems": 100,
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"required": ["id", "versions", "optional"],
|
|
94
|
+
"properties": {
|
|
95
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
96
|
+
"versions": { "$ref": "common.schema.json#/$defs/versionRange" },
|
|
97
|
+
"optional": { "type": "boolean" }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"permissions": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"maxItems": 100,
|
|
104
|
+
"uniqueItems": true,
|
|
105
|
+
"items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
106
|
+
},
|
|
107
|
+
"locales": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"maxItems": 100,
|
|
110
|
+
"uniqueItems": true,
|
|
111
|
+
"items": { "$ref": "common.schema.json#/$defs/locale" }
|
|
112
|
+
},
|
|
113
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
114
|
+
},
|
|
115
|
+
"$defs": {
|
|
116
|
+
"capabilityRequirement": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": ["id", "versions"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
122
|
+
"versions": { "$ref": "common.schema.json#/$defs/versionRange" }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|