@disclosureos/records 1.0.0 → 2.0.0-beta.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +11 -1
  3. package/dist/constants/index.d.ts +2 -2
  4. package/dist/constants/index.js +28 -0
  5. package/dist/constants/index.js.map +1 -1
  6. package/dist/{enum-guard-DzPkp2oJ.d.ts → enum-guard-Myp2-SoT.d.ts} +23 -1
  7. package/dist/experimental/v2/index.d.ts +4419 -0
  8. package/dist/experimental/v2/index.js +645 -0
  9. package/dist/experimental/v2/index.js.map +1 -0
  10. package/dist/factories/index.d.ts +1 -1
  11. package/dist/factories/index.js +28 -0
  12. package/dist/factories/index.js.map +1 -1
  13. package/dist/guards/index.d.ts +2 -2
  14. package/dist/guards/index.js +28 -0
  15. package/dist/guards/index.js.map +1 -1
  16. package/dist/index.d.ts +3 -3
  17. package/dist/index.js +44 -2
  18. package/dist/index.js.map +1 -1
  19. package/dist/labels/index.d.ts +1 -1
  20. package/dist/observation/index.d.ts +1 -1
  21. package/dist/observation/index.js +28 -0
  22. package/dist/observation/index.js.map +1 -1
  23. package/dist/shared/index.d.ts +1 -1
  24. package/dist/shared/index.js +15 -1
  25. package/dist/shared/index.js.map +1 -1
  26. package/dist/source/sensor/index.d.ts +77 -0
  27. package/dist/source/sensor/index.js +28 -0
  28. package/dist/source/sensor/index.js.map +1 -1
  29. package/dist/{types-CzNfaip-.d.ts → types-Dp7GbYBS.d.ts} +26 -0
  30. package/dist/validators/index.js +28 -0
  31. package/dist/validators/index.js.map +1 -1
  32. package/package.json +16 -4
  33. package/schema/experimental/claim-history-0.1.0.schema.json +6545 -0
  34. package/schema/experimental/observation-0.1.0.schema.json +6040 -0
  35. package/schema/experimental/v2-primitives-0.2.0.schema.json +1761 -0
  36. package/schema/experimental/v2-primitives.schema.json +828 -0
  37. package/schema/records.schema.json +31 -2
