@adventurelabs/scout-core 1.0.53 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/events.d.ts +0 -4
- package/dist/helpers/events.js +7 -85
- package/dist/helpers/layers.d.ts +3 -0
- package/dist/helpers/layers.js +21 -0
- package/dist/helpers/tags.d.ts +0 -1
- package/dist/helpers/tags.js +0 -42
- package/dist/hooks/useScoutDbListener.d.ts +1 -16
- package/dist/hooks/useScoutDbListener.js +112 -155
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -0
- package/dist/providers/ScoutRefreshProvider.d.ts +60 -63
- package/dist/supabase/server.d.ts +60 -63
- package/dist/types/db.d.ts +1 -0
- package/dist/types/herd_module.d.ts +4 -2
- package/dist/types/herd_module.js +16 -5
- package/dist/types/supabase.d.ts +64 -64
- package/dist/types/supabase.js +1 -0
- package/package.json +1 -1
package/dist/types/supabase.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type Json = string | number | boolean | null | {
|
|
|
3
3
|
} | Json[];
|
|
4
4
|
export type Database = {
|
|
5
5
|
__InternalSupabase: {
|
|
6
|
-
PostgrestVersion: "12.2.
|
|
6
|
+
PostgrestVersion: "12.2.12 (cd3cf9e)";
|
|
7
7
|
};
|
|
8
8
|
graphql_public: {
|
|
9
9
|
Tables: {
|
|
@@ -306,6 +306,35 @@ export type Database = {
|
|
|
306
306
|
}
|
|
307
307
|
];
|
|
308
308
|
};
|
|
309
|
+
layers: {
|
|
310
|
+
Row: {
|
|
311
|
+
created_at: string;
|
|
312
|
+
features: Json;
|
|
313
|
+
herd_id: number;
|
|
314
|
+
id: number;
|
|
315
|
+
};
|
|
316
|
+
Insert: {
|
|
317
|
+
created_at?: string;
|
|
318
|
+
features: Json;
|
|
319
|
+
herd_id: number;
|
|
320
|
+
id?: number;
|
|
321
|
+
};
|
|
322
|
+
Update: {
|
|
323
|
+
created_at?: string;
|
|
324
|
+
features?: Json;
|
|
325
|
+
herd_id?: number;
|
|
326
|
+
id?: number;
|
|
327
|
+
};
|
|
328
|
+
Relationships: [
|
|
329
|
+
{
|
|
330
|
+
foreignKeyName: "layers_herd_id_fkey";
|
|
331
|
+
columns: ["herd_id"];
|
|
332
|
+
isOneToOne: false;
|
|
333
|
+
referencedRelation: "herds";
|
|
334
|
+
referencedColumns: ["id"];
|
|
335
|
+
}
|
|
336
|
+
];
|
|
337
|
+
};
|
|
309
338
|
plans: {
|
|
310
339
|
Row: {
|
|
311
340
|
herd_id: number;
|
|
@@ -313,6 +342,7 @@ export type Database = {
|
|
|
313
342
|
inserted_at: string;
|
|
314
343
|
instructions: string;
|
|
315
344
|
name: string;
|
|
345
|
+
plan_type: Database["public"]["Enums"]["plan_type"];
|
|
316
346
|
};
|
|
317
347
|
Insert: {
|
|
318
348
|
herd_id: number;
|
|
@@ -320,6 +350,7 @@ export type Database = {
|
|
|
320
350
|
inserted_at?: string;
|
|
321
351
|
instructions: string;
|
|
322
352
|
name: string;
|
|
353
|
+
plan_type?: Database["public"]["Enums"]["plan_type"];
|
|
323
354
|
};
|
|
324
355
|
Update: {
|
|
325
356
|
herd_id?: number;
|
|
@@ -327,6 +358,7 @@ export type Database = {
|
|
|
327
358
|
inserted_at?: string;
|
|
328
359
|
instructions?: string;
|
|
329
360
|
name?: string;
|
|
361
|
+
plan_type?: Database["public"]["Enums"]["plan_type"];
|
|
330
362
|
};
|
|
331
363
|
Relationships: [
|
|
332
364
|
{
|
|
@@ -346,6 +378,8 @@ export type Database = {
|
|
|
346
378
|
device_id: number;
|
|
347
379
|
distance_max_from_start: number;
|
|
348
380
|
distance_total: number;
|
|
381
|
+
earthranger_url: string | null;
|
|
382
|
+
file_paths: string[] | null;
|
|
349
383
|
id: number;
|
|
350
384
|
inserted_at: string;
|
|
351
385
|
locations: unknown;
|
|
@@ -363,6 +397,8 @@ export type Database = {
|
|
|
363
397
|
device_id: number;
|
|
364
398
|
distance_max_from_start: number;
|
|
365
399
|
distance_total: number;
|
|
400
|
+
earthranger_url?: string | null;
|
|
401
|
+
file_paths?: string[] | null;
|
|
366
402
|
id?: number;
|
|
367
403
|
inserted_at?: string;
|
|
368
404
|
locations: unknown;
|
|
@@ -380,6 +416,8 @@ export type Database = {
|
|
|
380
416
|
device_id?: number;
|
|
381
417
|
distance_max_from_start?: number;
|
|
382
418
|
distance_total?: number;
|
|
419
|
+
earthranger_url?: string | null;
|
|
420
|
+
file_paths?: string[] | null;
|
|
383
421
|
id?: number;
|
|
384
422
|
inserted_at?: string;
|
|
385
423
|
locations?: unknown;
|
|
@@ -652,45 +690,21 @@ export type Database = {
|
|
|
652
690
|
};
|
|
653
691
|
};
|
|
654
692
|
Functions: {
|
|
655
|
-
authorize: {
|
|
656
|
-
Args: {
|
|
657
|
-
requested_permission: Database["public"]["Enums"]["app_permission"];
|
|
658
|
-
};
|
|
659
|
-
Returns: boolean;
|
|
660
|
-
};
|
|
661
|
-
create_api_key: {
|
|
662
|
-
Args: {
|
|
663
|
-
id_of_device: number;
|
|
664
|
-
};
|
|
665
|
-
Returns: undefined;
|
|
666
|
-
};
|
|
667
|
-
create_user: {
|
|
668
|
-
Args: {
|
|
669
|
-
email: string;
|
|
670
|
-
};
|
|
671
|
-
Returns: string;
|
|
672
|
-
};
|
|
673
|
-
custom_access_token_hook: {
|
|
674
|
-
Args: {
|
|
675
|
-
event: Json;
|
|
676
|
-
};
|
|
677
|
-
Returns: Json;
|
|
678
|
-
};
|
|
679
693
|
get_connectivity_with_coordinates: {
|
|
680
694
|
Args: {
|
|
681
695
|
session_id_caller: number;
|
|
682
696
|
};
|
|
683
697
|
Returns: Database["public"]["CompositeTypes"]["connectivity_with_coordinates"][];
|
|
684
698
|
};
|
|
685
|
-
|
|
699
|
+
get_device_by_api_key: {
|
|
686
700
|
Args: {
|
|
687
|
-
|
|
701
|
+
device_api_key: string;
|
|
688
702
|
};
|
|
689
703
|
Returns: Database["public"]["CompositeTypes"]["device_pretty_location"];
|
|
690
704
|
};
|
|
691
|
-
|
|
705
|
+
get_device_by_id: {
|
|
692
706
|
Args: {
|
|
693
|
-
|
|
707
|
+
device_id_caller: number;
|
|
694
708
|
};
|
|
695
709
|
Returns: Database["public"]["CompositeTypes"]["device_pretty_location"];
|
|
696
710
|
};
|
|
@@ -713,6 +727,13 @@ export type Database = {
|
|
|
713
727
|
};
|
|
714
728
|
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
715
729
|
};
|
|
730
|
+
get_events_and_tags_for_devices_batch: {
|
|
731
|
+
Args: {
|
|
732
|
+
device_ids: number[];
|
|
733
|
+
limit_per_device?: number;
|
|
734
|
+
};
|
|
735
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
736
|
+
};
|
|
716
737
|
get_events_and_tags_for_herd: {
|
|
717
738
|
Args: {
|
|
718
739
|
herd_id_caller: number;
|
|
@@ -729,33 +750,6 @@ export type Database = {
|
|
|
729
750
|
};
|
|
730
751
|
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
731
752
|
};
|
|
732
|
-
get_events_for_herd: {
|
|
733
|
-
Args: {
|
|
734
|
-
herd_id_in: number;
|
|
735
|
-
};
|
|
736
|
-
Returns: {
|
|
737
|
-
altitude: number;
|
|
738
|
-
device_id: number;
|
|
739
|
-
earthranger_url: string | null;
|
|
740
|
-
file_path: string | null;
|
|
741
|
-
heading: number;
|
|
742
|
-
id: number;
|
|
743
|
-
inserted_at: string;
|
|
744
|
-
is_public: boolean;
|
|
745
|
-
location: unknown | null;
|
|
746
|
-
media_type: Database["public"]["Enums"]["media_type"];
|
|
747
|
-
media_url: string | null;
|
|
748
|
-
message: string | null;
|
|
749
|
-
session_id: number | null;
|
|
750
|
-
timestamp_observation: string;
|
|
751
|
-
}[];
|
|
752
|
-
};
|
|
753
|
-
get_events_with_tags_by_id: {
|
|
754
|
-
Args: {
|
|
755
|
-
event_id_caller: number;
|
|
756
|
-
};
|
|
757
|
-
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
|
|
758
|
-
};
|
|
759
753
|
get_events_with_tags_for_herd: {
|
|
760
754
|
Args: {
|
|
761
755
|
herd_id_caller: number;
|
|
@@ -776,15 +770,16 @@ export type Database = {
|
|
|
776
770
|
};
|
|
777
771
|
Returns: Database["public"]["CompositeTypes"]["session_with_coordinates"][];
|
|
778
772
|
};
|
|
779
|
-
|
|
773
|
+
get_total_events_for_session: {
|
|
780
774
|
Args: {
|
|
781
|
-
|
|
775
|
+
session_id_caller: number;
|
|
782
776
|
};
|
|
783
777
|
Returns: number;
|
|
784
778
|
};
|
|
785
|
-
|
|
779
|
+
get_total_events_for_herd_with_session_filter: {
|
|
786
780
|
Args: {
|
|
787
|
-
|
|
781
|
+
herd_id_caller: number;
|
|
782
|
+
exclude_session_events: boolean;
|
|
788
783
|
};
|
|
789
784
|
Returns: number;
|
|
790
785
|
};
|
|
@@ -812,18 +807,22 @@ export type Database = {
|
|
|
812
807
|
api_key_key: string;
|
|
813
808
|
}[];
|
|
814
809
|
};
|
|
815
|
-
|
|
810
|
+
load_api_keys_old: {
|
|
816
811
|
Args: {
|
|
817
|
-
|
|
818
|
-
limit_per_device: number;
|
|
812
|
+
id_of_device: string;
|
|
819
813
|
};
|
|
820
|
-
Returns:
|
|
814
|
+
Returns: string[];
|
|
815
|
+
};
|
|
816
|
+
remove_rls_broadcast_triggers: {
|
|
817
|
+
Args: Record<PropertyKey, never>;
|
|
818
|
+
Returns: undefined;
|
|
821
819
|
};
|
|
822
820
|
};
|
|
823
821
|
Enums: {
|
|
824
822
|
app_permission: "herds.delete" | "events.delete";
|
|
825
823
|
device_type: "trail_camera" | "drone_fixed_wing" | "drone_quad" | "gps_tracker" | "sentry_tower" | "smart_buoy" | "radio_mesh_base_station" | "radio_mesh_repeater" | "unknown";
|
|
826
824
|
media_type: "image" | "video" | "audio" | "text";
|
|
825
|
+
plan_type: "mission" | "fence" | "rally" | "markov";
|
|
827
826
|
role: "admin" | "viewer" | "editor";
|
|
828
827
|
tag_observation_type: "manual" | "auto";
|
|
829
828
|
user_status: "ONLINE" | "OFFLINE";
|
|
@@ -1010,6 +1009,7 @@ export declare const Constants: {
|
|
|
1010
1009
|
readonly app_permission: readonly ["herds.delete", "events.delete"];
|
|
1011
1010
|
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"];
|
|
1012
1011
|
readonly media_type: readonly ["image", "video", "audio", "text"];
|
|
1012
|
+
readonly plan_type: readonly ["mission", "fence", "rally", "markov"];
|
|
1013
1013
|
readonly role: readonly ["admin", "viewer", "editor"];
|
|
1014
1014
|
readonly tag_observation_type: readonly ["manual", "auto"];
|
|
1015
1015
|
readonly user_status: readonly ["ONLINE", "OFFLINE"];
|
package/dist/types/supabase.js
CHANGED
|
@@ -17,6 +17,7 @@ export const Constants = {
|
|
|
17
17
|
"unknown",
|
|
18
18
|
],
|
|
19
19
|
media_type: ["image", "video", "audio", "text"],
|
|
20
|
+
plan_type: ["mission", "fence", "rally", "markov"],
|
|
20
21
|
role: ["admin", "viewer", "editor"],
|
|
21
22
|
tag_observation_type: ["manual", "auto"],
|
|
22
23
|
user_status: ["ONLINE", "OFFLINE"],
|