@sdeverywhere/check-core 0.1.1 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdeverywhere/check-core",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "files": [
5
5
  "dist/**",
6
6
  "schema/**"
@@ -20,7 +20,7 @@
20
20
  "ajv": "^8.12.0",
21
21
  "assert-never": "^1.2.1",
22
22
  "neverthrow": "^4.2.2",
23
- "yaml": "^2.1.0"
23
+ "yaml": "^2.2.2"
24
24
  },
25
25
  "author": "Climate Interactive",
26
26
  "license": "MIT",
@@ -15,11 +15,29 @@
15
15
  {
16
16
  "$ref": "#/$defs/scenario_group_array_item"
17
17
  },
18
+ {
19
+ "$ref": "#/$defs/graph_group_array_item"
20
+ },
18
21
  {
19
22
  "$ref": "#/$defs/view_group_array_item"
20
23
  }
21
24
  ]
22
25
  },
26
+ "dataset": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "name": {
31
+ "type": "string"
32
+ },
33
+ "source": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "required": [
38
+ "name"
39
+ ]
40
+ },
23
41
  "scenario_array_item": {
24
42
  "type": "object",
25
43
  "additionalProperties": false,
@@ -322,7 +340,70 @@
322
340
  "scenario_group_ref"
323
341
  ]
324
342
  },
343
+ "graphs_preset": {
344
+ "type": "string",
345
+ "enum": [
346
+ "all"
347
+ ]
348
+ },
349
+ "graphs_array": {
350
+ "type": "array",
351
+ "items": {
352
+ "type": "string"
353
+ },
354
+ "minItems": 1
355
+ },
356
+ "graph_group_ref": {
357
+ "type": "object",
358
+ "additionalProperties": false,
359
+ "properties": {
360
+ "graph_group_ref": {
361
+ "type": "string"
362
+ }
363
+ },
364
+ "required": [
365
+ "graph_group_ref"
366
+ ]
367
+ },
368
+ "graph_group_array_item": {
369
+ "type": "object",
370
+ "additionalProperties": false,
371
+ "properties": {
372
+ "graph_group": {
373
+ "$ref": "#/$defs/graph_group"
374
+ }
375
+ },
376
+ "required": [
377
+ "graph_group"
378
+ ]
379
+ },
380
+ "graph_group": {
381
+ "type": "object",
382
+ "additionalProperties": false,
383
+ "properties": {
384
+ "id": {
385
+ "type": "string"
386
+ },
387
+ "graphs": {
388
+ "$ref": "#/$defs/graphs_array"
389
+ }
390
+ },
391
+ "required": [
392
+ "id",
393
+ "graphs"
394
+ ]
395
+ },
325
396
  "view": {
397
+ "oneOf": [
398
+ {
399
+ "$ref": "#/$defs/view_with_scenario"
400
+ },
401
+ {
402
+ "$ref": "#/$defs/view_with_rows"
403
+ }
404
+ ]
405
+ },
406
+ "view_with_scenario": {
326
407
  "type": "object",
327
408
  "additionalProperties": false,
328
409
  "properties": {
@@ -337,36 +418,128 @@
337
418
  },
338
419
  "graphs": {
339
420
  "$ref": "#/$defs/view_graphs"
421
+ },
422
+ "graph_order": {
423
+ "$ref": "#/$defs/view_graph_order"
340
424
  }
341
425
  },
342
426
  "required": [
343
- "scenario_ref",
344
- "graphs"
427
+ "scenario_ref"
428
+ ]
429
+ },
430
+ "view_with_rows": {
431
+ "type": "object",
432
+ "additionalProperties": false,
433
+ "properties": {
434
+ "title": {
435
+ "type": "string"
436
+ },
437
+ "subtitle": {
438
+ "type": "string"
439
+ },
440
+ "rows": {
441
+ "$ref": "#/$defs/view_rows_array"
442
+ }
443
+ },
444
+ "required": [
445
+ "title",
446
+ "rows"
447
+ ]
448
+ },
449
+ "view_rows_array": {
450
+ "type": "array",
451
+ "items": {
452
+ "$ref": "#/$defs/view_rows_array_item"
453
+ },
454
+ "minItems": 1
455
+ },
456
+ "view_rows_array_item": {
457
+ "type": "object",
458
+ "additionalProperties": false,
459
+ "properties": {
460
+ "row": {
461
+ "$ref": "#/$defs/view_row"
462
+ }
463
+ }
464
+ },
465
+ "view_row": {
466
+ "type": "object",
467
+ "additionalProperties": false,
468
+ "properties": {
469
+ "title": {
470
+ "type": "string"
471
+ },
472
+ "subtitle": {
473
+ "type": "string"
474
+ },
475
+ "boxes": {
476
+ "$ref": "#/$defs/view_boxes_array"
477
+ }
478
+ },
479
+ "required": [
480
+ "title",
481
+ "boxes"
482
+ ]
483
+ },
484
+ "view_boxes_array": {
485
+ "type": "array",
486
+ "items": {
487
+ "$ref": "#/$defs/view_boxes_array_item"
488
+ },
489
+ "minItems": 1
490
+ },
491
+ "view_boxes_array_item": {
492
+ "type": "object",
493
+ "additionalProperties": false,
494
+ "properties": {
495
+ "box": {
496
+ "$ref": "#/$defs/view_box"
497
+ }
498
+ }
499
+ },
500
+ "view_box": {
501
+ "type": "object",
502
+ "additionalProperties": false,
503
+ "properties": {
504
+ "title": {
505
+ "type": "string"
506
+ },
507
+ "subtitle": {
508
+ "type": "string"
509
+ },
510
+ "dataset": {
511
+ "$ref": "#/$defs/dataset"
512
+ },
513
+ "scenario_ref": {
514
+ "$ref": "#/$defs/scenario_ref_id"
515
+ }
516
+ },
517
+ "required": [
518
+ "title",
519
+ "dataset",
520
+ "scenario_ref"
345
521
  ]
346
522
  },
347
523
  "view_graphs": {
348
524
  "oneOf": [
349
525
  {
350
- "$ref": "#/$defs/view_graphs_preset"
526
+ "$ref": "#/$defs/graphs_preset"
351
527
  },
352
528
  {
353
- "$ref": "#/$defs/view_graphs_array"
529
+ "$ref": "#/$defs/graphs_array"
530
+ },
531
+ {
532
+ "$ref": "#/$defs/graph_group_ref"
354
533
  }
355
534
  ]
356
535
  },
357
- "view_graphs_preset": {
536
+ "view_graph_order": {
358
537
  "type": "string",
359
538
  "enum": [
360
- "all"
539
+ "default",
540
+ "grouped-by-diffs"
361
541
  ]
362
542
  },
363
- "view_graphs_array": {
364
- "type": "array",
365
- "items": {
366
- "type": "string"
367
- },
368
- "minItems": 1
369
- },
370
543
  "view_group_array_item": {
371
544
  "type": "object",
372
545
  "additionalProperties": false,