@adventurelabs/scout-core 1.5.5 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +47 -0
  2. package/dist/api_keys/actions.d.ts +0 -1
  3. package/dist/api_keys/actions.js +0 -14
  4. package/dist/client/index.d.ts +76 -0
  5. package/dist/client/index.js +83 -0
  6. package/dist/constants/index.d.ts +1 -0
  7. package/dist/constants/index.js +1 -0
  8. package/dist/helpers/analysis_usage/jobs_server.d.ts +25 -0
  9. package/dist/helpers/analysis_usage/jobs_server.js +10 -0
  10. package/dist/helpers/analysis_usage/tasks_server.d.ts +63 -0
  11. package/dist/helpers/analysis_usage/tasks_server.js +14 -0
  12. package/dist/helpers/artifacts.d.ts +0 -1
  13. package/dist/helpers/artifacts.js +10 -147
  14. package/dist/helpers/artifacts.queries.d.ts +26 -0
  15. package/dist/helpers/{artifacts.internal.js → artifacts.queries.js} +24 -41
  16. package/dist/helpers/auth.d.ts +1 -1
  17. package/dist/helpers/auth.js +2 -3
  18. package/dist/helpers/auth_server.d.ts +2 -0
  19. package/dist/helpers/auth_server.js +10 -0
  20. package/dist/helpers/certificates_server.d.ts +101 -0
  21. package/dist/helpers/certificates_server.js +42 -0
  22. package/dist/helpers/chat.d.ts +1 -2
  23. package/dist/helpers/chat.js +3 -38
  24. package/dist/helpers/chat.queries.d.ts +13 -0
  25. package/dist/helpers/chat.queries.js +39 -0
  26. package/dist/helpers/client_abilities_jwt_keys.js +0 -1
  27. package/dist/helpers/client_abilities_token_server.d.ts +1 -0
  28. package/dist/helpers/client_abilities_token_server.js +5 -2
  29. package/dist/helpers/compliance.d.ts +26 -0
  30. package/dist/helpers/compliance.js +74 -0
  31. package/dist/helpers/compliance.queries.d.ts +28 -0
  32. package/dist/helpers/compliance.queries.js +167 -0
  33. package/dist/helpers/connectivity.d.ts +1 -5
  34. package/dist/helpers/connectivity.js +7 -140
  35. package/dist/helpers/connectivity.queries.d.ts +18 -0
  36. package/dist/helpers/connectivity.queries.js +121 -0
  37. package/dist/helpers/contacts_server.d.ts +75 -0
  38. package/dist/helpers/contacts_server.js +18 -0
  39. package/dist/helpers/deviceTransfer.js +2 -11
  40. package/dist/helpers/deviceTransfer.queries.d.ts +4 -0
  41. package/dist/helpers/deviceTransfer.queries.js +11 -0
  42. package/dist/helpers/devices.js +4 -61
  43. package/dist/helpers/devices.queries.d.ts +4 -1
  44. package/dist/helpers/devices.queries.js +52 -0
  45. package/dist/helpers/document_templates.js +6 -52
  46. package/dist/helpers/document_templates.queries.d.ts +9 -0
  47. package/dist/helpers/document_templates.queries.js +56 -0
  48. package/dist/helpers/documents_server.d.ts +226 -0
  49. package/dist/helpers/documents_server.js +38 -0
  50. package/dist/helpers/email.d.ts +0 -6
  51. package/dist/helpers/email.js +1 -19
  52. package/dist/helpers/embeddings.d.ts +0 -5
  53. package/dist/helpers/embeddings.js +2 -19
  54. package/dist/helpers/embeddings.queries.d.ts +7 -0
  55. package/dist/helpers/{embeddings.internal.js → embeddings.queries.js} +2 -2
  56. package/dist/helpers/eventUtils.d.ts +3 -12
  57. package/dist/helpers/eventUtils.js +0 -10
  58. package/dist/helpers/events.d.ts +0 -1
  59. package/dist/helpers/events.js +7 -107
  60. package/dist/helpers/events.queries.d.ts +17 -0
  61. package/dist/helpers/{events.internal.js → events.queries.js} +24 -15
  62. package/dist/helpers/health_metrics.js +3 -38
  63. package/dist/helpers/health_metrics.queries.d.ts +12 -0
  64. package/dist/helpers/health_metrics.queries.js +39 -0
  65. package/dist/helpers/heartbeats.js +4 -83
  66. package/dist/helpers/heartbeats.queries.d.ts +11 -0
  67. package/dist/helpers/heartbeats.queries.js +76 -0
  68. package/dist/helpers/herd_allowed_domains.js +2 -12
  69. package/dist/helpers/{herd_allowed_domains_internal.d.ts → herd_allowed_domains.queries.d.ts} +1 -1
  70. package/dist/helpers/{herd_allowed_domains_internal.js → herd_allowed_domains.queries.js} +2 -2
  71. package/dist/helpers/herd_credentials_server.d.ts +76 -0
  72. package/dist/helpers/herd_credentials_server.js +22 -0
  73. package/dist/helpers/herd_modules.queries.js +10 -7
  74. package/dist/helpers/herd_roles.js +13 -148
  75. package/dist/helpers/herd_roles.queries.d.ts +18 -0
  76. package/dist/helpers/{herd_roles_internal.js → herd_roles.queries.js} +28 -28
  77. package/dist/helpers/herds.js +5 -47
  78. package/dist/helpers/herds.queries.d.ts +8 -1
  79. package/dist/helpers/herds.queries.js +48 -0
  80. package/dist/helpers/invitations.js +7 -58
  81. package/dist/helpers/invitations.queries.d.ts +10 -0
  82. package/dist/helpers/{invitations_internal.js → invitations.queries.js} +12 -12
  83. package/dist/helpers/issuers.js +6 -52
  84. package/dist/helpers/issuers.queries.d.ts +9 -0
  85. package/dist/helpers/issuers.queries.js +53 -0
  86. package/dist/helpers/layers.js +2 -20
  87. package/dist/helpers/layers.queries.d.ts +2 -1
  88. package/dist/helpers/layers.queries.js +9 -13
  89. package/dist/helpers/lifecycle_server.d.ts +178 -0
  90. package/dist/helpers/lifecycle_server.js +38 -0
  91. package/dist/helpers/localizations.js +5 -42
  92. package/dist/helpers/localizations.queries.d.ts +8 -0
  93. package/dist/helpers/localizations.queries.js +45 -0
  94. package/dist/helpers/maintenance_requests_server.d.ts +124 -0
  95. package/dist/helpers/maintenance_requests_server.js +34 -0
  96. package/dist/helpers/manufacturers.js +5 -43
  97. package/dist/helpers/manufacturers.queries.d.ts +10 -0
  98. package/dist/helpers/manufacturers.queries.js +46 -0
  99. package/dist/helpers/media_urls.d.ts +13 -0
  100. package/dist/helpers/media_urls.js +21 -0
  101. package/dist/helpers/models.js +8 -80
  102. package/dist/helpers/models.queries.d.ts +13 -0
  103. package/dist/helpers/models.queries.js +79 -0
  104. package/dist/helpers/observations_server.d.ts +51 -0
  105. package/dist/helpers/observations_server.js +22 -0
  106. package/dist/helpers/operating_contexts.js +39 -154
  107. package/dist/helpers/operating_contexts.queries.d.ts +48 -0
  108. package/dist/helpers/operating_contexts.queries.js +223 -0
  109. package/dist/helpers/operators.js +4 -57
  110. package/dist/helpers/operators.queries.d.ts +7 -0
  111. package/dist/helpers/operators.queries.js +55 -0
  112. package/dist/helpers/parts.d.ts +0 -87
  113. package/dist/helpers/parts.js +1 -89
  114. package/dist/helpers/parts_server.d.ts +260 -0
  115. package/dist/helpers/parts_server.js +71 -0
  116. package/dist/helpers/pins_server.d.ts +118 -0
  117. package/dist/helpers/pins_server.js +38 -0
  118. package/dist/helpers/plans.js +4 -56
  119. package/dist/helpers/plans.queries.d.ts +4 -1
  120. package/dist/helpers/plans.queries.js +39 -12
  121. package/dist/helpers/points_for_user_server.d.ts +9 -0
  122. package/dist/helpers/points_for_user_server.js +14 -0
  123. package/dist/helpers/product_compatibilities.js +6 -78
  124. package/dist/helpers/product_compatibilities.queries.d.ts +9 -0
  125. package/dist/helpers/product_compatibilities.queries.js +83 -0
  126. package/dist/helpers/product_numbers.js +6 -55
  127. package/dist/helpers/product_numbers.queries.d.ts +9 -0
  128. package/dist/helpers/product_numbers.queries.js +58 -0
  129. package/dist/helpers/products.js +6 -54
  130. package/dist/helpers/products.queries.d.ts +11 -0
  131. package/dist/helpers/products.queries.js +58 -0
  132. package/dist/helpers/providers.js +5 -71
  133. package/dist/helpers/providers.queries.d.ts +5 -1
  134. package/dist/helpers/providers.queries.js +52 -11
  135. package/dist/helpers/pubsub_token_server.d.ts +1 -0
  136. package/dist/helpers/pubsub_token_server.js +5 -2
  137. package/dist/helpers/segmentations_sam3.js +5 -78
  138. package/dist/helpers/segmentations_sam3.queries.d.ts +16 -0
  139. package/dist/helpers/segmentations_sam3.queries.js +81 -0
  140. package/dist/helpers/sensor_poses_server.d.ts +98 -0
  141. package/dist/helpers/sensor_poses_server.js +26 -0
  142. package/dist/helpers/session_incidents_server.d.ts +106 -0
  143. package/dist/helpers/session_incidents_server.js +22 -0
  144. package/dist/helpers/session_summaries.d.ts +2 -0
  145. package/dist/helpers/session_summaries.js +7 -23
  146. package/dist/helpers/session_summaries.queries.d.ts +6 -3
  147. package/dist/helpers/session_summaries.queries.js +27 -0
  148. package/dist/helpers/sessions.js +8 -122
  149. package/dist/helpers/sessions.queries.d.ts +14 -2
  150. package/dist/helpers/sessions.queries.js +88 -1
  151. package/dist/helpers/storage.js +0 -1
  152. package/dist/helpers/supabase_auth.d.ts +6 -0
  153. package/dist/helpers/supabase_auth.js +37 -0
  154. package/dist/helpers/tags.d.ts +0 -1
  155. package/dist/helpers/tags.js +13 -559
  156. package/dist/helpers/tags.queries.d.ts +33 -0
  157. package/dist/helpers/tags.queries.js +454 -0
  158. package/dist/helpers/user_credentials_server.d.ts +76 -0
  159. package/dist/helpers/user_credentials_server.js +22 -0
  160. package/dist/helpers/users.d.ts +2 -2
  161. package/dist/helpers/users.js +8 -107
  162. package/dist/helpers/users.queries.d.ts +9 -1
  163. package/dist/helpers/users.queries.js +107 -0
  164. package/dist/helpers/versions_software.d.ts +3 -1
  165. package/dist/helpers/versions_software.js +24 -0
  166. package/dist/helpers/versions_software_server.d.ts +83 -4
  167. package/dist/helpers/versions_software_server.js +23 -50
  168. package/dist/helpers/zones.d.ts +1 -16
  169. package/dist/helpers/zones.js +4 -104
  170. package/dist/helpers/zones.queries.d.ts +6 -0
  171. package/dist/helpers/zones.queries.js +78 -0
  172. package/dist/hooks/useAuthorizedRealtimeTopics.js +8 -2
  173. package/dist/hooks/useInfiniteQuery.js +18 -14
  174. package/dist/hooks/useScoutRealtimeBroadcast.js +8 -6
  175. package/dist/hooks/useScoutRealtimeDocuments.js +3 -2
  176. package/dist/hooks/useScoutRefresh.d.ts +9 -25
  177. package/dist/hooks/useScoutRefresh.js +33 -213
  178. package/dist/providers/ScoutRefreshProvider.d.ts +1 -1
  179. package/dist/providers/ScoutRefreshProvider.js +56 -13
  180. package/dist/server/index.d.ts +78 -0
  181. package/dist/server/index.js +80 -0
  182. package/dist/server/middleware.d.ts +2 -0
  183. package/dist/server/middleware.js +2 -0
  184. package/dist/server/supabase.d.ts +2 -0
  185. package/dist/server/supabase.js +2 -0
  186. package/dist/store/api.d.ts +40 -40
  187. package/dist/store/api.js +38 -109
  188. package/dist/store/configureStore.d.ts +0 -55
  189. package/dist/store/configureStore.js +1 -8
  190. package/dist/store/hooks.js +1 -0
  191. package/dist/supabase/client.d.ts +3 -0
  192. package/dist/supabase/client.js +10 -0
  193. package/dist/supabase/middleware.d.ts +1 -0
  194. package/dist/supabase/middleware.js +6 -20
  195. package/dist/supabase/server.d.ts +7 -2
  196. package/dist/supabase/server.js +13 -1
  197. package/dist/types/db.d.ts +47 -3
  198. package/dist/types/index.d.ts +5 -0
  199. package/dist/types/index.js +5 -0
  200. package/dist/types/supabase.d.ts +512 -0
  201. package/package.json +53 -4
  202. package/dist/api_keys/index.d.ts +0 -1
  203. package/dist/api_keys/index.js +0 -1
  204. package/dist/helpers/artifacts.internal.d.ts +0 -22
  205. package/dist/helpers/client_abilities_jwt_keys_internal.d.ts +0 -9
  206. package/dist/helpers/client_abilities_jwt_keys_internal.js +0 -20
  207. package/dist/helpers/connectivity.internal.d.ts +0 -10
  208. package/dist/helpers/connectivity.internal.js +0 -47
  209. package/dist/helpers/credentials.d.ts +0 -9
  210. package/dist/helpers/credentials.js +0 -92
  211. package/dist/helpers/embeddings.internal.d.ts +0 -5
  212. package/dist/helpers/events.internal.d.ts +0 -13
  213. package/dist/helpers/herd_roles_internal.d.ts +0 -18
  214. package/dist/helpers/index.d.ts +0 -56
  215. package/dist/helpers/index.js +0 -56
  216. package/dist/helpers/invitations_internal.d.ts +0 -10
  217. package/dist/helpers/versions_software_internal.d.ts +0 -6
  218. package/dist/helpers/versions_software_internal.js +0 -53
  219. package/dist/hooks/useDeviceDisplayName.d.ts +0 -8
  220. package/dist/hooks/useDeviceDisplayName.js +0 -49
  221. package/dist/index.d.ts +0 -108
  222. package/dist/index.js +0 -114
  223. package/dist/supabase/index.d.ts +0 -2
  224. package/dist/supabase/index.js +0 -2
