@adventurelabs/scout-core 2.0.18 → 2.1.0

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 (48) hide show
  1. package/dist/client/index.d.ts +4 -0
  2. package/dist/client/index.js +4 -0
  3. package/dist/helpers/cache.d.ts +4 -4
  4. package/dist/helpers/cache.js +52 -17
  5. package/dist/helpers/eventMedia.d.ts +6 -4
  6. package/dist/helpers/eventMedia.js +7 -6
  7. package/dist/helpers/gallery.d.ts +4 -0
  8. package/dist/helpers/gallery.js +5 -0
  9. package/dist/helpers/gallery.queries.d.ts +14 -0
  10. package/dist/helpers/gallery.queries.js +49 -0
  11. package/dist/helpers/galleryMedia.d.ts +9 -0
  12. package/dist/helpers/galleryMedia.js +41 -0
  13. package/dist/helpers/herd_modules.queries.js +14 -6
  14. package/dist/helpers/mediaRows.d.ts +12 -0
  15. package/dist/helpers/mediaRows.js +80 -0
  16. package/dist/helpers/mediaState.d.ts +33 -0
  17. package/dist/helpers/mediaState.js +86 -0
  18. package/dist/helpers/media_urls.d.ts +2 -1
  19. package/dist/helpers/media_urls.js +13 -2
  20. package/dist/helpers/parts.d.ts +7 -2
  21. package/dist/helpers/parts.js +16 -7
  22. package/dist/helpers/parts_server.d.ts +1 -1
  23. package/dist/helpers/product_catalog.d.ts +9 -0
  24. package/dist/helpers/product_catalog.js +36 -0
  25. package/dist/helpers/session_incidents_server.d.ts +5 -0
  26. package/dist/helpers/storage_internal.d.ts +4 -3
  27. package/dist/helpers/storage_internal.js +46 -14
  28. package/dist/helpers/tags.queries.js +2 -0
  29. package/dist/hooks/index.d.ts +1 -1
  30. package/dist/hooks/index.js +1 -1
  31. package/dist/hooks/useInfiniteQuery.d.ts +3 -1
  32. package/dist/hooks/useInfiniteQuery.js +37 -43
  33. package/dist/hooks/useScoutRealtimeBroadcast.d.ts +4 -0
  34. package/dist/hooks/useScoutRealtimeBroadcast.js +76 -11
  35. package/dist/hooks/useScoutRefresh.js +18 -11
  36. package/dist/server/index.d.ts +5 -0
  37. package/dist/server/index.js +4 -0
  38. package/dist/store/api.d.ts +389 -9
  39. package/dist/store/api.js +163 -75
  40. package/dist/store/configureStore.d.ts +4 -0
  41. package/dist/store/hooks.d.ts +4 -1
  42. package/dist/store/hooks.js +16 -0
  43. package/dist/store/scout.d.ts +4 -2
  44. package/dist/store/scout.js +21 -2
  45. package/dist/types/db.d.ts +19 -5
  46. package/dist/types/herd_module.d.ts +12 -1
  47. package/dist/types/supabase.d.ts +77 -0
  48. package/package.json +4 -2
@@ -4468,6 +4468,7 @@ export type Database = {
4468
4468
  operator: string | null;
4469
4469
  photo: string | null;
4470
4470
  session_id: number;
4471
+ timestamp_observation: string | null;
4471
4472
  updated_at: string;
4472
4473
  updated_by: string | null;
4473
4474
  };
@@ -4489,6 +4490,7 @@ export type Database = {
4489
4490
  operator?: string | null;
4490
4491
  photo?: string | null;
4491
4492
  session_id: number;
4493
+ timestamp_observation?: string | null;
4492
4494
  updated_at?: string;
4493
4495
  updated_by?: string | null;
4494
4496
  };
@@ -4510,6 +4512,7 @@ export type Database = {
4510
4512
  operator?: string | null;
4511
4513
  photo?: string | null;
4512
4514
  session_id?: number;
4515
+ timestamp_observation?: string | null;
4513
4516
  updated_at?: string;
4514
4517
  updated_by?: string | null;
4515
4518
  };
@@ -6089,6 +6092,55 @@ export type Database = {
6089
6092
  isSetofReturn: true;
6090
6093
  };
6091
6094
  };
