@placeos/ts-client 4.7.0 → 4.7.2
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/alerts/alert.d.ts +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/signage/functions.d.ts +5 -0
- package/dist/triggers/trigger.d.ts +1 -0
- package/package.json +1 -1
- package/src/alerts/alert.ts +3 -0
- package/src/signage/functions.ts +9 -0
- package/src/triggers/trigger.ts +3 -0
|
@@ -45,6 +45,11 @@ export declare function addSignageMedia(form_data: Partial<SignageMedia>): impor
|
|
|
45
45
|
* @param query_params Query parameters to add the to request URL
|
|
46
46
|
*/
|
|
47
47
|
export declare function removeSignageMedia(id: string, query_params?: Record<string, any>): import('rxjs').Observable<import('../utilities/types').HashMap<any>>;
|
|
48
|
+
/**
|
|
49
|
+
* Get the thumbnail URL for a media item.
|
|
50
|
+
* This is the endpoint resolves to the image for the media item's thumbnail.
|
|
51
|
+
*/
|
|
52
|
+
export declare function mediaThumbnail(id: string): string;
|
|
48
53
|
/**
|
|
49
54
|
* Query the available playlists
|
|
50
55
|
* @param query_params Query parameters to add the to request URL
|
|
@@ -38,6 +38,7 @@ export declare class PlaceTrigger extends PlaceResource {
|
|
|
38
38
|
readonly trigger_id: string;
|
|
39
39
|
/** List of playlist IDs associated with the system */
|
|
40
40
|
readonly playlists: readonly string[];
|
|
41
|
+
readonly any_match: boolean;
|
|
41
42
|
/** ID of the system associated with the trigger */
|
|
42
43
|
get system_id(): string;
|
|
43
44
|
/** Actions to perform when the trigger is activated */
|
package/package.json
CHANGED
package/src/alerts/alert.ts
CHANGED
|
@@ -24,6 +24,8 @@ export class PlaceAlert extends PlaceResource {
|
|
|
24
24
|
public readonly alert_type: AlertType;
|
|
25
25
|
// How often should this alert should be raised when triggered
|
|
26
26
|
public readonly debounce_period: number;
|
|
27
|
+
// Whether condition checks should match any single condition to pass or all of them
|
|
28
|
+
public readonly any_match: boolean;
|
|
27
29
|
|
|
28
30
|
constructor(data: Partial<PlaceAlert>) {
|
|
29
31
|
super(data);
|
|
@@ -40,5 +42,6 @@ export class PlaceAlert extends PlaceResource {
|
|
|
40
42
|
this.alert_dashboard_id = data.alert_dashboard_id || '';
|
|
41
43
|
this.alert_dashboard_details =
|
|
42
44
|
data.alert_dashboard_details || undefined;
|
|
45
|
+
this.any_match = data.any_match || false;
|
|
43
46
|
}
|
|
44
47
|
}
|
package/src/signage/functions.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { create, query, remove, show, update } from '../api';
|
|
2
|
+
import { apiEndpoint } from '../auth';
|
|
2
3
|
import { HttpJsonOptions } from '../http/interfaces';
|
|
3
4
|
import { task } from '../resources/functions';
|
|
4
5
|
import { SignageMediaQueryOptions, SignageMetrics } from './interfaces';
|
|
@@ -117,6 +118,14 @@ export function removeSignageMedia(
|
|
|
117
118
|
return remove({ id, query_params, path: MEDIA_PATH });
|
|
118
119
|
}
|
|
119
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Get the thumbnail URL for a media item.
|
|
123
|
+
* This is the endpoint resolves to the image for the media item's thumbnail.
|
|
124
|
+
*/
|
|
125
|
+
export function mediaThumbnail(id: string): string {
|
|
126
|
+
return `${apiEndpoint()}/${MEDIA_PATH}/${id}/thumbnail`;
|
|
127
|
+
}
|
|
128
|
+
|
|
120
129
|
/**
|
|
121
130
|
* @private
|
|
122
131
|
*/
|
package/src/triggers/trigger.ts
CHANGED
|
@@ -40,6 +40,8 @@ export class PlaceTrigger extends PlaceResource {
|
|
|
40
40
|
public readonly trigger_id: string;
|
|
41
41
|
/** List of playlist IDs associated with the system */
|
|
42
42
|
public readonly playlists: readonly string[];
|
|
43
|
+
// Whether condition checks should match any single condition to pass or all of them
|
|
44
|
+
public readonly any_match: boolean;
|
|
43
45
|
|
|
44
46
|
/** ID of the system associated with the trigger */
|
|
45
47
|
public get system_id(): string {
|
|
@@ -103,5 +105,6 @@ export class PlaceTrigger extends PlaceResource {
|
|
|
103
105
|
raw_data.activated_count || raw_data.trigger_count || 0;
|
|
104
106
|
this.playlists = raw_data.playlists || [];
|
|
105
107
|
this.trigger_id = raw_data.trigger_id || '';
|
|
108
|
+
this.any_match = raw_data.any_match || false;
|
|
106
109
|
}
|
|
107
110
|
}
|