@kumwe/studio-testkit 0.1.0-alpha.7 → 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 +122 -23
- 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 +571 -37
- 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 +68 -5
- package/dist/host-testbed.d.ts.map +1 -1
- package/dist/host-testbed.js +1 -547
- 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 +88 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -140
- 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-capabilities.example.json +2 -2
- package/fixtures/host-operations.example.json +77 -0
- package/fixtures/plugin.example.json +12 -0
- package/fixtures/preview.render.example.json +1 -0
- package/fixtures/reusable-content-type.example.json +26 -0
- package/fixtures/studio-config.example.json +3 -3
- 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-capabilities.invalid-protocol-version.json +1 -1
- 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/host-sequence.pending-expectation.json +52 -0
- package/invalid/host-sequence.preview-render-missing-request-id.json +50 -0
- package/invalid/preview-message.activated-unknown-interaction.json +1 -1
- package/invalid/preview-message.duplicate-marker.json +24 -0
- package/invalid/preview-message.invalid-digest.json +1 -0
- package/invalid/preview-message.invalid-marker-grammar.json +19 -0
- package/invalid/preview-message.missing-marker-map.json +20 -0
- package/invalid/preview-message.missing-render-request-id.json +18 -0
- package/invalid/preview-message.unknown-type.json +13 -0
- package/invalid/preview-message.viewport-height-too-small.json +13 -0
- package/invalid/preview-message.viewport-unsafe-role.json +13 -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/artifact.dependencies.result.json +2 -2
- package/vectors/host/artifact.load.stored.json +2 -2
- package/vectors/host/artifact.load.unknown.error.json +2 -2
- package/vectors/host/artifact.publish.accepted.json +2 -2
- package/vectors/host/artifact.publish.forbidden.error.json +1 -1
- package/vectors/host/artifact.publish.stale.error.json +2 -2
- package/vectors/host/artifact.save.accepted.json +2 -2
- package/vectors/host/artifact.save.forbidden.error.json +1 -1
- package/vectors/host/artifact.save.stale.error.json +2 -2
- package/vectors/host/artifact.unpublish.stale.error.json +2 -2
- package/vectors/host/envelope.malformed-context.error.json +2 -2
- package/vectors/host/envelope.protocol-version.error.json +1 -1
- package/vectors/host/envelope.stale-generation.error.json +2 -2
- package/vectors/host/localization.messages.unknown-locale.error.json +2 -2
- package/vectors/host/media.abort-upload.unknown.error.json +1 -1
- package/vectors/host/media.authorize-upload.granted.json +1 -1
- package/vectors/host/media.authorize-upload.path-filename.error.json +1 -1
- package/vectors/host/media.authorize-upload.too-large.error.json +1 -1
- package/vectors/host/media.complete-upload.unknown.error.json +1 -1
- package/vectors/host/media.get.unknown.json +2 -2
- package/vectors/host/media.import-external.private-host.error.json +1 -1
- package/vectors/host/media.list.cursor.error.json +2 -2
- package/vectors/host/media.list.limit.error.json +2 -2
- package/vectors/host/media.upload-status.unknown.error.json +1 -1
- package/vectors/host/model.get.stored.json +37 -0
- package/vectors/host/model.list.authorized.json +31 -0
- package/vectors/host/permission.explain.withheld.json +2 -2
- package/vectors/host/permission.refresh.snapshot.json +2 -2
- package/vectors/host/recovery.load.absent.json +2 -2
- package/vectors/host/telemetry.emit.accepted.json +2 -2
- package/vectors/host/telemetry.emit.non-primitive.error.json +2 -2
- package/vectors/host-sequence/artifact.publish.changed-intent.sequence.json +75 -0
- package/vectors/host-sequence/artifact.publish.idempotent-replay.sequence.json +111 -0
- package/vectors/host-sequence/preview.cancel.cross-context.sequence.json +78 -0
- package/vectors/host-sequence/preview.render.cancelled.sequence.json +75 -0
- package/vectors/host-sequence/recovery.store.canonical-number.sequence.json +72 -0
- package/vectors/host-sequence/recovery.store.changed-context.sequence.json +61 -0
- package/vectors/host-sequence/recovery.store.rate-limited.sequence.json +93 -0
- package/vectors/host-sequence/recovery.store.resource-scope.sequence.json +61 -0
- package/vectors/host-sequence/recovery.store.wrong-operation-id.sequence.json +56 -0
- package/vectors/preview/canonical-preorder.json +102 -0
- package/vectors/preview/empty-draft.json +36 -0
- package/vectors/schema-profile/alternative-limit.accepted.json +95 -0
- package/vectors/schema-profile/alternative-limit.rejected.json +92 -0
- package/vectors/schema-profile/array-composition.accepted.json +35 -0
- package/vectors/schema-profile/byte-limit.accepted.json +30 -0
- package/vectors/schema-profile/byte-limit.rejected.json +26 -0
- package/vectors/schema-profile/closed-object.accepted.json +38 -0
- package/vectors/schema-profile/decimal-multiple.accepted.json +54 -0
- package/vectors/schema-profile/depth-limit.accepted.json +90 -0
- package/vectors/schema-profile/depth-limit.rejected.json +88 -0
- package/vectors/schema-profile/description-limit.accepted.json +29 -0
- package/vectors/schema-profile/description-limit.rejected.json +25 -0
- package/vectors/schema-profile/diagnostic-precedence.rejected.json +26 -0
- package/vectors/schema-profile/duplicate-dependent-required.rejected.json +21 -0
- package/vectors/schema-profile/duplicate-required.rejected.json +18 -0
- package/vectors/schema-profile/empty-combinator.rejected.json +17 -0
- package/vectors/schema-profile/empty-enum.rejected.json +17 -0
- package/vectors/schema-profile/enum-limit.accepted.json +89 -0
- package/vectors/schema-profile/enum-limit.rejected.json +84 -0
- package/vectors/schema-profile/examples-limit.accepted.json +35 -0
- package/vectors/schema-profile/examples-limit.rejected.json +31 -0
- package/vectors/schema-profile/format-keyword.rejected.json +17 -0
- package/vectors/schema-profile/forward-reference-path-precedence.rejected.json +20 -0
- package/vectors/schema-profile/invalid-pointer.rejected.json +18 -0
- package/vectors/schema-profile/json-depth-limit.accepted.json +278 -0
- package/vectors/schema-profile/json-depth-limit.rejected.json +276 -0
- package/vectors/schema-profile/json-item-limit.accepted.json +686 -0
- package/vectors/schema-profile/json-item-limit.rejected.json +682 -0
- package/vectors/schema-profile/json-property-limit.accepted.json +1031 -0
- package/vectors/schema-profile/json-property-limit.rejected.json +1028 -0
- package/vectors/schema-profile/local-reference.accepted.json +28 -0
- package/vectors/schema-profile/memoized-diagnostic.accepted.json +31 -0
- package/vectors/schema-profile/node-limit.accepted.json +1097 -0
- package/vectors/schema-profile/node-limit.rejected.json +1094 -0
- package/vectors/schema-profile/non-object-root.rejected.json +9 -0
- package/vectors/schema-profile/non-schema-reference.rejected.json +21 -0
- package/vectors/schema-profile/object-key-limit.accepted.json +32 -0
- package/vectors/schema-profile/object-key-limit.rejected.json +28 -0
- package/vectors/schema-profile/open-root.rejected.json +13 -0
- package/vectors/schema-profile/percent-encoded-pointer.rejected.json +26 -0
- package/vectors/schema-profile/property-name-limit.accepted.json +543 -0
- package/vectors/schema-profile/property-name-limit.rejected.json +536 -0
- package/vectors/schema-profile/recursive-diagnostic-precedence.rejected.json +30 -0
- package/vectors/schema-profile/recursive-reference.rejected.json +24 -0
- package/vectors/schema-profile/reference-fanout.accepted.json +662 -0
- package/vectors/schema-profile/reference-length-limit.accepted.json +45 -0
- package/vectors/schema-profile/reference-length-limit.rejected.json +39 -0
- package/vectors/schema-profile/reference-limit.accepted.json +416 -0
- package/vectors/schema-profile/reference-limit.rejected.json +415 -0
- package/vectors/schema-profile/reference-vs-keyword-precedence.rejected.json +22 -0
- package/vectors/schema-profile/reserved-pointer.rejected.json +26 -0
- package/vectors/schema-profile/root-diagnostic-precedence.rejected.json +16 -0
- package/vectors/schema-profile/root-vs-reference-precedence.rejected.json +19 -0
- package/vectors/schema-profile/schema-map-limit.accepted.json +539 -0
- package/vectors/schema-profile/schema-map-limit.rejected.json +536 -0
- package/vectors/schema-profile/semantic-recursion-precedence.rejected.json +21 -0
- package/vectors/schema-profile/semantic-reference-precedence.rejected.json +21 -0
- package/vectors/schema-profile/title-limit.accepted.json +29 -0
- package/vectors/schema-profile/title-limit.rejected.json +25 -0
- package/vectors/schema-profile/unresolved-reference.rejected.json +17 -0
- package/vectors/schema-profile/unsafe-dependent-required.rejected.json +24 -0
- package/vectors/schema-profile/unsafe-member.rejected.json +17 -0
- package/vectors/schema-profile/unsafe-required.rejected.json +17 -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
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
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "binding-projection-vector",
|
|
4
|
+
"id": "binding-projection/app-content-fields-resolved",
|
|
5
|
+
"description": "An App-like Content projection exposes compatible visible fields in authoring order, preserves declared controls, and resolves exact entry-field bindings.",
|
|
6
|
+
"profile": "studio.profile/binding-projection-v1",
|
|
7
|
+
"blueprint": {
|
|
8
|
+
"contractVersion": "0.1-draft",
|
|
9
|
+
"kind": "blueprint",
|
|
10
|
+
"id": "blueprints/article-page",
|
|
11
|
+
"version": "1.0.0",
|
|
12
|
+
"revision": "blueprint-r1",
|
|
13
|
+
"owner": { "id": "studio.test/host", "version": "1.0.0" },
|
|
14
|
+
"status": "draft",
|
|
15
|
+
"label": { "key": "studio.test/article-page", "defaultMessage": "Article page" },
|
|
16
|
+
"model": {
|
|
17
|
+
"id": "content-model:00000000-0000-4000-8000-000000000001",
|
|
18
|
+
"version": "0.0.4",
|
|
19
|
+
"revision": "content-type-v4"
|
|
20
|
+
},
|
|
21
|
+
"dependencyLock": {
|
|
22
|
+
"theme": { "id": "studio.test/theme", "version": "1.0.0", "revision": "theme-r1" },
|
|
23
|
+
"blocks": [{ "type": "studio.test/article-card", "version": "1.0.0", "revision": "block-r1" }]
|
|
24
|
+
},
|
|
25
|
+
"roots": [
|
|
26
|
+
{
|
|
27
|
+
"id": "article-card-1",
|
|
28
|
+
"type": "studio.test/article-card",
|
|
29
|
+
"version": "1.0.0",
|
|
30
|
+
"properties": {},
|
|
31
|
+
"bindings": {
|
|
32
|
+
"headline": {
|
|
33
|
+
"source": { "kind": "entry-field", "fieldPath": ["data_title"] },
|
|
34
|
+
"transforms": [],
|
|
35
|
+
"onNull": "empty",
|
|
36
|
+
"onError": "error"
|
|
37
|
+
},
|
|
38
|
+
"labels": {
|
|
39
|
+
"source": { "kind": "entry-field", "fieldPath": ["data_tags"] },
|
|
40
|
+
"transforms": [],
|
|
41
|
+
"onNull": "empty",
|
|
42
|
+
"onError": "error"
|
|
43
|
+
},
|
|
44
|
+
"manual": {
|
|
45
|
+
"source": { "kind": "static-value", "value": "Fallback" },
|
|
46
|
+
"transforms": [],
|
|
47
|
+
"onNull": "empty",
|
|
48
|
+
"onError": "error"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"slots": {},
|
|
52
|
+
"authoring": { "mode": "content" }
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"model": {
|
|
57
|
+
"contractVersion": "0.1-draft",
|
|
58
|
+
"kind": "content-model",
|
|
59
|
+
"id": "content-model:00000000-0000-4000-8000-000000000001",
|
|
60
|
+
"version": "0.0.4",
|
|
61
|
+
"revision": "content-type-v4",
|
|
62
|
+
"owner": { "id": "kumwe.app/content", "version": "2.0.0" },
|
|
63
|
+
"status": "published",
|
|
64
|
+
"label": { "key": "kumwe.app/article", "defaultMessage": "Article" },
|
|
65
|
+
"fields": [
|
|
66
|
+
{
|
|
67
|
+
"id": "data_title",
|
|
68
|
+
"kind": "string",
|
|
69
|
+
"label": { "key": "kumwe.app/title", "defaultMessage": "Title" },
|
|
70
|
+
"required": true,
|
|
71
|
+
"localized": true,
|
|
72
|
+
"cardinality": "one",
|
|
73
|
+
"authoring": { "control": "studio.control/single-line-text", "order": 0 }
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "data_contact",
|
|
77
|
+
"kind": "string",
|
|
78
|
+
"label": { "key": "kumwe.app/contact", "defaultMessage": "Contact" },
|
|
79
|
+
"required": false,
|
|
80
|
+
"localized": true,
|
|
81
|
+
"cardinality": "one",
|
|
82
|
+
"authoring": { "control": "kumwe.app/email", "order": 1 }
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "data_category",
|
|
86
|
+
"kind": "enum",
|
|
87
|
+
"label": { "key": "kumwe.app/category", "defaultMessage": "Category" },
|
|
88
|
+
"required": false,
|
|
89
|
+
"localized": true,
|
|
90
|
+
"cardinality": "one",
|
|
91
|
+
"enumValues": [
|
|
92
|
+
{
|
|
93
|
+
"value": "guide",
|
|
94
|
+
"label": { "key": "kumwe.app/category-guide", "defaultMessage": "Guide" }
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"authoring": { "control": "studio.control/select", "order": 2 }
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "data_internal",
|
|
101
|
+
"kind": "string",
|
|
102
|
+
"label": { "key": "kumwe.app/internal", "defaultMessage": "Internal" },
|
|
103
|
+
"required": false,
|
|
104
|
+
"localized": false,
|
|
105
|
+
"cardinality": "one",
|
|
106
|
+
"authoring": {
|
|
107
|
+
"control": "studio.control/single-line-text",
|
|
108
|
+
"hidden": true,
|
|
109
|
+
"order": 3
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "data_tags",
|
|
114
|
+
"kind": "collection",
|
|
115
|
+
"itemKind": "string",
|
|
116
|
+
"label": { "key": "kumwe.app/tags", "defaultMessage": "Tags" },
|
|
117
|
+
"required": false,
|
|
118
|
+
"localized": true,
|
|
119
|
+
"cardinality": "many",
|
|
120
|
+
"authoring": { "control": "kumwe.app/schema-group", "order": 4 }
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"relationships": []
|
|
124
|
+
},
|
|
125
|
+
"blockDefinitions": [
|
|
126
|
+
{
|
|
127
|
+
"contractVersion": "0.1-draft",
|
|
128
|
+
"kind": "block-definition",
|
|
129
|
+
"type": "studio.test/article-card",
|
|
130
|
+
"version": "1.0.0",
|
|
131
|
+
"revision": "block-r1",
|
|
132
|
+
"owner": { "id": "studio.test/blocks", "version": "1.0.0" },
|
|
133
|
+
"label": { "key": "studio.test/article-card", "defaultMessage": "Article card" },
|
|
134
|
+
"category": "studio.category/content",
|
|
135
|
+
"propertySchema": { "type": "object", "additionalProperties": false },
|
|
136
|
+
"slots": [],
|
|
137
|
+
"ports": [
|
|
138
|
+
{
|
|
139
|
+
"id": "headline",
|
|
140
|
+
"label": { "key": "studio.test/headline", "defaultMessage": "Headline" },
|
|
141
|
+
"valueType": "text",
|
|
142
|
+
"required": true,
|
|
143
|
+
"multiple": false
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "labels",
|
|
147
|
+
"label": { "key": "studio.test/labels", "defaultMessage": "Labels" },
|
|
148
|
+
"valueType": "text",
|
|
149
|
+
"required": false,
|
|
150
|
+
"multiple": true
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "featured",
|
|
154
|
+
"label": { "key": "studio.test/featured", "defaultMessage": "Featured" },
|
|
155
|
+
"valueType": "boolean",
|
|
156
|
+
"required": false,
|
|
157
|
+
"multiple": false
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "manual",
|
|
161
|
+
"label": { "key": "studio.test/manual", "defaultMessage": "Manual" },
|
|
162
|
+
"valueType": "text",
|
|
163
|
+
"required": false,
|
|
164
|
+
"multiple": false
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"editingModes": ["blueprint", "content"],
|
|
168
|
+
"themeControls": [],
|
|
169
|
+
"rendererRequirements": [
|
|
170
|
+
{
|
|
171
|
+
"surface": "preview",
|
|
172
|
+
"capability": "studio.renderer/test",
|
|
173
|
+
"versions": "^1.0.0"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"accessibility": {
|
|
177
|
+
"category": "text",
|
|
178
|
+
"accessibleName": "derived",
|
|
179
|
+
"keyboard": {
|
|
180
|
+
"key": "studio.test/article-card-keyboard",
|
|
181
|
+
"defaultMessage": "Use the outline controls."
|
|
182
|
+
},
|
|
183
|
+
"reducedMotion": "not-applicable",
|
|
184
|
+
"outputChecks": ["studio.check/article-card"]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"expect": {
|
|
189
|
+
"model": {
|
|
190
|
+
"id": "content-model:00000000-0000-4000-8000-000000000001",
|
|
191
|
+
"version": "0.0.4",
|
|
192
|
+
"revision": "content-type-v4"
|
|
193
|
+
},
|
|
194
|
+
"nodes": [
|
|
195
|
+
{
|
|
196
|
+
"nodeId": "article-card-1",
|
|
197
|
+
"ports": [
|
|
198
|
+
{
|
|
199
|
+
"port": "headline",
|
|
200
|
+
"status": "resolved",
|
|
201
|
+
"bindingSourceKind": "entry-field",
|
|
202
|
+
"boundFieldPath": ["data_title"],
|
|
203
|
+
"candidates": [
|
|
204
|
+
{
|
|
205
|
+
"fieldPath": ["data_title"],
|
|
206
|
+
"kind": "string",
|
|
207
|
+
"cardinality": "one",
|
|
208
|
+
"control": "studio.control/single-line-text"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"fieldPath": ["data_contact"],
|
|
212
|
+
"kind": "string",
|
|
213
|
+
"cardinality": "one",
|
|
214
|
+
"control": "kumwe.app/email"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"fieldPath": ["data_category"],
|
|
218
|
+
"kind": "enum",
|
|
219
|
+
"cardinality": "one",
|
|
220
|
+
"control": "studio.control/select"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"multiple": false,
|
|
224
|
+
"required": true,
|
|
225
|
+
"valueType": "text"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"port": "labels",
|
|
229
|
+
"status": "resolved",
|
|
230
|
+
"bindingSourceKind": "entry-field",
|
|
231
|
+
"boundFieldPath": ["data_tags"],
|
|
232
|
+
"candidates": [
|
|
233
|
+
{
|
|
234
|
+
"fieldPath": ["data_tags"],
|
|
235
|
+
"kind": "collection",
|
|
236
|
+
"itemKind": "string",
|
|
237
|
+
"cardinality": "many",
|
|
238
|
+
"control": "kumwe.app/schema-group"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"multiple": true,
|
|
242
|
+
"required": false,
|
|
243
|
+
"valueType": "text"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"port": "featured",
|
|
247
|
+
"status": "unbound",
|
|
248
|
+
"candidates": [],
|
|
249
|
+
"multiple": false,
|
|
250
|
+
"required": false,
|
|
251
|
+
"valueType": "boolean"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"port": "manual",
|
|
255
|
+
"status": "non-field-source",
|
|
256
|
+
"bindingSourceKind": "static-value",
|
|
257
|
+
"candidates": [
|
|
258
|
+
{
|
|
259
|
+
"fieldPath": ["data_title"],
|
|
260
|
+
"kind": "string",
|
|
261
|
+
"cardinality": "one",
|
|
262
|
+
"control": "studio.control/single-line-text"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"fieldPath": ["data_contact"],
|
|
266
|
+
"kind": "string",
|
|
267
|
+
"cardinality": "one",
|
|
268
|
+
"control": "kumwe.app/email"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"fieldPath": ["data_category"],
|
|
272
|
+
"kind": "enum",
|
|
273
|
+
"cardinality": "one",
|
|
274
|
+
"control": "studio.control/select"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"multiple": false,
|
|
278
|
+
"required": false,
|
|
279
|
+
"valueType": "text"
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
"diagnostics": []
|
|
285
|
+
}
|
|
286
|
+
}
|