@placeos/ts-client 4.5.0 → 4.7.0
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/functions.d.ts +7 -10
- package/dist/alerts/interfaces.d.ts +22 -0
- package/dist/api.d.ts +32 -19
- package/dist/applications/functions.d.ts +2 -5
- package/dist/applications/interfaces.d.ts +5 -11
- package/dist/assets/assets.class.d.ts +62 -0
- package/dist/assets/functions.d.ts +146 -0
- package/dist/assets/interfaces.d.ts +38 -0
- package/dist/clusters/functions.d.ts +16 -7
- package/dist/clusters/interfaces.d.ts +18 -3
- package/dist/domains/functions.d.ts +10 -6
- package/dist/drivers/functions.d.ts +3 -5
- package/dist/drivers/interfaces.d.ts +9 -7
- package/dist/edge/functions.d.ts +8 -7
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2695 -2081
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/ldap-sources/functions.d.ts +2 -5
- package/dist/metadata/functions.d.ts +8 -9
- package/dist/metadata/interfaces.d.ts +18 -4
- package/dist/modules/functions.d.ts +10 -4
- package/dist/modules/interfaces.d.ts +14 -12
- package/dist/oauth-sources/functions.d.ts +2 -5
- package/dist/repositories/functions.d.ts +17 -29
- package/dist/repositories/interfaces.d.ts +31 -3
- package/dist/resources/interface.d.ts +9 -4
- package/dist/saml-sources/functions.d.ts +4 -7
- package/dist/settings/functions.d.ts +6 -8
- package/dist/settings/interfaces.d.ts +7 -0
- package/dist/short-url/functions.d.ts +60 -0
- package/dist/short-url/interfaces.d.ts +22 -0
- package/dist/short-url/short-url.class.d.ts +17 -0
- package/dist/signage/interfaces.d.ts +9 -1
- package/dist/storages/functions.d.ts +31 -0
- package/dist/storages/interfaces.d.ts +6 -0
- package/dist/storages/storage.class.d.ts +18 -0
- package/dist/systems/functions.d.ts +38 -10
- package/dist/systems/interfaces.d.ts +58 -5
- package/dist/triggers/functions.d.ts +5 -7
- package/dist/triggers/interfaces.d.ts +9 -0
- package/dist/users/functions.d.ts +50 -10
- package/dist/users/interfaces.d.ts +35 -2
- package/dist/webrtc/functions.d.ts +52 -0
- package/dist/webrtc/interfaces.d.ts +73 -0
- package/dist/zones/functions.d.ts +12 -6
- package/dist/zones/interfaces.d.ts +9 -4
- package/package.json +1 -1
- package/src/alerts/functions.ts +14 -22
- package/src/alerts/interfaces.ts +25 -0
- package/src/api.ts +148 -3
- package/src/applications/functions.ts +4 -7
- package/src/applications/interfaces.ts +6 -12
- package/src/assets/assets.class.ts +123 -0
- package/src/assets/functions.ts +440 -0
- package/src/assets/interfaces.ts +41 -0
- package/src/clusters/functions.ts +39 -8
- package/src/clusters/interfaces.ts +21 -3
- package/src/domains/functions.ts +17 -6
- package/src/drivers/functions.ts +4 -6
- package/src/drivers/interfaces.ts +11 -7
- package/src/edge/functions.ts +18 -10
- package/src/ldap-sources/functions.ts +4 -7
- package/src/metadata/functions.ts +16 -10
- package/src/metadata/interfaces.ts +20 -4
- package/src/modules/functions.ts +29 -7
- package/src/modules/interfaces.ts +15 -12
- package/src/oauth-sources/functions.ts +4 -7
- package/src/repositories/functions.ts +35 -35
- package/src/repositories/interfaces.ts +35 -3
- package/src/resources/interface.ts +9 -4
- package/src/saml-sources/functions.ts +6 -9
- package/src/settings/functions.ts +14 -10
- package/src/settings/interfaces.ts +8 -0
- package/src/short-url/functions.ts +155 -0
- package/src/short-url/interfaces.ts +25 -0
- package/src/short-url/short-url.class.ts +33 -0
- package/src/signage/interfaces.ts +10 -1
- package/src/storages/functions.ts +88 -0
- package/src/storages/interfaces.ts +7 -0
- package/src/storages/storage.class.ts +34 -0
- package/src/systems/functions.ts +113 -13
- package/src/systems/interfaces.ts +65 -5
- package/src/triggers/functions.ts +9 -8
- package/src/triggers/interfaces.ts +10 -0
- package/src/users/functions.ts +104 -9
- package/src/users/interfaces.ts +40 -2
- package/src/webrtc/functions.ts +120 -0
- package/src/webrtc/interfaces.ts +77 -0
- package/src/zones/functions.ts +28 -7
- package/src/zones/interfaces.ts +10 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Storage type enumeration */
|
|
2
|
+
export type StorageType = 's3' | 'azure' | 'google';
|
|
3
|
+
export declare class PlaceStorage {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly storage_type: StorageType | null;
|
|
6
|
+
readonly bucket_name: string;
|
|
7
|
+
readonly region: string;
|
|
8
|
+
readonly access_key: string;
|
|
9
|
+
readonly access_secret: string;
|
|
10
|
+
readonly authority_id: string;
|
|
11
|
+
readonly endpoint: string;
|
|
12
|
+
readonly is_default: boolean;
|
|
13
|
+
readonly ext_filter: string[];
|
|
14
|
+
readonly mime_filter: string[];
|
|
15
|
+
readonly created_at: number;
|
|
16
|
+
readonly updated_at: number;
|
|
17
|
+
constructor(data: Partial<PlaceStorage>);
|
|
18
|
+
}
|
|
@@ -3,7 +3,7 @@ import { PlaceSettings } from '../settings/settings';
|
|
|
3
3
|
import { PlaceTrigger } from '../triggers/trigger';
|
|
4
4
|
import { HashMap } from '../utilities/types';
|
|
5
5
|
import { PlaceZone } from '../zones/zone';
|
|
6
|
-
import { PlaceModuleFunctionMap, PlaceSystemsQueryOptions } from './interfaces';
|
|
6
|
+
import { PlaceModuleFunctionMap, PlaceSystemControlOptions, PlaceSystemMetadataOptions, PlaceSystemShowOptions, PlaceSystemsQueryOptions, PlaceSystemsWithEmailsOptions, PlaceSystemStartStopOptions, PlaceSystemTriggerShowOptions, PlaceSystemTriggersQueryOptions } from './interfaces';
|
|
7
7
|
import { PlaceSystem } from './system';
|
|
8
8
|
/**
|
|
9
9
|
* Query the available systems
|
|
@@ -11,16 +11,16 @@ import { PlaceSystem } from './system';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function querySystems(query_params?: PlaceSystemsQueryOptions): import('..').QueryResponse<PlaceSystem>;
|
|
13
13
|
/**
|
|
14
|
-
* Query the available systems
|
|
14
|
+
* Query the available systems by email addresses
|
|
15
15
|
* @param query_params Query parameters to add the to request URL
|
|
16
16
|
*/
|
|
17
|
-
export declare function querySystemsWithEmails(query_params
|
|
17
|
+
export declare function querySystemsWithEmails(query_params: PlaceSystemsWithEmailsOptions): import('..').QueryResponse<PlaceSystem>;
|
|
18
18
|
/**
|
|
19
19
|
* Get the data for a system
|
|
20
20
|
* @param id ID of the system to retrieve
|
|
21
21
|
* @param query_params Query parameters to add the to request URL
|
|
22
22
|
*/
|
|
23
|
-
export declare function showSystem(id: string, query_params?:
|
|
23
|
+
export declare function showSystem(id: string, query_params?: PlaceSystemShowOptions): Observable<PlaceSystem>;
|
|
24
24
|
/**
|
|
25
25
|
* Update the system in the database
|
|
26
26
|
* @param id ID of the system
|
|
@@ -36,11 +36,10 @@ export declare function updateSystem(id: string, form_data: Partial<PlaceSystem>
|
|
|
36
36
|
*/
|
|
37
37
|
export declare function addSystem(form_data: Partial<PlaceSystem>): Observable<PlaceSystem>;
|
|
38
38
|
/**
|
|
39
|
-
* Remove
|
|
39
|
+
* Remove a system from the database
|
|
40
40
|
* @param id ID of the system
|
|
41
|
-
* @param query_params Query parameters to add the to request URL
|
|
42
41
|
*/
|
|
43
|
-
export declare function removeSystem(id: string
|
|
42
|
+
export declare function removeSystem(id: string): Observable<HashMap<any>>;
|
|
44
43
|
/**
|
|
45
44
|
* Add module to the given system
|
|
46
45
|
* @param id System ID
|
|
@@ -56,13 +55,15 @@ export declare function removeSystemModule(id: string, module_id: string): Obser
|
|
|
56
55
|
/**
|
|
57
56
|
* Start the given system and clears any existing caches
|
|
58
57
|
* @param id System ID
|
|
58
|
+
* @param query_params Query parameters to add the to request URL
|
|
59
59
|
*/
|
|
60
|
-
export declare function startSystem(id: string): Observable<void>;
|
|
60
|
+
export declare function startSystem(id: string, query_params?: PlaceSystemStartStopOptions): Observable<void>;
|
|
61
61
|
/**
|
|
62
62
|
* Stops all modules in the given system
|
|
63
63
|
* @param id System ID
|
|
64
|
+
* @param query_params Query parameters to add the to request URL
|
|
64
65
|
*/
|
|
65
|
-
export declare function stopSystem(id: string): Observable<void>;
|
|
66
|
+
export declare function stopSystem(id: string, query_params?: PlaceSystemStartStopOptions): Observable<void>;
|
|
66
67
|
/**
|
|
67
68
|
* Execute a function of the given system module
|
|
68
69
|
* @param id System ID
|
|
@@ -116,8 +117,9 @@ export declare function listSystemZones(id: string): import('..').QueryResponse<
|
|
|
116
117
|
/**
|
|
117
118
|
* Get list of triggers for system
|
|
118
119
|
* @param id System ID
|
|
120
|
+
* @param query_params Query parameters to add the to request URL
|
|
119
121
|
*/
|
|
120
|
-
export declare function listSystemTriggers(id: string): import('..').QueryResponse<PlaceTrigger>;
|
|
122
|
+
export declare function listSystemTriggers(id: string, query_params?: PlaceSystemTriggersQueryOptions): import('..').QueryResponse<PlaceTrigger>;
|
|
121
123
|
/**
|
|
122
124
|
* Get list of triggers for system
|
|
123
125
|
* @param id System ID
|
|
@@ -135,3 +137,29 @@ export declare function removeSystemTrigger(id: string, trigger_id: string): Obs
|
|
|
135
137
|
* @param id System ID
|
|
136
138
|
*/
|
|
137
139
|
export declare function systemSettings(id: string): Observable<PlaceSettings[]>;
|
|
140
|
+
/**
|
|
141
|
+
* Get the websocket API endpoint URL for system control.
|
|
142
|
+
* @param query_params Query parameters to add to the URL
|
|
143
|
+
*/
|
|
144
|
+
export declare function systemControlUrl(query_params?: PlaceSystemControlOptions): string;
|
|
145
|
+
/**
|
|
146
|
+
* Get metadata for the system
|
|
147
|
+
* @param id System ID
|
|
148
|
+
* @param query_params Query parameters to add to the request
|
|
149
|
+
*/
|
|
150
|
+
export declare function systemMetadata(id: string, query_params?: PlaceSystemMetadataOptions): Observable<HashMap>;
|
|
151
|
+
/**
|
|
152
|
+
* Get a particular trigger instance
|
|
153
|
+
* @param sys_id System ID
|
|
154
|
+
* @param trig_id Trigger ID
|
|
155
|
+
* @param query_params Query parameters to add to the request
|
|
156
|
+
*/
|
|
157
|
+
export declare function showSystemTrigger(sys_id: string, trig_id: string, query_params?: PlaceSystemTriggerShowOptions): Observable<PlaceTrigger>;
|
|
158
|
+
/**
|
|
159
|
+
* Update the details of a trigger instance
|
|
160
|
+
* @param sys_id System ID
|
|
161
|
+
* @param trig_id Trigger ID
|
|
162
|
+
* @param data Values for trigger properties
|
|
163
|
+
* @param method HTTP verb to use on request. Defaults to `patch`
|
|
164
|
+
*/
|
|
165
|
+
export declare function updateSystemTrigger(sys_id: string, trig_id: string, data: Partial<PlaceTrigger>, method?: 'put' | 'patch'): Observable<PlaceTrigger>;
|
|
@@ -12,17 +12,70 @@ export interface PlaceModuleFunction {
|
|
|
12
12
|
}
|
|
13
13
|
/** Allowable query parameters for systems index endpoint */
|
|
14
14
|
export interface PlaceSystemsQueryOptions extends PlaceResourceQueryOptions {
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/** Return only bookable or non-bookable rooms (returns both when not specified) */
|
|
16
|
+
bookable?: boolean;
|
|
17
|
+
/** Return only rooms with capacity equal or greater than provided */
|
|
18
|
+
capacity?: number;
|
|
19
|
+
/** Return only systems whose resource address matches one of the emails provided */
|
|
20
|
+
email?: string;
|
|
21
|
+
/** Comma separated list of features. Return only rooms with all requested features */
|
|
22
|
+
features?: string;
|
|
23
|
+
/** Return only systems which have this module ID */
|
|
24
|
+
module_id?: string;
|
|
25
|
+
/** Return systems using this trigger ID */
|
|
26
|
+
trigger_id?: string;
|
|
17
27
|
/** Zone ID to filter the returned values on */
|
|
18
28
|
zone_id?: string;
|
|
19
|
-
/**
|
|
20
|
-
|
|
29
|
+
/** Return systems which are public */
|
|
30
|
+
public?: boolean;
|
|
21
31
|
/** Only return systems that have signage capabilities */
|
|
22
32
|
signage?: boolean;
|
|
23
33
|
}
|
|
34
|
+
/** Allowable query parameters for systems with_emails endpoint */
|
|
35
|
+
export interface PlaceSystemsWithEmailsOptions {
|
|
36
|
+
/** Comma separated list of email addresses (required) */
|
|
37
|
+
in: string;
|
|
38
|
+
}
|
|
24
39
|
/** Allowable query parameters for systems show endpoint */
|
|
25
40
|
export interface PlaceSystemShowOptions {
|
|
26
|
-
/**
|
|
41
|
+
/** Return the system with zone, module, and driver information collected */
|
|
42
|
+
complete?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Allowable query parameters for systems update endpoint */
|
|
45
|
+
export interface PlaceSystemUpdateOptions {
|
|
46
|
+
/** Version number to prevent overwriting newer config (required for PUT/PATCH) */
|
|
47
|
+
version: number;
|
|
48
|
+
}
|
|
49
|
+
/** Allowable query parameters for system start/stop endpoints */
|
|
50
|
+
export interface PlaceSystemStartStopOptions {
|
|
51
|
+
/** Start/stop modules that only occur in the selected system */
|
|
52
|
+
single_occurrence?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** Allowable query parameters for system triggers index endpoint */
|
|
55
|
+
export interface PlaceSystemTriggersQueryOptions extends PlaceResourceQueryOptions {
|
|
56
|
+
/** Provide the control system details */
|
|
57
|
+
complete?: boolean;
|
|
58
|
+
/** Only return triggers marked as important */
|
|
59
|
+
important?: boolean;
|
|
60
|
+
/** Only return triggers that have recently been triggered */
|
|
61
|
+
triggered?: boolean;
|
|
62
|
+
/** Filter by a particular trigger type */
|
|
63
|
+
trigger_id?: string;
|
|
64
|
+
/** Return triggers updated before the time specified (unix epoch) */
|
|
65
|
+
as_of?: number;
|
|
66
|
+
}
|
|
67
|
+
/** Allowable query parameters for systems control endpoint */
|
|
68
|
+
export interface PlaceSystemControlOptions {
|
|
69
|
+
/** Fixed device identifier */
|
|
70
|
+
fixed_device?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** Allowable query parameters for system metadata endpoint */
|
|
73
|
+
export interface PlaceSystemMetadataOptions {
|
|
74
|
+
/** Name of the metadata key */
|
|
75
|
+
name?: string;
|
|
76
|
+
}
|
|
77
|
+
/** Allowable query parameters for system trigger show endpoint */
|
|
78
|
+
export interface PlaceSystemTriggerShowOptions {
|
|
79
|
+
/** Return the full trigger details */
|
|
27
80
|
complete?: boolean;
|
|
28
81
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
3
|
-
import { HashMap } from '../utilities/types';
|
|
2
|
+
import { PlaceTriggerQueryOptions, PlaceTriggerShowOptions } from './interfaces';
|
|
4
3
|
import { PlaceTrigger } from './trigger';
|
|
5
4
|
/**
|
|
6
5
|
* Query the available triggers
|
|
7
6
|
* @param query_params Query parameters to add the to request URL
|
|
8
7
|
*/
|
|
9
|
-
export declare function queryTriggers(query_params?:
|
|
8
|
+
export declare function queryTriggers(query_params?: PlaceTriggerQueryOptions): import('..').QueryResponse<PlaceTrigger>;
|
|
10
9
|
/**
|
|
11
10
|
* Get the data for a trigger
|
|
12
11
|
* @param id ID of the trigger to retrieve
|
|
13
12
|
* @param query_params Query parameters to add the to request URL
|
|
14
13
|
*/
|
|
15
|
-
export declare function showTrigger(id: string, query_params?:
|
|
14
|
+
export declare function showTrigger(id: string, query_params?: PlaceTriggerShowOptions): Observable<PlaceTrigger>;
|
|
16
15
|
/**
|
|
17
16
|
* Update the trigger in the database
|
|
18
17
|
* @param id ID of the trigger
|
|
@@ -28,11 +27,10 @@ export declare function updateTrigger(id: string, form_data: Partial<PlaceTrigge
|
|
|
28
27
|
*/
|
|
29
28
|
export declare function addTrigger(form_data: Partial<PlaceTrigger>): Observable<PlaceTrigger>;
|
|
30
29
|
/**
|
|
31
|
-
* Remove
|
|
30
|
+
* Remove a trigger from the database
|
|
32
31
|
* @param id ID of the trigger
|
|
33
|
-
* @param query_params Query parameters to add the to request URL
|
|
34
32
|
*/
|
|
35
|
-
export declare function removeTrigger(id: string
|
|
33
|
+
export declare function removeTrigger(id: string): Observable<import('../utilities/types').HashMap<any>>;
|
|
36
34
|
/**
|
|
37
35
|
* List systems that contain instances of a trigger
|
|
38
36
|
* @param id ID of the trigger to grab system instances for
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
1
2
|
import { HashMap } from '../utilities/types';
|
|
3
|
+
/** Mapping of available query parameters for the triggers index endpoint */
|
|
4
|
+
export interface PlaceTriggerQueryOptions extends PlaceResourceQueryOptions {
|
|
5
|
+
}
|
|
6
|
+
/** Mapping of available query parameters for the triggers show endpoint */
|
|
7
|
+
export interface PlaceTriggerShowOptions {
|
|
8
|
+
/** Return the instances associated with this trigger */
|
|
9
|
+
instances?: boolean;
|
|
10
|
+
}
|
|
2
11
|
export interface TriggerActions {
|
|
3
12
|
/** List of functions to execute when the trigger is activated */
|
|
4
13
|
functions: TriggerFunction[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { HashMap } from '../utilities/types';
|
|
2
|
-
import { PlaceUserQueryOptions } from './interfaces';
|
|
3
|
+
import { PlaceUserDeleteOptions, PlaceUserGroupsOptions, PlaceUserMetadataOptions, PlaceUserMetadataSearchOptions, PlaceUserQueryOptions, PlaceUserShowOptions } from './interfaces';
|
|
3
4
|
import { PlaceUser } from './user';
|
|
4
5
|
/**
|
|
5
6
|
* Query the available triggers
|
|
@@ -7,16 +8,16 @@ import { PlaceUser } from './user';
|
|
|
7
8
|
*/
|
|
8
9
|
export declare function queryUsers(query_params?: PlaceUserQueryOptions): import('..').QueryResponse<PlaceUser>;
|
|
9
10
|
/**
|
|
10
|
-
* Get the data for a
|
|
11
|
-
* @param id ID of the
|
|
11
|
+
* Get the data for a user
|
|
12
|
+
* @param id ID of the user to retrieve
|
|
12
13
|
* @param query_params Query parameters to add the to request URL
|
|
13
14
|
*/
|
|
14
|
-
export declare function showUser(id: string, query_params?:
|
|
15
|
+
export declare function showUser(id: string, query_params?: PlaceUserShowOptions): Observable<PlaceUser>;
|
|
15
16
|
/**
|
|
16
17
|
* Get the data for the currently logged in user
|
|
17
18
|
* @param query_params Query parameters to add the to request URL
|
|
18
19
|
*/
|
|
19
|
-
export declare function currentUser(query_params?:
|
|
20
|
+
export declare function currentUser(query_params?: PlaceUserShowOptions): Observable<PlaceUser>;
|
|
20
21
|
/**
|
|
21
22
|
* Update the trigger in the database
|
|
22
23
|
* @param id ID of the trigger
|
|
@@ -24,16 +25,55 @@ export declare function currentUser(query_params?: PlaceUserQueryOptions): impor
|
|
|
24
25
|
* @param query_params Query parameters to add the to request URL
|
|
25
26
|
* @param method HTTP verb to use on request. Defaults to `patch`
|
|
26
27
|
*/
|
|
27
|
-
export declare function updateUser(id: string, form_data: Partial<PlaceUser>, method?: 'put' | 'patch'):
|
|
28
|
+
export declare function updateUser(id: string, form_data: Partial<PlaceUser>, method?: 'put' | 'patch'): Observable<PlaceUser>;
|
|
28
29
|
/**
|
|
29
30
|
* Add a new trigger to the database
|
|
30
31
|
* @param form_data Trigger data
|
|
31
32
|
* @param query_params Query parameters to add the to request URL
|
|
32
33
|
*/
|
|
33
|
-
export declare function addUser(form_data: Partial<PlaceUser>):
|
|
34
|
+
export declare function addUser(form_data: Partial<PlaceUser>): Observable<PlaceUser>;
|
|
34
35
|
/**
|
|
35
|
-
* Remove
|
|
36
|
-
* @param id ID of the
|
|
36
|
+
* Remove a user from the database
|
|
37
|
+
* @param id ID of the user
|
|
37
38
|
* @param query_params Query parameters to add the to request URL
|
|
38
39
|
*/
|
|
39
|
-
export declare function removeUser(id: string, query_params?:
|
|
40
|
+
export declare function removeUser(id: string, query_params?: PlaceUserDeleteOptions): Observable<HashMap<any>>;
|
|
41
|
+
/**
|
|
42
|
+
* Get the groups that users are in
|
|
43
|
+
* @param query_params Query parameters including email addresses
|
|
44
|
+
*/
|
|
45
|
+
export declare function queryUserGroups(query_params: PlaceUserGroupsOptions): Observable<HashMap<string[]>>;
|
|
46
|
+
/**
|
|
47
|
+
* Search user metadata with provided JSON Path query
|
|
48
|
+
* @param query_params Query parameters including filter
|
|
49
|
+
*/
|
|
50
|
+
export declare function searchUserMetadata(query_params: PlaceUserMetadataSearchOptions): Observable<HashMap[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Obtain a token to the current user's SSO resources
|
|
53
|
+
*/
|
|
54
|
+
export declare function currentUserResourceToken(): Observable<{
|
|
55
|
+
token: string;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Get a user's metadata
|
|
59
|
+
* @param id User ID
|
|
60
|
+
* @param query_params Query parameters to add to the request
|
|
61
|
+
*/
|
|
62
|
+
export declare function userMetadata(id: string, query_params?: PlaceUserMetadataOptions): Observable<HashMap>;
|
|
63
|
+
/**
|
|
64
|
+
* Remove the saved resource token of a user
|
|
65
|
+
* @param id User ID
|
|
66
|
+
*/
|
|
67
|
+
export declare function removeUserResourceToken(id: string): Observable<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Obtain a token to the specified user's SSO resources
|
|
70
|
+
* @param id User ID
|
|
71
|
+
*/
|
|
72
|
+
export declare function userResourceToken(id: string): Observable<{
|
|
73
|
+
token: string;
|
|
74
|
+
}>;
|
|
75
|
+
/**
|
|
76
|
+
* Undelete a user
|
|
77
|
+
* @param id User ID
|
|
78
|
+
*/
|
|
79
|
+
export declare function reviveUser(id: string): Observable<PlaceUser>;
|
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
2
|
-
/** Mapping of available query
|
|
2
|
+
/** Mapping of available query parameters for the users index endpoint */
|
|
3
3
|
export interface PlaceUserQueryOptions extends PlaceResourceQueryOptions {
|
|
4
|
-
/**
|
|
4
|
+
/** Include soft deleted users in the results */
|
|
5
|
+
include_deleted?: boolean;
|
|
6
|
+
/** Include user metadata in the response */
|
|
7
|
+
include_metadata?: boolean;
|
|
8
|
+
/** Admin users can view other domains (ignored for other users) */
|
|
5
9
|
authority_id?: string;
|
|
6
10
|
}
|
|
11
|
+
/** Mapping of available query parameters for the users show endpoint */
|
|
12
|
+
export interface PlaceUserShowOptions {
|
|
13
|
+
/** Include user metadata in the response */
|
|
14
|
+
include_metadata?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** Mapping of available query parameters for the users delete endpoint */
|
|
17
|
+
export interface PlaceUserDeleteOptions {
|
|
18
|
+
/** Force permanent removal of user */
|
|
19
|
+
force_removal?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Mapping of available query parameters for the users groups endpoint */
|
|
22
|
+
export interface PlaceUserGroupsOptions {
|
|
23
|
+
/** Comma-separated list of email addresses */
|
|
24
|
+
emails: string;
|
|
25
|
+
}
|
|
26
|
+
/** Mapping of available query parameters for the users metadata search endpoint */
|
|
27
|
+
export interface PlaceUserMetadataSearchOptions {
|
|
28
|
+
/** JSON Path query filter */
|
|
29
|
+
filter: string;
|
|
30
|
+
/** Maximum number of results to return */
|
|
31
|
+
limit?: number;
|
|
32
|
+
/** Offset for pagination */
|
|
33
|
+
offset?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Mapping of available query parameters for the user metadata endpoint */
|
|
36
|
+
export interface PlaceUserMetadataOptions {
|
|
37
|
+
/** Name of the metadata key */
|
|
38
|
+
name?: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { PlaceGuestParticipant, PlaceKickReason, PlaceWebrtcMember, PlaceWebrtcRoomDetails, PlaceWebrtcRoomsQueryOptions } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Query the list of public chat rooms for the current domain
|
|
5
|
+
* @param query_params Query parameters to add to the request URL
|
|
6
|
+
*/
|
|
7
|
+
export declare function queryWebrtcRooms(query_params?: PlaceWebrtcRoomsQueryOptions): Observable<PlaceWebrtcRoomDetails[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Get the details of a public chat room
|
|
10
|
+
* @param system_id Either a system ID or a unique permalink
|
|
11
|
+
*/
|
|
12
|
+
export declare function showWebrtcRoom(system_id: string): Observable<PlaceWebrtcRoomDetails>;
|
|
13
|
+
/**
|
|
14
|
+
* Get a list of connected users in a chat session
|
|
15
|
+
* @param session_id ID of the chat session
|
|
16
|
+
*/
|
|
17
|
+
export declare function webrtcSessionMembers(session_id: string): Observable<PlaceWebrtcMember[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Request guest access to an anonymous chat room.
|
|
20
|
+
* The guest participant details will be forwarded to any listening systems.
|
|
21
|
+
* Additional fields provided as part of the guest post will also be forwarded.
|
|
22
|
+
* @param system_id Either a system ID or a unique permalink
|
|
23
|
+
* @param participant Guest participant details
|
|
24
|
+
*/
|
|
25
|
+
export declare function webrtcGuestEntry(system_id: string, participant: PlaceGuestParticipant): Observable<void>;
|
|
26
|
+
/**
|
|
27
|
+
* End a guest call gracefully.
|
|
28
|
+
* This will remove the authentication token and close any open websockets.
|
|
29
|
+
*/
|
|
30
|
+
export declare function webrtcGuestExit(): Observable<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Kick a user from a chat session.
|
|
33
|
+
* Similar to guest exit without the token expiration.
|
|
34
|
+
* Other members of the call will stop communicating with them.
|
|
35
|
+
* @param user_id ID of the user to kick
|
|
36
|
+
* @param session_id ID of the chat session
|
|
37
|
+
* @param reason Reason for kicking the user
|
|
38
|
+
*/
|
|
39
|
+
export declare function webrtcKickUser(user_id: string, session_id: string, reason: PlaceKickReason): Observable<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Transfer a user from one chat to another.
|
|
42
|
+
* For authorized users to move people from one chat to another.
|
|
43
|
+
* @param user_id ID of the user to transfer
|
|
44
|
+
* @param session_id ID of the current chat session
|
|
45
|
+
* @param connection_details Optional custom connection details for the transfer
|
|
46
|
+
*/
|
|
47
|
+
export declare function webrtcTransferUser(user_id: string, session_id: string, connection_details?: Record<string, unknown>): Observable<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Get the WebRTC signaller websocket URL.
|
|
50
|
+
* This is the endpoint for managing call participants.
|
|
51
|
+
*/
|
|
52
|
+
export declare function webrtcSignallerUrl(): string;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
2
|
+
/** Mapping of available query parameters for the webrtc rooms index endpoint */
|
|
3
|
+
export interface PlaceWebrtcRoomsQueryOptions extends PlaceResourceQueryOptions {
|
|
4
|
+
}
|
|
5
|
+
/** Guest participant details for joining an anonymous chat room */
|
|
6
|
+
export interface PlaceGuestParticipant {
|
|
7
|
+
/** Captcha token for verification (required) */
|
|
8
|
+
captcha: string;
|
|
9
|
+
/** Display name for the guest (required) */
|
|
10
|
+
name: string;
|
|
11
|
+
/** User ID for the guest (required) */
|
|
12
|
+
user_id: string;
|
|
13
|
+
/** Session ID for the chat (required) */
|
|
14
|
+
session_id: string;
|
|
15
|
+
/** Email address of the guest */
|
|
16
|
+
email?: string;
|
|
17
|
+
/** Phone number of the guest */
|
|
18
|
+
phone?: string;
|
|
19
|
+
/** Type of participant */
|
|
20
|
+
type?: string;
|
|
21
|
+
/** User ID of the person to chat with directly */
|
|
22
|
+
chat_to_user_id?: string;
|
|
23
|
+
}
|
|
24
|
+
/** Reason for kicking a user from a chat */
|
|
25
|
+
export interface PlaceKickReason {
|
|
26
|
+
/** Reason for ending the call (required) */
|
|
27
|
+
reason: string;
|
|
28
|
+
}
|
|
29
|
+
/** Details of a WebRTC public chat room */
|
|
30
|
+
export interface PlaceWebrtcRoomDetails {
|
|
31
|
+
/** System information for the room */
|
|
32
|
+
system?: {
|
|
33
|
+
created_at?: number;
|
|
34
|
+
updated_at?: number;
|
|
35
|
+
name?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
features?: string[];
|
|
38
|
+
email?: string;
|
|
39
|
+
bookable?: boolean;
|
|
40
|
+
public?: boolean;
|
|
41
|
+
display_name?: string;
|
|
42
|
+
code?: string;
|
|
43
|
+
type?: string;
|
|
44
|
+
capacity?: number;
|
|
45
|
+
map_id?: string;
|
|
46
|
+
approval?: boolean;
|
|
47
|
+
images?: string[];
|
|
48
|
+
timezone?: Record<string, unknown>;
|
|
49
|
+
support_url?: string;
|
|
50
|
+
timetable_url?: string;
|
|
51
|
+
camera_snapshot_url?: string;
|
|
52
|
+
camera_url?: string;
|
|
53
|
+
room_booking_url?: string;
|
|
54
|
+
version?: number;
|
|
55
|
+
installed_ui_devices?: number;
|
|
56
|
+
zones?: string[];
|
|
57
|
+
modules?: string[];
|
|
58
|
+
orientation?: 'unspecified' | 'landscape' | 'portrait' | 'square';
|
|
59
|
+
playlists?: string[];
|
|
60
|
+
signage?: boolean;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** Member details in a WebRTC chat session */
|
|
64
|
+
export interface PlaceWebrtcMember {
|
|
65
|
+
/** User ID of the member */
|
|
66
|
+
user_id?: string;
|
|
67
|
+
/** Display name of the member */
|
|
68
|
+
name?: string;
|
|
69
|
+
/** Email of the member */
|
|
70
|
+
email?: string;
|
|
71
|
+
/** Whether the member is a guest */
|
|
72
|
+
is_guest?: boolean;
|
|
73
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
2
3
|
import { PlaceTrigger } from '../triggers/trigger';
|
|
3
4
|
import { HashMap } from '../utilities/types';
|
|
4
|
-
import { PlaceZoneQueryOptions, PlaceZoneShowOptions } from './interfaces';
|
|
5
|
+
import { PlaceZoneMetadataQueryOptions, PlaceZoneQueryOptions, PlaceZoneShowOptions } from './interfaces';
|
|
5
6
|
import { PlaceZone } from './zone';
|
|
6
7
|
/**
|
|
7
8
|
* Query the available applications
|
|
@@ -34,17 +35,16 @@ export declare function updateZone(id: string, form_data: Partial<PlaceZone>, me
|
|
|
34
35
|
*/
|
|
35
36
|
export declare function addZone(form_data: Partial<PlaceZone>): Observable<PlaceZone>;
|
|
36
37
|
/**
|
|
37
|
-
* Remove
|
|
38
|
-
* @param id ID of the
|
|
39
|
-
* @param query_params Query parameters to add the to request URL
|
|
38
|
+
* Remove a zone from the database
|
|
39
|
+
* @param id ID of the zone
|
|
40
40
|
*/
|
|
41
|
-
export declare function removeZone(id: string
|
|
41
|
+
export declare function removeZone(id: string): Observable<HashMap<any>>;
|
|
42
42
|
/**
|
|
43
43
|
* Query the triggers for a zone
|
|
44
44
|
* @param id ID of the zone
|
|
45
45
|
* @param query_params Query parameters to add the to request URL
|
|
46
46
|
*/
|
|
47
|
-
export declare function listZoneTriggers(id: string, query_params?:
|
|
47
|
+
export declare function listZoneTriggers(id: string, query_params?: PlaceResourceQueryOptions): import('..').QueryResponse<PlaceTrigger>;
|
|
48
48
|
/**
|
|
49
49
|
* Execute a function of the system's module under a given zone
|
|
50
50
|
* @param id Zone ID
|
|
@@ -54,3 +54,9 @@ export declare function listZoneTriggers(id: string, query_params?: HashMap): im
|
|
|
54
54
|
* @param args Array of arguments to pass to the executed method
|
|
55
55
|
*/
|
|
56
56
|
export declare function executeOnZone(id: string, method: string, module: string, index?: number, args?: any[]): Observable<HashMap>;
|
|
57
|
+
/**
|
|
58
|
+
* Get metadata associated with the selected zone
|
|
59
|
+
* @param id Zone ID
|
|
60
|
+
* @param query_params Query parameters to add to the request
|
|
61
|
+
*/
|
|
62
|
+
export declare function zoneMetadata(id: string, query_params?: PlaceZoneMetadataQueryOptions): Observable<HashMap>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
2
|
-
/** Mapping of available query
|
|
2
|
+
/** Mapping of available query parameters for the zones index endpoint */
|
|
3
3
|
export interface PlaceZoneQueryOptions extends PlaceResourceQueryOptions {
|
|
4
|
-
/**
|
|
4
|
+
/** ID of the parent zone to filter the results (supports comma-separated list) */
|
|
5
|
+
parent_id?: string;
|
|
6
|
+
/** List of space separated tags to filter the results */
|
|
5
7
|
tags?: string;
|
|
6
8
|
/** ID of the system to filter the results */
|
|
7
9
|
control_system_id?: string;
|
|
8
|
-
/** ID of the parent zone to filter the results */
|
|
9
|
-
parent_id?: string;
|
|
10
10
|
}
|
|
11
11
|
/** Mapping of available query parameters for the zones show endpoint */
|
|
12
12
|
export interface PlaceZoneShowOptions {
|
|
@@ -18,3 +18,8 @@ export interface PlaceZoneShowOptions {
|
|
|
18
18
|
*/
|
|
19
19
|
data?: string;
|
|
20
20
|
}
|
|
21
|
+
/** Mapping of available query parameters for the zone metadata endpoint */
|
|
22
|
+
export interface PlaceZoneMetadataQueryOptions {
|
|
23
|
+
/** The name of the metadata key to retrieve */
|
|
24
|
+
name?: string;
|
|
25
|
+
}
|
package/package.json
CHANGED