@adventurelabs/scout-core 1.0.124 → 1.0.125

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.
@@ -2,8 +2,8 @@
2
2
  import { newServerClient } from "../supabase/server";
3
3
  import { IWebResponse } from "../types/requests";
4
4
  export async function get_devices_by_herd(herd_id, client) {
5
- // call get_devices_with_components_for_herd with rpc
6
- const { data, error } = await client.rpc("get_devices_with_components_for_herd", {
5
+ // call get_devices_for_herd with rpc
6
+ const { data, error } = await client.rpc("get_devices_for_herd", {
7
7
  herd_id_caller: herd_id,
8
8
  });
9
9
  if (!data) {
@@ -6,9 +6,8 @@ export type DeviceType = Database["public"]["Enums"]["device_type"];
6
6
  export type MediaType = Database["public"]["Enums"]["media_type"];
7
7
  export type TagObservationType = Database["public"]["Enums"]["tag_observation_type"];
8
8
  export type IUser = User;
9
- export type IDevice = Database["public"]["CompositeTypes"]["device_with_components"] & {
9
+ export type IDevice = Database["public"]["CompositeTypes"]["device_pretty_location"] & {
10
10
  api_keys_scout?: IApiKeyScout[];
11
- recent_events?: IEventAndTagsPrettyLocation[];
12
11
  };
13
12
  export type IEvent = Database["public"]["Tables"]["events"]["Row"];
14
13
  export type ITag = Database["public"]["Tables"]["tags"]["Row"];
@@ -30,31 +29,6 @@ export type IArtifact = Database["public"]["Tables"]["artifacts"]["Row"];
30
29
  export type IArtifactWithMediaUrl = IArtifact & {
31
30
  media_url?: string | null;
32
31
  };
33
- export type IComponentInfo = {
34
- id: number;
35
- serial_number: string;
36
- product_number: string | null;
37
- certificate_id: number | null;
38
- status: Database["public"]["Enums"]["component_status"];
39
- created_at: string;
40
- updated_at: string | null;
41
- };
42
- export type IDeviceWithComponents = {
43
- id: number;
44
- inserted_at: string;
45
- created_by: string | null;
46
- herd_id: number;
47
- device_type: Database["public"]["Enums"]["device_type"];
48
- domain_name: string | null;
49
- location: string | null;
50
- altitude: number | null;
51
- heading: number | null;
52
- name: string | null;
53
- description: string | null;
54
- latitude: number | null;
55
- longitude: number | null;
56
- components: IComponentInfo[];
57
- };
58
32
  export type ComponentInsert = Database["public"]["Tables"]["components"]["Insert"];
59
33
  export type VersionsSoftwareInsert = Database["public"]["Tables"]["versions_software"]["Insert"];
60
34
  export type ArtifactInsert = Database["public"]["Tables"]["artifacts"]["Insert"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.0.124",
3
+ "version": "1.0.125",
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",