@openremote/rest 1.0.2 → 1.2.0-snapshot.20240512155932
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/README.md +56 -9
- package/dist/umd/index.bundle.js +1 -0
- package/dist/umd/index.js +1 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib/restclient.d.ts +869 -0
- package/lib/restclient.js +1 -0
- package/lib/restclient.js.map +1 -0
- package/package.json +23 -13
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -27
- package/dist/index.js.map +0 -1
- package/dist/restclient.d.ts +0 -557
- package/dist/restclient.js +0 -765
- package/dist/restclient.js.map +0 -1
package/dist/restclient.js
DELETED
|
@@ -1,765 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
// Generated using typescript-generator version 2.13.489 on 2019-05-09 14:34:41.
|
|
3
|
-
export class NotificationResourceClient {
|
|
4
|
-
constructor(httpClient) {
|
|
5
|
-
this.httpClient = httpClient;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* HTTP GET /notification
|
|
9
|
-
* Java method: org.openremote.model.notification.NotificationResource.getNotifications
|
|
10
|
-
*/
|
|
11
|
-
getNotifications(queryParams, options) {
|
|
12
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `notification`, queryParams: queryParams, options: options });
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* HTTP DELETE /notification
|
|
16
|
-
* Java method: org.openremote.model.notification.NotificationResource.removeNotifications
|
|
17
|
-
*/
|
|
18
|
-
removeNotifications(queryParams, options) {
|
|
19
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `notification`, queryParams: queryParams, options: options });
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* HTTP POST /notification/alert
|
|
23
|
-
* Java method: org.openremote.model.notification.NotificationResource.sendNotification
|
|
24
|
-
*/
|
|
25
|
-
sendNotification(arg1, options) {
|
|
26
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `notification/alert`, data: arg1, options: options });
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* HTTP DELETE /notification/{notificationId}
|
|
30
|
-
* Java method: org.openremote.model.notification.NotificationResource.removeNotification
|
|
31
|
-
*/
|
|
32
|
-
removeNotification(notificationId, options) {
|
|
33
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `notification/${notificationId}`, options: options });
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* HTTP PUT /notification/{notificationId}/acknowledged
|
|
37
|
-
* Java method: org.openremote.model.notification.NotificationResource.notificationAcknowledged
|
|
38
|
-
*/
|
|
39
|
-
notificationAcknowledged(notificationId, arg3, queryParams, options) {
|
|
40
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `notification/${notificationId}/acknowledged`, queryParams: queryParams, data: arg3, options: options });
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* HTTP PUT /notification/{notificationId}/delivered
|
|
44
|
-
* Java method: org.openremote.model.notification.NotificationResource.notificationDelivered
|
|
45
|
-
*/
|
|
46
|
-
notificationDelivered(notificationId, queryParams, options) {
|
|
47
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `notification/${notificationId}/delivered`, queryParams: queryParams, options: options });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export class AssetResourceClient {
|
|
51
|
-
constructor(httpClient) {
|
|
52
|
-
this.httpClient = httpClient;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* HTTP POST /asset
|
|
56
|
-
* Java method: org.openremote.model.asset.AssetResource.create
|
|
57
|
-
*/
|
|
58
|
-
create(arg1, options) {
|
|
59
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `asset`, data: arg1, options: options });
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* HTTP DELETE /asset/link/{realm}/{userId}/{assetId}
|
|
63
|
-
* Java method: org.openremote.model.asset.AssetResource.deleteUserAsset
|
|
64
|
-
*/
|
|
65
|
-
deleteUserAsset(realm, userId, assetId, options) {
|
|
66
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `asset/link/${realm}/${userId}/${assetId}`, options: options });
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* HTTP GET /asset/partial/{assetId}
|
|
70
|
-
* Java method: org.openremote.model.asset.AssetResource.getPartial
|
|
71
|
-
*/
|
|
72
|
-
getPartial(assetId, options) {
|
|
73
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `asset/partial/${assetId}`, options: options });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* HTTP GET /asset/public/query
|
|
77
|
-
* Java method: org.openremote.model.asset.AssetResource.getPublicAssets
|
|
78
|
-
*/
|
|
79
|
-
getPublicAssets(queryParams, options) {
|
|
80
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `asset/public/query`, queryParams: queryParams, options: options });
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* HTTP POST /asset/public/query
|
|
84
|
-
* Java method: org.openremote.model.asset.AssetResource.queryPublicAssets
|
|
85
|
-
*/
|
|
86
|
-
queryPublicAssets(arg1, options) {
|
|
87
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `asset/public/query`, data: arg1, options: options });
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* HTTP POST /asset/query
|
|
91
|
-
* Java method: org.openremote.model.asset.AssetResource.queryAssets
|
|
92
|
-
*/
|
|
93
|
-
queryAssets(arg1, options) {
|
|
94
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `asset/query`, data: arg1, options: options });
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* HTTP GET /asset/user/current
|
|
98
|
-
* Java method: org.openremote.model.asset.AssetResource.getCurrentUserAssets
|
|
99
|
-
*/
|
|
100
|
-
getCurrentUserAssets(options) {
|
|
101
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `asset/user/current`, options: options });
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* HTTP POST /asset/user/link
|
|
105
|
-
* Java method: org.openremote.model.asset.AssetResource.createUserAsset
|
|
106
|
-
*/
|
|
107
|
-
createUserAsset(arg1, options) {
|
|
108
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `asset/user/link`, data: arg1, options: options });
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* HTTP GET /asset/user/link
|
|
112
|
-
* Java method: org.openremote.model.asset.AssetResource.getUserAssetLinks
|
|
113
|
-
*/
|
|
114
|
-
getUserAssetLinks(queryParams, options) {
|
|
115
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `asset/user/link`, queryParams: queryParams, options: options });
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* HTTP DELETE /asset/{assetId}
|
|
119
|
-
* Java method: org.openremote.model.asset.AssetResource.delete
|
|
120
|
-
*/
|
|
121
|
-
delete(assetId, options) {
|
|
122
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `asset/${assetId}`, options: options });
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* HTTP GET /asset/{assetId}
|
|
126
|
-
* Java method: org.openremote.model.asset.AssetResource.get
|
|
127
|
-
*/
|
|
128
|
-
get(assetId, options) {
|
|
129
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `asset/${assetId}`, options: options });
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* HTTP PUT /asset/{assetId}
|
|
133
|
-
* Java method: org.openremote.model.asset.AssetResource.update
|
|
134
|
-
*/
|
|
135
|
-
update(assetId, arg2, options) {
|
|
136
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `asset/${assetId}`, data: arg2, options: options });
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* HTTP PUT /asset/{assetId}/attribute/{attributeName}
|
|
140
|
-
* Java method: org.openremote.model.asset.AssetResource.writeAttributeValue
|
|
141
|
-
*/
|
|
142
|
-
writeAttributeValue(assetId, attributeName, arg3, options) {
|
|
143
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `asset/${assetId}/attribute/${attributeName}`, data: arg3, options: options });
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
export class StatusResourceClient {
|
|
147
|
-
constructor(httpClient) {
|
|
148
|
-
this.httpClient = httpClient;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* HTTP GET /health
|
|
152
|
-
* Java method: org.openremote.model.system.StatusResource.getHealthStatus
|
|
153
|
-
*/
|
|
154
|
-
getHealthStatus(options) {
|
|
155
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `health`, options: options });
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* HTTP GET /info
|
|
159
|
-
* Java method: org.openremote.model.system.StatusResource.getInfo
|
|
160
|
-
*/
|
|
161
|
-
getInfo(options) {
|
|
162
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `info`, options: options });
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
export class AssetDatapointResourceClient {
|
|
166
|
-
constructor(httpClient) {
|
|
167
|
-
this.httpClient = httpClient;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* HTTP GET /asset/datapoint/{assetId}/attribute/{attributeName}
|
|
171
|
-
* Java method: org.openremote.model.datapoint.AssetDatapointResource.getNumberDatapoints
|
|
172
|
-
*/
|
|
173
|
-
getNumberDatapoints(assetId, attributeName, queryParams, options) {
|
|
174
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `asset/datapoint/${assetId}/attribute/${attributeName}`, queryParams: queryParams, options: options });
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
export class AssetModelResourceClient {
|
|
178
|
-
constructor(httpClient) {
|
|
179
|
-
this.httpClient = httpClient;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* HTTP GET /model/asset/descriptors
|
|
183
|
-
* Java method: org.openremote.model.asset.AssetModelResource.getAssetDescriptors
|
|
184
|
-
*/
|
|
185
|
-
getAssetDescriptors(options) {
|
|
186
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `model/asset/descriptors`, options: options });
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* HTTP GET /model/attribute/typeDescriptors
|
|
190
|
-
* Java method: org.openremote.model.asset.AssetModelResource.getAttributeDescriptors
|
|
191
|
-
*/
|
|
192
|
-
getAttributeDescriptors(options) {
|
|
193
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `model/attribute/typeDescriptors`, options: options });
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* HTTP GET /model/attribute/valueDescriptors
|
|
197
|
-
* Java method: org.openremote.model.asset.AssetModelResource.getAttributeValueDescriptors
|
|
198
|
-
*/
|
|
199
|
-
getAttributeValueDescriptors(options) {
|
|
200
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `model/attribute/valueDescriptors`, options: options });
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* HTTP GET /model/metaItem/descriptors
|
|
204
|
-
* Java method: org.openremote.model.asset.AssetModelResource.getMetaItemDescriptors
|
|
205
|
-
*/
|
|
206
|
-
getMetaItemDescriptors(options) {
|
|
207
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `model/metaItem/descriptors`, options: options });
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
export class RulesResourceClient {
|
|
211
|
-
constructor(httpClient) {
|
|
212
|
-
this.httpClient = httpClient;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* HTTP POST /rules
|
|
216
|
-
* Java method: org.openremote.model.rules.RulesResource.createGlobalRuleset
|
|
217
|
-
*/
|
|
218
|
-
createGlobalRuleset(arg1, options) {
|
|
219
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `rules`, data: arg1, options: options });
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* HTTP GET /rules
|
|
223
|
-
* Java method: org.openremote.model.rules.RulesResource.getGlobalRulesets
|
|
224
|
-
*/
|
|
225
|
-
getGlobalRulesets(queryParams, options) {
|
|
226
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules`, queryParams: queryParams, options: options });
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* HTTP POST /rules/asset
|
|
230
|
-
* Java method: org.openremote.model.rules.RulesResource.createAssetRuleset
|
|
231
|
-
*/
|
|
232
|
-
createAssetRuleset(arg1, options) {
|
|
233
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `rules/asset`, data: arg1, options: options });
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* HTTP GET /rules/asset/for/{assetId}
|
|
237
|
-
* Java method: org.openremote.model.rules.RulesResource.getAssetRulesets
|
|
238
|
-
*/
|
|
239
|
-
getAssetRulesets(assetId, queryParams, options) {
|
|
240
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/asset/for/${assetId}`, queryParams: queryParams, options: options });
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* HTTP DELETE /rules/asset/{id}
|
|
244
|
-
* Java method: org.openremote.model.rules.RulesResource.deleteAssetRuleset
|
|
245
|
-
*/
|
|
246
|
-
deleteAssetRuleset(id, options) {
|
|
247
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `rules/asset/${id}`, options: options });
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* HTTP GET /rules/asset/{id}
|
|
251
|
-
* Java method: org.openremote.model.rules.RulesResource.getAssetRuleset
|
|
252
|
-
*/
|
|
253
|
-
getAssetRuleset(id, options) {
|
|
254
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/asset/${id}`, options: options });
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* HTTP PUT /rules/asset/{id}
|
|
258
|
-
* Java method: org.openremote.model.rules.RulesResource.updateAssetRuleset
|
|
259
|
-
*/
|
|
260
|
-
updateAssetRuleset(id, arg2, options) {
|
|
261
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `rules/asset/${id}`, data: arg2, options: options });
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* HTTP GET /rules/geofences/{assetId}
|
|
265
|
-
* Java method: org.openremote.model.rules.RulesResource.getAssetGeofences
|
|
266
|
-
*/
|
|
267
|
-
getAssetGeofences(assetId, options) {
|
|
268
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/geofences/${assetId}`, options: options });
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* HTTP GET /rules/info/asset/{assetId}
|
|
272
|
-
* Java method: org.openremote.model.rules.RulesResource.getAssetEngineInfo
|
|
273
|
-
*/
|
|
274
|
-
getAssetEngineInfo(assetId, options) {
|
|
275
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/info/asset/${assetId}`, options: options });
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* HTTP GET /rules/info/global
|
|
279
|
-
* Java method: org.openremote.model.rules.RulesResource.getGlobalEngineInfo
|
|
280
|
-
*/
|
|
281
|
-
getGlobalEngineInfo(options) {
|
|
282
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/info/global`, options: options });
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* HTTP GET /rules/info/tenant/{realm}
|
|
286
|
-
* Java method: org.openremote.model.rules.RulesResource.getTenantEngineInfo
|
|
287
|
-
*/
|
|
288
|
-
getTenantEngineInfo(realm, options) {
|
|
289
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/info/tenant/${realm}`, options: options });
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* HTTP POST /rules/tenant
|
|
293
|
-
* Java method: org.openremote.model.rules.RulesResource.createTenantRuleset
|
|
294
|
-
*/
|
|
295
|
-
createTenantRuleset(arg1, options) {
|
|
296
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `rules/tenant`, data: arg1, options: options });
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* HTTP GET /rules/tenant/for/{realm}
|
|
300
|
-
* Java method: org.openremote.model.rules.RulesResource.getTenantRulesets
|
|
301
|
-
*/
|
|
302
|
-
getTenantRulesets(realm, queryParams, options) {
|
|
303
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/tenant/for/${realm}`, queryParams: queryParams, options: options });
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* HTTP DELETE /rules/tenant/{id}
|
|
307
|
-
* Java method: org.openremote.model.rules.RulesResource.deleteTenantRuleset
|
|
308
|
-
*/
|
|
309
|
-
deleteTenantRuleset(id, options) {
|
|
310
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `rules/tenant/${id}`, options: options });
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* HTTP GET /rules/tenant/{id}
|
|
314
|
-
* Java method: org.openremote.model.rules.RulesResource.getTenantRuleset
|
|
315
|
-
*/
|
|
316
|
-
getTenantRuleset(id, options) {
|
|
317
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/tenant/${id}`, options: options });
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* HTTP PUT /rules/tenant/{id}
|
|
321
|
-
* Java method: org.openremote.model.rules.RulesResource.updateTenantRuleset
|
|
322
|
-
*/
|
|
323
|
-
updateTenantRuleset(id, arg2, options) {
|
|
324
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `rules/tenant/${id}`, data: arg2, options: options });
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* HTTP DELETE /rules/{id}
|
|
328
|
-
* Java method: org.openremote.model.rules.RulesResource.deleteGlobalRuleset
|
|
329
|
-
*/
|
|
330
|
-
deleteGlobalRuleset(id, options) {
|
|
331
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `rules/${id}`, options: options });
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* HTTP GET /rules/{id}
|
|
335
|
-
* Java method: org.openremote.model.rules.RulesResource.getGlobalRuleset
|
|
336
|
-
*/
|
|
337
|
-
getGlobalRuleset(id, options) {
|
|
338
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `rules/${id}`, options: options });
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* HTTP PUT /rules/{id}
|
|
342
|
-
* Java method: org.openremote.model.rules.RulesResource.updateGlobalRuleset
|
|
343
|
-
*/
|
|
344
|
-
updateGlobalRuleset(id, arg2, options) {
|
|
345
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `rules/${id}`, data: arg2, options: options });
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
export class ConsoleResourceClient {
|
|
349
|
-
constructor(httpClient) {
|
|
350
|
-
this.httpClient = httpClient;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* HTTP POST /console/register
|
|
354
|
-
* Java method: org.openremote.model.console.ConsoleResource.register
|
|
355
|
-
*/
|
|
356
|
-
register(arg1, options) {
|
|
357
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `console/register`, data: arg1, options: options });
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
export class AgentResourceClient {
|
|
361
|
-
constructor(httpClient) {
|
|
362
|
-
this.httpClient = httpClient;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* HTTP GET /agent/configuration/{agentId}/{protocolName}
|
|
366
|
-
* Java method: org.openremote.model.asset.agent.AgentResource.getDiscoveredProtocolConfigurations
|
|
367
|
-
*/
|
|
368
|
-
getDiscoveredProtocolConfigurations(agentId, protocolName, options) {
|
|
369
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `agent/configuration/${agentId}/${protocolName}`, options: options });
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* HTTP POST /agent/import/{agentId}/{protocolConfigurationName}
|
|
373
|
-
* Java method: org.openremote.model.asset.agent.AgentResource.importLinkedAttributes
|
|
374
|
-
*/
|
|
375
|
-
importLinkedAttributes(agentId, protocolConfigurationName, arg5, queryParams, options) {
|
|
376
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `agent/import/${agentId}/${protocolConfigurationName}`, queryParams: queryParams, data: arg5, options: options });
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* HTTP GET /agent/protocol
|
|
380
|
-
* Java method: org.openremote.model.asset.agent.AgentResource.getAllSupportedProtocols
|
|
381
|
-
*/
|
|
382
|
-
getAllSupportedProtocols(options) {
|
|
383
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `agent/protocol`, options: options });
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* HTTP GET /agent/protocol/{agentId}
|
|
387
|
-
* Java method: org.openremote.model.asset.agent.AgentResource.getSupportedProtocols
|
|
388
|
-
*/
|
|
389
|
-
getSupportedProtocols(agentId, options) {
|
|
390
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `agent/protocol/${agentId}`, options: options });
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* HTTP GET /agent/search/{agentId}/{protocolConfigurationName}
|
|
394
|
-
* Java method: org.openremote.model.asset.agent.AgentResource.searchForLinkedAttributes
|
|
395
|
-
*/
|
|
396
|
-
searchForLinkedAttributes(agentId, protocolConfigurationName, queryParams, options) {
|
|
397
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `agent/search/${agentId}/${protocolConfigurationName}`, queryParams: queryParams, options: options });
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* HTTP GET /agent/status/{agentId}
|
|
401
|
-
* Java method: org.openremote.model.asset.agent.AgentResource.getAgentStatus
|
|
402
|
-
*/
|
|
403
|
-
getAgentStatus(agentId, options) {
|
|
404
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `agent/status/${agentId}`, options: options });
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* HTTP POST /agent/validate/{agentId}
|
|
408
|
-
* Java method: org.openremote.model.asset.agent.AgentResource.validateProtocolConfiguration
|
|
409
|
-
*/
|
|
410
|
-
validateProtocolConfiguration(agentId, arg2, options) {
|
|
411
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `agent/validate/${agentId}`, data: arg2, options: options });
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
export class ConsoleAppResourceClient {
|
|
415
|
-
constructor(httpClient) {
|
|
416
|
-
this.httpClient = httpClient;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* HTTP GET /app
|
|
420
|
-
* Java method: org.openremote.model.apps.ConsoleAppResource.getInstalledApps
|
|
421
|
-
*/
|
|
422
|
-
getInstalledApps(options) {
|
|
423
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `app`, options: options });
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
export class UserResourceClient {
|
|
427
|
-
constructor(httpClient) {
|
|
428
|
-
this.httpClient = httpClient;
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* HTTP POST /user/{realm}
|
|
432
|
-
* Java method: org.openremote.model.security.UserResource.create
|
|
433
|
-
*/
|
|
434
|
-
create(realm, arg2, options) {
|
|
435
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `user/${realm}`, data: arg2, options: options });
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* HTTP GET /user/{realm}
|
|
439
|
-
* Java method: org.openremote.model.security.UserResource.getAll
|
|
440
|
-
*/
|
|
441
|
-
getAll(realm, options) {
|
|
442
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `user/${realm}`, options: options });
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* HTTP DELETE /user/{realm}/{userId}
|
|
446
|
-
* Java method: org.openremote.model.security.UserResource.delete
|
|
447
|
-
*/
|
|
448
|
-
delete(realm, userId, options) {
|
|
449
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `user/${realm}/${userId}`, options: options });
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* HTTP GET /user/{realm}/{userId}
|
|
453
|
-
* Java method: org.openremote.model.security.UserResource.get
|
|
454
|
-
*/
|
|
455
|
-
get(realm, userId, options) {
|
|
456
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `user/${realm}/${userId}`, options: options });
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* HTTP PUT /user/{realm}/{userId}
|
|
460
|
-
* Java method: org.openremote.model.security.UserResource.update
|
|
461
|
-
*/
|
|
462
|
-
update(realm, userId, arg3, options) {
|
|
463
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `user/${realm}/${userId}`, data: arg3, options: options });
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* HTTP PUT /user/{realm}/{userId}/reset-password
|
|
467
|
-
* Java method: org.openremote.model.security.UserResource.resetPassword
|
|
468
|
-
*/
|
|
469
|
-
resetPassword(realm, userId, arg3, options) {
|
|
470
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `user/${realm}/${userId}/reset-password`, data: arg3, options: options });
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* HTTP GET /user/{realm}/{userId}/role
|
|
474
|
-
* Java method: org.openremote.model.security.UserResource.getRoles
|
|
475
|
-
*/
|
|
476
|
-
getRoles(realm, userId, options) {
|
|
477
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `user/${realm}/${userId}/role`, options: options });
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* HTTP PUT /user/{realm}/{userId}/role
|
|
481
|
-
* Java method: org.openremote.model.security.UserResource.updateRoles
|
|
482
|
-
*/
|
|
483
|
-
updateRoles(realm, userId, arg3, options) {
|
|
484
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `user/${realm}/${userId}/role`, data: arg3, options: options });
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
export class SyslogResourceClient {
|
|
488
|
-
constructor(httpClient) {
|
|
489
|
-
this.httpClient = httpClient;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* HTTP GET /syslog/config
|
|
493
|
-
* Java method: org.openremote.model.syslog.SyslogResource.getConfig
|
|
494
|
-
*/
|
|
495
|
-
getConfig(options) {
|
|
496
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `syslog/config`, options: options });
|
|
497
|
-
}
|
|
498
|
-
/**
|
|
499
|
-
* HTTP PUT /syslog/config
|
|
500
|
-
* Java method: org.openremote.model.syslog.SyslogResource.updateConfig
|
|
501
|
-
*/
|
|
502
|
-
updateConfig(arg1, options) {
|
|
503
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `syslog/config`, data: arg1, options: options });
|
|
504
|
-
}
|
|
505
|
-
/**
|
|
506
|
-
* HTTP DELETE /syslog/event
|
|
507
|
-
* Java method: org.openremote.model.syslog.SyslogResource.clearEvents
|
|
508
|
-
*/
|
|
509
|
-
clearEvents(options) {
|
|
510
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `syslog/event`, options: options });
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* HTTP GET /syslog/event
|
|
514
|
-
* Java method: org.openremote.model.syslog.SyslogResource.getEvents
|
|
515
|
-
*/
|
|
516
|
-
getEvents(queryParams, options) {
|
|
517
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `syslog/event`, queryParams: queryParams, options: options });
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
export class TenantResourceClient {
|
|
521
|
-
constructor(httpClient) {
|
|
522
|
-
this.httpClient = httpClient;
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* HTTP POST /tenant
|
|
526
|
-
* Java method: org.openremote.model.security.TenantResource.create
|
|
527
|
-
*/
|
|
528
|
-
create(arg1, options) {
|
|
529
|
-
return this.httpClient.request({ method: "POST", url: uriEncoding `tenant`, data: arg1, options: options });
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* HTTP GET /tenant
|
|
533
|
-
* Java method: org.openremote.model.security.TenantResource.getAll
|
|
534
|
-
*/
|
|
535
|
-
getAll(options) {
|
|
536
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `tenant`, options: options });
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* HTTP DELETE /tenant/{realm}
|
|
540
|
-
* Java method: org.openremote.model.security.TenantResource.delete
|
|
541
|
-
*/
|
|
542
|
-
delete(realm, options) {
|
|
543
|
-
return this.httpClient.request({ method: "DELETE", url: uriEncoding `tenant/${realm}`, options: options });
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* HTTP GET /tenant/{realm}
|
|
547
|
-
* Java method: org.openremote.model.security.TenantResource.get
|
|
548
|
-
*/
|
|
549
|
-
get(realm, options) {
|
|
550
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `tenant/${realm}`, options: options });
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* HTTP PUT /tenant/{realm}
|
|
554
|
-
* Java method: org.openremote.model.security.TenantResource.update
|
|
555
|
-
*/
|
|
556
|
-
update(realm, arg2, options) {
|
|
557
|
-
return this.httpClient.request({ method: "PUT", url: uriEncoding `tenant/${realm}`, data: arg2, options: options });
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
export class MapResourceClient {
|
|
561
|
-
constructor(httpClient) {
|
|
562
|
-
this.httpClient = httpClient;
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* HTTP GET /map
|
|
566
|
-
* Java method: org.openremote.model.map.MapResource.getSettings
|
|
567
|
-
*/
|
|
568
|
-
getSettings(options) {
|
|
569
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `map`, options: options });
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* HTTP GET /map/js
|
|
573
|
-
* Java method: org.openremote.model.map.MapResource.getSettingsJs
|
|
574
|
-
*/
|
|
575
|
-
getSettingsJs(options) {
|
|
576
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `map/js`, options: options });
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* HTTP GET /map/tile/{zoom}/{column}/{row}
|
|
580
|
-
* Java method: org.openremote.model.map.MapResource.getTile
|
|
581
|
-
*/
|
|
582
|
-
getTile(zoom, column, row, options) {
|
|
583
|
-
return this.httpClient.request({ method: "GET", url: uriEncoding `map/tile/${zoom}/${column}/${row}`, options: options });
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
function uriEncoding(template, ...substitutions) {
|
|
587
|
-
let result = "";
|
|
588
|
-
for (let i = 0; i < substitutions.length; i++) {
|
|
589
|
-
result += template[i];
|
|
590
|
-
result += encodeURIComponent(substitutions[i]);
|
|
591
|
-
}
|
|
592
|
-
result += template[template.length - 1];
|
|
593
|
-
return result;
|
|
594
|
-
}
|
|
595
|
-
// Added by 'AggregatedApiClient' extension
|
|
596
|
-
export class ApiClient {
|
|
597
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
598
|
-
this._notificationResource = new AxiosNotificationResourceClient(baseURL, axiosInstance);
|
|
599
|
-
this._assetResource = new AxiosAssetResourceClient(baseURL, axiosInstance);
|
|
600
|
-
this._statusResource = new AxiosStatusResourceClient(baseURL, axiosInstance);
|
|
601
|
-
this._assetDatapointResource = new AxiosAssetDatapointResourceClient(baseURL, axiosInstance);
|
|
602
|
-
this._assetModelResource = new AxiosAssetModelResourceClient(baseURL, axiosInstance);
|
|
603
|
-
this._rulesResource = new AxiosRulesResourceClient(baseURL, axiosInstance);
|
|
604
|
-
this._consoleResource = new AxiosConsoleResourceClient(baseURL, axiosInstance);
|
|
605
|
-
this._agentResource = new AxiosAgentResourceClient(baseURL, axiosInstance);
|
|
606
|
-
this._consoleAppResource = new AxiosConsoleAppResourceClient(baseURL, axiosInstance);
|
|
607
|
-
this._userResource = new AxiosUserResourceClient(baseURL, axiosInstance);
|
|
608
|
-
this._syslogResource = new AxiosSyslogResourceClient(baseURL, axiosInstance);
|
|
609
|
-
this._tenantResource = new AxiosTenantResourceClient(baseURL, axiosInstance);
|
|
610
|
-
this._mapResource = new AxiosMapResourceClient(baseURL, axiosInstance);
|
|
611
|
-
this._assetResource = new AxiosAssetResourceClient(baseURL, axiosInstance);
|
|
612
|
-
}
|
|
613
|
-
get NotificationResource() {
|
|
614
|
-
return this._notificationResource;
|
|
615
|
-
}
|
|
616
|
-
get AssetResource() {
|
|
617
|
-
return this._assetResource;
|
|
618
|
-
}
|
|
619
|
-
get StatusResource() {
|
|
620
|
-
return this._statusResource;
|
|
621
|
-
}
|
|
622
|
-
get AssetDatapointResource() {
|
|
623
|
-
return this._assetDatapointResource;
|
|
624
|
-
}
|
|
625
|
-
get AssetModelResource() {
|
|
626
|
-
return this._assetModelResource;
|
|
627
|
-
}
|
|
628
|
-
get RulesResource() {
|
|
629
|
-
return this._rulesResource;
|
|
630
|
-
}
|
|
631
|
-
get ConsoleResource() {
|
|
632
|
-
return this._consoleResource;
|
|
633
|
-
}
|
|
634
|
-
get AgentResource() {
|
|
635
|
-
return this._agentResource;
|
|
636
|
-
}
|
|
637
|
-
get ConsoleAppResource() {
|
|
638
|
-
return this._consoleAppResource;
|
|
639
|
-
}
|
|
640
|
-
get UserResource() {
|
|
641
|
-
return this._userResource;
|
|
642
|
-
}
|
|
643
|
-
get SyslogResource() {
|
|
644
|
-
return this._syslogResource;
|
|
645
|
-
}
|
|
646
|
-
get TenantResource() {
|
|
647
|
-
return this._tenantResource;
|
|
648
|
-
}
|
|
649
|
-
get MapResource() {
|
|
650
|
-
return this._mapResource;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
// Added by 'AxiosClientExtension' extension
|
|
654
|
-
import axios from "axios";
|
|
655
|
-
class AxiosHttpClient {
|
|
656
|
-
constructor(axios) {
|
|
657
|
-
this.axios = axios;
|
|
658
|
-
}
|
|
659
|
-
request(requestConfig) {
|
|
660
|
-
function assign(target, source) {
|
|
661
|
-
if (source != undefined) {
|
|
662
|
-
for (const key in source) {
|
|
663
|
-
if (source.hasOwnProperty(key)) {
|
|
664
|
-
target[key] = source[key];
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
return target;
|
|
669
|
-
}
|
|
670
|
-
const config = {};
|
|
671
|
-
config.method = requestConfig.method;
|
|
672
|
-
config.url = requestConfig.url;
|
|
673
|
-
config.params = requestConfig.queryParams;
|
|
674
|
-
config.data = requestConfig.data;
|
|
675
|
-
assign(config, requestConfig.options);
|
|
676
|
-
const copyFn = requestConfig.copyFn;
|
|
677
|
-
const axiosResponse = this.axios.request(config);
|
|
678
|
-
return axiosResponse.then(axiosResponse => {
|
|
679
|
-
if (copyFn && axiosResponse.data) {
|
|
680
|
-
axiosResponse.originalData = axiosResponse.data;
|
|
681
|
-
axiosResponse.data = copyFn(axiosResponse.data);
|
|
682
|
-
}
|
|
683
|
-
return axiosResponse;
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
export class AxiosNotificationResourceClient extends NotificationResourceClient {
|
|
688
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
689
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
690
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
export class AxiosAssetResourceClient extends AssetResourceClient {
|
|
694
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
695
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
696
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
export class AxiosStatusResourceClient extends StatusResourceClient {
|
|
700
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
701
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
702
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
export class AxiosAssetDatapointResourceClient extends AssetDatapointResourceClient {
|
|
706
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
707
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
708
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
export class AxiosAssetModelResourceClient extends AssetModelResourceClient {
|
|
712
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
713
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
714
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
export class AxiosRulesResourceClient extends RulesResourceClient {
|
|
718
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
719
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
720
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
export class AxiosConsoleResourceClient extends ConsoleResourceClient {
|
|
724
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
725
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
726
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
export class AxiosAgentResourceClient extends AgentResourceClient {
|
|
730
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
731
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
732
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
export class AxiosConsoleAppResourceClient extends ConsoleAppResourceClient {
|
|
736
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
737
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
738
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
export class AxiosUserResourceClient extends UserResourceClient {
|
|
742
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
743
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
744
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
export class AxiosSyslogResourceClient extends SyslogResourceClient {
|
|
748
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
749
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
750
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
export class AxiosTenantResourceClient extends TenantResourceClient {
|
|
754
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
755
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
756
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
export class AxiosMapResourceClient extends MapResourceClient {
|
|
760
|
-
constructor(baseURL, axiosInstance = axios.create()) {
|
|
761
|
-
axiosInstance.defaults.baseURL = baseURL;
|
|
762
|
-
super(new AxiosHttpClient(axiosInstance));
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
//# sourceMappingURL=restclient.js.map
|