@adventurelabs/scout-core 1.4.85 → 1.4.87

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.
@@ -329,6 +329,50 @@ export type Database = {
329
329
  }
330
330
  ];
331
331
  };
332
+ calibrations: {
333
+ Row: {
334
+ id: number;
335
+ inserted_at: string;
336
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
337
+ lifecycle_changed_at: string;
338
+ lifecycle_changed_by: string | null;
339
+ lifecycle_reason: string | null;
340
+ name: string | null;
341
+ notes: string | null;
342
+ parameters: Json;
343
+ };
344
+ Insert: {
345
+ id?: number;
346
+ inserted_at?: string;
347
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
348
+ lifecycle_changed_at?: string;
349
+ lifecycle_changed_by?: string | null;
350
+ lifecycle_reason?: string | null;
351
+ name?: string | null;
352
+ notes?: string | null;
353
+ parameters?: Json;
354
+ };
355
+ Update: {
356
+ id?: number;
357
+ inserted_at?: string;
358
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
359
+ lifecycle_changed_at?: string;
360
+ lifecycle_changed_by?: string | null;
361
+ lifecycle_reason?: string | null;
362
+ name?: string | null;
363
+ notes?: string | null;
364
+ parameters?: Json;
365
+ };
366
+ Relationships: [
367
+ {
368
+ foreignKeyName: "calibrations_lifecycle_changed_by_fkey";
369
+ columns: ["lifecycle_changed_by"];
370
+ isOneToOne: false;
371
+ referencedRelation: "users";
372
+ referencedColumns: ["id"];
373
+ }
374
+ ];
375
+ };
332
376
  certificates: {
333
377
  Row: {
334
378
  created_at: string;
@@ -514,6 +558,83 @@ export type Database = {
514
558
  }
515
559
  ];
516
560
  };
561
+ contacts: {
562
+ Row: {
563
+ created_at: string;
564
+ created_by: string | null;
565
+ email: string | null;
566
+ herd_id: number;
567
+ id: number;
568
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
569
+ lifecycle_changed_at: string;
570
+ lifecycle_changed_by: string | null;
571
+ lifecycle_reason: string | null;
572
+ name: string;
573
+ phone: string | null;
574
+ updated_at: string;
575
+ updated_by: string | null;
576
+ };
577
+ Insert: {
578
+ created_at?: string;
579
+ created_by?: string | null;
580
+ email?: string | null;
581
+ herd_id: number;
582
+ id?: number;
583
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
584
+ lifecycle_changed_at?: string;
585
+ lifecycle_changed_by?: string | null;
586
+ lifecycle_reason?: string | null;
587
+ name: string;
588
+ phone?: string | null;
589
+ updated_at?: string;
590
+ updated_by?: string | null;
591
+ };
592
+ Update: {
593
+ created_at?: string;
594
+ created_by?: string | null;
595
+ email?: string | null;
596
+ herd_id?: number;
597
+ id?: number;
598
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
599
+ lifecycle_changed_at?: string;
600
+ lifecycle_changed_by?: string | null;
601
+ lifecycle_reason?: string | null;
602
+ name?: string;
603
+ phone?: string | null;
604
+ updated_at?: string;
605
+ updated_by?: string | null;
606
+ };
607
+ Relationships: [
608
+ {
609
+ foreignKeyName: "contacts_created_by_fkey";
610
+ columns: ["created_by"];
611
+ isOneToOne: false;
612
+ referencedRelation: "users";
613
+ referencedColumns: ["id"];
614
+ },
615
+ {
616
+ foreignKeyName: "contacts_herd_id_fkey";
617
+ columns: ["herd_id"];
618
+ isOneToOne: false;
619
+ referencedRelation: "herds";
620
+ referencedColumns: ["id"];
621
+ },
622
+ {
623
+ foreignKeyName: "contacts_lifecycle_changed_by_fkey";
624
+ columns: ["lifecycle_changed_by"];
625
+ isOneToOne: false;
626
+ referencedRelation: "users";
627
+ referencedColumns: ["id"];
628
+ },
629
+ {
630
+ foreignKeyName: "contacts_updated_by_fkey";
631
+ columns: ["updated_by"];
632
+ isOneToOne: false;
633
+ referencedRelation: "users";
634
+ referencedColumns: ["id"];
635
+ }
636
+ ];
637
+ };
517
638
  devices: {
518
639
  Row: {
519
640
  altitude: number | null;
@@ -593,6 +714,152 @@ export type Database = {
593
714
  }
594
715
  ];
595
716
  };
