@adventurelabs/scout-core 1.0.18 → 1.0.19

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.
@@ -171,9 +171,13 @@ export async function get_event_and_tags_by_event_id(event_id) {
171
171
  data: null,
172
172
  };
173
173
  }
174
- // Debug the location data structure
174
+ // Debug the raw event data from database
175
175
  console.log("Raw event data from DB:", {
176
176
  eventId: data[0].id,
177
+ mediaUrl: data[0].media_url,
178
+ filePath: data[0].file_path,
179
+ message: data[0].message,
180
+ deviceId: data[0].device_id,
177
181
  location: data[0].location,
178
182
  locationType: typeof data[0].location,
179
183
  hasCoordinates: data[0].location &&
@@ -230,8 +234,22 @@ export async function get_event_and_tags_by_event_id(event_id) {
230
234
  is_public: data[0].is_public,
231
235
  tags: data[0].tags || [],
232
236
  earthranger_url: data[0].earthranger_url,
237
+ file_path: data[0].file_path,
233
238
  };
239
+ // Debug before signed URL generation
240
+ console.log("Before signed URL generation:", {
241
+ eventId: transformedData.id,
242
+ mediaUrl: transformedData.media_url,
243
+ filePath: transformedData.file_path,
244
+ hasFilePath: !!transformedData.file_path,
245
+ });
234
246
  // Add signed URL to event using the same client
235
247
  const eventWithSignedUrl = await addSignedUrlToEvent(transformedData, supabase);
248
+ // Debug after signed URL generation
249
+ console.log("After signed URL generation:", {
250
+ eventId: eventWithSignedUrl.id,
251
+ mediaUrl: eventWithSignedUrl.media_url,
252
+ filePath: eventWithSignedUrl.file_path,
253
+ });
236
254
  return IWebResponse.success(eventWithSignedUrl).to_compatible();
237
255
  }
@@ -18,6 +18,7 @@ export type IUserRolePerHerd = Database["public"]["Tables"]["users_roles_per_her
18
18
  export type IHerd = Database["public"]["Tables"]["herds"]["Row"];
19
19
  export type IEventWithTags = Database["public"]["CompositeTypes"]["event_with_tags"] & {
20
20
  earthranger_url: string | null;
21
+ file_path: string | null;
21
22
  };
22
23
  export type IDevicePrettyLocation = Database["public"]["CompositeTypes"]["device_pretty_location"];
23
24
  export type IEventAndTagsPrettyLocation = Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
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",