@kohost/api-client 3.1.1 → 3.1.3

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.
Files changed (34) hide show
  1. package/dist/cjs/Client/index.js +141 -21
  2. package/dist/cjs/schemas/AlarmSchema.d.ts +1 -0
  3. package/dist/cjs/schemas/CameraSchema.d.ts +1 -0
  4. package/dist/cjs/schemas/CategorySchema.d.ts +1 -0
  5. package/dist/cjs/schemas/CourtesySchema.d.ts +1 -0
  6. package/dist/cjs/schemas/CredentialSchema.d.ts +3 -1
  7. package/dist/cjs/schemas/DimmerSchema.d.ts +1 -0
  8. package/dist/cjs/schemas/GatewaySchema.d.ts +1 -0
  9. package/dist/cjs/schemas/LockSchema.d.ts +1 -0
  10. package/dist/cjs/schemas/MediaSourceSchema.d.ts +2 -0
  11. package/dist/cjs/schemas/MotionSensorSchema.d.ts +1 -0
  12. package/dist/cjs/schemas/ProductSchema.d.ts +1 -0
  13. package/dist/cjs/schemas/ReservationSchema.d.ts +1 -0
  14. package/dist/cjs/schemas/RoomSchema.d.ts +11 -0
  15. package/dist/cjs/schemas/SpaceSchema.d.ts +1 -0
  16. package/dist/cjs/schemas/SwitchSchema.d.ts +1 -0
  17. package/dist/cjs/schemas/SystemUserSchema.d.ts +1 -0
  18. package/dist/cjs/schemas/ThermostatSchema.d.ts +1 -0
  19. package/dist/cjs/schemas/UserSchema.d.ts +1 -0
  20. package/dist/cjs/schemas/WindowCoveringSchema.d.ts +1 -0
  21. package/dist/cjs/schemas/credential.json +4 -2
  22. package/dist/cjs/schemas/definitions.json +1 -0
  23. package/dist/cjs/schemas/mediaSource.json +2 -1
  24. package/dist/esm/Client.js +141 -21
  25. package/dist/esm/Client.js.map +3 -3
  26. package/dist/esm/Models.js +7 -3
  27. package/dist/esm/Models.js.map +2 -2
  28. package/dist/esm/utils.js +1 -0
  29. package/dist/esm/utils.js.map +2 -2
  30. package/dist/useCases/CreateUserMobileKey.js +32 -0
  31. package/dist/useCases/DescribeMyAuth.js +32 -0
  32. package/dist/useCases/{DescribeMyAccessCredentials.js → DescribeMyMobileKeyApp.js} +1 -1
  33. package/dist/useCases/ListUserMobileKeys.js +32 -0
  34. package/package.json +1 -1
@@ -271,6 +271,44 @@ var require_FinishRegisterPasskey = __commonJS({
271
271
  }
272
272
  });
273
273
 
274
+ // dist/useCases/DescribeMyAuth.js
275
+ var require_DescribeMyAuth = __commonJS({
276
+ "dist/useCases/DescribeMyAuth.js"(exports, module) {
277
+ module.exports = /* @__PURE__ */ __name(function DescribeMyAuth(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
278
+ if (!requestData)
279
+ requestData = {};
280
+ const pathParams = null;
281
+ const { data, query, headers } = requestData;
282
+ let url = "/auth/me";
283
+ if (pathParams && data) {
284
+ for (const param of pathParams) {
285
+ const paramName = param.replace(":", "");
286
+ url = url.replace(param, data[paramName]);
287
+ }
288
+ }
289
+ if (url.match(/:[a-zA-Z0-9]+/g)) {
290
+ const missingParams = url.match(/:[a-zA-Z0-9]+/g);
291
+ const missing = missingParams.map((param) => param.replace(":", ""));
292
+ return Promise.reject(
293
+ new Error("Missing parameters: " + missing.join(", "))
294
+ );
295
+ }
296
+ const config = {
297
+ method: "get",
298
+ url,
299
+ ...httpConfigOptions
300
+ };
301
+ if (data)
302
+ config.data = data;
303
+ if (query)
304
+ config.params = query;
305
+ if (headers)
306
+ config.headers = headers;
307
+ return this._http.request(config);
308
+ }, "DescribeMyAuth");
309
+ }
310
+ });
311
+
274
312
  // dist/useCases/DescribeSelf.js
