@adventurelabs/scout-core 1.0.9 → 1.0.10

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.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Gets the media URL for an event (signed URL if file_path exists, otherwise media_url)
3
+ * @param event - Event object that may have file_path or media_url
4
+ * @returns string | null - The media URL or null if none available
5
+ */
6
+ export declare function getEventMediaUrl(event: any): string | null;
7
+ /**
8
+ * Checks if an event has any media URL available
9
+ * @param event - Event object
10
+ * @returns boolean - True if event has any media URL
11
+ */
12
+ export declare function hasEventMedia(event: any): boolean;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Gets the media URL for an event (signed URL if file_path exists, otherwise media_url)
3
+ * @param event - Event object that may have file_path or media_url
4
+ * @returns string | null - The media URL or null if none available
5
+ */
6
+ export function getEventMediaUrl(event) {
7
+ return event.media_url || null;
8
+ }
9
+ /**
10
+ * Checks if an event has any media URL available
11
+ * @param event - Event object
12
+ * @returns boolean - True if event has any media URL
13
+ */
14
+ export function hasEventMedia(event) {
15
+ return !!(event.media_url || event.file_path);
16
+ }
@@ -22,15 +22,3 @@ export declare function addSignedUrlsToEvents(events: any[], supabaseClient?: Su
22
22
  * @returns Promise<Object> - Event with signed URL set as media_url
23
23
  */
24
24
  export declare function addSignedUrlToEvent(event: any, supabaseClient?: SupabaseClient<Database>): Promise<any>;
25
- /**
26
- * Gets the media URL for an event (signed URL if file_path exists, otherwise media_url)
27
- * @param event - Event object that may have file_path or media_url
28
- * @returns string | null - The media URL or null if none available
29
- */
30
- export declare function getEventMediaUrl(event: any): string | null;
31
- /**
32
- * Checks if an event has any media URL available
33
- * @param event - Event object
34
- * @returns boolean - True if event has any media URL
35
- */
36
- export declare function hasEventMedia(event: any): boolean;
@@ -64,19 +64,3 @@ export async function addSignedUrlToEvent(event, supabaseClient) {
64
64
  // If no file_path, keep existing media_url
65
65
  return event;
66
66
  }
67
- /**
68
- * Gets the media URL for an event (signed URL if file_path exists, otherwise media_url)
69
- * @param event - Event object that may have file_path or media_url
70
- * @returns string | null - The media URL or null if none available
71
- */
72
- export function getEventMediaUrl(event) {
73
- return event.media_url || null;
74
- }
75
- /**
76
- * Checks if an event has any media URL available
77
- * @param event - Event object
78
- * @returns boolean - True if event has any media URL
79
- */
80
- export function hasEventMedia(event) {
81
- return !!(event.media_url || event.file_path);
82
- }
package/dist/index.d.ts CHANGED
@@ -25,6 +25,7 @@ export * from "./helpers/users";
25
25
  export * from "./helpers/web";
26
26
  export * from "./helpers/zones";
27
27
  export * from "./helpers/storage";
28
+ export * from "./helpers/eventUtils";
28
29
  export * from "./hooks/useScoutDbListener";
29
30
  export * from "./hooks/useScoutRefresh";
30
31
  export * from "./providers";
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ export * from "./helpers/users";
28
28
  export * from "./helpers/web";
29
29
  export * from "./helpers/zones";
30
30
  export * from "./helpers/storage";
31
+ export * from "./helpers/eventUtils";
31
32
  // Hooks
32
33
  export * from "./hooks/useScoutDbListener";
33
34
  export * from "./hooks/useScoutRefresh";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Core utilities and helpers for Adventure Labs Scout applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",