@adventurelabs/scout-core 1.4.87 → 1.4.89

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.
@@ -107,9 +107,10 @@ export const get_parts_by_status = get_parts_by_lifecycle;
107
107
  * @param newPart - Part data to create
108
108
  */
109
109
  export async function create_part(client, newPart) {
110
- // Validate required fields
111
- if (!newPart.device_id) {
112
- return IWebResponse.error("Device ID is required").to_compatible();
110
+ // part is scoped to exactly one of a device or a herd.
111
+ const scope_count = [newPart.device_id, newPart.herd_id].filter((scope) => scope != null).length;
112
+ if (scope_count !== 1) {
113
+ return IWebResponse.error("exactly one of device_id or herd_id is required").to_compatible();
113
114
  }
114
115
  if (!newPart.serial_number) {
115
116
  return IWebResponse.error("Serial number is required").to_compatible();
@@ -4691,6 +4691,8 @@ export type Database = {
4691
4691
  longitude: number | null;
4692
4692
  auto_delete_media_with_humans: boolean | null;
4693
4693
  auto_delete_media_with_no_tracks: boolean | null;
4694
+ localization_id: number | null;
4695
+ localization_region: string | null;
4694
4696
  };
4695
4697
  pins_pretty_location: {
4696
4698
  id: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.4.87",
3
+ "version": "1.4.89",
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",