@kohost/api-client 3.0.0-beta.100 → 3.0.0-beta.102
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/Client/index.js +48 -8
- package/dist/cjs/schemas/PropertySchema.d.ts +6 -0
- package/dist/cjs/schemas/property.json +7 -1
- package/dist/esm/Client.js +48 -8
- package/dist/esm/Client.js.map +3 -3
- package/dist/esm/Models.js +7 -1
- package/dist/esm/Models.js.map +2 -2
- package/dist/useCases/SetAlarm.js +32 -0
- package/package.json +1 -1
package/dist/cjs/Client/index.js
CHANGED
|
@@ -1753,15 +1753,15 @@ var require_DescribeAlarm = __commonJS({
|
|
|
1753
1753
|
}
|
|
1754
1754
|
});
|
|
1755
1755
|
|
|
1756
|
-
// dist/useCases/
|
|
1757
|
-
var
|
|
1758
|
-
"dist/useCases/
|
|
1759
|
-
module2.exports = /* @__PURE__ */ __name(function
|
|
1756
|
+
// dist/useCases/SetAlarm.js
|
|
1757
|
+
var require_SetAlarm = __commonJS({
|
|
1758
|
+
"dist/useCases/SetAlarm.js"(exports2, module2) {
|
|
1759
|
+
module2.exports = /* @__PURE__ */ __name(function SetAlarm2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
1760
1760
|
if (!requestData)
|
|
1761
1761
|
requestData = {};
|
|
1762
1762
|
const pathParams = [":roomId", ":id"];
|
|
1763
1763
|
const { data, query, headers } = requestData;
|
|
1764
|
-
let url = "/rooms/:roomId/
|
|
1764
|
+
let url = "/rooms/:roomId/alarms/:id";
|
|
1765
1765
|
if (pathParams && data) {
|
|
1766
1766
|
for (const param of pathParams) {
|
|
1767
1767
|
const paramName = param.replace(":", "");
|
|
@@ -1787,7 +1787,7 @@ var require_SetLock = __commonJS({
|
|
|
1787
1787
|
if (headers)
|
|
1788
1788
|
config.headers = headers;
|
|
1789
1789
|
return this._http.request(config);
|
|
1790
|
-
}, "
|
|
1790
|
+
}, "SetAlarm");
|
|
1791
1791
|
}
|
|
1792
1792
|
});
|
|
1793
1793
|
|
|
@@ -2665,6 +2665,44 @@ var require_DescribeLock = __commonJS({
|
|
|
2665
2665
|
}
|
|
2666
2666
|
});
|
|
2667
2667
|
|
|
2668
|
+
// dist/useCases/SetLock.js
|
|
2669
|
+
var require_SetLock = __commonJS({
|
|
2670
|
+
"dist/useCases/SetLock.js"(exports2, module2) {
|
|
2671
|
+
module2.exports = /* @__PURE__ */ __name(function SetLock2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
2672
|
+
if (!requestData)
|
|
2673
|
+
requestData = {};
|
|
2674
|
+
const pathParams = [":roomId", ":id"];
|
|
2675
|
+
const { data, query, headers } = requestData;
|
|
2676
|
+
let url = "/rooms/:roomId/locks/:id";
|
|
2677
|
+
if (pathParams && data) {
|
|
2678
|
+
for (const param of pathParams) {
|
|
2679
|
+
const paramName = param.replace(":", "");
|
|
2680
|
+
url = url.replace(param, data[paramName]);
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
2684
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
2685
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
2686
|
+
return Promise.reject(
|
|
2687
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
2688
|
+
);
|
|
2689
|
+
}
|
|
2690
|
+
const config = {
|
|
2691
|
+
method: "post",
|
|
2692
|
+
url,
|
|
2693
|
+
...httpConfigOptions
|
|
2694
|
+
};
|
|
2695
|
+
if (data)
|
|
2696
|
+
config.data = data;
|
|
2697
|
+
if (query)
|
|
2698
|
+
config.params = query;
|
|
2699
|
+
if (headers)
|
|
2700
|
+
config.headers = headers;
|
|
2701
|
+
return this._http.request(config);
|
|
2702
|
+
}, "SetLock");
|
|
2703
|
+
}
|
|
2704
|
+
});
|
|
2705
|
+
|
|
2668
2706
|
// dist/useCases/DescribeLockCredential.js
|
|
2669
2707
|
var require_DescribeLockCredential = __commonJS({
|
|
2670
2708
|
"dist/useCases/DescribeLockCredential.js"(exports2, module2) {
|
|
@@ -6284,7 +6322,7 @@ var ListAlarms = require_ListAlarms();
|
|
|
6284
6322
|
var UpdateAlarm = require_UpdateAlarm();
|
|
6285
6323
|
var DeleteAlarm = require_DeleteAlarm();
|
|
6286
6324
|
var DescribeAlarm = require_DescribeAlarm();
|
|
6287
|
-
var
|
|
6325
|
+
var SetAlarm = require_SetAlarm();
|
|
6288
6326
|
var CreateCamera = require_CreateCamera();
|
|
6289
6327
|
var ListCameras = require_ListCameras();
|
|
6290
6328
|
var UpdateCamera = require_UpdateCamera();
|
|
@@ -6308,6 +6346,7 @@ var ListLocks = require_ListLocks();
|
|
|
6308
6346
|
var UpdateLock = require_UpdateLock();
|
|
6309
6347
|
var DeleteLock = require_DeleteLock();
|
|
6310
6348
|
var DescribeLock = require_DescribeLock();
|
|
6349
|
+
var SetLock = require_SetLock();
|
|
6311
6350
|
var DescribeLockCredential = require_DescribeLockCredential();
|
|
6312
6351
|
var CreateSwitch = require_CreateSwitch();
|
|
6313
6352
|
var ListSwitches = require_ListSwitches();
|
|
@@ -6560,7 +6599,7 @@ KohostApiClient.prototype.ListAlarms = ListAlarms;
|
|
|
6560
6599
|
KohostApiClient.prototype.UpdateAlarm = UpdateAlarm;
|
|
6561
6600
|
KohostApiClient.prototype.DeleteAlarm = DeleteAlarm;
|
|
6562
6601
|
KohostApiClient.prototype.DescribeAlarm = DescribeAlarm;
|
|
6563
|
-
KohostApiClient.prototype.
|
|
6602
|
+
KohostApiClient.prototype.SetAlarm = SetAlarm;
|
|
6564
6603
|
KohostApiClient.prototype.CreateCamera = CreateCamera;
|
|
6565
6604
|
KohostApiClient.prototype.ListCameras = ListCameras;
|
|
6566
6605
|
KohostApiClient.prototype.UpdateCamera = UpdateCamera;
|
|
@@ -6584,6 +6623,7 @@ KohostApiClient.prototype.ListLocks = ListLocks;
|
|
|
6584
6623
|
KohostApiClient.prototype.UpdateLock = UpdateLock;
|
|
6585
6624
|
KohostApiClient.prototype.DeleteLock = DeleteLock;
|
|
6586
6625
|
KohostApiClient.prototype.DescribeLock = DescribeLock;
|
|
6626
|
+
KohostApiClient.prototype.SetLock = SetLock;
|
|
6587
6627
|
KohostApiClient.prototype.DescribeLockCredential = DescribeLockCredential;
|
|
6588
6628
|
KohostApiClient.prototype.CreateSwitch = CreateSwitch;
|
|
6589
6629
|
KohostApiClient.prototype.ListSwitches = ListSwitches;
|
|
@@ -114,6 +114,12 @@ export interface Property {
|
|
|
114
114
|
[k: string]: unknown;
|
|
115
115
|
};
|
|
116
116
|
Elevator?: unknown;
|
|
117
|
+
Experiences?: unknown;
|
|
118
|
+
Dining?: unknown;
|
|
119
|
+
Rentals?: unknown;
|
|
120
|
+
Shop?: unknown;
|
|
121
|
+
Spa?: unknown;
|
|
122
|
+
Valet?: unknown;
|
|
117
123
|
};
|
|
118
124
|
notifications?: {
|
|
119
125
|
email?: {
|
package/dist/esm/Client.js
CHANGED
|
@@ -1753,15 +1753,15 @@ var require_DescribeAlarm = __commonJS({
|
|
|
1753
1753
|
}
|
|
1754
1754
|
});
|
|
1755
1755
|
|
|
1756
|
-
// dist/useCases/
|
|
1757
|
-
var
|
|
1758
|
-
"dist/useCases/
|
|
1759
|
-
module.exports = /* @__PURE__ */ __name(function
|
|
1756
|
+
// dist/useCases/SetAlarm.js
|
|
1757
|
+
var require_SetAlarm = __commonJS({
|
|
1758
|
+
"dist/useCases/SetAlarm.js"(exports, module) {
|
|
1759
|
+
module.exports = /* @__PURE__ */ __name(function SetAlarm(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
1760
1760
|
if (!requestData)
|
|
1761
1761
|
requestData = {};
|
|
1762
1762
|
const pathParams = [":roomId", ":id"];
|
|
1763
1763
|
const { data, query, headers } = requestData;
|
|
1764
|
-
let url = "/rooms/:roomId/
|
|
1764
|
+
let url = "/rooms/:roomId/alarms/:id";
|
|
1765
1765
|
if (pathParams && data) {
|
|
1766
1766
|
for (const param of pathParams) {
|
|
1767
1767
|
const paramName = param.replace(":", "");
|
|
@@ -1787,7 +1787,7 @@ var require_SetLock = __commonJS({
|
|
|
1787
1787
|
if (headers)
|
|
1788
1788
|
config.headers = headers;
|
|
1789
1789
|
return this._http.request(config);
|
|
1790
|
-
}, "
|
|
1790
|
+
}, "SetAlarm");
|
|
1791
1791
|
}
|
|
1792
1792
|
});
|
|
1793
1793
|
|
|
@@ -2665,6 +2665,44 @@ var require_DescribeLock = __commonJS({
|
|
|
2665
2665
|
}
|
|
2666
2666
|
});
|
|
2667
2667
|
|
|
2668
|
+
// dist/useCases/SetLock.js
|
|
2669
|
+
var require_SetLock = __commonJS({
|
|
2670
|
+
"dist/useCases/SetLock.js"(exports, module) {
|
|
2671
|
+
module.exports = /* @__PURE__ */ __name(function SetLock(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
2672
|
+
if (!requestData)
|
|
2673
|
+
requestData = {};
|
|
2674
|
+
const pathParams = [":roomId", ":id"];
|
|
2675
|
+
const { data, query, headers } = requestData;
|
|
2676
|
+
let url = "/rooms/:roomId/locks/:id";
|
|
2677
|
+
if (pathParams && data) {
|
|
2678
|
+
for (const param of pathParams) {
|
|
2679
|
+
const paramName = param.replace(":", "");
|
|
2680
|
+
url = url.replace(param, data[paramName]);
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
2684
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
2685
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
2686
|
+
return Promise.reject(
|
|
2687
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
2688
|
+
);
|
|
2689
|
+
}
|
|
2690
|
+
const config = {
|
|
2691
|
+
method: "post",
|
|
2692
|
+
url,
|
|
2693
|
+
...httpConfigOptions
|
|
2694
|
+
};
|
|
2695
|
+
if (data)
|
|
2696
|
+
config.data = data;
|
|
2697
|
+
if (query)
|
|
2698
|
+
config.params = query;
|
|
2699
|
+
if (headers)
|
|
2700
|
+
config.headers = headers;
|
|
2701
|
+
return this._http.request(config);
|
|
2702
|
+
}, "SetLock");
|
|
2703
|
+
}
|
|
2704
|
+
});
|
|
2705
|
+
|
|
2668
2706
|
// dist/useCases/DescribeLockCredential.js
|
|
2669
2707
|
var require_DescribeLockCredential = __commonJS({
|
|
2670
2708
|
"dist/useCases/DescribeLockCredential.js"(exports, module) {
|
|
@@ -8770,7 +8808,7 @@ var require_Client = __commonJS({
|
|
|
8770
8808
|
var UpdateAlarm = require_UpdateAlarm();
|
|
8771
8809
|
var DeleteAlarm = require_DeleteAlarm();
|
|
8772
8810
|
var DescribeAlarm = require_DescribeAlarm();
|
|
8773
|
-
var
|
|
8811
|
+
var SetAlarm = require_SetAlarm();
|
|
8774
8812
|
var CreateCamera = require_CreateCamera();
|
|
8775
8813
|
var ListCameras = require_ListCameras();
|
|
8776
8814
|
var UpdateCamera = require_UpdateCamera();
|
|
@@ -8794,6 +8832,7 @@ var require_Client = __commonJS({
|
|
|
8794
8832
|
var UpdateLock = require_UpdateLock();
|
|
8795
8833
|
var DeleteLock = require_DeleteLock();
|
|
8796
8834
|
var DescribeLock = require_DescribeLock();
|
|
8835
|
+
var SetLock = require_SetLock();
|
|
8797
8836
|
var DescribeLockCredential = require_DescribeLockCredential();
|
|
8798
8837
|
var CreateSwitch = require_CreateSwitch();
|
|
8799
8838
|
var ListSwitches = require_ListSwitches();
|
|
@@ -9046,7 +9085,7 @@ var require_Client = __commonJS({
|
|
|
9046
9085
|
KohostApiClient.prototype.UpdateAlarm = UpdateAlarm;
|
|
9047
9086
|
KohostApiClient.prototype.DeleteAlarm = DeleteAlarm;
|
|
9048
9087
|
KohostApiClient.prototype.DescribeAlarm = DescribeAlarm;
|
|
9049
|
-
KohostApiClient.prototype.
|
|
9088
|
+
KohostApiClient.prototype.SetAlarm = SetAlarm;
|
|
9050
9089
|
KohostApiClient.prototype.CreateCamera = CreateCamera;
|
|
9051
9090
|
KohostApiClient.prototype.ListCameras = ListCameras;
|
|
9052
9091
|
KohostApiClient.prototype.UpdateCamera = UpdateCamera;
|
|
@@ -9070,6 +9109,7 @@ var require_Client = __commonJS({
|
|
|
9070
9109
|
KohostApiClient.prototype.UpdateLock = UpdateLock;
|
|
9071
9110
|
KohostApiClient.prototype.DeleteLock = DeleteLock;
|
|
9072
9111
|
KohostApiClient.prototype.DescribeLock = DescribeLock;
|
|
9112
|
+
KohostApiClient.prototype.SetLock = SetLock;
|
|
9073
9113
|
KohostApiClient.prototype.DescribeLockCredential = DescribeLockCredential;
|
|
9074
9114
|
KohostApiClient.prototype.CreateSwitch = CreateSwitch;
|
|
9075
9115
|
KohostApiClient.prototype.ListSwitches = ListSwitches;
|