@welldot/core 0.3.0 → 0.4.0-next.20261015.d7c7365

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 (54) hide show
  1. package/README.md +288 -75
  2. package/dist/index.cjs +2342 -44
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +14060 -4206
  5. package/dist/index.d.ts +14060 -4206
  6. package/dist/index.js +2220 -43
  7. package/dist/index.js.map +1 -1
  8. package/docs/schema/v2/well.schema.json +1043 -17
  9. package/docs/spec/v2/format-reference.md +507 -41
  10. package/docs/spec/v2/interoperability.md +44 -27
  11. package/docs/spec/v2/object-schemas.md +983 -113
  12. package/docs/spec/v2/overview.md +122 -6
  13. package/docs/spec/v2/water-quality.md +483 -0
  14. package/examples/README.md +83 -0
  15. package/examples/belem-pa-condominio-outorga.well +961 -0
  16. package/examples/belem-pa-monitoramento-posto.well +1141 -0
  17. package/examples/belem-pa-pirabas-abastecimento.well +1751 -0
  18. package/examples/belem-pa-poco-colmatado.well +496 -0
  19. package/examples/belem-pa-poco-raso-abandonado.well +388 -0
  20. package/examples/belem-pa-qualidade-agua-acida.well +895 -0
  21. package/examples/colatina-es-gnaisse-rural.well +1047 -0
  22. package/examples/coluna-mg-cristalino-abastecimento.well +1437 -0
  23. package/examples/estrela-doeste-sp-bauru-serra-geral.well +919 -0
  24. package/examples/extremoz-rn-barreiras-raso.well +623 -0
  25. package/examples/gastao-vidigal-sp-dados-inconsistentes.well +222 -0
  26. package/examples/index.json +452 -0
  27. package/examples/irece-ba-carste-bambui.well +861 -0
  28. package/examples/lagoa-santa-mg-carste-abastecimento.well +1087 -0
  29. package/examples/minas-novas-mg-cadastro-incompleto.well +157 -0
  30. package/examples/quixeramobim-ce-cristalino-salobro.well +989 -0
  31. package/examples/rinopolis-sp-estratigrafico-guarani.well +287 -0
  32. package/examples/santarem-pa-jorrante-alter-do-chao.well +554 -0
  33. package/examples/sao-gabriel-rs-cacimba.well +360 -0
  34. package/examples/sete-lagoas-mg-carste-industrial.well +410 -0
  35. package/examples/thumbs/belem-pa-condominio-outorga.svg +1 -0
  36. package/examples/thumbs/belem-pa-monitoramento-posto.svg +1 -0
  37. package/examples/thumbs/belem-pa-pirabas-abastecimento.svg +1 -0
  38. package/examples/thumbs/belem-pa-poco-colmatado.svg +1 -0
  39. package/examples/thumbs/belem-pa-poco-raso-abandonado.svg +1 -0
  40. package/examples/thumbs/belem-pa-qualidade-agua-acida.svg +1 -0
  41. package/examples/thumbs/colatina-es-gnaisse-rural.svg +1 -0
  42. package/examples/thumbs/coluna-mg-cristalino-abastecimento.svg +1 -0
  43. package/examples/thumbs/estrela-doeste-sp-bauru-serra-geral.svg +1 -0
  44. package/examples/thumbs/extremoz-rn-barreiras-raso.svg +1 -0
  45. package/examples/thumbs/gastao-vidigal-sp-dados-inconsistentes.svg +1 -0
  46. package/examples/thumbs/irece-ba-carste-bambui.svg +1 -0
  47. package/examples/thumbs/lagoa-santa-mg-carste-abastecimento.svg +1 -0
  48. package/examples/thumbs/minas-novas-mg-cadastro-incompleto.svg +1 -0
  49. package/examples/thumbs/quixeramobim-ce-cristalino-salobro.svg +1 -0
  50. package/examples/thumbs/rinopolis-sp-estratigrafico-guarani.svg +1 -0
  51. package/examples/thumbs/santarem-pa-jorrante-alter-do-chao.svg +1 -0
  52. package/examples/thumbs/sao-gabriel-rs-cacimba.svg +1 -0
  53. package/examples/thumbs/sete-lagoas-mg-carste-industrial.svg +1 -0
  54. package/package.json +5 -3
