@adventurelabs/scout-core 1.0.116 → 1.0.118
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.
|
@@ -49,26 +49,41 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
49
49
|
artifacts: {
|
|
50
50
|
Row: {
|
|
51
51
|
created_at: string;
|
|
52
|
+
device_id: number;
|
|
52
53
|
file_path: string;
|
|
53
54
|
id: number;
|
|
55
|
+
modality: string | null;
|
|
54
56
|
session_id: number | null;
|
|
55
57
|
timestamp_observation: string | null;
|
|
58
|
+
updated_at: string | null;
|
|
56
59
|
};
|
|
57
60
|
Insert: {
|
|
58
61
|
created_at?: string;
|
|
62
|
+
device_id: number;
|
|
59
63
|
file_path: string;
|
|
60
64
|
id?: number;
|
|
65
|
+
modality?: string | null;
|
|
61
66
|
session_id?: number | null;
|
|
62
67
|
timestamp_observation?: string | null;
|
|
68
|
+
updated_at?: string | null;
|
|
63
69
|
};
|
|
64
70
|
Update: {
|
|
65
71
|
created_at?: string;
|
|
72
|
+
device_id?: number;
|
|
66
73
|
file_path?: string;
|
|
67
74
|
id?: number;
|
|
75
|
+
modality?: string | null;
|
|
68
76
|
session_id?: number | null;
|
|
69
77
|
timestamp_observation?: string | null;
|
|
78
|
+
updated_at?: string | null;
|
|
70
79
|
};
|
|
71
80
|
Relationships: [{
|
|
81
|
+
foreignKeyName: "artifacts_device_id_fkey";
|
|
82
|
+
columns: ["device_id"];
|
|
83
|
+
isOneToOne: false;
|
|
84
|
+
referencedRelation: "devices";
|
|
85
|
+
referencedColumns: ["id"];
|
|
86
|
+
}, {
|
|
72
87
|
foreignKeyName: "artifacts_session_id_fkey";
|
|
73
88
|
columns: ["session_id"];
|
|
74
89
|
isOneToOne: false;
|
|
@@ -76,6 +91,36 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
76
91
|
referencedColumns: ["id"];
|
|
77
92
|
}];
|
|
78
93
|
};
|
|
94
|
+
certificates: {
|
|
95
|
+
Row: {
|
|
96
|
+
created_at: string;
|
|
97
|
+
expiration: string | null;
|
|
98
|
+
id: number;
|
|
99
|
+
issuer: string;
|
|
100
|
+
tracking_number: string | null;
|
|
101
|
+
type: string;
|
|
102
|
+
updated_at: string | null;
|
|
103
|
+
};
|
|
104
|
+
Insert: {
|
|
105
|
+
created_at?: string;
|
|
106
|
+
expiration?: string | null;
|
|
107
|
+
id?: number;
|
|
108
|
+
issuer: string;
|
|
109
|
+
tracking_number?: string | null;
|
|
110
|
+
type: string;
|
|
111
|
+
updated_at?: string | null;
|
|
112
|
+
};
|
|
113
|
+
Update: {
|
|
114
|
+
created_at?: string;
|
|
115
|
+
expiration?: string | null;
|
|
116
|
+
id?: number;
|
|
117
|
+
issuer?: string;
|
|
118
|
+
tracking_number?: string | null;
|
|
119
|
+
type?: string;
|
|
120
|
+
updated_at?: string | null;
|
|
121
|
+
};
|
|
122
|
+
Relationships: [];
|
|
123
|
+
};
|
|
79
124
|
chat: {
|
|
80
125
|
Row: {
|
|
81
126
|
created_at: string;
|
|
@@ -112,6 +157,51 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
112
157
|
referencedColumns: ["id"];
|
|
113
158
|
}];
|
|
114
159
|
};
|
|
160
|
+
components: {
|
|
161
|
+
Row: {
|
|
162
|
+
certificate_id: number | null;
|
|
163
|
+
created_at: string;
|
|
164
|
+
device_id: number;
|
|
165
|
+
id: number;
|
|
166
|
+
product_number: string | null;
|
|
167
|
+
serial_number: string;
|
|
168
|
+
status: Database["public"]["Enums"]["component_status"];
|
|
169
|
+
updated_at: string | null;
|
|
170
|
+
};
|
|
171
|
+
Insert: {
|
|
172
|
+
certificate_id?: number | null;
|
|
173
|
+
created_at?: string;
|
|
174
|
+
device_id: number;
|
|
175
|
+
id?: number;
|
|
176
|
+
product_number?: string | null;
|
|
177
|
+
serial_number: string;
|
|
178
|
+
status?: Database["public"]["Enums"]["component_status"];
|
|
179
|
+
updated_at?: string | null;
|
|
180
|
+
};
|
|
181
|
+
Update: {
|
|
182
|
+
certificate_id?: number | null;
|
|
183
|
+
created_at?: string;
|
|
184
|
+
device_id?: number;
|
|
185
|
+
id?: number;
|
|
186
|
+
product_number?: string | null;
|
|
187
|
+
serial_number?: string;
|
|
188
|
+
status?: Database["public"]["Enums"]["component_status"];
|
|
189
|
+
updated_at?: string | null;
|
|
190
|
+
};
|
|
191
|
+
Relationships: [{
|
|
192
|
+
foreignKeyName: "components_certificate_id_fkey";
|
|
193
|
+
columns: ["certificate_id"];
|
|
194
|
+
isOneToOne: false;
|
|
195
|
+
referencedRelation: "certificates";
|
|
196
|
+
referencedColumns: ["id"];
|
|
197
|
+
}, {
|
|
198
|
+
foreignKeyName: "components_device_id_fkey";
|
|
199
|
+
columns: ["device_id"];
|
|
200
|
+
isOneToOne: false;
|
|
201
|
+
referencedRelation: "devices";
|
|
202
|
+
referencedColumns: ["id"];
|
|
203
|
+
}];
|
|
204
|
+
};
|
|
115
205
|
connectivity: {
|
|
116
206
|
Row: {
|
|
117
207
|
altitude: number;
|
|
@@ -691,6 +781,51 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
691
781
|
referencedColumns: ["id"];
|
|
692
782
|
}];
|
|
693
783
|
};
|
|
784
|
+
versions_software: {
|
|
785
|
+
Row: {
|
|
786
|
+
commit_hash: string | null;
|
|
787
|
+
created_at: string;
|
|
788
|
+
created_by: string | null;
|
|
789
|
+
description: string;
|
|
790
|
+
hyperlink: string | null;
|
|
791
|
+
id: number;
|
|
792
|
+
system: string;
|
|
793
|
+
title: string | null;
|
|
794
|
+
updated_at: string | null;
|
|
795
|
+
version: string;
|
|
796
|
+
};
|
|
797
|
+
Insert: {
|
|
798
|
+
commit_hash?: string | null;
|
|
799
|
+
created_at?: string;
|
|
800
|
+
created_by?: string | null;
|
|
801
|
+
description: string;
|
|
802
|
+
hyperlink?: string | null;
|
|
803
|
+
id?: number;
|
|
804
|
+
system: string;
|
|
805
|
+
title?: string | null;
|
|
806
|
+
updated_at?: string | null;
|
|
807
|
+
version: string;
|
|
808
|
+
};
|
|
809
|
+
Update: {
|
|
810
|
+
commit_hash?: string | null;
|
|
811
|
+
created_at?: string;
|
|
812
|
+
created_by?: string | null;
|
|
813
|
+
description?: string;
|
|
814
|
+
hyperlink?: string | null;
|
|
815
|
+
id?: number;
|
|
816
|
+
system?: string;
|
|
817
|
+
title?: string | null;
|
|
818
|
+
updated_at?: string | null;
|
|
819
|
+
version?: string;
|
|
820
|
+
};
|
|
821
|
+
Relationships: [{
|
|
822
|
+
foreignKeyName: "versions_software_created_by_fkey";
|
|
823
|
+
columns: ["created_by"];
|
|
824
|
+
isOneToOne: false;
|
|
825
|
+
referencedRelation: "users";
|
|
826
|
+
referencedColumns: ["id"];
|
|
827
|
+
}];
|
|
828
|
+
};
|
|
694
829
|
zones: {
|
|
695
830
|
Row: {
|
|
696
831
|
herd_id: number;
|
|
@@ -855,6 +990,53 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
855
990
|
table_name: string;
|
|
856
991
|
}[];
|
|
857
992
|
};
|
|
993
|
+
delete_all_orphaned_sessions: {
|
|
994
|
+
Args: {
|
|
995
|
+
min_age_seconds?: number;
|
|
996
|
+
};
|
|
997
|
+
Returns: {
|
|
998
|
+
age_seconds: number;
|
|
999
|
+
device_id: number;
|
|
1000
|
+
session_id: number;
|
|
1001
|
+
status: string;
|
|
1002
|
+
timestamp_start: string;
|
|
1003
|
+
}[];
|
|
1004
|
+
};
|
|
1005
|
+
delete_orphaned_session: {
|
|
1006
|
+
Args: {
|
|
1007
|
+
min_age_seconds?: number;
|
|
1008
|
+
session_id_param: number;
|
|
1009
|
+
};
|
|
1010
|
+
Returns: {
|
|
1011
|
+
age_seconds: number;
|
|
1012
|
+
connectivity_count: number;
|
|
1013
|
+
device_id: number;
|
|
1014
|
+
session_id: number;
|
|
1015
|
+
status: string;
|
|
1016
|
+
timestamp_start: string;
|
|
1017
|
+
}[];
|
|
1018
|
+
};
|
|
1019
|
+
fix_all_sessions_missing_end_timestamps: {
|
|
1020
|
+
Args: never;
|
|
1021
|
+
Returns: {
|
|
1022
|
+
device_id: number;
|
|
1023
|
+
new_timestamp_end: string;
|
|
1024
|
+
old_timestamp_end: string;
|
|
1025
|
+
session_id: number;
|
|
1026
|
+
status: string;
|
|
1027
|
+
}[];
|
|
1028
|
+
};
|
|
1029
|
+
fix_session_end_timestamp: {
|
|
1030
|
+
Args: {
|
|
1031
|
+
session_id_param: number;
|
|
1032
|
+
};
|
|
1033
|
+
Returns: {
|
|
1034
|
+
new_timestamp_end: string;
|
|
1035
|
+
old_timestamp_end: string;
|
|
1036
|
+
session_id: number;
|
|
1037
|
+
status: string;
|
|
1038
|
+
}[];
|
|
1039
|
+
};
|
|
858
1040
|
get_connectivity_with_coordinates: {
|
|
859
1041
|
Args: {
|
|
860
1042
|
session_id_caller: number;
|
|
@@ -896,10 +1078,10 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
896
1078
|
Args: {
|
|
897
1079
|
device_id_caller: number;
|
|
898
1080
|
};
|
|
899
|
-
Returns: Database["public"]["CompositeTypes"]["
|
|
1081
|
+
Returns: Database["public"]["CompositeTypes"]["device_with_components"];
|
|
900
1082
|
SetofOptions: {
|
|
901
1083
|
from: "*";
|
|
902
|
-
to: "
|
|
1084
|
+
to: "device_with_components";
|
|
903
1085
|
isOneToOne: true;
|
|
904
1086
|
isSetofReturn: false;
|
|
905
1087
|
};
|
|
@@ -914,10 +1096,10 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
914
1096
|
Args: {
|
|
915
1097
|
herd_id_caller: number;
|
|
916
1098
|
};
|
|
917
|
-
Returns: Database["public"]["CompositeTypes"]["
|
|
1099
|
+
Returns: Database["public"]["CompositeTypes"]["device_with_components"][];
|
|
918
1100
|
SetofOptions: {
|
|
919
1101
|
from: "*";
|
|
920
|
-
to: "
|
|
1102
|
+
to: "device_with_components";
|
|
921
1103
|
isOneToOne: false;
|
|
922
1104
|
isSetofReturn: true;
|
|
923
1105
|
};
|
|
@@ -1061,7 +1243,16 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1061
1243
|
Args: {
|
|
1062
1244
|
id_of_device: number;
|
|
1063
1245
|
};
|
|
1064
|
-
Returns:
|
|
1246
|
+
Returns: {
|
|
1247
|
+
error: true;
|
|
1248
|
+
} & "Could not choose the best candidate function between: public.load_api_keys(id_of_device => int8), public.load_api_keys(id_of_device => text). Try renaming the parameters or the function itself in the database so function overloading can be resolved";
|
|
1249
|
+
} | {
|
|
1250
|
+
Args: {
|
|
1251
|
+
id_of_device: string;
|
|
1252
|
+
};
|
|
1253
|
+
Returns: {
|
|
1254
|
+
error: true;
|
|
1255
|
+
} & "Could not choose the best candidate function between: public.load_api_keys(id_of_device => int8), public.load_api_keys(id_of_device => text). Try renaming the parameters or the function itself in the database so function overloading can be resolved";
|
|
1065
1256
|
};
|
|
1066
1257
|
load_api_keys_batch: {
|
|
1067
1258
|
Args: {
|
|
@@ -1086,6 +1277,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1086
1277
|
};
|
|
1087
1278
|
Enums: {
|
|
1088
1279
|
app_permission: "herds.delete" | "events.delete";
|
|
1280
|
+
component_status: "active" | "inactive";
|
|
1089
1281
|
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";
|
|
1090
1282
|
media_type: "image" | "video" | "audio" | "text";
|
|
1091
1283
|
plan_type: "mission" | "fence" | "rally" | "markov";
|
|
@@ -1143,6 +1335,22 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1143
1335
|
latitude: number | null;
|
|
1144
1336
|
longitude: number | null;
|
|
1145
1337
|
};
|
|
1338
|
+
device_with_components: {
|
|
1339
|
+
id: number | null;
|
|
1340
|
+
inserted_at: string | null;
|
|
1341
|
+
created_by: string | null;
|
|
1342
|
+
herd_id: number | null;
|
|
1343
|
+
device_type: Database["public"]["Enums"]["device_type"] | null;
|
|
1344
|
+
domain_name: string | null;
|
|
1345
|
+
location: string | null;
|
|
1346
|
+
altitude: number | null;
|
|
1347
|
+
heading: number | null;
|
|
1348
|
+
name: string | null;
|
|
1349
|
+
description: string | null;
|
|
1350
|
+
latitude: number | null;
|
|
1351
|
+
longitude: number | null;
|
|
1352
|
+
components: import("../types/supabase").Json | null;
|
|
1353
|
+
};
|
|
1146
1354
|
event_and_tags: {
|
|
1147
1355
|
id: number | null;
|
|
1148
1356
|
inserted_at: string | null;
|
package/dist/types/db.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type DeviceType = Database["public"]["Enums"]["device_type"];
|
|
|
6
6
|
export type MediaType = Database["public"]["Enums"]["media_type"];
|
|
7
7
|
export type TagObservationType = Database["public"]["Enums"]["tag_observation_type"];
|
|
8
8
|
export type IUser = User;
|
|
9
|
-
export type IDevice = Database["public"]["CompositeTypes"]["
|
|
9
|
+
export type IDevice = Database["public"]["CompositeTypes"]["device_with_components"] & {
|
|
10
10
|
api_keys_scout?: IApiKeyScout[];
|
|
11
11
|
recent_events?: IEventAndTagsPrettyLocation[];
|
|
12
12
|
};
|
package/dist/types/supabase.d.ts
CHANGED
|
@@ -49,26 +49,42 @@ export type Database = {
|
|
|
49
49
|
artifacts: {
|
|
50
50
|
Row: {
|
|
51
51
|
created_at: string;
|
|
52
|
+
device_id: number;
|
|
52
53
|
file_path: string;
|
|
53
54
|
id: number;
|
|
55
|
+
modality: string | null;
|
|
54
56
|
session_id: number | null;
|
|
55
57
|
timestamp_observation: string | null;
|
|
58
|
+
updated_at: string | null;
|
|
56
59
|
};
|
|
57
60
|
Insert: {
|
|
58
61
|
created_at?: string;
|
|
62
|
+
device_id: number;
|
|
59
63
|
file_path: string;
|
|
60
64
|
id?: number;
|
|
65
|
+
modality?: string | null;
|
|
61
66
|
session_id?: number | null;
|
|
62
67
|
timestamp_observation?: string | null;
|
|
68
|
+
updated_at?: string | null;
|
|
63
69
|
};
|
|
64
70
|
Update: {
|
|
65
71
|
created_at?: string;
|
|
72
|
+
device_id?: number;
|
|
66
73
|
file_path?: string;
|
|
67
74
|
id?: number;
|
|
75
|
+
modality?: string | null;
|
|
68
76
|
session_id?: number | null;
|
|
69
77
|
timestamp_observation?: string | null;
|
|
78
|
+
updated_at?: string | null;
|
|
70
79
|
};
|
|
71
80
|
Relationships: [
|
|
81
|
+
{
|
|
82
|
+
foreignKeyName: "artifacts_device_id_fkey";
|
|
83
|
+
columns: ["device_id"];
|
|
84
|
+
isOneToOne: false;
|
|
85
|
+
referencedRelation: "devices";
|
|
86
|
+
referencedColumns: ["id"];
|
|
87
|
+
},
|
|
72
88
|
{
|
|
73
89
|
foreignKeyName: "artifacts_session_id_fkey";
|
|
74
90
|
columns: ["session_id"];
|
|
@@ -78,6 +94,36 @@ export type Database = {
|
|
|
78
94
|
}
|
|
79
95
|
];
|
|
80
96
|
};
|
|
97
|
+
certificates: {
|
|
98
|
+
Row: {
|
|
99
|
+
created_at: string;
|
|
100
|
+
expiration: string | null;
|
|
101
|
+
id: number;
|
|
102
|
+
issuer: string;
|
|
103
|
+
tracking_number: string | null;
|
|
104
|
+
type: string;
|
|
105
|
+
updated_at: string | null;
|
|
106
|
+
};
|
|
107
|
+
Insert: {
|
|
108
|
+
created_at?: string;
|
|
109
|
+
expiration?: string | null;
|
|
110
|
+
id?: number;
|
|
111
|
+
issuer: string;
|
|
112
|
+
tracking_number?: string | null;
|
|
113
|
+
type: string;
|
|
114
|
+
updated_at?: string | null;
|
|
115
|
+
};
|
|
116
|
+
Update: {
|
|
117
|
+
created_at?: string;
|
|
118
|
+
expiration?: string | null;
|
|
119
|
+
id?: number;
|
|
120
|
+
issuer?: string;
|
|
121
|
+
tracking_number?: string | null;
|
|
122
|
+
type?: string;
|
|
123
|
+
updated_at?: string | null;
|
|
124
|
+
};
|
|
125
|
+
Relationships: [];
|
|
126
|
+
};
|
|
81
127
|
chat: {
|
|
82
128
|
Row: {
|
|
83
129
|
created_at: string;
|
|
@@ -117,6 +163,54 @@ export type Database = {
|
|
|
117
163
|
}
|
|
118
164
|
];
|
|
119
165
|
};
|
|
166
|
+
components: {
|
|
167
|
+
Row: {
|
|
168
|
+
certificate_id: number | null;
|
|
169
|
+
created_at: string;
|
|
170
|
+
device_id: number;
|
|
171
|
+
id: number;
|
|
172
|
+
product_number: string | null;
|
|
173
|
+
serial_number: string;
|
|
174
|
+
status: Database["public"]["Enums"]["component_status"];
|
|
175
|
+
updated_at: string | null;
|
|
176
|
+
};
|
|
177
|
+
Insert: {
|
|
178
|
+
certificate_id?: number | null;
|
|
179
|
+
created_at?: string;
|
|
180
|
+
device_id: number;
|
|
181
|
+
id?: number;
|
|
182
|
+
product_number?: string | null;
|
|
183
|
+
serial_number: string;
|
|
184
|
+
status?: Database["public"]["Enums"]["component_status"];
|
|
185
|
+
updated_at?: string | null;
|
|
186
|
+
};
|
|
187
|
+
Update: {
|
|
188
|
+
certificate_id?: number | null;
|
|
189
|
+
created_at?: string;
|
|
190
|
+
device_id?: number;
|
|
191
|
+
id?: number;
|
|
192
|
+
product_number?: string | null;
|
|
193
|
+
serial_number?: string;
|
|
194
|
+
status?: Database["public"]["Enums"]["component_status"];
|
|
195
|
+
updated_at?: string | null;
|
|
196
|
+
};
|
|
197
|
+
Relationships: [
|
|
198
|
+
{
|
|
199
|
+
foreignKeyName: "components_certificate_id_fkey";
|
|
200
|
+
columns: ["certificate_id"];
|
|
201
|
+
isOneToOne: false;
|
|
202
|
+
referencedRelation: "certificates";
|
|
203
|
+
referencedColumns: ["id"];
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
foreignKeyName: "components_device_id_fkey";
|
|
207
|
+
columns: ["device_id"];
|
|
208
|
+
isOneToOne: false;
|
|
209
|
+
referencedRelation: "devices";
|
|
210
|
+
referencedColumns: ["id"];
|
|
211
|
+
}
|
|
212
|
+
];
|
|
213
|
+
};
|
|
120
214
|
connectivity: {
|
|
121
215
|
Row: {
|
|
122
216
|
altitude: number;
|
|
@@ -727,6 +821,53 @@ export type Database = {
|
|
|
727
821
|
}
|
|
728
822
|
];
|
|
729
823
|
};
|
|
824
|
+
versions_software: {
|
|
825
|
+
Row: {
|
|
826
|
+
commit_hash: string | null;
|
|
827
|
+
created_at: string;
|
|
828
|
+
created_by: string | null;
|
|
829
|
+
description: string;
|
|
830
|
+
hyperlink: string | null;
|
|
831
|
+
id: number;
|
|
832
|
+
system: string;
|
|
833
|
+
title: string | null;
|
|
834
|
+
updated_at: string | null;
|
|
835
|
+
version: string;
|
|
836
|
+
};
|
|
837
|
+
Insert: {
|
|
838
|
+
commit_hash?: string | null;
|
|
839
|
+
created_at?: string;
|
|
840
|
+
created_by?: string | null;
|
|
841
|
+
description: string;
|
|
842
|
+
hyperlink?: string | null;
|
|
843
|
+
id?: number;
|
|
844
|
+
system: string;
|
|
845
|
+
title?: string | null;
|
|
846
|
+
updated_at?: string | null;
|
|
847
|
+
version: string;
|
|
848
|
+
};
|
|
849
|
+
Update: {
|
|
850
|
+
commit_hash?: string | null;
|
|
851
|
+
created_at?: string;
|
|
852
|
+
created_by?: string | null;
|
|
853
|
+
description?: string;
|
|
854
|
+
hyperlink?: string | null;
|
|
855
|
+
id?: number;
|
|
856
|
+
system?: string;
|
|
857
|
+
title?: string | null;
|
|
858
|
+
updated_at?: string | null;
|
|
859
|
+
version?: string;
|
|
860
|
+
};
|
|
861
|
+
Relationships: [
|
|
862
|
+
{
|
|
863
|
+
foreignKeyName: "versions_software_created_by_fkey";
|
|
864
|
+
columns: ["created_by"];
|
|
865
|
+
isOneToOne: false;
|
|
866
|
+
referencedRelation: "users";
|
|
867
|
+
referencedColumns: ["id"];
|
|
868
|
+
}
|
|
869
|
+
];
|
|
870
|
+
};
|
|
730
871
|
zones: {
|
|
731
872
|
Row: {
|
|
732
873
|
herd_id: number;
|
|
@@ -903,6 +1044,53 @@ export type Database = {
|
|
|
903
1044
|
table_name: string;
|
|
904
1045
|
}[];
|
|
905
1046
|
};
|
|
1047
|
+
delete_all_orphaned_sessions: {
|
|
1048
|
+
Args: {
|
|
1049
|
+
min_age_seconds?: number;
|
|
1050
|
+
};
|
|
1051
|
+
Returns: {
|
|
1052
|
+
age_seconds: number;
|
|
1053
|
+
device_id: number;
|
|
1054
|
+
session_id: number;
|
|
1055
|
+
status: string;
|
|
1056
|
+
timestamp_start: string;
|
|
1057
|
+
}[];
|
|
1058
|
+
};
|
|
1059
|
+
delete_orphaned_session: {
|
|
1060
|
+
Args: {
|
|
1061
|
+
min_age_seconds?: number;
|
|
1062
|
+
session_id_param: number;
|
|
1063
|
+
};
|
|
1064
|
+
Returns: {
|
|
1065
|
+
age_seconds: number;
|
|
1066
|
+
connectivity_count: number;
|
|
1067
|
+
device_id: number;
|
|
1068
|
+
session_id: number;
|
|
1069
|
+
status: string;
|
|
1070
|
+
timestamp_start: string;
|
|
1071
|
+
}[];
|
|
1072
|
+
};
|
|
1073
|
+
fix_all_sessions_missing_end_timestamps: {
|
|
1074
|
+
Args: never;
|
|
1075
|
+
Returns: {
|
|
1076
|
+
device_id: number;
|
|
1077
|
+
new_timestamp_end: string;
|
|
1078
|
+
old_timestamp_end: string;
|
|
1079
|
+
session_id: number;
|
|
1080
|
+
status: string;
|
|
1081
|
+
}[];
|
|
1082
|
+
};
|
|
1083
|
+
fix_session_end_timestamp: {
|
|
1084
|
+
Args: {
|
|
1085
|
+
session_id_param: number;
|
|
1086
|
+
};
|
|
1087
|
+
Returns: {
|
|
1088
|
+
new_timestamp_end: string;
|
|
1089
|
+
old_timestamp_end: string;
|
|
1090
|
+
session_id: number;
|
|
1091
|
+
status: string;
|
|
1092
|
+
}[];
|
|
1093
|
+
};
|
|
906
1094
|
get_connectivity_with_coordinates: {
|
|
907
1095
|
Args: {
|
|
908
1096
|
session_id_caller: number;
|
|
@@ -944,10 +1132,10 @@ export type Database = {
|
|
|
944
1132
|
Args: {
|
|
945
1133
|
device_id_caller: number;
|
|
946
1134
|
};
|
|
947
|
-
Returns: Database["public"]["CompositeTypes"]["
|
|
1135
|
+
Returns: Database["public"]["CompositeTypes"]["device_with_components"];
|
|
948
1136
|
SetofOptions: {
|
|
949
1137
|
from: "*";
|
|
950
|
-
to: "
|
|
1138
|
+
to: "device_with_components";
|
|
951
1139
|
isOneToOne: true;
|
|
952
1140
|
isSetofReturn: false;
|
|
953
1141
|
};
|
|
@@ -962,10 +1150,10 @@ export type Database = {
|
|
|
962
1150
|
Args: {
|
|
963
1151
|
herd_id_caller: number;
|
|
964
1152
|
};
|
|
965
|
-
Returns: Database["public"]["CompositeTypes"]["
|
|
1153
|
+
Returns: Database["public"]["CompositeTypes"]["device_with_components"][];
|
|
966
1154
|
SetofOptions: {
|
|
967
1155
|
from: "*";
|
|
968
|
-
to: "
|
|
1156
|
+
to: "device_with_components";
|
|
969
1157
|
isOneToOne: false;
|
|
970
1158
|
isSetofReturn: true;
|
|
971
1159
|
};
|
|
@@ -1109,7 +1297,16 @@ export type Database = {
|
|
|
1109
1297
|
Args: {
|
|
1110
1298
|
id_of_device: number;
|
|
1111
1299
|
};
|
|
1112
|
-
Returns:
|
|
1300
|
+
Returns: {
|
|
1301
|
+
error: true;
|
|
1302
|
+
} & "Could not choose the best candidate function between: public.load_api_keys(id_of_device => int8), public.load_api_keys(id_of_device => text). Try renaming the parameters or the function itself in the database so function overloading can be resolved";
|
|
1303
|
+
} | {
|
|
1304
|
+
Args: {
|
|
1305
|
+
id_of_device: string;
|
|
1306
|
+
};
|
|
1307
|
+
Returns: {
|
|
1308
|
+
error: true;
|
|
1309
|
+
} & "Could not choose the best candidate function between: public.load_api_keys(id_of_device => int8), public.load_api_keys(id_of_device => text). Try renaming the parameters or the function itself in the database so function overloading can be resolved";
|
|
1113
1310
|
};
|
|
1114
1311
|
load_api_keys_batch: {
|
|
1115
1312
|
Args: {
|
|
@@ -1134,6 +1331,7 @@ export type Database = {
|
|
|
1134
1331
|
};
|
|
1135
1332
|
Enums: {
|
|
1136
1333
|
app_permission: "herds.delete" | "events.delete";
|
|
1334
|
+
component_status: "active" | "inactive";
|
|
1137
1335
|
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";
|
|
1138
1336
|
media_type: "image" | "video" | "audio" | "text";
|
|
1139
1337
|
plan_type: "mission" | "fence" | "rally" | "markov";
|
|
@@ -1191,6 +1389,22 @@ export type Database = {
|
|
|
1191
1389
|
latitude: number | null;
|
|
1192
1390
|
longitude: number | null;
|
|
1193
1391
|
};
|
|
1392
|
+
device_with_components: {
|
|
1393
|
+
id: number | null;
|
|
1394
|
+
inserted_at: string | null;
|
|
1395
|
+
created_by: string | null;
|
|
1396
|
+
herd_id: number | null;
|
|
1397
|
+
device_type: Database["public"]["Enums"]["device_type"] | null;
|
|
1398
|
+
domain_name: string | null;
|
|
1399
|
+
location: string | null;
|
|
1400
|
+
altitude: number | null;
|
|
1401
|
+
heading: number | null;
|
|
1402
|
+
name: string | null;
|
|
1403
|
+
description: string | null;
|
|
1404
|
+
latitude: number | null;
|
|
1405
|
+
longitude: number | null;
|
|
1406
|
+
components: Json | null;
|
|
1407
|
+
};
|
|
1194
1408
|
event_and_tags: {
|
|
1195
1409
|
id: number | null;
|
|
1196
1410
|
inserted_at: string | null;
|
|
@@ -1351,6 +1565,7 @@ export declare const Constants: {
|
|
|
1351
1565
|
readonly public: {
|
|
1352
1566
|
readonly Enums: {
|
|
1353
1567
|
readonly app_permission: readonly ["herds.delete", "events.delete"];
|
|
1568
|
+
readonly component_status: readonly ["active", "inactive"];
|
|
1354
1569
|
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"];
|
|
1355
1570
|
readonly media_type: readonly ["image", "video", "audio", "text"];
|
|
1356
1571
|
readonly plan_type: readonly ["mission", "fence", "rally", "markov"];
|
package/dist/types/supabase.js
CHANGED