@disclosureos/schema 1.1.0 → 2.0.0-beta.1

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,497 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "kind": {
6
+ "type": "string",
7
+ "const": "source_intake"
8
+ },
9
+ "schemaVersion": {
10
+ "type": "string",
11
+ "const": "0.1.0"
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
16
+ },
17
+ "receivedAt": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "pattern": "\\S"
21
+ },
22
+ "source": {
23
+ "type": "object",
24
+ "properties": {
25
+ "publisher": {
26
+ "anyOf": [
27
+ {
28
+ "type": "object",
29
+ "properties": {
30
+ "state": {
31
+ "type": "string",
32
+ "const": "unknown"
33
+ },
34
+ "reason": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "pattern": "\\S"
38
+ }
39
+ },
40
+ "required": [
41
+ "state",
42
+ "reason"
43
+ ],
44
+ "additionalProperties": false
45
+ },
46
+ {
47
+ "type": "object",
48
+ "properties": {
49
+ "state": {
50
+ "type": "string",
51
+ "const": "declared"
52
+ },
53
+ "value": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "pattern": "\\S"
57
+ }
58
+ },
59
+ "required": [
60
+ "state",
61
+ "value"
62
+ ],
63
+ "additionalProperties": false
64
+ }
65
+ ]
66
+ },
67
+ "uri": {
68
+ "type": "string",
69
+ "pattern": "^https:\\/\\/"
70
+ }
71
+ },
72
+ "required": [
73
+ "publisher"
74
+ ],
75
+ "additionalProperties": false
76
+ },
77
+ "access": {
78
+ "type": "string",
79
+ "enum": [
80
+ "public",
81
+ "restricted",
82
+ "unknown"
83
+ ]
84
+ },
85
+ "license": {
86
+ "anyOf": [
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "state": {
91
+ "type": "string",
92
+ "const": "unknown"
93
+ },
94
+ "reason": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "pattern": "\\S"
98
+ }
99
+ },
100
+ "required": [
101
+ "state",
102
+ "reason"
103
+ ],
104
+ "additionalProperties": false
105
+ },
106
+ {
107
+ "type": "object",
108
+ "properties": {
109
+ "state": {
110
+ "type": "string",
111
+ "const": "declared"
112
+ },
113
+ "value": {
114
+ "type": "string",
115
+ "minLength": 1,
116
+ "pattern": "\\S"
117
+ }
118
+ },
119
+ "required": [
120
+ "state",
121
+ "value"
122
+ ],
123
+ "additionalProperties": false
124
+ }
125
+ ]
126
+ },
127
+ "artifacts": {
128
+ "minItems": 1,
129
+ "type": "array",
130
+ "items": {
131
+ "type": "object",
132
+ "properties": {
133
+ "id": {
134
+ "type": "string",
135
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
136
+ },
137
+ "originalName": {
138
+ "type": "string",
139
+ "minLength": 1,
140
+ "pattern": "\\S"
141
+ },
142
+ "role": {
143
+ "type": "string",
144
+ "enum": [
145
+ "unknown",
146
+ "native_raw",
147
+ "derived",
148
+ "source_export",
149
+ "documentation"
150
+ ]
151
+ },
152
+ "format": {
153
+ "anyOf": [
154
+ {
155
+ "type": "object",
156
+ "properties": {
157
+ "state": {
158
+ "type": "string",
159
+ "const": "unknown"
160
+ },
161
+ "reason": {
162
+ "type": "string",
163
+ "minLength": 1,
164
+ "pattern": "\\S"
165
+ }
166
+ },
167
+ "required": [
168
+ "state",
169
+ "reason"
170
+ ],
171
+ "additionalProperties": false
172
+ },
173
+ {
174
+ "type": "object",
175
+ "properties": {
176
+ "state": {
177
+ "type": "string",
178
+ "const": "declared"
179
+ },
180
+ "value": {
181
+ "type": "string",
182
+ "minLength": 1,
183
+ "pattern": "\\S"
184
+ }
185
+ },
186
+ "required": [
187
+ "state",
188
+ "value"
189
+ ],
190
+ "additionalProperties": false
191
+ }
192
+ ]
193
+ },
194
+ "sha256": {
195
+ "type": "string",
196
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
197
+ },
198
+ "byteLength": {
199
+ "type": "integer",
200
+ "minimum": 0,
201
+ "maximum": 9007199254740991
202
+ },
203
+ "context": {
204
+ "type": "object",
205
+ "properties": {
206
+ "instrument": {
207
+ "anyOf": [
208
+ {
209
+ "type": "object",
210
+ "properties": {
211
+ "state": {
212
+ "type": "string",
213
+ "const": "unknown"
214
+ },
215
+ "reason": {
216
+ "type": "string",
217
+ "minLength": 1,
218
+ "pattern": "\\S"
219
+ }
220
+ },
221
+ "required": [
222
+ "state",
223
+ "reason"
224
+ ],
225
+ "additionalProperties": false
226
+ },
227
+ {
228
+ "type": "object",
229
+ "properties": {
230
+ "state": {
231
+ "type": "string",
232
+ "const": "declared"
233
+ },
234
+ "value": {
235
+ "type": "string",
236
+ "minLength": 1,
237
+ "pattern": "\\S"
238
+ }
239
+ },
240
+ "required": [
241
+ "state",
242
+ "value"
243
+ ],
244
+ "additionalProperties": false
245
+ }
246
+ ]
247
+ },
248
+ "calibration": {
249
+ "anyOf": [
250
+ {
251
+ "type": "object",
252
+ "properties": {
253
+ "state": {
254
+ "type": "string",
255
+ "const": "unknown"
256
+ },
257
+ "reason": {
258
+ "type": "string",
259
+ "minLength": 1,
260
+ "pattern": "\\S"
261
+ }
262
+ },
263
+ "required": [
264
+ "state",
265
+ "reason"
266
+ ],
267
+ "additionalProperties": false
268
+ },
269
+ {
270
+ "type": "object",
271
+ "properties": {
272
+ "state": {
273
+ "type": "string",
274
+ "const": "declared"
275
+ },
276
+ "value": {
277
+ "type": "string",
278
+ "minLength": 1,
279
+ "pattern": "\\S"
280
+ }
281
+ },
282
+ "required": [
283
+ "state",
284
+ "value"
285
+ ],
286
+ "additionalProperties": false
287
+ }
288
+ ]
289
+ },
290
+ "clock": {
291
+ "anyOf": [
292
+ {
293
+ "type": "object",
294
+ "properties": {
295
+ "state": {
296
+ "type": "string",
297
+ "const": "unknown"
298
+ },
299
+ "reason": {
300
+ "type": "string",
301
+ "minLength": 1,
302
+ "pattern": "\\S"
303
+ }
304
+ },
305
+ "required": [
306
+ "state",
307
+ "reason"
308
+ ],
309
+ "additionalProperties": false
310
+ },
311
+ {
312
+ "type": "object",
313
+ "properties": {
314
+ "state": {
315
+ "type": "string",
316
+ "const": "declared"
317
+ },
318
+ "value": {
319
+ "type": "string",
320
+ "minLength": 1,
321
+ "pattern": "\\S"
322
+ }
323
+ },
324
+ "required": [
325
+ "state",
326
+ "value"
327
+ ],
328
+ "additionalProperties": false
329
+ }
330
+ ]
331
+ },
332
+ "acquisitionTime": {
333
+ "anyOf": [
334
+ {
335
+ "type": "object",
336
+ "properties": {
337
+ "state": {
338
+ "type": "string",
339
+ "const": "unknown"
340
+ },
341
+ "reason": {
342
+ "type": "string",
343
+ "minLength": 1,
344
+ "pattern": "\\S"
345
+ }
346
+ },
347
+ "required": [
348
+ "state",
349
+ "reason"
350
+ ],
351
+ "additionalProperties": false
352
+ },
353
+ {
354
+ "type": "object",
355
+ "properties": {
356
+ "state": {
357
+ "type": "string",
358
+ "const": "declared"
359
+ },
360
+ "kind": {
361
+ "type": "string",
362
+ "const": "instant"
363
+ },
364
+ "value": {
365
+ "type": "string",
366
+ "minLength": 1,
367
+ "pattern": "\\S"
368
+ },
369
+ "timeScale": {
370
+ "type": "string",
371
+ "const": "UTC"
372
+ }
373
+ },
374
+ "required": [
375
+ "state",
376
+ "kind",
377
+ "value",
378
+ "timeScale"
379
+ ],
380
+ "additionalProperties": false
381
+ },
382
+ {
383
+ "type": "object",
384
+ "properties": {
385
+ "state": {
386
+ "type": "string",
387
+ "const": "declared"
388
+ },
389
+ "kind": {
390
+ "type": "string",
391
+ "const": "interval"
392
+ },
393
+ "start": {
394
+ "type": "string",
395
+ "minLength": 1,
396
+ "pattern": "\\S"
397
+ },
398
+ "end": {
399
+ "type": "string",
400
+ "minLength": 1,
401
+ "pattern": "\\S"
402
+ },
403
+ "timeScale": {
404
+ "type": "string",
405
+ "const": "UTC"
406
+ }
407
+ },
408
+ "required": [
409
+ "state",
410
+ "kind",
411
+ "start",
412
+ "end",
413
+ "timeScale"
414
+ ],
415
+ "additionalProperties": false
416
+ }
417
+ ]
418
+ }
419
+ },
420
+ "required": [
421
+ "instrument",
422
+ "calibration",
423
+ "clock",
424
+ "acquisitionTime"
425
+ ],
426
+ "additionalProperties": false
427
+ }
428
+ },
429
+ "required": [
430
+ "id",
431
+ "originalName",
432
+ "role",
433
+ "format",
434
+ "sha256",
435
+ "byteLength",
436
+ "context"
437
+ ],
438
+ "additionalProperties": false
439
+ }
440
+ },
441
+ "extensions": {
442
+ "type": "object",
443
+ "propertyNames": {
444
+ "type": "string",
445
+ "pattern": "^[a-z][a-z0-9_-]*(?:\\.[a-z0-9_-]+)+(?![\\s\\S])"
446
+ },
447
+ "additionalProperties": {
448
+ "$ref": "#/$defs/__schema0"
449
+ }
450
+ }
451
+ },
452
+ "required": [
453
+ "kind",
454
+ "schemaVersion",
455
+ "id",
456
+ "receivedAt",
457
+ "source",
458
+ "access",
459
+ "license",
460
+ "artifacts"
461
+ ],
462
+ "additionalProperties": false,
463
+ "$defs": {
464
+ "__schema0": {
465
+ "anyOf": [
466
+ {
467
+ "type": "string"
468
+ },
469
+ {
470
+ "type": "number"
471
+ },
472
+ {
473
+ "type": "boolean"
474
+ },
475
+ {
476
+ "type": "null"
477
+ },
478
+ {
479
+ "type": "array",
480
+ "items": {
481
+ "$ref": "#/$defs/__schema0"
482
+ }
483
+ },
484
+ {
485
+ "type": "object",
486
+ "propertyNames": {
487
+ "type": "string"
488
+ },
489
+ "additionalProperties": {
490
+ "$ref": "#/$defs/__schema0"
491
+ }
492
+ }
493
+ ]
494
+ }
495
+ },
496
+ "$id": "urn:disclosureos:experimental:source-intake:0.1.0"
497
+ }