@@ -232,6 +232,9 @@
232
232
  },
233
233
  "screen_slot": {
234
234
  "type": "number"
235
+ },
236
+ "slot_type": {
237
+ "type": "string"
235
238
  }
236
239
  },
237
240
  "required": [
@@ -315,8 +318,7 @@
315
318
  },
316
319
  "spacing": {
317
320
  "type": "number",
318
- "exclusiveMinimum": true,
319
- "minimum": 0
321
+ "exclusiveMinimum": 0
320
322
  },
321
323
  "type": {
322
324
  "type": "string"
@@ -511,6 +513,45 @@
511
513
  "notes": {
512
514
  "type": "string"
513
515
  },
516
+ "corrects": {
517
+ "type": "string"
518
+ },
519
+ "attachments": {
520
+ "type": "array",
521
+ "items": {
522
+ "type": "object",
523
+ "properties": {
524
+ "id": {
525
+ "type": "string"
526
+ },
527
+ "uri": {
528
+ "type": "string",
529
+ "format": "uri"
530
+ },
531
+ "media_type": {
532
+ "type": "string"
533
+ },
534
+ "document_type": {
535
+ "type": "string"
536
+ },
537
+ "filename": {
538
+ "type": "string"
539
+ },
540
+ "description": {
541
+ "type": "string"
542
+ },
543
+ "sha256": {
544
+ "type": "string"
545
+ }
546
+ },
547
+ "required": [
548
+ "id",
549
+ "uri",
550
+ "media_type"
551
+ ],
552
+ "additionalProperties": false
553
+ }
554
+ },
514
555
  "static_level": {
515
556
  "type": "number"
516
557
  },
@@ -616,6 +657,12 @@
616
657
  "notes": {
617
658
  "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/notes"
618
659
  },
660
+ "corrects": {
661
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/corrects"
662
+ },
663
+ "attachments": {
664
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments"
665
+ },
619
666
  "static_level": {
620
667
  "type": "number"
621
668
  },
@@ -666,6 +713,12 @@
666
713
  "notes": {
667
714
  "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/notes"
668
715
  },
716
+ "corrects": {
717
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/corrects"
718
+ },
719
+ "attachments": {
720
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments"
721
+ },
669
722
  "static_level": {
670
723
  "type": "number"
671
724
  },
@@ -715,6 +768,12 @@
715
768
  "notes": {
716
769
  "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/notes"
717
770
  },
771
+ "corrects": {
772
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/corrects"
773
+ },
774
+ "attachments": {
775
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments"
776
+ },
718
777
  "steps": {
719
778
  "type": "array",
720
779
  "items": {
@@ -758,6 +817,12 @@
758
817
  "notes": {
759
818
  "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/notes"
760
819
  },
820
+ "corrects": {
821
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/corrects"
822
+ },
823
+ "attachments": {
824
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments"
825
+ },
761
826
  "pumping_rate": {
762
827
  "type": "number"
763
828
  },
@@ -801,6 +866,12 @@
801
866
  },
802
867
  "notes": {
803
868
  "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/notes"
869
+ },
870
+ "corrects": {
871
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/corrects"
872
+ },
873
+ "attachments": {
874
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments"
804
875
  }
805
876
  },
806
877
  "required": [
@@ -896,6 +967,12 @@
896
967
  },
897
968
  "notes": {
898
969
  "type": "string"
970
+ },
971
+ "attachments": {
972
+ "type": "array",
973
+ "items": {
974
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
975
+ }
899
976
  }
900
977
  },
901
978
  "required": [
@@ -935,44 +1012,993 @@
935
1012
  "type": "string"
936
1013
  },