@@ -492,6 +492,120 @@ export type Database = {
492
492
  };
493
493
  Relationships: [];
494
494
  };
495
+ compliance_resource_types: {
496
+ Row: {
497
+ description: string | null;
498
+ id: number;
499
+ inserted_at: string;
500
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
501
+ lifecycle_changed_at: string;
502
+ lifecycle_changed_by: string | null;
503
+ lifecycle_reason: string | null;
504
+ name: string;
505
+ system_name: string;
506
+ };
507
+ Insert: {
508
+ description?: string | null;
509
+ id?: number;
510
+ inserted_at?: string;
511
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
512
+ lifecycle_changed_at?: string;
513
+ lifecycle_changed_by?: string | null;
514
+ lifecycle_reason?: string | null;
515
+ name: string;
516
+ system_name: string;
517
+ };
518
+ Update: {
519
+ description?: string | null;
520
+ id?: number;
521
+ inserted_at?: string;
522
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
523
+ lifecycle_changed_at?: string;
524
+ lifecycle_changed_by?: string | null;
525
+ lifecycle_reason?: string | null;
526
+ name?: string;
527
+ system_name?: string;
528
+ };
529
+ Relationships: [
530
+ {
531
+ foreignKeyName: "compliance_resource_types_lifecycle_changed_by_fkey";
532
+ columns: ["lifecycle_changed_by"];
533
+ isOneToOne: false;
534
+ referencedRelation: "users";
535
+ referencedColumns: ["id"];
536
+ }
537
+ ];
538
+ };
539
+ compliance_resources: {
540
+ Row: {
541
+ compliance_resource_type_id: number;
542
+ description: string | null;
543
+ file_uri: string | null;
544
+ id: number;
545
+ inserted_at: string;
546
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
547
+ lifecycle_changed_at: string;
548
+ lifecycle_changed_by: string | null;
549
+ lifecycle_reason: string | null;
550
+ localization_id: number;
551
+ name: string;
552
+ published_at: string | null;
553
+ url: string | null;
554
+ };
555
+ Insert: {
556
+ compliance_resource_type_id: number;
557
+ description?: string | null;
558
+ file_uri?: string | null;
559
+ id?: number;
560
+ inserted_at?: string;
561
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
562
+ lifecycle_changed_at?: string;
563
+ lifecycle_changed_by?: string | null;
564
+ lifecycle_reason?: string | null;
565
+ localization_id: number;
566
+ name: string;
567
+ published_at?: string | null;
568
+ url?: string | null;
569
+ };
570
+ Update: {
571
+ compliance_resource_type_id?: number;
572
+ description?: string | null;
573
+ file_uri?: string | null;
574
+ id?: number;
575
+ inserted_at?: string;
576
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
577
+ lifecycle_changed_at?: string;
578
+ lifecycle_changed_by?: string | null;
579
+ lifecycle_reason?: string | null;
580
+ localization_id?: number;
581
+ name?: string;
582
+ published_at?: string | null;
583
+ url?: string | null;
584
+ };
585
+ Relationships: [
586
+ {
587
+ foreignKeyName: "compliance_resources_compliance_resource_type_id_fkey";
588
+ columns: ["compliance_resource_type_id"];
589
+ isOneToOne: false;
590
+ referencedRelation: "compliance_resource_types";
591
+ referencedColumns: ["id"];
592
+ },
593
+ {
594
+ foreignKeyName: "compliance_resources_lifecycle_changed_by_fkey";
595
+ columns: ["lifecycle_changed_by"];
596
+ isOneToOne: false;
597
+ referencedRelation: "users";
598
+ referencedColumns: ["id"];
599
+ },
600
+ {
601
+ foreignKeyName: "compliance_resources_localization_id_fkey";
602
+ columns: ["localization_id"];
603
+ isOneToOne: false;
604
+ referencedRelation: "localizations";
605
+ referencedColumns: ["id"];
606
+ }
607
+ ];
608
+ };
495
609
  connectivity: {
496
610
  Row: {
497
611
  altitude: number;
@@ -582,8 +696,63 @@ export type Database = {
582
696
  }
583
697
  ];
584
698
  };
