@adventurelabs/scout-core 1.0.49 → 1.0.51

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.
@@ -75,7 +75,7 @@ export async function server_list_api_keys_batch(device_ids) {
75
75
  result[device_id] = [];
76
76
  }
77
77
  result[device_id].push({
78
- id: item.api_key_id.toString(),
78
+ id: item.api_key_id, // Now a string, no need for toString()
79
79
  key: item.api_key_key,
80
80
  });
81
81
  });
@@ -207,9 +207,9 @@ export async function server_get_events_and_tags_for_devices_batch(device_ids, l
207
207
  if (!eventsByDevice[device_id]) {
208
208
  eventsByDevice[device_id] = [];
209
209
  }
210
- // Create event object from the database function structure
210
+ // Create event object from the event_and_tags_pretty_location structure
211
211
  const event = {
212
- id: row.event_id,
212
+ id: row.id, // Changed from row.event_id to row.id
213
213
  inserted_at: row.inserted_at,
214
214
  message: row.message,
215
215
  media_url: row.media_url,
@@ -750,7 +750,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", {
750
750
  };
751
751
  Returns: {
752
752
  device_id: number;
753
- api_key_id: number;
753
+ api_key_id: string;
754
754
  api_key_key: string;
755
755
  }[];
756
756
  };
@@ -759,24 +759,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", {
759
759
  device_ids: number[];
760
760
  limit_per_device: number;
761
761
  };
762
- Returns: {
763
- event_id: number;
764
- inserted_at: string;
765
- message: string | null;
766
- media_url: string | null;
767
- file_path: string | null;
768
- latitude: number | null;
769
- longitude: number | null;
770
- earthranger_url: string | null;
771
- altitude: number;
772
- heading: number;
773
- media_type: string;
774
- device_id: number;
775
- timestamp_observation: string;
776
- is_public: boolean;
777
- tags: import("../types/supabase").Json;
778
- herd_id: number | null;
779
- }[];
762
+ Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
780
763
  };
781
764
  };
782
765
  Enums: {
@@ -741,7 +741,7 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
741
741
  };
742
742
  Returns: {
743
743
  device_id: number;
744
- api_key_id: number;
744
+ api_key_id: string;
745
745
  api_key_key: string;
746
746
  }[];
747
747
  };
@@ -750,24 +750,7 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
750
750
  device_ids: number[];
751
751
  limit_per_device: number;
752
752
  };
753
- Returns: {
754
- event_id: number;
755
- inserted_at: string;
756
- message: string | null;
757
- media_url: string | null;
758
- file_path: string | null;
759
- latitude: number | null;
760
- longitude: number | null;
761
- earthranger_url: string | null;
762
- altitude: number;
763
- heading: number;
764
- media_type: string;
765
- device_id: number;
766
- timestamp_observation: string;
767
- is_public: boolean;
768
- tags: import("../types/supabase").Json;
769
- herd_id: number | null;
770
- }[];
753
+ Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
771
754
  };
772
755
  };
773
756
  Enums: {
@@ -808,7 +808,7 @@ export type Database = {
808
808
  };
809
809
  Returns: {
810
810
  device_id: number;
811
- api_key_id: number;
811
+ api_key_id: string;
812
812
  api_key_key: string;
813
813
  }[];
814
814
  };
@@ -817,24 +817,7 @@ export type Database = {
817
817
  device_ids: number[];
818
818
  limit_per_device: number;
819
819
  };
820
- Returns: {
821
- event_id: number;
822
- inserted_at: string;
823
- message: string | null;
824
- media_url: string | null;
825
- file_path: string | null;
826
- latitude: number | null;
827
- longitude: number | null;
828
- earthranger_url: string | null;
829
- altitude: number;
830
- heading: number;
831
- media_type: string;
832
- device_id: number;
833
- timestamp_observation: string;
834
- is_public: boolean;
835
- tags: Json;
836
- herd_id: number | null;
837
- }[];
820
+ Returns: Database["public"]["CompositeTypes"]["event_and_tags_pretty_location"][];
838
821
  };
839
822
  };
840
823
  Enums: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
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",