275
313
  var require_DescribeSelf = __commonJS({
276
314
  "dist/useCases/DescribeSelf.js"(exports, module) {
@@ -803,15 +841,15 @@ var require_ListTeam = __commonJS({
803
841
  }
804
842
  });
805
843
 
806
- // dist/useCases/DescribeMyAccessCredentials.js
807
- var require_DescribeMyAccessCredentials = __commonJS({
808
- "dist/useCases/DescribeMyAccessCredentials.js"(exports, module) {
809
- module.exports = /* @__PURE__ */ __name(function DescribeMyAccessCredentials(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
844
+ // dist/useCases/DescribeMyPasskeyRegistrations.js
845
+ var require_DescribeMyPasskeyRegistrations = __commonJS({
846
+ "dist/useCases/DescribeMyPasskeyRegistrations.js"(exports, module) {
847
+ module.exports = /* @__PURE__ */ __name(function DescribeMyPasskeyRegistrations(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
810
848
  if (!requestData)
811
849
  requestData = {};
812
850
  const pathParams = null;
813
851
  const { data, query, headers } = requestData;
814
- let url = "/users/me/accessCredentials";
852
+ let url = "/users/me/passkeyRegistrations";
815
853
  if (pathParams && data) {
816
854
  for (const param of pathParams) {
817
855
  const paramName = param.replace(":", "");
@@ -837,19 +875,95 @@ var require_DescribeMyAccessCredentials = __commonJS({
837
875
  if (headers)
838
876
  config.headers = headers;
839
877
  return this._http.request(config);
840
- }, "DescribeMyAccessCredentials");
878
+ }, "DescribeMyPasskeyRegistrations");
841
879
  }
842
880
  });
843
881
 
844
- // dist/useCases/DescribeMyPasskeyRegistrations.js
845
- var require_DescribeMyPasskeyRegistrations = __commonJS({
846
- "dist/useCases/DescribeMyPasskeyRegistrations.js"(exports, module) {
847
- module.exports = /* @__PURE__ */ __name(function DescribeMyPasskeyRegistrations(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
882
+ // dist/useCases/TipUser.js
883
+ var require_TipUser = __commonJS({
884
+ "dist/useCases/TipUser.js"(exports, module) {
885
+ module.exports = /* @__PURE__ */ __name(function TipUser(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
886
+ if (!requestData)
887
+ requestData = {};
888
+ const pathParams = [":id"];
889
+ const { data, query, headers } = requestData;
890
+ let url = "/users/:id/tip";
891
+ if (pathParams && data) {
892
+ for (const param of pathParams) {
893
+ const paramName = param.replace(":", "");
894
+ url = url.replace(param, data[paramName]);
895
+ }
896
+ }
897
+ if (url.match(/:[a-zA-Z0-9]+/g)) {
898
+ const missingParams = url.match(/:[a-zA-Z0-9]+/g);
899
+ const missing = missingParams.map((param) => param.replace(":", ""));
900
+ return Promise.reject(
901
+ new Error("Missing parameters: " + missing.join(", "))
902
+ );
903
+ }
904
+ const config = {
905
+ method: "post",
906
+ url,
907
+ ...httpConfigOptions
908
+ };
909
+ if (data)
910
+ config.data = data;
911
+ if (query)
912
+ config.params = query;
913
+ if (headers)
914
+ config.headers = headers;
915
+ return this._http.request(config);
916
+ }, "TipUser");
917
+ }
918
+ });
919
+
920
+ // dist/useCases/CreateUserMobileKey.js
921
+ var require_CreateUserMobileKey = __commonJS({
922
+ "dist/useCases/CreateUserMobileKey.js"(exports, module) {
923
+ module.exports = /* @__PURE__ */ __name(function CreateUserMobileKey(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
924
+ if (!requestData)
925
+ requestData = {};
926
+ const pathParams = [":id"];
927
+ const { data, query, headers } = requestData;
928
+ let url = "/users/:id/mobileKeys";
929
+ if (pathParams && data) {
930
+ for (const param of pathParams) {
931
+ const paramName = param.replace(":", "");
932
+ url = url.replace(param, data[paramName]);
933
+ }
934
+ }
935
+ if (url.match(/:[a-zA-Z0-9]+/g)) {
936
+ const missingParams = url.match(/:[a-zA-Z0-9]+/g);
937
+ const missing = missingParams.map((param) => param.replace(":", ""));
938
+ return Promise.reject(
939
+ new Error("Missing parameters: " + missing.join(", "))
940
+ );
941
+ }
942
+ const config = {
943
+ method: "post",
944
+ url,
945
+ ...httpConfigOptions
946
+ };
947
+ if (data)
948
+ config.data = data;
949
+ if (query)
950
+ config.params = query;
951
+ if (headers)
952
+ config.headers = headers;
953
+ return this._http.request(config);
954
+ }, "CreateUserMobileKey");
955
+ }
956
+ });
957
+
958
+ // dist/useCases/DescribeMyMobileKeyApp.js
959
+ var require_DescribeMyMobileKeyApp = __commonJS({
960
+ "dist/useCases/DescribeMyMobileKeyApp.js"(exports, module) {
961
+ module.exports = /* @__PURE__ */ __name(function DescribeMyMobileKeyApp(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
848
962
  if (!requestData)
849
963
  requestData = {};
850
964
  const pathParams = null;
851
965
  const { data, query, headers } = requestData;
852
- let url = "/users/me/passkeyRegistrations";
966
+ let url = "/users/me/accessCredentials";
853
967
  if (pathParams && data) {
854
968
  for (const param of pathParams) {
855
969
  const paramName = param.replace(":", "");
@@ -875,19 +989,19 @@ var require_DescribeMyPasskeyRegistrations = __commonJS({
875
989
  if (headers)
876
990
  config.headers = headers;
877
991
  return this._http.request(config);
878
- }, "DescribeMyPasskeyRegistrations");
992
+ }, "DescribeMyMobileKeyApp");
879
993
  }
880
994
  });
881
995
 
882
- // dist/useCases/TipUser.js
883
- var require_TipUser = __commonJS({
884
- "dist/useCases/TipUser.js"(exports, module) {
885
- module.exports = /* @__PURE__ */ __name(function TipUser(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
996
+ // dist/useCases/ListUserMobileKeys.js
997
+ var require_ListUserMobileKeys = __commonJS({
998
+ "dist/useCases/ListUserMobileKeys.js"(exports, module) {
999
+ module.exports = /* @__PURE__ */ __name(function ListUserMobileKeys(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
886
1000
  if (!requestData)
887
1001
  requestData = {};
888
1002
  const pathParams = [":id"];
889
1003
  const { data, query, headers } = requestData;
890
- let url = "/users/:id/tip";
1004
+ let url = "/users/:id/mobileKeys";
891
1005
  if (pathParams && data) {
892
1006
  for (const param of pathParams) {
893
1007
  const paramName = param.replace(":", "");
@@ -902,7 +1016,7 @@ var require_TipUser = __commonJS({
902
1016
  );
903
1017
  }
904
1018
  const config = {
905
- method: "post",
1019
+ method: "get",
906
1020
  url,
907
1021
  ...httpConfigOptions
908
1022
  };
@@ -913,7 +1027,7 @@ var require_TipUser = __commonJS({
913
1027
  if (headers)
914
1028
  config.headers = headers;
915
1029
  return this._http.request(config);
916
- }, "TipUser");
1030
+ }, "ListUserMobileKeys");
917
1031
  }
918
1032
  });
919
1033
 
@@ -9410,6 +9524,7 @@ var require_Client = __commonJS({
9410
9524
  var LogoutUser = require_LogoutUser();
9411
9525
  var StartRegisterPasskey = require_StartRegisterPasskey();
9412
9526
  var FinishRegisterPasskey = require_FinishRegisterPasskey();
9527
+ var DescribeMyAuth = require_DescribeMyAuth();
9413
9528
  var DescribeSelf = require_DescribeSelf();
9414
9529
  var DescribeUser = require_DescribeUser();
9415
9530
  var CreateUser = require_CreateUser();
@@ -9424,9 +9539,11 @@ var require_Client = __commonJS({
9424
9539
  var ListUserSpaces = require_ListUserSpaces();
9425
9540
  var ListUserOrders = require_ListUserOrders();
9426
9541
  var ListTeam = require_ListTeam();
9427
- var DescribeMyAccessCredentials = require_DescribeMyAccessCredentials();
9428
9542
  var DescribeMyPasskeyRegistrations = require_DescribeMyPasskeyRegistrations();
9429
9543
  var TipUser = require_TipUser();
9544
+ var CreateUserMobileKey = require_CreateUserMobileKey();
9545
+ var DescribeMyMobileKeyApp = require_DescribeMyMobileKeyApp();
9546
+ var ListUserMobileKeys = require_ListUserMobileKeys();
9430
9547
  var ListSpaces = require_ListSpaces();
9431
9548
  var ListMySpaces = require_ListMySpaces();
9432
9549
  var ListRoomsInSpace = require_ListRoomsInSpace();
@@ -9731,6 +9848,7 @@ var require_Client = __commonJS({
9731
9848
  KohostApiClient.prototype.LogoutUser = LogoutUser;
9732
9849
  KohostApiClient.prototype.StartRegisterPasskey = StartRegisterPasskey;
9733
9850
  KohostApiClient.prototype.FinishRegisterPasskey = FinishRegisterPasskey;
9851
+ KohostApiClient.prototype.DescribeMyAuth = DescribeMyAuth;
9734
9852
  KohostApiClient.prototype.DescribeSelf = DescribeSelf;
9735
9853
  KohostApiClient.prototype.DescribeUser = DescribeUser;
9736
9854
  KohostApiClient.prototype.CreateUser = CreateUser;
@@ -9745,9 +9863,11 @@ var require_Client = __commonJS({
9745
9863
  KohostApiClient.prototype.ListUserSpaces = ListUserSpaces;
9746
9864
  KohostApiClient.prototype.ListUserOrders = ListUserOrders;
9747
9865
  KohostApiClient.prototype.ListTeam = ListTeam;
9748
- KohostApiClient.prototype.DescribeMyAccessCredentials = DescribeMyAccessCredentials;
9749
9866
  KohostApiClient.prototype.DescribeMyPasskeyRegistrations = DescribeMyPasskeyRegistrations;
9750
9867
  KohostApiClient.prototype.TipUser = TipUser;
9868
+ KohostApiClient.prototype.CreateUserMobileKey = CreateUserMobileKey;
9869
+ KohostApiClient.prototype.DescribeMyMobileKeyApp = DescribeMyMobileKeyApp;
9870
+ KohostApiClient.prototype.ListUserMobileKeys = ListUserMobileKeys;
9751
9871
  KohostApiClient.prototype.ListSpaces = ListSpaces;
9752
9872
  KohostApiClient.prototype.ListMySpaces = ListMySpaces;
9753
9873
  KohostApiClient.prototype.ListRoomsInSpace = ListRoomsInSpace;