@adventurelabs/scout-core 2.0.17 → 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.
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +4 -0
- package/dist/helpers/cache.d.ts +4 -4
- package/dist/helpers/cache.js +52 -17
- package/dist/helpers/eventMedia.d.ts +6 -4
- package/dist/helpers/eventMedia.js +7 -6
- package/dist/helpers/gallery.d.ts +4 -0
- package/dist/helpers/gallery.js +5 -0
- package/dist/helpers/gallery.queries.d.ts +14 -0
- package/dist/helpers/gallery.queries.js +49 -0
- package/dist/helpers/galleryMedia.d.ts +9 -0
- package/dist/helpers/galleryMedia.js +41 -0
- package/dist/helpers/herd_modules.queries.js +14 -6
- package/dist/helpers/lifecycle_server.d.ts +2 -1
- package/dist/helpers/mediaRows.d.ts +12 -0
- package/dist/helpers/mediaRows.js +80 -0
- package/dist/helpers/mediaState.d.ts +33 -0
- package/dist/helpers/mediaState.js +86 -0
- package/dist/helpers/media_urls.d.ts +2 -1
- package/dist/helpers/media_urls.js +13 -2
- package/dist/helpers/parts.d.ts +7 -2
- package/dist/helpers/parts.js +16 -7
- package/dist/helpers/parts_server.d.ts +1 -1
- package/dist/helpers/product_catalog.d.ts +9 -0
- package/dist/helpers/product_catalog.js +36 -0
- package/dist/helpers/session_incidents_server.d.ts +5 -0
- package/dist/helpers/storage_internal.d.ts +4 -3
- package/dist/helpers/storage_internal.js +46 -14
- package/dist/helpers/tags.queries.js +2 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useInfiniteQuery.d.ts +3 -1
- package/dist/hooks/useInfiniteQuery.js +37 -43
- package/dist/hooks/useScoutRealtimeBroadcast.d.ts +4 -0
- package/dist/hooks/useScoutRealtimeBroadcast.js +76 -11
- package/dist/hooks/useScoutRefresh.js +18 -11
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.js +4 -0
- package/dist/store/api.d.ts +389 -9
- package/dist/store/api.js +163 -75
- package/dist/store/configureStore.d.ts +4 -0
- package/dist/store/hooks.d.ts +4 -1
- package/dist/store/hooks.js +16 -0
- package/dist/store/scout.d.ts +4 -2
- package/dist/store/scout.js +21 -2
- package/dist/types/db.d.ts +19 -5
- package/dist/types/herd_module.d.ts +12 -1
- package/dist/types/supabase.d.ts +92 -12
- package/package.json +4 -2
package/dist/types/supabase.d.ts
CHANGED
|
@@ -269,7 +269,7 @@ export type Database = {
|
|
|
269
269
|
timestamp_observation: string | null;
|
|
270
270
|
timestamp_observation_end: string;
|
|
271
271
|
tracked_at: string | null;
|
|
272
|
-
updated_at: string
|
|
272
|
+
updated_at: string;
|
|
273
273
|
};
|
|
274
274
|
Insert: {
|
|
275
275
|
created_at?: string;
|
|
@@ -295,7 +295,7 @@ export type Database = {
|
|
|
295
295
|
timestamp_observation?: string | null;
|
|
296
296
|
timestamp_observation_end?: string;
|
|
297
297
|
tracked_at?: string | null;
|
|
298
|
-
updated_at?: string
|
|
298
|
+
updated_at?: string;
|
|
299
299
|
};
|
|
300
300
|
Update: {
|
|
301
301
|
created_at?: string;
|
|
@@ -321,7 +321,7 @@ export type Database = {
|
|
|
321
321
|
timestamp_observation?: string | null;
|
|
322
322
|
timestamp_observation_end?: string;
|
|
323
323
|
tracked_at?: string | null;
|
|
324
|
-
updated_at?: string
|
|
324
|
+
updated_at?: string;
|
|
325
325
|
};
|
|
326
326
|
Relationships: [
|
|
327
327
|
{
|
|
@@ -1516,6 +1516,7 @@ export type Database = {
|
|
|
1516
1516
|
thumbnail_generated_at: string | null;
|
|
1517
1517
|
timestamp_observation: string;
|
|
1518
1518
|
tracked_at: string | null;
|
|
1519
|
+
updated_at: string;
|
|
1519
1520
|
};
|
|
1520
1521
|
Insert: {
|
|
1521
1522
|
altitude?: number;
|
|
@@ -1554,6 +1555,7 @@ export type Database = {
|
|
|
1554
1555
|
thumbnail_generated_at?: string | null;
|
|
1555
1556
|
timestamp_observation?: string;
|
|
1556
1557
|
tracked_at?: string | null;
|
|
1558
|
+
updated_at?: string;
|
|
1557
1559
|
};
|
|
1558
1560
|
Update: {
|
|
1559
1561
|
altitude?: number;
|
|
@@ -1592,6 +1594,7 @@ export type Database = {
|
|
|
1592
1594
|
thumbnail_generated_at?: string | null;
|
|
1593
1595
|
timestamp_observation?: string;
|
|
1594
1596
|
tracked_at?: string | null;
|
|
1597
|
+
updated_at?: string;
|
|
1595
1598
|
};
|
|
1596
1599
|
Relationships: [
|
|
1597
1600
|
{
|
|
@@ -4465,6 +4468,7 @@ export type Database = {
|
|
|
4465
4468
|
operator: string | null;
|
|
4466
4469
|
photo: string | null;
|
|
4467
4470
|
session_id: number;
|
|
4471
|
+
timestamp_observation: string | null;
|
|
4468
4472
|
updated_at: string;
|
|
4469
4473
|
updated_by: string | null;
|
|
4470
4474
|
};
|
|
@@ -4486,6 +4490,7 @@ export type Database = {
|
|
|
4486
4490
|
operator?: string | null;
|
|
4487
4491
|
photo?: string | null;
|
|
4488
4492
|
session_id: number;
|
|
4493
|
+
timestamp_observation?: string | null;
|
|
4489
4494
|
updated_at?: string;
|
|
4490
4495
|
updated_by?: string | null;
|
|
4491
4496
|
};
|
|
@@ -4507,6 +4512,7 @@ export type Database = {
|
|
|
4507
4512
|
operator?: string | null;
|
|
4508
4513
|
photo?: string | null;
|
|
4509
4514
|
session_id?: number;
|
|
4515
|
+
timestamp_observation?: string | null;
|
|
4510
4516
|
updated_at?: string;
|
|
4511
4517
|
updated_by?: string | null;
|
|
4512
4518
|
};
|
|
@@ -5417,7 +5423,7 @@ export type Database = {
|
|
|
5417
5423
|
timestamp_observation: string | null;
|
|
5418
5424
|
timestamp_observation_end: string;
|
|
5419
5425
|
tracked_at: string | null;
|
|
5420
|
-
updated_at: string
|
|
5426
|
+
updated_at: string;
|
|
5421
5427
|
}[];
|
|
5422
5428
|
SetofOptions: {
|
|
5423
5429
|
from: "*";
|
|
@@ -5455,7 +5461,7 @@ export type Database = {
|
|
|
5455
5461
|
timestamp_observation: string | null;
|
|
5456
5462
|
timestamp_observation_end: string;
|
|
5457
5463
|
tracked_at: string | null;
|
|
5458
|
-
updated_at: string
|
|
5464
|
+
updated_at: string;
|
|
5459
5465
|
}[];
|
|
5460
5466
|
SetofOptions: {
|
|
5461
5467
|
from: "*";
|
|
@@ -5494,7 +5500,7 @@ export type Database = {
|
|
|
5494
5500
|
timestamp_observation: string | null;
|
|
5495
5501
|
timestamp_observation_end: string;
|
|
5496
5502
|
tracked_at: string | null;
|
|
5497
|
-
updated_at: string
|
|
5503
|
+
updated_at: string;
|
|
5498
5504
|
}[];
|
|
5499
5505
|
SetofOptions: {
|
|
5500
5506
|
from: "*";
|
|
@@ -5533,7 +5539,7 @@ export type Database = {
|
|
|
5533
5539
|
timestamp_observation: string | null;
|
|
5534
5540
|
timestamp_observation_end: string;
|
|
5535
5541
|
tracked_at: string | null;
|
|
5536
|
-
updated_at: string
|
|
5542
|
+
updated_at: string;
|
|
5537
5543
|
}[];
|
|
5538
5544
|
SetofOptions: {
|
|
5539
5545
|
from: "*";
|
|
@@ -5573,7 +5579,7 @@ export type Database = {
|
|
|
5573
5579
|
timestamp_observation: string | null;
|
|
5574
5580
|
timestamp_observation_end: string;
|
|
5575
5581
|
tracked_at: string | null;
|
|
5576
|
-
updated_at: string
|
|
5582
|
+
updated_at: string;
|
|
5577
5583
|
}[];
|
|
5578
5584
|
SetofOptions: {
|
|
5579
5585
|
from: "*";
|
|
@@ -5613,7 +5619,7 @@ export type Database = {
|
|
|
5613
5619
|
timestamp_observation: string | null;
|
|
5614
5620
|
timestamp_observation_end: string;
|
|
5615
5621
|
tracked_at: string | null;
|
|
5616
|
-
updated_at: string
|
|
5622
|
+
updated_at: string;
|
|
5617
5623
|
}[];
|
|
5618
5624
|
SetofOptions: {
|
|
5619
5625
|
from: "*";
|
|
@@ -5654,7 +5660,7 @@ export type Database = {
|
|
|
5654
5660
|
timestamp_observation: string | null;
|
|
5655
5661
|
timestamp_observation_end: string;
|
|
5656
5662
|
tracked_at: string | null;
|
|
5657
|
-
updated_at: string
|
|
5663
|
+
updated_at: string;
|
|
5658
5664
|
}[];
|
|
5659
5665
|
SetofOptions: {
|
|
5660
5666
|
from: "*";
|
|
@@ -5694,7 +5700,7 @@ export type Database = {
|
|
|
5694
5700
|
timestamp_observation: string | null;
|
|
5695
5701
|
timestamp_observation_end: string;
|
|
5696
5702
|
tracked_at: string | null;
|
|
5697
|
-
updated_at: string
|
|
5703
|
+
updated_at: string;
|
|
5698
5704
|
}[];
|
|
5699
5705
|
SetofOptions: {
|
|
5700
5706
|
from: "*";
|
|
@@ -5735,7 +5741,7 @@ export type Database = {
|
|
|
5735
5741
|
timestamp_observation: string | null;
|
|
5736
5742
|
timestamp_observation_end: string;
|
|
5737
5743
|
tracked_at: string | null;
|
|
5738
|
-
updated_at: string
|
|
5744
|
+
updated_at: string;
|
|
5739
5745
|
}[];
|
|
5740
5746
|
SetofOptions: {
|
|
5741
5747
|
from: "*";
|
|
@@ -6086,6 +6092,55 @@ export type Database = {
|
|
|
6086
6092
|
isSetofReturn: true;
|
|
6087
6093
|
};
|
|
6088
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
|
+
};
|
|
6089
6144
|
get_health_metrics_summary: {
|
|
6090
6145
|
Args: {
|
|
6091
6146
|
p_device_id: number;
|
|
@@ -7031,6 +7086,8 @@ export type Database = {
|
|
|
7031
7086
|
thumbnail_generated_at: string | null;
|
|
7032
7087
|
proxy_file_path: string | null;
|
|
7033
7088
|
proxy_generated_at: string | null;
|
|
7089
|
+
processing_blocked_at: string | null;
|
|
7090
|
+
processing_blocked_reason: string | null;
|
|
7034
7091
|
};
|
|
7035
7092
|
event_plus_tags: {
|
|
7036
7093
|
id: number | null;
|
|
@@ -7070,6 +7127,29 @@ export type Database = {
|
|
|
7070
7127
|
event_data: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"] | null;
|
|
7071
7128
|
artifact_data: Database["public"]["Tables"]["artifacts"]["Row"] | null;
|
|
7072
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
|
+
};
|
|
7073
7153
|
herd_invitation_with_herd_slug: {
|
|
7074
7154
|
id: number | null;
|
|
7075
7155
|
email: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adventurelabs/scout-core",
|
|
3
|
-
"version": "2.0
|
|
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",
|