@placeos/ts-client 4.6.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 +30 -19
- package/dist/applications/functions.d.ts +2 -5
- package/dist/applications/interfaces.d.ts +5 -11
- package/dist/assets/functions.d.ts +5 -5
- 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 +2232 -1895
- 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 +116 -3
- package/src/applications/functions.ts +4 -7
- package/src/applications/interfaces.ts +6 -12
- package/src/assets/functions.ts +10 -5
- 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
- package/dist/assets/types.d.ts +0 -1
- package/src/assets/types.ts +0 -0
package/src/alerts/functions.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { create, query, remove, show, update } from '../api';
|
|
2
|
-
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
3
2
|
import { PlaceAlert } from './alert';
|
|
4
3
|
import { PlaceAlertDashboard } from './dashboard';
|
|
4
|
+
import {
|
|
5
|
+
PlaceAlertDashboardQueryOptions,
|
|
6
|
+
PlaceAlertQueryOptions,
|
|
7
|
+
PlaceAlertShowOptions,
|
|
8
|
+
} from './interfaces';
|
|
5
9
|
|
|
6
10
|
///////////////////////////////////////////////////////////////
|
|
7
11
|
///////////////////// Alert Dashboards ////////////////////
|
|
@@ -22,7 +26,7 @@ function processDashboard(item: Partial<PlaceAlertDashboard>) {
|
|
|
22
26
|
* @param query_params Query parameters to add the to request URL
|
|
23
27
|
*/
|
|
24
28
|
export function queryAlertDashboards(
|
|
25
|
-
query_params:
|
|
29
|
+
query_params: PlaceAlertDashboardQueryOptions = {},
|
|
26
30
|
) {
|
|
27
31
|
return query({
|
|
28
32
|
query_params,
|
|
@@ -34,15 +38,11 @@ export function queryAlertDashboards(
|
|
|
34
38
|
/**
|
|
35
39
|
* Get the data for an alert dashboard
|
|
36
40
|
* @param id ID of the alert dashboard to retrieve
|
|
37
|
-
* @param query_params Query parameters to add the to request URL
|
|
38
41
|
*/
|
|
39
|
-
export function showAlertDashboard(
|
|
40
|
-
id: string,
|
|
41
|
-
query_params: Record<string, any> = {},
|
|
42
|
-
) {
|
|
42
|
+
export function showAlertDashboard(id: string) {
|
|
43
43
|
return show({
|
|
44
44
|
id,
|
|
45
|
-
query_params,
|
|
45
|
+
query_params: {},
|
|
46
46
|
fn: processDashboard,
|
|
47
47
|
path: DASHBOARD_PATH,
|
|
48
48
|
});
|
|
@@ -87,13 +87,9 @@ export function addAlertDashboard(form_data: Partial<PlaceAlertDashboard>) {
|
|
|
87
87
|
/**
|
|
88
88
|
* Remove an alert dashboard from the database
|
|
89
89
|
* @param id ID of the alert dashboard
|
|
90
|
-
* @param query_params Query parameters to add the to request URL
|
|
91
90
|
*/
|
|
92
|
-
export function removeAlertDashboard(
|
|
93
|
-
id:
|
|
94
|
-
query_params: Record<string, any> = {},
|
|
95
|
-
) {
|
|
96
|
-
return remove({ id, query_params, path: DASHBOARD_PATH });
|
|
91
|
+
export function removeAlertDashboard(id: string) {
|
|
92
|
+
return remove({ id, query_params: {}, path: DASHBOARD_PATH });
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
/**
|
|
@@ -126,7 +122,7 @@ function processAlert(item: Partial<PlaceAlert>) {
|
|
|
126
122
|
* Query the available alerts
|
|
127
123
|
* @param query_params Query parameters to add the to request URL
|
|
128
124
|
*/
|
|
129
|
-
export function queryAlerts(query_params:
|
|
125
|
+
export function queryAlerts(query_params: PlaceAlertQueryOptions = {}) {
|
|
130
126
|
return query({
|
|
131
127
|
query_params,
|
|
132
128
|
fn: processAlert,
|
|
@@ -139,7 +135,7 @@ export function queryAlerts(query_params: PlaceResourceQueryOptions = {}) {
|
|
|
139
135
|
* @param id ID of the alert to retrieve
|
|
140
136
|
* @param query_params Query parameters to add the to request URL
|
|
141
137
|
*/
|
|
142
|
-
export function showAlert(id: string, query_params:
|
|
138
|
+
export function showAlert(id: string, query_params: PlaceAlertShowOptions = {}) {
|
|
143
139
|
return show({
|
|
144
140
|
id,
|
|
145
141
|
query_params,
|
|
@@ -187,11 +183,7 @@ export function addAlert(form_data: Partial<PlaceAlert>) {
|
|
|
187
183
|
/**
|
|
188
184
|
* Remove an alert from the database
|
|
189
185
|
* @param id ID of the alert
|
|
190
|
-
* @param query_params Query parameters to add the to request URL
|
|
191
186
|
*/
|
|
192
|
-
export function removeAlert(
|
|
193
|
-
id:
|
|
194
|
-
query_params: Record<string, any> = {},
|
|
195
|
-
) {
|
|
196
|
-
return remove({ id, query_params, path: ALERT_PATH });
|
|
187
|
+
export function removeAlert(id: string) {
|
|
188
|
+
return remove({ id, query_params: {}, path: ALERT_PATH });
|
|
197
189
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
2
|
+
|
|
3
|
+
/** Mapping of available query parameters for the alert dashboards index endpoint */
|
|
4
|
+
export interface PlaceAlertDashboardQueryOptions extends PlaceResourceQueryOptions {
|
|
5
|
+
/** Return dashboards for a specific authority */
|
|
6
|
+
authority_id?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Mapping of available query parameters for the alerts index endpoint */
|
|
10
|
+
export interface PlaceAlertQueryOptions extends PlaceResourceQueryOptions {
|
|
11
|
+
/** Return alerts for a specific dashboard */
|
|
12
|
+
alert_dashboard_id?: string;
|
|
13
|
+
/** Filter by alert severity */
|
|
14
|
+
severity?: string;
|
|
15
|
+
/** Filter by alert type */
|
|
16
|
+
alert_type?: string;
|
|
17
|
+
/** Filter by enabled status */
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Mapping of available query parameters for the alerts show endpoint */
|
|
22
|
+
export interface PlaceAlertShowOptions {
|
|
23
|
+
/** Return the dashboard associated with this alert */
|
|
24
|
+
dashboard?: boolean;
|
|
25
|
+
}
|
package/src/api.ts
CHANGED
|
@@ -32,6 +32,11 @@ export {
|
|
|
32
32
|
updateAlert,
|
|
33
33
|
updateAlertDashboard,
|
|
34
34
|
} from './alerts/functions';
|
|
35
|
+
export type {
|
|
36
|
+
PlaceAlertDashboardQueryOptions,
|
|
37
|
+
PlaceAlertQueryOptions,
|
|
38
|
+
PlaceAlertShowOptions,
|
|
39
|
+
} from './alerts/interfaces';
|
|
35
40
|
|
|
36
41
|
export { PlaceApplication } from './applications/application';
|
|
37
42
|
export {
|
|
@@ -56,17 +61,25 @@ export {
|
|
|
56
61
|
|
|
57
62
|
export { PlaceCluster } from './clusters/cluster';
|
|
58
63
|
export {
|
|
64
|
+
clusterRebalance,
|
|
65
|
+
clusterVersions,
|
|
59
66
|
queryClusters,
|
|
60
67
|
queryProcesses,
|
|
61
68
|
showCluster,
|
|
62
69
|
terminateProcess,
|
|
63
70
|
} from './clusters/functions';
|
|
64
|
-
export type {
|
|
71
|
+
export type {
|
|
72
|
+
PlaceClusterQueryOptions,
|
|
73
|
+
PlaceClusterShowOptions,
|
|
74
|
+
PlaceClusterTerminateOptions,
|
|
75
|
+
PlaceClusterVersions,
|
|
76
|
+
} from './clusters/interfaces';
|
|
65
77
|
export { PlaceProcess } from './clusters/process';
|
|
66
78
|
|
|
67
79
|
export { PlaceDomain } from './domains/domain';
|
|
68
80
|
export {
|
|
69
81
|
addDomain,
|
|
82
|
+
lookupDomainByEmail,
|
|
70
83
|
queryDomains,
|
|
71
84
|
removeDomain,
|
|
72
85
|
showDomain,
|
|
@@ -89,11 +102,13 @@ export {
|
|
|
89
102
|
export type {
|
|
90
103
|
PlaceDriverDetails,
|
|
91
104
|
PlaceDriverQueryOptions,
|
|
105
|
+
PlaceDriverShowOptions,
|
|
92
106
|
} from './drivers/interfaces';
|
|
93
107
|
|
|
94
108
|
export { PlaceEdge } from './edge/edge';
|
|
95
109
|
export {
|
|
96
110
|
addEdge,
|
|
111
|
+
edgeControlUrl,
|
|
97
112
|
queryEdges,
|
|
98
113
|
removeEdge,
|
|
99
114
|
retrieveEdgeToken,
|
|
@@ -120,6 +135,8 @@ export {
|
|
|
120
135
|
updateMetadata,
|
|
121
136
|
} from './metadata/functions';
|
|
122
137
|
export type {
|
|
138
|
+
PlaceMetadataDeleteOptions,
|
|
139
|
+
PlaceMetadataHistoryOptions,
|
|
123
140
|
PlaceMetadataOptions,
|
|
124
141
|
PlaceZoneMetadataOptions,
|
|
125
142
|
} from './metadata/interfaces';
|
|
@@ -128,6 +145,7 @@ export { PlaceZoneMetadata } from './metadata/zone-metadata';
|
|
|
128
145
|
|
|
129
146
|
export {
|
|
130
147
|
addModule,
|
|
148
|
+
executeOnModule,
|
|
131
149
|
loadModule,
|
|
132
150
|
lookupModuleState,
|
|
133
151
|
moduleRuntimeError,
|
|
@@ -143,6 +161,7 @@ export {
|
|
|
143
161
|
export type {
|
|
144
162
|
PlaceModulePingOptions,
|
|
145
163
|
PlaceModuleQueryOptions,
|
|
164
|
+
PlaceModuleShowOptions,
|
|
146
165
|
} from './modules/interfaces';
|
|
147
166
|
export { PlaceModule } from './modules/module';
|
|
148
167
|
|
|
@@ -166,6 +185,7 @@ export {
|
|
|
166
185
|
listRepositoryDefaultBranch,
|
|
167
186
|
listRepositoryDriverDetails,
|
|
168
187
|
listRepositoryDrivers,
|
|
188
|
+
listRepositoryFolders,
|
|
169
189
|
pullRepositoryChanges,
|
|
170
190
|
queryRepositories,
|
|
171
191
|
removeRepository,
|
|
@@ -175,10 +195,14 @@ export {
|
|
|
175
195
|
export { PlaceRepositoryType } from './repositories/interfaces';
|
|
176
196
|
export type {
|
|
177
197
|
GitCommitDetails,
|
|
198
|
+
PlaceRemoteRepositoryCommitsQuery,
|
|
199
|
+
PlaceRemoteRepositoryQuery,
|
|
178
200
|
PlaceRepositoryCommit,
|
|
179
201
|
PlaceRepositoryCommitQuery,
|
|
180
202
|
PlaceRepositoryDetailsQuery,
|
|
203
|
+
PlaceRepositoryFoldersQuery,
|
|
181
204
|
PlaceRepositoryPullQuery,
|
|
205
|
+
PlaceRepositoryQueryOptions,
|
|
182
206
|
} from './repositories/interfaces';
|
|
183
207
|
export { PlaceRepository } from './repositories/repository';
|
|
184
208
|
|
|
@@ -192,6 +216,7 @@ export {
|
|
|
192
216
|
update,
|
|
193
217
|
type QueryResponse,
|
|
194
218
|
} from './resources/functions';
|
|
219
|
+
export type { PlaceResourceQueryOptions } from './resources/interface';
|
|
195
220
|
export { PlaceResource } from './resources/resource';
|
|
196
221
|
|
|
197
222
|
export {
|
|
@@ -213,7 +238,10 @@ export {
|
|
|
213
238
|
updateSettings,
|
|
214
239
|
} from './settings/functions';
|
|
215
240
|
export { EncryptionLevel } from './settings/interfaces';
|
|
216
|
-
export type {
|
|
241
|
+
export type {
|
|
242
|
+
PlaceSettingsHistoryOptions,
|
|
243
|
+
PlaceSettingsQueryOptions,
|
|
244
|
+
} from './settings/interfaces';
|
|
217
245
|
export { PlaceSettings } from './settings/settings';
|
|
218
246
|
|
|
219
247
|
export {
|
|
@@ -231,17 +259,28 @@ export {
|
|
|
231
259
|
removeSystemModule,
|
|
232
260
|
removeSystemTrigger,
|
|
233
261
|
showSystem,
|
|
262
|
+
showSystemTrigger,
|
|
234
263
|
startSystem,
|
|
235
264
|
stopSystem,
|
|
265
|
+
systemControlUrl,
|
|
266
|
+
systemMetadata,
|
|
236
267
|
systemModuleState,
|
|
237
268
|
systemSettings,
|
|
238
269
|
updateSystem,
|
|
270
|
+
updateSystemTrigger,
|
|
239
271
|
} from './systems/functions';
|
|
240
272
|
export type {
|
|
241
273
|
PlaceModuleFunction,
|
|
242
274
|
PlaceModuleFunctionMap,
|
|
275
|
+
PlaceSystemControlOptions,
|
|
276
|
+
PlaceSystemMetadataOptions,
|
|
243
277
|
PlaceSystemShowOptions,
|
|
278
|
+
PlaceSystemStartStopOptions,
|
|
279
|
+
PlaceSystemTriggerShowOptions,
|
|
280
|
+
PlaceSystemTriggersQueryOptions,
|
|
281
|
+
PlaceSystemUpdateOptions,
|
|
244
282
|
PlaceSystemsQueryOptions,
|
|
283
|
+
PlaceSystemsWithEmailsOptions,
|
|
245
284
|
} from './systems/interfaces';
|
|
246
285
|
export { PlaceSystem } from './systems/system';
|
|
247
286
|
|
|
@@ -260,6 +299,8 @@ export {
|
|
|
260
299
|
} from './triggers/interfaces';
|
|
261
300
|
export type {
|
|
262
301
|
ExecuteArgs,
|
|
302
|
+
PlaceTriggerQueryOptions,
|
|
303
|
+
PlaceTriggerShowOptions,
|
|
263
304
|
TriggerActions,
|
|
264
305
|
TriggerAtTimeCondition,
|
|
265
306
|
TriggerComparison,
|
|
@@ -278,12 +319,26 @@ export { PlaceTrigger } from './triggers/trigger';
|
|
|
278
319
|
export {
|
|
279
320
|
addUser,
|
|
280
321
|
currentUser,
|
|
322
|
+
currentUserResourceToken,
|
|
323
|
+
queryUserGroups,
|
|
281
324
|
queryUsers,
|
|
282
325
|
removeUser,
|
|
326
|
+
removeUserResourceToken,
|
|
327
|
+
reviveUser,
|
|
328
|
+
searchUserMetadata,
|
|
283
329
|
showUser,
|
|
284
330
|
updateUser,
|
|
331
|
+
userMetadata,
|
|
332
|
+
userResourceToken,
|
|
285
333
|
} from './users/functions';
|
|
286
|
-
export type {
|
|
334
|
+
export type {
|
|
335
|
+
PlaceUserDeleteOptions,
|
|
336
|
+
PlaceUserGroupsOptions,
|
|
337
|
+
PlaceUserMetadataOptions,
|
|
338
|
+
PlaceUserMetadataSearchOptions,
|
|
339
|
+
PlaceUserQueryOptions,
|
|
340
|
+
PlaceUserShowOptions,
|
|
341
|
+
} from './users/interfaces';
|
|
287
342
|
export { PlaceUser } from './users/user';
|
|
288
343
|
export type { WorktimePreference } from './users/user';
|
|
289
344
|
|
|
@@ -296,8 +351,10 @@ export {
|
|
|
296
351
|
removeZone,
|
|
297
352
|
showZone,
|
|
298
353
|
updateZone,
|
|
354
|
+
zoneMetadata,
|
|
299
355
|
} from './zones/functions';
|
|
300
356
|
export type {
|
|
357
|
+
PlaceZoneMetadataQueryOptions,
|
|
301
358
|
PlaceZoneQueryOptions,
|
|
302
359
|
PlaceZoneShowOptions,
|
|
303
360
|
} from './zones/interfaces';
|
|
@@ -324,6 +381,8 @@ export {
|
|
|
324
381
|
export type {
|
|
325
382
|
SignageMediaQueryOptions,
|
|
326
383
|
SignageMetrics,
|
|
384
|
+
SignagePlaylistQueryOptions,
|
|
385
|
+
SignagePlaylistRevisionsOptions,
|
|
327
386
|
} from './signage/interfaces';
|
|
328
387
|
export {
|
|
329
388
|
MediaAnimation,
|
|
@@ -409,3 +468,57 @@ export {
|
|
|
409
468
|
updateAssetType,
|
|
410
469
|
updateAssets,
|
|
411
470
|
} from './assets/functions';
|
|
471
|
+
export type {
|
|
472
|
+
PlaceAssetCategoryQueryOptions,
|
|
473
|
+
PlaceAssetPurchaseOrderQueryOptions,
|
|
474
|
+
PlaceAssetQueryOptions,
|
|
475
|
+
PlaceAssetTypeQueryOptions,
|
|
476
|
+
} from './assets/interfaces';
|
|
477
|
+
|
|
478
|
+
export { PlaceShortUrl } from './short-url/short-url.class';
|
|
479
|
+
export {
|
|
480
|
+
addShortUrl,
|
|
481
|
+
generateQrCode,
|
|
482
|
+
getShortUrlQrCodeSvg,
|
|
483
|
+
qrCodeUrl,
|
|
484
|
+
queryShortUrls,
|
|
485
|
+
removeShortUrl,
|
|
486
|
+
shortUrlQrCodePngUrl,
|
|
487
|
+
shortUrlRedirectUrl,
|
|
488
|
+
showShortUrl,
|
|
489
|
+
updateShortUrl,
|
|
490
|
+
} from './short-url/functions';
|
|
491
|
+
export type {
|
|
492
|
+
PlaceQrCodeOptions,
|
|
493
|
+
PlaceShortUrlPngQrOptions,
|
|
494
|
+
PlaceShortUrlQueryOptions,
|
|
495
|
+
QrCodeFormat,
|
|
496
|
+
} from './short-url/interfaces';
|
|
497
|
+
|
|
498
|
+
export { PlaceStorage, type StorageType } from './storages/storage.class';
|
|
499
|
+
export {
|
|
500
|
+
addStorage,
|
|
501
|
+
queryStorages,
|
|
502
|
+
removeStorage,
|
|
503
|
+
showStorage,
|
|
504
|
+
updateStorage,
|
|
505
|
+
} from './storages/functions';
|
|
506
|
+
export type { PlaceStorageQueryOptions } from './storages/interfaces';
|
|
507
|
+
|
|
508
|
+
export {
|
|
509
|
+
queryWebrtcRooms,
|
|
510
|
+
showWebrtcRoom,
|
|
511
|
+
webrtcGuestEntry,
|
|
512
|
+
webrtcGuestExit,
|
|
513
|
+
webrtcKickUser,
|
|
514
|
+
webrtcSessionMembers,
|
|
515
|
+
webrtcSignallerUrl,
|
|
516
|
+
webrtcTransferUser,
|
|
517
|
+
} from './webrtc/functions';
|
|
518
|
+
export type {
|
|
519
|
+
PlaceGuestParticipant,
|
|
520
|
+
PlaceKickReason,
|
|
521
|
+
PlaceWebrtcMember,
|
|
522
|
+
PlaceWebrtcRoomDetails,
|
|
523
|
+
PlaceWebrtcRoomsQueryOptions,
|
|
524
|
+
} from './webrtc/interfaces';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { create, query, remove, show, update } from '../resources/functions';
|
|
2
|
-
import { HashMap } from '../utilities/types';
|
|
3
2
|
import { PlaceApplication } from './application';
|
|
4
3
|
import { PlaceApplicationQueryOptions } from './interfaces';
|
|
5
4
|
|
|
@@ -26,10 +25,9 @@ export function queryApplications(
|
|
|
26
25
|
/**
|
|
27
26
|
* Get the data for an application
|
|
28
27
|
* @param id ID of the application to retrieve
|
|
29
|
-
* @param query_params Query parameters to add the to request URL
|
|
30
28
|
*/
|
|
31
|
-
export function showApplication(id: string
|
|
32
|
-
return show({ id, query_params, fn: process, path: PATH });
|
|
29
|
+
export function showApplication(id: string) {
|
|
30
|
+
return show({ id, query_params: {}, fn: process, path: PATH });
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
/**
|
|
@@ -66,8 +64,7 @@ export function addApplication(form_data: Partial<PlaceApplication>) {
|
|
|
66
64
|
/**
|
|
67
65
|
* Remove an application from the database
|
|
68
66
|
* @param id ID of the application
|
|
69
|
-
* @param query_params Query parameters to add the to request URL
|
|
70
67
|
*/
|
|
71
|
-
export function removeApplication(id: string
|
|
72
|
-
return remove({ id, query_params, path: PATH });
|
|
68
|
+
export function removeApplication(id: string) {
|
|
69
|
+
return remove({ id, query_params: {}, path: PATH });
|
|
73
70
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
q?: string;
|
|
9
|
-
/** Number of results to return. Defaults to `20`. Max `500` */
|
|
10
|
-
limit?: number;
|
|
11
|
-
/** Offset the page of results. Max `10000` */
|
|
12
|
-
offset?: number;
|
|
1
|
+
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
2
|
+
|
|
3
|
+
/** Mapping of available query parameters for the OAuth apps index endpoint */
|
|
4
|
+
export interface PlaceApplicationQueryOptions extends PlaceResourceQueryOptions {
|
|
5
|
+
/** The ID of the domain to list applications for */
|
|
6
|
+
authority_id?: string;
|
|
13
7
|
}
|
package/src/assets/functions.ts
CHANGED
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
update,
|
|
12
12
|
} from '../api';
|
|
13
13
|
import { apiEndpoint } from '../auth';
|
|
14
|
-
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
15
14
|
import { toQueryString } from '../utilities/api';
|
|
16
15
|
import {
|
|
17
16
|
PlaceAsset,
|
|
@@ -19,6 +18,12 @@ import {
|
|
|
19
18
|
PlaceAssetPurchaseOrder,
|
|
20
19
|
PlaceAssetType,
|
|
21
20
|
} from './assets.class';
|
|
21
|
+
import {
|
|
22
|
+
PlaceAssetCategoryQueryOptions,
|
|
23
|
+
PlaceAssetPurchaseOrderQueryOptions,
|
|
24
|
+
PlaceAssetQueryOptions,
|
|
25
|
+
PlaceAssetTypeQueryOptions,
|
|
26
|
+
} from './interfaces';
|
|
22
27
|
|
|
23
28
|
///////////////////////////////////////////////////////////////
|
|
24
29
|
////////////////////////// Assets /////////////////////////
|
|
@@ -38,7 +43,7 @@ function processAsset(item: Partial<PlaceAsset>) {
|
|
|
38
43
|
* Query the available assets
|
|
39
44
|
* @param query_params Query parameters to add the to request URL
|
|
40
45
|
*/
|
|
41
|
-
export function queryAssets(query_params:
|
|
46
|
+
export function queryAssets(query_params: PlaceAssetQueryOptions = {}) {
|
|
42
47
|
return query({
|
|
43
48
|
query_params,
|
|
44
49
|
fn: processAsset,
|
|
@@ -173,7 +178,7 @@ function processAssetType(item: Partial<PlaceAssetType>) {
|
|
|
173
178
|
* Query the available asset types
|
|
174
179
|
* @param query_params Query parameters to add the to request URL
|
|
175
180
|
*/
|
|
176
|
-
export function queryAssetTypes(query_params:
|
|
181
|
+
export function queryAssetTypes(query_params: PlaceAssetTypeQueryOptions = {}) {
|
|
177
182
|
return query({
|
|
178
183
|
query_params,
|
|
179
184
|
fn: processAssetType,
|
|
@@ -265,7 +270,7 @@ function processAssetCategory(item: Partial<PlaceAssetCategory>) {
|
|
|
265
270
|
* @param query_params Query parameters to add the to request URL
|
|
266
271
|
*/
|
|
267
272
|
export function queryAssetCategories(
|
|
268
|
-
query_params:
|
|
273
|
+
query_params: PlaceAssetCategoryQueryOptions = {},
|
|
269
274
|
) {
|
|
270
275
|
return query({
|
|
271
276
|
query_params,
|
|
@@ -358,7 +363,7 @@ function processAssetPurchaseOrder(item: Partial<PlaceAssetPurchaseOrder>) {
|
|
|
358
363
|
* @param query_params Query parameters to add the to request URL
|
|
359
364
|
*/
|
|
360
365
|
export function queryAssetPurchaseOrders(
|
|
361
|
-
query_params:
|
|
366
|
+
query_params: PlaceAssetPurchaseOrderQueryOptions = {},
|
|
362
367
|
) {
|
|
363
368
|
return query({
|
|
364
369
|
query_params,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
2
|
+
|
|
3
|
+
/** Mapping of available query parameters for the assets index endpoint */
|
|
4
|
+
export interface PlaceAssetQueryOptions extends PlaceResourceQueryOptions {
|
|
5
|
+
/** Return assets which are in the zone provided */
|
|
6
|
+
zone_id?: string;
|
|
7
|
+
/** Return assets that match the asset type ID provided */
|
|
8
|
+
type_id?: string;
|
|
9
|
+
/** Return assets that match the purchase order ID provided */
|
|
10
|
+
order_id?: string;
|
|
11
|
+
/** Return assets that have a matching barcode */
|
|
12
|
+
barcode?: string;
|
|
13
|
+
/** Return assets that have a matching serial number */
|
|
14
|
+
serial_number?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Mapping of available query parameters for the asset types index endpoint */
|
|
18
|
+
export interface PlaceAssetTypeQueryOptions extends PlaceResourceQueryOptions {
|
|
19
|
+
/** Return assets with the provided brand name */
|
|
20
|
+
brand?: string;
|
|
21
|
+
/** Return assets with the provided model number */
|
|
22
|
+
model_number?: string;
|
|
23
|
+
/** Return asset types in the category provided */
|
|
24
|
+
category_id?: string;
|
|
25
|
+
/** Filters the asset count to the zone provided */
|
|
26
|
+
zone_id?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Mapping of available query parameters for the asset categories index endpoint */
|
|
30
|
+
export interface PlaceAssetCategoryQueryOptions extends PlaceResourceQueryOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Filter categories by hidden status.
|
|
33
|
+
* `true` returns only hidden categories,
|
|
34
|
+
* `false` returns only non-hidden categories,
|
|
35
|
+
* `undefined` returns all categories.
|
|
36
|
+
*/
|
|
37
|
+
hidden?: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Mapping of available query parameters for the asset purchase orders index endpoint */
|
|
41
|
+
export interface PlaceAssetPurchaseOrderQueryOptions extends PlaceResourceQueryOptions {}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { map } from 'rxjs/operators';
|
|
3
|
+
import { apiEndpoint } from '../auth/functions';
|
|
4
|
+
import { get, post } from '../http/functions';
|
|
1
5
|
import { query, remove, show } from '../resources/functions';
|
|
2
6
|
import { HashMap } from '../utilities/types';
|
|
3
7
|
import { PlaceCluster } from './cluster';
|
|
4
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
PlaceClusterQueryOptions,
|
|
10
|
+
PlaceClusterShowOptions,
|
|
11
|
+
PlaceClusterTerminateOptions,
|
|
12
|
+
PlaceClusterVersions,
|
|
13
|
+
} from './interfaces';
|
|
5
14
|
import { PlaceProcess } from './process';
|
|
6
15
|
|
|
7
16
|
/**
|
|
@@ -29,17 +38,20 @@ export function queryClusters(query_params: PlaceClusterQueryOptions = {}) {
|
|
|
29
38
|
*/
|
|
30
39
|
export function showCluster(
|
|
31
40
|
id: string,
|
|
32
|
-
query_params:
|
|
41
|
+
query_params: PlaceClusterShowOptions = {},
|
|
33
42
|
) {
|
|
34
43
|
return show({ id, query_params, fn: process, path: PATH });
|
|
35
44
|
}
|
|
36
45
|
|
|
37
46
|
/**
|
|
38
|
-
* Query the available
|
|
47
|
+
* Query the available processes for a cluster
|
|
39
48
|
* @param id ID of the cluster to query
|
|
40
49
|
* @param query_params Query parameters to add the to request URL
|
|
41
50
|
*/
|
|
42
|
-
export function queryProcesses(
|
|
51
|
+
export function queryProcesses(
|
|
52
|
+
id: string,
|
|
53
|
+
query_params: PlaceClusterShowOptions = {},
|
|
54
|
+
) {
|
|
43
55
|
return show({
|
|
44
56
|
id,
|
|
45
57
|
query_params,
|
|
@@ -52,10 +64,29 @@ export function queryProcesses(id: string, query_params: HashMap = {}) {
|
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
/**
|
|
55
|
-
*
|
|
67
|
+
* Terminate a process in a cluster
|
|
56
68
|
* @param id ID of the cluster associated with the process
|
|
57
|
-
* @param
|
|
69
|
+
* @param query_params Query parameters including driver name (required)
|
|
70
|
+
*/
|
|
71
|
+
export function terminateProcess(
|
|
72
|
+
id: string,
|
|
73
|
+
query_params: PlaceClusterTerminateOptions,
|
|
74
|
+
) {
|
|
75
|
+
return remove({ id, query_params, path: PATH });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Force the core nodes to perform a cluster rebalance
|
|
80
|
+
*/
|
|
81
|
+
export function clusterRebalance(): Observable<void> {
|
|
82
|
+
const url = `${apiEndpoint()}${PATH}/rebalance`;
|
|
83
|
+
return post(url, {}).pipe(map(() => undefined));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Get the core node versions
|
|
58
88
|
*/
|
|
59
|
-
export function
|
|
60
|
-
|
|
89
|
+
export function clusterVersions(): Observable<PlaceClusterVersions> {
|
|
90
|
+
const url = `${apiEndpoint()}${PATH}/versions`;
|
|
91
|
+
return get(url).pipe(map((resp: HashMap) => resp as PlaceClusterVersions));
|
|
61
92
|
}
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
/** Mapping of available query
|
|
1
|
+
/** Mapping of available query parameters for the cluster index endpoint */
|
|
2
2
|
export interface PlaceClusterQueryOptions {
|
|
3
|
-
/**
|
|
4
|
-
include_status?:
|
|
3
|
+
/** Return the detailed status of the node including memory and CPU usage */
|
|
4
|
+
include_status?: boolean;
|
|
5
5
|
/** Number of results to return. Defaults to `20`. Max `500` */
|
|
6
6
|
limit?: number;
|
|
7
7
|
/** Offset the page of results. Max `10000` */
|
|
8
8
|
offset?: number;
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
/** Mapping of available query parameters for the cluster show endpoint */
|
|
12
|
+
export interface PlaceClusterShowOptions {
|
|
13
|
+
/** Return the detailed status of the drivers running on the node */
|
|
14
|
+
include_status?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Mapping of available query parameters for the cluster delete endpoint (terminate process) */
|
|
18
|
+
export interface PlaceClusterTerminateOptions {
|
|
19
|
+
/** The name of the driver to terminate (required) */
|
|
20
|
+
driver: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Response from the cluster versions endpoint */
|
|
24
|
+
export interface PlaceClusterVersions {
|
|
25
|
+
/** Map of node ID to version string */
|
|
26
|
+
[nodeId: string]: string;
|
|
27
|
+
}
|
package/src/domains/functions.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { map } from 'rxjs/operators';
|
|
3
|
+
import { apiEndpoint } from '../auth/functions';
|
|
4
|
+
import { get } from '../http/functions';
|
|
1
5
|
import { create, query, remove, show, update } from '../resources/functions';
|
|
2
6
|
import { PlaceResourceQueryOptions } from '../resources/interface';
|
|
3
7
|
import { HashMap } from '../utilities/types';
|
|
@@ -24,10 +28,9 @@ export function queryDomains(query_params: PlaceResourceQueryOptions = {}) {
|
|
|
24
28
|
/**
|
|
25
29
|
* Get the data for a domain
|
|
26
30
|
* @param id ID of the domain to retrieve
|
|
27
|
-
* @param query_params Query parameters to add the to request URL
|
|
28
31
|
*/
|
|
29
|
-
export function showDomain(id: string
|
|
30
|
-
return show({ id, query_params, fn: process, path: PATH });
|
|
32
|
+
export function showDomain(id: string) {
|
|
33
|
+
return show({ id, query_params: {}, fn: process, path: PATH });
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
/**
|
|
@@ -64,8 +67,16 @@ export function addDomain(form_data: Partial<PlaceDomain>) {
|
|
|
64
67
|
/**
|
|
65
68
|
* Remove a domain from the database
|
|
66
69
|
* @param id ID of the domain
|
|
67
|
-
* @param query_params Query parameters to add the to request URL
|
|
68
70
|
*/
|
|
69
|
-
export function removeDomain(id: string
|
|
70
|
-
return remove({ id, query_params, path: PATH });
|
|
71
|
+
export function removeDomain(id: string) {
|
|
72
|
+
return remove({ id, query_params: {}, path: PATH });
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Find the domain name by looking into domain registered email domains
|
|
77
|
+
* @param email Email address to lookup
|
|
78
|
+
*/
|
|
79
|
+
export function lookupDomainByEmail(email: string): Observable<PlaceDomain> {
|
|
80
|
+
const url = `${apiEndpoint()}${PATH}/lookup/${encodeURIComponent(email)}`;
|
|
81
|
+
return get(url).pipe(map((resp: HashMap) => process(resp as Partial<PlaceDomain>)));
|
|
71
82
|
}
|