@adventurelabs/scout-core 1.4.17 → 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/types/db.d.ts +1 -0
- package/dist/types/supabase.d.ts +294 -52
- package/package.json +1 -1
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { IArtifact, IArtifactWithMediaUrl, ArtifactInsert, ArtifactUpdate } from "../types/db";
|
|
2
2
|
import { IWebResponseCompatible } from "../types/requests";
|
|
3
3
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
4
|
-
export declare function server_get_artifacts_by_herd(herd_id: number, limit?: number, offset?: number,
|
|
4
|
+
export declare function server_get_artifacts_by_herd(herd_id: number, limit?: number, offset?: number, options?: {
|
|
5
|
+
start_timestamp?: string;
|
|
6
|
+
end_timestamp?: string;
|
|
7
|
+
client?: SupabaseClient;
|
|
8
|
+
}): Promise<IWebResponseCompatible<IArtifactWithMediaUrl[]>>;
|
|
5
9
|
export declare function server_get_artifacts_by_device_id(device_id: number, limit?: number, offset?: number, client?: SupabaseClient): Promise<IWebResponseCompatible<IArtifactWithMediaUrl[]>>;
|
|
6
10
|
export declare function server_get_total_artifacts_by_herd(herd_id: number): Promise<IWebResponseCompatible<number>>;
|
|
7
|
-
export declare function server_get_artifacts_by_device_ids_batch(device_ids: number[], limit_per_device?: number,
|
|
11
|
+
export declare function server_get_artifacts_by_device_ids_batch(device_ids: number[], limit_per_device?: number, options?: {
|
|
12
|
+
start_timestamp?: string;
|
|
13
|
+
end_timestamp?: string;
|
|
14
|
+
client?: SupabaseClient;
|
|
15
|
+
}): Promise<{
|
|
8
16
|
[device_id: number]: IArtifactWithMediaUrl[];
|
|
9
17
|
}>;
|
|
10
18
|
export declare function server_insert_artifact(artifact: ArtifactInsert | ArtifactInsert[], client?: SupabaseClient): Promise<IWebResponseCompatible<IArtifact[]>>;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import { newServerClient } from "../supabase/server";
|
|
3
3
|
import { IWebResponse } from "../types/requests";
|
|
4
4
|
import { generateSignedUrlsBatch } from "./storage";
|
|
5
|
-
export async function server_get_artifacts_by_herd(herd_id, limit = 50, offset = 0,
|
|
6
|
-
const supabase = client || (await newServerClient());
|
|
5
|
+
export async function server_get_artifacts_by_herd(herd_id, limit = 50, offset = 0, options) {
|
|
6
|
+
const supabase = options?.client || (await newServerClient());
|
|
7
7
|
const { data, error } = await supabase.rpc("get_artifacts_for_herd", {
|
|
8
8
|
herd_id_caller: herd_id,
|
|
9
9
|
limit_caller: limit,
|
|
10
10
|
offset_caller: offset,
|
|
11
|
+
start_timestamp: options?.start_timestamp,
|
|
12
|
+
end_timestamp: options?.end_timestamp,
|
|
11
13
|
});
|
|
12
14
|
if (error) {
|
|
13
15
|
return IWebResponse.error(error.message).to_compatible();
|
|
@@ -22,7 +24,7 @@ export async function server_get_artifacts_by_herd(herd_id, limit = 50, offset =
|
|
|
22
24
|
if (uniqueFilePaths.length === 0) {
|
|
23
25
|
return IWebResponse.success(data).to_compatible();
|
|
24
26
|
}
|
|
25
|
-
const signedUrls = await generateSignedUrlsBatch(uniqueFilePaths, undefined, client);
|
|
27
|
+
const signedUrls = await generateSignedUrlsBatch(uniqueFilePaths, undefined, options?.client);
|
|
26
28
|
const urlMap = new Map();
|
|
27
29
|
uniqueFilePaths.forEach((path, index) => {
|
|
28
30
|
urlMap.set(path, signedUrls[index]);
|
|
@@ -78,14 +80,16 @@ export async function server_get_total_artifacts_by_herd(herd_id) {
|
|
|
78
80
|
}
|
|
79
81
|
return IWebResponse.success(data || 0).to_compatible();
|
|
80
82
|
}
|
|
81
|
-
export async function server_get_artifacts_by_device_ids_batch(device_ids, limit_per_device = 10,
|
|
82
|
-
const supabase = client || (await newServerClient());
|
|
83
|
+
export async function server_get_artifacts_by_device_ids_batch(device_ids, limit_per_device = 10, options) {
|
|
84
|
+
const supabase = options?.client || (await newServerClient());
|
|
83
85
|
if (device_ids.length === 0) {
|
|
84
86
|
return {};
|
|
85
87
|
}
|
|
86
88
|
const { data, error } = await supabase.rpc("get_artifacts_for_devices_batch", {
|
|
87
89
|
device_ids: device_ids,
|
|
88
90
|
limit_per_device: limit_per_device,
|
|
91
|
+
start_timestamp: options?.start_timestamp,
|
|
92
|
+
end_timestamp: options?.end_timestamp,
|
|
89
93
|
});
|
|
90
94
|
if (error || !data) {
|
|
91
95
|
console.warn("Error fetching artifacts batch:", error?.message);
|
|
@@ -97,7 +101,7 @@ export async function server_get_artifacts_by_device_ids_batch(device_ids, limit
|
|
|
97
101
|
.filter((path) => !!path)));
|
|
98
102
|
let artifactsWithUrls = data;
|
|
99
103
|
if (uniqueFilePaths.length > 0) {
|
|
100
|
-
const signedUrls = await generateSignedUrlsBatch(uniqueFilePaths, undefined, client);
|
|
104
|
+
const signedUrls = await generateSignedUrlsBatch(uniqueFilePaths, undefined, options?.client);
|
|
101
105
|
const urlMap = new Map();
|
|
102
106
|
uniqueFilePaths.forEach((path, index) => {
|
|
103
107
|
urlMap.set(path, signedUrls[index]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoundingBox, EnumSourceBoundingBox } from "../types/bounding_boxes";
|
|
2
|
-
import { Tag } from "../types/db";
|
|
3
|
-
export declare function convertManualBoundingBoxToTag(boundingBox: BoundingBox, event_id: number):
|
|
2
|
+
import { Tag, TagInsert } from "../types/db";
|
|
3
|
+
export declare function convertManualBoundingBoxToTag(boundingBox: BoundingBox, event_id: number): TagInsert;
|
|
4
4
|
export declare function convertTagToBoundingBox(tag: Tag, source: EnumSourceBoundingBox): BoundingBox;
|
|
5
5
|
export declare function formatBoundingBoxLabel(label: string): string;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { SelectionStatus, } from "../types/bounding_boxes";
|
|
2
2
|
export function convertManualBoundingBoxToTag(boundingBox, event_id) {
|
|
3
3
|
const newClassName = boundingBox.label;
|
|
4
|
-
// try to convert if nan, make it 0
|
|
5
4
|
let newId = Number(boundingBox.id);
|
|
6
5
|
if (isNaN(newId)) {
|
|
7
6
|
newId = 0;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
return {
|
|
10
9
|
id: newId,
|
|
11
10
|
x: boundingBox.xCenterPercentage,
|
|
12
11
|
y: boundingBox.yCenterPercentage,
|
|
@@ -15,11 +14,10 @@ export function convertManualBoundingBoxToTag(boundingBox, event_id) {
|
|
|
15
14
|
inserted_at: new Date().toISOString(),
|
|
16
15
|
conf: 1,
|
|
17
16
|
observation_type: "manual",
|
|
18
|
-
|
|
17
|
+
class: newClassName,
|
|
19
18
|
event_id: event_id,
|
|
20
19
|
location: null,
|
|
21
20
|
};
|
|
22
|
-
return newTag;
|
|
23
21
|
}
|
|
24
22
|
export function convertTagToBoundingBox(tag, source) {
|
|
25
23
|
const newBoundingBox = {
|
|
@@ -27,7 +25,7 @@ export function convertTagToBoundingBox(tag, source) {
|
|
|
27
25
|
yCenterPercentage: tag.y,
|
|
28
26
|
widthPercentage: tag.width,
|
|
29
27
|
heightPercentage: tag.height,
|
|
30
|
-
label: tag.
|
|
28
|
+
label: tag.class,
|
|
31
29
|
id: tag.id ? tag.id.toString() : "0",
|
|
32
30
|
left: 0,
|
|
33
31
|
top: 0,
|
package/dist/helpers/tags.js
CHANGED
|
@@ -125,7 +125,7 @@ export async function server_update_tags(tags) {
|
|
|
125
125
|
y: updateData.y,
|
|
126
126
|
width: updateData.width,
|
|
127
127
|
height: updateData.height,
|
|
128
|
-
|
|
128
|
+
class: updateData.class,
|
|
129
129
|
conf: updateData.conf,
|
|
130
130
|
observation_type: updateData.observation_type,
|
|
131
131
|
})
|
|
@@ -402,21 +402,39 @@ export async function get_event_and_tags_by_event_id(event_id) {
|
|
|
402
402
|
timestamp_observation: data[0].timestamp_observation,
|
|
403
403
|
is_public: data[0].is_public,
|
|
404
404
|
herd_id: deviceData.herd_id,
|
|
405
|
-
tags: (data[0].tags || []).map((tag) =>
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
405
|
+
tags: (data[0].tags || []).map((tag) => {
|
|
406
|
+
const loc = tag.location;
|
|
407
|
+
const lat = loc ? extractLatitude(loc) : null;
|
|
408
|
+
const lon = loc ? extractLongitude(loc) : null;
|
|
409
|
+
return {
|
|
410
|
+
id: tag.id,
|
|
411
|
+
inserted_at: tag.inserted_at,
|
|
412
|
+
artifact_id: tag.artifact_id,
|
|
413
|
+
event_id: tag.event_id,
|
|
414
|
+
detector: tag.detector,
|
|
415
|
+
width: tag.width,
|
|
416
|
+
height: tag.height,
|
|
417
|
+
conf: tag.conf,
|
|
418
|
+
x: tag.x,
|
|
419
|
+
y: tag.y,
|
|
420
|
+
class: tag.class,
|
|
421
|
+
timestamp_observation: tag.timestamp_observation,
|
|
422
|
+
origin_location: tag.origin_location ?? null,
|
|
423
|
+
origin_pitch: tag.origin_pitch,
|
|
424
|
+
origin_heading: tag.origin_heading,
|
|
425
|
+
origin_roll: tag.origin_roll,
|
|
426
|
+
sensor_pitch: tag.sensor_pitch,
|
|
427
|
+
sensor_yaw: tag.sensor_yaw,
|
|
428
|
+
sensor_roll: tag.sensor_roll,
|
|
429
|
+
origin_height: tag.origin_height,
|
|
430
|
+
subject_location: tag.subject_location ?? null,
|
|
431
|
+
subject_height: tag.subject_height,
|
|
432
|
+
origin_latitude: lat,
|
|
433
|
+
origin_longitude: lon,
|
|
434
|
+
subject_latitude: null,
|
|
435
|
+
subject_longitude: null,
|
|
436
|
+
};
|
|
437
|
+
}),
|
|
420
438
|
earthranger_url: data[0].earthranger_url,
|
|
421
439
|
file_path: data[0].file_path,
|
|
422
440
|
};
|
|
@@ -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/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;
|
package/dist/types/supabase.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export type Database = {
|
|
|
53
53
|
embedding_qwen_vl_2b: string | null;
|
|
54
54
|
embedding_vertex_mm_01: string | null;
|
|
55
55
|
file_path: string;
|
|
56
|
+
file_size_bytes: number | null;
|
|
56
57
|
id: number;
|
|
57
58
|
modality: string | null;
|
|
58
59
|
session_id: number | null;
|
|
@@ -66,6 +67,7 @@ export type Database = {
|
|
|
66
67
|
embedding_qwen_vl_2b?: string | null;
|
|
67
68
|
embedding_vertex_mm_01?: string | null;
|
|
68
69
|
file_path: string;
|
|
70
|
+
file_size_bytes?: number | null;
|
|
69
71
|
id?: number;
|
|
70
72
|
modality?: string | null;
|
|
71
73
|
session_id?: number | null;
|
|
@@ -79,6 +81,7 @@ export type Database = {
|
|
|
79
81
|
embedding_qwen_vl_2b?: string | null;
|
|
80
82
|
embedding_vertex_mm_01?: string | null;
|
|
81
83
|
file_path?: string;
|
|
84
|
+
file_size_bytes?: number | null;
|
|
82
85
|
id?: number;
|
|
83
86
|
modality?: string | null;
|
|
84
87
|
session_id?: number | null;
|
|
@@ -109,6 +112,7 @@ export type Database = {
|
|
|
109
112
|
expiration: string | null;
|
|
110
113
|
id: number;
|
|
111
114
|
issuer: string;
|
|
115
|
+
part_id: number | null;
|
|
112
116
|
tracking_number: string | null;
|
|
113
117
|
type: string;
|
|
114
118
|
updated_at: string | null;
|
|
@@ -118,6 +122,7 @@ export type Database = {
|
|
|
118
122
|
expiration?: string | null;
|
|
119
123
|
id?: number;
|
|
120
124
|
issuer: string;
|
|
125
|
+
part_id?: number | null;
|
|
121
126
|
tracking_number?: string | null;
|
|
122
127
|
type: string;
|
|
123
128
|
updated_at?: string | null;
|
|
@@ -127,11 +132,20 @@ export type Database = {
|
|
|
127
132
|
expiration?: string | null;
|
|
128
133
|
id?: number;
|
|
129
134
|
issuer?: string;
|
|
135
|
+
part_id?: number | null;
|
|
130
136
|
tracking_number?: string | null;
|
|
131
137
|
type?: string;
|
|
132
138
|
updated_at?: string | null;
|
|
133
139
|
};
|
|
134
|
-
Relationships: [
|
|
140
|
+
Relationships: [
|
|
141
|
+
{
|
|
142
|
+
foreignKeyName: "certificates_part_id_fkey";
|
|
143
|
+
columns: ["part_id"];
|
|
144
|
+
isOneToOne: false;
|
|
145
|
+
referencedRelation: "parts";
|
|
146
|
+
referencedColumns: ["id"];
|
|
147
|
+
}
|
|
148
|
+
];
|
|
135
149
|
};
|
|
136
150
|
chat: {
|
|
137
151
|
Row: {
|
|
@@ -253,6 +267,47 @@ export type Database = {
|
|
|
253
267
|
}
|
|
254
268
|
];
|
|
255
269
|
};
|
|
270
|
+
credentials: {
|
|
271
|
+
Row: {
|
|
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
|
+
Insert: {
|
|
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
|
+
Update: {
|
|
292
|
+
created_at?: string;
|
|
293
|
+
expiration?: string | null;
|
|
294
|
+
id?: number;
|
|
295
|
+
issuer?: string;
|
|
296
|
+
tracking_number?: string | null;
|
|
297
|
+
type?: string;
|
|
298
|
+
updated_at?: string | null;
|
|
299
|
+
user_id?: string;
|
|
300
|
+
};
|
|
301
|
+
Relationships: [
|
|
302
|
+
{
|
|
303
|
+
foreignKeyName: "credentials_user_id_fkey";
|
|
304
|
+
columns: ["user_id"];
|
|
305
|
+
isOneToOne: false;
|
|
306
|
+
referencedRelation: "users";
|
|
307
|
+
referencedColumns: ["id"];
|
|
308
|
+
}
|
|
309
|
+
];
|
|
310
|
+
};
|
|
256
311
|
devices: {
|
|
257
312
|
Row: {
|
|
258
313
|
altitude: number | null;
|
|
@@ -540,6 +595,82 @@ export type Database = {
|
|
|
540
595
|
}
|
|
541
596
|
];
|
|
542
597
|
};
|
|
598
|
+
maintenance: {
|
|
599
|
+
Row: {
|
|
600
|
+
created_at: string;
|
|
601
|
+
description: string | null;
|
|
602
|
+
id: number;
|
|
603
|
+
part_id: number;
|
|
604
|
+
timestamp_completion: string;
|
|
605
|
+
type: string | null;
|
|
606
|
+
updated_at: string | null;
|
|
607
|
+
};
|
|
608
|
+
Insert: {
|
|
609
|
+
created_at?: string;
|
|
610
|
+
description?: string | null;
|
|
611
|
+
id?: number;
|
|
612
|
+
part_id: number;
|
|
613
|
+
timestamp_completion: string;
|
|
614
|
+
type?: string | null;
|
|
615
|
+
updated_at?: string | null;
|
|
616
|
+
};
|
|
617
|
+
Update: {
|
|
618
|
+
created_at?: string;
|
|
619
|
+
description?: string | null;
|
|
620
|
+
id?: number;
|
|
621
|
+
part_id?: number;
|
|
622
|
+
timestamp_completion?: string;
|
|
623
|
+
type?: string | null;
|
|
624
|
+
updated_at?: string | null;
|
|
625
|
+
};
|
|
626
|
+
Relationships: [
|
|
627
|
+
{
|
|
628
|
+
foreignKeyName: "maintenance_part_id_fkey";
|
|
629
|
+
columns: ["part_id"];
|
|
630
|
+
isOneToOne: false;
|
|
631
|
+
referencedRelation: "parts";
|
|
632
|
+
referencedColumns: ["id"];
|
|
633
|
+
}
|
|
634
|
+
];
|
|
635
|
+
};
|
|
636
|
+
observations: {
|
|
637
|
+
Row: {
|
|
638
|
+
action_complete: boolean;
|
|
639
|
+
action_required: string | null;
|
|
640
|
+
description: string;
|
|
641
|
+
id: number;
|
|
642
|
+
inserted_at: string;
|
|
643
|
+
session_id: number;
|
|
644
|
+
updated_at: string | null;
|
|
645
|
+
};
|
|
646
|
+
Insert: {
|
|
647
|
+
action_complete?: boolean;
|
|
648
|
+
action_required?: string | null;
|
|
649
|
+
description: string;
|
|
650
|
+
id?: number;
|
|
651
|
+
inserted_at?: string;
|
|
652
|
+
session_id: number;
|
|
653
|
+
updated_at?: string | null;
|
|
654
|
+
};
|
|
655
|
+
Update: {
|
|
656
|
+
action_complete?: boolean;
|
|
657
|
+
action_required?: string | null;
|
|
658
|
+
description?: string;
|
|
659
|
+
id?: number;
|
|
660
|
+
inserted_at?: string;
|
|
661
|
+
session_id?: number;
|
|
662
|
+
updated_at?: string | null;
|
|
663
|
+
};
|
|
664
|
+
Relationships: [
|
|
665
|
+
{
|
|
666
|
+
foreignKeyName: "observations_session_id_fkey";
|
|
667
|
+
columns: ["session_id"];
|
|
668
|
+
isOneToOne: false;
|
|
669
|
+
referencedRelation: "sessions";
|
|
670
|
+
referencedColumns: ["id"];
|
|
671
|
+
}
|
|
672
|
+
];
|
|
673
|
+
};
|
|
543
674
|
operators: {
|
|
544
675
|
Row: {
|
|
545
676
|
action: string | null;
|
|
@@ -759,13 +890,14 @@ export type Database = {
|
|
|
759
890
|
altitude_average: number;
|
|
760
891
|
altitude_max: number;
|
|
761
892
|
altitude_min: number;
|
|
893
|
+
battery_id: number | null;
|
|
762
894
|
device_id: number;
|
|
763
895
|
distance_max_from_start: number;
|
|
764
896
|
distance_total: number;
|
|
765
|
-
earthranger_url: string | null;
|
|
766
897
|
id: number;
|
|
767
898
|
inserted_at: string;
|
|
768
899
|
locations: unknown;
|
|
900
|
+
post_approver: string | null;
|
|
769
901
|
software_version: string;
|
|
770
902
|
timestamp_end: string | null;
|
|
771
903
|
timestamp_start: string;
|
|
@@ -777,13 +909,14 @@ export type Database = {
|
|
|
777
909
|
altitude_average: number;
|
|
778
910
|
altitude_max: number;
|
|
779
911
|
altitude_min: number;
|
|
912
|
+
battery_id?: number | null;
|
|
780
913
|
device_id: number;
|
|
781
914
|
distance_max_from_start: number;
|
|
782
915
|
distance_total: number;
|
|
783
|
-
earthranger_url?: string | null;
|
|
784
916
|
id?: number;
|
|
785
917
|
inserted_at?: string;
|
|
786
918
|
locations?: unknown;
|
|
919
|
+
post_approver?: string | null;
|
|
787
920
|
software_version: string;
|
|
788
921
|
timestamp_end?: string | null;
|
|
789
922
|
timestamp_start: string;
|
|
@@ -795,13 +928,14 @@ export type Database = {
|
|
|
795
928
|
altitude_average?: number;
|
|
796
929
|
altitude_max?: number;
|
|
797
930
|
altitude_min?: number;
|
|
931
|
+
battery_id?: number | null;
|
|
798
932
|
device_id?: number;
|
|
799
933
|
distance_max_from_start?: number;
|
|
800
934
|
distance_total?: number;
|
|
801
|
-
earthranger_url?: string | null;
|
|
802
935
|
id?: number;
|
|
803
936
|
inserted_at?: string;
|
|
804
937
|
locations?: unknown;
|
|
938
|
+
post_approver?: string | null;
|
|
805
939
|
software_version?: string;
|
|
806
940
|
timestamp_end?: string | null;
|
|
807
941
|
timestamp_start?: string;
|
|
@@ -810,56 +944,116 @@ export type Database = {
|
|
|
810
944
|
velocity_min?: number;
|
|
811
945
|
};
|
|
812
946
|
Relationships: [
|
|
947
|
+
{
|
|
948
|
+
foreignKeyName: "sessions_battery_id_fkey";
|
|
949
|
+
columns: ["battery_id"];
|
|
950
|
+
isOneToOne: false;
|
|
951
|
+
referencedRelation: "parts";
|
|
952
|
+
referencedColumns: ["id"];
|
|
953
|
+
},
|
|
813
954
|
{
|
|
814
955
|
foreignKeyName: "sessions_device_id_fkey";
|
|
815
956
|
columns: ["device_id"];
|
|
816
957
|
isOneToOne: false;
|
|
817
958
|
referencedRelation: "devices";
|
|
818
959
|
referencedColumns: ["id"];
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
foreignKeyName: "sessions_post_approver_fkey";
|
|
963
|
+
columns: ["post_approver"];
|
|
964
|
+
isOneToOne: false;
|
|
965
|
+
referencedRelation: "users";
|
|
966
|
+
referencedColumns: ["id"];
|
|
819
967
|
}
|
|
820
968
|
];
|
|
821
969
|
};
|
|
822
970
|
tags: {
|
|
823
971
|
Row: {
|
|
824
|
-
|
|
972
|
+
artifact_id: number | null;
|
|
973
|
+
class: string;
|
|
825
974
|
conf: number;
|
|
826
|
-
|
|
975
|
+
detector: string;
|
|
976
|
+
event_id: number | null;
|
|
827
977
|
height: number;
|
|
828
978
|
id: number;
|
|
829
979
|
inserted_at: string;
|
|
830
980
|
location: unknown;
|
|
831
981
|
observation_type: Database["public"]["Enums"]["tag_observation_type"];
|
|
982
|
+
origin_heading: number | null;
|
|
983
|
+
origin_height: number | null;
|
|
984
|
+
origin_location: unknown;
|
|
985
|
+
origin_pitch: number | null;
|
|
986
|
+
origin_roll: number | null;
|
|
987
|
+
sensor_pitch: number | null;
|
|
988
|
+
sensor_roll: number | null;
|
|
989
|
+
sensor_yaw: number | null;
|
|
990
|
+
subject_height: number | null;
|
|
991
|
+
subject_location: unknown;
|
|
992
|
+
timestamp_observation: string | null;
|
|
832
993
|
width: number;
|
|
833
994
|
x: number;
|
|
834
995
|
y: number;
|
|
835
996
|
};
|
|
836
997
|
Insert: {
|
|
837
|
-
|
|
998
|
+
artifact_id?: number | null;
|
|
999
|
+
class: string;
|
|
838
1000
|
conf: number;
|
|
839
|
-
|
|
1001
|
+
detector?: string;
|
|
1002
|
+
event_id?: number | null;
|
|
840
1003
|
height?: number;
|
|
841
1004
|
id?: number;
|
|
842
1005
|
inserted_at?: string;
|
|
843
1006
|
location?: unknown;
|
|
844
1007
|
observation_type: Database["public"]["Enums"]["tag_observation_type"];
|
|
1008
|
+
origin_heading?: number | null;
|
|
1009
|
+
origin_height?: number | null;
|
|
1010
|
+
origin_location?: unknown;
|
|
1011
|
+
origin_pitch?: number | null;
|
|
1012
|
+
origin_roll?: number | null;
|
|
1013
|
+
sensor_pitch?: number | null;
|
|
1014
|
+
sensor_roll?: number | null;
|
|
1015
|
+
sensor_yaw?: number | null;
|
|
1016
|
+
subject_height?: number | null;
|
|
1017
|
+
subject_location?: unknown;
|
|
1018
|
+
timestamp_observation?: string | null;
|
|
845
1019
|
width: number;
|
|
846
1020
|
x: number;
|
|
847
1021
|
y: number;
|
|
848
1022
|
};
|
|
849
1023
|
Update: {
|
|
850
|
-
|
|
1024
|
+
artifact_id?: number | null;
|
|
1025
|
+
class?: string;
|
|
851
1026
|
conf?: number;
|
|
852
|
-
|
|
1027
|
+
detector?: string;
|
|
1028
|
+
event_id?: number | null;
|
|
853
1029
|
height?: number;
|
|
854
1030
|
id?: number;
|
|
855
1031
|
inserted_at?: string;
|
|
856
1032
|
location?: unknown;
|
|
857
1033
|
observation_type?: Database["public"]["Enums"]["tag_observation_type"];
|
|
1034
|
+
origin_heading?: number | null;
|
|
1035
|
+
origin_height?: number | null;
|
|
1036
|
+
origin_location?: unknown;
|
|
1037
|
+
origin_pitch?: number | null;
|
|
1038
|
+
origin_roll?: number | null;
|
|
1039
|
+
sensor_pitch?: number | null;
|
|
1040
|
+
sensor_roll?: number | null;
|
|
1041
|
+
sensor_yaw?: number | null;
|
|
1042
|
+
subject_height?: number | null;
|
|
1043
|
+
subject_location?: unknown;
|
|
1044
|
+
timestamp_observation?: string | null;
|
|
858
1045
|
width?: number;
|
|
859
1046
|
x?: number;
|
|
860
1047
|
y?: number;
|
|
861
1048
|
};
|
|
862
1049
|
Relationships: [
|
|
1050
|
+
{
|
|
1051
|
+
foreignKeyName: "tags_artifact_id_fkey";
|
|
1052
|
+
columns: ["artifact_id"];
|
|
1053
|
+
isOneToOne: false;
|
|
1054
|
+
referencedRelation: "artifacts";
|
|
1055
|
+
referencedColumns: ["id"];
|
|
1056
|
+
},
|
|
863
1057
|
{
|
|
864
1058
|
foreignKeyName: "tags_event_id_fkey";
|
|
865
1059
|
columns: ["event_id"];
|
|
@@ -1223,6 +1417,7 @@ export type Database = {
|
|
|
1223
1417
|
embedding_qwen_vl_2b: string | null;
|
|
1224
1418
|
embedding_vertex_mm_01: string | null;
|
|
1225
1419
|
file_path: string;
|
|
1420
|
+
file_size_bytes: number | null;
|
|
1226
1421
|
id: number;
|
|
1227
1422
|
modality: string | null;
|
|
1228
1423
|
session_id: number | null;
|
|
@@ -1248,6 +1443,34 @@ export type Database = {
|
|
|
1248
1443
|
embedding_qwen_vl_2b: string | null;
|
|
1249
1444
|
embedding_vertex_mm_01: string | null;
|
|
1250
1445
|
file_path: string;
|
|
1446
|
+
file_size_bytes: number | null;
|
|
1447
|
+
id: number;
|
|
1448
|
+
modality: string | null;
|
|
1449
|
+
session_id: number | null;
|
|
1450
|
+
timestamp_observation: string | null;
|
|
1451
|
+
timestamp_observation_end: string;
|
|
1452
|
+
updated_at: string | null;
|
|
1453
|
+
}[];
|
|
1454
|
+
SetofOptions: {
|
|
1455
|
+
from: "*";
|
|
1456
|
+
to: "artifacts";
|
|
1457
|
+
isOneToOne: false;
|
|
1458
|
+
isSetofReturn: true;
|
|
1459
|
+
};
|
|
1460
|
+
} | {
|
|
1461
|
+
Args: {
|
|
1462
|
+
device_ids: number[];
|
|
1463
|
+
end_timestamp?: string;
|
|
1464
|
+
limit_per_device?: number;
|
|
1465
|
+
start_timestamp?: string;
|
|
1466
|
+
};
|
|
1467
|
+
Returns: {
|
|
1468
|
+
created_at: string;
|
|
1469
|
+
device_id: number;
|
|
1470
|
+
embedding_qwen_vl_2b: string | null;
|
|
1471
|
+
embedding_vertex_mm_01: string | null;
|
|
1472
|
+
file_path: string;
|
|
1473
|
+
file_size_bytes: number | null;
|
|
1251
1474
|
id: number;
|
|
1252
1475
|
modality: string | null;
|
|
1253
1476
|
session_id: number | null;
|
|
@@ -1274,6 +1497,35 @@ export type Database = {
|
|
|
1274
1497
|
embedding_qwen_vl_2b: string | null;
|
|
1275
1498
|
embedding_vertex_mm_01: string | null;
|
|
1276
1499
|
file_path: string;
|
|
1500
|
+
file_size_bytes: number | null;
|
|
1501
|
+
id: number;
|
|
1502
|
+
modality: string | null;
|
|
1503
|
+
session_id: number | null;
|
|
1504
|
+
timestamp_observation: string | null;
|
|
1505
|
+
timestamp_observation_end: string;
|
|
1506
|
+
updated_at: string | null;
|
|
1507
|
+
}[];
|
|
1508
|
+
SetofOptions: {
|
|
1509
|
+
from: "*";
|
|
1510
|
+
to: "artifacts";
|
|
1511
|
+
isOneToOne: false;
|
|
1512
|
+
isSetofReturn: true;
|
|
1513
|
+
};
|
|
1514
|
+
} | {
|
|
1515
|
+
Args: {
|
|
1516
|
+
end_timestamp?: string;
|
|
1517
|
+
herd_id_caller: number;
|
|
1518
|
+
limit_caller?: number;
|
|
1519
|
+
offset_caller?: number;
|
|
1520
|
+
start_timestamp?: string;
|
|
1521
|
+
};
|
|
1522
|
+
Returns: {
|
|
1523
|
+
created_at: string;
|
|
1524
|
+
device_id: number;
|
|
1525
|
+
embedding_qwen_vl_2b: string | null;
|
|
1526
|
+
embedding_vertex_mm_01: string | null;
|
|
1527
|
+
file_path: string;
|
|
1528
|
+
file_size_bytes: number | null;
|
|
1277
1529
|
id: number;
|
|
1278
1530
|
modality: string | null;
|
|
1279
1531
|
session_id: number | null;
|
|
@@ -1301,6 +1553,7 @@ export type Database = {
|
|
|
1301
1553
|
embedding_qwen_vl_2b: string | null;
|
|
1302
1554
|
embedding_vertex_mm_01: string | null;
|
|
1303
1555
|
file_path: string;
|
|
1556
|
+
file_size_bytes: number | null;
|
|
1304
1557
|
id: number;
|
|
1305
1558
|
modality: string | null;
|
|
1306
1559
|
session_id: number | null;
|
|
@@ -1328,6 +1581,7 @@ export type Database = {
|
|
|
1328
1581
|
embedding_qwen_vl_2b: string | null;
|
|
1329
1582
|
embedding_vertex_mm_01: string | null;
|
|
1330
1583
|
file_path: string;
|
|
1584
|
+
file_size_bytes: number | null;
|
|
1331
1585
|
id: number;
|
|
1332
1586
|
modality: string | null;
|
|
1333
1587
|
session_id: number | null;
|
|
@@ -1713,22 +1967,10 @@ export type Database = {
|
|
|
1713
1967
|
match_threshold: number;
|
|
1714
1968
|
query_embedding: string;
|
|
1715
1969
|
};
|
|
1716
|
-
Returns:
|
|
1717
|
-
created_at: string;
|
|
1718
|
-
device_id: number;
|
|
1719
|
-
embedding_qwen_vl_2b: string | null;
|
|
1720
|
-
embedding_vertex_mm_01: string | null;
|
|
1721
|
-
file_path: string;
|
|
1722
|
-
id: number;
|
|
1723
|
-
modality: string | null;
|
|
1724
|
-
session_id: number | null;
|
|
1725
|
-
timestamp_observation: string | null;
|
|
1726
|
-
timestamp_observation_end: string;
|
|
1727
|
-
updated_at: string | null;
|
|
1728
|
-
}[];
|
|
1970
|
+
Returns: Database["public"]["CompositeTypes"]["embedding_match"][];
|
|
1729
1971
|
SetofOptions: {
|
|
1730
1972
|
from: "*";
|
|
1731
|
-
to: "
|
|
1973
|
+
to: "embedding_match";
|
|
1732
1974
|
isOneToOne: false;
|
|
1733
1975
|
isSetofReturn: true;
|
|
1734
1976
|
};
|
|
@@ -1740,27 +1982,10 @@ export type Database = {
|
|
|
1740
1982
|
match_threshold: number;
|
|
1741
1983
|
query_embedding: string;
|
|
1742
1984
|
};
|
|
1743
|
-
Returns:
|
|
1744
|
-
altitude: number;
|
|
1745
|
-
device_id: number;
|
|
1746
|
-
earthranger_url: string | null;
|
|
1747
|
-
embedding_qwen_vl_2b: string | null;
|
|
1748
|
-
embedding_vertex_mm_01: string | null;
|
|
1749
|
-
file_path: string | null;
|
|
1750
|
-
heading: number;
|
|
1751
|
-
id: number;
|
|
1752
|
-
inserted_at: string;
|
|
1753
|
-
is_public: boolean;
|
|
1754
|
-
location: unknown;
|
|
1755
|
-
media_type: Database["public"]["Enums"]["media_type"];
|
|
1756
|
-
media_url: string | null;
|
|
1757
|
-
message: string | null;
|
|
1758
|
-
session_id: number | null;
|
|
1759
|
-
timestamp_observation: string;
|
|
1760
|
-
}[];
|
|
1985
|
+
Returns: Database["public"]["CompositeTypes"]["embedding_match"][];
|
|
1761
1986
|
SetofOptions: {
|
|
1762
1987
|
from: "*";
|
|
1763
|
-
to: "
|
|
1988
|
+
to: "embedding_match";
|
|
1764
1989
|
isOneToOne: false;
|
|
1765
1990
|
isSetofReturn: true;
|
|
1766
1991
|
};
|
|
@@ -1839,6 +2064,10 @@ export type Database = {
|
|
|
1839
2064
|
latitude: number | null;
|
|
1840
2065
|
longitude: number | null;
|
|
1841
2066
|
};
|
|
2067
|
+
embedding_match: {
|
|
2068
|
+
id: number | null;
|
|
2069
|
+
confidence: number | null;
|
|
2070
|
+
};
|
|
1842
2071
|
event_and_tags: {
|
|
1843
2072
|
id: number | null;
|
|
1844
2073
|
inserted_at: string | null;
|
|
@@ -1953,17 +2182,30 @@ export type Database = {
|
|
|
1953
2182
|
tags_pretty_location: {
|
|
1954
2183
|
id: number | null;
|
|
1955
2184
|
inserted_at: string | null;
|
|
1956
|
-
|
|
1957
|
-
y: number | null;
|
|
1958
|
-
width: number | null;
|
|
1959
|
-
conf: number | null;
|
|
1960
|
-
observation_type: Database["public"]["Enums"]["tag_observation_type"] | null;
|
|
2185
|
+
artifact_id: number | null;
|
|
1961
2186
|
event_id: number | null;
|
|
1962
|
-
|
|
2187
|
+
detector: string | null;
|
|
2188
|
+
width: number | null;
|
|
1963
2189
|
height: number | null;
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
2190
|
+
conf: number | null;
|
|
2191
|
+
x: number | null;
|
|
2192
|
+
y: number | null;
|
|
2193
|
+
class: string | null;
|
|
2194
|
+
timestamp_observation: string | null;
|
|
2195
|
+
origin_location: unknown;
|
|
2196
|
+
origin_pitch: number | null;
|
|
2197
|
+
origin_heading: number | null;
|
|
2198
|
+
origin_roll: number | null;
|
|
2199
|
+
sensor_pitch: number | null;
|
|
2200
|
+
sensor_yaw: number | null;
|
|
2201
|
+
sensor_roll: number | null;
|
|
2202
|
+
origin_height: number | null;
|
|
2203
|
+
subject_location: unknown;
|
|
2204
|
+
subject_height: number | null;
|
|
2205
|
+
origin_latitude: number | null;
|
|
2206
|
+
origin_longitude: number | null;
|
|
2207
|
+
subject_latitude: number | null;
|
|
2208
|
+
subject_longitude: number | null;
|
|
1967
2209
|
};
|
|
1968
2210
|
zones_and_actions_pretty_location: {
|
|
1969
2211
|
id: number | null;
|