@placeos/ts-client 4.8.3 → 4.8.5

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.
@@ -7,6 +7,8 @@ export interface PlaceZoneQueryOptions extends PlaceResourceQueryOptions {
7
7
  tags?: string;
8
8
  /** ID of the system to filter the results */
9
9
  control_system_id?: string;
10
+ /** Whether zones should include a count of their children */
11
+ include_children_count?: boolean;
10
12
  }
11
13
  /** Mapping of available query parameters for the zones show endpoint */
12
14
  export interface PlaceZoneShowOptions {
@@ -33,6 +33,8 @@ export declare class PlaceZone extends PlaceResource {
33
33
  readonly type: string;
34
34
  /** Count of resources associated with the zone */
35
35
  readonly count: number;
36
+ /** Count of child zones for this zone */
37
+ readonly children_count?: number;
36
38
  /** Amount of physical capacity associated with the zone */
37
39
  readonly capacity: number;
38
40
  /** ID or URL of or in a map associated with the zone */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.8.3",
2
+ "version": "4.8.5",
3
3
  "license": "MIT",
4
4
  "name": "@placeos/ts-client",
5
5
  "author": "Alex Sorafumo <alex@place.tech>",
@@ -10,7 +10,11 @@ import {
10
10
  import { PlaceResourceQueryOptions } from '../resources/interface';
11
11
  import { PlaceTrigger } from '../triggers/trigger';
12
12
  import { HashMap } from '../utilities/types';
13
- import { PlaceZoneMetadataQueryOptions, PlaceZoneQueryOptions, PlaceZoneShowOptions } from './interfaces';
13
+ import {
14
+ PlaceZoneMetadataQueryOptions,
15
+ PlaceZoneQueryOptions,
16
+ PlaceZoneShowOptions,
17
+ } from './interfaces';
14
18
  import { PlaceZone } from './zone';
15
19
 
16
20
  /**
@@ -8,6 +8,8 @@ export interface PlaceZoneQueryOptions extends PlaceResourceQueryOptions {
8
8
  tags?: string;
9
9
  /** ID of the system to filter the results */
10
10
  control_system_id?: string;
11
+ /** Whether zones should include a count of their children */
12
+ include_children_count?: boolean;
11
13
  }
12
14
 
13
15
  /** Mapping of available query parameters for the zones show endpoint */
package/src/zones/zone.ts CHANGED
@@ -36,6 +36,8 @@ export class PlaceZone extends PlaceResource {
36
36
  public readonly type: string;
37
37
  /** Count of resources associated with the zone */
38
38
  public readonly count: number;
39
+ /** Count of child zones for this zone */
40
+ public readonly children_count?: number;
39
41
  /** Amount of physical capacity associated with the zone */
40
42
  public readonly capacity: number;
41
43
  /** ID or URL of or in a map associated with the zone */
@@ -69,6 +71,8 @@ export class PlaceZone extends PlaceResource {
69
71
  this.timezone = raw_data.timezone || '';
70
72
  this.images = raw_data.images || [];
71
73
  this.playlists = raw_data.playlists || [];
74
+ if (isFinite(Number(raw_data.children_count)))
75
+ this.children_count = raw_data.children_count;
72
76
  if (typeof this.settings !== 'object') {
73
77
  (this as any).settings = [null, null, null, null];
74
78
  }