@adventurelabs/scout-core 1.0.87 → 1.0.89

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.
@@ -120,6 +120,8 @@ export type Database = {
120
120
  connectivity: {
121
121
  Row: {
122
122
  altitude: number;
123
+ battery_percentage: number | null;
124
+ device_id: number | null;
123
125
  h11_index: string;
124
126
  h12_index: string;
125
127
  h13_index: string;
@@ -129,12 +131,14 @@ export type Database = {
129
131
  inserted_at: string;
130
132
  location: unknown;
131
133
  noise: number;
132
- session_id: number;
134
+ session_id: number | null;
133
135
  signal: number;
134
136
  timestamp_start: string;
135
137
  };
136
138
  Insert: {
137
139
  altitude: number;
140
+ battery_percentage?: number | null;
141
+ device_id?: number | null;
138
142
  h11_index: string;
139
143
  h12_index: string;
140
144
  h13_index: string;
@@ -144,12 +148,14 @@ export type Database = {
144
148
  inserted_at?: string;
145
149
  location: unknown;
146
150
  noise: number;
147
- session_id: number;
151
+ session_id?: number | null;
148
152
  signal: number;
149
153
  timestamp_start: string;
150
154
  };
151
155
  Update: {
152
156
  altitude?: number;
157
+ battery_percentage?: number | null;
158
+ device_id?: number | null;
153
159
  h11_index?: string;
154
160
  h12_index?: string;
155
161
  h13_index?: string;
@@ -159,11 +165,18 @@ export type Database = {
159
165
  inserted_at?: string;
160
166
  location?: unknown;
161
167
  noise?: number;
162
- session_id?: number;
168
+ session_id?: number | null;
163
169
  signal?: number;
164
170
  timestamp_start?: string;
165
171
  };
166
172
  Relationships: [
173
+ {
174
+ foreignKeyName: "connectivity_device_id_fkey";
175
+ columns: ["device_id"];
176
+ isOneToOne: false;
177
+ referencedRelation: "devices";
178
+ referencedColumns: ["id"];
179
+ },
167
180
  {
168
181
  foreignKeyName: "connectivity_session_id_fkey";
169
182
  columns: ["session_id"];
@@ -184,7 +197,7 @@ export type Database = {
184
197
  herd_id: number;
185
198
  id: number;
186
199
  inserted_at: string;
187
- location: unknown | null;
200
+ location: unknown;
188
201
  name: string;
189
202
  video_publisher_token: string | null;
190
203
  video_subscriber_token: string | null;
@@ -199,7 +212,7 @@ export type Database = {
199
212
  herd_id: number;
200
213
  id?: number;
201
214
  inserted_at?: string;
202
- location?: unknown | null;
215
+ location?: unknown;
203
216
  name: string;
204
217
  video_publisher_token?: string | null;
205
218
  video_subscriber_token?: string | null;
@@ -214,7 +227,7 @@ export type Database = {
214
227
  herd_id?: number;
215
228
  id?: number;
216
229
  inserted_at?: string;
217
- location?: unknown | null;
230
+ location?: unknown;
218
231
  name?: string;
219
232
  video_publisher_token?: string | null;
220
233
  video_subscriber_token?: string | null;
@@ -246,7 +259,7 @@ export type Database = {
246
259
  id: number;
247
260
  inserted_at: string;
248
261
  is_public: boolean;
249
- location: unknown | null;
262
+ location: unknown;
250
263
  media_type: Database["public"]["Enums"]["media_type"];
251
264
  media_url: string | null;
252
265
  message: string | null;
@@ -262,7 +275,7 @@ export type Database = {
262
275
  id?: number;
263
276
  inserted_at?: string;
264
277
  is_public?: boolean;
265
- location?: unknown | null;
278
+ location?: unknown;
266
279
  media_type?: Database["public"]["Enums"]["media_type"];
267
280
  media_url?: string | null;
268
281
  message?: string | null;
@@ -278,7 +291,7 @@ export type Database = {
278
291
  id?: number;
279
292
  inserted_at?: string;
280
293
  is_public?: boolean;
281
- location?: unknown | null;
294
+ location?: unknown;
282
295
  media_type?: Database["public"]["Enums"]["media_type"];
283
296
  media_url?: string | null;
284
297
  message?: string | null;
@@ -410,6 +423,48 @@ export type Database = {
410
423
  }
411
424
  ];
412
425
  };
426
+ operators: {
427
+ Row: {
428
+ action: string | null;
429
+ created_at: string;
430
+ id: number;
431
+ session_id: number | null;
432
+ timestamp: string | null;
433
+ user_id: string;
434
+ };
435
+ Insert: {
436
+ action?: string | null;
437
+ created_at?: string;
438
+ id?: number;
439
+ session_id?: number | null;
440
+ timestamp?: string | null;
441
+ user_id: string;
442
+ };
443
+ Update: {
444
+ action?: string | null;
445
+ created_at?: string;
446
+ id?: number;
447
+ session_id?: number | null;
448
+ timestamp?: string | null;
449
+ user_id?: string;
450
+ };
451
+ Relationships: [
452
+ {
453
+ foreignKeyName: "operators_session_id_fkey";
454
+ columns: ["session_id"];
455
+ isOneToOne: false;
456
+ referencedRelation: "sessions";
457
+ referencedColumns: ["id"];
458
+ },
459
+ {
460
+ foreignKeyName: "operators_user_id_fkey";
461
+ columns: ["user_id"];
462
+ isOneToOne: false;
463
+ referencedRelation: "users";
464
+ referencedColumns: ["id"];
465
+ }
466
+ ];
467
+ };
413
468
  plans: {
414
469
  Row: {
415
470
  herd_id: number;
@@ -491,7 +546,7 @@ export type Database = {
491
546
  earthranger_url: string | null;
492
547
  id: number;
493
548
  inserted_at: string;
494
- locations: unknown | null;
549
+ locations: unknown;
495
550
  software_version: string;
496
551
  timestamp_end: string | null;
497
552
  timestamp_start: string;
@@ -509,7 +564,7 @@ export type Database = {
509
564
  earthranger_url?: string | null;
510
565
  id?: number;
511
566
  inserted_at?: string;
512
- locations?: unknown | null;
567
+ locations?: unknown;
513
568
  software_version: string;
514
569
  timestamp_end?: string | null;
515
570
  timestamp_start: string;
@@ -527,7 +582,7 @@ export type Database = {
527
582
  earthranger_url?: string | null;
528
583
  id?: number;
529
584
  inserted_at?: string;
530
- locations?: unknown | null;
585
+ locations?: unknown;
531
586
  software_version?: string;
532
587
  timestamp_end?: string | null;
533
588
  timestamp_start?: string;
@@ -553,7 +608,7 @@ export type Database = {
553
608
  height: number;
554
609
  id: number;
555
610
  inserted_at: string;
556
- location: unknown | null;
611
+ location: unknown;
557
612
  observation_type: Database["public"]["Enums"]["tag_observation_type"];
558
613
  width: number;
559
614
  x: number;
@@ -566,7 +621,7 @@ export type Database = {
566
621
  height?: number;
567
622
  id?: number;
568
623
  inserted_at?: string;
569
- location?: unknown | null;
624
+ location?: unknown;
570
625
  observation_type: Database["public"]["Enums"]["tag_observation_type"];
571
626
  width: number;
572
627
  x: number;
@@ -579,7 +634,7 @@ export type Database = {
579
634
  height?: number;
580
635
  id?: number;
581
636
  inserted_at?: string;
582
- location?: unknown | null;
637
+ location?: unknown;
583
638
  observation_type?: Database["public"]["Enums"]["tag_observation_type"];
584
639
  width?: number;
585
640
  x?: number;
@@ -705,7 +760,7 @@ export type Database = {
705
760
  id: number | null;
706
761
  inserted_at: string | null;
707
762
  is_public: boolean | null;
708
- location: unknown | null;
763
+ location: unknown;
709
764
  media_type: Database["public"]["Enums"]["media_type"] | null;
710
765
  media_url: string | null;
711
766
  message: string | null;
@@ -748,7 +803,7 @@ export type Database = {
748
803
  id: number | null;
749
804
  inserted_at: string | null;
750
805
  is_public: boolean | null;
751
- location: unknown | null;
806
+ location: unknown;
752
807
  media_type: Database["public"]["Enums"]["media_type"] | null;
753
808
  media_url: string | null;
754
809
  message: string | null;
@@ -786,7 +841,7 @@ export type Database = {
786
841
  herd_id: number | null;
787
842
  id: number | null;
788
843
  inserted_at: string | null;
789
- region: unknown | null;
844
+ region: unknown;
790
845
  };
791
846
  Relationships: [
792
847
  {
@@ -805,18 +860,49 @@ export type Database = {
805
860
  session_id_caller: number;
806
861
  };
807
862
  Returns: Database["public"]["CompositeTypes"]["connectivity_with_coordinates"][];
863
+ SetofOptions: {
864
+ from: "*";
865
+ to: "connectivity_with_coordinates";
866
+ isOneToOne: false;
867
+ isSetofReturn: true;
868
+ };
869
+ };
870
+ get_connectivity_with_coordinates_by_device_and_timestamp: {
871
+ Args: {
872
+ device_id_caller: number;
873
+ timestamp_filter: string;
874
+ };
875
+ Returns: Database["public"]["CompositeTypes"]["connectivity_with_coordinates"][];
876
+ SetofOptions: {
877
+ from: "*";
878
+ to: "connectivity_with_coordinates";
879
+ isOneToOne: false;
880
+ isSetofReturn: true;
881
+ };
808
882
  };
809
883
  get_device_by_api_key: {
810
884
  Args: {
811
885
  device_api_key: string;
812
886
  };
813
887
  Returns: Database["public"]["CompositeTypes"]["device_pretty_location"];
888
+ SetofOptions: {
889
+ from: "*";
890
+ to: "device_pretty_location";
891
+ isOneToOne: true;
892
+ isSetofReturn: false;
893
+ };
814
894
  };
815
895
  get_device_by_id: {
816
896
  Args: {
817
897
  device_id_caller: number;
818
898
  };
819
899
  Returns: Database["public"]["CompositeTypes"]["device_pretty_location"];
900
+ SetofOptions: {
901
+ from: "*";
902
+ to: "device_pretty_location";
903
+ isOneToOne: true;
904
+ isSetofReturn: false;
905
+ };
820
906
  };
821
907
  get_device_id_from_key: {
822
908
  Args: {
@@ -829,6 +915,12 @@ export type Database = {
829
915
  herd_id_caller: number;
830
916
  };
831
917
  Returns: Database["public"]["CompositeTypes"]["device_pretty_location"][];
918
+ SetofOptions: {
919
+ from: "*";
920
+ to: "device_pretty_location";
921
+ isOneToOne: false;
922
+ isSetofReturn: true;
923
+ };
832
924
  };
833
925
  get_events_and_tags_for_device: {
834
926
  Args: {
@@ -836,6 +928,12 @@ export type Database = {
836
928
  limit_caller: number;
837
929
  };
838
930
  Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
931
+ SetofOptions: {
932
+ from: "*";
933
+ to: "event_and_tags_pretty_location";
934
+ isOneToOne: false;
935
+ isSetofReturn: true;
936
+ };
839
937
  };
840
938
  get_events_and_tags_for_devices_batch: {
841
939
  Args: {
@@ -843,6 +941,12 @@ export type Database = {
843
941
  limit_per_device?: number;
844
942
  };
845
943
  Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
944
+ SetofOptions: {
945
+ from: "*";
946
+ to: "event_and_tags_pretty_location";
947
+ isOneToOne: false;
948
+ isSetofReturn: true;
949
+ };
846
950
  };
847
951
  get_events_and_tags_for_herd: {
848
952
  Args: {
@@ -851,6 +955,12 @@ export type Database = {
851
955
  offset_caller: number;
852
956
  };
853
957
  Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
958
+ SetofOptions: {
959
+ from: "*";
960
+ to: "event_and_tags_pretty_location";
961
+ isOneToOne: false;
962
+ isSetofReturn: true;
963
+ };
854
964
  };
855
965
  get_events_and_tags_for_session: {
856
966
  Args: {
@@ -859,6 +969,12 @@ export type Database = {
859
969
  session_id_caller: number;
860
970
  };
861
971
  Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
972
+ SetofOptions: {
973
+ from: "*";
974
+ to: "event_and_tags_pretty_location";
975
+ isOneToOne: false;
976
+ isSetofReturn: true;
977
+ };
862
978
  };
863
979
  get_events_with_tags_for_herd: {
864
980
  Args: {
@@ -867,18 +983,36 @@ export type Database = {
867
983
  offset_caller: number;
868
984
  };
869
985
  Returns: Database["public"]["CompositeTypes"]["event_with_tags"][];
986
+ SetofOptions: {
987
+ from: "*";
988
+ to: "event_with_tags";
989
+ isOneToOne: false;
990
+ isSetofReturn: true;
991
+ };
870
992
  };
871
993
  get_sessions_with_coordinates: {
872
994
  Args: {
873
995
  herd_id_caller: number;
874
996
  };
875
997
  Returns: Database["public"]["CompositeTypes"]["session_with_coordinates"][];
998
+ SetofOptions: {
999
+ from: "*";
1000
+ to: "session_with_coordinates";
1001
+ isOneToOne: false;
1002
+ isSetofReturn: true;
1003
+ };
876
1004
  };
877
1005
  get_sessions_with_coordinates_by_device: {
878
1006
  Args: {
879
1007
  device_id_caller: number;
880
1008
  };
881
1009
  Returns: Database["public"]["CompositeTypes"]["session_with_coordinates"][];
1010
+ SetofOptions: {
1011
+ from: "*";
1012
+ to: "session_with_coordinates";
1013
+ isOneToOne: false;
1014
+ isSetofReturn: true;
1015
+ };
882
1016
  };
883
1017
  get_total_events_for_herd_with_session_filter: {
884
1018
  Args: {
@@ -900,6 +1034,12 @@ export type Database = {
900
1034
  offset_caller: number;
901
1035
  };
902
1036
  Returns: Database["public"]["CompositeTypes"]["zones_and_actions_pretty_location"][];
1037
+ SetofOptions: {
1038
+ from: "*";
1039
+ to: "zones_and_actions_pretty_location";
1040
+ isOneToOne: false;
1041
+ isSetofReturn: true;
1042
+ };
903
1043
  };
904
1044
  load_api_keys: {
905
1045
  Args: {
@@ -924,13 +1064,13 @@ export type Database = {
924
1064
  Returns: string[];
925
1065
  };
926
1066
  remove_rls_broadcast_triggers: {
927
- Args: Record<PropertyKey, never>;
1067
+ Args: never;
928
1068
  Returns: undefined;
929
1069
  };
930
1070
  };
931
1071
  Enums: {
932
1072
  app_permission: "herds.delete" | "events.delete";
933
- device_type: "trail_camera" | "drone_fixed_wing" | "drone_quad" | "gps_tracker" | "sentry_tower" | "smart_buoy" | "radio_mesh_base_station" | "radio_mesh_repeater" | "unknown";
1073
+ 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";
934
1074
  media_type: "image" | "video" | "audio" | "text";
935
1075
  plan_type: "mission" | "fence" | "rally" | "markov";
936
1076
  role: "admin" | "viewer" | "editor" | "operator";
@@ -941,6 +1081,7 @@ export type Database = {
941
1081
  connectivity_with_coordinates: {
942
1082
  id: number | null;
943
1083
  session_id: number | null;
1084
+ device_id: number | null;
944
1085
  inserted_at: string | null;
945
1086
  timestamp_start: string | null;
946
1087
  signal: number | null;
@@ -953,6 +1094,7 @@ export type Database = {
953
1094
  h13_index: string | null;
954
1095
  h12_index: string | null;
955
1096
  h11_index: string | null;
1097
+ battery_percentage: number | null;
956
1098
  };
957
1099
  device_pretty_location: {
958
1100
  id: number | null;
@@ -1008,7 +1150,7 @@ export type Database = {
1008
1150
  inserted_at: string | null;
1009
1151
  message: string | null;
1010
1152
  media_url: string | null;
1011
- location: unknown | null;
1153
+ location: unknown;
1012
1154
  earthranger_url: string | null;
1013
1155
  altitude: number | null;
1014
1156
  heading: number | null;
@@ -1062,7 +1204,7 @@ export type Database = {
1062
1204
  event_id: number | null;
1063
1205
  class_name: string | null;
1064
1206
  height: number | null;
1065
- location: unknown | null;
1207
+ location: unknown;
1066
1208
  latitude: number | null;
1067
1209
  longitude: number | null;
1068
1210
  };
@@ -1129,7 +1271,7 @@ export declare const Constants: {
1129
1271
  readonly public: {
1130
1272
  readonly Enums: {
1131
1273
  readonly app_permission: readonly ["herds.delete", "events.delete"];
1132
- 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"];
1274
+ 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"];
1133
1275
  readonly media_type: readonly ["image", "video", "audio", "text"];
1134
1276
  readonly plan_type: readonly ["mission", "fence", "rally", "markov"];
1135
1277
  readonly role: readonly ["admin", "viewer", "editor", "operator"];
@@ -12,6 +12,9 @@ export const Constants = {
12
12
  "radio_mesh_base_station",
13
13
  "radio_mesh_repeater",
14
14
  "unknown",
15
+ "gps_tracker_vehicle",
16
+ "gps_tracker_person",
17
+ "radio_mesh_base_station_gateway",
15
18
  ],
16
19
  media_type: ["image", "video", "audio", "text"],
17
20
  plan_type: ["mission", "fence", "rally", "markov"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.0.87",
3
+ "version": "1.0.89",
4
4
  "description": "Core utilities and helpers for Adventure Labs Scout applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",