@adventurelabs/scout-core 2.0.13 → 2.0.15

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.
Files changed (33) hide show
  1. package/dist/client/index.d.ts +4 -2
  2. package/dist/client/index.js +4 -2
  3. package/dist/helpers/document_templates.d.ts +1 -0
  4. package/dist/helpers/document_templates.js +4 -1
  5. package/dist/helpers/document_templates.queries.d.ts +1 -0
  6. package/dist/helpers/document_templates.queries.js +11 -0
  7. package/dist/helpers/herd_media_usage.d.ts +4 -0
  8. package/dist/helpers/herd_media_usage.js +8 -0
  9. package/dist/helpers/herd_media_usage.queries.d.ts +6 -0
  10. package/dist/helpers/herd_media_usage.queries.js +28 -0
  11. package/dist/helpers/herds.d.ts +2 -1
  12. package/dist/helpers/herds.js +4 -1
  13. package/dist/helpers/herds.queries.d.ts +2 -1
  14. package/dist/helpers/herds.queries.js +12 -0
  15. package/dist/helpers/maintenance_requests_server.d.ts +7 -0
  16. package/dist/helpers/user_last_activity.d.ts +5 -0
  17. package/dist/helpers/user_last_activity.js +12 -0
  18. package/dist/helpers/user_last_activity_server.d.ts +5 -0
  19. package/dist/helpers/user_last_activity_server.js +6 -0
  20. package/dist/hooks/index.d.ts +3 -1
  21. package/dist/hooks/index.js +2 -0
  22. package/dist/hooks/useInfiniteQuery.d.ts +9 -4
  23. package/dist/hooks/useInfiniteQuery.js +319 -905
  24. package/dist/hooks/useScoutRealtimeArtifacts.d.ts +5 -0
  25. package/dist/hooks/useScoutRealtimeArtifacts.js +7 -0
  26. package/dist/hooks/useScoutRealtimeHerdMediaUsage.d.ts +6 -0
  27. package/dist/hooks/useScoutRealtimeHerdMediaUsage.js +7 -0
  28. package/dist/server/index.d.ts +4 -2
  29. package/dist/server/index.js +4 -2
  30. package/dist/types/db.d.ts +3 -0
  31. package/dist/types/realtime.d.ts +2 -0
  32. package/dist/types/supabase.d.ts +96 -10
  33. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import { SupabaseClient } from "@supabase/supabase-js";