699
+ contact_types: {
700
+ Row: {
701
+ description: string | null;
702
+ id: number;
703
+ inserted_at: string;
704
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
705
+ lifecycle_changed_at: string;
706
+ lifecycle_changed_by: string | null;
707
+ lifecycle_reason: string | null;
708
+ localization_id: number;
709
+ name: string;
710
+ num_required: number;
711
+ };
712
+ Insert: {
713
+ description?: string | null;
714
+ id?: number;
715
+ inserted_at?: string;
716
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
717
+ lifecycle_changed_at?: string;
718
+ lifecycle_changed_by?: string | null;
719
+ lifecycle_reason?: string | null;
720
+ localization_id: number;
721
+ name: string;
722
+ num_required?: number;
723
+ };
724
+ Update: {
725
+ description?: string | null;
726
+ id?: number;
727
+ inserted_at?: string;
728
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
729
+ lifecycle_changed_at?: string;
730
+ lifecycle_changed_by?: string | null;
731
+ lifecycle_reason?: string | null;
732
+ localization_id?: number;
733
+ name?: string;
734
+ num_required?: number;
735
+ };
736
+ Relationships: [
737
+ {
738
+ foreignKeyName: "contact_types_lifecycle_changed_by_fkey";
739
+ columns: ["lifecycle_changed_by"];
740
+ isOneToOne: false;
741
+ referencedRelation: "users";
742
+ referencedColumns: ["id"];
743
+ },
744
+ {
745
+ foreignKeyName: "contact_types_localization_id_fkey";
746
+ columns: ["localization_id"];
747
+ isOneToOne: false;
748
+ referencedRelation: "localizations";
749
+ referencedColumns: ["id"];
750
+ }
751
+ ];
752
+ };
585
753
  contacts: {
586
754
  Row: {
755
+ contact_type_id: number | null;
587
756
  created_at: string;
588
757
  created_by: string | null;
589
758
  email: string | null;
@@ -594,11 +763,14 @@ export type Database = {
594
763
  lifecycle_changed_by: string | null;
595
764
  lifecycle_reason: string | null;
596
765
  name: string;
766
+ notes: string | null;
597
767
  phone: string | null;
768
+ radio_frequency: string | null;
598
769
  updated_at: string;
599
770
  updated_by: string | null;
600
771
  };
601
772
  Insert: {
773
+ contact_type_id?: number | null;
602
774
  created_at?: string;
603
775
  created_by?: string | null;
604
776
  email?: string | null;
@@ -609,11 +781,14 @@ export type Database = {
609
781
  lifecycle_changed_by?: string | null;
610
782
  lifecycle_reason?: string | null;
611
783
  name: string;
784
+ notes?: string | null;
612
785
  phone?: string | null;
786
+ radio_frequency?: string | null;
613
787
  updated_at?: string;
614
788
  updated_by?: string | null;
615
789
  };
616
790
  Update: {
791
+ contact_type_id?: number | null;
617
792
  created_at?: string;
618
793
  created_by?: string | null;
619
794
  email?: string | null;
@@ -624,11 +799,20 @@ export type Database = {
624
799
  lifecycle_changed_by?: string | null;
625
800
  lifecycle_reason?: string | null;
626
801
  name?: string;
802
+ notes?: string | null;
627
803
  phone?: string | null;
804
+ radio_frequency?: string | null;
628
805
  updated_at?: string;
629
806
  updated_by?: string | null;
630
807
  };
631
808
  Relationships: [
809
+ {
810
+ foreignKeyName: "contacts_contact_type_id_fkey";
811
+ columns: ["contact_type_id"];
812
+ isOneToOne: false;
813
+ referencedRelation: "contact_types";
814
+ referencedColumns: ["id"];
815
+ },
632
816
  {
633
817
  foreignKeyName: "contacts_created_by_fkey";
634
818
  columns: ["created_by"];
@@ -828,6 +1012,7 @@ export type Database = {
828
1012
  document_templates: {
829
1013
  Row: {
830
1014
  categories: string[];
1015
+ compliance_resource_id: number | null;
831
1016
  description: string | null;
832
1017
  document_condition_id: number | null;
833
1018
  entity_for: Database["public"]["Enums"]["document_entity"] | null;
@@ -841,6 +1026,7 @@ export type Database = {
841
1026
  };
842
1027
  Insert: {
843
1028
  categories?: string[];
1029
+ compliance_resource_id?: number | null;
844
1030
  description?: string | null;
845
1031
  document_condition_id?: number | null;
846
1032
  entity_for?: Database["public"]["Enums"]["document_entity"] | null;
@@ -854,6 +1040,7 @@ export type Database = {
854
1040
  };
855
1041
  Update: {
856
1042
  categories?: string[];
1043
+ compliance_resource_id?: number | null;
857
1044
  description?: string | null;
858
1045
  document_condition_id?: number | null;
859
1046
  entity_for?: Database["public"]["Enums"]["document_entity"] | null;
@@ -866,6 +1053,13 @@ export type Database = {
866
1053
  uses_expiry?: boolean;
867
1054
  };
868
1055
  Relationships: [
1056
+ {
1057
+ foreignKeyName: "document_templates_compliance_resource_id_fkey";
1058
+ columns: ["compliance_resource_id"];
1059
+ isOneToOne: false;
1060
+ referencedRelation: "compliance_resources";
1061
+ referencedColumns: ["id"];
1062
+ },
869
1063
  {
870
1064
  foreignKeyName: "document_templates_document_condition_id_fkey";
871
1065
  columns: ["document_condition_id"];
@@ -1494,6 +1688,61 @@ export type Database = {
1494
1688
  }
1495
1689
  ];
1496
1690
  };
1691
+ herd_operating_permissions: {
1692
+ Row: {
1693
+ herd_id: number;
1694
+ id: number;
1695
+ inserted_at: string;
1696
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
1697
+ lifecycle_changed_at: string;
1698
+ lifecycle_changed_by: string | null;
1699
+ lifecycle_reason: string | null;
1700
+ operating_permission_id: number;
1701
+ };
1702
+ Insert: {
1703
+ herd_id: number;
1704
+ id?: number;
1705
+ inserted_at?: string;
1706
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
1707
+ lifecycle_changed_at?: string;
1708
+ lifecycle_changed_by?: string | null;
1709
+ lifecycle_reason?: string | null;
1710
+ operating_permission_id: number;
1711
+ };
1712
+ Update: {
1713
+ herd_id?: number;
1714
+ id?: number;
1715
+ inserted_at?: string;
1716
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
1717
+ lifecycle_changed_at?: string;
1718
+ lifecycle_changed_by?: string | null;
1719
+ lifecycle_reason?: string | null;
1720
+ operating_permission_id?: number;
1721
+ };
1722
+ Relationships: [
1723
+ {
1724
+ foreignKeyName: "herd_operating_permissions_herd_id_fkey";
1725
+ columns: ["herd_id"];
1726
+ isOneToOne: false;
1727
+ referencedRelation: "herds";
1728
+ referencedColumns: ["id"];
1729
+ },
1730
+ {
1731
+ foreignKeyName: "herd_operating_permissions_lifecycle_changed_by_fkey";
1732
+ columns: ["lifecycle_changed_by"];
1733
+ isOneToOne: false;
1734
+ referencedRelation: "users";
1735
+ referencedColumns: ["id"];
1736
+ },
1737
+ {
1738
+ foreignKeyName: "herd_operating_permissions_operating_permission_id_fkey";
1739
+ columns: ["operating_permission_id"];
1740
+ isOneToOne: false;
1741
+ referencedRelation: "operating_permissions";
1742
+ referencedColumns: ["id"];
1743
+ }
1744
+ ];
1745
+ };
1497
1746
  herd_role_abilities: {
1498
1747
  Row: {
1499
1748
  ability_id: number;
@@ -1992,6 +2241,64 @@ export type Database = {
1992
2241
  }
1993
2242
  ];
1994
2243
  };
2244
+ operating_context_contacts: {
2245
+ Row: {
2246
+ contact_id: number;
2247
+ herd_id: number;
2248
+ id: number;
2249
+ inserted_at: string;
2250
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
2251
+ lifecycle_changed_at: string;
2252
+ lifecycle_changed_by: string | null;
2253
+ lifecycle_reason: string | null;
2254
+ operating_context_id: number;
2255
+ };
2256
+ Insert: {
2257
+ contact_id: number;
2258
+ herd_id: number;
2259
+ id?: number;
2260
+ inserted_at?: string;
2261
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2262
+ lifecycle_changed_at?: string;
2263
+ lifecycle_changed_by?: string | null;
2264
+ lifecycle_reason?: string | null;
2265
+ operating_context_id: number;
2266
+ };
2267
+ Update: {
2268
+ contact_id?: number;
2269
+ herd_id?: number;
2270
+ id?: number;
2271
+ inserted_at?: string;
2272
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2273
+ lifecycle_changed_at?: string;
2274
+ lifecycle_changed_by?: string | null;
2275
+ lifecycle_reason?: string | null;
2276
+ operating_context_id?: number;
2277
+ };
2278
+ Relationships: [
2279
+ {
2280
+ foreignKeyName: "operating_context_contact_contact_fkey";
2281
+ columns: ["contact_id", "herd_id"];
2282
+ isOneToOne: false;
2283
+ referencedRelation: "contacts";
2284
+ referencedColumns: ["id", "herd_id"];
2285
+ },
2286
+ {
2287
+ foreignKeyName: "operating_context_contact_context_fkey";
2288
+ columns: ["operating_context_id", "herd_id"];
2289
+ isOneToOne: false;
2290
+ referencedRelation: "operating_contexts";
2291
+ referencedColumns: ["id", "herd_id"];
2292
+ },
2293
+ {
2294
+ foreignKeyName: "operating_context_contacts_lifecycle_changed_by_fkey";
2295
+ columns: ["lifecycle_changed_by"];
2296
+ isOneToOne: false;
2297
+ referencedRelation: "users";
2298
+ referencedColumns: ["id"];
2299
+ }
2300
+ ];
2301
+ };
1995
2302
  operating_context_equipment_categories: {
1996
2303
  Row: {
1997
2304
  id: number;
@@ -2220,6 +2527,141 @@ export type Database = {
2220
2527
  }
2221
2528
  ];
2222
2529
  };
2530
+ operating_context_point_of_interest_types: {
2531
+ Row: {
2532
+ id: number;
2533
+ inserted_at: string;
2534
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
2535
+ lifecycle_changed_at: string;
2536
+ lifecycle_changed_by: string | null;
2537
+ lifecycle_reason: string | null;
2538
+ localization_id: number;
2539
+ name: string;
2540
+ num_required: number;
2541
+ system_name: string;
2542
+ };
2543
+ Insert: {
2544
+ id?: number;
2545
+ inserted_at?: string;
2546
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2547
+ lifecycle_changed_at?: string;
2548
+ lifecycle_changed_by?: string | null;
2549
+ lifecycle_reason?: string | null;
2550
+ localization_id: number;
2551
+ name: string;
2552
+ num_required: number;
2553
+ system_name: string;
2554
+ };
2555
+ Update: {
2556
+ id?: number;
2557
+ inserted_at?: string;
2558
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2559
+ lifecycle_changed_at?: string;
2560
+ lifecycle_changed_by?: string | null;
2561
+ lifecycle_reason?: string | null;
2562
+ localization_id?: number;
2563
+ name?: string;
2564
+ num_required?: number;
2565
+ system_name?: string;
2566
+ };
2567
+ Relationships: [
2568
+ {
2569
+ foreignKeyName: "operating_context_point_of_interest_t_lifecycle_changed_by_fkey";
2570
+ columns: ["lifecycle_changed_by"];
2571
+ isOneToOne: false;
2572
+ referencedRelation: "users";
2573
+ referencedColumns: ["id"];
2574
+ },
2575
+ {
2576
+ foreignKeyName: "operating_context_point_of_interest_types_localization_id_fkey";
2577
+ columns: ["localization_id"];
2578
+ isOneToOne: false;
2579
+ referencedRelation: "localizations";
2580
+ referencedColumns: ["id"];
2581
+ }
2582
+ ];
2583
+ };
2584
+ operating_context_points_of_interest: {
2585
+ Row: {
2586
+ created_at: string;
2587
+ created_by: string;
2588
+ id: number;
2589
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
2590
+ lifecycle_changed_at: string;
2591
+ lifecycle_changed_by: string | null;
2592
+ lifecycle_reason: string | null;
2593
+ location: unknown;
2594
+ operating_context_id: number;
2595
+ point_of_interest_type_id: number;
2596
+ updated_at: string;
2597
+ updated_by: string | null;
2598
+ };
2599
+ Insert: {
2600
+ created_at?: string;
2601
+ created_by: string;
2602
+ id?: number;
2603
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2604
+ lifecycle_changed_at?: string;
2605
+ lifecycle_changed_by?: string | null;
2606
+ lifecycle_reason?: string | null;
2607
+ location: unknown;
2608
+ operating_context_id: number;
2609
+ point_of_interest_type_id: number;
2610
+ updated_at?: string;
2611
+ updated_by?: string | null;
2612
+ };
2613
+ Update: {
2614
+ created_at?: string;
2615
+ created_by?: string;
2616
+ id?: number;
2617
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
2618
+ lifecycle_changed_at?: string;
2619
+ lifecycle_changed_by?: string | null;
2620
+ lifecycle_reason?: string | null;
2621
+ location?: unknown;
2622
+ operating_context_id?: number;
2623
+ point_of_interest_type_id?: number;
2624
+ updated_at?: string;
2625
+ updated_by?: string | null;
2626
+ };
2627
+ Relationships: [
2628
+ {
2629
+ foreignKeyName: "operating_context_points_of_inte_point_of_interest_type_id_fkey";
2630
+ columns: ["point_of_interest_type_id"];
2631
+ isOneToOne: false;
2632
+ referencedRelation: "operating_context_point_of_interest_types";
2633
+ referencedColumns: ["id"];
2634
+ },
2635
+ {
2636
+ foreignKeyName: "operating_context_points_of_interest_created_by_fkey";
2637
+ columns: ["created_by"];
2638
+ isOneToOne: false;
2639
+ referencedRelation: "users";
2640
+ referencedColumns: ["id"];
2641
+ },
2642
+ {
2643
+ foreignKeyName: "operating_context_points_of_interest_lifecycle_changed_by_fkey";
2644
+ columns: ["lifecycle_changed_by"];
2645
+ isOneToOne: false;
2646
+ referencedRelation: "users";
2647
+ referencedColumns: ["id"];
2648
+ },
2649
+ {
2650
+ foreignKeyName: "operating_context_points_of_interest_operating_context_id_fkey";
2651
+ columns: ["operating_context_id"];
2652
+ isOneToOne: false;
2653
+ referencedRelation: "operating_contexts";
2654
+ referencedColumns: ["id"];
2655
+ },
2656
+ {
2657
+ foreignKeyName: "operating_context_points_of_interest_updated_by_fkey";
2658
+ columns: ["updated_by"];
2659
+ isOneToOne: false;
2660
+ referencedRelation: "users";
2661
+ referencedColumns: ["id"];
2662
+ }
2663
+ ];
2664
+ };
2223
2665
  operating_context_regions: {
2224
2666
  Row: {
2225
2667
  created_at: string;
@@ -2620,6 +3062,7 @@ export type Database = {
2620
3062
  lifecycle_changed_at: string;
2621
3063
  lifecycle_changed_by: string | null;
2622
3064
  lifecycle_reason: string | null;
3065
+ local_notes: string | null;
2623
3066
  name: string;
2624
3067
  operating_context_type_id: number;
2625
3068
  updated_at: string;
@@ -2640,6 +3083,7 @@ export type Database = {
2640
3083
  lifecycle_changed_at?: string;
2641
3084
  lifecycle_changed_by?: string | null;
2642
3085
  lifecycle_reason?: string | null;
3086
+ local_notes?: string | null;
2643
3087
  name: string;
2644
3088
  operating_context_type_id: number;
2645
3089
  updated_at?: string;
@@ -2660,6 +3104,7 @@ export type Database = {
2660
3104
  lifecycle_changed_at?: string;
2661
3105
  lifecycle_changed_by?: string | null;
2662
3106
  lifecycle_reason?: string | null;
3107
+ local_notes?: string | null;
2663
3108
  name?: string;
2664
3109
  operating_context_type_id?: number;
2665
3110
  updated_at?: string;
@@ -2763,6 +3208,57 @@ export type Database = {
2763
3208
  }
2764
3209
  ];
2765
3210
  };
3211
+ operating_permissions: {
3212
+ Row: {
3213
+ description: string | null;
3214
+ id: number;
3215
+ inserted_at: string;
3216
+ lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
3217
+ lifecycle_changed_at: string;
3218
+ lifecycle_changed_by: string | null;
3219
+ lifecycle_reason: string | null;
3220
+ localization_id: number;
3221
+ name: string;
3222
+ };
3223
+ Insert: {
3224
+ description?: string | null;
3225
+ id?: number;
3226
+ inserted_at?: string;
3227
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
3228
+ lifecycle_changed_at?: string;
3229
+ lifecycle_changed_by?: string | null;
3230
+ lifecycle_reason?: string | null;
3231
+ localization_id: number;
3232
+ name: string;
3233
+ };
3234
+ Update: {
3235
+ description?: string | null;
3236
+ id?: number;
3237
+ inserted_at?: string;
3238
+ lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
3239
+ lifecycle_changed_at?: string;
3240
+ lifecycle_changed_by?: string | null;
3241
+ lifecycle_reason?: string | null;
3242
+ localization_id?: number;
3243
+ name?: string;
3244
+ };
3245
+ Relationships: [
3246
+ {
3247
+ foreignKeyName: "operating_permissions_lifecycle_changed_by_fkey";
3248
+ columns: ["lifecycle_changed_by"];
3249
+ isOneToOne: false;
3250
+ referencedRelation: "users";
3251
+ referencedColumns: ["id"];
3252
+ },
3253
+ {
3254
+ foreignKeyName: "operating_permissions_localization_id_fkey";
3255
+ columns: ["localization_id"];
3256
+ isOneToOne: false;
3257
+ referencedRelation: "localizations";
3258
+ referencedColumns: ["id"];
3259
+ }
3260
+ ];
3261
+ };
2766
3262
  operators: {
2767
3263
  Row: {
2768
3264
  action: string | null;
@@ -5700,6 +6196,22 @@ export type Database = {
5700
6196
  isSetofReturn: false;
5701
6197
  };
5702
6198
  };
6199
+ replace_session_connectivity: {
6200
+ Args: {
6201
+ rows_caller: Json;
6202
+ session_id_caller: number;
6203
+ };
6204
+ Returns: undefined;
6205
+ };
6206
+ replace_session_sensor_poses: {
6207
+ Args: {
6208
+ part_id_caller: number;
6209
+ rows_caller: Json;
6210
+ timestamp_end_caller: string;
6211
+ timestamp_start_caller: string;
6212
+ };
6213
+ Returns: undefined;
6214
+ };
5703
6215
  reset_herd_default_role_abilities: {
5704
6216
  Args: {
5705
6217
  p_herd_id: number;