937
1014
  "attachments": {
1015
+ "type": "array",
1016
+ "items": {
1017
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1018
+ }
1019
+ },
1020
+ "hydrodynamic_event_ids": {
1021
+ "type": "array",
1022
+ "items": {
1023
+ "type": "string"
1024
+ }
1025
+ },
1026
+ "sample_ids": {
1027
+ "type": "array",
1028
+ "items": {
1029
+ "type": "string"
1030
+ }
1031
+ },
1032
+ "maintenance_type": {
1033
+ "type": "string"
1034
+ },
1035
+ "pump_installation_id": {
1036
+ "type": "string"
1037
+ },
1038
+ "meter_id": {
1039
+ "type": "string"
1040
+ },
1041
+ "status": {
1042
+ "type": "string",
1043
+ "enum": [
1044
+ "active",
1045
+ "maintenance",
1046
+ "inactive",
1047
+ "decommissioned",
1048
+ "abandoned"
1049
+ ]
1050
+ }
1051
+ },
1052
+ "required": [
1053
+ "id",
1054
+ "datetime",
1055
+ "category",
1056
+ "description"
1057
+ ],
1058
+ "additionalProperties": false
1059
+ }
1060
+ },
1061
+ "attachments": {
1062
+ "type": "array",
1063
+ "items": {
1064
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1065
+ }
1066
+ },
1067
+ "pump_installations": {
1068
+ "type": "array",
1069
+ "items": {
1070
+ "type": "object",
1071
+ "properties": {
1072
+ "id": {
1073
+ "type": "string"
1074
+ },
1075
+ "installed_at": {
1076
+ "type": "string",
1077
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1078
+ },
1079
+ "removed_at": {
1080
+ "type": "string",
1081
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1082
+ },
1083
+ "installed_by": {
1084
+ "type": "string"
1085
+ },
1086
+ "removed_by": {
1087
+ "type": "string"
1088
+ },
1089
+ "type": {
1090
+ "type": "string"
1091
+ },
1092
+ "power_source": {
1093
+ "type": "string"
1094
+ },
1095
+ "manufacturer": {
1096
+ "type": "string"
1097
+ },
1098
+ "model": {
1099
+ "type": "string"
1100
+ },
1101
+ "serial": {
1102
+ "type": "string"
1103
+ },
1104
+ "intake_depth": {
1105
+ "type": "number",
1106
+ "minimum": 0
1107
+ },
1108
+ "rated_flow_rate": {
1109
+ "type": "number",
1110
+ "minimum": 0
1111
+ },
1112
+ "rated_head": {
1113
+ "type": "number",
1114
+ "minimum": 0
1115
+ },
1116
+ "rated_power": {
1117
+ "type": "number",
1118
+ "minimum": 0
1119
+ },
1120
+ "stages": {
1121
+ "type": "integer",
1122
+ "exclusiveMinimum": 0
1123
+ },
1124
+ "riser_diameter": {
1125
+ "type": "number",
1126
+ "minimum": 0
1127
+ },
1128
+ "riser_material": {
1129
+ "type": "string"
1130
+ },
1131
+ "check_valve": {
1132
+ "type": "boolean"
1133
+ },
1134
+ "electrical": {
1135
+ "type": "object",
1136
+ "properties": {
1137
+ "voltage": {
1138
+ "type": "number",
1139
+ "minimum": 0
1140
+ },
1141
+ "phases": {
1142
+ "type": "number",
1143
+ "enum": [
1144
+ 1,
1145
+ 3
1146
+ ]
1147
+ },
1148
+ "cable_section": {
1149
+ "type": "number",
1150
+ "minimum": 0
1151
+ },
1152
+ "cable_length": {
1153
+ "type": "number",
1154
+ "minimum": 0
1155
+ }
1156
+ },
1157
+ "additionalProperties": false
1158
+ },
1159
+ "notes": {
1160
+ "type": "string"
1161
+ },
1162
+ "updated_at": {
1163
+ "type": "string",
1164
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1165
+ },
1166
+ "attachments": {
1167
+ "type": "array",
1168
+ "items": {
1169
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1170
+ }
1171
+ }
1172
+ },
1173
+ "required": [
1174
+ "id",
1175
+ "installed_at",
1176
+ "type"
1177
+ ],
1178
+ "additionalProperties": false
1179
+ }
1180
+ },
1181
+ "permits": {
1182
+ "type": "array",
1183
+ "items": {
1184
+ "type": "object",
1185
+ "properties": {
1186
+ "id": {
1187
+ "type": "string"
1188
+ },
1189
+ "type": {
1190
+ "type": "string"
1191
+ },
1192
+ "authority": {
1193
+ "type": "string"
1194
+ },
1195
+ "identifier": {
1196
+ "type": "string"
1197
+ },
1198
+ "request_identifier": {
1199
+ "type": "string"
1200
+ },
1201
+ "status": {
1202
+ "type": "string",
1203
+ "enum": [
1204
+ "requested",
1205
+ "granted",
1206
+ "suspended",
1207
+ "revoked",
1208
+ "denied",
1209
+ "withdrawn"
1210
+ ]
1211
+ },
1212
+ "issued_at": {
1213
+ "type": "string",
1214
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1215
+ },
1216
+ "valid_from": {
1217
+ "type": "string",
1218
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1219
+ },
1220
+ "valid_until": {
1221
+ "type": "string",
1222
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1223
+ },
1224
+ "renewal_requested_at": {
1225
+ "type": "string",
1226
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1227
+ },
1228
+ "water_use": {
1229
+ "type": "array",
1230
+ "items": {
1231
+ "type": "string"
1232
+ }
1233
+ },
1234
+ "flow_rate": {
1235
+ "type": "number",
1236
+ "minimum": 0
1237
+ },
1238
+ "daily_operating_time": {
1239
+ "type": "number",
1240
+ "minimum": 0
1241
+ },
1242
+ "volume_limits": {
938
1243
  "type": "array",
939
1244
  "items": {
940
1245
  "type": "object",
941
1246
  "properties": {
942
- "id": {
943
- "type": "string"
944
- },
945
- "uri": {
1247
+ "period": {
946
1248
  "type": "string",
947
- "format": "uri"
1249
+ "enum": [
1250
+ "daily",
1251
+ "monthly",
1252
+ "annual"
1253
+ ]
948
1254
  },
949
- "media_type": {
950
- "type": "string"
1255
+ "volume": {
1256
+ "type": "number",
1257
+ "minimum": 0
1258
+ }
1259
+ },
1260
+ "required": [
1261
+ "period",
1262
+ "volume"
1263
+ ],
1264
+ "additionalProperties": false
1265
+ }
1266
+ },
1267
+ "monthly_schedule": {
1268
+ "type": "array",
1269
+ "items": {
1270
+ "type": "object",
1271
+ "properties": {
1272
+ "month": {
1273
+ "type": "integer",
1274
+ "minimum": 1,
1275
+ "maximum": 12
1276
+ },
1277
+ "flow_rate": {
1278
+ "type": "number",
1279
+ "minimum": 0
951
1280
  },
952
- "filename": {
1281
+ "daily_operating_time": {
1282
+ "type": "number",
1283
+ "minimum": 0
1284
+ },
1285
+ "days": {
1286
+ "type": "integer",
1287
+ "minimum": 0,
1288
+ "maximum": 31
1289
+ }
1290
+ },
1291
+ "required": [
1292
+ "month"
1293
+ ],
1294
+ "additionalProperties": false
1295
+ }
1296
+ },
1297
+ "conditions": {
1298
+ "type": "array",
1299
+ "items": {
1300
+ "type": "object",
1301
+ "properties": {
1302
+ "id": {
953
1303
  "type": "string"
954
1304
  },
955
1305
  "description": {
956
1306
  "type": "string"
957
1307
  },
958
- "sha256": {
1308
+ "category": {
1309
+ "type": "string"
1310
+ },
1311
+ "first_due": {
1312
+ "type": "string",
1313
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1314
+ },
1315
+ "due_after": {
1316
+ "type": "string",
1317
+ "pattern": "^P(?=\\d)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?$"
1318
+ },
1319
+ "recurrence": {
1320
+ "type": "string",
1321
+ "pattern": "^P(?=\\d)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?$"
1322
+ },
1323
+ "last_due": {
1324
+ "type": "string",
1325
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1326
+ },
1327
+ "occurrences": {
1328
+ "type": "integer",
1329
+ "exclusiveMinimum": 0
1330
+ },
1331
+ "responsible": {
959
1332
  "type": "string"
1333
+ },
1334
+ "fulfillments": {
1335
+ "type": "array",
1336
+ "items": {
1337
+ "type": "object",
1338
+ "properties": {
1339
+ "id": {
1340
+ "type": "string"
1341
+ },
1342
+ "datetime": {
1343
+ "type": "string",
1344
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1345
+ },
1346
+ "due_date": {
1347
+ "type": "string",
1348
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1349
+ },
1350
+ "description": {
1351
+ "type": "string"
1352
+ },
1353
+ "author": {
1354
+ "type": "string"
1355
+ },
1356
+ "event_id": {
1357
+ "type": "string"
1358
+ },
1359
+ "sample_id": {
1360
+ "type": "string"
1361
+ },
1362
+ "updated_at": {
1363
+ "type": "string",
1364
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1365
+ },
1366
+ "attachments": {
1367
+ "type": "array",
1368
+ "items": {
1369
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1370
+ }
1371
+ }
1372
+ },
1373
+ "required": [
1374
+ "id",
1375
+ "datetime"
1376
+ ],
1377
+ "additionalProperties": false
1378
+ }
960
1379
  }
961
1380
  },
962
1381
  "required": [
963
1382
  "id",
964
- "uri",
965
- "media_type"
1383
+ "description"
966
1384
  ],
967
1385
  "additionalProperties": false
968
1386
  }
969
- }
970
- },
1387
+ },
1388
+ "history": {
1389
+ "type": "array",
1390
+ "items": {
1391
+ "type": "object",
1392
+ "properties": {
1393
+ "id": {
1394
+ "type": "string"
1395
+ },
1396
+ "date": {
1397
+ "type": "string",
1398
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1399
+ },
1400
+ "type": {
1401
+ "type": "string"
1402
+ },
1403
+ "description": {
1404
+ "type": "string"
1405
+ },
1406
+ "done": {
1407
+ "type": "boolean"
1408
+ },
1409
+ "due_date": {
1410
+ "type": "string",
1411
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
1412
+ },
1413
+ "updated_at": {
1414
+ "type": "string",
1415
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1416
+ },
1417
+ "attachments": {
1418
+ "type": "array",
1419
+ "items": {
1420
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1421
+ }
1422
+ }
1423
+ },
1424
+ "required": [
1425
+ "id",
1426
+ "date",
1427
+ "description"
1428
+ ],
1429
+ "additionalProperties": false
1430
+ }
1431
+ },
1432
+ "supersedes": {
1433
+ "type": "string"
1434
+ },
1435
+ "notes": {
1436
+ "type": "string"
1437
+ },
1438
+ "updated_at": {
1439
+ "type": "string",
1440
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1441
+ },
1442
+ "attachments": {
1443
+ "type": "array",
1444
+ "items": {
1445
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1446
+ }
1447
+ }
1448
+ },
1449
+ "required": [
1450
+ "id",
1451
+ "type",
1452
+ "authority"
1453
+ ],
1454
+ "additionalProperties": false
1455
+ }
1456
+ },
1457
+ "meters": {
1458
+ "type": "array",
1459
+ "items": {
1460
+ "type": "object",
1461
+ "properties": {
1462
+ "id": {
1463
+ "type": "string"
1464
+ },
1465
+ "installed_at": {
1466
+ "type": "string",
1467
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1468
+ },
1469
+ "removed_at": {
1470
+ "type": "string",
1471
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1472
+ },
1473
+ "installed_by": {
1474
+ "type": "string"
1475
+ },
1476
+ "removed_by": {
1477
+ "type": "string"
1478
+ },
1479
+ "type": {
1480
+ "type": "string"
1481
+ },
1482
+ "manufacturer": {
1483
+ "type": "string"
1484
+ },
1485
+ "model": {
1486
+ "type": "string"
1487
+ },
1488
+ "serial": {
1489
+ "type": "string"
1490
+ },
1491
+ "nominal_diameter": {
1492
+ "type": "number",
1493
+ "minimum": 0
1494
+ },
1495
+ "max_reading": {
1496
+ "type": "number",
1497
+ "exclusiveMinimum": 0
1498
+ },
1499
+ "notes": {
1500
+ "type": "string"
1501
+ },
1502
+ "updated_at": {
1503
+ "type": "string",
1504
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1505
+ },
1506
+ "attachments": {
1507
+ "type": "array",
1508
+ "items": {
1509
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1510
+ }
1511
+ }
1512
+ },
1513
+ "required": [
1514
+ "id",
1515
+ "installed_at"
1516
+ ],
1517
+ "additionalProperties": false
1518
+ }
1519
+ },
1520
+ "production": {
1521
+ "type": "array",
1522
+ "items": {
1523
+ "anyOf": [
1524
+ {
1525
+ "anyOf": [
1526
+ {
1527
+ "type": "object",
1528
+ "properties": {
1529
+ "id": {
1530
+ "type": "string"
1531
+ },
1532
+ "type": {
1533
+ "type": "string",
1534
+ "const": "meter_reading"
1535
+ },
1536
+ "corrects": {
1537
+ "type": "string"
1538
+ },
1539
+ "sequence": {
1540
+ "type": "integer"
1541
+ },
1542
+ "notes": {
1543
+ "type": "string"
1544
+ },
1545
+ "datetime": {
1546
+ "type": "string",
1547
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1548
+ },
1549
+ "meter_id": {
1550
+ "type": "string"
1551
+ },
1552
+ "reading": {
1553
+ "type": "number",
1554
+ "minimum": 0
1555
+ },
1556
+ "source": {
1557
+ "type": "string"
1558
+ }
1559
+ },
1560
+ "required": [
1561
+ "id",
1562
+ "type",
1563
+ "datetime",
1564
+ "meter_id",
1565
+ "reading"
1566
+ ],
1567
+ "additionalProperties": false
1568
+ },
1569
+ {
1570
+ "type": "object",
1571
+ "properties": {
1572
+ "id": {
1573
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/id"
1574
+ },
1575
+ "type": {
1576
+ "type": "string",
1577
+ "const": "estimated_volume"
1578
+ },
1579
+ "corrects": {
1580
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/corrects"
1581
+ },
1582
+ "sequence": {
1583
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/sequence"
1584
+ },
1585
+ "notes": {
1586
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/notes"
1587
+ },
1588
+ "period_start": {
1589
+ "type": "string",
1590
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1591
+ },
1592
+ "period_end": {
1593
+ "type": "string",
1594
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1595
+ },
1596
+ "volume": {
1597
+ "type": "number",
1598
+ "minimum": 0
1599
+ },
1600
+ "method": {
1601
+ "type": "string"
1602
+ }
1603
+ },
1604
+ "required": [
1605
+ "id",
1606
+ "type",
1607
+ "period_start",
1608
+ "period_end",
1609
+ "volume"
1610
+ ],
1611
+ "additionalProperties": false
1612
+ }
1613
+ ]
1614
+ },
1615
+ {
1616
+ "type": "object",
1617
+ "properties": {
1618
+ "id": {
1619
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/id"
1620
+ },
1621
+ "type": {
1622
+ "type": "string"
1623
+ },
1624
+ "corrects": {
1625
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/corrects"
1626
+ },
1627
+ "sequence": {
1628
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/sequence"
1629
+ },
1630
+ "notes": {
1631
+ "$ref": "#/properties/production/items/anyOf/0/anyOf/0/properties/notes"
1632
+ }
1633
+ },
1634
+ "required": [
1635
+ "id",
1636
+ "type"
1637
+ ],
1638
+ "additionalProperties": true
1639
+ }
1640
+ ]
1641
+ }
1642
+ },
1643
+ "operating_regime": {
1644
+ "type": "array",
1645
+ "items": {
1646
+ "type": "object",
1647
+ "properties": {
1648
+ "id": {
1649
+ "type": "string"
1650
+ },
1651
+ "effective_from": {
1652
+ "type": "string",
1653
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1654
+ },
1655
+ "flow_rate": {
1656
+ "type": "number",
1657
+ "minimum": 0
1658
+ },
1659
+ "daily_operating_time": {
1660
+ "type": "number",
1661
+ "minimum": 0,
1662
+ "maximum": 24
1663
+ },
1664
+ "days_per_week": {
1665
+ "type": "integer",
1666
+ "minimum": 1,
1667
+ "maximum": 7
1668
+ },
1669
+ "notes": {
1670
+ "type": "string"
1671
+ },
1672
+ "updated_at": {
1673
+ "type": "string",
1674
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1675
+ }
1676
+ },
1677
+ "required": [
1678
+ "id",
1679
+ "effective_from"
1680
+ ],
1681
+ "additionalProperties": false
1682
+ }
1683
+ },
1684
+ "water_samples": {
1685
+ "type": "array",
1686
+ "items": {
1687
+ "type": "object",
1688
+ "properties": {
1689
+ "id": {
1690
+ "type": "string"
1691
+ },
1692
+ "datetime": {
1693
+ "type": "string",
1694
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1695
+ },
1696
+ "sample_type": {
1697
+ "type": "string"
1698
+ },
1699
+ "parent_sample_id": {
1700
+ "type": "string"
1701
+ },
1702
+ "sequence": {
1703
+ "type": "integer"
1704
+ },
1705
+ "campaign": {
1706
+ "type": "string"
1707
+ },
1708
+ "sampling_method": {
1709
+ "type": "string"
1710
+ },
1711
+ "sampling_point": {
1712
+ "type": "object",
1713
+ "properties": {
1714
+ "type": {
1715
+ "type": "string"
1716
+ },
1717
+ "depth": {
1718
+ "type": "number",
1719
+ "minimum": 0
1720
+ },
1721
+ "depth_precision": {
1722
+ "type": "number",
1723
+ "minimum": 0
1724
+ },
1725
+ "from": {
1726
+ "type": "number",
1727
+ "minimum": 0
1728
+ },
1729
+ "to": {
1730
+ "type": "number",
1731
+ "minimum": 0
1732
+ },
1733
+ "device": {
1734
+ "type": "string"
1735
+ },
1736
+ "pump_installation_id": {
1737
+ "type": "string"
1738
+ }
1739
+ },
1740
+ "required": [
1741
+ "type"
1742
+ ],
1743
+ "additionalProperties": false
1744
+ },
1745
+ "purge": {
1746
+ "type": "object",
1747
+ "properties": {
1748
+ "duration": {
1749
+ "type": "number",
1750
+ "minimum": 0
1751
+ },
1752
+ "volume": {
1753
+ "type": "number",
1754
+ "minimum": 0
1755
+ },
1756
+ "flow_rate": {
1757
+ "type": "number",
1758
+ "minimum": 0
1759
+ },
1760
+ "stabilized": {
1761
+ "type": "boolean"
1762
+ },
1763
+ "readings": {
1764
+ "type": "array",
1765
+ "items": {
1766
+ "type": "object",
1767
+ "properties": {
1768
+ "elapsed": {
1769
+ "type": "number",
1770
+ "minimum": 0
1771
+ },
1772
+ "parameter": {
1773
+ "type": "object",
1774
+ "properties": {
1775
+ "code": {
1776
+ "type": "string",
1777
+ "minLength": 1
1778
+ },
1779
+ "vocabulary": {
1780
+ "type": "string",
1781
+ "pattern": "^(welldot|cas|x-.+)$"
1782
+ }
1783
+ },
1784
+ "required": [
1785
+ "code",
1786
+ "vocabulary"
1787
+ ],
1788
+ "additionalProperties": false
1789
+ },
1790
+ "value": {
1791
+ "type": "number"
1792
+ }
1793
+ },
1794
+ "required": [
1795
+ "elapsed",
1796
+ "parameter",
1797
+ "value"
1798
+ ],
1799
+ "additionalProperties": false
1800
+ }
1801
+ }
1802
+ },
1803
+ "additionalProperties": false
1804
+ },
1805
+ "static_level_event_id": {
1806
+ "type": "string"
1807
+ },
1808
+ "collected_by": {
1809
+ "type": "string"
1810
+ },
1811
+ "preservation": {
1812
+ "type": "string"
1813
+ },
1814
+ "chain_of_custody": {
1815
+ "type": "string"
1816
+ },
1817
+ "laboratory": {
1818
+ "type": "object",
1819
+ "properties": {
1820
+ "name": {
1821
+ "type": "string"
1822
+ },
1823
+ "accreditation": {
1824
+ "type": "string"
1825
+ },
1826
+ "report_number": {
1827
+ "type": "string"
1828
+ },
1829
+ "batch_id": {
1830
+ "type": "string"
1831
+ },
1832
+ "sample_id": {
1833
+ "type": "string"
1834
+ },
1835
+ "received_at": {
1836
+ "type": "string",
1837
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1838
+ },
1839
+ "received_at_resolution": {
1840
+ "type": "string",
1841
+ "const": "day"
1842
+ },
1843
+ "received_temperature": {
1844
+ "type": "number"
1845
+ }
1846
+ },
1847
+ "required": [
1848
+ "name"
1849
+ ],
1850
+ "additionalProperties": false
1851
+ },
1852
+ "corrects": {
1853
+ "type": "string"
1854
+ },
1855
+ "notes": {
1856
+ "type": "string"
1857
+ },
1858
+ "attachments": {
1859
+ "type": "array",
1860
+ "items": {
1861
+ "$ref": "#/properties/hydrodynamic_events/items/anyOf/0/anyOf/0/properties/attachments/items"
1862
+ }
1863
+ },
1864
+ "results": {
1865
+ "type": "array",
1866
+ "items": {
1867
+ "type": "object",
1868
+ "properties": {
1869
+ "parameter": {
1870
+ "$ref": "#/properties/water_samples/items/properties/purge/properties/readings/items/properties/parameter"
1871
+ },
1872
+ "value": {
1873
+ "type": "number"
1874
+ },
1875
+ "presence": {
1876
+ "type": "boolean"
1877
+ },
1878
+ "text": {
1879
+ "type": "string"
1880
+ },
1881
+ "qualifier": {
1882
+ "type": "string",
1883
+ "enum": [
1884
+ "<",
1885
+ ">",
1886
+ "not_detected",
1887
+ "estimated"
1888
+ ]
1889
+ },
1890
+ "unit": {
1891
+ "type": "string",
1892
+ "minLength": 1
1893
+ },
1894
+ "detection_limit": {
1895
+ "type": "number",
1896
+ "minimum": 0
1897
+ },
1898
+ "quantification_limit": {
1899
+ "type": "number",
1900
+ "minimum": 0
1901
+ },
1902
+ "value_precision": {
1903
+ "type": "number",
1904
+ "minimum": 0
1905
+ },
1906
+ "fraction": {
1907
+ "type": "string",
1908
+ "enum": [
1909
+ "total",
1910
+ "dissolved",
1911
+ "suspended"
1912
+ ]
1913
+ },
1914
+ "filtration": {
1915
+ "type": "object",
1916
+ "properties": {
1917
+ "pore_size": {
1918
+ "type": "number",
1919
+ "exclusiveMinimum": 0
1920
+ },
1921
+ "location": {
1922
+ "type": "string",
1923
+ "enum": [
1924
+ "field",
1925
+ "lab"
1926
+ ]
1927
+ }
1928
+ },
1929
+ "additionalProperties": false
1930
+ },
1931
+ "measured_in": {
1932
+ "type": "string",
1933
+ "enum": [
1934
+ "field",
1935
+ "lab"
1936
+ ]
1937
+ },
1938
+ "method": {
1939
+ "type": "string"
1940
+ },
1941
+ "analyzed_at": {
1942
+ "type": "string",
1943
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1944
+ },
1945
+ "analyzed_at_resolution": {
1946
+ "$ref": "#/properties/water_samples/items/properties/laboratory/properties/received_at_resolution"
1947
+ },
1948
+ "lab_flags": {
1949
+ "type": "array",
1950
+ "items": {
1951
+ "type": "string"
1952
+ }
1953
+ },
1954
+ "validation": {
1955
+ "type": "object",
1956
+ "properties": {
1957
+ "status": {
1958
+ "type": "string",
1959
+ "enum": [
1960
+ "unvalidated",
1961
+ "validated",
1962
+ "qualified",
1963
+ "rejected"
1964
+ ]
1965
+ },
1966
+ "qualifier": {
1967
+ "type": "string"
1968
+ },
1969
+ "guideline": {
1970
+ "type": "string"
1971
+ },
1972
+ "validated_by": {
1973
+ "type": "string"
1974
+ },
1975
+ "validated_at": {
1976
+ "type": "string",
1977
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
1978
+ }
1979
+ },
1980
+ "required": [
1981
+ "status"
1982
+ ],
1983
+ "additionalProperties": false
1984
+ },
1985
+ "notes": {
1986
+ "type": "string"
1987
+ }
1988
+ },
1989
+ "required": [
1990
+ "parameter"
1991
+ ],
1992
+ "additionalProperties": false
1993
+ },
1994
+ "minItems": 1
1995
+ }
1996
+ },
971
1997
  "required": [
972
1998
  "id",
973
1999
  "datetime",
974
- "category",
975
- "description"
2000
+ "sample_type",
2001
+ "results"
976
2002
  ],
977
2003
  "additionalProperties": false
978
2004
  }