@kumwe/studio-testkit 0.1.0-alpha.8 → 0.1.0-beta.2
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/README.md +79 -19
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/conformance/authoring-web/non-drag-move-equivalence.json +199 -0
- package/conformance/renderer-web/blob-default-deny.json +62 -0
- package/conformance/renderer-web/chart-fallback.json +54 -0
- package/conformance/renderer-web/complete-catalog.json +649 -0
- package/conformance/renderer-web/escaped-heading.json +43 -0
- package/conformance/renderer-web/interactive-behaviors.json +284 -0
- package/conformance/renderer-web/presentation-capabilities.json +104 -0
- package/conformance/renderer-web/responsive-grid.json +48 -0
- package/conformance/renderer-web/security-fallbacks.json +184 -0
- package/conformance/rich-text/advanced.first-party.json +67 -0
- package/corpus-manifest.json +190 -2
- package/dist/contextual-conformance.d.ts +81 -0
- package/dist/contextual-conformance.d.ts.map +1 -0
- package/dist/contextual-conformance.js +1 -0
- package/dist/host-testbed.d.ts +47 -4
- package/dist/host-testbed.d.ts.map +1 -1
- package/dist/host-testbed.js +1 -742
- package/dist/http-authoring-contract.d.ts +3 -0
- package/dist/http-authoring-contract.d.ts.map +1 -0
- package/dist/http-authoring-contract.js +1 -0
- package/dist/http-host-adapter.d.ts +12 -64
- package/dist/http-host-adapter.d.ts.map +1 -1
- package/dist/http-host-adapter.js +1 -256
- package/dist/http-host-responder.d.ts +58 -0
- package/dist/http-host-responder.d.ts.map +1 -0
- package/dist/http-host-responder.js +1 -0
- package/dist/index.d.ts +49 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -174
- package/dist/web-conformance.d.ts +112 -0
- package/dist/web-conformance.d.ts.map +1 -0
- package/dist/web-conformance.js +1 -0
- package/fixtures/authoring-message-catalog.en.json +1093 -0
- package/fixtures/authoring-save.plan.example.json +48 -0
- package/fixtures/authoring-session.example.json +212 -0
- package/fixtures/authoring-target.example.json +34 -0
- package/fixtures/host-operations.example.json +77 -0
- package/fixtures/plugin.example.json +12 -0
- package/fixtures/reusable-content-type.example.json +26 -0
- package/fixtures/studio-deployment.hosted.example.json +152 -0
- package/fixtures/studio-deployment.standalone.example.json +9 -0
- package/invalid/authoring-save.plan-missing-coordinates.json +16 -0
- package/invalid/authoring-save.plan-missing-successor-context.json +28 -0
- package/invalid/authoring-save.request-plan-missing-successor-context.json +26 -0
- package/invalid/authoring-session.missing-entry-state.json +9 -0
- package/invalid/authoring-target.missing-resource-types.json +24 -0
- package/invalid/binding-projection-vector.unknown-status.json +85 -0
- package/invalid/host-error.retry-delay-without-retry.json +16 -0
- package/invalid/host-error.retry-delay-wrong-category.json +16 -0
- package/invalid/host-error.revision-without-conflict.json +16 -0
- package/invalid/reusable-content-type.entry-values.json +32 -0
- package/invalid/studio-chart.script-config.json +10 -0
- package/invalid/studio-deployment.long-lived-token.json +24 -0
- package/invalid/studio-deployment.missing-required.json +5 -0
- package/invalid/studio-deployment.unknown-member.json +15 -0
- package/invalid/studio-drawing.svg-payload.json +10 -0
- package/invalid/studio-money.float.json +8 -0
- package/invalid/studio-presentation.css-injection.json +8 -0
- package/invalid/studio-table.html-cell.json +8 -0
- package/package.json +8 -4
- package/studio-release.json +35 -0
- package/vectors/authoring-http/transport-matrix.json +237 -0
- package/vectors/binding-projection/app-content-fields.resolved.json +286 -0
- package/vectors/binding-projection/field-removed.diagnostic.json +135 -0
- package/vectors/binding-projection/model-revision-mismatch.diagnostic.json +124 -0
- package/vectors/host/model.get.stored.json +37 -0
- package/vectors/host/model.list.authorized.json +31 -0
- package/dist/host-testbed.js.map +0 -1
- package/dist/http-host-adapter.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "authoring-target.schema.json",
|
|
3
|
+
"description": "A target cannot be resolved without a bounded host resource type inventory.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "authoring-target",
|
|
7
|
+
"id": "org.example.catalog/product-content",
|
|
8
|
+
"owner": {
|
|
9
|
+
"id": "org.example/catalog",
|
|
10
|
+
"version": "1.0.0"
|
|
11
|
+
},
|
|
12
|
+
"label": {
|
|
13
|
+
"key": "org.example.catalog/product-content"
|
|
14
|
+
},
|
|
15
|
+
"surface": "org.example.catalog/product-editor",
|
|
16
|
+
"eligibility": ["create", "edit"],
|
|
17
|
+
"modes": ["content"],
|
|
18
|
+
"startKinds": ["existing"],
|
|
19
|
+
"presentationStates": ["inline"],
|
|
20
|
+
"saveOutcomes": ["save-item"],
|
|
21
|
+
"requiredCapabilities": [],
|
|
22
|
+
"contributionDependencies": []
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "binding-projection-vector.schema.json",
|
|
3
|
+
"description": "A binding projection vector cannot invent a status a second host cannot reproduce.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "binding-projection-vector",
|
|
7
|
+
"id": "binding-projection/invalid-status",
|
|
8
|
+
"description": "Invalid status probe.",
|
|
9
|
+
"profile": "studio.profile/binding-projection-v1",
|
|
10
|
+
"blueprint": {
|
|
11
|
+
"contractVersion": "0.1-draft",
|
|
12
|
+
"kind": "blueprint",
|
|
13
|
+
"id": "studio.test/invalid-vector-blueprint",
|
|
14
|
+
"version": "1.0.0",
|
|
15
|
+
"revision": "blueprint-r1",
|
|
16
|
+
"owner": { "id": "studio.test/host", "version": "1.0.0" },
|
|
17
|
+
"status": "draft",
|
|
18
|
+
"label": { "key": "studio.test/blueprint", "defaultMessage": "Blueprint" },
|
|
19
|
+
"model": { "id": "studio.test/model", "version": "1.0.0", "revision": "model-r1" },
|
|
20
|
+
"dependencyLock": {
|
|
21
|
+
"theme": { "id": "studio.test/theme", "version": "1.0.0", "revision": "theme-r1" },
|
|
22
|
+
"blocks": []
|
|
23
|
+
},
|
|
24
|
+
"roots": []
|
|
25
|
+
},
|
|
26
|
+
"model": {
|
|
27
|
+
"contractVersion": "0.1-draft",
|
|
28
|
+
"kind": "content-model",
|
|
29
|
+
"id": "studio.test/model",
|
|
30
|
+
"version": "1.0.0",
|
|
31
|
+
"revision": "model-r1",
|
|
32
|
+
"owner": { "id": "studio.test/host", "version": "1.0.0" },
|
|
33
|
+
"status": "published",
|
|
34
|
+
"label": { "key": "studio.test/model", "defaultMessage": "Model" },
|
|
35
|
+
"fields": [
|
|
36
|
+
{
|
|
37
|
+
"id": "title",
|
|
38
|
+
"kind": "string",
|
|
39
|
+
"label": { "key": "studio.test/title", "defaultMessage": "Title" },
|
|
40
|
+
"required": false,
|
|
41
|
+
"localized": false,
|
|
42
|
+
"cardinality": "one"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"relationships": []
|
|
46
|
+
},
|
|
47
|
+
"blockDefinitions": [
|
|
48
|
+
{
|
|
49
|
+
"contractVersion": "0.1-draft",
|
|
50
|
+
"kind": "block-definition",
|
|
51
|
+
"type": "studio.test/text",
|
|
52
|
+
"version": "1.0.0",
|
|
53
|
+
"revision": "block-r1",
|
|
54
|
+
"owner": { "id": "studio.test/host", "version": "1.0.0" },
|
|
55
|
+
"label": { "key": "studio.test/text", "defaultMessage": "Text" },
|
|
56
|
+
"category": "studio.category/content",
|
|
57
|
+
"propertySchema": { "type": "object", "additionalProperties": false },
|
|
58
|
+
"slots": [],
|
|
59
|
+
"ports": [],
|
|
60
|
+
"editingModes": ["blueprint"],
|
|
61
|
+
"themeControls": [],
|
|
62
|
+
"rendererRequirements": [
|
|
63
|
+
{ "surface": "preview", "capability": "studio.renderer/test", "versions": "^1.0.0" }
|
|
64
|
+
],
|
|
65
|
+
"accessibility": {
|
|
66
|
+
"category": "text",
|
|
67
|
+
"accessibleName": "not-applicable",
|
|
68
|
+
"keyboard": { "key": "studio.test/keyboard", "defaultMessage": "Use the outline." },
|
|
69
|
+
"reducedMotion": "not-applicable",
|
|
70
|
+
"outputChecks": ["studio.check/text"]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"expect": {
|
|
75
|
+
"model": { "id": "studio.test/model", "version": "1.0.0", "revision": "model-r1" },
|
|
76
|
+
"nodes": [
|
|
77
|
+
{
|
|
78
|
+
"nodeId": "node-1",
|
|
79
|
+
"ports": [{ "port": "title", "status": "silently-repaired", "candidates": [] }]
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"diagnostics": []
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "host-error.schema.json",
|
|
3
|
+
"description": "A retry delay is present only on a retryable rate-limit or unavailable failure.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "host-error",
|
|
7
|
+
"category": "rate-limited",
|
|
8
|
+
"correlationId": "requests/invalid-retry-delay",
|
|
9
|
+
"message": {
|
|
10
|
+
"key": "studio.host/rate-limited",
|
|
11
|
+
"defaultMessage": "The request is rate limited."
|
|
12
|
+
},
|
|
13
|
+
"retryable": false,
|
|
14
|
+
"retryAfterMilliseconds": 1000
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "host-error.schema.json",
|
|
3
|
+
"description": "A retry delay is present only on a rate-limit or unavailable failure.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "host-error",
|
|
7
|
+
"category": "forbidden",
|
|
8
|
+
"correlationId": "requests/invalid-retry-delay-category",
|
|
9
|
+
"message": {
|
|
10
|
+
"key": "studio.host/forbidden",
|
|
11
|
+
"defaultMessage": "The request is forbidden."
|
|
12
|
+
},
|
|
13
|
+
"retryable": true,
|
|
14
|
+
"retryAfterMilliseconds": 1000
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "host-error.schema.json",
|
|
3
|
+
"description": "A safe current revision is disclosed only for a conflict.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "host-error",
|
|
7
|
+
"category": "validation-failed",
|
|
8
|
+
"correlationId": "requests/invalid-revision",
|
|
9
|
+
"message": {
|
|
10
|
+
"key": "studio.host/validation-failed",
|
|
11
|
+
"defaultMessage": "The request failed validation."
|
|
12
|
+
},
|
|
13
|
+
"retryable": false,
|
|
14
|
+
"revision": "entry-r2"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "reusable-content-type.schema.json",
|
|
3
|
+
"description": "A reusable content type coordinates Model and Blueprint revisions but never contains Entry values.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "reusable-content-type",
|
|
7
|
+
"id": "content-types/product-page",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"revision": "product-page-type-r1",
|
|
10
|
+
"label": {
|
|
11
|
+
"key": "org.example.catalog/product-page-type"
|
|
12
|
+
},
|
|
13
|
+
"status": "published",
|
|
14
|
+
"model": {
|
|
15
|
+
"id": "org.example.models/product",
|
|
16
|
+
"version": "1.0.0",
|
|
17
|
+
"revision": "product-model-r1"
|
|
18
|
+
},
|
|
19
|
+
"blueprint": {
|
|
20
|
+
"id": "org.example.blueprints/product-card",
|
|
21
|
+
"version": "1.0.0",
|
|
22
|
+
"revision": "product-card-r5"
|
|
23
|
+
},
|
|
24
|
+
"authoringPolicy": {
|
|
25
|
+
"modes": ["content"],
|
|
26
|
+
"itemComposition": "denied"
|
|
27
|
+
},
|
|
28
|
+
"values": {
|
|
29
|
+
"name": "Must not cross this boundary"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "studio-chart.schema.json",
|
|
3
|
+
"description": "Chart.js options and authored callbacks are not canonical Studio chart data.",
|
|
4
|
+
"value": {
|
|
5
|
+
"type": "bar",
|
|
6
|
+
"labels": ["Unsafe"],
|
|
7
|
+
"datasets": [{ "label": "Values", "values": [1] }],
|
|
8
|
+
"options": { "onClick": "alert(1)" }
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "studio-deployment.schema.json",
|
|
3
|
+
"description": "Serialized bearer authentication without required issuance and expiry metadata cannot represent a bounded lifetime.",
|
|
4
|
+
"value": {
|
|
5
|
+
"kind": "studio-deployment",
|
|
6
|
+
"mount": "#studio-page",
|
|
7
|
+
"release": {
|
|
8
|
+
"version": "0.1.0-beta.2",
|
|
9
|
+
"corpusManifestDigest": "sha256-HCQ5pF8NMk9nPOXfU6kVX/E8sjgJjHdyDQ86CTOjGi0="
|
|
10
|
+
},
|
|
11
|
+
"transport": {
|
|
12
|
+
"kind": "http",
|
|
13
|
+
"routing": {
|
|
14
|
+
"kind": "single-endpoint",
|
|
15
|
+
"endpoint": "/api/studio"
|
|
16
|
+
},
|
|
17
|
+
"authentication": {
|
|
18
|
+
"kind": "bearer-token",
|
|
19
|
+
"credentials": "omit",
|
|
20
|
+
"token": "<bearer-token>"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "studio-deployment.schema.json",
|
|
3
|
+
"description": "Deployment configuration is closed and rejects inferred backend configuration.",
|
|
4
|
+
"value": {
|
|
5
|
+
"kind": "studio-deployment",
|
|
6
|
+
"mount": "#studio-page",
|
|
7
|
+
"release": {
|
|
8
|
+
"version": "0.1.0-beta.2",
|
|
9
|
+
"corpusManifestDigest": "sha256-HCQ5pF8NMk9nPOXfU6kVX/E8sjgJjHdyDQ86CTOjGi0="
|
|
10
|
+
},
|
|
11
|
+
"backend": {
|
|
12
|
+
"url": "/api/studio"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "studio-drawing.schema.json",
|
|
3
|
+
"description": "Drawing colors cannot carry CSS URLs or executable SVG payloads.",
|
|
4
|
+
"value": {
|
|
5
|
+
"width": 100,
|
|
6
|
+
"height": 100,
|
|
7
|
+
"alt": "Unsafe drawing",
|
|
8
|
+
"strokes": [{ "color": "url(javascript:alert(1))", "width": 2, "points": [{ "x": 1, "y": 1 }] }]
|
|
9
|
+
}
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumwe/studio-testkit",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-beta.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/kumwe/studio.git",
|
|
@@ -13,12 +13,15 @@
|
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"files": [
|
|
15
15
|
"LICENSE",
|
|
16
|
+
"THIRD_PARTY_NOTICES.md",
|
|
17
|
+
"third-party-licenses",
|
|
16
18
|
"README.md",
|
|
17
19
|
"conformance",
|
|
18
20
|
"corpus-manifest.json",
|
|
19
21
|
"dist",
|
|
20
22
|
"fixtures",
|
|
21
23
|
"invalid",
|
|
24
|
+
"studio-release.json",
|
|
22
25
|
"vectors"
|
|
23
26
|
],
|
|
24
27
|
"exports": {
|
|
@@ -30,14 +33,15 @@
|
|
|
30
33
|
"./corpus-manifest.json": "./corpus-manifest.json",
|
|
31
34
|
"./fixtures/*": "./fixtures/*",
|
|
32
35
|
"./invalid/*": "./invalid/*",
|
|
36
|
+
"./studio-release.json": "./studio-release.json",
|
|
33
37
|
"./vectors/*": "./vectors/*"
|
|
34
38
|
},
|
|
35
39
|
"scripts": {
|
|
36
|
-
"build": "tsc -b"
|
|
40
|
+
"build": "tsc -b && node ../../scripts/minify-package-dist.mjs --package packages/testkit"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@kumwe/studio-core": "0.1.0-
|
|
40
|
-
"@kumwe/studio-protocol": "0.1.0-
|
|
43
|
+
"@kumwe/studio-core": "0.1.0-beta.2",
|
|
44
|
+
"@kumwe/studio-protocol": "0.1.0-beta.2"
|
|
41
45
|
},
|
|
42
46
|
"publishConfig": {
|
|
43
47
|
"access": "public",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "studio-release",
|
|
4
|
+
"release": "0.1.0-beta.2",
|
|
5
|
+
"packages": {
|
|
6
|
+
"@kumwe/studio-core": "0.1.0-beta.2",
|
|
7
|
+
"@kumwe/studio-media": "0.1.0-beta.2",
|
|
8
|
+
"@kumwe/studio-preview": "0.1.0-beta.2",
|
|
9
|
+
"@kumwe/studio-protocol": "0.1.0-beta.2",
|
|
10
|
+
"@kumwe/studio-renderer-web": "0.1.0-beta.2",
|
|
11
|
+
"@kumwe/studio-rich-text": "0.1.0-beta.2",
|
|
12
|
+
"@kumwe/studio": "0.1.0-beta.2",
|
|
13
|
+
"@kumwe/studio-testkit": "0.1.0-beta.2"
|
|
14
|
+
},
|
|
15
|
+
"browserArtifacts": {
|
|
16
|
+
"manifest": {
|
|
17
|
+
"name": "studio-assets.json",
|
|
18
|
+
"schema": "https://schemas.kumwe.org/studio/v1/studio-browser-assets.schema.json"
|
|
19
|
+
},
|
|
20
|
+
"authoringArchive": {
|
|
21
|
+
"archiveStem": "studio-browser-0.1.0-beta.2",
|
|
22
|
+
"assetRole": "browser-module",
|
|
23
|
+
"loading": "module"
|
|
24
|
+
},
|
|
25
|
+
"enhancementRuntime": {
|
|
26
|
+
"assetRole": "enhancement-runtime",
|
|
27
|
+
"loading": "defer",
|
|
28
|
+
"package": "@kumwe/studio-renderer-web",
|
|
29
|
+
"packageBasePath": "dist/browser/"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"protocolVersion": "0.1.0-draft.2",
|
|
33
|
+
"corpusManifestDigest": "sha256-PupdZVv+htI0wd7bnFtwVdFzhYVB7DxTXh+viiBClNM=",
|
|
34
|
+
"claimedProfiles": []
|
|
35
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "authoring-http-vector",
|
|
4
|
+
"id": "vectors/authoring-http-transport-matrix",
|
|
5
|
+
"operations": [
|
|
6
|
+
{
|
|
7
|
+
"route": "authoring/resolve-target",
|
|
8
|
+
"capability": "studio.operation/authoring.resolve-target",
|
|
9
|
+
"argumentMember": "request",
|
|
10
|
+
"requestSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/resolveTargetRequest",
|
|
11
|
+
"responseSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/resolveTargetResult",
|
|
12
|
+
"mutating": false,
|
|
13
|
+
"idempotencyKey": "forbidden",
|
|
14
|
+
"expectedRevision": "forbidden",
|
|
15
|
+
"resourceContextMatch": true,
|
|
16
|
+
"successStatus": 200
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"route": "authoring/list-types",
|
|
20
|
+
"capability": "studio.operation/authoring.list-types",
|
|
21
|
+
"argumentMember": "query",
|
|
22
|
+
"requestSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/listTypesRequest",
|
|
23
|
+
"responseSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/listTypesResult",
|
|
24
|
+
"mutating": false,
|
|
25
|
+
"idempotencyKey": "forbidden",
|
|
26
|
+
"expectedRevision": "forbidden",
|
|
27
|
+
"resourceContextMatch": true,
|
|
28
|
+
"successStatus": 200
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"route": "authoring/start",
|
|
32
|
+
"capability": "studio.operation/authoring.start",
|
|
33
|
+
"argumentMember": "request",
|
|
34
|
+
"requestSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/startRequest",
|
|
35
|
+
"responseSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/startResult",
|
|
36
|
+
"mutating": true,
|
|
37
|
+
"idempotencyKey": "required",
|
|
38
|
+
"expectedRevision": "forbidden",
|
|
39
|
+
"resourceContextMatch": true,
|
|
40
|
+
"successStatus": 200
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"route": "authoring/plan-save",
|
|
44
|
+
"capability": "studio.operation/authoring.plan-save",
|
|
45
|
+
"argumentMember": "intent",
|
|
46
|
+
"requestSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/planSaveRequest",
|
|
47
|
+
"responseSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/planSaveResult",
|
|
48
|
+
"mutating": false,
|
|
49
|
+
"idempotencyKey": "forbidden",
|
|
50
|
+
"expectedRevision": "forbidden",
|
|
51
|
+
"resourceContextMatch": false,
|
|
52
|
+
"successStatus": 200
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"route": "authoring/save-item",
|
|
56
|
+
"capability": "studio.operation/authoring.save-item",
|
|
57
|
+
"argumentMember": "request",
|
|
58
|
+
"requestSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/saveItemRequest",
|
|
59
|
+
"responseSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/saveItemResult",
|
|
60
|
+
"mutating": true,
|
|
61
|
+
"idempotencyKey": "required",
|
|
62
|
+
"expectedRevision": "forbidden",
|
|
63
|
+
"resourceContextMatch": false,
|
|
64
|
+
"successStatus": 200
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"route": "authoring/save-new-type-version",
|
|
68
|
+
"capability": "studio.operation/authoring.save-new-type-version",
|
|
69
|
+
"argumentMember": "request",
|
|
70
|
+
"requestSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/saveNewTypeVersionRequest",
|
|
71
|
+
"responseSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/saveNewTypeVersionResult",
|
|
72
|
+
"mutating": true,
|
|
73
|
+
"idempotencyKey": "required",
|
|
74
|
+
"expectedRevision": "forbidden",
|
|
75
|
+
"resourceContextMatch": false,
|
|
76
|
+
"successStatus": 200
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"route": "authoring/save-as-new-type",
|
|
80
|
+
"capability": "studio.operation/authoring.save-as-new-type",
|
|
81
|
+
"argumentMember": "request",
|
|
82
|
+
"requestSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/saveAsNewTypeRequest",
|
|
83
|
+
"responseSchema": "https://schemas.kumwe.org/studio/v1/authoring-http.schema.json#/$defs/saveAsNewTypeResult",
|
|
84
|
+
"mutating": true,
|
|
85
|
+
"idempotencyKey": "required",
|
|
86
|
+
"expectedRevision": "forbidden",
|
|
87
|
+
"resourceContextMatch": false,
|
|
88
|
+
"successStatus": 200
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"securityCases": [
|
|
92
|
+
{
|
|
93
|
+
"id": "accepted",
|
|
94
|
+
"authenticated": true,
|
|
95
|
+
"requestIntegrity": true,
|
|
96
|
+
"request": "valid",
|
|
97
|
+
"expect": { "outcome": "result", "status": 200, "dispatch": true }
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "unauthenticated",
|
|
101
|
+
"authenticated": false,
|
|
102
|
+
"requestIntegrity": true,
|
|
103
|
+
"request": "valid",
|
|
104
|
+
"expect": {
|
|
105
|
+
"outcome": "error",
|
|
106
|
+
"status": 401,
|
|
107
|
+
"category": "unauthenticated",
|
|
108
|
+
"dispatch": false
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "csrf-refused",
|
|
113
|
+
"authenticated": true,
|
|
114
|
+
"requestIntegrity": false,
|
|
115
|
+
"request": "valid",
|
|
116
|
+
"expect": { "outcome": "error", "status": 403, "category": "forbidden", "dispatch": false }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "malformed-json",
|
|
120
|
+
"authenticated": true,
|
|
121
|
+
"requestIntegrity": true,
|
|
122
|
+
"request": "malformed-json",
|
|
123
|
+
"expect": {
|
|
124
|
+
"outcome": "error",
|
|
125
|
+
"status": 400,
|
|
126
|
+
"category": "invalid-request",
|
|
127
|
+
"dispatch": false
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "context-mismatch",
|
|
132
|
+
"authenticated": true,
|
|
133
|
+
"requestIntegrity": true,
|
|
134
|
+
"request": "context-mismatch",
|
|
135
|
+
"expect": {
|
|
136
|
+
"outcome": "error",
|
|
137
|
+
"status": 400,
|
|
138
|
+
"category": "invalid-request",
|
|
139
|
+
"dispatch": false
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "missing-idempotency",
|
|
144
|
+
"authenticated": true,
|
|
145
|
+
"requestIntegrity": true,
|
|
146
|
+
"request": "missing-idempotency-key",
|
|
147
|
+
"expect": {
|
|
148
|
+
"outcome": "error",
|
|
149
|
+
"status": 400,
|
|
150
|
+
"category": "invalid-request",
|
|
151
|
+
"dispatch": false
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"id": "wrong-operation",
|
|
156
|
+
"authenticated": true,
|
|
157
|
+
"requestIntegrity": true,
|
|
158
|
+
"request": "wrong-operation-id",
|
|
159
|
+
"expect": {
|
|
160
|
+
"outcome": "error",
|
|
161
|
+
"status": 400,
|
|
162
|
+
"category": "invalid-request",
|
|
163
|
+
"dispatch": false
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "host-conflict",
|
|
168
|
+
"authenticated": true,
|
|
169
|
+
"requestIntegrity": true,
|
|
170
|
+
"request": "host-conflict",
|
|
171
|
+
"expect": { "outcome": "error", "status": 409, "category": "conflict", "dispatch": true }
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "host-rate-limited",
|
|
175
|
+
"authenticated": true,
|
|
176
|
+
"requestIntegrity": true,
|
|
177
|
+
"request": "host-rate-limited",
|
|
178
|
+
"expect": {
|
|
179
|
+
"outcome": "error",
|
|
180
|
+
"status": 429,
|
|
181
|
+
"category": "rate-limited",
|
|
182
|
+
"dispatch": true
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "host-internal",
|
|
187
|
+
"authenticated": true,
|
|
188
|
+
"requestIntegrity": true,
|
|
189
|
+
"request": "host-internal-failure",
|
|
190
|
+
"expect": { "outcome": "error", "status": 500, "category": "internal", "dispatch": true }
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"errorMappings": [
|
|
194
|
+
{ "category": "invalid-request", "status": 400 },
|
|
195
|
+
{ "category": "unauthenticated", "status": 401 },
|
|
196
|
+
{ "category": "forbidden", "status": 403 },
|
|
197
|
+
{ "category": "not-found", "status": 404 },
|
|
198
|
+
{ "category": "conflict", "status": 409 },
|
|
199
|
+
{ "category": "validation-failed", "status": 422 },
|
|
200
|
+
{ "category": "incompatible", "status": 400 },
|
|
201
|
+
{ "category": "limit-exceeded", "status": 413 },
|
|
202
|
+
{ "category": "rate-limited", "status": 429 },
|
|
203
|
+
{ "category": "unavailable", "status": 503 },
|
|
204
|
+
{ "category": "cancelled", "status": 400 },
|
|
205
|
+
{ "category": "internal", "status": 500 }
|
|
206
|
+
],
|
|
207
|
+
"successorContextCases": [
|
|
208
|
+
{
|
|
209
|
+
"id": "accepted-advance",
|
|
210
|
+
"beforeContext": { "key": "returns/articles/entry-r7" },
|
|
211
|
+
"planReference": {
|
|
212
|
+
"id": "save-plans/article-entry-r8",
|
|
213
|
+
"revision": "save-plan-r1",
|
|
214
|
+
"successorContext": { "key": "returns/articles/entry-r8" }
|
|
215
|
+
},
|
|
216
|
+
"resultContext": { "key": "returns/articles/entry-r8" },
|
|
217
|
+
"expect": {
|
|
218
|
+
"outcome": "accepted",
|
|
219
|
+
"acceptedContext": { "key": "returns/articles/entry-r8" }
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"id": "mismatched-result",
|
|
224
|
+
"beforeContext": { "key": "returns/articles/entry-r7" },
|
|
225
|
+
"planReference": {
|
|
226
|
+
"id": "save-plans/article-entry-r8",
|
|
227
|
+
"revision": "save-plan-r1",
|
|
228
|
+
"successorContext": { "key": "returns/articles/entry-r8" }
|
|
229
|
+
},
|
|
230
|
+
"resultContext": { "key": "returns/articles/unplanned" },
|
|
231
|
+
"expect": {
|
|
232
|
+
"outcome": "rejected",
|
|
233
|
+
"code": "studio.host/unexpected-authoring-save-result"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|