2
+ import { ArtifactRealtimeRow, RealtimeData } from "../types/realtime";
3
+ import { Database } from "../types/supabase";
4
+ import { ScoutRealtimeBroadcastOptions } from "./useScoutRealtimeBroadcast";
5
+ export declare function useScoutRealtimeArtifacts(scoutSupabase: SupabaseClient<Database>, options?: ScoutRealtimeBroadcastOptions): [RealtimeData<ArtifactRealtimeRow> | null, () => void];
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { useSelector } from "react-redux";
3
+ import { useScoutRealtimeBroadcast, } from "./useScoutRealtimeBroadcast";
4
+ export function useScoutRealtimeArtifacts(scoutSupabase, options) {
5
+ const activeHerdId = useSelector((state) => state.scout.active_herd_id);
6
+ return useScoutRealtimeBroadcast(scoutSupabase, activeHerdId ? [`${activeHerdId}-artifacts`] : [], options);
7
+ }
@@ -0,0 +1,6 @@
1
+ import { SupabaseClient } from "@supabase/supabase-js";
2
+ import { IHerdMediaUsage } from "../types/db";
3
+ import { RealtimeData } from "../types/realtime";
4
+ import { Database } from "../types/supabase";
5
+ import { ScoutRealtimeBroadcastOptions } from "./useScoutRealtimeBroadcast";
6
+ export declare function useScoutRealtimeHerdMediaUsage(scoutSupabase: SupabaseClient<Database>, options?: ScoutRealtimeBroadcastOptions): [RealtimeData<IHerdMediaUsage> | null, () => void];
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { useSelector } from "react-redux";
3
+ import { useScoutRealtimeBroadcast, } from "./useScoutRealtimeBroadcast";
4
+ export function useScoutRealtimeHerdMediaUsage(scoutSupabase, options) {
5
+ const activeHerdId = useSelector((state) => state.scout.active_herd_id);
6
+ return useScoutRealtimeBroadcast(scoutSupabase, activeHerdId ? [`${activeHerdId}-herd_media_usage`] : [], options);
7
+ }
@@ -23,15 +23,16 @@ export { server_get_connectivity_by_device_id as get_connectivity_by_device_id,
23
23
  export type { HerdConnectivityTimeRangeResponse } from "../helpers/connectivity.queries";
24
24
  export { transferDeviceToHerd as transfer_device_to_herd } from "../helpers/deviceTransfer";
25
25
  export { serverCreateDevice as create_device, serverDeleteDeviceById as delete_device_by_id, get_devices_by_herd, serverUpdateDevice as update_device, } from "../helpers/devices";
26
- export { server_create_document_template as create_document_template, server_get_document_template_by_id as get_document_template_by_id, server_get_document_templates_by_localization as get_document_templates_by_localization, server_get_document_templates as get_document_templates, server_update_document_template as update_document_template, } from "../helpers/document_templates";
26
+ export { server_create_document_template as create_document_template, server_get_document_template_by_id as get_document_template_by_id, server_get_document_templates_by_localization as get_document_templates_by_localization, server_get_document_templates_by_system_tag as get_document_templates_by_system_tag, server_get_document_templates as get_document_templates, server_update_document_template as update_document_template, } from "../helpers/document_templates";
27
27
  export { server_search_embeddings_vertex_multimodal_001 as search_embeddings_vertex_multimodal_001 } from "../helpers/embeddings";
28
28
  export { server_delete_event as delete_event, server_get_event_by_id as get_event_by_id, server_get_total_events_by_herd as get_total_events_by_herd, server_insert_event as insert_event, server_match_events_by_vertex_embedding as match_events_by_vertex_embedding, server_update_event as update_event, } from "../helpers/events";
29
29
  export { server_create_battery_cycle_count as create_battery_cycle_count, server_delete_battery_cycle_count as delete_battery_cycle_count, server_get_battery_cycle_counts_by_battery_id as get_battery_cycle_counts_by_battery_id, server_update_battery_cycle_count as update_battery_cycle_count, } from "../helpers/battery_cycle_counts";
30
30
  export { server_get_health_metrics as get_health_metrics, server_get_health_metrics_summary as get_health_metrics_summary, } from "../helpers/health_metrics";
31
+ export { server_get_herd_media_usage as get_herd_media_usage, server_get_latest_herd_media_usage as get_latest_herd_media_usage, } from "../helpers/herd_media_usage";
31
32
  export { server_check_device_online_status as check_device_online_status, server_get_heartbeats_by_device as get_heartbeats_by_device, server_get_last_heartbeat_by_device as get_last_heartbeat_by_device, } from "../helpers/heartbeats";
32
33
  export { server_get_herd_allowed_domains as get_herd_allowed_domains } from "../helpers/herd_allowed_domains";
33
34
  export { server_create_herd_role as create_herd_role, server_delete_herd_role as delete_herd_role, server_get_abilities_by_ids as get_abilities_by_ids, server_get_herd_role_by_system_name as get_herd_role_by_system_name, server_get_herd_roles as get_herd_roles, server_get_herd_roles_with_abilities as get_herd_roles_with_abilities, server_get_platform_default_role_abilities as get_platform_default_role_abilities, server_list_abilities as list_abilities, server_reset_herd_default_role_abilities as reset_herd_default_role_abilities, server_set_herd_role_abilities as set_herd_role_abilities, server_set_platform_default_role_abilities as set_platform_default_role_abilities, server_update_herd_role as update_herd_role, } from "../helpers/herd_roles";
34
- export { createHerd as create_herd, deleteHerd as delete_herd, get_herd_by_slug, get_herds, get_herds_with_location, server_load_herd_modules as load_herd_modules, } from "../helpers/herds";
35
+ export { createHerd as create_herd, deleteHerd as delete_herd, get_herd_by_slug, get_herds, get_herds_with_location, server_load_herd_modules as load_herd_modules, updateHerdMediaCaps as update_herd_media_caps, } from "../helpers/herds";
35
36
  export { accept_herd_invitations_for_current_user, server_create_herd_invitation as create_herd_invitation, server_get_herd_invitations_by_herd as get_herd_invitations_by_herd, server_get_herd_invitations_for_current_user as get_herd_invitations_for_current_user, reject_herd_invitations_for_current_user, server_revoke_herd_invitations as revoke_herd_invitations, } from "../helpers/invitations";
36
37
  export { server_create_issuer as create_issuer, server_get_issuer_by_id as get_issuer_by_id, server_get_issuers_by_localization as get_issuers_by_localization, server_get_issuers as get_issuers, server_update_issuer as update_issuer, } from "../helpers/issuers";
37
38
  export { server_get_layers_by_herd_ids as get_layers_by_herd_ids, server_get_layers_by_herd as get_layers_by_herd, } from "../helpers/layers";
@@ -70,6 +71,7 @@ export { server_get_points_balance_for_user_id as get_points_balance_for_user_id
70
71
  export { server_create_sensor_pose as create_sensor_pose, server_create_sensor_poses as create_sensor_poses, server_delete_sensor_pose as delete_sensor_pose, server_get_sensor_pose_by_id as get_sensor_pose_by_id, server_get_sensor_poses_by_part_id as get_sensor_poses_by_part_id, server_update_sensor_pose as update_sensor_pose, } from "../helpers/sensor_poses_server";
71
72
  export { server_create_session_incident as create_session_incident, server_delete_session_incident as delete_session_incident, server_get_session_incident_by_id as get_session_incident_by_id, server_get_session_incidents_by_session_id as get_session_incidents_by_session_id, server_update_session_incident as update_session_incident, } from "../helpers/session_incidents_server";
72
73
  export { server_create_user_credential as create_user_credential, server_delete_user_credential as delete_user_credential, server_get_user_credential_by_id as get_user_credential_by_id, server_get_user_credentials_by_user_id as get_user_credentials_by_user_id, server_update_user_credential as update_user_credential, } from "../helpers/user_credentials_server";
74
+ export { server_get_user_last_activity_by_user_id as get_user_last_activity_by_user_id, } from "../helpers/user_last_activity_server";
73
75
  export { server_create_version_software as create_version_software, server_delete_version_software as delete_version_software, server_get_versions_software_by_system_with_build_urls as get_versions_software_by_system_with_build_urls, server_get_versions_software_by_system as get_versions_software_by_system, server_get_versions_software_with_build_urls as get_versions_software_with_build_urls, server_get_versions_software as get_versions_software, server_update_version_software as update_version_software, } from "../helpers/versions_software_server";
74
76
  export { generateSignedUrl, generateSignedUrlsBatch, } from "../helpers/storage";
75
77
  export { verify_client_abilities_token } from "../helpers/client_abilities_token";
@@ -23,15 +23,16 @@ export { server_get_chat_messages as get_chat_messages, server_insert_chat_messa
23
23
  export { server_get_connectivity_by_device_id as get_connectivity_by_device_id, server_get_connectivity_by_session_id as get_connectivity_by_session_id, server_get_connectivity_for_artifact as get_connectivity_for_artifact, server_get_connectivity_for_herd_time_range as get_connectivity_for_herd_time_range, server_insert_connectivity as insert_connectivity, server_update_connectivity as update_connectivity, } from "../helpers/connectivity";
24
24
  export { transferDeviceToHerd as transfer_device_to_herd } from "../helpers/deviceTransfer";
25
25
  export { serverCreateDevice as create_device, serverDeleteDeviceById as delete_device_by_id, get_devices_by_herd, serverUpdateDevice as update_device, } from "../helpers/devices";
26
- export { server_create_document_template as create_document_template, server_get_document_template_by_id as get_document_template_by_id, server_get_document_templates_by_localization as get_document_templates_by_localization, server_get_document_templates as get_document_templates, server_update_document_template as update_document_template, } from "../helpers/document_templates";
26
+ export { server_create_document_template as create_document_template, server_get_document_template_by_id as get_document_template_by_id, server_get_document_templates_by_localization as get_document_templates_by_localization, server_get_document_templates_by_system_tag as get_document_templates_by_system_tag, server_get_document_templates as get_document_templates, server_update_document_template as update_document_template, } from "../helpers/document_templates";
27
27
  export { server_search_embeddings_vertex_multimodal_001 as search_embeddings_vertex_multimodal_001 } from "../helpers/embeddings";
28
28
  export { server_delete_event as delete_event, server_get_event_by_id as get_event_by_id, server_get_total_events_by_herd as get_total_events_by_herd, server_insert_event as insert_event, server_match_events_by_vertex_embedding as match_events_by_vertex_embedding, server_update_event as update_event, } from "../helpers/events";
29
29
  export { server_create_battery_cycle_count as create_battery_cycle_count, server_delete_battery_cycle_count as delete_battery_cycle_count, server_get_battery_cycle_counts_by_battery_id as get_battery_cycle_counts_by_battery_id, server_update_battery_cycle_count as update_battery_cycle_count, } from "../helpers/battery_cycle_counts";
30
30
  export { server_get_health_metrics as get_health_metrics, server_get_health_metrics_summary as get_health_metrics_summary, } from "../helpers/health_metrics";
31
+ export { server_get_herd_media_usage as get_herd_media_usage, server_get_latest_herd_media_usage as get_latest_herd_media_usage, } from "../helpers/herd_media_usage";
31
32
  export { server_check_device_online_status as check_device_online_status, server_get_heartbeats_by_device as get_heartbeats_by_device, server_get_last_heartbeat_by_device as get_last_heartbeat_by_device, } from "../helpers/heartbeats";
32
33
  export { server_get_herd_allowed_domains as get_herd_allowed_domains } from "../helpers/herd_allowed_domains";
33
34
  export { server_create_herd_role as create_herd_role, server_delete_herd_role as delete_herd_role, server_get_abilities_by_ids as get_abilities_by_ids, server_get_herd_role_by_system_name as get_herd_role_by_system_name, server_get_herd_roles as get_herd_roles, server_get_herd_roles_with_abilities as get_herd_roles_with_abilities, server_get_platform_default_role_abilities as get_platform_default_role_abilities, server_list_abilities as list_abilities, server_reset_herd_default_role_abilities as reset_herd_default_role_abilities, server_set_herd_role_abilities as set_herd_role_abilities, server_set_platform_default_role_abilities as set_platform_default_role_abilities, server_update_herd_role as update_herd_role, } from "../helpers/herd_roles";
34
- export { createHerd as create_herd, deleteHerd as delete_herd, get_herd_by_slug, get_herds, get_herds_with_location, server_load_herd_modules as load_herd_modules, } from "../helpers/herds";
35
+ export { createHerd as create_herd, deleteHerd as delete_herd, get_herd_by_slug, get_herds, get_herds_with_location, server_load_herd_modules as load_herd_modules, updateHerdMediaCaps as update_herd_media_caps, } from "../helpers/herds";
35
36
  export { accept_herd_invitations_for_current_user, server_create_herd_invitation as create_herd_invitation, server_get_herd_invitations_by_herd as get_herd_invitations_by_herd, server_get_herd_invitations_for_current_user as get_herd_invitations_for_current_user, reject_herd_invitations_for_current_user, server_revoke_herd_invitations as revoke_herd_invitations, } from "../helpers/invitations";
36
37
  export { server_create_issuer as create_issuer, server_get_issuer_by_id as get_issuer_by_id, server_get_issuers_by_localization as get_issuers_by_localization, server_get_issuers as get_issuers, server_update_issuer as update_issuer, } from "../helpers/issuers";
37
38
  export { server_get_layers_by_herd_ids as get_layers_by_herd_ids, server_get_layers_by_herd as get_layers_by_herd, } from "../helpers/layers";
@@ -69,6 +70,7 @@ export { server_get_points_balance_for_user_id as get_points_balance_for_user_id
69
70
  export { server_create_sensor_pose as create_sensor_pose, server_create_sensor_poses as create_sensor_poses, server_delete_sensor_pose as delete_sensor_pose, server_get_sensor_pose_by_id as get_sensor_pose_by_id, server_get_sensor_poses_by_part_id as get_sensor_poses_by_part_id, server_update_sensor_pose as update_sensor_pose, } from "../helpers/sensor_poses_server";
70
71
  export { server_create_session_incident as create_session_incident, server_delete_session_incident as delete_session_incident, server_get_session_incident_by_id as get_session_incident_by_id, server_get_session_incidents_by_session_id as get_session_incidents_by_session_id, server_update_session_incident as update_session_incident, } from "../helpers/session_incidents_server";
71
72
  export { server_create_user_credential as create_user_credential, server_delete_user_credential as delete_user_credential, server_get_user_credential_by_id as get_user_credential_by_id, server_get_user_credentials_by_user_id as get_user_credentials_by_user_id, server_update_user_credential as update_user_credential, } from "../helpers/user_credentials_server";
73
+ export { server_get_user_last_activity_by_user_id as get_user_last_activity_by_user_id, } from "../helpers/user_last_activity_server";
72
74
  export { server_create_version_software as create_version_software, server_delete_version_software as delete_version_software, server_get_versions_software_by_system_with_build_urls as get_versions_software_by_system_with_build_urls, server_get_versions_software_by_system as get_versions_software_by_system, server_get_versions_software_with_build_urls as get_versions_software_with_build_urls, server_get_versions_software as get_versions_software, server_update_version_software as update_version_software, } from "../helpers/versions_software_server";
73
75
  // Storage and tokens
74
76
  export { generateSignedUrl, generateSignedUrlsBatch, } from "../helpers/storage";
@@ -52,6 +52,8 @@ export type IHerdInvitationWithHerdSlug = Database["public"]["CompositeTypes"]["
52
52
  export type IHerdAllowedDomain = Database["public"]["Tables"]["herd_allowed_domains"]["Row"];
53
53
  export type HerdInvitationStatus = Database["public"]["Enums"]["herd_invitation_status"];
54
54
  export type IHerd = Database["public"]["Tables"]["herds"]["Row"];
55
+ export type HerdMediaCapsUpdate = Pick<Database["public"]["Tables"]["herds"]["Update"], "media_max_storage_bytes" | "media_max_daily_allowed_uploads_bytes">;
56
+ export type IHerdMediaUsage = Database["public"]["Tables"]["herd_media_usage"]["Row"];
55
57
  export type ISession = Database["public"]["Tables"]["sessions"]["Row"];
56
58
  export type IConnectivity = Database["public"]["Tables"]["connectivity"]["Row"];
57
59
  export type IHeartbeat = Database["public"]["Tables"]["heartbeats"]["Row"];
@@ -201,6 +203,7 @@ export type IPartWithProduct = IPart & {
201
203
  product?: IProduct | null;
202
204
  };
203
205
  export type IUserCredential = Database["public"]["Tables"]["user_credentials"]["Row"];
206
+ export type IUserLastActivity = Database["public"]["Tables"]["user_last_activity"]["Row"];
204
207
  export type IHerdCredential = Database["public"]["Tables"]["herd_credentials"]["Row"];
205
208
  export type IPointsForUser = Database["public"]["Tables"]["points_for_user"]["Row"];
206
209
  export type ICertificate = Database["public"]["Tables"]["certificates"]["Row"];
@@ -1,8 +1,10 @@
1
+ import type { IArtifact } from "./db";
1
2
  export declare enum EnumRealtimeOperation {
2
3
  INSERT = 0,
3
4
  UPDATE = 1,
4
5
  DELETE = 2
5
6
  }
7
+ export type ArtifactRealtimeRow = Pick<IArtifact, "id" | "device_id">;
6
8
  export type RealtimeData<T> = {
7
9
  data: T;
8
10
  operation: EnumRealtimeOperation;
@@ -1152,6 +1152,7 @@ export type Database = {
1152
1152
  issuer_id: number | null;
1153
1153
  localization_id: number | null;
1154
1154
  name: string;
1155
+ system_tag: string | null;
1155
1156
  uses_expiry: boolean;
1156
1157
  };
1157
1158
  Insert: {
@@ -1168,6 +1169,7 @@ export type Database = {
1168
1169
  issuer_id?: number | null;
1169
1170
  localization_id?: number | null;
1170
1171
  name: string;
1172
+ system_tag?: string | null;
1171
1173
  uses_expiry?: boolean;
1172
1174
  };
1173
1175
  Update: {
@@ -1184,6 +1186,7 @@ export type Database = {
1184
1186
  issuer_id?: number | null;
1185
1187
  localization_id?: number | null;
1186
1188
  name?: string;
1189
+ system_tag?: string | null;
1187
1190
  uses_expiry?: boolean;
1188
1191
  };
1189
1192
  Relationships: [
@@ -1393,6 +1396,7 @@ export type Database = {
1393
1396
  embedding: string;
1394
1397
  event_id: number | null;
1395
1398
  frame_index: number;
1399
+ frame_index_end: number;
1396
1400
  id: number;
1397
1401
  origin_heading: number | null;
1398
1402
  origin_height: number | null;
@@ -1403,6 +1407,7 @@ export type Database = {
1403
1407
  sensor_roll: number | null;
1404
1408
  sensor_yaw: number | null;
1405
1409
  timestamp_observation: string | null;
1410
+ timestamp_observation_end: string | null;
1406
1411
  };
1407
1412
  Insert: {
1408
1413
  artifact_id?: number | null;
@@ -1410,6 +1415,7 @@ export type Database = {
1410
1415
  embedding: string;
1411
1416
  event_id?: number | null;
1412
1417
  frame_index?: number;
1418
+ frame_index_end?: number;
1413
1419
  id?: number;
1414
1420
  origin_heading?: number | null;
1415
1421
  origin_height?: number | null;
@@ -1420,6 +1426,7 @@ export type Database = {
1420
1426
  sensor_roll?: number | null;
1421
1427
  sensor_yaw?: number | null;
1422
1428
  timestamp_observation?: string | null;
1429
+ timestamp_observation_end?: string | null;
1423
1430
  };
1424
1431
  Update: {
1425
1432
  artifact_id?: number | null;
@@ -1427,6 +1434,7 @@ export type Database = {
1427
1434
  embedding?: string;
1428
1435
  event_id?: number | null;
1429
1436
  frame_index?: number;
1437
+ frame_index_end?: number;
1430
1438
  id?: number;
1431
1439
  origin_heading?: number | null;
1432
1440
  origin_height?: number | null;
@@ -1437,6 +1445,7 @@ export type Database = {
1437
1445
  sensor_roll?: number | null;
1438
1446
  sensor_yaw?: number | null;
1439
1447
  timestamp_observation?: string | null;
1448
+ timestamp_observation_end?: string | null;
1440
1449
  };
1441
1450
  Relationships: [
1442
1451
  {
@@ -1835,6 +1844,35 @@ export type Database = {
1835
1844
  }
1836
1845
  ];
1837
1846
  };
1847
+ herd_media_usage: {
1848
+ Row: {
1849
+ herd_id: number;
1850
+ id: number;
1851
+ inserted_at: string;
1852
+ storage_bytes: number;
1853
+ };
1854
+ Insert: {
1855
+ herd_id: number;
1856
+ id?: number;
1857
+ inserted_at?: string;
1858
+ storage_bytes: number;
1859
+ };
1860
+ Update: {
1861
+ herd_id?: number;
1862
+ id?: number;
1863
+ inserted_at?: string;
1864
+ storage_bytes?: number;
1865
+ };
1866
+ Relationships: [
1867
+ {
1868
+ foreignKeyName: "herd_media_usage_herd_id_fkey";
1869
+ columns: ["herd_id"];
1870
+ isOneToOne: false;
1871
+ referencedRelation: "herds";
1872
+ referencedColumns: ["id"];
1873
+ }
1874
+ ];
1875
+ };
1838
1876
  herd_operating_permissions: {
1839
1877
  Row: {
1840
1878
  herd_id: number;
@@ -1969,6 +2007,8 @@ export type Database = {
1969
2007
  is_public: boolean;
1970
2008
  localization_id: number | null;
1971
2009
  location: unknown;
2010
+ media_max_daily_allowed_uploads_bytes: number | null;
2011
+ media_max_storage_bytes: number | null;
1972
2012
  slug: string;
1973
2013
  video_server_url: string | null;
1974
2014
  };
@@ -1982,6 +2022,8 @@ export type Database = {
1982
2022
  is_public?: boolean;
1983
2023
  localization_id?: number | null;
1984
2024
  location?: unknown;
2025
+ media_max_daily_allowed_uploads_bytes?: number | null;
2026
+ media_max_storage_bytes?: number | null;
1985
2027
  slug: string;
1986
2028
  video_server_url?: string | null;
1987
2029
  };
@@ -1995,6 +2037,8 @@ export type Database = {
1995
2037
  is_public?: boolean;
1996
2038
  localization_id?: number | null;
1997
2039
  location?: unknown;
2040
+ media_max_daily_allowed_uploads_bytes?: number | null;
2041
+ media_max_storage_bytes?: number | null;
1998
2042
  slug?: string;
1999
2043
  video_server_url?: string | null;
2000
2044
  };
@@ -2133,6 +2177,7 @@ export type Database = {
2133
2177
  image: string | null;
2134
2178
  is_serviceable: boolean;
2135
2179
  part_id: number | null;
2180
+ post_remediation_media_uri: string | null;
2136
2181
  remediation_completed_at: string | null;
2137
2182
  remediation_completed_user_id: string | null;
2138
2183
  remediation_notes: string | null;
@@ -2150,6 +2195,7 @@ export type Database = {
2150
2195
  image?: string | null;
2151
2196
  is_serviceable?: boolean;
2152
2197
  part_id?: number | null;
2198
+ post_remediation_media_uri?: string | null;
2153
2199
  remediation_completed_at?: string | null;
2154
2200
  remediation_completed_user_id?: string | null;
2155
2201
  remediation_notes?: string | null;
@@ -2167,6 +2213,7 @@ export type Database = {
2167
2213
  image?: string | null;
2168
2214
  is_serviceable?: boolean;
2169
2215
  part_id?: number | null;
2216
+ post_remediation_media_uri?: string | null;
2170
2217
  remediation_completed_at?: string | null;
2171
2218
  remediation_completed_user_id?: string | null;
2172
2219
  remediation_notes?: string | null;
@@ -4802,6 +4849,32 @@ export type Database = {
4802
4849
  }
4803
4850
  ];
4804
4851
  };
4852
+ user_last_activity: {
4853
+ Row: {
4854
+ inserted_at: string;
4855
+ last_active_at: string;
4856
+ user_id: string;
4857
+ };
4858
+ Insert: {
4859
+ inserted_at?: string;
4860
+ last_active_at?: string;
4861
+ user_id: string;
4862
+ };
4863
+ Update: {
4864
+ inserted_at?: string;
4865
+ last_active_at?: string;
4866
+ user_id?: string;
4867
+ };
4868
+ Relationships: [
4869
+ {
4870
+ foreignKeyName: "user_last_activity_user_id_fkey";
4871
+ columns: ["user_id"];
4872
+ isOneToOne: true;
4873
+ referencedRelation: "users";
4874
+ referencedColumns: ["id"];
4875
+ }
4876
+ ];
4877
+ };
4805
4878
  users: {
4806
4879
  Row: {
4807
4880
  auto_approve_sessions: boolean;
@@ -5214,6 +5287,12 @@ export type Database = {
5214
5287
  isSetofReturn: false;
5215
5288
  };
5216
5289
  };
5290
+ custom_access_token_hook: {
5291
+ Args: {
5292
+ event: Json;
5293
+ };
5294
+ Returns: Json;
5295
+ };
5217
5296
  delete_all_orphaned_sessions: {
5218
5297
  Args: {
5219
5298
  min_age_seconds?: number;
@@ -6060,6 +6139,7 @@ export type Database = {
6060
6139
  image: string | null;
6061
6140
  is_serviceable: boolean;
6062
6141
  part_id: number | null;
6142
+ post_remediation_media_uri: string | null;
6063
6143
  remediation_completed_at: string | null;
6064
6144
  remediation_completed_user_id: string | null;
6065
6145
  remediation_notes: string | null;
@@ -6894,6 +6974,10 @@ export type Database = {
6894
6974
  event_id: number | null;
6895
6975
  artifact_id: number | null;
6896
6976
  confidence: number | null;
6977
+ frame_index: number | null;
6978
+ frame_index_end: number | null;
6979
+ timestamp_observation: string | null;
6980
+ timestamp_observation_end: string | null;
6897
6981
  };
6898
6982
  event_and_tags: {
6899
6983
  id: number | null;
@@ -6997,6 +7081,8 @@ export type Database = {
6997
7081
  localization_id: number | null;
6998
7082
  localization_region: string | null;
6999
7083
  video_server_url: string | null;
7084
+ media_max_storage_bytes: number | null;
7085
+ media_max_daily_allowed_uploads_bytes: number | null;
7000
7086
  };
7001
7087
  pins_pretty_location: {
7002
7088
  id: number | null;
@@ -7097,9 +7183,9 @@ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
7097
7183
  type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
7098
7184
  export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
7099
7185
  schema: keyof DatabaseWithoutInternals;
7100
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
7186
+ }, TableName extends (DefaultSchemaTableNameOrOptions extends {
7101
7187
  schema: keyof DatabaseWithoutInternals;
7102
- } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
7188
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never) = never> = DefaultSchemaTableNameOrOptions extends {
7103
7189
  schema: keyof DatabaseWithoutInternals;
7104
7190
  } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
7105
7191
  Row: infer R;
@@ -7108,9 +7194,9 @@ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema[
7108
7194
  } ? R : never : never;
7109
7195
  export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
7110
7196
  schema: keyof DatabaseWithoutInternals;
7111
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
7197
+ }, TableName extends (DefaultSchemaTableNameOrOptions extends {
7112
7198
  schema: keyof DatabaseWithoutInternals;
7113
- } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
7199
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never) = never> = DefaultSchemaTableNameOrOptions extends {
7114
7200
  schema: keyof DatabaseWithoutInternals;
7115
7201
  } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
7116
7202
  Insert: infer I;
@@ -7119,9 +7205,9 @@ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSc
7119
7205
  } ? I : never : never;
7120
7206
  export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
7121
7207
  schema: keyof DatabaseWithoutInternals;
7122
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
7208
+ }, TableName extends (DefaultSchemaTableNameOrOptions extends {
7123
7209
  schema: keyof DatabaseWithoutInternals;
7124
- } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
7210
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never) = never> = DefaultSchemaTableNameOrOptions extends {
7125
7211
  schema: keyof DatabaseWithoutInternals;
7126
7212
  } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
7127
7213
  Update: infer U;
@@ -7130,16 +7216,16 @@ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSc
7130
7216
  } ? U : never : never;
7131
7217
  export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
7132
7218
  schema: keyof DatabaseWithoutInternals;
7133
- }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
7219
+ }, EnumName extends (DefaultSchemaEnumNameOrOptions extends {
7134
7220
  schema: keyof DatabaseWithoutInternals;
7135
- } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
7221
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never) = never> = DefaultSchemaEnumNameOrOptions extends {
7136
7222
  schema: keyof DatabaseWithoutInternals;
7137
7223
  } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
7138
7224
  export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
7139
7225
  schema: keyof DatabaseWithoutInternals;
7140
- }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
7226
+ }, CompositeTypeName extends (PublicCompositeTypeNameOrOptions extends {
7141
7227
  schema: keyof DatabaseWithoutInternals;
7142
- } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
7228
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never) = never> = PublicCompositeTypeNameOrOptions extends {
7143
7229
  schema: keyof DatabaseWithoutInternals;
7144
7230
  } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
7145
7231
  export declare const Constants: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "2.0.13",
3
+ "version": "2.0.15",
4
4
  "description": "Core utilities and helpers for Adventure Labs Scout applications",
5
5
  "exports": {
6
6
  "./client": {