@adventurelabs/scout-core 1.4.45 → 1.4.47
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/tags.d.ts
CHANGED
|
@@ -16,3 +16,9 @@ export declare function server_get_tags_for_artifact(artifactId: number, options
|
|
|
16
16
|
end_timestamp?: string | null;
|
|
17
17
|
max_elements?: number;
|
|
18
18
|
}): Promise<IWebResponseCompatible<ITagPrettyLocation[]>>;
|
|
19
|
+
/** Tags for an event with optional timestamp range and max items. */
|
|
20
|
+
export declare function server_get_tags_for_event(eventId: number, options?: {
|
|
21
|
+
start_timestamp?: string | null;
|
|
22
|
+
end_timestamp?: string | null;
|
|
23
|
+
max_elements?: number;
|
|
24
|
+
}): Promise<IWebResponseCompatible<ITagPrettyLocation[]>>;
|
package/dist/helpers/tags.js
CHANGED
|
@@ -437,6 +437,7 @@ export async function get_event_and_tags_by_event_id(event_id) {
|
|
|
437
437
|
origin_longitude: originLon,
|
|
438
438
|
subject_latitude: subjectLat,
|
|
439
439
|
subject_longitude: subjectLon,
|
|
440
|
+
subject_id: tag.subject_id ?? null,
|
|
440
441
|
};
|
|
441
442
|
}),
|
|
442
443
|
earthranger_url: data[0].earthranger_url,
|
|
@@ -479,3 +480,26 @@ export async function server_get_tags_for_artifact(artifactId, options) {
|
|
|
479
480
|
}
|
|
480
481
|
return IWebResponse.success(data ?? []).to_compatible();
|
|
481
482
|
}
|
|
483
|
+
/** Tags for an event with optional timestamp range and max items. */
|
|
484
|
+
export async function server_get_tags_for_event(eventId, options) {
|
|
485
|
+
const supabase = await newServerClient();
|
|
486
|
+
const { data, error } = await supabase.rpc("get_tags_for_event", {
|
|
487
|
+
event_id_caller: eventId,
|
|
488
|
+
max_elements_caller: options?.max_elements ?? 1000,
|
|
489
|
+
...(options?.start_timestamp != null && {
|
|
490
|
+
start_timestamp_caller: options.start_timestamp,
|
|
491
|
+
}),
|
|
492
|
+
...(options?.end_timestamp != null && {
|
|
493
|
+
end_timestamp_caller: options.end_timestamp,
|
|
494
|
+
}),
|
|
495
|
+
});
|
|
496
|
+
if (error) {
|
|
497
|
+
console.warn("Error fetching tags for event:", error.message);
|
|
498
|
+
return {
|
|
499
|
+
status: EnumWebResponse.ERROR,
|
|
500
|
+
msg: error.message,
|
|
501
|
+
data: [],
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
return IWebResponse.success(data ?? []).to_compatible();
|
|
505
|
+
}
|
|
@@ -302,6 +302,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
302
302
|
associated_station: string | null;
|
|
303
303
|
bandwidth_hz: number | null;
|
|
304
304
|
battery_percentage: number | null;
|
|
305
|
+
battery_volts: number | null;
|
|
305
306
|
device_id: number | null;
|
|
306
307
|
frequency_hz: number | null;
|
|
307
308
|
h11_index: string;
|
|
@@ -323,6 +324,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
323
324
|
associated_station?: string | null;
|
|
324
325
|
bandwidth_hz?: number | null;
|
|
325
326
|
battery_percentage?: number | null;
|
|
327
|
+
battery_volts?: number | null;
|
|
326
328
|
device_id?: number | null;
|
|
327
329
|
frequency_hz?: number | null;
|
|
328
330
|
h11_index: string;
|
|
@@ -344,6 +346,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
344
346
|
associated_station?: string | null;
|
|
345
347
|
bandwidth_hz?: number | null;
|
|
346
348
|
battery_percentage?: number | null;
|
|
349
|
+
battery_volts?: number | null;
|
|
347
350
|
device_id?: number | null;
|
|
348
351
|
frequency_hz?: number | null;
|
|
349
352
|
h11_index?: string;
|
|
@@ -1253,6 +1256,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1253
1256
|
sensor_roll: number | null;
|
|
1254
1257
|
sensor_yaw: number | null;
|
|
1255
1258
|
subject_height: number | null;
|
|
1259
|
+
subject_id: number | null;
|
|
1256
1260
|
subject_location: unknown;
|
|
1257
1261
|
timestamp_observation: string | null;
|
|
1258
1262
|
width: number;
|
|
@@ -1279,6 +1283,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1279
1283
|
sensor_roll?: number | null;
|
|
1280
1284
|
sensor_yaw?: number | null;
|
|
1281
1285
|
subject_height?: number | null;
|
|
1286
|
+
subject_id?: number | null;
|
|
1282
1287
|
subject_location?: unknown;
|
|
1283
1288
|
timestamp_observation?: string | null;
|
|
1284
1289
|
width: number;
|
|
@@ -1305,6 +1310,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1305
1310
|
sensor_roll?: number | null;
|
|
1306
1311
|
sensor_yaw?: number | null;
|
|
1307
1312
|
subject_height?: number | null;
|
|
1313
|
+
subject_id?: number | null;
|
|
1308
1314
|
subject_location?: unknown;
|
|
1309
1315
|
timestamp_observation?: string | null;
|
|
1310
1316
|
width?: number;
|
|
@@ -2450,6 +2456,21 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
2450
2456
|
isSetofReturn: true;
|
|
2451
2457
|
};
|
|
2452
2458
|
};
|
|
2459
|
+
get_tags_for_event: {
|
|
2460
|
+
Args: {
|
|
2461
|
+
end_timestamp_caller?: string;
|
|
2462
|
+
event_id_caller: number;
|
|
2463
|
+
max_elements_caller?: number;
|
|
2464
|
+
start_timestamp_caller?: string;
|
|
2465
|
+
};
|
|
2466
|
+
Returns: Database["public"]["CompositeTypes"]["tags_pretty_location"][];
|
|
2467
|
+
SetofOptions: {
|
|
2468
|
+
from: "*";
|
|
2469
|
+
to: "tags_pretty_location";
|
|
2470
|
+
isOneToOne: false;
|
|
2471
|
+
isSetofReturn: true;
|
|
2472
|
+
};
|
|
2473
|
+
};
|
|
2453
2474
|
get_total_artifacts_for_herd: {
|
|
2454
2475
|
Args: {
|
|
2455
2476
|
herd_id_caller: number;
|
|
@@ -2644,6 +2665,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
2644
2665
|
bandwidth_hz: number | null;
|
|
2645
2666
|
associated_station: string | null;
|
|
2646
2667
|
mode: string | null;
|
|
2668
|
+
battery_volts: number | null;
|
|
2647
2669
|
};
|
|
2648
2670
|
device_heartbeat_analysis: {
|
|
2649
2671
|
device_id: number | null;
|
|
@@ -2832,6 +2854,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
2832
2854
|
origin_longitude: number | null;
|
|
2833
2855
|
subject_latitude: number | null;
|
|
2834
2856
|
subject_longitude: number | null;
|
|
2857
|
+
subject_id: number | null;
|
|
2835
2858
|
};
|
|
2836
2859
|
zones_and_actions_pretty_location: {
|
|
2837
2860
|
id: number | null;
|
package/dist/types/supabase.d.ts
CHANGED
|
@@ -315,6 +315,7 @@ export type Database = {
|
|
|
315
315
|
associated_station: string | null;
|
|
316
316
|
bandwidth_hz: number | null;
|
|
317
317
|
battery_percentage: number | null;
|
|
318
|
+
battery_volts: number | null;
|
|
318
319
|
device_id: number | null;
|
|
319
320
|
frequency_hz: number | null;
|
|
320
321
|
h11_index: string;
|
|
@@ -336,6 +337,7 @@ export type Database = {
|
|
|
336
337
|
associated_station?: string | null;
|
|
337
338
|
bandwidth_hz?: number | null;
|
|
338
339
|
battery_percentage?: number | null;
|
|
340
|
+
battery_volts?: number | null;
|
|
339
341
|
device_id?: number | null;
|
|
340
342
|
frequency_hz?: number | null;
|
|
341
343
|
h11_index: string;
|
|
@@ -357,6 +359,7 @@ export type Database = {
|
|
|
357
359
|
associated_station?: string | null;
|
|
358
360
|
bandwidth_hz?: number | null;
|
|
359
361
|
battery_percentage?: number | null;
|
|
362
|
+
battery_volts?: number | null;
|
|
360
363
|
device_id?: number | null;
|
|
361
364
|
frequency_hz?: number | null;
|
|
362
365
|
h11_index?: string;
|
|
@@ -1318,6 +1321,7 @@ export type Database = {
|
|
|
1318
1321
|
sensor_roll: number | null;
|
|
1319
1322
|
sensor_yaw: number | null;
|
|
1320
1323
|
subject_height: number | null;
|
|
1324
|
+
subject_id: number | null;
|
|
1321
1325
|
subject_location: unknown;
|
|
1322
1326
|
timestamp_observation: string | null;
|
|
1323
1327
|
width: number;
|
|
@@ -1344,6 +1348,7 @@ export type Database = {
|
|
|
1344
1348
|
sensor_roll?: number | null;
|
|
1345
1349
|
sensor_yaw?: number | null;
|
|
1346
1350
|
subject_height?: number | null;
|
|
1351
|
+
subject_id?: number | null;
|
|
1347
1352
|
subject_location?: unknown;
|
|
1348
1353
|
timestamp_observation?: string | null;
|
|
1349
1354
|
width: number;
|
|
@@ -1370,6 +1375,7 @@ export type Database = {
|
|
|
1370
1375
|
sensor_roll?: number | null;
|
|
1371
1376
|
sensor_yaw?: number | null;
|
|
1372
1377
|
subject_height?: number | null;
|
|
1378
|
+
subject_id?: number | null;
|
|
1373
1379
|
subject_location?: unknown;
|
|
1374
1380
|
timestamp_observation?: string | null;
|
|
1375
1381
|
width?: number;
|
|
@@ -2535,6 +2541,21 @@ export type Database = {
|
|
|
2535
2541
|
isSetofReturn: true;
|
|
2536
2542
|
};
|
|
2537
2543
|
};
|
|
2544
|
+
get_tags_for_event: {
|
|
2545
|
+
Args: {
|
|
2546
|
+
end_timestamp_caller?: string;
|
|
2547
|
+
event_id_caller: number;
|
|
2548
|
+
max_elements_caller?: number;
|
|
2549
|
+
start_timestamp_caller?: string;
|
|
2550
|
+
};
|
|
2551
|
+
Returns: Database["public"]["CompositeTypes"]["tags_pretty_location"][];
|
|
2552
|
+
SetofOptions: {
|
|
2553
|
+
from: "*";
|
|
2554
|
+
to: "tags_pretty_location";
|
|
2555
|
+
isOneToOne: false;
|
|
2556
|
+
isSetofReturn: true;
|
|
2557
|
+
};
|
|
2558
|
+
};
|
|
2538
2559
|
get_total_artifacts_for_herd: {
|
|
2539
2560
|
Args: {
|
|
2540
2561
|
herd_id_caller: number;
|
|
@@ -2729,6 +2750,7 @@ export type Database = {
|
|
|
2729
2750
|
bandwidth_hz: number | null;
|
|
2730
2751
|
associated_station: string | null;
|
|
2731
2752
|
mode: string | null;
|
|
2753
|
+
battery_volts: number | null;
|
|
2732
2754
|
};
|
|
2733
2755
|
device_heartbeat_analysis: {
|
|
2734
2756
|
device_id: number | null;
|
|
@@ -2917,6 +2939,7 @@ export type Database = {
|
|
|
2917
2939
|
origin_longitude: number | null;
|
|
2918
2940
|
subject_latitude: number | null;
|
|
2919
2941
|
subject_longitude: number | null;
|
|
2942
|
+
subject_id: number | null;
|
|
2920
2943
|
};
|
|
2921
2944
|
zones_and_actions_pretty_location: {
|
|
2922
2945
|
id: number | null;
|