@kohost/api-client 3.0.0-beta.11 → 3.0.0-beta.12
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 +71 -0
- package/dist/cjs/Client.js +288 -1
- package/dist/cjs/Commands.js +67 -3
- package/dist/cjs/Events.js +60 -25
- package/dist/cjs/Models.js +134 -4
- package/dist/cjs/defs.js +7 -0
- package/dist/esm/Client.js +337 -20
- package/dist/esm/Client.js.map +4 -4
- package/dist/esm/Commands.js +67 -3
- package/dist/esm/Commands.js.map +3 -3
- package/dist/esm/Events.js +60 -25
- package/dist/esm/Events.js.map +3 -3
- package/dist/esm/Models.js +134 -4
- package/dist/esm/Models.js.map +4 -4
- package/dist/esm/defs.js +56 -19
- package/dist/esm/defs.js.map +4 -4
- package/dist/useCases/AssignSpaceToReservation.js +32 -0
- package/dist/useCases/BatchNotifyCheckIn.js +32 -0
- package/dist/useCases/CreateSpaceType.js +32 -0
- package/dist/useCases/DeleteSpaceType.js +32 -0
- package/dist/useCases/DescribeSpaceType.js +32 -0
- package/dist/useCases/ListSpaceTypes.js +32 -0
- package/dist/useCases/SetDimmer.js +32 -0
- package/dist/useCases/UpdateSpace.js +1 -1
- package/package.json +8 -2
package/dist/esm/Client.js
CHANGED
|
@@ -1267,7 +1267,7 @@ var require_UpdateSpace = __commonJS({
|
|
|
1267
1267
|
requestData = {};
|
|
1268
1268
|
const pathParams = [":id"];
|
|
1269
1269
|
const { data, query, headers } = requestData;
|
|
1270
|
-
let url = "/
|
|
1270
|
+
let url = "/spaceTypes/:id";
|
|
1271
1271
|
if (pathParams && data) {
|
|
1272
1272
|
for (const param of pathParams) {
|
|
1273
1273
|
const paramName = param.replace(":", "");
|
|
@@ -1335,6 +1335,158 @@ var require_CreateRoomInSpace = __commonJS({
|
|
|
1335
1335
|
}
|
|
1336
1336
|
});
|
|
1337
1337
|
|
|
1338
|
+
// dist/useCases/CreateSpaceType.js
|
|
1339
|
+
var require_CreateSpaceType = __commonJS({
|
|
1340
|
+
"dist/useCases/CreateSpaceType.js"(exports, module) {
|
|
1341
|
+
module.exports = /* @__PURE__ */ __name(function CreateSpaceType(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
1342
|
+
if (!requestData)
|
|
1343
|
+
requestData = {};
|
|
1344
|
+
const pathParams = null;
|
|
1345
|
+
const { data, query, headers } = requestData;
|
|
1346
|
+
let url = "/spaceTypes";
|
|
1347
|
+
if (pathParams && data) {
|
|
1348
|
+
for (const param of pathParams) {
|
|
1349
|
+
const paramName = param.replace(":", "");
|
|
1350
|
+
url = url.replace(param, data[paramName]);
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
1354
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
1355
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
1356
|
+
return Promise.reject(
|
|
1357
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
1358
|
+
);
|
|
1359
|
+
}
|
|
1360
|
+
const config = {
|
|
1361
|
+
method: "post",
|
|
1362
|
+
url,
|
|
1363
|
+
...httpConfigOptions
|
|
1364
|
+
};
|
|
1365
|
+
if (data)
|
|
1366
|
+
config.data = data;
|
|
1367
|
+
if (query)
|
|
1368
|
+
config.params = query;
|
|
1369
|
+
if (headers)
|
|
1370
|
+
config.headers = headers;
|
|
1371
|
+
return this._http.request(config);
|
|
1372
|
+
}, "CreateSpaceType");
|
|
1373
|
+
}
|
|
1374
|
+
});
|
|
1375
|
+
|
|
1376
|
+
// dist/useCases/DeleteSpaceType.js
|
|
1377
|
+
var require_DeleteSpaceType = __commonJS({
|
|
1378
|
+
"dist/useCases/DeleteSpaceType.js"(exports, module) {
|
|
1379
|
+
module.exports = /* @__PURE__ */ __name(function DeleteSpaceType(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
1380
|
+
if (!requestData)
|
|
1381
|
+
requestData = {};
|
|
1382
|
+
const pathParams = [":id"];
|
|
1383
|
+
const { data, query, headers } = requestData;
|
|
1384
|
+
let url = "/spaceTypes/:id";
|
|
1385
|
+
if (pathParams && data) {
|
|
1386
|
+
for (const param of pathParams) {
|
|
1387
|
+
const paramName = param.replace(":", "");
|
|
1388
|
+
url = url.replace(param, data[paramName]);
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
1392
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
1393
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
1394
|
+
return Promise.reject(
|
|
1395
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
const config = {
|
|
1399
|
+
method: "delete",
|
|
1400
|
+
url,
|
|
1401
|
+
...httpConfigOptions
|
|
1402
|
+
};
|
|
1403
|
+
if (data)
|
|
1404
|
+
config.data = data;
|
|
1405
|
+
if (query)
|
|
1406
|
+
config.params = query;
|
|
1407
|
+
if (headers)
|
|
1408
|
+
config.headers = headers;
|
|
1409
|
+
return this._http.request(config);
|
|
1410
|
+
}, "DeleteSpaceType");
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
|
|
1414
|
+
// dist/useCases/DescribeSpaceType.js
|
|
1415
|
+
var require_DescribeSpaceType = __commonJS({
|
|
1416
|
+
"dist/useCases/DescribeSpaceType.js"(exports, module) {
|
|
1417
|
+
module.exports = /* @__PURE__ */ __name(function DescribeSpaceType(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
1418
|
+
if (!requestData)
|
|
1419
|
+
requestData = {};
|
|
1420
|
+
const pathParams = [":id"];
|
|
1421
|
+
const { data, query, headers } = requestData;
|
|
1422
|
+
let url = "/spaceTypes/:id";
|
|
1423
|
+
if (pathParams && data) {
|
|
1424
|
+
for (const param of pathParams) {
|
|
1425
|
+
const paramName = param.replace(":", "");
|
|
1426
|
+
url = url.replace(param, data[paramName]);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
1430
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
1431
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
1432
|
+
return Promise.reject(
|
|
1433
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1436
|
+
const config = {
|
|
1437
|
+
method: "get",
|
|
1438
|
+
url,
|
|
1439
|
+
...httpConfigOptions
|
|
1440
|
+
};
|
|
1441
|
+
if (data)
|
|
1442
|
+
config.data = data;
|
|
1443
|
+
if (query)
|
|
1444
|
+
config.params = query;
|
|
1445
|
+
if (headers)
|
|
1446
|
+
config.headers = headers;
|
|
1447
|
+
return this._http.request(config);
|
|
1448
|
+
}, "DescribeSpaceType");
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1451
|
+
|
|
1452
|
+
// dist/useCases/ListSpaceTypes.js
|
|
1453
|
+
var require_ListSpaceTypes = __commonJS({
|
|
1454
|
+
"dist/useCases/ListSpaceTypes.js"(exports, module) {
|
|
1455
|
+
module.exports = /* @__PURE__ */ __name(function ListSpaceTypes(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
1456
|
+
if (!requestData)
|
|
1457
|
+
requestData = {};
|
|
1458
|
+
const pathParams = null;
|
|
1459
|
+
const { data, query, headers } = requestData;
|
|
1460
|
+
let url = "/spaceTypes";
|
|
1461
|
+
if (pathParams && data) {
|
|
1462
|
+
for (const param of pathParams) {
|
|
1463
|
+
const paramName = param.replace(":", "");
|
|
1464
|
+
url = url.replace(param, data[paramName]);
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
1468
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
1469
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
1470
|
+
return Promise.reject(
|
|
1471
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
1472
|
+
);
|
|
1473
|
+
}
|
|
1474
|
+
const config = {
|
|
1475
|
+
method: "get",
|
|
1476
|
+
url,
|
|
1477
|
+
...httpConfigOptions
|
|
1478
|
+
};
|
|
1479
|
+
if (data)
|
|
1480
|
+
config.data = data;
|
|
1481
|
+
if (query)
|
|
1482
|
+
config.params = query;
|
|
1483
|
+
if (headers)
|
|
1484
|
+
config.headers = headers;
|
|
1485
|
+
return this._http.request(config);
|
|
1486
|
+
}, "ListSpaceTypes");
|
|
1487
|
+
}
|
|
1488
|
+
});
|
|
1489
|
+
|
|
1338
1490
|
// dist/useCases/ListRooms.js
|
|
1339
1491
|
var require_ListRooms = __commonJS({
|
|
1340
1492
|
"dist/useCases/ListRooms.js"(exports, module) {
|
|
@@ -2399,6 +2551,44 @@ var require_DescribeDimmer = __commonJS({
|
|
|
2399
2551
|
}
|
|
2400
2552
|
});
|
|
2401
2553
|
|
|
2554
|
+
// dist/useCases/SetDimmer.js
|
|
2555
|
+
var require_SetDimmer = __commonJS({
|
|
2556
|
+
"dist/useCases/SetDimmer.js"(exports, module) {
|
|
2557
|
+
module.exports = /* @__PURE__ */ __name(function SetDimmer(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
2558
|
+
if (!requestData)
|
|
2559
|
+
requestData = {};
|
|
2560
|
+
const pathParams = [":roomId", ":id"];
|
|
2561
|
+
const { data, query, headers } = requestData;
|
|
2562
|
+
let url = "/rooms/:roomId/dimmers/:id";
|
|
2563
|
+
if (pathParams && data) {
|
|
2564
|
+
for (const param of pathParams) {
|
|
2565
|
+
const paramName = param.replace(":", "");
|
|
2566
|
+
url = url.replace(param, data[paramName]);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
2570
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
2571
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
2572
|
+
return Promise.reject(
|
|
2573
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
2574
|
+
);
|
|
2575
|
+
}
|
|
2576
|
+
const config = {
|
|
2577
|
+
method: "post",
|
|
2578
|
+
url,
|
|
2579
|
+
...httpConfigOptions
|
|
2580
|
+
};
|
|
2581
|
+
if (data)
|
|
2582
|
+
config.data = data;
|
|
2583
|
+
if (query)
|
|
2584
|
+
config.params = query;
|
|
2585
|
+
if (headers)
|
|
2586
|
+
config.headers = headers;
|
|
2587
|
+
return this._http.request(config);
|
|
2588
|
+
}, "SetDimmer");
|
|
2589
|
+
}
|
|
2590
|
+
});
|
|
2591
|
+
|
|
2402
2592
|
// dist/useCases/CreateLock.js
|
|
2403
2593
|
var require_CreateLock = __commonJS({
|
|
2404
2594
|
"dist/useCases/CreateLock.js"(exports, module) {
|
|
@@ -4869,6 +5059,82 @@ var require_BatchNotifyPreArrival = __commonJS({
|
|
|
4869
5059
|
}
|
|
4870
5060
|
});
|
|
4871
5061
|
|
|
5062
|
+
// dist/useCases/BatchNotifyCheckIn.js
|
|
5063
|
+
var require_BatchNotifyCheckIn = __commonJS({
|
|
5064
|
+
"dist/useCases/BatchNotifyCheckIn.js"(exports, module) {
|
|
5065
|
+
module.exports = /* @__PURE__ */ __name(function BatchNotifyCheckIn(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
5066
|
+
if (!requestData)
|
|
5067
|
+
requestData = {};
|
|
5068
|
+
const pathParams = null;
|
|
5069
|
+
const { data, query, headers } = requestData;
|
|
5070
|
+
let url = "/reservations/batchNotifyCheckIn";
|
|
5071
|
+
if (pathParams && data) {
|
|
5072
|
+
for (const param of pathParams) {
|
|
5073
|
+
const paramName = param.replace(":", "");
|
|
5074
|
+
url = url.replace(param, data[paramName]);
|
|
5075
|
+
}
|
|
5076
|
+
}
|
|
5077
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
5078
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
5079
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
5080
|
+
return Promise.reject(
|
|
5081
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
5082
|
+
);
|
|
5083
|
+
}
|
|
5084
|
+
const config = {
|
|
5085
|
+
method: "post",
|
|
5086
|
+
url,
|
|
5087
|
+
...httpConfigOptions
|
|
5088
|
+
};
|
|
5089
|
+
if (data)
|
|
5090
|
+
config.data = data;
|
|
5091
|
+
if (query)
|
|
5092
|
+
config.params = query;
|
|
5093
|
+
if (headers)
|
|
5094
|
+
config.headers = headers;
|
|
5095
|
+
return this._http.request(config);
|
|
5096
|
+
}, "BatchNotifyCheckIn");
|
|
5097
|
+
}
|
|
5098
|
+
});
|
|
5099
|
+
|
|
5100
|
+
// dist/useCases/AssignSpaceToReservation.js
|
|
5101
|
+
var require_AssignSpaceToReservation = __commonJS({
|
|
5102
|
+
"dist/useCases/AssignSpaceToReservation.js"(exports, module) {
|
|
5103
|
+
module.exports = /* @__PURE__ */ __name(function AssignSpaceToReservation(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
5104
|
+
if (!requestData)
|
|
5105
|
+
requestData = {};
|
|
5106
|
+
const pathParams = [":id"];
|
|
5107
|
+
const { data, query, headers } = requestData;
|
|
5108
|
+
let url = "/reservations/:id/space";
|
|
5109
|
+
if (pathParams && data) {
|
|
5110
|
+
for (const param of pathParams) {
|
|
5111
|
+
const paramName = param.replace(":", "");
|
|
5112
|
+
url = url.replace(param, data[paramName]);
|
|
5113
|
+
}
|
|
5114
|
+
}
|
|
5115
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
5116
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
5117
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
5118
|
+
return Promise.reject(
|
|
5119
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
5120
|
+
);
|
|
5121
|
+
}
|
|
5122
|
+
const config = {
|
|
5123
|
+
method: "post",
|
|
5124
|
+
url,
|
|
5125
|
+
...httpConfigOptions
|
|
5126
|
+
};
|
|
5127
|
+
if (data)
|
|
5128
|
+
config.data = data;
|
|
5129
|
+
if (query)
|
|
5130
|
+
config.params = query;
|
|
5131
|
+
if (headers)
|
|
5132
|
+
config.headers = headers;
|
|
5133
|
+
return this._http.request(config);
|
|
5134
|
+
}, "AssignSpaceToReservation");
|
|
5135
|
+
}
|
|
5136
|
+
});
|
|
5137
|
+
|
|
4872
5138
|
// dist/useCases/OCRDocument.js
|
|
4873
5139
|
var require_OCRDocument = __commonJS({
|
|
4874
5140
|
"dist/useCases/OCRDocument.js"(exports, module) {
|
|
@@ -5592,7 +5858,7 @@ var require_axios = __commonJS({
|
|
|
5592
5858
|
var isHTMLForm = kindOfTest("HTMLFormElement");
|
|
5593
5859
|
var toCamelCase = /* @__PURE__ */ __name((str) => {
|
|
5594
5860
|
return str.toLowerCase().replace(
|
|
5595
|
-
/[_
|
|
5861
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
5596
5862
|
/* @__PURE__ */ __name(function replacer(m, p1, p2) {
|
|
5597
5863
|
return p1.toUpperCase() + p2;
|
|
5598
5864
|
}, "replacer")
|
|
@@ -5646,6 +5912,25 @@ var require_axios = __commonJS({
|
|
|
5646
5912
|
value = +value;
|
|
5647
5913
|
return Number.isFinite(value) ? value : defaultValue;
|
|
5648
5914
|
}, "toFiniteNumber");
|
|
5915
|
+
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
5916
|
+
var DIGIT = "0123456789";
|
|
5917
|
+
var ALPHABET = {
|
|
5918
|
+
DIGIT,
|
|
5919
|
+
ALPHA,
|
|
5920
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
5921
|
+
};
|
|
5922
|
+
var generateString = /* @__PURE__ */ __name((size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
5923
|
+
let str = "";
|
|
5924
|
+
const { length } = alphabet;
|
|
5925
|
+
while (size--) {
|
|
5926
|
+
str += alphabet[Math.random() * length | 0];
|
|
5927
|
+
}
|
|
5928
|
+
return str;
|
|
5929
|
+
}, "generateString");
|
|
5930
|
+
function isSpecCompliantForm(thing) {
|
|
5931
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
5932
|
+
}
|
|
5933
|
+
__name(isSpecCompliantForm, "isSpecCompliantForm");
|
|
5649
5934
|
var toJSONObject = /* @__PURE__ */ __name((obj) => {
|
|
5650
5935
|
const stack = new Array(10);
|
|
5651
5936
|
const visit = /* @__PURE__ */ __name((source, i) => {
|
|
@@ -5715,6 +6000,9 @@ var require_axios = __commonJS({
|
|
|
5715
6000
|
findKey,
|
|
5716
6001
|
global: _global,
|
|
5717
6002
|
isContextDefined,
|
|
6003
|
+
ALPHABET,
|
|
6004
|
+
generateString,
|
|
6005
|
+
isSpecCompliantForm,
|
|
5718
6006
|
toJSONObject
|
|
5719
6007
|
};
|
|
5720
6008
|
function AxiosError(message, code, config, request, response) {
|
|
@@ -5787,8 +6075,7 @@ var require_axios = __commonJS({
|
|
|
5787
6075
|
customProps && Object.assign(axiosError, customProps);
|
|
5788
6076
|
return axiosError;
|
|
5789
6077
|
};
|
|
5790
|
-
var
|
|
5791
|
-
var FormData$2 = browser;
|
|
6078
|
+
var httpAdapter = null;
|
|
5792
6079
|
function isVisitable(thing) {
|
|
5793
6080
|
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
5794
6081
|
}
|
|
@@ -5813,15 +6100,11 @@ var require_axios = __commonJS({
|
|
|
5813
6100
|
var predicates = utils.toFlatObject(utils, {}, null, /* @__PURE__ */ __name(function filter(prop) {
|
|
5814
6101
|
return /^is[A-Z]/.test(prop);
|
|
5815
6102
|
}, "filter"));
|
|
5816
|
-
function isSpecCompliant(thing) {
|
|
5817
|
-
return thing && utils.isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator];
|
|
5818
|
-
}
|
|
5819
|
-
__name(isSpecCompliant, "isSpecCompliant");
|
|
5820
6103
|
function toFormData(obj, formData, options) {
|
|
5821
6104
|
if (!utils.isObject(obj)) {
|
|
5822
6105
|
throw new TypeError("target must be an object");
|
|
5823
6106
|
}
|
|
5824
|
-
formData = formData || new
|
|
6107
|
+
formData = formData || new FormData();
|
|
5825
6108
|
options = utils.toFlatObject(options, {
|
|
5826
6109
|
metaTokens: true,
|
|
5827
6110
|
dots: false,
|
|
@@ -5834,7 +6117,7 @@ var require_axios = __commonJS({
|
|
|
5834
6117
|
const dots = options.dots;
|
|
5835
6118
|
const indexes = options.indexes;
|
|
5836
6119
|
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
5837
|
-
const useBlob = _Blob &&
|
|
6120
|
+
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
5838
6121
|
if (!utils.isFunction(visitor)) {
|
|
5839
6122
|
throw new TypeError("visitor must be a function");
|
|
5840
6123
|
}
|
|
@@ -5859,7 +6142,7 @@ var require_axios = __commonJS({
|
|
|
5859
6142
|
if (utils.endsWith(key, "{}")) {
|
|
5860
6143
|
key = metaTokens ? key : key.slice(0, -2);
|
|
5861
6144
|
value = JSON.stringify(value);
|
|
5862
|
-
} else if (utils.isArray(value) && isFlatArray(value) || (utils.isFileList(value) || utils.endsWith(key, "[]") && (arr = utils.toArray(value)))
|
|
6145
|
+
} else if (utils.isArray(value) && isFlatArray(value) || (utils.isFileList(value) || utils.endsWith(key, "[]")) && (arr = utils.toArray(value))) {
|
|
5863
6146
|
key = removeBrackets(key);
|
|
5864
6147
|
arr.forEach(/* @__PURE__ */ __name(function each(el, index) {
|
|
5865
6148
|
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
@@ -6040,7 +6323,8 @@ var require_axios = __commonJS({
|
|
|
6040
6323
|
clarifyTimeoutError: false
|
|
6041
6324
|
};
|
|
6042
6325
|
var URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
|
|
6043
|
-
var FormData$1 = FormData;
|
|
6326
|
+
var FormData$1 = typeof FormData !== "undefined" ? FormData : null;
|
|
6327
|
+
var Blob$1 = typeof Blob !== "undefined" ? Blob : null;
|
|
6044
6328
|
var isStandardBrowserEnv = (() => {
|
|
6045
6329
|
let product;
|
|
6046
6330
|
if (typeof navigator !== "undefined" && ((product = navigator.product) === "ReactNative" || product === "NativeScript" || product === "NS")) {
|
|
@@ -6057,7 +6341,7 @@ var require_axios = __commonJS({
|
|
|
6057
6341
|
classes: {
|
|
6058
6342
|
URLSearchParams: URLSearchParams$1,
|
|
6059
6343
|
FormData: FormData$1,
|
|
6060
|
-
Blob
|
|
6344
|
+
Blob: Blob$1
|
|
6061
6345
|
},
|
|
6062
6346
|
isStandardBrowserEnv,
|
|
6063
6347
|
isStandardBrowserWebWorkerEnv,
|
|
@@ -6310,10 +6594,13 @@ var require_axios = __commonJS({
|
|
|
6310
6594
|
return /^[-_a-zA-Z]+$/.test(str.trim());
|
|
6311
6595
|
}
|
|
6312
6596
|
__name(isValidHeaderName, "isValidHeaderName");
|
|
6313
|
-
function matchHeaderValue(context, value, header, filter) {
|
|
6597
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
6314
6598
|
if (utils.isFunction(filter)) {
|
|
6315
6599
|
return filter.call(this, value, header);
|
|
6316
6600
|
}
|
|
6601
|
+
if (isHeaderNameFilter) {
|
|
6602
|
+
value = header;
|
|
6603
|
+
}
|
|
6317
6604
|
if (!utils.isString(value))
|
|
6318
6605
|
return;
|
|
6319
6606
|
if (utils.isString(filter)) {
|
|
@@ -6395,7 +6682,7 @@ var require_axios = __commonJS({
|
|
|
6395
6682
|
header = normalizeHeader(header);
|
|
6396
6683
|
if (header) {
|
|
6397
6684
|
const key = utils.findKey(this, header);
|
|
6398
|
-
return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
6685
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
6399
6686
|
}
|
|
6400
6687
|
return false;
|
|
6401
6688
|
}
|
|
@@ -6420,8 +6707,18 @@ var require_axios = __commonJS({
|
|
|
6420
6707
|
}
|
|
6421
6708
|
return deleted;
|
|
6422
6709
|
}
|
|
6423
|
-
clear() {
|
|
6424
|
-
|
|
6710
|
+
clear(matcher) {
|
|
6711
|
+
const keys = Object.keys(this);
|
|
6712
|
+
let i = keys.length;
|
|
6713
|
+
let deleted = false;
|
|
6714
|
+
while (i--) {
|
|
6715
|
+
const key = keys[i];
|
|
6716
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
6717
|
+
delete this[key];
|
|
6718
|
+
deleted = true;
|
|
6719
|
+
}
|
|
6720
|
+
}
|
|
6721
|
+
return deleted;
|
|
6425
6722
|
}
|
|
6426
6723
|
normalize(format) {
|
|
6427
6724
|
const self2 = this;
|
|
@@ -6488,7 +6785,7 @@ var require_axios = __commonJS({
|
|
|
6488
6785
|
}
|
|
6489
6786
|
};
|
|
6490
6787
|
__name(AxiosHeaders, "AxiosHeaders");
|
|
6491
|
-
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent"]);
|
|
6788
|
+
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
6492
6789
|
utils.freezeMethods(AxiosHeaders.prototype);
|
|
6493
6790
|
utils.freezeMethods(AxiosHeaders);
|
|
6494
6791
|
var AxiosHeaders$1 = AxiosHeaders;
|
|
@@ -6516,7 +6813,6 @@ var require_axios = __commonJS({
|
|
|
6516
6813
|
utils.inherits(CanceledError, AxiosError, {
|
|
6517
6814
|
__CANCEL__: true
|
|
6518
6815
|
});
|
|
6519
|
-
var httpAdapter = null;
|
|
6520
6816
|
function settle(resolve, reject, response) {
|
|
6521
6817
|
const validateStatus = response.config.validateStatus;
|
|
6522
6818
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
@@ -7003,7 +7299,7 @@ var require_axios = __commonJS({
|
|
|
7003
7299
|
return config;
|
|
7004
7300
|
}
|
|
7005
7301
|
__name(mergeConfig, "mergeConfig");
|
|
7006
|
-
var VERSION = "1.
|
|
7302
|
+
var VERSION = "1.3.4";
|
|
7007
7303
|
var validators$1 = {};
|
|
7008
7304
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
7009
7305
|
validators$1[type] = /* @__PURE__ */ __name(function validator2(thing) {
|
|
@@ -7440,6 +7736,10 @@ var require_Client = __commonJS({
|
|
|
7440
7736
|
var DeleteSpace = require_DeleteSpace();
|
|
7441
7737
|
var UpdateSpace = require_UpdateSpace();
|
|
7442
7738
|
var CreateRoomInSpace = require_CreateRoomInSpace();
|
|
7739
|
+
var CreateSpaceType = require_CreateSpaceType();
|
|
7740
|
+
var DeleteSpaceType = require_DeleteSpaceType();
|
|
7741
|
+
var DescribeSpaceType = require_DescribeSpaceType();
|
|
7742
|
+
var ListSpaceTypes = require_ListSpaceTypes();
|
|
7443
7743
|
var ListRooms = require_ListRooms();
|
|
7444
7744
|
var DescribeRoom = require_DescribeRoom();
|
|
7445
7745
|
var CreateRoom = require_CreateRoom();
|
|
@@ -7468,6 +7768,7 @@ var require_Client = __commonJS({
|
|
|
7468
7768
|
var UpdateDimmer = require_UpdateDimmer();
|
|
7469
7769
|
var DeleteDimmer = require_DeleteDimmer();
|
|
7470
7770
|
var DescribeDimmer = require_DescribeDimmer();
|
|
7771
|
+
var SetDimmer = require_SetDimmer();
|
|
7471
7772
|
var CreateLock = require_CreateLock();
|
|
7472
7773
|
var ListLocks = require_ListLocks();
|
|
7473
7774
|
var UpdateLock = require_UpdateLock();
|
|
@@ -7533,6 +7834,8 @@ var require_Client = __commonJS({
|
|
|
7533
7834
|
var SendPreArrivalSMS = require_SendPreArrivalSMS();
|
|
7534
7835
|
var SendPreArrivalEmail = require_SendPreArrivalEmail();
|
|
7535
7836
|
var BatchNotifyPreArrival = require_BatchNotifyPreArrival();
|
|
7837
|
+
var BatchNotifyCheckIn = require_BatchNotifyCheckIn();
|
|
7838
|
+
var AssignSpaceToReservation = require_AssignSpaceToReservation();
|
|
7536
7839
|
var OCRDocument = require_OCRDocument();
|
|
7537
7840
|
var DescribeMyProperty = require_DescribeMyProperty();
|
|
7538
7841
|
var EmailUserAccountSetup = require_EmailUserAccountSetup();
|
|
@@ -7615,6 +7918,10 @@ var require_Client = __commonJS({
|
|
|
7615
7918
|
try {
|
|
7616
7919
|
const expectedError = status >= 400 && status < 500;
|
|
7617
7920
|
const newTokensNeeded = expectedError && errorType === "TokenExpiredError";
|
|
7921
|
+
if (expectedError && errorMessage === "Phone Verification is required") {
|
|
7922
|
+
this._onPhoneVerificationRequired();
|
|
7923
|
+
return Promise.reject(error);
|
|
7924
|
+
}
|
|
7618
7925
|
if (expectedError && errorMessage === "Login Required") {
|
|
7619
7926
|
this._onLoginRequired();
|
|
7620
7927
|
return Promise.reject(error);
|
|
@@ -7655,6 +7962,9 @@ var require_Client = __commonJS({
|
|
|
7655
7962
|
_onLoginRequired() {
|
|
7656
7963
|
this.emit("LoginRequired");
|
|
7657
7964
|
}
|
|
7965
|
+
_onPhoneVerificationRequired() {
|
|
7966
|
+
this.emit("PhoneVerificationRequired");
|
|
7967
|
+
}
|
|
7658
7968
|
};
|
|
7659
7969
|
__name(KohostApiClient, "KohostApiClient");
|
|
7660
7970
|
KohostApiClient.prototype.AdminCreateCustomer = AdminCreateCustomer;
|
|
@@ -7692,6 +8002,10 @@ var require_Client = __commonJS({
|
|
|
7692
8002
|
KohostApiClient.prototype.DeleteSpace = DeleteSpace;
|
|
7693
8003
|
KohostApiClient.prototype.UpdateSpace = UpdateSpace;
|
|
7694
8004
|
KohostApiClient.prototype.CreateRoomInSpace = CreateRoomInSpace;
|
|
8005
|
+
KohostApiClient.prototype.CreateSpaceType = CreateSpaceType;
|
|
8006
|
+
KohostApiClient.prototype.DeleteSpaceType = DeleteSpaceType;
|
|
8007
|
+
KohostApiClient.prototype.DescribeSpaceType = DescribeSpaceType;
|
|
8008
|
+
KohostApiClient.prototype.ListSpaceTypes = ListSpaceTypes;
|
|
7695
8009
|
KohostApiClient.prototype.ListRooms = ListRooms;
|
|
7696
8010
|
KohostApiClient.prototype.DescribeRoom = DescribeRoom;
|
|
7697
8011
|
KohostApiClient.prototype.CreateRoom = CreateRoom;
|
|
@@ -7720,6 +8034,7 @@ var require_Client = __commonJS({
|
|
|
7720
8034
|
KohostApiClient.prototype.UpdateDimmer = UpdateDimmer;
|
|
7721
8035
|
KohostApiClient.prototype.DeleteDimmer = DeleteDimmer;
|
|
7722
8036
|
KohostApiClient.prototype.DescribeDimmer = DescribeDimmer;
|
|
8037
|
+
KohostApiClient.prototype.SetDimmer = SetDimmer;
|
|
7723
8038
|
KohostApiClient.prototype.CreateLock = CreateLock;
|
|
7724
8039
|
KohostApiClient.prototype.ListLocks = ListLocks;
|
|
7725
8040
|
KohostApiClient.prototype.UpdateLock = UpdateLock;
|
|
@@ -7785,6 +8100,8 @@ var require_Client = __commonJS({
|
|
|
7785
8100
|
KohostApiClient.prototype.SendPreArrivalSMS = SendPreArrivalSMS;
|
|
7786
8101
|
KohostApiClient.prototype.SendPreArrivalEmail = SendPreArrivalEmail;
|
|
7787
8102
|
KohostApiClient.prototype.BatchNotifyPreArrival = BatchNotifyPreArrival;
|
|
8103
|
+
KohostApiClient.prototype.BatchNotifyCheckIn = BatchNotifyCheckIn;
|
|
8104
|
+
KohostApiClient.prototype.AssignSpaceToReservation = AssignSpaceToReservation;
|
|
7788
8105
|
KohostApiClient.prototype.OCRDocument = OCRDocument;
|
|
7789
8106
|
KohostApiClient.prototype.DescribeMyProperty = DescribeMyProperty;
|
|
7790
8107
|
KohostApiClient.prototype.EmailUserAccountSetup = EmailUserAccountSetup;
|