@@ -0,0 +1,1761 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
8
+ },
9
+ "eventTime": {
10
+ "oneOf": [
11
+ {
12
+ "type": "object",
13
+ "properties": {
14
+ "state": {
15
+ "type": "string",
16
+ "const": "known"
17
+ },
18
+ "value": {
19
+ "anyOf": [
20
+ {
21
+ "oneOf": [
22
+ {
23
+ "type": "object",
24
+ "properties": {
25
+ "kind": {
26
+ "type": "string",
27
+ "const": "year"
28
+ },
29
+ "value": {
30
+ "type": "string",
31
+ "pattern": "^(?!0000)[0-9]{4}$"
32
+ }
33
+ },
34
+ "required": [
35
+ "kind",
36
+ "value"
37
+ ],
38
+ "additionalProperties": false
39
+ },
40
+ {
41
+ "type": "object",
42
+ "properties": {
43
+ "kind": {
44
+ "type": "string",
45
+ "const": "month"
46
+ },
47
+ "value": {
48
+ "type": "string",
49
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
50
+ }
51
+ },
52
+ "required": [
53
+ "kind",
54
+ "value"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ {
59
+ "type": "object",
60
+ "properties": {
61
+ "kind": {
62
+ "type": "string",
63
+ "const": "date"
64
+ },
65
+ "value": {
66
+ "type": "string",
67
+ "allOf": [
68
+ {
69
+ "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])))$"
70
+ },
71
+ {
72
+ "pattern": "^(?!0000)"
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ "required": [
78
+ "kind",
79
+ "value"
80
+ ],
81
+ "additionalProperties": false
82
+ },
83
+ {
84
+ "type": "object",
85
+ "properties": {
86
+ "kind": {
87
+ "type": "string",
88
+ "const": "instant"
89
+ },
90
+ "value": {
91
+ "type": "string",
92
+ "allOf": [
93
+ {
94
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
95
+ },
96
+ {
97
+ "pattern": "^(?!0000)"
98
+ },
99
+ {
100
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
101
+ },
102
+ {
103
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
104
+ }
105
+ ]
106
+ },
107
+ "timeScale": {
108
+ "type": "string",
109
+ "const": "UTC"
110
+ }
111
+ },
112
+ "required": [
113
+ "kind",
114
+ "value",
115
+ "timeScale"
116
+ ],
117
+ "additionalProperties": false
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "type": "object",
123
+ "properties": {
124
+ "kind": {
125
+ "type": "string",
126
+ "const": "interval"
127
+ },
128
+ "start": {
129
+ "oneOf": [
130
+ {
131
+ "type": "object",
132
+ "properties": {
133
+ "kind": {
134
+ "type": "string",
135
+ "const": "year"
136
+ },
137
+ "value": {
138
+ "type": "string",
139
+ "pattern": "^(?!0000)[0-9]{4}$"
140
+ }
141
+ },
142
+ "required": [
143
+ "kind",
144
+ "value"
145
+ ],
146
+ "additionalProperties": false
147
+ },
148
+ {
149
+ "type": "object",
150
+ "properties": {
151
+ "kind": {
152
+ "type": "string",
153
+ "const": "month"
154
+ },
155
+ "value": {
156
+ "type": "string",
157
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
158
+ }
159
+ },
160
+ "required": [
161
+ "kind",
162
+ "value"
163
+ ],
164
+ "additionalProperties": false
165
+ },
166
+ {
167
+ "type": "object",
168
+ "properties": {
169
+ "kind": {
170
+ "type": "string",
171
+ "const": "date"
172
+ },
173
+ "value": {
174
+ "type": "string",
175
+ "allOf": [
176
+ {
177
+ "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])))$"
178
+ },
179
+ {
180
+ "pattern": "^(?!0000)"
181
+ }
182
+ ]
183
+ }
184
+ },
185
+ "required": [
186
+ "kind",
187
+ "value"
188
+ ],
189
+ "additionalProperties": false
190
+ },
191
+ {
192
+ "type": "object",
193
+ "properties": {
194
+ "kind": {
195
+ "type": "string",
196
+ "const": "instant"
197
+ },
198
+ "value": {
199
+ "type": "string",
200
+ "allOf": [
201
+ {
202
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
203
+ },
204
+ {
205
+ "pattern": "^(?!0000)"
206
+ },
207
+ {
208
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
209
+ },
210
+ {
211
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
212
+ }
213
+ ]
214
+ },
215
+ "timeScale": {
216
+ "type": "string",
217
+ "const": "UTC"
218
+ }
219
+ },
220
+ "required": [
221
+ "kind",
222
+ "value",
223
+ "timeScale"
224
+ ],
225
+ "additionalProperties": false
226
+ }
227
+ ]
228
+ },
229
+ "end": {
230
+ "oneOf": [
231
+ {
232
+ "type": "object",
233
+ "properties": {
234
+ "kind": {
235
+ "type": "string",
236
+ "const": "year"
237
+ },
238
+ "value": {
239
+ "type": "string",
240
+ "pattern": "^(?!0000)[0-9]{4}$"
241
+ }
242
+ },
243
+ "required": [
244
+ "kind",
245
+ "value"
246
+ ],
247
+ "additionalProperties": false
248
+ },
249
+ {
250
+ "type": "object",
251
+ "properties": {
252
+ "kind": {
253
+ "type": "string",
254
+ "const": "month"
255
+ },
256
+ "value": {
257
+ "type": "string",
258
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
259
+ }
260
+ },
261
+ "required": [
262
+ "kind",
263
+ "value"
264
+ ],
265
+ "additionalProperties": false
266
+ },
267
+ {
268
+ "type": "object",
269
+ "properties": {
270
+ "kind": {
271
+ "type": "string",
272
+ "const": "date"
273
+ },
274
+ "value": {
275
+ "type": "string",
276
+ "allOf": [
277
+ {
278
+ "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])))$"
279
+ },
280
+ {
281
+ "pattern": "^(?!0000)"
282
+ }
283
+ ]
284
+ }
285
+ },
286
+ "required": [
287
+ "kind",
288
+ "value"
289
+ ],
290
+ "additionalProperties": false
291
+ },
292
+ {
293
+ "type": "object",
294
+ "properties": {
295
+ "kind": {
296
+ "type": "string",
297
+ "const": "instant"
298
+ },
299
+ "value": {
300
+ "type": "string",
301
+ "allOf": [
302
+ {
303
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
304
+ },
305
+ {
306
+ "pattern": "^(?!0000)"
307
+ },
308
+ {
309
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
310
+ },
311
+ {
312
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
313
+ }
314
+ ]
315
+ },
316
+ "timeScale": {
317
+ "type": "string",
318
+ "const": "UTC"
319
+ }
320
+ },
321
+ "required": [
322
+ "kind",
323
+ "value",
324
+ "timeScale"
325
+ ],
326
+ "additionalProperties": false
327
+ }
328
+ ]
329
+ }
330
+ },
331
+ "required": [
332
+ "kind",
333
+ "start",
334
+ "end"
335
+ ],
336
+ "additionalProperties": false
337
+ }
338
+ ]
339
+ },
340
+ "sourceRefs": {
341
+ "minItems": 1,
342
+ "type": "array",
343
+ "items": {
344
+ "type": "string",
345
+ "pattern": "^(source|product|assertion):[^\\s:]+$"
346
+ }
347
+ },
348
+ "selection": {
349
+ "type": "object",
350
+ "properties": {
351
+ "assertionRef": {
352
+ "type": "string",
353
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
354
+ },
355
+ "consideredAssertionRefs": {
356
+ "minItems": 1,
357
+ "type": "array",
358
+ "items": {
359
+ "type": "string",
360
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
361
+ }
362
+ },
363
+ "methodRef": {
364
+ "type": "string",
365
+ "pattern": "^method:[^\\s:]+(?![\\s\\S])"
366
+ },
367
+ "methodVersion": {
368
+ "type": "string",
369
+ "minLength": 1,
370
+ "pattern": "\\S"
371
+ },
372
+ "evaluatedBy": {
373
+ "type": "string",
374
+ "minLength": 1,
375
+ "pattern": "\\S"
376
+ },
377
+ "evaluatedAt": {
378
+ "type": "string",
379
+ "allOf": [
380
+ {
381
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
382
+ },
383
+ {
384
+ "pattern": "^(?!0000)"
385
+ },
386
+ {
387
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
388
+ },
389
+ {
390
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
391
+ }
392
+ ]
393
+ },
394
+ "rationale": {
395
+ "type": "string",
396
+ "minLength": 1,
397
+ "pattern": "\\S"
398
+ }
399
+ },
400
+ "required": [
401
+ "assertionRef",
402
+ "consideredAssertionRefs",
403
+ "methodRef",
404
+ "methodVersion",
405
+ "evaluatedBy",
406
+ "evaluatedAt",
407
+ "rationale"
408
+ ],
409
+ "additionalProperties": false
410
+ }
411
+ },
412
+ "required": [
413
+ "state",
414
+ "value",
415
+ "sourceRefs"
416
+ ],
417
+ "additionalProperties": false
418
+ },
419
+ {
420
+ "type": "object",
421
+ "properties": {
422
+ "state": {
423
+ "type": "string",
424
+ "const": "approximate"
425
+ },
426
+ "value": {
427
+ "anyOf": [
428
+ {
429
+ "oneOf": [
430
+ {
431
+ "type": "object",
432
+ "properties": {
433
+ "kind": {
434
+ "type": "string",
435
+ "const": "year"
436
+ },
437
+ "value": {
438
+ "type": "string",
439
+ "pattern": "^(?!0000)[0-9]{4}$"
440
+ }
441
+ },
442
+ "required": [
443
+ "kind",
444
+ "value"
445
+ ],
446
+ "additionalProperties": false
447
+ },
448
+ {
449
+ "type": "object",
450
+ "properties": {
451
+ "kind": {
452
+ "type": "string",
453
+ "const": "month"
454
+ },
455
+ "value": {
456
+ "type": "string",
457
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
458
+ }
459
+ },
460
+ "required": [
461
+ "kind",
462
+ "value"
463
+ ],
464
+ "additionalProperties": false
465
+ },
466
+ {
467
+ "type": "object",
468
+ "properties": {
469
+ "kind": {
470
+ "type": "string",
471
+ "const": "date"
472
+ },
473
+ "value": {
474
+ "type": "string",
475
+ "allOf": [
476
+ {
477
+ "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])))$"
478
+ },
479
+ {
480
+ "pattern": "^(?!0000)"
481
+ }
482
+ ]
483
+ }
484
+ },
485
+ "required": [
486
+ "kind",
487
+ "value"
488
+ ],
489
+ "additionalProperties": false
490
+ },
491
+ {
492
+ "type": "object",
493
+ "properties": {
494
+ "kind": {
495
+ "type": "string",
496
+ "const": "instant"
497
+ },
498
+ "value": {
499
+ "type": "string",
500
+ "allOf": [
501
+ {
502
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
503
+ },
504
+ {
505
+ "pattern": "^(?!0000)"
506
+ },
507
+ {
508
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
509
+ },
510
+ {
511
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
512
+ }
513
+ ]
514
+ },
515
+ "timeScale": {
516
+ "type": "string",
517
+ "const": "UTC"
518
+ }
519
+ },
520
+ "required": [
521
+ "kind",
522
+ "value",
523
+ "timeScale"
524
+ ],
525
+ "additionalProperties": false
526
+ }
527
+ ]
528
+ },
529
+ {
530
+ "type": "object",
531
+ "properties": {
532
+ "kind": {
533
+ "type": "string",
534
+ "const": "interval"
535
+ },
536
+ "start": {
537
+ "oneOf": [
538
+ {
539
+ "type": "object",
540
+ "properties": {
541
+ "kind": {
542
+ "type": "string",
543
+ "const": "year"
544
+ },
545
+ "value": {
546
+ "type": "string",
547
+ "pattern": "^(?!0000)[0-9]{4}$"
548
+ }
549
+ },
550
+ "required": [
551
+ "kind",
552
+ "value"
553
+ ],
554
+ "additionalProperties": false
555
+ },
556
+ {
557
+ "type": "object",
558
+ "properties": {
559
+ "kind": {
560
+ "type": "string",
561
+ "const": "month"
562
+ },
563
+ "value": {
564
+ "type": "string",
565
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
566
+ }
567
+ },
568
+ "required": [
569
+ "kind",
570
+ "value"
571
+ ],
572
+ "additionalProperties": false
573
+ },
574
+ {
575
+ "type": "object",
576
+ "properties": {
577
+ "kind": {
578
+ "type": "string",
579
+ "const": "date"
580
+ },
581
+ "value": {
582
+ "type": "string",
583
+ "allOf": [
584
+ {
585
+ "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])))$"
586
+ },
587
+ {
588
+ "pattern": "^(?!0000)"
589
+ }
590
+ ]
591
+ }
592
+ },
593
+ "required": [
594
+ "kind",
595
+ "value"
596
+ ],
597
+ "additionalProperties": false
598
+ },
599
+ {
600
+ "type": "object",
601
+ "properties": {
602
+ "kind": {
603
+ "type": "string",
604
+ "const": "instant"
605
+ },
606
+ "value": {
607
+ "type": "string",
608
+ "allOf": [
609
+ {
610
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
611
+ },
612
+ {
613
+ "pattern": "^(?!0000)"
614
+ },
615
+ {
616
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
617
+ },
618
+ {
619
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
620
+ }
621
+ ]
622
+ },
623
+ "timeScale": {
624
+ "type": "string",
625
+ "const": "UTC"
626
+ }
627
+ },
628
+ "required": [
629
+ "kind",
630
+ "value",
631
+ "timeScale"
632
+ ],
633
+ "additionalProperties": false
634
+ }
635
+ ]
636
+ },
637
+ "end": {
638
+ "oneOf": [
639
+ {
640
+ "type": "object",
641
+ "properties": {
642
+ "kind": {
643
+ "type": "string",
644
+ "const": "year"
645
+ },
646
+ "value": {
647
+ "type": "string",
648
+ "pattern": "^(?!0000)[0-9]{4}$"
649
+ }
650
+ },
651
+ "required": [
652
+ "kind",
653
+ "value"
654
+ ],
655
+ "additionalProperties": false
656
+ },
657
+ {
658
+ "type": "object",
659
+ "properties": {
660
+ "kind": {
661
+ "type": "string",
662
+ "const": "month"
663
+ },
664
+ "value": {
665
+ "type": "string",
666
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
667
+ }
668
+ },
669
+ "required": [
670
+ "kind",
671
+ "value"
672
+ ],
673
+ "additionalProperties": false
674
+ },
675
+ {
676
+ "type": "object",
677
+ "properties": {
678
+ "kind": {
679
+ "type": "string",
680
+ "const": "date"
681
+ },
682
+ "value": {
683
+ "type": "string",
684
+ "allOf": [
685
+ {
686
+ "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])))$"
687
+ },
688
+ {
689
+ "pattern": "^(?!0000)"
690
+ }
691
+ ]
692
+ }
693
+ },
694
+ "required": [
695
+ "kind",
696
+ "value"
697
+ ],
698
+ "additionalProperties": false
699
+ },
700
+ {
701
+ "type": "object",
702
+ "properties": {
703
+ "kind": {
704
+ "type": "string",
705
+ "const": "instant"
706
+ },
707
+ "value": {
708
+ "type": "string",
709
+ "allOf": [
710
+ {
711
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
712
+ },
713
+ {
714
+ "pattern": "^(?!0000)"
715
+ },
716
+ {
717
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
718
+ },
719
+ {
720
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
721
+ }
722
+ ]
723
+ },
724
+ "timeScale": {
725
+ "type": "string",
726
+ "const": "UTC"
727
+ }
728
+ },
729
+ "required": [
730
+ "kind",
731
+ "value",
732
+ "timeScale"
733
+ ],
734
+ "additionalProperties": false
735
+ }
736
+ ]
737
+ }
738
+ },
739
+ "required": [
740
+ "kind",
741
+ "start",
742
+ "end"
743
+ ],
744
+ "additionalProperties": false
745
+ }
746
+ ]
747
+ },
748
+ "sourceRefs": {
749
+ "minItems": 1,
750
+ "type": "array",
751
+ "items": {
752
+ "type": "string",
753
+ "pattern": "^(source|product|assertion):[^\\s:]+$"
754
+ }
755
+ },
756
+ "precision": {
757
+ "type": "string",
758
+ "minLength": 1,
759
+ "pattern": "\\S"
760
+ },
761
+ "selection": {
762
+ "type": "object",
763
+ "properties": {
764
+ "assertionRef": {
765
+ "type": "string",
766
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
767
+ },
768
+ "consideredAssertionRefs": {
769
+ "minItems": 1,
770
+ "type": "array",
771
+ "items": {
772
+ "type": "string",
773
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
774
+ }
775
+ },
776
+ "methodRef": {
777
+ "type": "string",
778
+ "pattern": "^method:[^\\s:]+(?![\\s\\S])"
779
+ },
780
+ "methodVersion": {
781
+ "type": "string",
782
+ "minLength": 1,
783
+ "pattern": "\\S"
784
+ },
785
+ "evaluatedBy": {
786
+ "type": "string",
787
+ "minLength": 1,
788
+ "pattern": "\\S"
789
+ },
790
+ "evaluatedAt": {
791
+ "type": "string",
792
+ "allOf": [
793
+ {
794
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
795
+ },
796
+ {
797
+ "pattern": "^(?!0000)"
798
+ },
799
+ {
800
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
801
+ },
802
+ {
803
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
804
+ }
805
+ ]
806
+ },
807
+ "rationale": {
808
+ "type": "string",
809
+ "minLength": 1,
810
+ "pattern": "\\S"
811
+ }
812
+ },
813
+ "required": [
814
+ "assertionRef",
815
+ "consideredAssertionRefs",
816
+ "methodRef",
817
+ "methodVersion",
818
+ "evaluatedBy",
819
+ "evaluatedAt",
820
+ "rationale"
821
+ ],
822
+ "additionalProperties": false
823
+ }
824
+ },
825
+ "required": [
826
+ "state",
827
+ "value",
828
+ "sourceRefs",
829
+ "precision"
830
+ ],
831
+ "additionalProperties": false
832
+ },
833
+ {
834
+ "type": "object",
835
+ "properties": {
836
+ "state": {
837
+ "type": "string",
838
+ "const": "unknown"
839
+ },
840
+ "reason": {
841
+ "type": "string",
842
+ "enum": [
843
+ "not_recorded",
844
+ "not_collected",
845
+ "unavailable"
846
+ ]
847
+ }
848
+ },
849
+ "required": [
850
+ "state",
851
+ "reason"
852
+ ],
853
+ "additionalProperties": false
854
+ },
855
+ {
856
+ "type": "object",
857
+ "properties": {
858
+ "state": {
859
+ "type": "string",
860
+ "const": "redacted"
861
+ },
862
+ "reason": {
863
+ "type": "string",
864
+ "minLength": 1,
865
+ "pattern": "\\S"
866
+ }
867
+ },
868
+ "required": [
869
+ "state",
870
+ "reason"
871
+ ],
872
+ "additionalProperties": false
873
+ }
874
+ ]
875
+ },
876
+ "position": {
877
+ "oneOf": [
878
+ {
879
+ "type": "object",
880
+ "properties": {
881
+ "state": {
882
+ "type": "string",
883
+ "const": "known"
884
+ },
885
+ "value": {
886
+ "type": "object",
887
+ "properties": {
888
+ "latitude": {
889
+ "type": "number",
890
+ "minimum": -90,
891
+ "maximum": 90
892
+ },
893
+ "longitude": {
894
+ "type": "number",
895
+ "minimum": -180,
896
+ "maximum": 180
897
+ },
898
+ "datum": {
899
+ "type": "string",
900
+ "const": "WGS84"
901
+ }
902
+ },
903
+ "required": [
904
+ "latitude",
905
+ "longitude",
906
+ "datum"
907
+ ],
908
+ "additionalProperties": false
909
+ },
910
+ "sourceRefs": {
911
+ "minItems": 1,
912
+ "type": "array",
913
+ "items": {
914
+ "type": "string",
915
+ "pattern": "^(source|product|assertion):[^\\s:]+$"
916
+ }
917
+ },
918
+ "selection": {
919
+ "type": "object",
920
+ "properties": {
921
+ "assertionRef": {
922
+ "type": "string",
923
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
924
+ },
925
+ "consideredAssertionRefs": {
926
+ "minItems": 1,
927
+ "type": "array",
928
+ "items": {
929
+ "type": "string",
930
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
931
+ }
932
+ },
933
+ "methodRef": {
934
+ "type": "string",
935
+ "pattern": "^method:[^\\s:]+(?![\\s\\S])"
936
+ },
937
+ "methodVersion": {
938
+ "type": "string",
939
+ "minLength": 1,
940
+ "pattern": "\\S"
941
+ },
942
+ "evaluatedBy": {
943
+ "type": "string",
944
+ "minLength": 1,
945
+ "pattern": "\\S"
946
+ },
947
+ "evaluatedAt": {
948
+ "type": "string",
949
+ "allOf": [
950
+ {
951
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
952
+ },
953
+ {
954
+ "pattern": "^(?!0000)"
955
+ },
956
+ {
957
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
958
+ },
959
+ {
960
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
961
+ }
962
+ ]
963
+ },
964
+ "rationale": {
965
+ "type": "string",
966
+ "minLength": 1,
967
+ "pattern": "\\S"
968
+ }
969
+ },
970
+ "required": [
971
+ "assertionRef",
972
+ "consideredAssertionRefs",
973
+ "methodRef",
974
+ "methodVersion",
975
+ "evaluatedBy",
976
+ "evaluatedAt",
977
+ "rationale"
978
+ ],
979
+ "additionalProperties": false
980
+ }
981
+ },
982
+ "required": [
983
+ "state",
984
+ "value",
985
+ "sourceRefs"
986
+ ],
987
+ "additionalProperties": false
988
+ },
989
+ {
990
+ "type": "object",
991
+ "properties": {
992
+ "state": {
993
+ "type": "string",
994
+ "const": "approximate"
995
+ },
996
+ "value": {
997
+ "type": "object",
998
+ "properties": {
999
+ "latitude": {
1000
+ "type": "number",
1001
+ "minimum": -90,
1002
+ "maximum": 90
1003
+ },
1004
+ "longitude": {
1005
+ "type": "number",
1006
+ "minimum": -180,
1007
+ "maximum": 180
1008
+ },
1009
+ "datum": {
1010
+ "type": "string",
1011
+ "const": "WGS84"
1012
+ }
1013
+ },
1014
+ "required": [
1015
+ "latitude",
1016
+ "longitude",
1017
+ "datum"
1018
+ ],
1019
+ "additionalProperties": false
1020
+ },
1021
+ "sourceRefs": {
1022
+ "minItems": 1,
1023
+ "type": "array",
1024
+ "items": {
1025
+ "type": "string",
1026
+ "pattern": "^(source|product|assertion):[^\\s:]+$"
1027
+ }
1028
+ },
1029
+ "precision": {
1030
+ "type": "string",
1031
+ "minLength": 1,
1032
+ "pattern": "\\S"
1033
+ },
1034
+ "selection": {
1035
+ "type": "object",
1036
+ "properties": {
1037
+ "assertionRef": {
1038
+ "type": "string",
1039
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
1040
+ },
1041
+ "consideredAssertionRefs": {
1042
+ "minItems": 1,
1043
+ "type": "array",
1044
+ "items": {
1045
+ "type": "string",
1046
+ "pattern": "^assertion:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
1047
+ }
1048
+ },
1049
+ "methodRef": {
1050
+ "type": "string",
1051
+ "pattern": "^method:[^\\s:]+(?![\\s\\S])"
1052
+ },
1053
+ "methodVersion": {
1054
+ "type": "string",
1055
+ "minLength": 1,
1056
+ "pattern": "\\S"
1057
+ },
1058
+ "evaluatedBy": {
1059
+ "type": "string",
1060
+ "minLength": 1,
1061
+ "pattern": "\\S"
1062
+ },
1063
+ "evaluatedAt": {
1064
+ "type": "string",
1065
+ "allOf": [
1066
+ {
1067
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
1068
+ },
1069
+ {
1070
+ "pattern": "^(?!0000)"
1071
+ },
1072
+ {
1073
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
1074
+ },
1075
+ {
1076
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
1077
+ }
1078
+ ]
1079
+ },
1080
+ "rationale": {
1081
+ "type": "string",
1082
+ "minLength": 1,
1083
+ "pattern": "\\S"
1084
+ }
1085
+ },
1086
+ "required": [
1087
+ "assertionRef",
1088
+ "consideredAssertionRefs",
1089
+ "methodRef",
1090
+ "methodVersion",
1091
+ "evaluatedBy",
1092
+ "evaluatedAt",
1093
+ "rationale"
1094
+ ],
1095
+ "additionalProperties": false
1096
+ }
1097
+ },
1098
+ "required": [
1099
+ "state",
1100
+ "value",
1101
+ "sourceRefs",
1102
+ "precision"
1103
+ ],
1104
+ "additionalProperties": false
1105
+ },
1106
+ {
1107
+ "type": "object",
1108
+ "properties": {
1109
+ "state": {
1110
+ "type": "string",
1111
+ "const": "unknown"
1112
+ },
1113
+ "reason": {
1114
+ "type": "string",
1115
+ "enum": [
1116
+ "not_recorded",
1117
+ "not_collected",
1118
+ "unavailable"
1119
+ ]
1120
+ }
1121
+ },
1122
+ "required": [
1123
+ "state",
1124
+ "reason"
1125
+ ],
1126
+ "additionalProperties": false
1127
+ },
1128
+ {
1129
+ "type": "object",
1130
+ "properties": {
1131
+ "state": {
1132
+ "type": "string",
1133
+ "const": "redacted"
1134
+ },
1135
+ "reason": {
1136
+ "type": "string",
1137
+ "minLength": 1,
1138
+ "pattern": "\\S"
1139
+ }
1140
+ },
1141
+ "required": [
1142
+ "state",
1143
+ "reason"
1144
+ ],
1145
+ "additionalProperties": false
1146
+ }
1147
+ ]
1148
+ },
1149
+ "assertions": {
1150
+ "type": "array",
1151
+ "items": {
1152
+ "oneOf": [
1153
+ {
1154
+ "type": "object",
1155
+ "properties": {
1156
+ "id": {
1157
+ "type": "string",
1158
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
1159
+ },
1160
+ "field": {
1161
+ "type": "string",
1162
+ "const": "eventTime"
1163
+ },
1164
+ "value": {
1165
+ "anyOf": [
1166
+ {
1167
+ "oneOf": [
1168
+ {
1169
+ "type": "object",
1170
+ "properties": {
1171
+ "kind": {
1172
+ "type": "string",
1173
+ "const": "year"
1174
+ },
1175
+ "value": {
1176
+ "type": "string",
1177
+ "pattern": "^(?!0000)[0-9]{4}$"
1178
+ }
1179
+ },
1180
+ "required": [
1181
+ "kind",
1182
+ "value"
1183
+ ],
1184
+ "additionalProperties": false
1185
+ },
1186
+ {
1187
+ "type": "object",
1188
+ "properties": {
1189
+ "kind": {
1190
+ "type": "string",
1191
+ "const": "month"
1192
+ },
1193
+ "value": {
1194
+ "type": "string",
1195
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
1196
+ }
1197
+ },
1198
+ "required": [
1199
+ "kind",
1200
+ "value"
1201
+ ],
1202
+ "additionalProperties": false
1203
+ },
1204
+ {
1205
+ "type": "object",
1206
+ "properties": {
1207
+ "kind": {
1208
+ "type": "string",
1209
+ "const": "date"
1210
+ },
1211
+ "value": {
1212
+ "type": "string",
1213
+ "allOf": [
1214
+ {
1215
+ "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])))$"
1216
+ },
1217
+ {
1218
+ "pattern": "^(?!0000)"
1219
+ }
1220
+ ]
1221
+ }
1222
+ },
1223
+ "required": [
1224
+ "kind",
1225
+ "value"
1226
+ ],
1227
+ "additionalProperties": false
1228
+ },
1229
+ {
1230
+ "type": "object",
1231
+ "properties": {
1232
+ "kind": {
1233
+ "type": "string",
1234
+ "const": "instant"
1235
+ },
1236
+ "value": {
1237
+ "type": "string",
1238
+ "allOf": [
1239
+ {
1240
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
1241
+ },
1242
+ {
1243
+ "pattern": "^(?!0000)"
1244
+ },
1245
+ {
1246
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
1247
+ },
1248
+ {
1249
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
1250
+ }
1251
+ ]
1252
+ },
1253
+ "timeScale": {
1254
+ "type": "string",
1255
+ "const": "UTC"
1256
+ }
1257
+ },
1258
+ "required": [
1259
+ "kind",
1260
+ "value",
1261
+ "timeScale"
1262
+ ],
1263
+ "additionalProperties": false
1264
+ }
1265
+ ]
1266
+ },
1267
+ {
1268
+ "type": "object",
1269
+ "properties": {
1270
+ "kind": {
1271
+ "type": "string",
1272
+ "const": "interval"
1273
+ },
1274
+ "start": {
1275
+ "oneOf": [
1276
+ {
1277
+ "type": "object",
1278
+ "properties": {
1279
+ "kind": {
1280
+ "type": "string",
1281
+ "const": "year"
1282
+ },
1283
+ "value": {
1284
+ "type": "string",
1285
+ "pattern": "^(?!0000)[0-9]{4}$"
1286
+ }
1287
+ },
1288
+ "required": [
1289
+ "kind",
1290
+ "value"
1291
+ ],
1292
+ "additionalProperties": false
1293
+ },
1294
+ {
1295
+ "type": "object",
1296
+ "properties": {
1297
+ "kind": {
1298
+ "type": "string",
1299
+ "const": "month"
1300
+ },
1301
+ "value": {
1302
+ "type": "string",
1303
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
1304
+ }
1305
+ },
1306
+ "required": [
1307
+ "kind",
1308
+ "value"
1309
+ ],
1310
+ "additionalProperties": false
1311
+ },
1312
+ {
1313
+ "type": "object",
1314
+ "properties": {
1315
+ "kind": {
1316
+ "type": "string",
1317
+ "const": "date"
1318
+ },
1319
+ "value": {
1320
+ "type": "string",
1321
+ "allOf": [
1322
+ {
1323
+ "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])))$"
1324
+ },
1325
+ {
1326
+ "pattern": "^(?!0000)"
1327
+ }
1328
+ ]
1329
+ }
1330
+ },
1331
+ "required": [
1332
+ "kind",
1333
+ "value"
1334
+ ],
1335
+ "additionalProperties": false
1336
+ },
1337
+ {
1338
+ "type": "object",
1339
+ "properties": {
1340
+ "kind": {
1341
+ "type": "string",
1342
+ "const": "instant"
1343
+ },
1344
+ "value": {
1345
+ "type": "string",
1346
+ "allOf": [
1347
+ {
1348
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
1349
+ },
1350
+ {
1351
+ "pattern": "^(?!0000)"
1352
+ },
1353
+ {
1354
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
1355
+ },
1356
+ {
1357
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
1358
+ }
1359
+ ]
1360
+ },
1361
+ "timeScale": {
1362
+ "type": "string",
1363
+ "const": "UTC"
1364
+ }
1365
+ },
1366
+ "required": [
1367
+ "kind",
1368
+ "value",
1369
+ "timeScale"
1370
+ ],
1371
+ "additionalProperties": false
1372
+ }
1373
+ ]
1374
+ },
1375
+ "end": {
1376
+ "oneOf": [
1377
+ {
1378
+ "type": "object",
1379
+ "properties": {
1380
+ "kind": {
1381
+ "type": "string",
1382
+ "const": "year"
1383
+ },
1384
+ "value": {
1385
+ "type": "string",
1386
+ "pattern": "^(?!0000)[0-9]{4}$"
1387
+ }
1388
+ },
1389
+ "required": [
1390
+ "kind",
1391
+ "value"
1392
+ ],
1393
+ "additionalProperties": false
1394
+ },
1395
+ {
1396
+ "type": "object",
1397
+ "properties": {
1398
+ "kind": {
1399
+ "type": "string",
1400
+ "const": "month"
1401
+ },
1402
+ "value": {
1403
+ "type": "string",
1404
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"
1405
+ }
1406
+ },
1407
+ "required": [
1408
+ "kind",
1409
+ "value"
1410
+ ],
1411
+ "additionalProperties": false
1412
+ },
1413
+ {
1414
+ "type": "object",
1415
+ "properties": {
1416
+ "kind": {
1417
+ "type": "string",
1418
+ "const": "date"
1419
+ },
1420
+ "value": {
1421
+ "type": "string",
1422
+ "allOf": [
1423
+ {
1424
+ "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])))$"
1425
+ },
1426
+ {
1427
+ "pattern": "^(?!0000)"
1428
+ }
1429
+ ]
1430
+ }
1431
+ },
1432
+ "required": [
1433
+ "kind",
1434
+ "value"
1435
+ ],
1436
+ "additionalProperties": false
1437
+ },
1438
+ {
1439
+ "type": "object",
1440
+ "properties": {
1441
+ "kind": {
1442
+ "type": "string",
1443
+ "const": "instant"
1444
+ },
1445
+ "value": {
1446
+ "type": "string",
1447
+ "allOf": [
1448
+ {
1449
+ "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(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
1450
+ },
1451
+ {
1452
+ "pattern": "^(?!0000)"
1453
+ },
1454
+ {
1455
+ "pattern": "T[0-9]{2}:[0-9]{2}:[0-9]{2}"
1456
+ },
1457
+ {
1458
+ "pattern": "(?:Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"
1459
+ }
1460
+ ]
1461
+ },
1462
+ "timeScale": {
1463
+ "type": "string",
1464
+ "const": "UTC"
1465
+ }
1466
+ },
1467
+ "required": [
1468
+ "kind",
1469
+ "value",
1470
+ "timeScale"
1471
+ ],
1472
+ "additionalProperties": false
1473
+ }
1474
+ ]
1475
+ }
1476
+ },
1477
+ "required": [
1478
+ "kind",
1479
+ "start",
1480
+ "end"
1481
+ ],
1482
+ "additionalProperties": false
1483
+ }
1484
+ ]
1485
+ },
1486
+ "provenance": {
1487
+ "type": "object",
1488
+ "properties": {
1489
+ "sourceRef": {
1490
+ "type": "string",
1491
+ "pattern": "^(source|product):[^\\s:]+$"
1492
+ },
1493
+ "sourceDigest": {
1494
+ "type": "object",
1495
+ "properties": {
1496
+ "algorithm": {
1497
+ "type": "string",
1498
+ "const": "sha256"
1499
+ },
1500
+ "value": {
1501
+ "type": "string",
1502
+ "pattern": "^[a-f0-9]{64}$"
1503
+ }
1504
+ },
1505
+ "required": [
1506
+ "algorithm",
1507
+ "value"
1508
+ ],
1509
+ "additionalProperties": false
1510
+ },
1511
+ "locator": {
1512
+ "oneOf": [
1513
+ {
1514
+ "type": "object",
1515
+ "properties": {
1516
+ "kind": {
1517
+ "type": "string",
1518
+ "const": "page"
1519
+ },
1520
+ "page": {
1521
+ "type": "integer",
1522
+ "minimum": 1,
1523
+ "maximum": 9007199254740991
1524
+ }
1525
+ },
1526
+ "required": [
1527
+ "kind",
1528
+ "page"
1529
+ ],
1530
+ "additionalProperties": false
1531
+ },
1532
+ {
1533
+ "type": "object",
1534
+ "properties": {
1535
+ "kind": {
1536
+ "type": "string",
1537
+ "const": "time_range"
1538
+ },
1539
+ "startSeconds": {
1540
+ "type": "number",
1541
+ "minimum": 0
1542
+ },
1543
+ "endSeconds": {
1544
+ "type": "number",
1545
+ "minimum": 0
1546
+ }
1547
+ },
1548
+ "required": [
1549
+ "kind",
1550
+ "startSeconds",
1551
+ "endSeconds"
1552
+ ],
1553
+ "additionalProperties": false
1554
+ },
1555
+ {
1556
+ "type": "object",
1557
+ "properties": {
1558
+ "kind": {
1559
+ "type": "string",
1560
+ "const": "json_pointer"
1561
+ },
1562
+ "pointer": {
1563
+ "type": "string",
1564
+ "pattern": "^(?:\\/(?:[^~]|~[01])*)?(?![\\s\\S])"
1565
+ }
1566
+ },
1567
+ "required": [
1568
+ "kind",
1569
+ "pointer"
1570
+ ],
1571
+ "additionalProperties": false
1572
+ }
1573
+ ]
1574
+ },
1575
+ "attributedTo": {
1576
+ "type": "string",
1577
+ "minLength": 1,
1578
+ "pattern": "\\S"
1579
+ },
1580
+ "extractedBy": {
1581
+ "type": "string",
1582
+ "minLength": 1,
1583
+ "pattern": "\\S"
1584
+ }
1585
+ },
1586
+ "required": [
1587
+ "sourceRef"
1588
+ ],
1589
+ "additionalProperties": false
1590
+ }
1591
+ },
1592
+ "required": [
1593
+ "id",
1594
+ "field",
1595
+ "value",
1596
+ "provenance"
1597
+ ],
1598
+ "additionalProperties": false
1599
+ },
1600
+ {
1601
+ "type": "object",
1602
+ "properties": {
1603
+ "id": {
1604
+ "type": "string",
1605
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
1606
+ },
1607
+ "field": {
1608
+ "type": "string",
1609
+ "const": "position"
1610
+ },
1611
+ "value": {
1612
+ "type": "object",
1613
+ "properties": {
1614
+ "latitude": {
1615
+ "type": "number",
1616
+ "minimum": -90,
1617
+ "maximum": 90
1618
+ },
1619
+ "longitude": {
1620
+ "type": "number",
1621
+ "minimum": -180,
1622
+ "maximum": 180
1623
+ },
1624
+ "datum": {
1625
+ "type": "string",
1626
+ "const": "WGS84"
1627
+ }
1628
+ },
1629
+ "required": [
1630
+ "latitude",
1631
+ "longitude",
1632
+ "datum"
1633
+ ],
1634
+ "additionalProperties": false
1635
+ },
1636
+ "provenance": {
1637
+ "type": "object",
1638
+ "properties": {
1639
+ "sourceRef": {
1640
+ "type": "string",
1641
+ "pattern": "^(source|product):[^\\s:]+$"
1642
+ },
1643
+ "sourceDigest": {
1644
+ "type": "object",
1645
+ "properties": {
1646
+ "algorithm": {
1647
+ "type": "string",
1648
+ "const": "sha256"
1649
+ },
1650
+ "value": {
1651
+ "type": "string",
1652
+ "pattern": "^[a-f0-9]{64}$"
1653
+ }
1654
+ },
1655
+ "required": [
1656
+ "algorithm",
1657
+ "value"
1658
+ ],
1659
+ "additionalProperties": false
1660
+ },
1661
+ "locator": {
1662
+ "oneOf": [
1663
+ {
1664
+ "type": "object",
1665
+ "properties": {
1666
+ "kind": {
1667
+ "type": "string",
1668
+ "const": "page"
1669
+ },
1670
+ "page": {
1671
+ "type": "integer",
1672
+ "minimum": 1,
1673
+ "maximum": 9007199254740991
1674
+ }
1675
+ },
1676
+ "required": [
1677
+ "kind",
1678
+ "page"
1679
+ ],
1680
+ "additionalProperties": false
1681
+ },
1682
+ {
1683
+ "type": "object",
1684
+ "properties": {
1685
+ "kind": {
1686
+ "type": "string",
1687
+ "const": "time_range"
1688
+ },
1689
+ "startSeconds": {
1690
+ "type": "number",
1691
+ "minimum": 0
1692
+ },
1693
+ "endSeconds": {
1694
+ "type": "number",
1695
+ "minimum": 0
1696
+ }
1697
+ },
1698
+ "required": [
1699
+ "kind",
1700
+ "startSeconds",
1701
+ "endSeconds"
1702
+ ],
1703
+ "additionalProperties": false
1704
+ },
1705
+ {
1706
+ "type": "object",
1707
+ "properties": {
1708
+ "kind": {
1709
+ "type": "string",
1710
+ "const": "json_pointer"
1711
+ },
1712
+ "pointer": {
1713
+ "type": "string",
1714
+ "pattern": "^(?:\\/(?:[^~]|~[01])*)?(?![\\s\\S])"
1715
+ }
1716
+ },
1717
+ "required": [
1718
+ "kind",
1719
+ "pointer"
1720
+ ],
1721
+ "additionalProperties": false
1722
+ }
1723
+ ]
1724
+ },
1725
+ "attributedTo": {
1726
+ "type": "string",
1727
+ "minLength": 1,
1728
+ "pattern": "\\S"
1729
+ },
1730
+ "extractedBy": {
1731
+ "type": "string",
1732
+ "minLength": 1,
1733
+ "pattern": "\\S"
1734
+ }
1735
+ },
1736
+ "required": [
1737
+ "sourceRef"
1738
+ ],
1739
+ "additionalProperties": false
1740
+ }
1741
+ },
1742
+ "required": [
1743
+ "id",
1744
+ "field",
1745
+ "value",
1746
+ "provenance"
1747
+ ],
1748
+ "additionalProperties": false
1749
+ }
1750
+ ]
1751
+ }
1752
+ }
1753
+ },
1754
+ "required": [
1755
+ "id",
1756
+ "eventTime",
1757
+ "position"
1758
+ ],
1759
+ "additionalProperties": false,
1760
+ "$id": "urn:disclosureos:experimental:records-v2-primitives:0.2.0"
1761
+ }