@adventurelabs/scout-core 1.0.10 → 1.0.12
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/storage.js +1 -0
- package/dist/helpers/tags.js +2 -2
- package/dist/supabase/server.d.ts +22 -21
- package/dist/types/supabase.d.ts +22 -21
- package/package.json +1 -1
package/dist/helpers/storage.js
CHANGED
|
@@ -14,6 +14,7 @@ export async function generateSignedUrl(filePath, expiresIn = 3600, supabaseClie
|
|
|
14
14
|
const { data, error } = await supabase.storage
|
|
15
15
|
.from(BUCKET_NAME_SCOUT)
|
|
16
16
|
.createSignedUrl(filePath, expiresIn);
|
|
17
|
+
console.log("generateSignedUrl", data);
|
|
17
18
|
if (error) {
|
|
18
19
|
console.error("Error generating signed URL:", error.message);
|
|
19
20
|
return null;
|
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,27 +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
|
-
get_events_and_tags_for_device: {
|
|
482
|
-
Args: {
|
|
483
|
-
device_id_caller: number;
|
|
484
|
-
limit_caller: number;
|
|
485
|
-
};
|
|
486
|
-
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
487
|
-
};
|
|
488
|
-
get_events_and_tags_for_herd: {
|
|
489
|
-
Args: {
|
|
490
|
-
herd_id_caller: number;
|
|
491
|
-
offset_caller: number;
|
|
492
|
-
limit_caller: number;
|
|
493
|
-
};
|
|
494
|
-
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
495
|
-
};
|
|
496
475
|
get_events_for_herd: {
|
|
497
476
|
Args: {
|
|
498
477
|
herd_id_in: number;
|
|
@@ -521,6 +500,27 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
|
|
|
521
500
|
};
|
|
522
501
|
Returns: Database["public"]["CompositeTypes"]["event_with_tags"][];
|
|
523
502
|
};
|
|
503
|
+
get_events_and_tags_for_herd: {
|
|
504
|
+
Args: {
|
|
505
|
+
herd_id_caller: number;
|
|
506
|
+
limit_caller: number;
|
|
507
|
+
offset_caller: number;
|
|
508
|
+
};
|
|
509
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
510
|
+
};
|
|
511
|
+
get_events_and_tags_for_device: {
|
|
512
|
+
Args: {
|
|
513
|
+
device_id_caller: number;
|
|
514
|
+
limit_caller: number;
|
|
515
|
+
};
|
|
516
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
517
|
+
};
|
|
518
|
+
get_events_with_tags_by_id: {
|
|
519
|
+
Args: {
|
|
520
|
+
event_id_caller: number;
|
|
521
|
+
};
|
|
522
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
|
|
523
|
+
};
|
|
524
524
|
get_total_events_for_herd: {
|
|
525
525
|
Args: {
|
|
526
526
|
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,27 +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
|
-
get_events_and_tags_for_device: {
|
|
535
|
-
Args: {
|
|
536
|
-
device_id_caller: number;
|
|
537
|
-
limit_caller: number;
|
|
538
|
-
};
|
|
539
|
-
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
540
|
-
};
|
|
541
|
-
get_events_and_tags_for_herd: {
|
|
542
|
-
Args: {
|
|
543
|
-
herd_id_caller: number;
|
|
544
|
-
offset_caller: number;
|
|
545
|
-
limit_caller: number;
|
|
546
|
-
};
|
|
547
|
-
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
548
|
-
};
|
|
549
528
|
get_events_for_herd: {
|
|
550
529
|
Args: {
|
|
551
530
|
herd_id_in: number;
|
|
@@ -574,6 +553,27 @@ export type Database = {
|
|
|
574
553
|
};
|
|
575
554
|
Returns: Database["public"]["CompositeTypes"]["event_with_tags"][];
|
|
576
555
|
};
|
|
556
|
+
get_events_and_tags_for_herd: {
|
|
557
|
+
Args: {
|
|
558
|
+
herd_id_caller: number;
|
|
559
|
+
limit_caller: number;
|
|
560
|
+
offset_caller: number;
|
|
561
|
+
};
|
|
562
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
563
|
+
};
|
|
564
|
+
get_events_and_tags_for_device: {
|
|
565
|
+
Args: {
|
|
566
|
+
device_id_caller: number;
|
|
567
|
+
limit_caller: number;
|
|
568
|
+
};
|
|
569
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
|
|
570
|
+
};
|
|
571
|
+
get_events_with_tags_by_id: {
|
|
572
|
+
Args: {
|
|
573
|
+
event_id_caller: number;
|
|
574
|
+
};
|
|
575
|
+
Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
|
|
576
|
+
};
|
|
577
577
|
get_total_events_for_herd: {
|
|
578
578
|
Args: {
|
|
579
579
|
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;
|