@adventurelabs/scout-core 1.0.11 → 1.0.13
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.js
CHANGED
|
@@ -84,7 +84,7 @@ export async function server_get_more_events_with_tags_by_herd(herd_id, offset,
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
// iterate through data if tags contains null, remove it
|
|
87
|
-
const filtered_data = data.map((event) => {
|
|
87
|
+
const filtered_data = (data || []).map((event) => {
|
|
88
88
|
if (!event.tags)
|
|
89
89
|
return event;
|
|
90
90
|
event.tags = event.tags.filter((tag) => tag !== null);
|
|
@@ -110,7 +110,7 @@ export async function server_get_events_and_tags_for_device(device_id, limit = 3
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
// Add signed URLs to events using the same client
|
|
113
|
-
const eventsWithSignedUrls = await addSignedUrlsToEvents(data, supabase);
|
|
113
|
+
const eventsWithSignedUrls = await addSignedUrlsToEvents(data || [], supabase);
|
|
114
114
|
return IWebResponse.success(eventsWithSignedUrls).to_compatible();
|
|
115
115
|
}
|
|
116
116
|
export async function get_event_and_tags_by_event_id(event_id) {
|
|
@@ -472,12 +472,6 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
|
|
|
472
472
|
};
|
|
473
473
|
Returns: Database["public"]["CompositeTypes"]["device_pretty_location"][];
|
|
474
474
|
};
|
|
475
|
-
get_event_with_tags_by_id: {
|
|
476
|
-
Args: {
|
|
477
|
-
event_id_caller: number;
|
|
478
|
-
};
|
|
479
|
-
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
|
|
480
|
-
};
|
|
481
475
|
get_events_and_tags_for_device: {
|
|
482
476
|
Args: {
|
|
483
477
|
device_id_caller: number;
|
|
@@ -488,8 +482,8 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
|
|
|
488
482
|
get_events_and_tags_for_herd: {
|
|
489
483
|
Args: {
|
|
490
484
|
herd_id_caller: number;
|
|
491
|
-
offset_caller: number;
|
|
492
485
|
limit_caller: number;
|
|
486
|
+
offset_caller: number;
|
|
493
487
|
};
|
|
494
488
|
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
495
489
|
};
|
|
@@ -513,6 +507,12 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
|
|
|
513
507
|
timestamp_observation: string;
|
|
514
508
|
}[];
|
|
515
509
|
};
|
|
510
|
+
get_events_with_tags_by_id: {
|
|
511
|
+
Args: {
|
|
512
|
+
event_id_caller: number;
|
|
513
|
+
};
|
|
514
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
|
|
515
|
+
};
|
|
516
516
|
get_events_with_tags_for_herd: {
|
|
517
517
|
Args: {
|
|
518
518
|
herd_id_caller: number;
|
|
@@ -587,6 +587,7 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
|
|
|
587
587
|
inserted_at: string | null;
|
|
588
588
|
message: string | null;
|
|
589
589
|
media_url: string | null;
|
|
590
|
+
file_path: string | null;
|
|
590
591
|
latitude: number | null;
|
|
591
592
|
longitude: number | null;
|
|
592
593
|
earthranger_url: string | null;
|
package/dist/types/supabase.d.ts
CHANGED
|
@@ -525,12 +525,6 @@ export type Database = {
|
|
|
525
525
|
};
|
|
526
526
|
Returns: Database["public"]["CompositeTypes"]["device_pretty_location"][];
|
|
527
527
|
};
|
|
528
|
-
get_event_with_tags_by_id: {
|
|
529
|
-
Args: {
|
|
530
|
-
event_id_caller: number;
|
|
531
|
-
};
|
|
532
|
-
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
|
|
533
|
-
};
|
|
534
528
|
get_events_and_tags_for_device: {
|
|
535
529
|
Args: {
|
|
536
530
|
device_id_caller: number;
|
|
@@ -541,8 +535,8 @@ export type Database = {
|
|
|
541
535
|
get_events_and_tags_for_herd: {
|
|
542
536
|
Args: {
|
|
543
537
|
herd_id_caller: number;
|
|
544
|
-
offset_caller: number;
|
|
545
538
|
limit_caller: number;
|
|
539
|
+
offset_caller: number;
|
|
546
540
|
};
|
|
547
541
|
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
548
542
|
};
|
|
@@ -566,6 +560,12 @@ export type Database = {
|
|
|
566
560
|
timestamp_observation: string;
|
|
567
561
|
}[];
|
|
568
562
|
};
|
|
563
|
+
get_events_with_tags_by_id: {
|
|
564
|
+
Args: {
|
|
565
|
+
event_id_caller: number;
|
|
566
|
+
};
|
|
567
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
|
|
568
|
+
};
|
|
569
569
|
get_events_with_tags_for_herd: {
|
|
570
570
|
Args: {
|
|
571
571
|
herd_id_caller: number;
|
|
@@ -640,6 +640,7 @@ export type Database = {
|
|
|
640
640
|
inserted_at: string | null;
|
|
641
641
|
message: string | null;
|
|
642
642
|
media_url: string | null;
|
|
643
|
+
file_path: string | null;
|
|
643
644
|
latitude: number | null;
|
|
644
645
|
longitude: number | null;
|
|
645
646
|
earthranger_url: string | null;
|