@siteverb/contracts 0.1.0-rc.0

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.
@@ -0,0 +1,269 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "$schema": { "$ref": "#/$defs/__schema0" },
6
+ "version": { "$ref": "#/$defs/__schema1" },
7
+ "project": { "$ref": "#/$defs/__schema2" },
8
+ "support": { "$ref": "#/$defs/__schema3" },
9
+ "tools": { "$ref": "#/$defs/__schema5" },
10
+ "journeys": { "$ref": "#/$defs/__schema23" }
11
+ },
12
+ "required": ["version", "project", "support", "tools", "journeys"],
13
+ "additionalProperties": false,
14
+ "$defs": {
15
+ "__schema0": { "type": "string", "minLength": 1, "maxLength": 500 },
16
+ "__schema1": { "type": "number", "const": 1 },
17
+ "__schema2": { "type": "string", "minLength": 1, "maxLength": 120 },
18
+ "__schema3": {
19
+ "default": [],
20
+ "maxItems": 20,
21
+ "type": "array",
22
+ "items": { "$ref": "#/$defs/__schema4" }
23
+ },
24
+ "__schema4": {
25
+ "type": "object",
26
+ "properties": {
27
+ "id": { "type": "string", "minLength": 1, "maxLength": 120 },
28
+ "version": { "type": "string", "minLength": 1, "maxLength": 120 },
29
+ "evidence": {
30
+ "type": "string",
31
+ "enum": ["real-client", "real-browser", "official-sdk", "documented-profile"]
32
+ }
33
+ },
34
+ "required": ["id", "version", "evidence"],
35
+ "additionalProperties": false
36
+ },
37
+ "__schema5": {
38
+ "minItems": 1,
39
+ "maxItems": 1000,
40
+ "type": "array",
41
+ "items": { "$ref": "#/$defs/__schema6" }
42
+ },
43
+ "__schema6": {
44
+ "type": "object",
45
+ "properties": {
46
+ "id": { "$ref": "#/$defs/__schema7" },
47
+ "name": { "$ref": "#/$defs/__schema8" },
48
+ "title": { "$ref": "#/$defs/__schema9" },
49
+ "description": { "$ref": "#/$defs/__schema10" },
50
+ "inputSchema": { "$ref": "#/$defs/__schema11" },
51
+ "annotations": { "$ref": "#/$defs/__schema12" },
52
+ "risk": { "$ref": "#/$defs/__schema13" },
53
+ "registration": { "$ref": "#/$defs/__schema14" },
54
+ "frame": { "$ref": "#/$defs/__schema15" },
55
+ "routes": { "$ref": "#/$defs/__schema16" },
56
+ "owners": { "$ref": "#/$defs/__schema18" },
57
+ "examples": { "$ref": "#/$defs/__schema20" }
58
+ },
59
+ "required": ["id", "name", "description", "risk", "registration", "frame", "examples"],
60
+ "additionalProperties": false
61
+ },
62
+ "__schema7": {
63
+ "type": "string",
64
+ "minLength": 3,
65
+ "maxLength": 128,
66
+ "pattern": "^[a-z][a-z0-9_-]*(?:\\.[a-z][a-z0-9_-]*)+$"
67
+ },
68
+ "__schema8": {
69
+ "type": "string",
70
+ "minLength": 1,
71
+ "maxLength": 128,
72
+ "pattern": "^[A-Za-z0-9_.-]+$"
73
+ },
74
+ "__schema9": { "type": "string", "minLength": 1, "maxLength": 120 },
75
+ "__schema10": { "type": "string", "minLength": 1, "maxLength": 500 },
76
+ "__schema11": {
77
+ "type": "object",
78
+ "propertyNames": { "type": "string" },
79
+ "additionalProperties": {}
80
+ },
81
+ "__schema12": {
82
+ "type": "object",
83
+ "properties": {
84
+ "readOnlyHint": { "type": "boolean" },
85
+ "untrustedContentHint": { "type": "boolean" }
86
+ },
87
+ "additionalProperties": false
88
+ },
89
+ "__schema13": { "type": "string", "enum": ["read-only", "reversible", "consequential"] },
90
+ "__schema14": {
91
+ "default": "imperative",
92
+ "type": "string",
93
+ "enum": ["imperative", "declarative"]
94
+ },
95
+ "__schema15": {
96
+ "default": "top-level",
97
+ "type": "string",
98
+ "enum": ["top-level", "same-origin-iframe", "cross-origin-iframe"]
99
+ },
100
+ "__schema16": {
101
+ "minItems": 1,
102
+ "maxItems": 200,
103
+ "type": "array",
104
+ "items": { "$ref": "#/$defs/__schema17" }
105
+ },
106
+ "__schema17": { "type": "string", "minLength": 1, "maxLength": 500 },
107
+ "__schema18": {
108
+ "minItems": 1,
109
+ "maxItems": 100,
110
+ "type": "array",
111
+ "items": { "$ref": "#/$defs/__schema19" }
112
+ },
113
+ "__schema19": { "type": "string", "minLength": 1 },
114
+ "__schema20": {
115
+ "minItems": 1,
116
+ "maxItems": 50,
117
+ "type": "array",
118
+ "items": { "$ref": "#/$defs/__schema21" }
119
+ },
120
+ "__schema21": {
121
+ "type": "object",
122
+ "properties": {
123
+ "name": { "type": "string", "minLength": 1, "maxLength": 120 },
124
+ "input": {
125
+ "type": "object",
126
+ "propertyNames": { "type": "string" },
127
+ "additionalProperties": { "$ref": "#/$defs/__schema22" }
128
+ }
129
+ },
130
+ "required": ["name", "input"],
131
+ "additionalProperties": false
132
+ },
133
+ "__schema22": {
134
+ "anyOf": [
135
+ { "type": ["string", "number", "boolean", "null"] },
136
+ { "maxItems": 1000, "type": "array", "items": { "$ref": "#/$defs/__schema22" } },
137
+ {
138
+ "type": "object",
139
+ "propertyNames": { "type": "string" },
140
+ "additionalProperties": { "$ref": "#/$defs/__schema22" }
141
+ }
142
+ ]
143
+ },
144
+ "__schema23": {
145
+ "minItems": 1,
146
+ "maxItems": 200,
147
+ "type": "array",
148
+ "items": { "$ref": "#/$defs/__schema24" }
149
+ },
150
+ "__schema24": {
151
+ "type": "object",
152
+ "properties": {
153
+ "id": { "$ref": "#/$defs/__schema7" },
154
+ "name": { "type": "string", "minLength": 1, "maxLength": 120 },
155
+ "description": { "type": "string", "minLength": 1, "maxLength": 500 },
156
+ "start": { "$ref": "#/$defs/__schema17" },
157
+ "auth": { "type": "string", "minLength": 1, "maxLength": 120 },
158
+ "owners": {
159
+ "minItems": 1,
160
+ "maxItems": 100,
161
+ "type": "array",
162
+ "items": { "$ref": "#/$defs/__schema25" }
163
+ },
164
+ "steps": {
165
+ "minItems": 1,
166
+ "maxItems": 100,
167
+ "type": "array",
168
+ "items": { "$ref": "#/$defs/__schema26" }
169
+ },
170
+ "cleanup": {
171
+ "minItems": 1,
172
+ "maxItems": 100,
173
+ "type": "array",
174
+ "items": { "$ref": "#/$defs/__schema26" }
175
+ },
176
+ "policy": {
177
+ "default": { "requireHumanBefore": [] },
178
+ "type": "object",
179
+ "properties": {
180
+ "requireHumanBefore": {
181
+ "default": [],
182
+ "maxItems": 1000,
183
+ "type": "array",
184
+ "items": { "$ref": "#/$defs/__schema7" }
185
+ }
186
+ },
187
+ "required": ["requireHumanBefore"],
188
+ "additionalProperties": false
189
+ }
190
+ },
191
+ "required": ["id", "name", "start", "steps", "policy"],
192
+ "additionalProperties": false
193
+ },
194
+ "__schema25": { "type": "string", "minLength": 1 },
195
+ "__schema26": {
196
+ "type": "object",
197
+ "properties": {
198
+ "tool": { "$ref": "#/$defs/__schema7" },
199
+ "input": {
200
+ "default": {},
201
+ "type": "object",
202
+ "propertyNames": { "type": "string" },
203
+ "additionalProperties": { "$ref": "#/$defs/__schema22" }
204
+ },
205
+ "expect": {
206
+ "type": "object",
207
+ "properties": {
208
+ "result": {
209
+ "type": "object",
210
+ "properties": {
211
+ "equals": { "$ref": "#/$defs/__schema27" },
212
+ "contains": { "$ref": "#/$defs/__schema28" }
213
+ },
214
+ "additionalProperties": false
215
+ },
216
+ "url": {
217
+ "type": "object",
218
+ "properties": {
219
+ "pathname": { "$ref": "#/$defs/__schema29" },
220
+ "searchParams": { "$ref": "#/$defs/__schema30" }
221
+ },
222
+ "additionalProperties": false
223
+ },
224
+ "dom": {
225
+ "minItems": 1,
226
+ "maxItems": 50,
227
+ "type": "array",
228
+ "items": { "$ref": "#/$defs/__schema31" }
229
+ }
230
+ },
231
+ "additionalProperties": false
232
+ }
233
+ },
234
+ "required": ["tool", "input"],
235
+ "additionalProperties": false
236
+ },
237
+ "__schema27": { "$ref": "#/$defs/__schema22" },
238
+ "__schema28": { "$ref": "#/$defs/__schema22" },
239
+ "__schema29": { "type": "string", "pattern": "^\\/.*" },
240
+ "__schema30": {
241
+ "type": "object",
242
+ "propertyNames": { "type": "string" },
243
+ "additionalProperties": { "type": "string" }
244
+ },
245
+ "__schema31": {
246
+ "type": "object",
247
+ "properties": {
248
+ "selector": { "type": "string", "minLength": 1, "maxLength": 500 },
249
+ "state": {
250
+ "default": "visible",
251
+ "type": "string",
252
+ "enum": ["attached", "detached", "visible", "hidden"]
253
+ },
254
+ "textContains": { "type": "string", "maxLength": 2000 },
255
+ "attribute": {
256
+ "type": "object",
257
+ "properties": {
258
+ "name": { "type": "string", "minLength": 1, "maxLength": 120 },
259
+ "equals": { "type": "string", "maxLength": 2000 }
260
+ },
261
+ "required": ["name", "equals"],
262
+ "additionalProperties": false
263
+ }
264
+ },
265
+ "required": ["selector", "state"],
266
+ "additionalProperties": false
267
+ }
268
+ }
269
+ }