6095
+ get_gallery_infinite_by_device: {
6096
+ Args: {
6097
+ cursor_feed_type?: string;
6098
+ cursor_id?: number;
6099
+ cursor_timestamp?: string;
6100
+ device_id_caller: number;
6101
+ limit_caller?: number;
6102
+ range_end?: string;
6103
+ range_start?: string;
6104
+ };
6105
+ Returns: Database["public"]["CompositeTypes"]["gallery_item"][];
6106
+ SetofOptions: {
6107
+ from: "*";
6108
+ to: "gallery_item";
6109
+ isOneToOne: false;
6110
+ isSetofReturn: true;
6111
+ };
6112
+ };
6113
+ get_gallery_infinite_by_herd: {
6114
+ Args: {
6115
+ cursor_feed_type?: string;
6116
+ cursor_id?: number;
6117
+ cursor_timestamp?: string;
6118
+ herd_id_caller: number;
6119
+ limit_caller?: number;
6120
+ range_end?: string;
6121
+ range_start?: string;
6122
+ };
6123
+ Returns: Database["public"]["CompositeTypes"]["gallery_item"][];
6124
+ SetofOptions: {
6125
+ from: "*";
6126
+ to: "gallery_item";
6127
+ isOneToOne: false;
6128
+ isSetofReturn: true;
6129
+ };
6130
+ };
6131
+ get_gallery_items_by_ids: {
6132
+ Args: {
6133
+ artifact_ids?: number[];
6134
+ event_ids?: number[];
6135
+ };
6136
+ Returns: Database["public"]["CompositeTypes"]["gallery_item"][];
6137
+ SetofOptions: {
6138
+ from: "*";
6139
+ to: "gallery_item";
6140
+ isOneToOne: false;
6141
+ isSetofReturn: true;
6142
+ };
6143
+ };
6092
6144
  get_health_metrics_summary: {
6093
6145
  Args: {
6094
6146
  p_device_id: number;
@@ -7034,6 +7086,8 @@ export type Database = {
7034
7086
  thumbnail_generated_at: string | null;
7035
7087
  proxy_file_path: string | null;
7036
7088
  proxy_generated_at: string | null;
7089
+ processing_blocked_at: string | null;
7090
+ processing_blocked_reason: string | null;
7037
7091
  };
7038
7092
  event_plus_tags: {
7039
7093
  id: number | null;
@@ -7073,6 +7127,29 @@ export type Database = {
7073
7127
  event_data: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"] | null;
7074
7128
  artifact_data: Database["public"]["Tables"]["artifacts"]["Row"] | null;
7075
7129
  };
7130
+ gallery_item: {
7131
+ feed_type: string | null;
7132
+ id: number | null;
7133
+ sort_ts: string | null;
7134
+ device_id: number | null;
7135
+ herd_id: number | null;
7136
+ session_id: number | null;
7137
+ timestamp_observation: string | null;
7138
+ message: string | null;
7139
+ media_type: Database["public"]["Enums"]["media_type"] | null;
7140
+ modality: string | null;
7141
+ file_path: string | null;
7142
+ media_url: string | null;
7143
+ thumbnail_file_path: string | null;
7144
+ thumbnail_generated_at: string | null;
7145
+ proxy_file_path: string | null;
7146
+ proxy_generated_at: string | null;
7147
+ processing_blocked_at: string | null;
7148
+ processing_blocked_reason: string | null;
7149
+ latitude: number | null;
7150
+ longitude: number | null;
7151
+ tag_count: number | null;
7152
+ };
7076
7153
  herd_invitation_with_herd_slug: {
7077
7154
  id: number | null;
7078
7155
  email: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "2.0.18",
3
+ "version": "2.1.0",
4
4
  "description": "Core utilities and helpers for Adventure Labs Scout applications",
5
5
  "exports": {
6
6
  "./client": {
@@ -61,6 +61,7 @@
61
61
  "prepare": "yarn build",
62
62
  "dev": "tsc --watch",
63
63
  "clean": "rm -rf dist",
64
+ "test": "vitest run",
64
65
  "migrate-storage-paths-device-prefix": "node scripts/migrate-storage-paths-device-prefix.mjs"
65
66
  },
66
67
  "keywords": [
@@ -101,7 +102,8 @@
101
102
  "react": ">=18.0.0",
102
103
  "react-dom": ">=18.0.0",
103
104
  "react-redux": ">=9.0.0",
104
- "typescript": "^5.0.0"
105
+ "typescript": "^5.0.0",
106
+ "vitest": "^3"
105
107
  },
106
108
  "dependencies": {
107
109
  "dequal": "^2.0.3",