717
+ document_templates: {
718
+ Row: {
719
+ categories: string | null;
720
+ id: number;
721
+ inserted_at: string;
722
+ issuer_id: number | null;
723
+ localization_id: number | null;
724
+ name: string;
725
+ uses_expiry: boolean;
726
+ };
727
+ Insert: {
728
+ categories?: string | null;
729
+ id?: number;
730
+ inserted_at?: string;
731
+ issuer_id?: number | null;
732
+ localization_id?: number | null;
733
+ name: string;
734
+ uses_expiry?: boolean;
735
+ };
736
+ Update: {
737
+ categories?: string | null;
738
+ id?: number;
739
+ inserted_at?: string;
740
+ issuer_id?: number | null;
741
+ localization_id?: number | null;
742
+ name?: string;
743
+ uses_expiry?: boolean;
744
+ };
745
+ Relationships: [
746
+ {
747
+ foreignKeyName: "document_templates_issuer_id_fkey";
748
+ columns: ["issuer_id"];
749
+ isOneToOne: false;
750
+ referencedRelation: "issuers";
751
+ referencedColumns: ["id"];
752
+ },
753
+ {
754
+ foreignKeyName: "document_templates_localization_id_fkey";
755
+ columns: ["localization_id"];
756
+ isOneToOne: false;
757
+ referencedRelation: "localizations";
758
+ referencedColumns: ["id"];
759
+ }
760
+ ];
761
+ };
762
+ documents: {
763
+ Row: {
764
+ created_at: string;
765
+ created_by: string | null;
766
+ device_id: number | null;
767
+ herd_id: number | null;
768
+ id: number;
769
+ product_id: number | null;
770
+ size_bytes: number | null;
771
+ template_id: number | null;
772
+ updated_at: string;
773
+ updated_by: string | null;
774
+ uri: string;
775
+ user_id: string | null;
776
+ valid_from: string | null;
777
+ valid_to: string | null;
778
+ };
779
+ Insert: {
780
+ created_at?: string;
781
+ created_by?: string | null;
782
+ device_id?: number | null;
783
+ herd_id?: number | null;
784
+ id?: number;
785
+ product_id?: number | null;
786
+ size_bytes?: number | null;
787
+ template_id?: number | null;
788
+ updated_at?: string;
789
+ updated_by?: string | null;
790
+ uri: string;
791
+ user_id?: string | null;
792
+ valid_from?: string | null;
793
+ valid_to?: string | null;
794
+ };
795
+ Update: {
796
+ created_at?: string;
797
+ created_by?: string | null;
798
+ device_id?: number | null;
799
+ herd_id?: number | null;
800
+ id?: number;
801
+ product_id?: number | null;
802
+ size_bytes?: number | null;
803
+ template_id?: number | null;
804
+ updated_at?: string;
805
+ updated_by?: string | null;
806
+ uri?: string;
807
+ user_id?: string | null;
808
+ valid_from?: string | null;
809
+ valid_to?: string | null;
810
+ };
811
+ Relationships: [
812
+ {
813
+ foreignKeyName: "documents_created_by_fkey";
814
+ columns: ["created_by"];
815
+ isOneToOne: false;
816
+ referencedRelation: "users";
817
+ referencedColumns: ["id"];
818
+ },
819
+ {
820
+ foreignKeyName: "documents_device_id_fkey";
821
+ columns: ["device_id"];
822
+ isOneToOne: false;
823
+ referencedRelation: "devices";
824
+ referencedColumns: ["id"];
825
+ },
826
+ {
827
+ foreignKeyName: "documents_herd_id_fkey";
828
+ columns: ["herd_id"];
829
+ isOneToOne: false;
830
+ referencedRelation: "herds";
831
+ referencedColumns: ["id"];
832
+ },
833
+ {
834
+ foreignKeyName: "documents_product_id_fkey";
835
+ columns: ["product_id"];
836
+ isOneToOne: false;
837
+ referencedRelation: "products";
838
+ referencedColumns: ["id"];
839
+ },
840
+ {
841
+ foreignKeyName: "documents_template_id_fkey";
842
+ columns: ["template_id"];
843
+ isOneToOne: false;
844
+ referencedRelation: "document_templates";
845
+ referencedColumns: ["id"];
846
+ },
847
+ {
848
+ foreignKeyName: "documents_updated_by_fkey";
849
+ columns: ["updated_by"];
850
+ isOneToOne: false;
851
+ referencedRelation: "users";
852
+ referencedColumns: ["id"];
853
+ },
854
+ {
855
+ foreignKeyName: "documents_user_id_fkey";
856
+ columns: ["user_id"];
857
+ isOneToOne: false;
858
+ referencedRelation: "users";
859
+ referencedColumns: ["id"];
860
+ }
861
+ ];
862
+ };
596
863
  embeddings_vertex_multimodal_001: {
597
864
  Row: {
598
865
  artifact_id: number | null;
@@ -1088,6 +1355,7 @@ export type Database = {
1088
1355
  id: number;
1089
1356
  inserted_at: string;
1090
1357
  is_public: boolean;
1358
+ localization_id: number | null;
1091
1359
  location: unknown;
1092
1360
  slug: string;
1093
1361
  };
@@ -1098,6 +1366,7 @@ export type Database = {
1098
1366
  id?: number;
1099
1367
  inserted_at?: string;
1100
1368
  is_public?: boolean;
1369
+ localization_id?: number | null;
1101
1370
  location?: unknown;
1102
1371
  slug: string;
1103
1372
  };
@@ -1108,10 +1377,48 @@ export type Database = {
1108
1377
  id?: number;
1109
1378
  inserted_at?: string;
1110
1379
  is_public?: boolean;
1380
+ localization_id?: number | null;
1111
1381
  location?: unknown;
1112
1382
  slug?: string;
1113
1383
  };
1114
- Relationships: [];
1384
+ Relationships: [
1385
+ {
1386
+ foreignKeyName: "herds_localization_id_fkey";
1387
+ columns: ["localization_id"];
1388
+ isOneToOne: false;
1389
+ referencedRelation: "localizations";
1390
+ referencedColumns: ["id"];
1391
+ }
1392
+ ];
1393
+ };
1394
+ issuers: {
1395
+ Row: {
1396
+ id: number;
1397
+ inserted_at: string;
1398
+ localization_id: number | null;
1399
+ name: string;
1400
+ };
1401
+ Insert: {
1402
+ id?: number;
1403
+ inserted_at?: string;
1404
+ localization_id?: number | null;
1405
+ name: string;
1406
+ };
1407
+ Update: {
1408
+ id?: number;
1409
+ inserted_at?: string;
1410
+ localization_id?: number | null;
1411
+ name?: string;
1412
+ };
1413
+ Relationships: [
1414
+ {
1415
+ foreignKeyName: "issuers_localization_id_fkey";
1416
+ columns: ["localization_id"];
1417
+ isOneToOne: false;
1418
+ referencedRelation: "localizations";
1419
+ referencedColumns: ["id"];
1420
+ }
1421
+ ];
1115
1422
  };
1116
1423
  layers: {
1117
1424
  Row: {
@@ -1134,48 +1441,200 @@ export type Database = {
1134
1441
  };
1135
1442
  Relationships: [
1136
1443
  {
1137
- foreignKeyName: "layers_herd_id_fkey";
1138
- columns: ["herd_id"];
1444
+ foreignKeyName: "layers_herd_id_fkey";
1445
+ columns: ["herd_id"];
1446
+ isOneToOne: false;
1447
+ referencedRelation: "herds";
1448
+ referencedColumns: ["id"];
1449
+ }
1450
+ ];
1451
+ };
1452
+ localizations: {
1453
+ Row: {
1454
+ id: number;
1455
+ inserted_at: string;
1456
+ region: string;
1457
+ };
1458
+ Insert: {
1459
+ id?: number;
1460
+ inserted_at?: string;
1461
+ region: string;
1462
+ };
1463
+ Update: {
1464
+ id?: number;
1465
+ inserted_at?: string;
1466
+ region?: string;
1467
+ };
1468
+ Relationships: [];
1469
+ };
1470
+ maintenance: {
1471
+ Row: {
1472
+ created_at: string;
1473
+ description: string | null;
1474
+ id: number;
1475
+ part_id: number;
1476
+ timestamp_completion: string;
1477
+ type: string | null;
1478
+ updated_at: string | null;
1479
+ };
1480
+ Insert: {
1481
+ created_at?: string;
1482
+ description?: string | null;
1483
+ id?: number;
1484
+ part_id: number;
1485
+ timestamp_completion: string;
1486
+ type?: string | null;
1487
+ updated_at?: string | null;
1488
+ };
1489
+ Update: {
1490
+ created_at?: string;
1491
+ description?: string | null;
1492
+ id?: number;
1493
+ part_id?: number;
1494
+ timestamp_completion?: string;
1495
+ type?: string | null;
1496
+ updated_at?: string | null;
1497
+ };
1498
+ Relationships: [
1499
+ {
1500
+ foreignKeyName: "maintenance_part_id_fkey";
1501
+ columns: ["part_id"];
1502
+ isOneToOne: false;
1503
+ referencedRelation: "parts";
1504
+ referencedColumns: ["id"];
1505
+ }
1506
+ ];
1507
+ };
1508
+ maintenance_requests: {
1509
+ Row: {
1510
+ created_at: string;
1511
+ creator_user_id: string | null;
1512
+ defect_timestamp: string;
1513
+ description: string;
1514
+ device_id: number | null;
1515
+ id: number;
1516
+ image: string | null;
1517
+ is_serviceable: boolean;
1518
+ part_id: number | null;
1519
+ remediation_completed_at: string | null;
1520
+ remediation_completed_user_id: string | null;
1521
+ remediation_notes: string | null;
1522
+ updated_at: string | null;
1523
+ updated_by_user_id: string | null;
1524
+ };
1525
+ Insert: {
1526
+ created_at?: string;
1527
+ creator_user_id?: string | null;
1528
+ defect_timestamp: string;
1529
+ description: string;
1530
+ device_id?: number | null;
1531
+ id?: number;
1532
+ image?: string | null;
1533
+ is_serviceable?: boolean;
1534
+ part_id?: number | null;
1535
+ remediation_completed_at?: string | null;
1536
+ remediation_completed_user_id?: string | null;
1537
+ remediation_notes?: string | null;
1538
+ updated_at?: string | null;
1539
+ updated_by_user_id?: string | null;
1540
+ };
1541
+ Update: {
1542
+ created_at?: string;
1543
+ creator_user_id?: string | null;
1544
+ defect_timestamp?: string;
1545
+ description?: string;
1546
+ device_id?: number | null;
1547
+ id?: number;
1548
+ image?: string | null;
1549
+ is_serviceable?: boolean;
1550
+ part_id?: number | null;
1551
+ remediation_completed_at?: string | null;
1552
+ remediation_completed_user_id?: string | null;
1553
+ remediation_notes?: string | null;
1554
+ updated_at?: string | null;
1555
+ updated_by_user_id?: string | null;
1556
+ };
1557
+ Relationships: [
1558
+ {
1559
+ foreignKeyName: "maintenance_requests_creator_user_id_fkey";
1560
+ columns: ["creator_user_id"];
1561
+ isOneToOne: false;
1562
+ referencedRelation: "users";
1563
+ referencedColumns: ["id"];
1564
+ },
1565
+ {
1566
+ foreignKeyName: "maintenance_requests_device_id_fkey";
1567
+ columns: ["device_id"];
1568
+ isOneToOne: false;
1569
+ referencedRelation: "devices";
1570
+ referencedColumns: ["id"];
1571
+ },
1572
+ {
1573
+ foreignKeyName: "maintenance_requests_part_id_fkey";
1574
+ columns: ["part_id"];
1139
1575
  isOneToOne: false;
1140
- referencedRelation: "herds";
1576
+ referencedRelation: "parts";
1577
+ referencedColumns: ["id"];
1578
+ },
1579
+ {
1580
+ foreignKeyName: "maintenance_requests_remediation_completed_user_id_fkey";
1581
+ columns: ["remediation_completed_user_id"];
1582
+ isOneToOne: false;
1583
+ referencedRelation: "users";
1584
+ referencedColumns: ["id"];
1585
+ },
1586
+ {
1587
+ foreignKeyName: "maintenance_requests_updated_by_user_id_fkey";
1588
+ columns: ["updated_by_user_id"];
1589
+ isOneToOne: false;
1590
+ referencedRelation: "users";
1141
1591
  referencedColumns: ["id"];
1142
1592
  }
1143
1593
  ];
1144
1594
  };
1145
- maintenance: {
1595
+ manufacturers: {
1146
1596
  Row: {
1147
- created_at: string;
1148
- description: string | null;
1597
+ country: string | null;
1598
+ gln: string | null;
1149
1599
  id: number;
1150
- part_id: number;
1151
- timestamp_completion: string;
1152
- type: string | null;
1153
- updated_at: string | null;
1600
+ inserted_at: string;
1601
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
1602
+ lifecycle_changed_at: string;
1603
+ lifecycle_changed_by: string | null;
1604
+ lifecycle_reason: string | null;
1605
+ name: string;
1606
+ website: string | null;
1154
1607
  };
1155
1608
  Insert: {
1156
- created_at?: string;
1157
- description?: string | null;
1609
+ country?: string | null;
1610
+ gln?: string | null;
1158
1611
  id?: number;
1159
- part_id: number;
1160
- timestamp_completion: string;
1161
- type?: string | null;
1162
- updated_at?: string | null;
1612
+ inserted_at?: string;
1613
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
1614
+ lifecycle_changed_at?: string;
1615
+ lifecycle_changed_by?: string | null;
1616
+ lifecycle_reason?: string | null;
1617
+ name: string;
1618
+ website?: string | null;
1163
1619
  };
1164
1620
  Update: {
1165
- created_at?: string;
1166
- description?: string | null;
1621
+ country?: string | null;
1622
+ gln?: string | null;
1167
1623
  id?: number;
1168
- part_id?: number;
1169
- timestamp_completion?: string;
1170
- type?: string | null;
1171
- updated_at?: string | null;
1624
+ inserted_at?: string;
1625
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
1626
+ lifecycle_changed_at?: string;
1627
+ lifecycle_changed_by?: string | null;
1628
+ lifecycle_reason?: string | null;
1629
+ name?: string;
1630
+ website?: string | null;
1172
1631
  };
1173
1632
  Relationships: [
1174
1633
  {
1175
- foreignKeyName: "maintenance_part_id_fkey";
1176
- columns: ["part_id"];
1634
+ foreignKeyName: "manufacturers_lifecycle_changed_by_fkey";
1635
+ columns: ["lifecycle_changed_by"];
1177
1636
  isOneToOne: false;
1178
- referencedRelation: "parts";
1637
+ referencedRelation: "users";
1179
1638
  referencedColumns: ["id"];
1180
1639
  }
1181
1640
  ];
@@ -1348,12 +1807,15 @@ export type Database = {
1348
1807
  Row: {
1349
1808
  certificate_id: number | null;
1350
1809
  created_at: string;
1351
- device_id: number;
1810
+ device_id: number | null;
1811
+ health: Database["public"]["Enums"]["health_item"];
1812
+ herd_id: number | null;
1352
1813
  id: number;
1353
1814
  lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
1354
1815
  lifecycle_changed_at: string;
1355
1816
  lifecycle_changed_by: string | null;
1356
1817
  lifecycle_reason: string | null;
1818
+ primary_calibration_id: number | null;
1357
1819
  product_number: string;
1358
1820
  serial_number: string;
1359
1821
  updated_at: string | null;
@@ -1361,12 +1823,15 @@ export type Database = {
1361
1823
  Insert: {
1362
1824
  certificate_id?: number | null;
1363
1825
  created_at?: string;
1364
- device_id: number;
1826
+ device_id?: number | null;
1827
+ health?: Database["public"]["Enums"]["health_item"];
1828
+ herd_id?: number | null;
1365
1829
  id?: number;
1366
1830
  lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
1367
1831
  lifecycle_changed_at?: string;
1368
1832
  lifecycle_changed_by?: string | null;
1369
1833
  lifecycle_reason?: string | null;
1834
+ primary_calibration_id?: number | null;
1370
1835
  product_number: string;
1371
1836
  serial_number: string;
1372
1837
  updated_at?: string | null;
@@ -1374,12 +1839,15 @@ export type Database = {
1374
1839
  Update: {
1375
1840
  certificate_id?: number | null;
1376
1841
  created_at?: string;
1377
- device_id?: number;
1842
+ device_id?: number | null;
1843
+ health?: Database["public"]["Enums"]["health_item"];
1844
+ herd_id?: number | null;
1378
1845
  id?: number;
1379
1846
  lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
1380
1847
  lifecycle_changed_at?: string;
1381
1848
  lifecycle_changed_by?: string | null;
1382
1849
  lifecycle_reason?: string | null;
1850
+ primary_calibration_id?: number | null;
1383
1851
  product_number?: string;
1384
1852
  serial_number?: string;
1385
1853
  updated_at?: string | null;
@@ -1399,12 +1867,33 @@ export type Database = {
1399
1867
  referencedRelation: "devices";
1400
1868
  referencedColumns: ["id"];
1401
1869
  },
1870
+ {
1871
+ foreignKeyName: "parts_herd_id_fkey";
1872
+ columns: ["herd_id"];
1873
+ isOneToOne: false;
1874
+ referencedRelation: "herds";
1875
+ referencedColumns: ["id"];
1876
+ },
1402
1877
  {
1403
1878
  foreignKeyName: "parts_lifecycle_changed_by_fkey";
1404
1879
  columns: ["lifecycle_changed_by"];
1405
1880
  isOneToOne: false;
1406
1881
  referencedRelation: "users";
1407
1882
  referencedColumns: ["id"];
1883
+ },
1884
+ {
1885
+ foreignKeyName: "parts_primary_calibration_id_fkey";
1886
+ columns: ["primary_calibration_id"];
1887
+ isOneToOne: false;
1888
+ referencedRelation: "calibrations";
1889
+ referencedColumns: ["id"];
1890
+ },
1891
+ {
1892
+ foreignKeyName: "parts_product_number_fkey";
1893
+ columns: ["product_number"];
1894
+ isOneToOne: false;
1895
+ referencedRelation: "product_numbers";
1896
+ referencedColumns: ["product_number"];
1408
1897
  }
1409
1898
  ];
1410
1899
  };
@@ -1578,6 +2067,117 @@ export type Database = {
1578
2067
  }
1579
2068
  ];
1580
2069
  };
2070
+ product_numbers: {
2071
+ Row: {
2072
+ gtin: string | null;
2073
+ inserted_at: string;
2074
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
2075
+ lifecycle_changed_at: string;
2076
+ lifecycle_changed_by: string | null;
2077
+ lifecycle_reason: string | null;
2078
+ notes: string | null;
2079
+ product_id: number;
2080
+ product_number: string;
2081
+ revision: string | null;
2082
+ };
2083
+ Insert: {
2084
+ gtin?: string | null;
2085
+ inserted_at?: string;
2086
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2087
+ lifecycle_changed_at?: string;
2088
+ lifecycle_changed_by?: string | null;
2089
+ lifecycle_reason?: string | null;
2090
+ notes?: string | null;
2091
+ product_id: number;
2092
+ product_number: string;
2093
+ revision?: string | null;
2094
+ };
2095
+ Update: {
2096
+ gtin?: string | null;
2097
+ inserted_at?: string;
2098
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2099
+ lifecycle_changed_at?: string;
2100
+ lifecycle_changed_by?: string | null;
2101
+ lifecycle_reason?: string | null;
2102
+ notes?: string | null;
2103
+ product_id?: number;
2104
+ product_number?: string;
2105
+ revision?: string | null;
2106
+ };
2107
+ Relationships: [
2108
+ {
2109
+ foreignKeyName: "product_numbers_lifecycle_changed_by_fkey";
2110
+ columns: ["lifecycle_changed_by"];
2111
+ isOneToOne: false;
2112
+ referencedRelation: "users";
2113
+ referencedColumns: ["id"];
2114
+ },
2115
+ {
2116
+ foreignKeyName: "product_numbers_product_id_fkey";
2117
+ columns: ["product_id"];
2118
+ isOneToOne: false;
2119
+ referencedRelation: "products";
2120
+ referencedColumns: ["id"];
2121
+ }
2122
+ ];
2123
+ };
2124
+ products: {
2125
+ Row: {
2126
+ category: string | null;
2127
+ description: string | null;
2128
+ id: number;
2129
+ inserted_at: string;
2130
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
2131
+ lifecycle_changed_at: string;
2132
+ lifecycle_changed_by: string | null;
2133
+ lifecycle_reason: string | null;
2134
+ manufacturer_id: number;
2135
+ name: string;
2136
+ website: string | null;
2137
+ };
2138
+ Insert: {
2139
+ category?: string | null;
2140
+ description?: string | null;
2141
+ id?: number;
2142
+ inserted_at?: string;
2143
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2144
+ lifecycle_changed_at?: string;
2145
+ lifecycle_changed_by?: string | null;
2146
+ lifecycle_reason?: string | null;
2147
+ manufacturer_id: number;
2148
+ name: string;
2149
+ website?: string | null;
2150
+ };
2151
+ Update: {
2152
+ category?: string | null;
2153
+ description?: string | null;
2154
+ id?: number;
2155
+ inserted_at?: string;
2156
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2157
+ lifecycle_changed_at?: string;
2158
+ lifecycle_changed_by?: string | null;
2159
+ lifecycle_reason?: string | null;
2160
+ manufacturer_id?: number;
2161
+ name?: string;
2162
+ website?: string | null;
2163
+ };
2164
+ Relationships: [
2165
+ {
2166
+ foreignKeyName: "products_lifecycle_changed_by_fkey";
2167
+ columns: ["lifecycle_changed_by"];
2168
+ isOneToOne: false;
2169
+ referencedRelation: "users";
2170
+ referencedColumns: ["id"];
2171
+ },
2172
+ {
2173
+ foreignKeyName: "products_manufacturer_id_fkey";
2174
+ columns: ["manufacturer_id"];
2175
+ isOneToOne: false;
2176
+ referencedRelation: "manufacturers";
2177
+ referencedColumns: ["id"];
2178
+ }
2179
+ ];
2180
+ };
1581
2181
  providers: {
1582
2182
  Row: {
1583
2183
  created_at: string;
@@ -1735,6 +2335,65 @@ export type Database = {
1735
2335
  }
1736
2336
  ];
1737
2337
  };
2338
+ sensor_poses: {
2339
+ Row: {
2340
+ active_processing_modality: string | null;
2341
+ active_recording_modality: string | null;
2342
+ id: number;
2343
+ inserted_at: string;
2344
+ origin_heading: number | null;
2345
+ origin_height: number | null;
2346
+ origin_location: unknown;
2347
+ origin_pitch: number | null;
2348
+ origin_roll: number | null;
2349
+ part_id: number;
2350
+ sensor_pitch: number | null;
2351
+ sensor_roll: number | null;
2352
+ sensor_yaw: number | null;
2353
+ timestamp_observation: string;
2354
+ };
2355
+ Insert: {
2356
+ active_processing_modality?: string | null;
2357
+ active_recording_modality?: string | null;
2358
+ id?: number;
2359
+ inserted_at?: string;
2360
+ origin_heading?: number | null;
2361
+ origin_height?: number | null;
2362
+ origin_location?: unknown;
2363
+ origin_pitch?: number | null;
2364
+ origin_roll?: number | null;
2365
+ part_id: number;
2366
+ sensor_pitch?: number | null;
2367
+ sensor_roll?: number | null;
2368
+ sensor_yaw?: number | null;
2369
+ timestamp_observation: string;
2370
+ };
2371
+ Update: {
2372
+ active_processing_modality?: string | null;
2373
+ active_recording_modality?: string | null;
2374
+ id?: number;
2375
+ inserted_at?: string;
2376
+ origin_heading?: number | null;
2377
+ origin_height?: number | null;
2378
+ origin_location?: unknown;
2379
+ origin_pitch?: number | null;
2380
+ origin_roll?: number | null;
2381
+ part_id?: number;
2382
+ sensor_pitch?: number | null;
2383
+ sensor_roll?: number | null;
2384
+ sensor_yaw?: number | null;
2385
+ timestamp_observation?: string;
2386
+ };
2387
+ Relationships: [
2388
+ {
2389
+ foreignKeyName: "sensor_poses_part_id_fkey";
2390
+ columns: ["part_id"];
2391
+ isOneToOne: false;
2392
+ referencedRelation: "parts";
2393
+ referencedColumns: ["id"];
2394
+ }
2395
+ ];
2396
+ };
1738
2397
  sessions: {
1739
2398
  Row: {
1740
2399
  altitude_average: number;
@@ -3204,6 +3863,35 @@ export type Database = {
3204
3863
  isSetofReturn: true;
3205
3864
  };
3206
3865
  };
3866
+ get_maintenance_requests_for_herd: {
3867
+ Args: {
3868
+ herd_id_caller: number;
3869
+ limit_caller?: number;
3870
+ offset_caller?: number;
3871
+ };
3872
+ Returns: {
3873
+ created_at: string;
3874
+ creator_user_id: string | null;
3875
+ defect_timestamp: string;
3876
+ description: string;
3877
+ device_id: number | null;
3878
+ id: number;
3879
+ image: string | null;
3880
+ is_serviceable: boolean;
3881
+ part_id: number | null;
3882
+ remediation_completed_at: string | null;
3883
+ remediation_completed_user_id: string | null;
3884
+ remediation_notes: string | null;
3885
+ updated_at: string | null;
3886
+ updated_by_user_id: string | null;
3887
+ }[];
3888
+ SetofOptions: {
3889
+ from: "*";
3890
+ to: "maintenance_requests";
3891
+ isOneToOne: false;
3892
+ isSetofReturn: true;
3893
+ };
3894
+ };
3207
3895
  get_minimal_subjects_for_artifact: {
3208
3896
  Args: {
3209
3897
  artifact_id_caller: number;
@@ -3220,6 +3908,33 @@ export type Database = {
3220
3908
  subject_id: number;
3221
3909
  }[];
3222
3910
  };
3911
+ get_parts_for_herd: {
3912
+ Args: {
3913
+ herd_id_caller: number;
3914
+ };
3915
+ Returns: {
3916
+ certificate_id: number | null;
3917
+ created_at: string;
3918
+ device_id: number | null;
3919
+ health: Database["public"]["Enums"]["health_item"];
3920
+ herd_id: number | null;
3921
+ id: number;
3922
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
3923
+ lifecycle_changed_at: string;
3924
+ lifecycle_changed_by: string | null;
3925
+ lifecycle_reason: string | null;
3926
+ primary_calibration_id: number | null;
3927
+ product_number: string;
3928
+ serial_number: string;
3929
+ updated_at: string | null;
3930
+ }[];
3931
+ SetofOptions: {
3932
+ from: "*";
3933
+ to: "parts";
3934
+ isOneToOne: false;
3935
+ isSetofReturn: true;
3936
+ };
3937
+ };
3223
3938
  get_pins_for_herd: {
3224
3939
  Args: {
3225
3940
  herd_id_caller: number;
@@ -3487,6 +4202,12 @@ export type Database = {
3487
4202
  };
3488
4203
  Returns: number;
3489
4204
  };
4205
+ get_total_maintenance_requests_for_herd: {
4206
+ Args: {
4207
+ herd_id_caller: number;
4208
+ };
4209
+ Returns: number;
4210
+ };
3490
4211
  get_zones_and_actions_for_herd: {
3491
4212
  Args: {
3492
4213
  herd_id_caller: number;
@@ -3800,6 +4521,7 @@ export type Database = {
3800
4521
  app_permission: "herds.delete" | "events.delete";
3801
4522
  device_type: "trail_camera" | "drone_fixed_wing" | "drone_quad" | "gps_tracker" | "sentry_tower" | "smart_buoy" | "radio_mesh_base_station" | "radio_mesh_repeater" | "unknown" | "gps_tracker_vehicle" | "gps_tracker_person" | "radio_mesh_base_station_gateway";
3802
4523
  entity_lifecycle: "active" | "retired" | "deleted";
4524
+ health_item: "healthy" | "repairable" | "unrepairable";
3803
4525
  herd_invitation_status: "pending" | "accepted" | "revoked" | "expired";
3804
4526
  media_type: "image" | "video" | "audio" | "text";
3805
4527
  plan_type: "mission" | "fence" | "rally" | "markov";
@@ -4121,6 +4843,7 @@ export declare const Constants: {
4121
4843
  readonly app_permission: readonly ["herds.delete", "events.delete"];
4122
4844
  readonly device_type: readonly ["trail_camera", "drone_fixed_wing", "drone_quad", "gps_tracker", "sentry_tower", "smart_buoy", "radio_mesh_base_station", "radio_mesh_repeater", "unknown", "gps_tracker_vehicle", "gps_tracker_person", "radio_mesh_base_station_gateway"];
4123
4845
  readonly entity_lifecycle: readonly ["active", "retired", "deleted"];
4846
+ readonly health_item: readonly ["healthy", "repairable", "unrepairable"];
4124
4847
  readonly herd_invitation_status: readonly ["pending", "accepted", "revoked", "expired"];
4125
4848
  readonly media_type: readonly ["image", "video", "audio", "text"];
4126
4849
  readonly plan_type: readonly ["mission", "fence", "rally", "markov"];