@adventurelabs/scout-core 1.4.16 → 1.4.18
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/artifacts.d.ts +10 -2
- package/dist/helpers/artifacts.js +10 -6
- package/dist/helpers/bounding_boxes.d.ts +2 -2
- package/dist/helpers/bounding_boxes.js +3 -5
- package/dist/helpers/tags.js +34 -16
- package/dist/providers/ScoutRefreshProvider.d.ts +283 -52
- package/dist/store/api.js +50 -2
- package/dist/types/db.d.ts +1 -0
- package/dist/types/supabase.d.ts +294 -52
- package/package.json +1 -1
|
@@ -54,6 +54,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
54
54
|
embedding_qwen_vl_2b: string | null;
|
|
55
55
|
embedding_vertex_mm_01: string | null;
|
|
56
56
|
file_path: string;
|
|
57
|
+
file_size_bytes: number | null;
|
|
57
58
|
id: number;
|
|
58
59
|
modality: string | null;
|
|
59
60
|
session_id: number | null;
|
|
@@ -67,6 +68,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
67
68
|
embedding_qwen_vl_2b?: string | null;
|
|
68
69
|
embedding_vertex_mm_01?: string | null;
|
|
69
70
|
file_path: string;
|
|
71
|
+
file_size_bytes?: number | null;
|
|
70
72
|
id?: number;
|
|
71
73
|
modality?: string | null;
|
|
72
74
|
session_id?: number | null;
|
|
@@ -80,6 +82,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
80
82
|
embedding_qwen_vl_2b?: string | null;
|
|
81
83
|
embedding_vertex_mm_01?: string | null;
|
|
82
84
|
file_path?: string;
|
|
85
|
+
file_size_bytes?: number | null;
|
|
83
86
|
id?: number;
|
|
84
87
|
modality?: string | null;
|
|
85
88
|
session_id?: number | null;
|
|
@@ -107,6 +110,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
107
110
|
expiration: string | null;
|
|
108
111
|
id: number;
|
|
109
112
|
issuer: string;
|
|
113
|
+
part_id: number | null;
|
|
110
114
|
tracking_number: string | null;
|
|
111
115
|
type: string;
|
|
112
116
|
updated_at: string | null;
|
|
@@ -116,6 +120,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
116
120
|
expiration?: string | null;
|
|
117
121
|
id?: number;
|
|
118
122
|
issuer: string;
|
|
123
|
+
part_id?: number | null;
|
|
119
124
|
tracking_number?: string | null;
|
|
120
125
|
type: string;
|
|
121
126
|
updated_at?: string | null;
|
|
@@ -125,11 +130,18 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
125
130
|
expiration?: string | null;
|
|
126
131
|
id?: number;
|
|
127
132
|
issuer?: string;
|
|
133
|
+
part_id?: number | null;
|
|
128
134
|
tracking_number?: string | null;
|
|
129
135
|
type?: string;
|
|
130
136
|
updated_at?: string | null;
|
|
131
137
|
};
|
|
132
|
-
Relationships: [
|
|
138
|
+
Relationships: [{
|
|
139
|
+
foreignKeyName: "certificates_part_id_fkey";
|
|
140
|
+
columns: ["part_id"];
|
|
141
|
+
isOneToOne: false;
|
|
142
|
+
referencedRelation: "parts";
|
|
143
|
+
referencedColumns: ["id"];
|
|
144
|
+
}];
|
|
133
145
|
};
|
|
134
146
|
chat: {
|
|
135
147
|
Row: {
|
|
@@ -245,6 +257,45 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
245
257
|
referencedColumns: ["id"];
|
|
246
258
|
}];
|
|
247
259
|
};
|
|
260
|
+
credentials: {
|
|
261
|
+
Row: {
|
|
262
|
+
created_at: string;
|
|
263
|
+
expiration: string | null;
|
|
264
|
+
id: number;
|
|
265
|
+
issuer: string;
|
|
266
|
+
tracking_number: string | null;
|
|
267
|
+
type: string;
|
|
268
|
+
updated_at: string | null;
|
|
269
|
+
user_id: string;
|
|
270
|
+
};
|
|
271
|
+
Insert: {
|
|
272
|
+
created_at?: string;
|
|
273
|
+
expiration?: string | null;
|
|
274
|
+
id?: number;
|
|
275
|
+
issuer: string;
|
|
276
|
+
tracking_number?: string | null;
|
|
277
|
+
type: string;
|
|
278
|
+
updated_at?: string | null;
|
|
279
|
+
user_id: string;
|
|
280
|
+
};
|
|
281
|
+
Update: {
|
|
282
|
+
created_at?: string;
|
|
283
|
+
expiration?: string | null;
|
|
284
|
+
id?: number;
|
|
285
|
+
issuer?: string;
|
|
286
|
+
tracking_number?: string | null;
|
|
287
|
+
type?: string;
|
|
288
|
+
updated_at?: string | null;
|
|
289
|
+
user_id?: string;
|
|
290
|
+
};
|
|
291
|
+
Relationships: [{
|
|
292
|
+
foreignKeyName: "credentials_user_id_fkey";
|
|
293
|
+
columns: ["user_id"];
|
|
294
|
+
isOneToOne: false;
|
|
295
|
+
referencedRelation: "users";
|
|
296
|
+
referencedColumns: ["id"];
|
|
297
|
+
}];
|
|
298
|
+
};
|
|
248
299
|
devices: {
|
|
249
300
|
Row: {
|
|
250
301
|
altitude: number | null;
|
|
@@ -518,6 +569,78 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
518
569
|
referencedColumns: ["id"];
|
|
519
570
|
}];
|
|
520
571
|
};
|
|
572
|
+
maintenance: {
|
|
573
|
+
Row: {
|
|
574
|
+
created_at: string;
|
|
575
|
+
description: string | null;
|
|
576
|
+
id: number;
|
|
577
|
+
part_id: number;
|
|
578
|
+
timestamp_completion: string;
|
|
579
|
+
type: string | null;
|
|
580
|
+
updated_at: string | null;
|
|
581
|
+
};
|
|
582
|
+
Insert: {
|
|
583
|
+
created_at?: string;
|
|
584
|
+
description?: string | null;
|
|
585
|
+
id?: number;
|
|
586
|
+
part_id: number;
|
|
587
|
+
timestamp_completion: string;
|
|
588
|
+
type?: string | null;
|
|
589
|
+
updated_at?: string | null;
|
|
590
|
+
};
|
|
591
|
+
Update: {
|
|
592
|
+
created_at?: string;
|
|
593
|
+
description?: string | null;
|
|
594
|
+
id?: number;
|
|
595
|
+
part_id?: number;
|
|
596
|
+
timestamp_completion?: string;
|
|
597
|
+
type?: string | null;
|
|
598
|
+
updated_at?: string | null;
|
|
599
|
+
};
|
|
600
|
+
Relationships: [{
|
|
601
|
+
foreignKeyName: "maintenance_part_id_fkey";
|
|
602
|
+
columns: ["part_id"];
|
|
603
|
+
isOneToOne: false;
|
|
604
|
+
referencedRelation: "parts";
|
|
605
|
+
referencedColumns: ["id"];
|
|
606
|
+
}];
|
|
607
|
+
};
|
|
608
|
+
observations: {
|
|
609
|
+
Row: {
|
|
610
|
+
action_complete: boolean;
|
|
611
|
+
action_required: string | null;
|
|
612
|
+
description: string;
|
|
613
|
+
id: number;
|
|
614
|
+
inserted_at: string;
|
|
615
|
+
session_id: number;
|
|
616
|
+
updated_at: string | null;
|
|
617
|
+
};
|
|
618
|
+
Insert: {
|
|
619
|
+
action_complete?: boolean;
|
|
620
|
+
action_required?: string | null;
|
|
621
|
+
description: string;
|
|
622
|
+
id?: number;
|
|
623
|
+
inserted_at?: string;
|
|
624
|
+
session_id: number;
|
|
625
|
+
updated_at?: string | null;
|
|
626
|
+
};
|
|
627
|
+
Update: {
|
|
628
|
+
action_complete?: boolean;
|
|
629
|
+
action_required?: string | null;
|
|
630
|
+
description?: string;
|
|
631
|
+
id?: number;
|
|
632
|
+
inserted_at?: string;
|
|
633
|
+
session_id?: number;
|
|
634
|
+
updated_at?: string | null;
|
|
635
|
+
};
|
|
636
|
+
Relationships: [{
|
|
637
|
+
foreignKeyName: "observations_session_id_fkey";
|
|
638
|
+
columns: ["session_id"];
|
|
639
|
+
isOneToOne: false;
|
|
640
|
+
referencedRelation: "sessions";
|
|
641
|
+
referencedColumns: ["id"];
|
|
642
|
+
}];
|
|
643
|
+
};
|
|
521
644
|
operators: {
|
|
522
645
|
Row: {
|
|
523
646
|
action: string | null;
|
|
@@ -724,13 +847,14 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
724
847
|
altitude_average: number;
|
|
725
848
|
altitude_max: number;
|
|
726
849
|
altitude_min: number;
|
|
850
|
+
battery_id: number | null;
|
|
727
851
|
device_id: number;
|
|
728
852
|
distance_max_from_start: number;
|
|
729
853
|
distance_total: number;
|
|
730
|
-
earthranger_url: string | null;
|
|
731
854
|
id: number;
|
|
732
855
|
inserted_at: string;
|
|
733
856
|
locations: unknown;
|
|
857
|
+
post_approver: string | null;
|
|
734
858
|
software_version: string;
|
|
735
859
|
timestamp_end: string | null;
|
|
736
860
|
timestamp_start: string;
|
|
@@ -742,13 +866,14 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
742
866
|
altitude_average: number;
|
|
743
867
|
altitude_max: number;
|
|
744
868
|
altitude_min: number;
|
|
869
|
+
battery_id?: number | null;
|
|
745
870
|
device_id: number;
|
|
746
871
|
distance_max_from_start: number;
|
|
747
872
|
distance_total: number;
|
|
748
|
-
earthranger_url?: string | null;
|
|
749
873
|
id?: number;
|
|
750
874
|
inserted_at?: string;
|
|
751
875
|
locations?: unknown;
|
|
876
|
+
post_approver?: string | null;
|
|
752
877
|
software_version: string;
|
|
753
878
|
timestamp_end?: string | null;
|
|
754
879
|
timestamp_start: string;
|
|
@@ -760,13 +885,14 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
760
885
|
altitude_average?: number;
|
|
761
886
|
altitude_max?: number;
|
|
762
887
|
altitude_min?: number;
|
|
888
|
+
battery_id?: number | null;
|
|
763
889
|
device_id?: number;
|
|
764
890
|
distance_max_from_start?: number;
|
|
765
891
|
distance_total?: number;
|
|
766
|
-
earthranger_url?: string | null;
|
|
767
892
|
id?: number;
|
|
768
893
|
inserted_at?: string;
|
|
769
894
|
locations?: unknown;
|
|
895
|
+
post_approver?: string | null;
|
|
770
896
|
software_version?: string;
|
|
771
897
|
timestamp_end?: string | null;
|
|
772
898
|
timestamp_start?: string;
|
|
@@ -775,54 +901,111 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
775
901
|
velocity_min?: number;
|
|
776
902
|
};
|
|
777
903
|
Relationships: [{
|
|
904
|
+
foreignKeyName: "sessions_battery_id_fkey";
|
|
905
|
+
columns: ["battery_id"];
|
|
906
|
+
isOneToOne: false;
|
|
907
|
+
referencedRelation: "parts";
|
|
908
|
+
referencedColumns: ["id"];
|
|
909
|
+
}, {
|
|
778
910
|
foreignKeyName: "sessions_device_id_fkey";
|
|
779
911
|
columns: ["device_id"];
|
|
780
912
|
isOneToOne: false;
|
|
781
913
|
referencedRelation: "devices";
|
|
782
914
|
referencedColumns: ["id"];
|
|
915
|
+
}, {
|
|
916
|
+
foreignKeyName: "sessions_post_approver_fkey";
|
|
917
|
+
columns: ["post_approver"];
|
|
918
|
+
isOneToOne: false;
|
|
919
|
+
referencedRelation: "users";
|
|
920
|
+
referencedColumns: ["id"];
|
|
783
921
|
}];
|
|
784
922
|
};
|
|
785
923
|
tags: {
|
|
786
924
|
Row: {
|
|
787
|
-
|
|
925
|
+
artifact_id: number | null;
|
|
926
|
+
class: string;
|
|
788
927
|
conf: number;
|
|
789
|
-
|
|
928
|
+
detector: string;
|
|
929
|
+
event_id: number | null;
|
|
790
930
|
height: number;
|
|
791
931
|
id: number;
|
|
792
932
|
inserted_at: string;
|
|
793
933
|
location: unknown;
|
|
794
934
|
observation_type: Database["public"]["Enums"]["tag_observation_type"];
|
|
935
|
+
origin_heading: number | null;
|
|
936
|
+
origin_height: number | null;
|
|
937
|
+
origin_location: unknown;
|
|
938
|
+
origin_pitch: number | null;
|
|
939
|
+
origin_roll: number | null;
|
|
940
|
+
sensor_pitch: number | null;
|
|
941
|
+
sensor_roll: number | null;
|
|
942
|
+
sensor_yaw: number | null;
|
|
943
|
+
subject_height: number | null;
|
|
944
|
+
subject_location: unknown;
|
|
945
|
+
timestamp_observation: string | null;
|
|
795
946
|
width: number;
|
|
796
947
|
x: number;
|
|
797
948
|
y: number;
|
|
798
949
|
};
|
|
799
950
|
Insert: {
|
|
800
|
-
|
|
951
|
+
artifact_id?: number | null;
|
|
952
|
+
class: string;
|
|
801
953
|
conf: number;
|
|
802
|
-
|
|
954
|
+
detector?: string;
|
|
955
|
+
event_id?: number | null;
|
|
803
956
|
height?: number;
|
|
804
957
|
id?: number;
|
|
805
958
|
inserted_at?: string;
|
|
806
959
|
location?: unknown;
|
|
807
960
|
observation_type: Database["public"]["Enums"]["tag_observation_type"];
|
|
961
|
+
origin_heading?: number | null;
|
|
962
|
+
origin_height?: number | null;
|
|
963
|
+
origin_location?: unknown;
|
|
964
|
+
origin_pitch?: number | null;
|
|
965
|
+
origin_roll?: number | null;
|
|
966
|
+
sensor_pitch?: number | null;
|
|
967
|
+
sensor_roll?: number | null;
|
|
968
|
+
sensor_yaw?: number | null;
|
|
969
|
+
subject_height?: number | null;
|
|
970
|
+
subject_location?: unknown;
|
|
971
|
+
timestamp_observation?: string | null;
|
|
808
972
|
width: number;
|
|
809
973
|
x: number;
|
|
810
974
|
y: number;
|
|
811
975
|
};
|
|
812
976
|
Update: {
|
|
813
|
-
|
|
977
|
+
artifact_id?: number | null;
|
|
978
|
+
class?: string;
|
|
814
979
|
conf?: number;
|
|
815
|
-
|
|
980
|
+
detector?: string;
|
|
981
|
+
event_id?: number | null;
|
|
816
982
|
height?: number;
|
|
817
983
|
id?: number;
|
|
818
984
|
inserted_at?: string;
|
|
819
985
|
location?: unknown;
|
|
820
986
|
observation_type?: Database["public"]["Enums"]["tag_observation_type"];
|
|
987
|
+
origin_heading?: number | null;
|
|
988
|
+
origin_height?: number | null;
|
|
989
|
+
origin_location?: unknown;
|
|
990
|
+
origin_pitch?: number | null;
|
|
991
|
+
origin_roll?: number | null;
|
|
992
|
+
sensor_pitch?: number | null;
|
|
993
|
+
sensor_roll?: number | null;
|
|
994
|
+
sensor_yaw?: number | null;
|
|
995
|
+
subject_height?: number | null;
|
|
996
|
+
subject_location?: unknown;
|
|
997
|
+
timestamp_observation?: string | null;
|
|
821
998
|
width?: number;
|
|
822
999
|
x?: number;
|
|
823
1000
|
y?: number;
|
|
824
1001
|
};
|
|
825
1002
|
Relationships: [{
|
|
1003
|
+
foreignKeyName: "tags_artifact_id_fkey";
|
|
1004
|
+
columns: ["artifact_id"];
|
|
1005
|
+
isOneToOne: false;
|
|
1006
|
+
referencedRelation: "artifacts";
|
|
1007
|
+
referencedColumns: ["id"];
|
|
1008
|
+
}, {
|
|
826
1009
|
foreignKeyName: "tags_event_id_fkey";
|
|
827
1010
|
columns: ["event_id"];
|
|
828
1011
|
isOneToOne: false;
|
|
@@ -1167,6 +1350,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1167
1350
|
embedding_qwen_vl_2b: string | null;
|
|
1168
1351
|
embedding_vertex_mm_01: string | null;
|
|
1169
1352
|
file_path: string;
|
|
1353
|
+
file_size_bytes: number | null;
|
|
1170
1354
|
id: number;
|
|
1171
1355
|
modality: string | null;
|
|
1172
1356
|
session_id: number | null;
|
|
@@ -1192,6 +1376,34 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1192
1376
|
embedding_qwen_vl_2b: string | null;
|
|
1193
1377
|
embedding_vertex_mm_01: string | null;
|
|
1194
1378
|
file_path: string;
|
|
1379
|
+
file_size_bytes: number | null;
|
|
1380
|
+
id: number;
|
|
1381
|
+
modality: string | null;
|
|
1382
|
+
session_id: number | null;
|
|
1383
|
+
timestamp_observation: string | null;
|
|
1384
|
+
timestamp_observation_end: string;
|
|
1385
|
+
updated_at: string | null;
|
|
1386
|
+
}[];
|
|
1387
|
+
SetofOptions: {
|
|
1388
|
+
from: "*";
|
|
1389
|
+
to: "artifacts";
|
|
1390
|
+
isOneToOne: false;
|
|
1391
|
+
isSetofReturn: true;
|
|
1392
|
+
};
|
|
1393
|
+
} | {
|
|
1394
|
+
Args: {
|
|
1395
|
+
device_ids: number[];
|
|
1396
|
+
end_timestamp?: string;
|
|
1397
|
+
limit_per_device?: number;
|
|
1398
|
+
start_timestamp?: string;
|
|
1399
|
+
};
|
|
1400
|
+
Returns: {
|
|
1401
|
+
created_at: string;
|
|
1402
|
+
device_id: number;
|
|
1403
|
+
embedding_qwen_vl_2b: string | null;
|
|
1404
|
+
embedding_vertex_mm_01: string | null;
|
|
1405
|
+
file_path: string;
|
|
1406
|
+
file_size_bytes: number | null;
|
|
1195
1407
|
id: number;
|
|
1196
1408
|
modality: string | null;
|
|
1197
1409
|
session_id: number | null;
|
|
@@ -1218,6 +1430,35 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1218
1430
|
embedding_qwen_vl_2b: string | null;
|
|
1219
1431
|
embedding_vertex_mm_01: string | null;
|
|
1220
1432
|
file_path: string;
|
|
1433
|
+
file_size_bytes: number | null;
|
|
1434
|
+
id: number;
|
|
1435
|
+
modality: string | null;
|
|
1436
|
+
session_id: number | null;
|
|
1437
|
+
timestamp_observation: string | null;
|
|
1438
|
+
timestamp_observation_end: string;
|
|
1439
|
+
updated_at: string | null;
|
|
1440
|
+
}[];
|
|
1441
|
+
SetofOptions: {
|
|
1442
|
+
from: "*";
|
|
1443
|
+
to: "artifacts";
|
|
1444
|
+
isOneToOne: false;
|
|
1445
|
+
isSetofReturn: true;
|
|
1446
|
+
};
|
|
1447
|
+
} | {
|
|
1448
|
+
Args: {
|
|
1449
|
+
end_timestamp?: string;
|
|
1450
|
+
herd_id_caller: number;
|
|
1451
|
+
limit_caller?: number;
|
|
1452
|
+
offset_caller?: number;
|
|
1453
|
+
start_timestamp?: string;
|
|
1454
|
+
};
|
|
1455
|
+
Returns: {
|
|
1456
|
+
created_at: string;
|
|
1457
|
+
device_id: number;
|
|
1458
|
+
embedding_qwen_vl_2b: string | null;
|
|
1459
|
+
embedding_vertex_mm_01: string | null;
|
|
1460
|
+
file_path: string;
|
|
1461
|
+
file_size_bytes: number | null;
|
|
1221
1462
|
id: number;
|
|
1222
1463
|
modality: string | null;
|
|
1223
1464
|
session_id: number | null;
|
|
@@ -1245,6 +1486,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1245
1486
|
embedding_qwen_vl_2b: string | null;
|
|
1246
1487
|
embedding_vertex_mm_01: string | null;
|
|
1247
1488
|
file_path: string;
|
|
1489
|
+
file_size_bytes: number | null;
|
|
1248
1490
|
id: number;
|
|
1249
1491
|
modality: string | null;
|
|
1250
1492
|
session_id: number | null;
|
|
@@ -1272,6 +1514,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1272
1514
|
embedding_qwen_vl_2b: string | null;
|
|
1273
1515
|
embedding_vertex_mm_01: string | null;
|
|
1274
1516
|
file_path: string;
|
|
1517
|
+
file_size_bytes: number | null;
|
|
1275
1518
|
id: number;
|
|
1276
1519
|
modality: string | null;
|
|
1277
1520
|
session_id: number | null;
|
|
@@ -1657,22 +1900,10 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1657
1900
|
match_threshold: number;
|
|
1658
1901
|
query_embedding: string;
|
|
1659
1902
|
};
|
|
1660
|
-
Returns:
|
|
1661
|
-
created_at: string;
|
|
1662
|
-
device_id: number;
|
|
1663
|
-
embedding_qwen_vl_2b: string | null;
|
|
1664
|
-
embedding_vertex_mm_01: string | null;
|
|
1665
|
-
file_path: string;
|
|
1666
|
-
id: number;
|
|
1667
|
-
modality: string | null;
|
|
1668
|
-
session_id: number | null;
|
|
1669
|
-
timestamp_observation: string | null;
|
|
1670
|
-
timestamp_observation_end: string;
|
|
1671
|
-
updated_at: string | null;
|
|
1672
|
-
}[];
|
|
1903
|
+
Returns: Database["public"]["CompositeTypes"]["embedding_match"][];
|
|
1673
1904
|
SetofOptions: {
|
|
1674
1905
|
from: "*";
|
|
1675
|
-
to: "
|
|
1906
|
+
to: "embedding_match";
|
|
1676
1907
|
isOneToOne: false;
|
|
1677
1908
|
isSetofReturn: true;
|
|
1678
1909
|
};
|
|
@@ -1684,27 +1915,10 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1684
1915
|
match_threshold: number;
|
|
1685
1916
|
query_embedding: string;
|
|
1686
1917
|
};
|
|
1687
|
-
Returns:
|
|
1688
|
-
altitude: number;
|
|
1689
|
-
device_id: number;
|
|
1690
|
-
earthranger_url: string | null;
|
|
1691
|
-
embedding_qwen_vl_2b: string | null;
|
|
1692
|
-
embedding_vertex_mm_01: string | null;
|
|
1693
|
-
file_path: string | null;
|
|
1694
|
-
heading: number;
|
|
1695
|
-
id: number;
|
|
1696
|
-
inserted_at: string;
|
|
1697
|
-
is_public: boolean;
|
|
1698
|
-
location: unknown;
|
|
1699
|
-
media_type: Database["public"]["Enums"]["media_type"];
|
|
1700
|
-
media_url: string | null;
|
|
1701
|
-
message: string | null;
|
|
1702
|
-
session_id: number | null;
|
|
1703
|
-
timestamp_observation: string;
|
|
1704
|
-
}[];
|
|
1918
|
+
Returns: Database["public"]["CompositeTypes"]["embedding_match"][];
|
|
1705
1919
|
SetofOptions: {
|
|
1706
1920
|
from: "*";
|
|
1707
|
-
to: "
|
|
1921
|
+
to: "embedding_match";
|
|
1708
1922
|
isOneToOne: false;
|
|
1709
1923
|
isSetofReturn: true;
|
|
1710
1924
|
};
|
|
@@ -1783,6 +1997,10 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1783
1997
|
latitude: number | null;
|
|
1784
1998
|
longitude: number | null;
|
|
1785
1999
|
};
|
|
2000
|
+
embedding_match: {
|
|
2001
|
+
id: number | null;
|
|
2002
|
+
confidence: number | null;
|
|
2003
|
+
};
|
|
1786
2004
|
event_and_tags: {
|
|
1787
2005
|
id: number | null;
|
|
1788
2006
|
inserted_at: string | null;
|
|
@@ -1897,17 +2115,30 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1897
2115
|
tags_pretty_location: {
|
|
1898
2116
|
id: number | null;
|
|
1899
2117
|
inserted_at: string | null;
|
|
1900
|
-
|
|
1901
|
-
y: number | null;
|
|
1902
|
-
width: number | null;
|
|
1903
|
-
conf: number | null;
|
|
1904
|
-
observation_type: Database["public"]["Enums"]["tag_observation_type"] | null;
|
|
2118
|
+
artifact_id: number | null;
|
|
1905
2119
|
event_id: number | null;
|
|
1906
|
-
|
|
2120
|
+
detector: string | null;
|
|
2121
|
+
width: number | null;
|
|
1907
2122
|
height: number | null;
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
2123
|
+
conf: number | null;
|
|
2124
|
+
x: number | null;
|
|
2125
|
+
y: number | null;
|
|
2126
|
+
class: string | null;
|
|
2127
|
+
timestamp_observation: string | null;
|
|
2128
|
+
origin_location: unknown;
|
|
2129
|
+
origin_pitch: number | null;
|
|
2130
|
+
origin_heading: number | null;
|
|
2131
|
+
origin_roll: number | null;
|
|
2132
|
+
sensor_pitch: number | null;
|
|
2133
|
+
sensor_yaw: number | null;
|
|
2134
|
+
sensor_roll: number | null;
|
|
2135
|
+
origin_height: number | null;
|
|
2136
|
+
subject_location: unknown;
|
|
2137
|
+
subject_height: number | null;
|
|
2138
|
+
origin_latitude: number | null;
|
|
2139
|
+
origin_longitude: number | null;
|
|
2140
|
+
subject_latitude: number | null;
|
|
2141
|
+
subject_longitude: number | null;
|
|
1911
2142
|
};
|
|
1912
2143
|
zones_and_actions_pretty_location: {
|
|
1913
2144
|
id: number | null;
|
package/dist/store/api.js
CHANGED
|
@@ -144,6 +144,30 @@ export const scoutApi = createApi({
|
|
|
144
144
|
const events = data || [];
|
|
145
145
|
const hasMore = events.length > limit;
|
|
146
146
|
const resultEvents = hasMore ? events.slice(0, limit) : events;
|
|
147
|
+
// Generate signed URLs for events
|
|
148
|
+
const uniqueFilePaths = Array.from(new Set(resultEvents
|
|
149
|
+
.map((event) => event.file_path)
|
|
150
|
+
.filter((path) => path !== null && path !== undefined)));
|
|
151
|
+
let urlMap = new Map();
|
|
152
|
+
if (uniqueFilePaths.length > 0) {
|
|
153
|
+
try {
|
|
154
|
+
const urlResults = await generateSignedUrlsBatch(uniqueFilePaths);
|
|
155
|
+
urlResults.forEach((url, index) => {
|
|
156
|
+
if (url) {
|
|
157
|
+
urlMap.set(uniqueFilePaths[index], url);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
catch (urlError) {
|
|
162
|
+
console.warn("Failed to generate signed URLs for events:", urlError);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const eventsWithUrls = resultEvents.map((event) => ({
|
|
166
|
+
...event,
|
|
167
|
+
media_url: event.file_path
|
|
168
|
+
? urlMap.get(event.file_path) || null
|
|
169
|
+
: null,
|
|
170
|
+
}));
|
|
147
171
|
const nextCursor = hasMore && resultEvents.length > 0
|
|
148
172
|
? {
|
|
149
173
|
timestamp: resultEvents[resultEvents.length - 1]
|
|
@@ -153,7 +177,7 @@ export const scoutApi = createApi({
|
|
|
153
177
|
: null;
|
|
154
178
|
return {
|
|
155
179
|
data: {
|
|
156
|
-
events:
|
|
180
|
+
events: eventsWithUrls,
|
|
157
181
|
nextCursor,
|
|
158
182
|
hasMore,
|
|
159
183
|
},
|
|
@@ -196,6 +220,30 @@ export const scoutApi = createApi({
|
|
|
196
220
|
const events = data || [];
|
|
197
221
|
const hasMore = events.length > limit;
|
|
198
222
|
const resultEvents = hasMore ? events.slice(0, limit) : events;
|
|
223
|
+
// Generate signed URLs for events
|
|
224
|
+
const uniqueFilePaths = Array.from(new Set(resultEvents
|
|
225
|
+
.map((event) => event.file_path)
|
|
226
|
+
.filter((path) => path !== null && path !== undefined)));
|
|
227
|
+
let urlMap = new Map();
|
|
228
|
+
if (uniqueFilePaths.length > 0) {
|
|
229
|
+
try {
|
|
230
|
+
const urlResults = await generateSignedUrlsBatch(uniqueFilePaths);
|
|
231
|
+
urlResults.forEach((url, index) => {
|
|
232
|
+
if (url) {
|
|
233
|
+
urlMap.set(uniqueFilePaths[index], url);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
catch (urlError) {
|
|
238
|
+
console.warn("Failed to generate signed URLs for events:", urlError);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
const eventsWithUrls = resultEvents.map((event) => ({
|
|
242
|
+
...event,
|
|
243
|
+
media_url: event.file_path
|
|
244
|
+
? urlMap.get(event.file_path) || null
|
|
245
|
+
: null,
|
|
246
|
+
}));
|
|
199
247
|
const nextCursor = hasMore && resultEvents.length > 0
|
|
200
248
|
? {
|
|
201
249
|
timestamp: resultEvents[resultEvents.length - 1]
|
|
@@ -205,7 +253,7 @@ export const scoutApi = createApi({
|
|
|
205
253
|
: null;
|
|
206
254
|
return {
|
|
207
255
|
data: {
|
|
208
|
-
events:
|
|
256
|
+
events: eventsWithUrls,
|
|
209
257
|
nextCursor,
|
|
210
258
|
hasMore,
|
|
211
259
|
},
|
package/dist/types/db.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export type ConnectivityInsert = Database["public"]["Tables"]["connectivity"]["I
|
|
|
66
66
|
export type ConnectivityUpdate = Database["public"]["Tables"]["connectivity"]["Update"];
|
|
67
67
|
export type EventInsert = Database["public"]["Tables"]["events"]["Insert"];
|
|
68
68
|
export type EventUpdate = Database["public"]["Tables"]["events"]["Update"];
|
|
69
|
+
export type TagInsert = Database["public"]["Tables"]["tags"]["Insert"];
|
|
69
70
|
export type IEventWithTags = Database["public"]["CompositeTypes"]["event_with_tags"] & {
|
|
70
71
|
earthranger_url: string | null;
|
|
71
72
|
file_path: string | null;
|