@kohost/api-client 3.0.0-beta.45 → 3.0.0-beta.47
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/cjs/AMQPClient.js +61 -24
- package/dist/cjs/Client.js +126 -4
- package/dist/cjs/Commands.js +161 -50
- package/dist/cjs/Errors.js +55 -22
- package/dist/cjs/Events.js +66 -22
- package/dist/cjs/Models.js +863 -567
- package/dist/cjs/SocketIoClient.js +5 -2
- package/dist/cjs/defs.js +6 -4
- package/dist/cjs/index.cjs.js +6744 -10
- package/dist/cjs/utils.js +55 -22
- package/dist/esm/Client.js +140 -10
- package/dist/esm/Client.js.map +3 -3
- package/dist/esm/Commands.js +161 -50
- package/dist/esm/Commands.js.map +3 -3
- package/dist/esm/Errors.js +55 -22
- package/dist/esm/Errors.js.map +1 -1
- package/dist/esm/Events.js +66 -22
- package/dist/esm/Events.js.map +1 -1
- package/dist/esm/Models.js +941 -573
- package/dist/esm/Models.js.map +4 -4
- package/dist/esm/SocketIoClient.js +53 -26
- package/dist/esm/SocketIoClient.js.map +1 -1
- package/dist/esm/defs.js +20 -10
- package/dist/esm/defs.js.map +1 -1
- package/dist/esm/index.js +17 -11
- package/dist/esm/utils.js +166 -61
- package/dist/esm/utils.js.map +1 -1
- package/dist/useCases/ListScenes.js +32 -0
- package/dist/useCases/SetRoomScene.js +32 -0
- package/dist/useCases/SetSpaceScene.js +32 -0
- package/package.json +2 -2
package/dist/cjs/utils.js
CHANGED
|
@@ -294,14 +294,17 @@ var require_schema = __commonJS({
|
|
|
294
294
|
// src/Errors/AppError.js
|
|
295
295
|
var require_AppError = __commonJS({
|
|
296
296
|
"src/Errors/AppError.js"(exports2, module2) {
|
|
297
|
-
module2.exports =
|
|
297
|
+
module2.exports = class AppError extends Error {
|
|
298
|
+
static {
|
|
299
|
+
__name(this, "AppError");
|
|
300
|
+
}
|
|
298
301
|
constructor(message = "Internal Server Error", options) {
|
|
299
302
|
super(message, options);
|
|
300
303
|
this.type = this.constructor.name;
|
|
301
304
|
this.statusCode = 500;
|
|
302
305
|
Object.setPrototypeOf(this, AppError.prototype);
|
|
303
306
|
}
|
|
304
|
-
}
|
|
307
|
+
};
|
|
305
308
|
}
|
|
306
309
|
});
|
|
307
310
|
|
|
@@ -309,13 +312,16 @@ var require_AppError = __commonJS({
|
|
|
309
312
|
var require_AuthenticationError = __commonJS({
|
|
310
313
|
"src/Errors/AuthenticationError.js"(exports2, module2) {
|
|
311
314
|
var AppError = require_AppError();
|
|
312
|
-
module2.exports =
|
|
315
|
+
module2.exports = class AuthenticationError extends AppError {
|
|
316
|
+
static {
|
|
317
|
+
__name(this, "AuthenticationError");
|
|
318
|
+
}
|
|
313
319
|
constructor(message = "Authentication Error", options = {}) {
|
|
314
320
|
super(message, options);
|
|
315
321
|
this.statusCode = 401;
|
|
316
322
|
Object.setPrototypeOf(this, AuthenticationError.prototype);
|
|
317
323
|
}
|
|
318
|
-
}
|
|
324
|
+
};
|
|
319
325
|
}
|
|
320
326
|
});
|
|
321
327
|
|
|
@@ -323,13 +329,16 @@ var require_AuthenticationError = __commonJS({
|
|
|
323
329
|
var require_AuthorizationError = __commonJS({
|
|
324
330
|
"src/Errors/AuthorizationError.js"(exports2, module2) {
|
|
325
331
|
var AppError = require_AppError();
|
|
326
|
-
module2.exports =
|
|
332
|
+
module2.exports = class AuthorizationError extends AppError {
|
|
333
|
+
static {
|
|
334
|
+
__name(this, "AuthorizationError");
|
|
335
|
+
}
|
|
327
336
|
constructor(message = "Authorization Error", options = {}) {
|
|
328
337
|
super(message, options);
|
|
329
338
|
this.statusCode = 403;
|
|
330
339
|
Object.setPrototypeOf(this, AuthorizationError.prototype);
|
|
331
340
|
}
|
|
332
|
-
}
|
|
341
|
+
};
|
|
333
342
|
}
|
|
334
343
|
});
|
|
335
344
|
|
|
@@ -337,13 +346,16 @@ var require_AuthorizationError = __commonJS({
|
|
|
337
346
|
var require_DeviceCommError = __commonJS({
|
|
338
347
|
"src/Errors/DeviceCommError.js"(exports2, module2) {
|
|
339
348
|
var AppError = require_AppError();
|
|
340
|
-
module2.exports =
|
|
349
|
+
module2.exports = class DeviceCommError extends AppError {
|
|
350
|
+
static {
|
|
351
|
+
__name(this, "DeviceCommError");
|
|
352
|
+
}
|
|
341
353
|
constructor(message = "Device Communication Error", options = {}) {
|
|
342
354
|
super(message, options);
|
|
343
355
|
this.statusCode = 503;
|
|
344
356
|
Object.setPrototypeOf(this, DeviceCommError.prototype);
|
|
345
357
|
}
|
|
346
|
-
}
|
|
358
|
+
};
|
|
347
359
|
}
|
|
348
360
|
});
|
|
349
361
|
|
|
@@ -351,13 +363,16 @@ var require_DeviceCommError = __commonJS({
|
|
|
351
363
|
var require_LoginError = __commonJS({
|
|
352
364
|
"src/Errors/LoginError.js"(exports2, module2) {
|
|
353
365
|
var AppError = require_AppError();
|
|
354
|
-
module2.exports =
|
|
366
|
+
module2.exports = class LoginError extends AppError {
|
|
367
|
+
static {
|
|
368
|
+
__name(this, "LoginError");
|
|
369
|
+
}
|
|
355
370
|
constructor(message = "Invalid Login information provided", options = {}) {
|
|
356
371
|
super(message, options);
|
|
357
372
|
this.statusCode = 401;
|
|
358
373
|
Object.setPrototypeOf(this, LoginError.prototype);
|
|
359
374
|
}
|
|
360
|
-
}
|
|
375
|
+
};
|
|
361
376
|
}
|
|
362
377
|
});
|
|
363
378
|
|
|
@@ -365,13 +380,16 @@ var require_LoginError = __commonJS({
|
|
|
365
380
|
var require_NotFoundError = __commonJS({
|
|
366
381
|
"src/Errors/NotFoundError.js"(exports2, module2) {
|
|
367
382
|
var AppError = require_AppError();
|
|
368
|
-
module2.exports =
|
|
383
|
+
module2.exports = class NotFoundError extends AppError {
|
|
384
|
+
static {
|
|
385
|
+
__name(this, "NotFoundError");
|
|
386
|
+
}
|
|
369
387
|
constructor(message = "Resource Not Found", options = {}) {
|
|
370
388
|
super(message, options);
|
|
371
389
|
this.statusCode = 404;
|
|
372
390
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
373
391
|
}
|
|
374
|
-
}
|
|
392
|
+
};
|
|
375
393
|
}
|
|
376
394
|
});
|
|
377
395
|
|
|
@@ -379,13 +397,16 @@ var require_NotFoundError = __commonJS({
|
|
|
379
397
|
var require_RequestError = __commonJS({
|
|
380
398
|
"src/Errors/RequestError.js"(exports2, module2) {
|
|
381
399
|
var AppError = require_AppError();
|
|
382
|
-
module2.exports =
|
|
400
|
+
module2.exports = class RequestError extends AppError {
|
|
401
|
+
static {
|
|
402
|
+
__name(this, "RequestError");
|
|
403
|
+
}
|
|
383
404
|
constructor(message = "Bad Request", options = {}) {
|
|
384
405
|
super(message, options);
|
|
385
406
|
this.statusCode = 400;
|
|
386
407
|
Object.setPrototypeOf(this, RequestError.prototype);
|
|
387
408
|
}
|
|
388
|
-
}
|
|
409
|
+
};
|
|
389
410
|
}
|
|
390
411
|
});
|
|
391
412
|
|
|
@@ -393,13 +414,16 @@ var require_RequestError = __commonJS({
|
|
|
393
414
|
var require_SystemCommError = __commonJS({
|
|
394
415
|
"src/Errors/SystemCommError.js"(exports2, module2) {
|
|
395
416
|
var AppError = require_AppError();
|
|
396
|
-
module2.exports =
|
|
417
|
+
module2.exports = class SystemCommError extends AppError {
|
|
418
|
+
static {
|
|
419
|
+
__name(this, "SystemCommError");
|
|
420
|
+
}
|
|
397
421
|
constructor(message = "System Communication Error", options = {}) {
|
|
398
422
|
super(message, options);
|
|
399
423
|
this.statusCode = 503;
|
|
400
424
|
Object.setPrototypeOf(this, SystemCommError.prototype);
|
|
401
425
|
}
|
|
402
|
-
}
|
|
426
|
+
};
|
|
403
427
|
}
|
|
404
428
|
});
|
|
405
429
|
|
|
@@ -407,13 +431,16 @@ var require_SystemCommError = __commonJS({
|
|
|
407
431
|
var require_TokenExpiredError = __commonJS({
|
|
408
432
|
"src/Errors/TokenExpiredError.js"(exports2, module2) {
|
|
409
433
|
var AppError = require_AppError();
|
|
410
|
-
module2.exports =
|
|
434
|
+
module2.exports = class TokenExpiredError extends AppError {
|
|
435
|
+
static {
|
|
436
|
+
__name(this, "TokenExpiredError");
|
|
437
|
+
}
|
|
411
438
|
constructor(message = "Token Expired", options = {}) {
|
|
412
439
|
super(message, options);
|
|
413
440
|
this.statusCode = 401;
|
|
414
441
|
Object.setPrototypeOf(this, TokenExpiredError.prototype);
|
|
415
442
|
}
|
|
416
|
-
}
|
|
443
|
+
};
|
|
417
444
|
}
|
|
418
445
|
});
|
|
419
446
|
|
|
@@ -421,13 +448,16 @@ var require_TokenExpiredError = __commonJS({
|
|
|
421
448
|
var require_UnprocessableRequestError = __commonJS({
|
|
422
449
|
"src/Errors/UnprocessableRequestError.js"(exports2, module2) {
|
|
423
450
|
var AppError = require_AppError();
|
|
424
|
-
module2.exports =
|
|
451
|
+
module2.exports = class UnprocessableRequestError extends AppError {
|
|
452
|
+
static {
|
|
453
|
+
__name(this, "UnprocessableRequestError");
|
|
454
|
+
}
|
|
425
455
|
constructor(message = "Unprocessable Request Error", options = {}) {
|
|
426
456
|
super(message, options);
|
|
427
457
|
this.statusCode = 422;
|
|
428
458
|
Object.setPrototypeOf(this, UnprocessableRequestError.prototype);
|
|
429
459
|
}
|
|
430
|
-
}
|
|
460
|
+
};
|
|
431
461
|
}
|
|
432
462
|
});
|
|
433
463
|
|
|
@@ -435,13 +465,16 @@ var require_UnprocessableRequestError = __commonJS({
|
|
|
435
465
|
var require_ValidationError = __commonJS({
|
|
436
466
|
"src/Errors/ValidationError.js"(exports2, module2) {
|
|
437
467
|
var AppError = require_AppError();
|
|
438
|
-
module2.exports =
|
|
468
|
+
module2.exports = class ValidationError extends AppError {
|
|
469
|
+
static {
|
|
470
|
+
__name(this, "ValidationError");
|
|
471
|
+
}
|
|
439
472
|
constructor(message = "Validation Error", options = {}) {
|
|
440
473
|
super(message, options);
|
|
441
474
|
this.statusCode = 400;
|
|
442
475
|
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
443
476
|
}
|
|
444
|
-
}
|
|
477
|
+
};
|
|
445
478
|
}
|
|
446
479
|
});
|
|
447
480
|
|
package/dist/esm/Client.js
CHANGED
|
@@ -1031,6 +1031,44 @@ var require_CreateRoomInSpace = __commonJS({
|
|
|
1031
1031
|
}
|
|
1032
1032
|
});
|
|
1033
1033
|
|
|
1034
|
+
// dist/useCases/SetSpaceScene.js
|
|
1035
|
+
var require_SetSpaceScene = __commonJS({
|
|
1036
|
+
"dist/useCases/SetSpaceScene.js"(exports, module) {
|
|
1037
|
+
module.exports = /* @__PURE__ */ __name(function SetSpaceScene(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
1038
|
+
if (!requestData)
|
|
1039
|
+
requestData = {};
|
|
1040
|
+
const pathParams = [":spaceId", ":id"];
|
|
1041
|
+
const { data, query, headers } = requestData;
|
|
1042
|
+
let url = "/spaces/:spaceId/scenes/:id";
|
|
1043
|
+
if (pathParams && data) {
|
|
1044
|
+
for (const param of pathParams) {
|
|
1045
|
+
const paramName = param.replace(":", "");
|
|
1046
|
+
url = url.replace(param, data[paramName]);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
1050
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
1051
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
1052
|
+
return Promise.reject(
|
|
1053
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
1054
|
+
);
|
|
1055
|
+
}
|
|
1056
|
+
const config = {
|
|
1057
|
+
method: "post",
|
|
1058
|
+
url,
|
|
1059
|
+
...httpConfigOptions
|
|
1060
|
+
};
|
|
1061
|
+
if (data)
|
|
1062
|
+
config.data = data;
|
|
1063
|
+
if (query)
|
|
1064
|
+
config.params = query;
|
|
1065
|
+
if (headers)
|
|
1066
|
+
config.headers = headers;
|
|
1067
|
+
return this._http.request(config);
|
|
1068
|
+
}, "SetSpaceScene");
|
|
1069
|
+
}
|
|
1070
|
+
});
|
|
1071
|
+
|
|
1034
1072
|
// dist/useCases/CreateSpaceType.js
|
|
1035
1073
|
var require_CreateSpaceType = __commonJS({
|
|
1036
1074
|
"dist/useCases/CreateSpaceType.js"(exports, module) {
|
|
@@ -3463,6 +3501,44 @@ var require_SetWindowCovering = __commonJS({
|
|
|
3463
3501
|
}
|
|
3464
3502
|
});
|
|
3465
3503
|
|
|
3504
|
+
// dist/useCases/SetRoomScene.js
|
|
3505
|
+
var require_SetRoomScene = __commonJS({
|
|
3506
|
+
"dist/useCases/SetRoomScene.js"(exports, module) {
|
|
3507
|
+
module.exports = /* @__PURE__ */ __name(function SetRoomScene(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
3508
|
+
if (!requestData)
|
|
3509
|
+
requestData = {};
|
|
3510
|
+
const pathParams = [":roomId", ":id"];
|
|
3511
|
+
const { data, query, headers } = requestData;
|
|
3512
|
+
let url = "/rooms/:roomId/scenes/:id";
|
|
3513
|
+
if (pathParams && data) {
|
|
3514
|
+
for (const param of pathParams) {
|
|
3515
|
+
const paramName = param.replace(":", "");
|
|
3516
|
+
url = url.replace(param, data[paramName]);
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3519
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
3520
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
3521
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
3522
|
+
return Promise.reject(
|
|
3523
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
3524
|
+
);
|
|
3525
|
+
}
|
|
3526
|
+
const config = {
|
|
3527
|
+
method: "post",
|
|
3528
|
+
url,
|
|
3529
|
+
...httpConfigOptions
|
|
3530
|
+
};
|
|
3531
|
+
if (data)
|
|
3532
|
+
config.data = data;
|
|
3533
|
+
if (query)
|
|
3534
|
+
config.params = query;
|
|
3535
|
+
if (headers)
|
|
3536
|
+
config.headers = headers;
|
|
3537
|
+
return this._http.request(config);
|
|
3538
|
+
}, "SetRoomScene");
|
|
3539
|
+
}
|
|
3540
|
+
});
|
|
3541
|
+
|
|
3466
3542
|
// dist/useCases/AddScenesToRoom.js
|
|
3467
3543
|
var require_AddScenesToRoom = __commonJS({
|
|
3468
3544
|
"dist/useCases/AddScenesToRoom.js"(exports, module) {
|
|
@@ -3881,6 +3957,44 @@ var require_UpdateTicketStatus = __commonJS({
|
|
|
3881
3957
|
}
|
|
3882
3958
|
});
|
|
3883
3959
|
|
|
3960
|
+
// dist/useCases/ListScenes.js
|
|
3961
|
+
var require_ListScenes = __commonJS({
|
|
3962
|
+
"dist/useCases/ListScenes.js"(exports, module) {
|
|
3963
|
+
module.exports = /* @__PURE__ */ __name(function ListScenes(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
3964
|
+
if (!requestData)
|
|
3965
|
+
requestData = {};
|
|
3966
|
+
const pathParams = null;
|
|
3967
|
+
const { data, query, headers } = requestData;
|
|
3968
|
+
let url = "/scenes";
|
|
3969
|
+
if (pathParams && data) {
|
|
3970
|
+
for (const param of pathParams) {
|
|
3971
|
+
const paramName = param.replace(":", "");
|
|
3972
|
+
url = url.replace(param, data[paramName]);
|
|
3973
|
+
}
|
|
3974
|
+
}
|
|
3975
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
3976
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
3977
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
3978
|
+
return Promise.reject(
|
|
3979
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
3980
|
+
);
|
|
3981
|
+
}
|
|
3982
|
+
const config = {
|
|
3983
|
+
method: "get",
|
|
3984
|
+
url,
|
|
3985
|
+
...httpConfigOptions
|
|
3986
|
+
};
|
|
3987
|
+
if (data)
|
|
3988
|
+
config.data = data;
|
|
3989
|
+
if (query)
|
|
3990
|
+
config.params = query;
|
|
3991
|
+
if (headers)
|
|
3992
|
+
config.headers = headers;
|
|
3993
|
+
return this._http.request(config);
|
|
3994
|
+
}, "ListScenes");
|
|
3995
|
+
}
|
|
3996
|
+
});
|
|
3997
|
+
|
|
3884
3998
|
// dist/useCases/CreateDefaultScenes.js
|
|
3885
3999
|
var require_CreateDefaultScenes = __commonJS({
|
|
3886
4000
|
"dist/useCases/CreateDefaultScenes.js"(exports, module) {
|
|
@@ -6488,6 +6602,9 @@ var require_axios = __commonJS({
|
|
|
6488
6602
|
}
|
|
6489
6603
|
__name(buildURL, "buildURL");
|
|
6490
6604
|
var InterceptorManager = class {
|
|
6605
|
+
static {
|
|
6606
|
+
__name(this, "InterceptorManager");
|
|
6607
|
+
}
|
|
6491
6608
|
constructor() {
|
|
6492
6609
|
this.handlers = [];
|
|
6493
6610
|
}
|
|
@@ -6548,7 +6665,6 @@ var require_axios = __commonJS({
|
|
|
6548
6665
|
}, "forEachHandler"));
|
|
6549
6666
|
}
|
|
6550
6667
|
};
|
|
6551
|
-
__name(InterceptorManager, "InterceptorManager");
|
|
6552
6668
|
var InterceptorManager$1 = InterceptorManager;
|
|
6553
6669
|
var transitionalDefaults = {
|
|
6554
6670
|
silentJSONParsing: true,
|
|
@@ -6860,6 +6976,9 @@ var require_axios = __commonJS({
|
|
|
6860
6976
|
}
|
|
6861
6977
|
__name(buildAccessors, "buildAccessors");
|
|
6862
6978
|
var AxiosHeaders = class {
|
|
6979
|
+
static {
|
|
6980
|
+
__name(this, "AxiosHeaders");
|
|
6981
|
+
}
|
|
6863
6982
|
constructor(headers) {
|
|
6864
6983
|
headers && this.set(headers);
|
|
6865
6984
|
}
|
|
@@ -7014,7 +7133,6 @@ var require_axios = __commonJS({
|
|
|
7014
7133
|
return this;
|
|
7015
7134
|
}
|
|
7016
7135
|
};
|
|
7017
|
-
__name(AxiosHeaders, "AxiosHeaders");
|
|
7018
7136
|
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
7019
7137
|
utils.freezeMethods(AxiosHeaders.prototype);
|
|
7020
7138
|
utils.freezeMethods(AxiosHeaders);
|
|
@@ -7594,6 +7712,9 @@ var require_axios = __commonJS({
|
|
|
7594
7712
|
};
|
|
7595
7713
|
var validators = validator.validators;
|
|
7596
7714
|
var Axios = class {
|
|
7715
|
+
static {
|
|
7716
|
+
__name(this, "Axios");
|
|
7717
|
+
}
|
|
7597
7718
|
constructor(instanceConfig) {
|
|
7598
7719
|
this.defaults = instanceConfig;
|
|
7599
7720
|
this.interceptors = {
|
|
@@ -7708,7 +7829,6 @@ var require_axios = __commonJS({
|
|
|
7708
7829
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
7709
7830
|
}
|
|
7710
7831
|
};
|
|
7711
|
-
__name(Axios, "Axios");
|
|
7712
7832
|
utils.forEach(["delete", "get", "head", "options"], /* @__PURE__ */ __name(function forEachMethodNoData(method) {
|
|
7713
7833
|
Axios.prototype[method] = function(url, config) {
|
|
7714
7834
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -7736,7 +7856,10 @@ var require_axios = __commonJS({
|
|
|
7736
7856
|
Axios.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
7737
7857
|
}, "forEachMethodWithData"));
|
|
7738
7858
|
var Axios$1 = Axios;
|
|
7739
|
-
var CancelToken = class {
|
|
7859
|
+
var CancelToken = class _CancelToken {
|
|
7860
|
+
static {
|
|
7861
|
+
__name(this, "CancelToken");
|
|
7862
|
+
}
|
|
7740
7863
|
constructor(executor) {
|
|
7741
7864
|
if (typeof executor !== "function") {
|
|
7742
7865
|
throw new TypeError("executor must be a function.");
|
|
@@ -7814,7 +7937,7 @@ var require_axios = __commonJS({
|
|
|
7814
7937
|
*/
|
|
7815
7938
|
static source() {
|
|
7816
7939
|
let cancel;
|
|
7817
|
-
const token = new
|
|
7940
|
+
const token = new _CancelToken(/* @__PURE__ */ __name(function executor(c) {
|
|
7818
7941
|
cancel = c;
|
|
7819
7942
|
}, "executor"));
|
|
7820
7943
|
return {
|
|
@@ -7823,7 +7946,6 @@ var require_axios = __commonJS({
|
|
|
7823
7946
|
};
|
|
7824
7947
|
}
|
|
7825
7948
|
};
|
|
7826
|
-
__name(CancelToken, "CancelToken");
|
|
7827
7949
|
var CancelToken$1 = CancelToken;
|
|
7828
7950
|
function spread(callback) {
|
|
7829
7951
|
return /* @__PURE__ */ __name(function wrap(arr) {
|
|
@@ -7968,6 +8090,7 @@ var require_Client = __commonJS({
|
|
|
7968
8090
|
var DescribeSpace = require_DescribeSpace();
|
|
7969
8091
|
var DeleteSpace = require_DeleteSpace();
|
|
7970
8092
|
var CreateRoomInSpace = require_CreateRoomInSpace();
|
|
8093
|
+
var SetSpaceScene = require_SetSpaceScene();
|
|
7971
8094
|
var CreateSpaceType = require_CreateSpaceType();
|
|
7972
8095
|
var DeleteSpaceType = require_DeleteSpaceType();
|
|
7973
8096
|
var DescribeSpaceType = require_DescribeSpaceType();
|
|
@@ -8032,6 +8155,7 @@ var require_Client = __commonJS({
|
|
|
8032
8155
|
var DeleteWindowCovering = require_DeleteWindowCovering();
|
|
8033
8156
|
var DescribeWindowCovering = require_DescribeWindowCovering();
|
|
8034
8157
|
var SetWindowCovering = require_SetWindowCovering();
|
|
8158
|
+
var SetRoomScene = require_SetRoomScene();
|
|
8035
8159
|
var AddScenesToRoom = require_AddScenesToRoom();
|
|
8036
8160
|
var AddDefaultScenesToRooms = require_AddDefaultScenesToRooms();
|
|
8037
8161
|
var CreateTicket = require_CreateTicket();
|
|
@@ -8043,6 +8167,7 @@ var require_Client = __commonJS({
|
|
|
8043
8167
|
var UpdateMessageReadStatus = require_UpdateMessageReadStatus();
|
|
8044
8168
|
var UpdateTicket = require_UpdateTicket();
|
|
8045
8169
|
var UpdateTicketStatus = require_UpdateTicketStatus();
|
|
8170
|
+
var ListScenes = require_ListScenes();
|
|
8046
8171
|
var CreateDefaultScenes = require_CreateDefaultScenes();
|
|
8047
8172
|
var CreateDiscoveredDevice = require_CreateDiscoveredDevice();
|
|
8048
8173
|
var ListDiscoveredDevices = require_ListDiscoveredDevices();
|
|
@@ -8087,7 +8212,10 @@ var require_Client = __commonJS({
|
|
|
8087
8212
|
var DescribeProduct = require_DescribeProduct();
|
|
8088
8213
|
var { EventEmitter } = require_events();
|
|
8089
8214
|
var axios = require_axios();
|
|
8090
|
-
var KohostApiClient = class extends EventEmitter {
|
|
8215
|
+
var KohostApiClient = class _KohostApiClient extends EventEmitter {
|
|
8216
|
+
static {
|
|
8217
|
+
__name(this, "KohostApiClient");
|
|
8218
|
+
}
|
|
8091
8219
|
/*
|
|
8092
8220
|
@param {Object} options - The options to create the client
|
|
8093
8221
|
@param {String} options.propertyId - The property ID
|
|
@@ -8117,12 +8245,12 @@ var require_Client = __commonJS({
|
|
|
8117
8245
|
headers: {
|
|
8118
8246
|
"Content-Type": "application/json",
|
|
8119
8247
|
Accept: "application/json",
|
|
8120
|
-
[
|
|
8248
|
+
[_KohostApiClient.defs.propertyHeader]: options.propertyId,
|
|
8121
8249
|
...options.headers
|
|
8122
8250
|
}
|
|
8123
8251
|
};
|
|
8124
8252
|
if (options.apiKey) {
|
|
8125
|
-
config.headers[
|
|
8253
|
+
config.headers[_KohostApiClient.defs.apiKeyHeader] = options.apiKey;
|
|
8126
8254
|
}
|
|
8127
8255
|
this._http = axios.create(config);
|
|
8128
8256
|
this._http.interceptors.response.use(
|
|
@@ -8194,7 +8322,6 @@ var require_Client = __commonJS({
|
|
|
8194
8322
|
this.emit("PhoneVerificationRequired");
|
|
8195
8323
|
}
|
|
8196
8324
|
};
|
|
8197
|
-
__name(KohostApiClient, "KohostApiClient");
|
|
8198
8325
|
KohostApiClient.prototype.LoginUser = LoginUser;
|
|
8199
8326
|
KohostApiClient.prototype.RefreshToken = RefreshToken;
|
|
8200
8327
|
KohostApiClient.prototype.RequestLoginLink = RequestLoginLink;
|
|
@@ -8222,6 +8349,7 @@ var require_Client = __commonJS({
|
|
|
8222
8349
|
KohostApiClient.prototype.DescribeSpace = DescribeSpace;
|
|
8223
8350
|
KohostApiClient.prototype.DeleteSpace = DeleteSpace;
|
|
8224
8351
|
KohostApiClient.prototype.CreateRoomInSpace = CreateRoomInSpace;
|
|
8352
|
+
KohostApiClient.prototype.SetSpaceScene = SetSpaceScene;
|
|
8225
8353
|
KohostApiClient.prototype.CreateSpaceType = CreateSpaceType;
|
|
8226
8354
|
KohostApiClient.prototype.DeleteSpaceType = DeleteSpaceType;
|
|
8227
8355
|
KohostApiClient.prototype.DescribeSpaceType = DescribeSpaceType;
|
|
@@ -8286,6 +8414,7 @@ var require_Client = __commonJS({
|
|
|
8286
8414
|
KohostApiClient.prototype.DeleteWindowCovering = DeleteWindowCovering;
|
|
8287
8415
|
KohostApiClient.prototype.DescribeWindowCovering = DescribeWindowCovering;
|
|
8288
8416
|
KohostApiClient.prototype.SetWindowCovering = SetWindowCovering;
|
|
8417
|
+
KohostApiClient.prototype.SetRoomScene = SetRoomScene;
|
|
8289
8418
|
KohostApiClient.prototype.AddScenesToRoom = AddScenesToRoom;
|
|
8290
8419
|
KohostApiClient.prototype.AddDefaultScenesToRooms = AddDefaultScenesToRooms;
|
|
8291
8420
|
KohostApiClient.prototype.CreateTicket = CreateTicket;
|
|
@@ -8297,6 +8426,7 @@ var require_Client = __commonJS({
|
|
|
8297
8426
|
KohostApiClient.prototype.UpdateMessageReadStatus = UpdateMessageReadStatus;
|
|
8298
8427
|
KohostApiClient.prototype.UpdateTicket = UpdateTicket;
|
|
8299
8428
|
KohostApiClient.prototype.UpdateTicketStatus = UpdateTicketStatus;
|
|
8429
|
+
KohostApiClient.prototype.ListScenes = ListScenes;
|
|
8300
8430
|
KohostApiClient.prototype.CreateDefaultScenes = CreateDefaultScenes;
|
|
8301
8431
|
KohostApiClient.prototype.CreateDiscoveredDevice = CreateDiscoveredDevice;
|
|
8302
8432
|
KohostApiClient.prototype.ListDiscoveredDevices = ListDiscoveredDevices;
|