@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,223 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "kind": {
6
+ "type": "string",
7
+ "const": "legacy_migration_review"
8
+ },
9
+ "schemaVersion": {
10
+ "type": "string",
11
+ "const": "0.1.0"
12
+ },
13
+ "namespace": {
14
+ "type": "string",
15
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}(?![\\s\\S])"
16
+ },
17
+ "source": {
18
+ "type": "object",
19
+ "properties": {
20
+ "sha256": {
21
+ "type": "string",
22
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
23
+ },
24
+ "byteLength": {
25
+ "type": "integer",
26
+ "minimum": 1,
27
+ "maximum": 8388608
28
+ }
29
+ },
30
+ "required": [
31
+ "sha256",
32
+ "byteLength"
33
+ ],
34
+ "additionalProperties": false
35
+ },
36
+ "reviewedBy": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "pattern": "\\S"
40
+ },
41
+ "reviewedAt": {
42
+ "type": "string",
43
+ "allOf": [
44
+ {
45
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
46
+ },
47
+ {
48
+ "pattern": "^(?!0000)"
49
+ },
50
+ {
51
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
52
+ }
53
+ ]
54
+ },
55
+ "decisions": {
56
+ "minItems": 1,
57
+ "maxItems": 20000,
58
+ "type": "array",
59
+ "items": {
60
+ "oneOf": [
61
+ {
62
+ "type": "object",
63
+ "properties": {
64
+ "sourceId": {
65
+ "type": "string",
66
+ "minLength": 1,
67
+ "pattern": "\\S"
68
+ },
69
+ "sourcePointers": {
70
+ "minItems": 1,
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string",
74
+ "pattern": "^\\/(?:[^~]|~[01])*(?![\\s\\S])"
75
+ }
76
+ },
77
+ "rationale": {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "pattern": "\\S"
81
+ },
82
+ "value": {
83
+ "$ref": "#/$defs/__schema0"
84
+ },
85
+ "field": {
86
+ "type": "string",
87
+ "const": "eventTime"
88
+ }
89
+ },
90
+ "required": [
91
+ "sourceId",
92
+ "sourcePointers",
93
+ "rationale",
94
+ "value",
95
+ "field"
96
+ ],
97
+ "additionalProperties": false
98
+ },
99
+ {
100
+ "type": "object",
101
+ "properties": {
102
+ "sourceId": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "pattern": "\\S"
106
+ },
107
+ "sourcePointers": {
108
+ "minItems": 1,
109
+ "type": "array",
110
+ "items": {
111
+ "type": "string",
112
+ "pattern": "^\\/(?:[^~]|~[01])*(?![\\s\\S])"
113
+ }
114
+ },
115
+ "rationale": {
116
+ "type": "string",
117
+ "minLength": 1,
118
+ "pattern": "\\S"
119
+ },
120
+ "value": {
121
+ "$ref": "#/$defs/__schema0"
122
+ },
123
+ "field": {
124
+ "type": "string",
125
+ "const": "position"
126
+ },
127
+ "frames": {
128
+ "type": "array",
129
+ "items": {
130
+ "$ref": "#/$defs/__schema1"
131
+ }
132
+ }
133
+ },
134
+ "required": [
135
+ "sourceId",
136
+ "sourcePointers",
137
+ "rationale",
138
+ "value",
139
+ "field",
140
+ "frames"
141
+ ],
142
+ "additionalProperties": false
143
+ }
144
+ ]
145
+ }
146
+ }
147
+ },
148
+ "required": [
149
+ "kind",
150
+ "schemaVersion",
151
+ "namespace",
152
+ "source",
153
+ "reviewedBy",
154
+ "reviewedAt",
155
+ "decisions"
156
+ ],
157
+ "additionalProperties": false,
158
+ "$defs": {
159
+ "__schema0": {
160
+ "anyOf": [
161
+ {
162
+ "type": "string"
163
+ },
164
+ {
165
+ "type": "number"
166
+ },
167
+ {
168
+ "type": "boolean"
169
+ },
170
+ {
171
+ "type": "null"
172
+ },
173
+ {
174
+ "type": "array",
175
+ "items": {
176
+ "$ref": "#/$defs/__schema0"
177
+ }
178
+ },
179
+ {
180
+ "type": "object",
181
+ "propertyNames": {
182
+ "type": "string"
183
+ },
184
+ "additionalProperties": {
185
+ "$ref": "#/$defs/__schema0"
186
+ }
187
+ }
188
+ ]
189
+ },
190
+ "__schema1": {
191
+ "anyOf": [
192
+ {
193
+ "type": "string"
194
+ },
195
+ {
196
+ "type": "number"
197
+ },
198
+ {
199
+ "type": "boolean"
200
+ },
201
+ {
202
+ "type": "null"
203
+ },
204
+ {
205
+ "type": "array",
206
+ "items": {
207
+ "$ref": "#/$defs/__schema1"
208
+ }
209
+ },
210
+ {
211
+ "type": "object",
212
+ "propertyNames": {
213
+ "type": "string"
214
+ },
215
+ "additionalProperties": {
216
+ "$ref": "#/$defs/__schema1"
217
+ }
218
+ }
219
+ ]
220
+ }
221
+ },
222
+ "$id": "urn:disclosureos:experimental:migration-review:0.1.0"
223
+ }
@@ -0,0 +1,278 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "kind": {
6
+ "type": "string",
7
+ "const": "physical_sample_selection"
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
+ "historyId": {
18
+ "type": "string",
19
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
20
+ },
21
+ "observationId": {
22
+ "type": "string",
23
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
24
+ },
25
+ "samples": {
26
+ "minItems": 1,
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "properties": {
31
+ "id": {
32
+ "type": "string",
33
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
34
+ },
35
+ "lineage": {
36
+ "type": "string",
37
+ "enum": [
38
+ "collected_specimen",
39
+ "derived_sample",
40
+ "mixture",
41
+ "unknown"
42
+ ]
43
+ },
44
+ "label": {
45
+ "oneOf": [
46
+ {
47
+ "type": "object",
48
+ "properties": {
49
+ "state": {
50
+ "type": "string",
51
+ "const": "known"
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
+ "type": "object",
67
+ "properties": {
68
+ "state": {
69
+ "type": "string",
70
+ "const": "unknown"
71
+ },
72
+ "reason": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "pattern": "\\S"
76
+ }
77
+ },
78
+ "required": [
79
+ "state",
80
+ "reason"
81
+ ],
82
+ "additionalProperties": false
83
+ }
84
+ ]
85
+ },
86
+ "collection": {
87
+ "oneOf": [
88
+ {
89
+ "type": "object",
90
+ "properties": {
91
+ "state": {
92
+ "type": "string",
93
+ "const": "known"
94
+ },
95
+ "collectedBy": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "pattern": "\\S"
99
+ },
100
+ "recordRef": {
101
+ "type": "string",
102
+ "pattern": "^source:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
103
+ }
104
+ },
105
+ "required": [
106
+ "state",
107
+ "collectedBy",
108
+ "recordRef"
109
+ ],
110
+ "additionalProperties": false
111
+ },
112
+ {
113
+ "type": "object",
114
+ "properties": {
115
+ "state": {
116
+ "type": "string",
117
+ "const": "unknown"
118
+ },
119
+ "reason": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "pattern": "\\S"
123
+ }
124
+ },
125
+ "required": [
126
+ "state",
127
+ "reason"
128
+ ],
129
+ "additionalProperties": false
130
+ }
131
+ ]
132
+ },
133
+ "custody": {
134
+ "oneOf": [
135
+ {
136
+ "type": "object",
137
+ "properties": {
138
+ "state": {
139
+ "type": "string",
140
+ "const": "documented"
141
+ },
142
+ "transfers": {
143
+ "type": "array",
144
+ "items": {
145
+ "type": "object",
146
+ "properties": {
147
+ "id": {
148
+ "type": "string",
149
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
150
+ },
151
+ "from": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "pattern": "\\S"
155
+ },
156
+ "to": {
157
+ "type": "string",
158
+ "minLength": 1,
159
+ "pattern": "\\S"
160
+ },
161
+ "recordRef": {
162
+ "type": "string",
163
+ "pattern": "^source:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
164
+ }
165
+ },
166
+ "required": [
167
+ "id",
168
+ "from",
169
+ "to",
170
+ "recordRef"
171
+ ],
172
+ "additionalProperties": false
173
+ }
174
+ }
175
+ },
176
+ "required": [
177
+ "state",
178
+ "transfers"
179
+ ],
180
+ "additionalProperties": false
181
+ },
182
+ {
183
+ "type": "object",
184
+ "properties": {
185
+ "state": {
186
+ "type": "string",
187
+ "const": "unknown"
188
+ },
189
+ "reason": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "pattern": "\\S"
193
+ }
194
+ },
195
+ "required": [
196
+ "state",
197
+ "reason"
198
+ ],
199
+ "additionalProperties": false
200
+ }
201
+ ]
202
+ },
203
+ "currentCustodian": {
204
+ "oneOf": [
205
+ {
206
+ "type": "object",
207
+ "properties": {
208
+ "state": {
209
+ "type": "string",
210
+ "const": "known"
211
+ },
212
+ "holder": {
213
+ "type": "string",
214
+ "minLength": 1,
215
+ "pattern": "\\S"
216
+ },
217
+ "recordRef": {
218
+ "type": "string",
219
+ "pattern": "^source:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
220
+ }
221
+ },
222
+ "required": [
223
+ "state",
224
+ "holder",
225
+ "recordRef"
226
+ ],
227
+ "additionalProperties": false
228
+ },
229
+ {
230
+ "type": "object",
231
+ "properties": {
232
+ "state": {
233
+ "type": "string",
234
+ "const": "unknown"
235
+ },
236
+ "reason": {
237
+ "type": "string",
238
+ "minLength": 1,
239
+ "pattern": "\\S"
240
+ }
241
+ },
242
+ "required": [
243
+ "state",
244
+ "reason"
245
+ ],
246
+ "additionalProperties": false
247
+ }
248
+ ]
249
+ },
250
+ "catalogIdentifier": {
251
+ "type": "string",
252
+ "minLength": 1,
253
+ "pattern": "\\S"
254
+ }
255
+ },
256
+ "required": [
257
+ "id",
258
+ "lineage",
259
+ "label",
260
+ "collection",
261
+ "custody",
262
+ "currentCustodian"
263
+ ],
264
+ "additionalProperties": false
265
+ }
266
+ }
267
+ },
268
+ "required": [
269
+ "kind",
270
+ "schemaVersion",
271
+ "id",
272
+ "historyId",
273
+ "observationId",
274
+ "samples"
275
+ ],
276
+ "additionalProperties": false,
277
+ "$id": "urn:disclosureos:experimental:physical-sample-selection:0.1.0"
278
+ }