@adventurelabs/scout-core 1.0.115 → 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.
- package/dist/hooks/useScoutRefresh.js +27 -36
- package/dist/providers/ScoutRefreshProvider.d.ts +213 -5
- package/dist/store/scout.d.ts +8 -3
- package/dist/store/scout.js +8 -4
- package/dist/types/db.d.ts +1 -1
- package/dist/types/supabase.d.ts +220 -5
- package/dist/types/supabase.js +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useCallback, useRef, useMemo } from "react";
|
|
2
2
|
import { useAppDispatch } from "../store/hooks";
|
|
3
3
|
import { useStore } from "react-redux";
|
|
4
|
-
import { EnumScoutStateStatus, setHerdModules, setStatus, setHerdModulesLoadingState, setHerdModulesLoadedInMs,
|
|
4
|
+
import { EnumScoutStateStatus, setHerdModules, setStatus, setHerdModulesLoadingState, setHerdModulesLoadedInMs, setHerdModulesApiServerProcessingDuration, setHerdModulesApiTotalRequestDuration, setUserApiDuration, setDataProcessingDuration, setCacheLoadDuration, setUser, setDataSource, setDataSourceInfo, } from "../store/scout";
|
|
5
5
|
import { EnumHerdModulesLoadingState } from "../types/herd_module";
|
|
6
6
|
import { server_load_herd_modules } from "../helpers/herds";
|
|
7
7
|
import { scoutCache } from "../helpers/cache";
|
|
@@ -239,7 +239,6 @@ export function useScoutRefresh(options = {}) {
|
|
|
239
239
|
if (cacheFirst) {
|
|
240
240
|
const cacheStartTime = Date.now();
|
|
241
241
|
try {
|
|
242
|
-
console.log("[useScoutRefresh] Loading from cache...");
|
|
243
242
|
const cacheResult = await scoutCache.getHerdModules();
|
|
244
243
|
cacheLoadDuration = Date.now() - cacheStartTime;
|
|
245
244
|
timingRefs.current.cacheLoadDuration = cacheLoadDuration;
|
|
@@ -264,19 +263,24 @@ export function useScoutRefresh(options = {}) {
|
|
|
264
263
|
}
|
|
265
264
|
// If cache is fresh, we still background fetch but don't wait
|
|
266
265
|
if (!cacheResult.isStale) {
|
|
267
|
-
console.log("[useScoutRefresh] Cache is fresh, background fetching fresh data...");
|
|
268
266
|
// Background fetch fresh data without blocking
|
|
269
267
|
(async () => {
|
|
270
268
|
try {
|
|
271
|
-
console.log("[useScoutRefresh] Starting background fetch...");
|
|
272
269
|
const backgroundStartTime = Date.now();
|
|
273
270
|
const [backgroundHerdModulesResult, backgroundUserResult] = await Promise.all([
|
|
274
271
|
(async () => {
|
|
275
272
|
const start = Date.now();
|
|
276
273
|
const result = await server_load_herd_modules();
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
274
|
+
const totalDuration = Date.now() - start;
|
|
275
|
+
const serverDuration = result.server_processing_time_ms || totalDuration;
|
|
276
|
+
const clientOverhead = totalDuration - serverDuration;
|
|
277
|
+
console.log(`[useScoutRefresh] Background API timing breakdown:`);
|
|
278
|
+
console.log(` - Server processing: ${serverDuration}ms`);
|
|
279
|
+
console.log(` - Client overhead: ${clientOverhead}ms`);
|
|
280
|
+
console.log(` - Total request: ${totalDuration}ms`);
|
|
281
|
+
timingRefs.current.herdModulesDuration = serverDuration;
|
|
282
|
+
dispatch(setHerdModulesApiServerProcessingDuration(serverDuration));
|
|
283
|
+
dispatch(setHerdModulesApiTotalRequestDuration(totalDuration));
|
|
280
284
|
return result;
|
|
281
285
|
})(),
|
|
282
286
|
(async () => {
|
|
@@ -289,7 +293,6 @@ export function useScoutRefresh(options = {}) {
|
|
|
289
293
|
})(),
|
|
290
294
|
]);
|
|
291
295
|
const backgroundDuration = Date.now() - backgroundStartTime;
|
|
292
|
-
console.log(`[useScoutRefresh] Background fetch completed in ${backgroundDuration}ms`);
|
|
293
296
|
// Validate background responses
|
|
294
297
|
if (backgroundHerdModulesResult.data &&
|
|
295
298
|
Array.isArray(backgroundHerdModulesResult.data) &&
|
|
@@ -298,7 +301,6 @@ export function useScoutRefresh(options = {}) {
|
|
|
298
301
|
// Update cache with fresh data
|
|
299
302
|
try {
|
|
300
303
|
await scoutCache.setHerdModules(backgroundHerdModulesResult.data, cacheTtlMs);
|
|
301
|
-
console.log(`[useScoutRefresh] Background cache updated with TTL: ${Math.round(cacheTtlMs / 1000)}s`);
|
|
302
304
|
}
|
|
303
305
|
catch (cacheError) {
|
|
304
306
|
console.warn("[useScoutRefresh] Background cache save failed:", cacheError);
|
|
@@ -321,7 +323,6 @@ export function useScoutRefresh(options = {}) {
|
|
|
321
323
|
source: EnumDataSource.DATABASE,
|
|
322
324
|
timestamp: Date.now(),
|
|
323
325
|
}));
|
|
324
|
-
console.log("[useScoutRefresh] Background fetch completed and store updated");
|
|
325
326
|
}
|
|
326
327
|
else {
|
|
327
328
|
console.warn("[useScoutRefresh] Background fetch returned invalid data");
|
|
@@ -334,13 +335,11 @@ export function useScoutRefresh(options = {}) {
|
|
|
334
335
|
const totalDuration = Date.now() - startTime;
|
|
335
336
|
dispatch(setHerdModulesLoadedInMs(totalDuration));
|
|
336
337
|
dispatch(setStatus(EnumScoutStateStatus.DONE_LOADING));
|
|
337
|
-
console.log(`[useScoutRefresh] Cache-first refresh completed in ${totalDuration}ms (background fetch in progress)`);
|
|
338
338
|
onRefreshComplete?.();
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
else {
|
|
343
|
-
console.log("[useScoutRefresh] No cached data found");
|
|
344
343
|
}
|
|
345
344
|
}
|
|
346
345
|
catch (cacheError) {
|
|
@@ -350,23 +349,19 @@ export function useScoutRefresh(options = {}) {
|
|
|
350
349
|
}
|
|
351
350
|
}
|
|
352
351
|
// Step 2: Load fresh data from API
|
|
353
|
-
console.log("[useScoutRefresh] Loading fresh data from API...");
|
|
354
352
|
const parallelStartTime = Date.now();
|
|
355
353
|
const [herdModulesResult, userResult] = await Promise.all([
|
|
356
354
|
(async () => {
|
|
357
355
|
const start = Date.now();
|
|
358
|
-
console.log(`[useScoutRefresh] Starting herd modules request at ${new Date(start).toISOString()}`);
|
|
359
356
|
const result = await server_load_herd_modules();
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
return { result,
|
|
357
|
+
const totalDuration = Date.now() - start;
|
|
358
|
+
const serverDuration = result.server_processing_time_ms || totalDuration;
|
|
359
|
+
return { result, totalDuration, serverDuration, start };
|
|
363
360
|
})(),
|
|
364
361
|
(async () => {
|
|
365
362
|
const start = Date.now();
|
|
366
|
-
console.log(`[useScoutRefresh] Starting user request at ${new Date(start).toISOString()}`);
|
|
367
363
|
const { data } = await supabase.auth.getUser();
|
|
368
364
|
const duration = Date.now() - start;
|
|
369
|
-
console.log(`[useScoutRefresh] User request completed in ${duration}ms`);
|
|
370
365
|
return {
|
|
371
366
|
result: { data: data.user, status: "success" },
|
|
372
367
|
duration,
|
|
@@ -379,13 +374,20 @@ export function useScoutRefresh(options = {}) {
|
|
|
379
374
|
// Extract results and timing
|
|
380
375
|
const herdModulesResponse = herdModulesResult.result;
|
|
381
376
|
const res_new_user = userResult.result;
|
|
382
|
-
const
|
|
377
|
+
const herdModulesServerDuration = herdModulesResult.serverDuration;
|
|
378
|
+
const herdModulesTotalDuration = herdModulesResult.totalDuration;
|
|
383
379
|
const userApiDuration = userResult.duration;
|
|
380
|
+
const clientOverhead = herdModulesTotalDuration - herdModulesServerDuration;
|
|
381
|
+
console.log(`[useScoutRefresh] Fresh API timing breakdown:`);
|
|
382
|
+
console.log(` - Server processing: ${herdModulesServerDuration}ms`);
|
|
383
|
+
console.log(` - Client overhead: ${clientOverhead}ms`);
|
|
384
|
+
console.log(` - Total request: ${herdModulesTotalDuration}ms`);
|
|
384
385
|
// Store timing values
|
|
385
|
-
timingRefs.current.herdModulesDuration =
|
|
386
|
+
timingRefs.current.herdModulesDuration = herdModulesServerDuration;
|
|
386
387
|
timingRefs.current.userApiDuration = userApiDuration;
|
|
387
388
|
// Dispatch timing actions
|
|
388
|
-
dispatch(
|
|
389
|
+
dispatch(setHerdModulesApiServerProcessingDuration(herdModulesServerDuration));
|
|
390
|
+
dispatch(setHerdModulesApiTotalRequestDuration(herdModulesTotalDuration));
|
|
389
391
|
dispatch(setUserApiDuration(userApiDuration));
|
|
390
392
|
// Validate API responses
|
|
391
393
|
const validationStartTime = Date.now();
|
|
@@ -435,15 +437,8 @@ export function useScoutRefresh(options = {}) {
|
|
|
435
437
|
const loadingDuration = Date.now() - startTime;
|
|
436
438
|
dispatch(setHerdModulesLoadedInMs(loadingDuration));
|
|
437
439
|
dispatch(setStatus(EnumScoutStateStatus.DONE_LOADING));
|
|
438
|
-
// Log
|
|
439
|
-
console.log(`[useScoutRefresh] Refresh completed
|
|
440
|
-
console.log(` - Total duration: ${loadingDuration}ms`);
|
|
441
|
-
console.log(` - Cache load: ${cacheLoadDuration}ms`);
|
|
442
|
-
console.log(` - Herd modules API: ${herdModulesDuration}ms`);
|
|
443
|
-
console.log(` - User API: ${userApiDuration}ms`);
|
|
444
|
-
console.log(` - Cache save: ${timingRefs.current.cacheSaveDuration}ms`);
|
|
445
|
-
console.log(` - Data processing: ${dataProcessingDuration}ms`);
|
|
446
|
-
console.log(` - Cache TTL: ${Math.round(cacheTtlMs / 1000)}s`);
|
|
440
|
+
// Log concise completion summary
|
|
441
|
+
console.log(`[useScoutRefresh] Refresh completed in ${loadingDuration}ms (Server: ${herdModulesServerDuration}ms, Total API: ${herdModulesTotalDuration}ms)`);
|
|
447
442
|
onRefreshComplete?.();
|
|
448
443
|
}
|
|
449
444
|
catch (error) {
|
|
@@ -460,10 +455,7 @@ export function useScoutRefresh(options = {}) {
|
|
|
460
455
|
dispatch(setHerdModulesLoadedInMs(loadingDuration));
|
|
461
456
|
dispatch(setStatus(EnumScoutStateStatus.DONE_LOADING));
|
|
462
457
|
// Log essential error metrics
|
|
463
|
-
console.log(`[useScoutRefresh] Refresh failed
|
|
464
|
-
console.log(` - Total duration: ${loadingDuration}ms`);
|
|
465
|
-
console.log(` - Herd modules: ${timingRefs.current.herdModulesDuration}ms`);
|
|
466
|
-
console.log(` - User API: ${timingRefs.current.userApiDuration}ms`);
|
|
458
|
+
console.log(`[useScoutRefresh] Refresh failed after ${loadingDuration}ms`);
|
|
467
459
|
// Call completion callback even on error for consistency
|
|
468
460
|
onRefreshComplete?.();
|
|
469
461
|
}
|
|
@@ -489,7 +481,6 @@ export function useScoutRefresh(options = {}) {
|
|
|
489
481
|
const clearCache = useCallback(async () => {
|
|
490
482
|
try {
|
|
491
483
|
await scoutCache.clearHerdModules();
|
|
492
|
-
console.log("[useScoutRefresh] Cache cleared successfully");
|
|
493
484
|
}
|
|
494
485
|
catch (error) {
|
|
495
486
|
console.error("[useScoutRefresh] Failed to clear cache:", error);
|
|
@@ -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/store/scout.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export interface ScoutState {
|
|
|
11
11
|
status: EnumScoutStateStatus;
|
|
12
12
|
herd_modules_loading_state: EnumHerdModulesLoadingState;
|
|
13
13
|
herd_modules_loaded_in_ms: number | null;
|
|
14
|
-
|
|
14
|
+
herd_modules_api_server_processing_ms: number | null;
|
|
15
|
+
herd_modules_api_total_request_ms: number | null;
|
|
15
16
|
user_api_duration_ms: number | null;
|
|
16
17
|
data_processing_duration_ms: number | null;
|
|
17
18
|
cache_load_duration_ms: number | null;
|
|
@@ -43,7 +44,11 @@ export declare const scoutSlice: import("@reduxjs/toolkit").Slice<ScoutState, {
|
|
|
43
44
|
payload: any;
|
|
44
45
|
type: string;
|
|
45
46
|
}) => void;
|
|
46
|
-
|
|
47
|
+
setHerdModulesApiServerProcessingDuration: (state: import("immer").WritableDraft<ScoutState>, action: {
|
|
48
|
+
payload: any;
|
|
49
|
+
type: string;
|
|
50
|
+
}) => void;
|
|
51
|
+
setHerdModulesApiTotalRequestDuration: (state: import("immer").WritableDraft<ScoutState>, action: {
|
|
47
52
|
payload: any;
|
|
48
53
|
type: string;
|
|
49
54
|
}) => void;
|
|
@@ -160,6 +165,6 @@ export declare const scoutSlice: import("@reduxjs/toolkit").Slice<ScoutState, {
|
|
|
160
165
|
type: string;
|
|
161
166
|
}) => void;
|
|
162
167
|
}, "scout", "scout", import("@reduxjs/toolkit").SliceSelectors<ScoutState>>;
|
|
163
|
-
export declare const setHerdModules: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModules">, setStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setStatus">, setHerdModulesLoadingState: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModulesLoadingState">, setHerdModulesLoadedInMs: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModulesLoadedInMs">,
|
|
168
|
+
export declare const setHerdModules: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModules">, setStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setStatus">, setHerdModulesLoadingState: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModulesLoadingState">, setHerdModulesLoadedInMs: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModulesLoadedInMs">, setHerdModulesApiServerProcessingDuration: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModulesApiServerProcessingDuration">, setHerdModulesApiTotalRequestDuration: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setHerdModulesApiTotalRequestDuration">, setUserApiDuration: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setUserApiDuration">, setDataProcessingDuration: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setDataProcessingDuration">, setCacheLoadDuration: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setCacheLoadDuration">, setActiveHerdId: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setActiveHerdId">, setActiveDeviceId: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setActiveDeviceId">, setDataSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setDataSource">, setDataSourceInfo: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setDataSourceInfo">, appendEventsToHerdModule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/appendEventsToHerdModule">, replaceEventsForHerdModule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/replaceEventsForHerdModule">, updateEventValuesForHerdModule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/updateEventValuesForHerdModule">, updatePageIndexForHerdModule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/updatePageIndexForHerdModule">, appendPlansToHerdModule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/appendPlansToHerdModule">, setUser: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setUser">, addTag: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/addTag">, deleteTag: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/deleteTag">, updateTag: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/updateTag">, addNewDeviceToHerdModule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/addNewDeviceToHerdModule">, updateDeviceForHerdModule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/updateDeviceForHerdModule">, addDevice: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/addDevice">, deleteDevice: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/deleteDevice">, updateDevice: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/updateDevice">, addPlan: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/addPlan">, deletePlan: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/deletePlan">, updatePlan: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/updatePlan">, addSessionToStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/addSessionToStore">, deleteSessionFromStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/deleteSessionFromStore">, updateSessionInStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/updateSessionInStore">, setActiveHerdGpsTrackersConnectivity: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "scout/setActiveHerdGpsTrackersConnectivity">;
|
|
164
169
|
declare const _default: import("redux").Reducer<ScoutState>;
|
|
165
170
|
export default _default;
|
package/dist/store/scout.js
CHANGED
|
@@ -12,7 +12,8 @@ const initialState = {
|
|
|
12
12
|
herd_modules_loading_state: EnumHerdModulesLoadingState.NOT_LOADING,
|
|
13
13
|
herd_modules_loaded_in_ms: null,
|
|
14
14
|
// Initialize timing variables
|
|
15
|
-
|
|
15
|
+
herd_modules_api_server_processing_ms: null,
|
|
16
|
+
herd_modules_api_total_request_ms: null,
|
|
16
17
|
user_api_duration_ms: null,
|
|
17
18
|
data_processing_duration_ms: null,
|
|
18
19
|
cache_load_duration_ms: null,
|
|
@@ -42,8 +43,11 @@ export const scoutSlice = createSlice({
|
|
|
42
43
|
setHerdModulesLoadedInMs: (state, action) => {
|
|
43
44
|
state.herd_modules_loaded_in_ms = action.payload;
|
|
44
45
|
},
|
|
45
|
-
|
|
46
|
-
state.
|
|
46
|
+
setHerdModulesApiServerProcessingDuration: (state, action) => {
|
|
47
|
+
state.herd_modules_api_server_processing_ms = action.payload;
|
|
48
|
+
},
|
|
49
|
+
setHerdModulesApiTotalRequestDuration: (state, action) => {
|
|
50
|
+
state.herd_modules_api_total_request_ms = action.payload;
|
|
47
51
|
},
|
|
48
52
|
setUserApiDuration: (state, action) => {
|
|
49
53
|
state.user_api_duration_ms = action.payload;
|
|
@@ -269,5 +273,5 @@ export const scoutSlice = createSlice({
|
|
|
269
273
|
},
|
|
270
274
|
});
|
|
271
275
|
// Action creators are generated for each case reducer function
|
|
272
|
-
export const { setHerdModules, setStatus, setHerdModulesLoadingState, setHerdModulesLoadedInMs,
|
|
276
|
+
export const { setHerdModules, setStatus, setHerdModulesLoadingState, setHerdModulesLoadedInMs, setHerdModulesApiServerProcessingDuration, setHerdModulesApiTotalRequestDuration, setUserApiDuration, setDataProcessingDuration, setCacheLoadDuration, setActiveHerdId, setActiveDeviceId, setDataSource, setDataSourceInfo, appendEventsToHerdModule, replaceEventsForHerdModule, updateEventValuesForHerdModule, updatePageIndexForHerdModule, appendPlansToHerdModule, setUser, addTag, deleteTag, updateTag, addNewDeviceToHerdModule, updateDeviceForHerdModule, addDevice, deleteDevice, updateDevice, addPlan, deletePlan, updatePlan, addSessionToStore, deleteSessionFromStore, updateSessionInStore, setActiveHerdGpsTrackersConnectivity, } = scoutSlice.actions;
|
|
273
277
|
export default scoutSlice.reducer;
|
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