@adventurelabs/scout-core 1.0.121 → 1.0.122
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.
package/dist/helpers/devices.js
CHANGED
|
@@ -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
|
|
6
|
-
const { data, error } = await client.rpc("
|
|
5
|
+
// call get_devices_with_components_for_herd with rpc
|
|
6
|
+
const { data, error } = await client.rpc("get_devices_with_components_for_herd", {
|
|
7
7
|
herd_id_caller: herd_id,
|
|
8
8
|
});
|
|
9
9
|
if (!data) {
|
|
@@ -18,7 +18,7 @@ export async function get_device_by_id(device_id, client) {
|
|
|
18
18
|
if (!client) {
|
|
19
19
|
client = await newServerClient();
|
|
20
20
|
}
|
|
21
|
-
const { data, error } = await client.rpc("
|
|
21
|
+
const { data, error } = await client.rpc("get_device_with_components_by_id", {
|
|
22
22
|
device_id_caller: device_id,
|
|
23
23
|
});
|
|
24
24
|
if (!data) {
|
|
@@ -1160,7 +1160,31 @@ export declare function useSupabase(): SupabaseClient<Database, "public", "publi
|
|
|
1160
1160
|
};
|
|
1161
1161
|
Returns: number;
|
|
1162
1162
|
};
|
|
1163
|
+
get_device_with_components_by_id: {
|
|
1164
|
+
Args: {
|
|
1165
|
+
device_id_caller: number;
|
|
1166
|
+
};
|
|
1167
|
+
Returns: Database["public"]["CompositeTypes"]["device_with_components"];
|
|
1168
|
+
SetofOptions: {
|
|
1169
|
+
from: "*";
|
|
1170
|
+
to: "device_with_components";
|
|
1171
|
+
isOneToOne: true;
|
|
1172
|
+
isSetofReturn: false;
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1163
1175
|
get_devices_for_herd: {
|
|
1176
|
+
Args: {
|
|
1177
|
+
herd_id_caller: number;
|
|
1178
|
+
};
|
|
1179
|
+
Returns: Database["public"]["CompositeTypes"]["device_pretty_location"][];
|
|
1180
|
+
SetofOptions: {
|
|
1181
|
+
from: "*";
|
|
1182
|
+
to: "device_pretty_location";
|
|
1183
|
+
isOneToOne: false;
|
|
1184
|
+
isSetofReturn: true;
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
get_devices_with_components_for_herd: {
|
|
1164
1188
|
Args: {
|
|
1165
1189
|
herd_id_caller: number;
|
|
1166
1190
|
};
|
package/dist/types/supabase.d.ts
CHANGED
|
@@ -1214,7 +1214,31 @@ export type Database = {
|
|
|
1214
1214
|
};
|
|
1215
1215
|
Returns: number;
|
|
1216
1216
|
};
|
|
1217
|
+
get_device_with_components_by_id: {
|
|
1218
|
+
Args: {
|
|
1219
|
+
device_id_caller: number;
|
|
1220
|
+
};
|
|
1221
|
+
Returns: Database["public"]["CompositeTypes"]["device_with_components"];
|
|
1222
|
+
SetofOptions: {
|
|
1223
|
+
from: "*";
|
|
1224
|
+
to: "device_with_components";
|
|
1225
|
+
isOneToOne: true;
|
|
1226
|
+
isSetofReturn: false;
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1217
1229
|
get_devices_for_herd: {
|
|
1230
|
+
Args: {
|
|
1231
|
+
herd_id_caller: number;
|
|
1232
|
+
};
|
|
1233
|
+
Returns: Database["public"]["CompositeTypes"]["device_pretty_location"][];
|
|
1234
|
+
SetofOptions: {
|
|
1235
|
+
from: "*";
|
|
1236
|
+
to: "device_pretty_location";
|
|
1237
|
+
isOneToOne: false;
|
|
1238
|
+
isSetofReturn: true;
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
get_devices_with_components_for_herd: {
|
|
1218
1242
|
Args: {
|
|
1219
1243
|
herd_id_caller: number;
|
|
1220
1244
|
};
|