@adventurelabs/scout-core 1.0.42 → 1.0.43

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.
@@ -1,5 +1,5 @@
1
1
  import { IApiKeyScout } from "../types/db";
2
2
  export declare function server_list_api_keys(device_id: string): Promise<IApiKeyScout[]>;
3
- export declare function server_list_api_keys_batch(device_ids: number[]): Promise<{
3
+ export declare function server_list_api_keys_batch(device_ids: string[]): Promise<{
4
4
  [device_id: number]: IApiKeyScout[];
5
5
  }>;
@@ -5,7 +5,7 @@ export declare function server_delete_tags_by_ids(tag_ids: number[]): Promise<IW
5
5
  export declare function server_update_tags(tags: ITag[]): Promise<IWebResponseCompatible<ITag[]>>;
6
6
  export declare function server_get_more_events_with_tags_by_herd(herd_id: number, offset: number, page_count?: number): Promise<IWebResponseCompatible<IEventWithTags[]>>;
7
7
  export declare function server_get_events_and_tags_for_device(device_id: number, limit?: number): Promise<IWebResponseCompatible<IEventWithTags[]>>;
8
- export declare function server_get_events_and_tags_for_devices_batch(device_ids: number[], limit?: number): Promise<IWebResponseCompatible<{
8
+ export declare function server_get_events_and_tags_for_devices_batch(device_ids: string[], limit?: number): Promise<IWebResponseCompatible<{
9
9
  [device_id: number]: IEventWithTags[];
10
10
  }>>;
11
11
  export declare function get_event_and_tags_by_event_id(event_id: number): Promise<IWebResponseCompatible<IEventWithTags>>;
@@ -746,7 +746,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", {
746
746
  };
747
747
  load_api_keys_batch: {
748
748
  Args: {
749
- device_ids: number[];
749
+ device_ids: string[];
750
750
  };
751
751
  Returns: {
752
752
  device_id: number;
@@ -756,7 +756,7 @@ export declare function useSupabase(): SupabaseClient<Database, "public", {
756
756
  };
757
757
  get_events_and_tags_for_devices_batch: {
758
758
  Args: {
759
- device_ids: number[];
759
+ device_ids: string[];
760
760
  limit_per_device: number;
761
761
  };
762
762
  Returns: {
@@ -737,7 +737,7 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
737
737
  };
738
738
  load_api_keys_batch: {
739
739
  Args: {
740
- device_ids: number[];
740
+ device_ids: string[];
741
741
  };
742
742
  Returns: {
743
743
  device_id: number;
@@ -747,7 +747,7 @@ export declare function newServerClient(): Promise<import("@supabase/supabase-js
747
747
  };
748
748
  get_events_and_tags_for_devices_batch: {
749
749
  Args: {
750
- device_ids: number[];
750
+ device_ids: string[];
751
751
  limit_per_device: number;
752
752
  };
753
753
  Returns: {
@@ -61,7 +61,7 @@ export class HerdModule {
61
61
  if (new_devices.length > 0) {
62
62
  const batchStartTime = Date.now();
63
63
  try {
64
- const device_ids = new_devices.map((device) => device.id ?? 0);
64
+ const device_ids = new_devices.map((device) => (device.id ?? 0).toString());
65
65
  console.log(`[HerdModule] Starting parallel batch load for ${device_ids.length} devices at ${new Date().toISOString()}:`, device_ids);
66
66
  // Load API keys and events in parallel
67
67
  console.log(`[HerdModule] Initiating Promise.all for API keys and events...`);
@@ -804,7 +804,7 @@ export type Database = {
804
804
  };
805
805
  load_api_keys_batch: {
806
806
  Args: {
807
- device_ids: number[];
807
+ device_ids: string[];
808
808
  };
809
809
  Returns: {
810
810
  device_id: number;
@@ -814,7 +814,7 @@ export type Database = {
814
814
  };
815
815
  get_events_and_tags_for_devices_batch: {
816
816
  Args: {
817
- device_ids: number[];
817
+ device_ids: string[];
818
818
  limit_per_device: number;
819
819
  };
820
820
  Returns: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
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",