@adventurelabs/scout-core 1.4.68 → 1.4.70
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/herd_allowed_domains.d.ts +5 -0
- package/dist/helpers/herd_allowed_domains.js +15 -0
- package/dist/helpers/herds.d.ts +4 -1
- package/dist/helpers/herds.js +1 -5
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.js +3 -0
- package/dist/helpers/invitations.d.ts +8 -0
- package/dist/helpers/invitations.js +47 -0
- package/dist/helpers/lifecycle.d.ts +14 -0
- package/dist/helpers/lifecycle.js +74 -0
- package/dist/helpers/parts.d.ts +19 -13
- package/dist/helpers/parts.js +51 -47
- package/dist/helpers/pubsub_token.d.ts +5 -0
- package/dist/helpers/pubsub_token.js +14 -0
- package/dist/helpers/pubsub_token_server.d.ts +7 -0
- package/dist/helpers/pubsub_token_server.js +7 -0
- package/dist/helpers/users.d.ts +4 -1
- package/dist/helpers/users.js +15 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +5 -0
- package/dist/providers/ScoutRefreshProvider.d.ts +351 -26
- package/dist/types/db.d.ts +5 -0
- package/dist/types/pubsub_token.d.ts +7 -0
- package/dist/types/pubsub_token.js +1 -0
- package/dist/types/supabase.d.ts +366 -30
- package/dist/types/supabase.js +3 -2
- package/package.json +1 -1
package/dist/types/supabase.d.ts
CHANGED
|
@@ -174,6 +174,10 @@ export type Database = {
|
|
|
174
174
|
file_path: string;
|
|
175
175
|
file_size_bytes: number | null;
|
|
176
176
|
id: number;
|
|
177
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
178
|
+
lifecycle_changed_at: string;
|
|
179
|
+
lifecycle_changed_by: string | null;
|
|
180
|
+
lifecycle_reason: string | null;
|
|
177
181
|
modality: string | null;
|
|
178
182
|
segmented_at: string | null;
|
|
179
183
|
session_id: number | null;
|
|
@@ -190,6 +194,10 @@ export type Database = {
|
|
|
190
194
|
file_path: string;
|
|
191
195
|
file_size_bytes?: number | null;
|
|
192
196
|
id?: number;
|
|
197
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
198
|
+
lifecycle_changed_at?: string;
|
|
199
|
+
lifecycle_changed_by?: string | null;
|
|
200
|
+
lifecycle_reason?: string | null;
|
|
193
201
|
modality?: string | null;
|
|
194
202
|
segmented_at?: string | null;
|
|
195
203
|
session_id?: number | null;
|
|
@@ -206,6 +214,10 @@ export type Database = {
|
|
|
206
214
|
file_path?: string;
|
|
207
215
|
file_size_bytes?: number | null;
|
|
208
216
|
id?: number;
|
|
217
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
218
|
+
lifecycle_changed_at?: string;
|
|
219
|
+
lifecycle_changed_by?: string | null;
|
|
220
|
+
lifecycle_reason?: string | null;
|
|
209
221
|
modality?: string | null;
|
|
210
222
|
segmented_at?: string | null;
|
|
211
223
|
session_id?: number | null;
|
|
@@ -223,6 +235,13 @@ export type Database = {
|
|
|
223
235
|
referencedRelation: "devices";
|
|
224
236
|
referencedColumns: ["id"];
|
|
225
237
|
},
|
|
238
|
+
{
|
|
239
|
+
foreignKeyName: "artifacts_lifecycle_changed_by_fkey";
|
|
240
|
+
columns: ["lifecycle_changed_by"];
|
|
241
|
+
isOneToOne: false;
|
|
242
|
+
referencedRelation: "users";
|
|
243
|
+
referencedColumns: ["id"];
|
|
244
|
+
},
|
|
226
245
|
{
|
|
227
246
|
foreignKeyName: "artifacts_session_id_fkey";
|
|
228
247
|
columns: ["session_id"];
|
|
@@ -449,10 +468,12 @@ export type Database = {
|
|
|
449
468
|
herd_id: number;
|
|
450
469
|
id: number;
|
|
451
470
|
inserted_at: string;
|
|
471
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
472
|
+
lifecycle_changed_at: string;
|
|
473
|
+
lifecycle_changed_by: string | null;
|
|
474
|
+
lifecycle_reason: string | null;
|
|
452
475
|
location: unknown;
|
|
453
476
|
name: string;
|
|
454
|
-
video_publisher_token: string | null;
|
|
455
|
-
video_subscriber_token: string | null;
|
|
456
477
|
};
|
|
457
478
|
Insert: {
|
|
458
479
|
altitude?: number | null;
|
|
@@ -465,10 +486,12 @@ export type Database = {
|
|
|
465
486
|
herd_id: number;
|
|
466
487
|
id?: number;
|
|
467
488
|
inserted_at?: string;
|
|
489
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
490
|
+
lifecycle_changed_at?: string;
|
|
491
|
+
lifecycle_changed_by?: string | null;
|
|
492
|
+
lifecycle_reason?: string | null;
|
|
468
493
|
location?: unknown;
|
|
469
494
|
name: string;
|
|
470
|
-
video_publisher_token?: string | null;
|
|
471
|
-
video_subscriber_token?: string | null;
|
|
472
495
|
};
|
|
473
496
|
Update: {
|
|
474
497
|
altitude?: number | null;
|
|
@@ -481,10 +504,12 @@ export type Database = {
|
|
|
481
504
|
herd_id?: number;
|
|
482
505
|
id?: number;
|
|
483
506
|
inserted_at?: string;
|
|
507
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
508
|
+
lifecycle_changed_at?: string;
|
|
509
|
+
lifecycle_changed_by?: string | null;
|
|
510
|
+
lifecycle_reason?: string | null;
|
|
484
511
|
location?: unknown;
|
|
485
512
|
name?: string;
|
|
486
|
-
video_publisher_token?: string | null;
|
|
487
|
-
video_subscriber_token?: string | null;
|
|
488
513
|
};
|
|
489
514
|
Relationships: [
|
|
490
515
|
{
|
|
@@ -500,6 +525,13 @@ export type Database = {
|
|
|
500
525
|
isOneToOne: false;
|
|
501
526
|
referencedRelation: "herds";
|
|
502
527
|
referencedColumns: ["id"];
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
foreignKeyName: "devices_lifecycle_changed_by_fkey";
|
|
531
|
+
columns: ["lifecycle_changed_by"];
|
|
532
|
+
isOneToOne: false;
|
|
533
|
+
referencedRelation: "users";
|
|
534
|
+
referencedColumns: ["id"];
|
|
503
535
|
}
|
|
504
536
|
];
|
|
505
537
|
};
|
|
@@ -597,6 +629,10 @@ export type Database = {
|
|
|
597
629
|
id: number;
|
|
598
630
|
inserted_at: string;
|
|
599
631
|
is_public: boolean;
|
|
632
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
633
|
+
lifecycle_changed_at: string;
|
|
634
|
+
lifecycle_changed_by: string | null;
|
|
635
|
+
lifecycle_reason: string | null;
|
|
600
636
|
location: unknown;
|
|
601
637
|
media_type: Database["public"]["Enums"]["media_type"];
|
|
602
638
|
media_url: string | null;
|
|
@@ -617,6 +653,10 @@ export type Database = {
|
|
|
617
653
|
id?: number;
|
|
618
654
|
inserted_at?: string;
|
|
619
655
|
is_public?: boolean;
|
|
656
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
657
|
+
lifecycle_changed_at?: string;
|
|
658
|
+
lifecycle_changed_by?: string | null;
|
|
659
|
+
lifecycle_reason?: string | null;
|
|
620
660
|
location?: unknown;
|
|
621
661
|
media_type?: Database["public"]["Enums"]["media_type"];
|
|
622
662
|
media_url?: string | null;
|
|
@@ -637,6 +677,10 @@ export type Database = {
|
|
|
637
677
|
id?: number;
|
|
638
678
|
inserted_at?: string;
|
|
639
679
|
is_public?: boolean;
|
|
680
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
681
|
+
lifecycle_changed_at?: string;
|
|
682
|
+
lifecycle_changed_by?: string | null;
|
|
683
|
+
lifecycle_reason?: string | null;
|
|
640
684
|
location?: unknown;
|
|
641
685
|
media_type?: Database["public"]["Enums"]["media_type"];
|
|
642
686
|
media_url?: string | null;
|
|
@@ -655,6 +699,13 @@ export type Database = {
|
|
|
655
699
|
referencedRelation: "devices";
|
|
656
700
|
referencedColumns: ["id"];
|
|
657
701
|
},
|
|
702
|
+
{
|
|
703
|
+
foreignKeyName: "events_lifecycle_changed_by_fkey";
|
|
704
|
+
columns: ["lifecycle_changed_by"];
|
|
705
|
+
isOneToOne: false;
|
|
706
|
+
referencedRelation: "users";
|
|
707
|
+
referencedColumns: ["id"];
|
|
708
|
+
},
|
|
658
709
|
{
|
|
659
710
|
foreignKeyName: "events_session_id_fkey";
|
|
660
711
|
columns: ["session_id"];
|
|
@@ -734,11 +785,90 @@ export type Database = {
|
|
|
734
785
|
}
|
|
735
786
|
];
|
|
736
787
|
};
|
|
788
|
+
herd_allowed_domains: {
|
|
789
|
+
Row: {
|
|
790
|
+
created_at: string;
|
|
791
|
+
domain: string;
|
|
792
|
+
herd_id: number;
|
|
793
|
+
id: number;
|
|
794
|
+
};
|
|
795
|
+
Insert: {
|
|
796
|
+
created_at?: string;
|
|
797
|
+
domain: string;
|
|
798
|
+
herd_id: number;
|
|
799
|
+
id?: number;
|
|
800
|
+
};
|
|
801
|
+
Update: {
|
|
802
|
+
created_at?: string;
|
|
803
|
+
domain?: string;
|
|
804
|
+
herd_id?: number;
|
|
805
|
+
id?: number;
|
|
806
|
+
};
|
|
807
|
+
Relationships: [
|
|
808
|
+
{
|
|
809
|
+
foreignKeyName: "herd_allowed_domains_herd_id_fkey";
|
|
810
|
+
columns: ["herd_id"];
|
|
811
|
+
isOneToOne: false;
|
|
812
|
+
referencedRelation: "herds";
|
|
813
|
+
referencedColumns: ["id"];
|
|
814
|
+
}
|
|
815
|
+
];
|
|
816
|
+
};
|
|
817
|
+
herd_invitations: {
|
|
818
|
+
Row: {
|
|
819
|
+
accepted_at: string | null;
|
|
820
|
+
created_at: string;
|
|
821
|
+
email: string;
|
|
822
|
+
expires_at: string | null;
|
|
823
|
+
herd_id: number;
|
|
824
|
+
id: number;
|
|
825
|
+
invited_by: string;
|
|
826
|
+
role: Database["public"]["Enums"]["role"];
|
|
827
|
+
status: Database["public"]["Enums"]["herd_invitation_status"];
|
|
828
|
+
};
|
|
829
|
+
Insert: {
|
|
830
|
+
accepted_at?: string | null;
|
|
831
|
+
created_at?: string;
|
|
832
|
+
email: string;
|
|
833
|
+
expires_at?: string | null;
|
|
834
|
+
herd_id: number;
|
|
835
|
+
id?: number;
|
|
836
|
+
invited_by: string;
|
|
837
|
+
role: Database["public"]["Enums"]["role"];
|
|
838
|
+
status?: Database["public"]["Enums"]["herd_invitation_status"];
|
|
839
|
+
};
|
|
840
|
+
Update: {
|
|
841
|
+
accepted_at?: string | null;
|
|
842
|
+
created_at?: string;
|
|
843
|
+
email?: string;
|
|
844
|
+
expires_at?: string | null;
|
|
845
|
+
herd_id?: number;
|
|
846
|
+
id?: number;
|
|
847
|
+
invited_by?: string;
|
|
848
|
+
role?: Database["public"]["Enums"]["role"];
|
|
849
|
+
status?: Database["public"]["Enums"]["herd_invitation_status"];
|
|
850
|
+
};
|
|
851
|
+
Relationships: [
|
|
852
|
+
{
|
|
853
|
+
foreignKeyName: "herd_invitations_herd_id_fkey";
|
|
854
|
+
columns: ["herd_id"];
|
|
855
|
+
isOneToOne: false;
|
|
856
|
+
referencedRelation: "herds";
|
|
857
|
+
referencedColumns: ["id"];
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
foreignKeyName: "herd_invitations_invited_by_fkey";
|
|
861
|
+
columns: ["invited_by"];
|
|
862
|
+
isOneToOne: false;
|
|
863
|
+
referencedRelation: "users";
|
|
864
|
+
referencedColumns: ["id"];
|
|
865
|
+
}
|
|
866
|
+
];
|
|
867
|
+
};
|
|
737
868
|
herds: {
|
|
738
869
|
Row: {
|
|
739
870
|
auto_delete_media_with_humans: boolean | null;
|
|
740
871
|
auto_delete_media_with_no_tracks: boolean | null;
|
|
741
|
-
created_by: string;
|
|
742
872
|
description: string;
|
|
743
873
|
earthranger_domain: string | null;
|
|
744
874
|
earthranger_token: string | null;
|
|
@@ -754,7 +884,6 @@ export type Database = {
|
|
|
754
884
|
Insert: {
|
|
755
885
|
auto_delete_media_with_humans?: boolean | null;
|
|
756
886
|
auto_delete_media_with_no_tracks?: boolean | null;
|
|
757
|
-
created_by: string;
|
|
758
887
|
description: string;
|
|
759
888
|
earthranger_domain?: string | null;
|
|
760
889
|
earthranger_token?: string | null;
|
|
@@ -770,7 +899,6 @@ export type Database = {
|
|
|
770
899
|
Update: {
|
|
771
900
|
auto_delete_media_with_humans?: boolean | null;
|
|
772
901
|
auto_delete_media_with_no_tracks?: boolean | null;
|
|
773
|
-
created_by?: string;
|
|
774
902
|
description?: string;
|
|
775
903
|
earthranger_domain?: string | null;
|
|
776
904
|
earthranger_token?: string | null;
|
|
@@ -783,15 +911,7 @@ export type Database = {
|
|
|
783
911
|
video_server_url?: string | null;
|
|
784
912
|
video_subscriber_token?: string | null;
|
|
785
913
|
};
|
|
786
|
-
Relationships: [
|
|
787
|
-
{
|
|
788
|
-
foreignKeyName: "herds_created_by_fkey";
|
|
789
|
-
columns: ["created_by"];
|
|
790
|
-
isOneToOne: false;
|
|
791
|
-
referencedRelation: "users";
|
|
792
|
-
referencedColumns: ["id"];
|
|
793
|
-
}
|
|
794
|
-
];
|
|
914
|
+
Relationships: [];
|
|
795
915
|
};
|
|
796
916
|
layers: {
|
|
797
917
|
Row: {
|
|
@@ -947,34 +1067,40 @@ export type Database = {
|
|
|
947
1067
|
Row: {
|
|
948
1068
|
certificate_id: number | null;
|
|
949
1069
|
created_at: string;
|
|
950
|
-
deleted_at: string | null;
|
|
951
1070
|
device_id: number;
|
|
952
1071
|
id: number;
|
|
1072
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1073
|
+
lifecycle_changed_at: string;
|
|
1074
|
+
lifecycle_changed_by: string | null;
|
|
1075
|
+
lifecycle_reason: string | null;
|
|
953
1076
|
product_number: string;
|
|
954
1077
|
serial_number: string;
|
|
955
|
-
status: Database["public"]["Enums"]["component_status"];
|
|
956
1078
|
updated_at: string | null;
|
|
957
1079
|
};
|
|
958
1080
|
Insert: {
|
|
959
1081
|
certificate_id?: number | null;
|
|
960
1082
|
created_at?: string;
|
|
961
|
-
deleted_at?: string | null;
|
|
962
1083
|
device_id: number;
|
|
963
1084
|
id?: number;
|
|
1085
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1086
|
+
lifecycle_changed_at?: string;
|
|
1087
|
+
lifecycle_changed_by?: string | null;
|
|
1088
|
+
lifecycle_reason?: string | null;
|
|
964
1089
|
product_number: string;
|
|
965
1090
|
serial_number: string;
|
|
966
|
-
status?: Database["public"]["Enums"]["component_status"];
|
|
967
1091
|
updated_at?: string | null;
|
|
968
1092
|
};
|
|
969
1093
|
Update: {
|
|
970
1094
|
certificate_id?: number | null;
|
|
971
1095
|
created_at?: string;
|
|
972
|
-
deleted_at?: string | null;
|
|
973
1096
|
device_id?: number;
|
|
974
1097
|
id?: number;
|
|
1098
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1099
|
+
lifecycle_changed_at?: string;
|
|
1100
|
+
lifecycle_changed_by?: string | null;
|
|
1101
|
+
lifecycle_reason?: string | null;
|
|
975
1102
|
product_number?: string;
|
|
976
1103
|
serial_number?: string;
|
|
977
|
-
status?: Database["public"]["Enums"]["component_status"];
|
|
978
1104
|
updated_at?: string | null;
|
|
979
1105
|
};
|
|
980
1106
|
Relationships: [
|
|
@@ -991,6 +1117,13 @@ export type Database = {
|
|
|
991
1117
|
isOneToOne: false;
|
|
992
1118
|
referencedRelation: "devices";
|
|
993
1119
|
referencedColumns: ["id"];
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
foreignKeyName: "parts_lifecycle_changed_by_fkey";
|
|
1123
|
+
columns: ["lifecycle_changed_by"];
|
|
1124
|
+
isOneToOne: false;
|
|
1125
|
+
referencedRelation: "users";
|
|
1126
|
+
referencedColumns: ["id"];
|
|
994
1127
|
}
|
|
995
1128
|
];
|
|
996
1129
|
};
|
|
@@ -1138,6 +1271,27 @@ export type Database = {
|
|
|
1138
1271
|
}
|
|
1139
1272
|
];
|
|
1140
1273
|
};
|
|
1274
|
+
pubsub_jwt_public_keys: {
|
|
1275
|
+
Row: {
|
|
1276
|
+
created_at: string;
|
|
1277
|
+
kid: string;
|
|
1278
|
+
public_jwk: Json;
|
|
1279
|
+
revoked_at: string | null;
|
|
1280
|
+
};
|
|
1281
|
+
Insert: {
|
|
1282
|
+
created_at?: string;
|
|
1283
|
+
kid: string;
|
|
1284
|
+
public_jwk: Json;
|
|
1285
|
+
revoked_at?: string | null;
|
|
1286
|
+
};
|
|
1287
|
+
Update: {
|
|
1288
|
+
created_at?: string;
|
|
1289
|
+
kid?: string;
|
|
1290
|
+
public_jwk?: Json;
|
|
1291
|
+
revoked_at?: string | null;
|
|
1292
|
+
};
|
|
1293
|
+
Relationships: [];
|
|
1294
|
+
};
|
|
1141
1295
|
segmentations_sam3: {
|
|
1142
1296
|
Row: {
|
|
1143
1297
|
artifact_id: number | null;
|
|
@@ -1244,6 +1398,10 @@ export type Database = {
|
|
|
1244
1398
|
distance_total: number;
|
|
1245
1399
|
id: number;
|
|
1246
1400
|
inserted_at: string;
|
|
1401
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1402
|
+
lifecycle_changed_at: string;
|
|
1403
|
+
lifecycle_changed_by: string | null;
|
|
1404
|
+
lifecycle_reason: string | null;
|
|
1247
1405
|
locations: unknown;
|
|
1248
1406
|
post_approver: string | null;
|
|
1249
1407
|
software_version: string;
|
|
@@ -1263,6 +1421,10 @@ export type Database = {
|
|
|
1263
1421
|
distance_total: number;
|
|
1264
1422
|
id?: number;
|
|
1265
1423
|
inserted_at?: string;
|
|
1424
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1425
|
+
lifecycle_changed_at?: string;
|
|
1426
|
+
lifecycle_changed_by?: string | null;
|
|
1427
|
+
lifecycle_reason?: string | null;
|
|
1266
1428
|
locations?: unknown;
|
|
1267
1429
|
post_approver?: string | null;
|
|
1268
1430
|
software_version: string;
|
|
@@ -1282,6 +1444,10 @@ export type Database = {
|
|
|
1282
1444
|
distance_total?: number;
|
|
1283
1445
|
id?: number;
|
|
1284
1446
|
inserted_at?: string;
|
|
1447
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1448
|
+
lifecycle_changed_at?: string;
|
|
1449
|
+
lifecycle_changed_by?: string | null;
|
|
1450
|
+
lifecycle_reason?: string | null;
|
|
1285
1451
|
locations?: unknown;
|
|
1286
1452
|
post_approver?: string | null;
|
|
1287
1453
|
software_version?: string;
|
|
@@ -1306,6 +1472,13 @@ export type Database = {
|
|
|
1306
1472
|
referencedRelation: "devices";
|
|
1307
1473
|
referencedColumns: ["id"];
|
|
1308
1474
|
},
|
|
1475
|
+
{
|
|
1476
|
+
foreignKeyName: "sessions_lifecycle_changed_by_fkey";
|
|
1477
|
+
columns: ["lifecycle_changed_by"];
|
|
1478
|
+
isOneToOne: false;
|
|
1479
|
+
referencedRelation: "users";
|
|
1480
|
+
referencedColumns: ["id"];
|
|
1481
|
+
},
|
|
1309
1482
|
{
|
|
1310
1483
|
foreignKeyName: "sessions_post_approver_fkey";
|
|
1311
1484
|
columns: ["post_approver"];
|
|
@@ -1440,7 +1613,12 @@ export type Database = {
|
|
|
1440
1613
|
earthranger_id: string | null;
|
|
1441
1614
|
first: string | null;
|
|
1442
1615
|
id: string;
|
|
1616
|
+
is_registered: boolean;
|
|
1443
1617
|
last: string | null;
|
|
1618
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1619
|
+
lifecycle_changed_at: string;
|
|
1620
|
+
lifecycle_changed_by: string | null;
|
|
1621
|
+
lifecycle_reason: string | null;
|
|
1444
1622
|
signature_base64: string | null;
|
|
1445
1623
|
title: string | null;
|
|
1446
1624
|
username: string | null;
|
|
@@ -1450,7 +1628,12 @@ export type Database = {
|
|
|
1450
1628
|
earthranger_id?: string | null;
|
|
1451
1629
|
first?: string | null;
|
|
1452
1630
|
id: string;
|
|
1631
|
+
is_registered?: boolean;
|
|
1453
1632
|
last?: string | null;
|
|
1633
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1634
|
+
lifecycle_changed_at?: string;
|
|
1635
|
+
lifecycle_changed_by?: string | null;
|
|
1636
|
+
lifecycle_reason?: string | null;
|
|
1454
1637
|
signature_base64?: string | null;
|
|
1455
1638
|
title?: string | null;
|
|
1456
1639
|
username?: string | null;
|
|
@@ -1460,12 +1643,25 @@ export type Database = {
|
|
|
1460
1643
|
earthranger_id?: string | null;
|
|
1461
1644
|
first?: string | null;
|
|
1462
1645
|
id?: string;
|
|
1646
|
+
is_registered?: boolean;
|
|
1463
1647
|
last?: string | null;
|
|
1648
|
+
lifecycle?: Database["public"]["Enums"]["entity_lifecycle"];
|
|
1649
|
+
lifecycle_changed_at?: string;
|
|
1650
|
+
lifecycle_changed_by?: string | null;
|
|
1651
|
+
lifecycle_reason?: string | null;
|
|
1464
1652
|
signature_base64?: string | null;
|
|
1465
1653
|
title?: string | null;
|
|
1466
1654
|
username?: string | null;
|
|
1467
1655
|
};
|
|
1468
|
-
Relationships: [
|
|
1656
|
+
Relationships: [
|
|
1657
|
+
{
|
|
1658
|
+
foreignKeyName: "users_lifecycle_changed_by_fkey";
|
|
1659
|
+
columns: ["lifecycle_changed_by"];
|
|
1660
|
+
isOneToOne: false;
|
|
1661
|
+
referencedRelation: "users";
|
|
1662
|
+
referencedColumns: ["id"];
|
|
1663
|
+
}
|
|
1664
|
+
];
|
|
1469
1665
|
};
|
|
1470
1666
|
users_roles_per_herd: {
|
|
1471
1667
|
Row: {
|
|
@@ -1697,6 +1893,28 @@ export type Database = {
|
|
|
1697
1893
|
};
|
|
1698
1894
|
};
|
|
1699
1895
|
Functions: {
|
|
1896
|
+
accept_herd_invitations_for_current_user: {
|
|
1897
|
+
Args: {
|
|
1898
|
+
p_invitation_ids: number[];
|
|
1899
|
+
};
|
|
1900
|
+
Returns: {
|
|
1901
|
+
accepted_at: string | null;
|
|
1902
|
+
created_at: string;
|
|
1903
|
+
email: string;
|
|
1904
|
+
expires_at: string | null;
|
|
1905
|
+
herd_id: number;
|
|
1906
|
+
id: number;
|
|
1907
|
+
invited_by: string;
|
|
1908
|
+
role: Database["public"]["Enums"]["role"];
|
|
1909
|
+
status: Database["public"]["Enums"]["herd_invitation_status"];
|
|
1910
|
+
}[];
|
|
1911
|
+
SetofOptions: {
|
|
1912
|
+
from: "*";
|
|
1913
|
+
to: "herd_invitations";
|
|
1914
|
+
isOneToOne: false;
|
|
1915
|
+
isSetofReturn: true;
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1700
1918
|
ack_queue_message: {
|
|
1701
1919
|
Args: {
|
|
1702
1920
|
message_id: number;
|
|
@@ -1747,6 +1965,31 @@ export type Database = {
|
|
|
1747
1965
|
table_name: string;
|
|
1748
1966
|
}[];
|
|
1749
1967
|
};
|
|
1968
|
+
create_herd_invitation: {
|
|
1969
|
+
Args: {
|
|
1970
|
+
p_email: string;
|
|
1971
|
+
p_expires_at?: string;
|
|
1972
|
+
p_herd_id: number;
|
|
1973
|
+
p_role: Database["public"]["Enums"]["role"];
|
|
1974
|
+
};
|
|
1975
|
+
Returns: {
|
|
1976
|
+
accepted_at: string | null;
|
|
1977
|
+
created_at: string;
|
|
1978
|
+
email: string;
|
|
1979
|
+
expires_at: string | null;
|
|
1980
|
+
herd_id: number;
|
|
1981
|
+
id: number;
|
|
1982
|
+
invited_by: string;
|
|
1983
|
+
role: Database["public"]["Enums"]["role"];
|
|
1984
|
+
status: Database["public"]["Enums"]["herd_invitation_status"];
|
|
1985
|
+
};
|
|
1986
|
+
SetofOptions: {
|
|
1987
|
+
from: "*";
|
|
1988
|
+
to: "herd_invitations";
|
|
1989
|
+
isOneToOne: true;
|
|
1990
|
+
isSetofReturn: false;
|
|
1991
|
+
};
|
|
1992
|
+
};
|
|
1750
1993
|
delete_all_orphaned_sessions: {
|
|
1751
1994
|
Args: {
|
|
1752
1995
|
min_age_seconds?: number;
|
|
@@ -1838,6 +2081,10 @@ export type Database = {
|
|
|
1838
2081
|
file_path: string;
|
|
1839
2082
|
file_size_bytes: number | null;
|
|
1840
2083
|
id: number;
|
|
2084
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2085
|
+
lifecycle_changed_at: string;
|
|
2086
|
+
lifecycle_changed_by: string | null;
|
|
2087
|
+
lifecycle_reason: string | null;
|
|
1841
2088
|
modality: string | null;
|
|
1842
2089
|
segmented_at: string | null;
|
|
1843
2090
|
session_id: number | null;
|
|
@@ -1866,6 +2113,10 @@ export type Database = {
|
|
|
1866
2113
|
file_path: string;
|
|
1867
2114
|
file_size_bytes: number | null;
|
|
1868
2115
|
id: number;
|
|
2116
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2117
|
+
lifecycle_changed_at: string;
|
|
2118
|
+
lifecycle_changed_by: string | null;
|
|
2119
|
+
lifecycle_reason: string | null;
|
|
1869
2120
|
modality: string | null;
|
|
1870
2121
|
segmented_at: string | null;
|
|
1871
2122
|
session_id: number | null;
|
|
@@ -1895,6 +2146,10 @@ export type Database = {
|
|
|
1895
2146
|
file_path: string;
|
|
1896
2147
|
file_size_bytes: number | null;
|
|
1897
2148
|
id: number;
|
|
2149
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2150
|
+
lifecycle_changed_at: string;
|
|
2151
|
+
lifecycle_changed_by: string | null;
|
|
2152
|
+
lifecycle_reason: string | null;
|
|
1898
2153
|
modality: string | null;
|
|
1899
2154
|
segmented_at: string | null;
|
|
1900
2155
|
session_id: number | null;
|
|
@@ -1924,6 +2179,10 @@ export type Database = {
|
|
|
1924
2179
|
file_path: string;
|
|
1925
2180
|
file_size_bytes: number | null;
|
|
1926
2181
|
id: number;
|
|
2182
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2183
|
+
lifecycle_changed_at: string;
|
|
2184
|
+
lifecycle_changed_by: string | null;
|
|
2185
|
+
lifecycle_reason: string | null;
|
|
1927
2186
|
modality: string | null;
|
|
1928
2187
|
segmented_at: string | null;
|
|
1929
2188
|
session_id: number | null;
|
|
@@ -1954,6 +2213,10 @@ export type Database = {
|
|
|
1954
2213
|
file_path: string;
|
|
1955
2214
|
file_size_bytes: number | null;
|
|
1956
2215
|
id: number;
|
|
2216
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2217
|
+
lifecycle_changed_at: string;
|
|
2218
|
+
lifecycle_changed_by: string | null;
|
|
2219
|
+
lifecycle_reason: string | null;
|
|
1957
2220
|
modality: string | null;
|
|
1958
2221
|
segmented_at: string | null;
|
|
1959
2222
|
session_id: number | null;
|
|
@@ -1984,6 +2247,10 @@ export type Database = {
|
|
|
1984
2247
|
file_path: string;
|
|
1985
2248
|
file_size_bytes: number | null;
|
|
1986
2249
|
id: number;
|
|
2250
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2251
|
+
lifecycle_changed_at: string;
|
|
2252
|
+
lifecycle_changed_by: string | null;
|
|
2253
|
+
lifecycle_reason: string | null;
|
|
1987
2254
|
modality: string | null;
|
|
1988
2255
|
segmented_at: string | null;
|
|
1989
2256
|
session_id: number | null;
|
|
@@ -2015,6 +2282,10 @@ export type Database = {
|
|
|
2015
2282
|
file_path: string;
|
|
2016
2283
|
file_size_bytes: number | null;
|
|
2017
2284
|
id: number;
|
|
2285
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2286
|
+
lifecycle_changed_at: string;
|
|
2287
|
+
lifecycle_changed_by: string | null;
|
|
2288
|
+
lifecycle_reason: string | null;
|
|
2018
2289
|
modality: string | null;
|
|
2019
2290
|
segmented_at: string | null;
|
|
2020
2291
|
session_id: number | null;
|
|
@@ -2045,6 +2316,10 @@ export type Database = {
|
|
|
2045
2316
|
file_path: string;
|
|
2046
2317
|
file_size_bytes: number | null;
|
|
2047
2318
|
id: number;
|
|
2319
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2320
|
+
lifecycle_changed_at: string;
|
|
2321
|
+
lifecycle_changed_by: string | null;
|
|
2322
|
+
lifecycle_reason: string | null;
|
|
2048
2323
|
modality: string | null;
|
|
2049
2324
|
segmented_at: string | null;
|
|
2050
2325
|
session_id: number | null;
|
|
@@ -2076,6 +2351,10 @@ export type Database = {
|
|
|
2076
2351
|
file_path: string;
|
|
2077
2352
|
file_size_bytes: number | null;
|
|
2078
2353
|
id: number;
|
|
2354
|
+
lifecycle: Database["public"]["Enums"]["entity_lifecycle"];
|
|
2355
|
+
lifecycle_changed_at: string;
|
|
2356
|
+
lifecycle_changed_by: string | null;
|
|
2357
|
+
lifecycle_reason: string | null;
|
|
2079
2358
|
modality: string | null;
|
|
2080
2359
|
segmented_at: string | null;
|
|
2081
2360
|
session_id: number | null;
|
|
@@ -2439,6 +2718,26 @@ export type Database = {
|
|
|
2439
2718
|
min_value: number;
|
|
2440
2719
|
}[];
|
|
2441
2720
|
};
|
|
2721
|
+
get_herd_invitations_for_current_user: {
|
|
2722
|
+
Args: never;
|
|
2723
|
+
Returns: {
|
|
2724
|
+
accepted_at: string | null;
|
|
2725
|
+
created_at: string;
|
|
2726
|
+
email: string;
|
|
2727
|
+
expires_at: string | null;
|
|
2728
|
+
herd_id: number;
|
|
2729
|
+
id: number;
|
|
2730
|
+
invited_by: string;
|
|
2731
|
+
role: Database["public"]["Enums"]["role"];
|
|
2732
|
+
status: Database["public"]["Enums"]["herd_invitation_status"];
|
|
2733
|
+
}[];
|
|
2734
|
+
SetofOptions: {
|
|
2735
|
+
from: "*";
|
|
2736
|
+
to: "herd_invitations";
|
|
2737
|
+
isOneToOne: false;
|
|
2738
|
+
isSetofReturn: true;
|
|
2739
|
+
};
|
|
2740
|
+
};
|
|
2442
2741
|
get_herd_uptime_summary: {
|
|
2443
2742
|
Args: {
|
|
2444
2743
|
p_device_types?: Database["public"]["Enums"]["device_type"][];
|
|
@@ -2493,6 +2792,14 @@ export type Database = {
|
|
|
2493
2792
|
isSetofReturn: true;
|
|
2494
2793
|
};
|
|
2495
2794
|
};
|
|
2795
|
+
get_pubsub_jwt_public_keys: {
|
|
2796
|
+
Args: never;
|
|
2797
|
+
Returns: Json;
|
|
2798
|
+
};
|
|
2799
|
+
get_pubsub_token_claims: {
|
|
2800
|
+
Args: never;
|
|
2801
|
+
Returns: Json;
|
|
2802
|
+
};
|
|
2496
2803
|
get_segmentations_sam3_for_artifact: {
|
|
2497
2804
|
Args: {
|
|
2498
2805
|
artifact_id_caller: number;
|
|
@@ -2815,6 +3122,21 @@ export type Database = {
|
|
|
2815
3122
|
isSetofReturn: true;
|
|
2816
3123
|
};
|
|
2817
3124
|
};
|
|
3125
|
+
migrate_conservaition_users_to_sentala: {
|
|
3126
|
+
Args: {
|
|
3127
|
+
preview?: boolean;
|
|
3128
|
+
source_domains?: string[];
|
|
3129
|
+
target_domain?: string;
|
|
3130
|
+
};
|
|
3131
|
+
Returns: {
|
|
3132
|
+
action: string;
|
|
3133
|
+
detail: string;
|
|
3134
|
+
source_email: string;
|
|
3135
|
+
source_user_id: string;
|
|
3136
|
+
target_email: string;
|
|
3137
|
+
target_user_id: string;
|
|
3138
|
+
}[];
|
|
3139
|
+
};
|
|
2818
3140
|
preview_fix_all_sessions_missing_distance: {
|
|
2819
3141
|
Args: never;
|
|
2820
3142
|
Returns: {
|
|
@@ -2844,6 +3166,12 @@ export type Database = {
|
|
|
2844
3166
|
Args: never;
|
|
2845
3167
|
Returns: undefined;
|
|
2846
3168
|
};
|
|
3169
|
+
revoke_pubsub_jwt_public_key: {
|
|
3170
|
+
Args: {
|
|
3171
|
+
p_kid: string;
|
|
3172
|
+
};
|
|
3173
|
+
Returns: undefined;
|
|
3174
|
+
};
|
|
2847
3175
|
search_embeddings_vertex_multimodal_001: {
|
|
2848
3176
|
Args: {
|
|
2849
3177
|
herd_id_caller?: number;
|
|
@@ -2888,15 +3216,23 @@ export type Database = {
|
|
|
2888
3216
|
};
|
|
2889
3217
|
Returns: undefined;
|
|
2890
3218
|
};
|
|
3219
|
+
upsert_pubsub_jwt_public_key: {
|
|
3220
|
+
Args: {
|
|
3221
|
+
p_kid: string;
|
|
3222
|
+
p_public_jwk: Json;
|
|
3223
|
+
};
|
|
3224
|
+
Returns: undefined;
|
|
3225
|
+
};
|
|
2891
3226
|
};
|
|
2892
3227
|
Enums: {
|
|
2893
3228
|
analysis_work_status: "waiting" | "cancelled" | "processing" | "failed" | "success";
|
|
2894
3229
|
app_permission: "herds.delete" | "events.delete";
|
|
2895
|
-
component_status: "active" | "inactive";
|
|
2896
3230
|
device_type: "trail_camera" | "drone_fixed_wing" | "drone_quad" | "gps_tracker" | "sentry_tower" | "smart_buoy" | "radio_mesh_base_station" | "radio_mesh_repeater" | "unknown" | "gps_tracker_vehicle" | "gps_tracker_person" | "radio_mesh_base_station_gateway";
|
|
3231
|
+
entity_lifecycle: "active" | "retired" | "deleted";
|
|
3232
|
+
herd_invitation_status: "pending" | "accepted" | "revoked" | "expired";
|
|
2897
3233
|
media_type: "image" | "video" | "audio" | "text";
|
|
2898
3234
|
plan_type: "mission" | "fence" | "rally" | "markov";
|
|
2899
|
-
role: "admin" | "
|
|
3235
|
+
role: "admin" | "editor" | "viewer";
|
|
2900
3236
|
tag_observation_type: "manual" | "auto";
|
|
2901
3237
|
user_status: "ONLINE" | "OFFLINE";
|
|
2902
3238
|
};
|
|
@@ -3043,7 +3379,6 @@ export type Database = {
|
|
|
3043
3379
|
inserted_at: string | null;
|
|
3044
3380
|
slug: string | null;
|
|
3045
3381
|
description: string | null;
|
|
3046
|
-
created_by: string | null;
|
|
3047
3382
|
is_public: boolean | null;
|
|
3048
3383
|
earthranger_domain: string | null;
|
|
3049
3384
|
earthranger_token: string | null;
|
|
@@ -3207,11 +3542,12 @@ export declare const Constants: {
|
|
|
3207
3542
|
readonly Enums: {
|
|
3208
3543
|
readonly analysis_work_status: readonly ["waiting", "cancelled", "processing", "failed", "success"];
|
|
3209
3544
|
readonly app_permission: readonly ["herds.delete", "events.delete"];
|
|
3210
|
-
readonly component_status: readonly ["active", "inactive"];
|
|
3211
3545
|
readonly device_type: readonly ["trail_camera", "drone_fixed_wing", "drone_quad", "gps_tracker", "sentry_tower", "smart_buoy", "radio_mesh_base_station", "radio_mesh_repeater", "unknown", "gps_tracker_vehicle", "gps_tracker_person", "radio_mesh_base_station_gateway"];
|
|
3546
|
+
readonly entity_lifecycle: readonly ["active", "retired", "deleted"];
|
|
3547
|
+
readonly herd_invitation_status: readonly ["pending", "accepted", "revoked", "expired"];
|
|
3212
3548
|
readonly media_type: readonly ["image", "video", "audio", "text"];
|
|
3213
3549
|
readonly plan_type: readonly ["mission", "fence", "rally", "markov"];
|
|
3214
|
-
readonly role: readonly ["admin", "
|
|
3550
|
+
readonly role: readonly ["admin", "editor", "viewer"];
|
|
3215
3551
|
readonly tag_observation_type: readonly ["manual", "auto"];
|
|
3216
3552
|
readonly user_status: readonly ["ONLINE", "OFFLINE"];
|
|
3217
3553
|
};
|