@kohost/api-client 3.0.0-beta.47 → 3.0.0-beta.50

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 (156) hide show
  1. package/dist/cjs/AMQPClient/index.js +290 -0
  2. package/dist/cjs/Commands/CheckInReservationCommand.js +19 -0
  3. package/dist/cjs/Commands/Command.js +34 -0
  4. package/dist/cjs/Commands/CreateImageUploadEndpointCommand.js +17 -0
  5. package/dist/cjs/Commands/CreateShortLinkCommand.js +20 -0
  6. package/dist/cjs/Commands/DiscoverReservationRoomTypeUpsellOptionsCommand.js +20 -0
  7. package/dist/cjs/Commands/DiscoverReservationsCommand.js +20 -0
  8. package/dist/cjs/Commands/DiscoverRoomTypesCommand.js +19 -0
  9. package/dist/cjs/Commands/DiscoverRoomsCommand.js +35 -0
  10. package/dist/cjs/Commands/DiscoverUsersCommand.js +19 -0
  11. package/dist/cjs/Commands/GetMobileKeyCommand.js +24 -0
  12. package/dist/cjs/Commands/GetProductsCommand.js +17 -0
  13. package/dist/cjs/Commands/OCRDocumentCommand.js +15 -0
  14. package/dist/cjs/Commands/SellProductsCommand.js +17 -0
  15. package/dist/cjs/Commands/SendEmailCommand.js +24 -0
  16. package/dist/cjs/Commands/SendSMSCommand.js +21 -0
  17. package/dist/cjs/Commands/SetAlarmCommand.js +17 -0
  18. package/dist/cjs/Commands/SetCourtesyCommand.js +17 -0
  19. package/dist/cjs/Commands/SetDimmerCommand.js +17 -0
  20. package/dist/cjs/Commands/SetLockCommand.js +17 -0
  21. package/dist/cjs/Commands/SetMediaCommand.js +17 -0
  22. package/dist/cjs/Commands/SetSceneCommand.js +17 -0
  23. package/dist/cjs/Commands/SetSwitchCommand.js +17 -0
  24. package/dist/cjs/Commands/SetThermostatCommand.js +17 -0
  25. package/dist/cjs/Commands/SetWindowCoveringCommand.js +17 -0
  26. package/dist/cjs/Commands/UpdateReservationCommand.js +19 -0
  27. package/dist/cjs/Commands/UpdateUserCommand.js +41 -0
  28. package/dist/cjs/Commands/UploadImageCommand.js +17 -0
  29. package/dist/cjs/Commands/index.js +55 -0
  30. package/dist/cjs/Errors/AppError.js +8 -0
  31. package/dist/cjs/Errors/AuthenticationError.js +9 -0
  32. package/dist/cjs/Errors/AuthorizationError.js +9 -0
  33. package/dist/cjs/Errors/DeviceCommError.js +9 -0
  34. package/dist/cjs/Errors/LoginError.js +9 -0
  35. package/dist/cjs/Errors/NotFoundError.js +9 -0
  36. package/dist/cjs/Errors/RequestError.js +9 -0
  37. package/dist/cjs/Errors/SystemCommError.js +9 -0
  38. package/dist/cjs/Errors/TokenExpiredError.js +9 -0
  39. package/dist/cjs/Errors/UnprocessableRequestError.js +9 -0
  40. package/dist/cjs/Errors/ValidationError.js +9 -0
  41. package/dist/cjs/Errors/index.js +15 -0
  42. package/dist/cjs/Events/ApplicationInUseEvent.js +17 -0
  43. package/dist/cjs/Events/ApplicationOutOfUseEvent.js +17 -0
  44. package/dist/cjs/Events/EmailEvent.js +18 -0
  45. package/dist/cjs/Events/Event.js +55 -0
  46. package/dist/cjs/Events/SMSEvent.js +18 -0
  47. package/dist/cjs/Events/SMSSentEvent.js +17 -0
  48. package/dist/cjs/Events/ShortLinkCreatedEvent.js +17 -0
  49. package/dist/cjs/Events/SystemCameraUpdatedEvent.js +17 -0
  50. package/dist/cjs/Events/SystemCourtesyUpdatedEvent.js +17 -0
  51. package/dist/cjs/Events/SystemDimmerUpdatedEvent.js +17 -0
  52. package/dist/cjs/Events/SystemGatewayUpdatedEvent.js +17 -0
  53. package/dist/cjs/Events/SystemLockUpdatedEvent.js +17 -0
  54. package/dist/cjs/Events/SystemMediaSourceUpdatedEvent.js +17 -0
  55. package/dist/cjs/Events/SystemMotionSensorUpdatedEvent.js +17 -0
  56. package/dist/cjs/Events/SystemProductUpdatedEvent.js +17 -0
  57. package/dist/cjs/Events/SystemReservationUpdatedEvent.js +17 -0
  58. package/dist/cjs/Events/SystemSceneControllerUpdatedEvent.js +17 -0
  59. package/dist/cjs/Events/SystemSpaceTypeUpdatedEvent.js +17 -0
  60. package/dist/cjs/Events/SystemSpaceUpdatedEvent.js +17 -0
  61. package/dist/cjs/Events/SystemSwitchUpdatedEvent.js +17 -0
  62. package/dist/cjs/Events/SystemThermostatUpdatedEvent.js +17 -0
  63. package/dist/cjs/Events/SystemUserUpdatedEvent.js +17 -0
  64. package/dist/cjs/Events/SystemWindowCoveringUpdatedEvent.js +17 -0
  65. package/dist/cjs/Events/index.js +50 -0
  66. package/dist/cjs/Models/Alarm.js +29 -0
  67. package/dist/cjs/Models/Camera.js +29 -0
  68. package/dist/cjs/Models/Courtesy.js +33 -0
  69. package/dist/cjs/Models/Credential.js +29 -0
  70. package/dist/cjs/Models/Dimmer.js +61 -0
  71. package/dist/cjs/Models/DiscoveredDevice.js +30 -0
  72. package/dist/cjs/Models/EmailMessage.js +29 -0
  73. package/dist/cjs/Models/EnergyReport.js +29 -0
  74. package/dist/cjs/Models/EnergyReportShard.js +29 -0
  75. package/dist/cjs/Models/Gateway.js +29 -0
  76. package/dist/cjs/Models/Identification.js +32 -0
  77. package/dist/cjs/Models/Kohost.js +96 -0
  78. package/dist/cjs/Models/Lock.js +33 -0
  79. package/dist/cjs/Models/MediaFile.js +41 -0
  80. package/dist/cjs/Models/MediaSource.js +29 -0
  81. package/dist/cjs/Models/MotionSensor.js +29 -0
  82. package/dist/cjs/Models/Organization.js +28 -0
  83. package/dist/cjs/Models/Product.js +29 -0
  84. package/dist/cjs/Models/Property.js +28 -0
  85. package/dist/cjs/Models/Reservation.js +98 -0
  86. package/dist/cjs/Models/Room.js +212 -0
  87. package/dist/cjs/Models/Scene.js +183 -0
  88. package/dist/cjs/Models/ShortLink.js +29 -0
  89. package/dist/cjs/Models/SmsMessage.js +29 -0
  90. package/dist/cjs/Models/Space.js +97 -0
  91. package/dist/cjs/Models/SpaceType.js +30 -0
  92. package/dist/cjs/Models/Switch.js +33 -0
  93. package/dist/cjs/Models/SystemUser.js +48 -0
  94. package/dist/cjs/Models/Thermostat.js +80 -0
  95. package/dist/cjs/Models/Ticket.js +105 -0
  96. package/dist/cjs/Models/User.js +73 -0
  97. package/dist/cjs/Models/WindowCovering.js +49 -0
  98. package/dist/cjs/Models/index.js +68 -0
  99. package/dist/cjs/{SocketIoClient.js → SocketIoClient/index.js} +19 -14
  100. package/dist/cjs/defs/deviceTypes.js +15 -0
  101. package/dist/cjs/defs/formalDeviceTypes.js +6 -0
  102. package/dist/cjs/defs/index.js +11 -0
  103. package/dist/cjs/index.js +23 -0
  104. package/dist/cjs/schemas/alarm.json +103 -0
  105. package/dist/cjs/schemas/camera.json +50 -0
  106. package/dist/cjs/schemas/courtesy.json +46 -0
  107. package/dist/cjs/schemas/credential.json +31 -0
  108. package/dist/cjs/schemas/definitions.json +191 -0
  109. package/dist/cjs/schemas/dimmer.json +43 -0
  110. package/dist/cjs/schemas/discoveredDevice.json +31 -0
  111. package/dist/cjs/schemas/emailMessage.json +71 -0
  112. package/dist/cjs/schemas/energyReport.json +86 -0
  113. package/dist/cjs/schemas/energyReportShard.json +75 -0
  114. package/dist/cjs/schemas/gateway.json +35 -0
  115. package/dist/cjs/schemas/identification.json +61 -0
  116. package/dist/cjs/schemas/lock.json +45 -0
  117. package/dist/cjs/schemas/mediaFile.json +67 -0
  118. package/dist/cjs/schemas/mediaSource.json +184 -0
  119. package/dist/cjs/schemas/motionSensor.json +32 -0
  120. package/dist/cjs/schemas/organization.json +36 -0
  121. package/dist/cjs/schemas/payment.json +47 -0
  122. package/dist/cjs/schemas/product.json +40 -0
  123. package/dist/cjs/schemas/property.json +246 -0
  124. package/dist/cjs/schemas/reservation.json +118 -0
  125. package/dist/cjs/schemas/room.json +98 -0
  126. package/dist/cjs/schemas/scene.json +121 -0
  127. package/dist/cjs/schemas/shortLink.json +30 -0
  128. package/dist/cjs/schemas/smsMessage.json +61 -0
  129. package/dist/cjs/schemas/space.json +120 -0
  130. package/dist/cjs/schemas/spaceType.json +30 -0
  131. package/dist/cjs/schemas/switch.json +42 -0
  132. package/dist/cjs/schemas/systemUser.json +95 -0
  133. package/dist/cjs/schemas/thermostat.json +153 -0
  134. package/dist/cjs/schemas/ticket.json +96 -0
  135. package/dist/cjs/schemas/user.json +152 -0
  136. package/dist/cjs/schemas/windowCovering.json +43 -0
  137. package/dist/cjs/utils/errorFactory.js +8 -0
  138. package/dist/cjs/utils/eventFactory.js +10 -0
  139. package/dist/cjs/utils/getDeviceTypes.js +7 -0
  140. package/dist/cjs/utils/getFormalDeviceType.js +5 -0
  141. package/dist/cjs/utils/index.js +11 -0
  142. package/dist/cjs/utils/schema.js +25 -0
  143. package/dist/esm/Models.js +451 -435
  144. package/dist/esm/Models.js.map +4 -4
  145. package/dist/esm/utils.js +7 -26
  146. package/dist/esm/utils.js.map +3 -3
  147. package/package.json +12 -7
  148. package/dist/cjs/AMQPClient.js +0 -462
  149. package/dist/cjs/Commands.js +0 -973
  150. package/dist/cjs/Errors.js +0 -209
  151. package/dist/cjs/Events.js +0 -578
  152. package/dist/cjs/Models.js +0 -4905
  153. package/dist/cjs/defs.js +0 -167
  154. package/dist/cjs/index.cjs.js +0 -6755
  155. package/dist/cjs/utils.js +0 -525
  156. /package/dist/cjs/{Client.js → Client/index.js} +0 -0
@@ -7454,12 +7454,13 @@ var require_dist = __commonJS({
7454
7454
  }
7455
7455
  });
7456
7456
 
7457
- // src/schemas/definitions/common.json
7458
- var require_common = __commonJS({
7459
- "src/schemas/definitions/common.json"(exports, module) {
7457
+ // src/schemas/definitions.json
7458
+ var require_definitions = __commonJS({
7459
+ "src/schemas/definitions.json"(exports, module) {
7460
7460
  module.exports = {
7461
7461
  $schema: "http://json-schema.org/draft-07/schema",
7462
- $id: "https://api.kohost.io/schemas/v3/definitions/common.json",
7462
+ $id: "definitions.json",
7463
+ title: "Definitions",
7463
7464
  definitions: {
7464
7465
  id: {
7465
7466
  type: "string",
@@ -7563,24 +7564,6 @@ var require_common = __commonJS({
7563
7564
  "cloudflare-stream",
7564
7565
  "insperia-privacy"
7565
7566
  ]
7566
- }
7567
- }
7568
- };
7569
- }
7570
- });
7571
-
7572
- // src/schemas/definitions/device.json
7573
- var require_device = __commonJS({
7574
- "src/schemas/definitions/device.json"(exports, module) {
7575
- module.exports = {
7576
- $schema: "http://json-schema.org/draft-07/schema",
7577
- $id: "https://api.kohost.io/schemas/v3/definitions/device.json",
7578
- definitions: {
7579
- id: {
7580
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
7581
- },
7582
- systemData: {
7583
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
7584
7567
  },
7585
7568
  type: {
7586
7569
  type: "string",
@@ -7681,11 +7664,9 @@ var require_schema = __commonJS({
7681
7664
  strictRequired: false
7682
7665
  });
7683
7666
  var addFormats = require_dist();
7684
- var commonDefs = require_common();
7685
- var deviceDefs = require_device();
7667
+ var defininitions = require_definitions();
7686
7668
  addFormats(ajv);
7687
- ajv.addSchema(commonDefs);
7688
- ajv.addSchema(deviceDefs);
7669
+ ajv.addSchema(defininitions);
7689
7670
  module.exports = {
7690
7671
  add: /* @__PURE__ */ __name(function add(schema) {
7691
7672
  ajv.addSchema(schema);
@@ -7702,16 +7683,16 @@ var require_reservation = __commonJS({
7702
7683
  "src/schemas/reservation.json"(exports, module) {
7703
7684
  module.exports = {
7704
7685
  $schema: "http://json-schema.org/draft-07/schema",
7705
- $id: "https://api.kohost.io/schemas/v3/reservation.json",
7686
+ $id: "reservation.json",
7706
7687
  title: "Reservation",
7707
7688
  type: "object",
7708
7689
  required: ["type", "status", "checkInDateTime", "checkOutDateTime"],
7709
7690
  properties: {
7710
7691
  id: {
7711
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
7692
+ $ref: "definitions.json#/definitions/id"
7712
7693
  },
7713
7694
  driver: {
7714
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
7695
+ $ref: "definitions.json#/definitions/driver"
7715
7696
  },
7716
7697
  primaryGuest: {
7717
7698
  type: "string"
@@ -7811,10 +7792,10 @@ var require_reservation = __commonJS({
7811
7792
  type: "string"
7812
7793
  },
7813
7794
  systemData: {
7814
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
7795
+ $ref: "definitions.json#/definitions/systemData"
7815
7796
  },
7816
7797
  metadata: {
7817
- ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/metadata"
7798
+ ref: "definitions.json#/definitions/metadata"
7818
7799
  }
7819
7800
  }
7820
7801
  };
@@ -8083,9 +8064,9 @@ var init_index_browser = __esm({
8083
8064
  }
8084
8065
  });
8085
8066
 
8086
- // src/Models/kohost.js
8087
- var require_kohost = __commonJS({
8088
- "src/Models/kohost.js"(exports, module) {
8067
+ // src/Models/Kohost.js
8068
+ var require_Kohost = __commonJS({
8069
+ "src/Models/Kohost.js"(exports, module) {
8089
8070
  var { ValidationError } = require_Errors();
8090
8071
  var { customAlphabet: generate } = (init_index_browser(), __toCommonJS(index_browser_exports));
8091
8072
  var Kohost = class {
@@ -8100,10 +8081,10 @@ var require_kohost = __commonJS({
8100
8081
  throw new Error("Validator is not defined");
8101
8082
  }
8102
8083
  const isNew = data?.id ? false : true;
8103
- this._setId(data);
8104
- this._validate(data);
8105
- this._setProperties(data);
8106
- this._setTimestamps(isNew);
8084
+ this.#_setId(data);
8085
+ this.#_validate(data);
8086
+ this.#_setProperties(data);
8087
+ this.#_setTimestamps(isNew);
8107
8088
  }
8108
8089
  static get validProperties() {
8109
8090
  throw new Error("validProperties is not defined");
@@ -8111,7 +8092,7 @@ var require_kohost = __commonJS({
8111
8092
  get schemaProperties() {
8112
8093
  return Object.keys(this.validator.schema.properties);
8113
8094
  }
8114
- _setId(data) {
8095
+ #_setId(data) {
8115
8096
  if (data._id)
8116
8097
  data.id = data._id;
8117
8098
  if (!data.id) {
@@ -8119,19 +8100,19 @@ var require_kohost = __commonJS({
8119
8100
  }
8120
8101
  delete data._id;
8121
8102
  }
8122
- _setProperties(data) {
8103
+ #_setProperties(data) {
8123
8104
  this.schemaProperties.forEach((key) => {
8124
8105
  if (data[key] !== void 0)
8125
8106
  this[key] = data[key];
8126
8107
  });
8127
8108
  }
8128
- _setTimestamps(isNew) {
8109
+ #_setTimestamps(isNew) {
8129
8110
  const now = /* @__PURE__ */ new Date();
8130
8111
  if (isNew && this.schemaProperties.includes("createdAt") && !this.createdAt) {
8131
8112
  this.createdAt = now;
8132
8113
  }
8133
8114
  }
8134
- _validate(data) {
8115
+ #_validate(data) {
8135
8116
  const valid = this.validator(data);
8136
8117
  if (!valid) {
8137
8118
  throw new ValidationError(`Invalid ${this.constructor.name}`, {
@@ -8170,12 +8151,12 @@ var require_kohost = __commonJS({
8170
8151
  }
8171
8152
  });
8172
8153
 
8173
- // src/Models/reservation.js
8174
- var require_reservation2 = __commonJS({
8175
- "src/Models/reservation.js"(exports, module) {
8154
+ // src/Models/Reservation.js
8155
+ var require_Reservation = __commonJS({
8156
+ "src/Models/Reservation.js"(exports, module) {
8176
8157
  var schemas = require_schema();
8177
8158
  var schema = require_reservation();
8178
- var Kohost = require_kohost();
8159
+ var Kohost = require_Kohost();
8179
8160
  schemas.add(schema);
8180
8161
  var validator = schemas.compile(schema);
8181
8162
  var Reservation = class extends Kohost {
@@ -8258,13 +8239,13 @@ var require_mediaFile = __commonJS({
8258
8239
  "src/schemas/mediaFile.json"(exports, module) {
8259
8240
  module.exports = {
8260
8241
  $schema: "http://json-schema.org/draft-07/schema",
8261
- $id: "https://api.kohost.io/schemas/v3/mediaFile.json",
8242
+ $id: "mediaFile.json",
8262
8243
  title: "Media File",
8263
8244
  description: "Any media file",
8264
8245
  type: "object",
8265
8246
  properties: {
8266
8247
  id: {
8267
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
8248
+ $ref: "definitions.json#/definitions/id"
8268
8249
  },
8269
8250
  type: {
8270
8251
  type: "string",
@@ -8311,13 +8292,13 @@ var require_mediaFile = __commonJS({
8311
8292
  format: "uri"
8312
8293
  },
8313
8294
  uploadUrlExpires: {
8314
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
8295
+ $ref: "definitions.json#/definitions/date"
8315
8296
  },
8316
8297
  createdBy: {
8317
8298
  type: "string"
8318
8299
  },
8319
8300
  systemData: {
8320
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
8301
+ $ref: "definitions.json#/definitions/systemData"
8321
8302
  }
8322
8303
  },
8323
8304
  additionalProperties: false,
@@ -8326,12 +8307,12 @@ var require_mediaFile = __commonJS({
8326
8307
  }
8327
8308
  });
8328
8309
 
8329
- // src/Models/mediaFile.js
8330
- var require_mediaFile2 = __commonJS({
8331
- "src/Models/mediaFile.js"(exports, module) {
8310
+ // src/Models/MediaFile.js
8311
+ var require_MediaFile = __commonJS({
8312
+ "src/Models/MediaFile.js"(exports, module) {
8332
8313
  var schemas = require_schema();
8333
8314
  var schema = require_mediaFile();
8334
- var Kohost = require_kohost();
8315
+ var Kohost = require_Kohost();
8335
8316
  var { RequestError } = require_Errors();
8336
8317
  schemas.add(schema);
8337
8318
  var validator = schemas.compile(schema);
@@ -8369,41 +8350,41 @@ var require_switch = __commonJS({
8369
8350
  "src/schemas/switch.json"(exports, module) {
8370
8351
  module.exports = {
8371
8352
  $schema: "http://json-schema.org/draft-07/schema",
8372
- $id: "https://api.kohost.io/schemas/v3/switch.json",
8353
+ $id: "switch.json",
8373
8354
  title: "Switch",
8374
8355
  description: "Any smart switch",
8375
8356
  type: "object",
8376
8357
  properties: {
8377
8358
  id: {
8378
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
8359
+ $ref: "definitions.json#/definitions/id"
8379
8360
  },
8380
8361
  name: {
8381
8362
  type: "string"
8382
8363
  },
8383
8364
  type: {
8384
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
8365
+ $ref: "definitions.json#/definitions/type"
8385
8366
  },
8386
8367
  subType: {
8387
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/subType"
8368
+ $ref: "definitions.json#/definitions/subType"
8388
8369
  },
8389
8370
  supportedNotifications: {
8390
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
8371
+ $ref: "definitions.json#/definitions/supportedNotifications"
8391
8372
  },
8392
8373
  notification: {
8393
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
8374
+ $ref: "definitions.json#/definitions/notification"
8394
8375
  },
8395
8376
  driver: {
8396
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
8377
+ $ref: "definitions.json#/definitions/driver"
8397
8378
  },
8398
8379
  state: {
8399
8380
  type: "string",
8400
8381
  enum: ["on", "off"]
8401
8382
  },
8402
8383
  systemData: {
8403
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
8384
+ $ref: "definitions.json#/definitions/systemData"
8404
8385
  },
8405
8386
  watts: {
8406
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
8387
+ $ref: "definitions.json#/definitions/watts"
8407
8388
  }
8408
8389
  },
8409
8390
  additionalProperties: false,
@@ -8412,12 +8393,12 @@ var require_switch = __commonJS({
8412
8393
  }
8413
8394
  });
8414
8395
 
8415
- // src/Models/switch.js
8416
- var require_switch2 = __commonJS({
8417
- "src/Models/switch.js"(exports, module) {
8396
+ // src/Models/Switch.js
8397
+ var require_Switch = __commonJS({
8398
+ "src/Models/Switch.js"(exports, module) {
8418
8399
  var schemas = require_schema();
8419
8400
  var schema = require_switch();
8420
- var Kohost = require_kohost();
8401
+ var Kohost = require_Kohost();
8421
8402
  schemas.add(schema);
8422
8403
  var validator = schemas.compile(schema);
8423
8404
  var Switch = class extends Kohost {
@@ -8451,31 +8432,31 @@ var require_alarm = __commonJS({
8451
8432
  "src/schemas/alarm.json"(exports, module) {
8452
8433
  module.exports = {
8453
8434
  $schema: "http://json-schema.org/draft-07/schema",
8454
- $id: "https://api.kohost.io/schemas/v3/alarm.json",
8435
+ $id: "alarm.json",
8455
8436
  title: "Alarm",
8456
8437
  description: "Any smart alarm system",
8457
8438
  type: "object",
8458
8439
  properties: {
8459
8440
  id: {
8460
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
8441
+ $ref: "definitions.json#/definitions/id"
8461
8442
  },
8462
8443
  name: {
8463
8444
  type: "string"
8464
8445
  },
8465
8446
  type: {
8466
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
8447
+ $ref: "definitions.json#/definitions/type"
8467
8448
  },
8468
8449
  systemData: {
8469
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
8450
+ $ref: "definitions.json#/definitions/systemData"
8470
8451
  },
8471
8452
  supportedNotifications: {
8472
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
8453
+ $ref: "definitions.json#/definitions/supportedNotifications"
8473
8454
  },
8474
8455
  notification: {
8475
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
8456
+ $ref: "definitions.json#/definitions/notification"
8476
8457
  },
8477
8458
  driver: {
8478
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
8459
+ $ref: "definitions.json#/definitions/driver"
8479
8460
  },
8480
8461
  areas: {
8481
8462
  type: "array",
@@ -8537,7 +8518,7 @@ var require_alarm = __commonJS({
8537
8518
  }
8538
8519
  },
8539
8520
  watts: {
8540
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
8521
+ $ref: "definitions.json#/definitions/watts"
8541
8522
  }
8542
8523
  },
8543
8524
  additionalProperties: false,
@@ -8555,12 +8536,12 @@ var require_alarm = __commonJS({
8555
8536
  }
8556
8537
  });
8557
8538
 
8558
- // src/Models/alarm.js
8559
- var require_alarm2 = __commonJS({
8560
- "src/Models/alarm.js"(exports, module) {
8539
+ // src/Models/Alarm.js
8540
+ var require_Alarm = __commonJS({
8541
+ "src/Models/Alarm.js"(exports, module) {
8561
8542
  var schemas = require_schema();
8562
8543
  var schema = require_alarm();
8563
- var Kohost = require_kohost();
8544
+ var Kohost = require_Kohost();
8564
8545
  schemas.add(schema);
8565
8546
  var validator = schemas.compile(schema);
8566
8547
  var Alarm = class extends Kohost {
@@ -8591,31 +8572,31 @@ var require_dimmer = __commonJS({
8591
8572
  "src/schemas/dimmer.json"(exports, module) {
8592
8573
  module.exports = {
8593
8574
  $schema: "http://json-schema.org/draft-07/schema",
8594
- $id: "https://api.kohost.io/schemas/v3/dimmer.json",
8575
+ $id: "dimmer.json",
8595
8576
  title: "Dimmer",
8596
8577
  description: "Any smart dimmer",
8597
8578
  type: "object",
8598
8579
  properties: {
8599
8580
  id: {
8600
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
8581
+ $ref: "definitions.json#/definitions/id"
8601
8582
  },
8602
8583
  name: {
8603
8584
  type: "string"
8604
8585
  },
8605
8586
  type: {
8606
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
8587
+ $ref: "definitions.json#/definitions/type"
8607
8588
  },
8608
8589
  subType: {
8609
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/subType"
8590
+ $ref: "definitions.json#/definitions/subType"
8610
8591
  },
8611
8592
  supportedNotifications: {
8612
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
8593
+ $ref: "definitions.json#/definitions/supportedNotifications"
8613
8594
  },
8614
8595
  notification: {
8615
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
8596
+ $ref: "definitions.json#/definitions/notification"
8616
8597
  },
8617
8598
  driver: {
8618
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
8599
+ $ref: "definitions.json#/definitions/driver"
8619
8600
  },
8620
8601
  level: {
8621
8602
  type: "number",
@@ -8623,10 +8604,10 @@ var require_dimmer = __commonJS({
8623
8604
  maximum: 100
8624
8605
  },
8625
8606
  systemData: {
8626
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
8607
+ $ref: "definitions.json#/definitions/systemData"
8627
8608
  },
8628
8609
  watts: {
8629
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
8610
+ $ref: "definitions.json#/definitions/watts"
8630
8611
  }
8631
8612
  },
8632
8613
  additionalProperties: false,
@@ -8635,20 +8616,26 @@ var require_dimmer = __commonJS({
8635
8616
  }
8636
8617
  });
8637
8618
 
8638
- // src/Models/dimmer.js
8639
- var require_dimmer2 = __commonJS({
8640
- "src/Models/dimmer.js"(exports, module) {
8619
+ // src/Models/Dimmer.js
8620
+ var require_Dimmer = __commonJS({
8621
+ "src/Models/Dimmer.js"(exports, module) {
8641
8622
  var schemas = require_schema();
8642
8623
  var schema = require_dimmer();
8643
- var Kohost = require_kohost();
8624
+ var Kohost = require_Kohost();
8644
8625
  schemas.add(schema);
8645
8626
  var validator = schemas.compile(schema);
8646
8627
  var Dimmer = class extends Kohost {
8647
8628
  static {
8648
8629
  __name(this, "Dimmer");
8649
8630
  }
8650
- constructor(data) {
8651
- super(data);
8631
+ /**
8632
+ * @typedef {import("../schemas/DimmerSchema").Dimmer} DimmerType
8633
+ * Create a Dimmer instance.
8634
+ * @constructor
8635
+ * @param {DimmerType} dimmer - The dimmer object of type Dimmer.
8636
+ */
8637
+ constructor(dimmer) {
8638
+ super(dimmer);
8652
8639
  }
8653
8640
  static getActionDelta(old, _new) {
8654
8641
  const delta = {};
@@ -8689,44 +8676,44 @@ var require_lock = __commonJS({
8689
8676
  "src/schemas/lock.json"(exports, module) {
8690
8677
  module.exports = {
8691
8678
  $schema: "http://json-schema.org/draft-07/schema",
8692
- $id: "https://api.kohost.io/schemas/v3/lock.json",
8679
+ $id: "lock.json",
8693
8680
  title: "Lock",
8694
8681
  description: "Any smart lock",
8695
8682
  type: "object",
8696
8683
  properties: {
8697
8684
  id: {
8698
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
8685
+ $ref: "definitions.json#/definitions/id"
8699
8686
  },
8700
8687
  name: {
8701
8688
  type: "string"
8702
8689
  },
8703
8690
  type: {
8704
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
8691
+ $ref: "definitions.json#/definitions/type"
8705
8692
  },
8706
8693
  offline: {
8707
8694
  type: "boolean"
8708
8695
  },
8709
8696
  supportedNotifications: {
8710
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
8697
+ $ref: "definitions.json#/definitions/supportedNotifications"
8711
8698
  },
8712
8699
  notification: {
8713
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
8700
+ $ref: "definitions.json#/definitions/notification"
8714
8701
  },
8715
8702
  driver: {
8716
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
8703
+ $ref: "definitions.json#/definitions/driver"
8717
8704
  },
8718
8705
  state: {
8719
8706
  type: ["string", "null"],
8720
8707
  enum: ["locked", "unlocked", null]
8721
8708
  },
8722
8709
  batteryLevel: {
8723
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/batteryLevel"
8710
+ $ref: "definitions.json#/definitions/batteryLevel"
8724
8711
  },
8725
8712
  systemData: {
8726
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
8713
+ $ref: "definitions.json#/definitions/systemData"
8727
8714
  },
8728
8715
  watts: {
8729
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
8716
+ $ref: "definitions.json#/definitions/watts"
8730
8717
  }
8731
8718
  },
8732
8719
  additionalProperties: false,
@@ -8735,12 +8722,12 @@ var require_lock = __commonJS({
8735
8722
  }
8736
8723
  });
8737
8724
 
8738
- // src/Models/lock.js
8739
- var require_lock2 = __commonJS({
8740
- "src/Models/lock.js"(exports, module) {
8725
+ // src/Models/Lock.js
8726
+ var require_Lock = __commonJS({
8727
+ "src/Models/Lock.js"(exports, module) {
8741
8728
  var schemas = require_schema();
8742
8729
  var schema = require_lock();
8743
- var Kohost = require_kohost();
8730
+ var Kohost = require_Kohost();
8744
8731
  schemas.add(schema);
8745
8732
  var validator = schemas.compile(schema);
8746
8733
  var Lock = class extends Kohost {
@@ -8774,32 +8761,32 @@ var require_thermostat = __commonJS({
8774
8761
  "src/schemas/thermostat.json"(exports, module) {
8775
8762
  module.exports = {
8776
8763
  $schema: "http://json-schema.org/draft-07/schema",
8777
- $id: "https://api.kohost.io/schemas/v3/thermostat.json",
8764
+ $id: "thermostat.json",
8778
8765
  title: "Thermostat",
8779
8766
  description: "Any smart thermostat",
8780
8767
  type: "object",
8781
8768
  properties: {
8782
8769
  id: {
8783
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
8770
+ $ref: "definitions.json#/definitions/id"
8784
8771
  },
8785
8772
  name: {
8786
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/name"
8773
+ $ref: "definitions.json#/definitions/name"
8787
8774
  },
8788
8775
  type: {
8789
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type",
8776
+ $ref: "definitions.json#/definitions/type",
8790
8777
  default: "thermostat"
8791
8778
  },
8792
8779
  driver: {
8793
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
8780
+ $ref: "definitions.json#/definitions/driver"
8794
8781
  },
8795
8782
  offline: {
8796
8783
  type: "boolean"
8797
8784
  },
8798
8785
  supportedNotifications: {
8799
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
8786
+ $ref: "definitions.json#/definitions/supportedNotifications"
8800
8787
  },
8801
8788
  notification: {
8802
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
8789
+ $ref: "definitions.json#/definitions/notification"
8803
8790
  },
8804
8791
  currentTemperature: {
8805
8792
  type: "number"
@@ -8872,14 +8859,14 @@ var require_thermostat = __commonJS({
8872
8859
  type: "number"
8873
8860
  },
8874
8861
  batteryLevel: {
8875
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/batteryLevel"
8862
+ $ref: "definitions.json#/definitions/batteryLevel"
8876
8863
  },
8877
8864
  systemData: {
8878
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData",
8865
+ $ref: "definitions.json#/definitions/systemData",
8879
8866
  default: {}
8880
8867
  },
8881
8868
  watts: {
8882
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
8869
+ $ref: "definitions.json#/definitions/watts"
8883
8870
  }
8884
8871
  },
8885
8872
  additionalProperties: false,
@@ -8928,12 +8915,12 @@ var require_thermostat = __commonJS({
8928
8915
  }
8929
8916
  });
8930
8917
 
8931
- // src/Models/thermostat.js
8932
- var require_thermostat2 = __commonJS({
8933
- "src/Models/thermostat.js"(exports, module) {
8918
+ // src/Models/Thermostat.js
8919
+ var require_Thermostat = __commonJS({
8920
+ "src/Models/Thermostat.js"(exports, module) {
8934
8921
  var schemas = require_schema();
8935
8922
  var schema = require_thermostat();
8936
- var Kohost = require_kohost();
8923
+ var Kohost = require_Kohost();
8937
8924
  schemas.add(schema);
8938
8925
  var validator = schemas.compile(schema);
8939
8926
  var Thermostat = class extends Kohost {
@@ -9008,31 +8995,31 @@ var require_windowCovering = __commonJS({
9008
8995
  "src/schemas/windowCovering.json"(exports, module) {
9009
8996
  module.exports = {
9010
8997
  $schema: "http://json-schema.org/draft-07/schema",
9011
- $id: "https://api.kohost.io/schemas/v3/windowCovering.json",
8998
+ $id: "windowCovering.json",
9012
8999
  title: "Window Covering",
9013
9000
  description: "Any smart window covering",
9014
9001
  type: "object",
9015
9002
  properties: {
9016
9003
  id: {
9017
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
9004
+ $ref: "definitions.json#/definitions/id"
9018
9005
  },
9019
9006
  name: {
9020
9007
  type: "string"
9021
9008
  },
9022
9009
  type: {
9023
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
9010
+ $ref: "definitions.json#/definitions/type"
9024
9011
  },
9025
9012
  subType: {
9026
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/subType"
9013
+ $ref: "definitions.json#/definitions/subType"
9027
9014
  },
9028
9015
  supportedNotifications: {
9029
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
9016
+ $ref: "definitions.json#/definitions/supportedNotifications"
9030
9017
  },
9031
9018
  notification: {
9032
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
9019
+ $ref: "definitions.json#/definitions/notification"
9033
9020
  },
9034
9021
  driver: {
9035
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
9022
+ $ref: "definitions.json#/definitions/driver"
9036
9023
  },
9037
9024
  position: {
9038
9025
  type: "number",
@@ -9040,10 +9027,10 @@ var require_windowCovering = __commonJS({
9040
9027
  maximum: 100
9041
9028
  },
9042
9029
  systemData: {
9043
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
9030
+ $ref: "definitions.json#/definitions/systemData"
9044
9031
  },
9045
9032
  watts: {
9046
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
9033
+ $ref: "definitions.json#/definitions/watts"
9047
9034
  }
9048
9035
  },
9049
9036
  additionalProperties: false,
@@ -9052,12 +9039,12 @@ var require_windowCovering = __commonJS({
9052
9039
  }
9053
9040
  });
9054
9041
 
9055
- // src/Models/windowCovering.js
9056
- var require_windowCovering2 = __commonJS({
9057
- "src/Models/windowCovering.js"(exports, module) {
9042
+ // src/Models/WindowCovering.js
9043
+ var require_WindowCovering = __commonJS({
9044
+ "src/Models/WindowCovering.js"(exports, module) {
9058
9045
  var schemas = require_schema();
9059
9046
  var schema = require_windowCovering();
9060
- var Kohost = require_kohost();
9047
+ var Kohost = require_Kohost();
9061
9048
  schemas.add(schema);
9062
9049
  var validator = schemas.compile(schema);
9063
9050
  var WindowCovering = class extends Kohost {
@@ -9106,7 +9093,7 @@ var require_identification = __commonJS({
9106
9093
  "src/schemas/identification.json"(exports, module) {
9107
9094
  module.exports = {
9108
9095
  $schema: "http://json-schema.org/draft-07/schema",
9109
- $id: "https://api.kohost.io/schemas/v3/identification.json",
9096
+ $id: "identification.json",
9110
9097
  title: "Identification",
9111
9098
  type: "object",
9112
9099
  required: ["type"],
@@ -9120,7 +9107,7 @@ var require_identification = __commonJS({
9120
9107
  ],
9121
9108
  properties: {
9122
9109
  id: {
9123
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
9110
+ $ref: "definitions.json#/definitions/id"
9124
9111
  },
9125
9112
  type: {
9126
9113
  type: "string",
@@ -9161,19 +9148,19 @@ var require_identification = __commonJS({
9161
9148
  maxLength: 2
9162
9149
  },
9163
9150
  systemData: {
9164
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
9151
+ $ref: "definitions.json#/definitions/systemData"
9165
9152
  }
9166
9153
  }
9167
9154
  };
9168
9155
  }
9169
9156
  });
9170
9157
 
9171
- // src/Models/identification.js
9172
- var require_identification2 = __commonJS({
9173
- "src/Models/identification.js"(exports, module) {
9158
+ // src/Models/Identification.js
9159
+ var require_Identification = __commonJS({
9160
+ "src/Models/Identification.js"(exports, module) {
9174
9161
  var schemas = require_schema();
9175
9162
  var schema = require_identification();
9176
- var Kohost = require_kohost();
9163
+ var Kohost = require_Kohost();
9177
9164
  schemas.add(schema);
9178
9165
  var validator = schemas.compile(schema);
9179
9166
  var Identification = class extends Kohost {
@@ -9207,13 +9194,13 @@ var require_user = __commonJS({
9207
9194
  "src/schemas/user.json"(exports, module) {
9208
9195
  module.exports = {
9209
9196
  $schema: "http://json-schema.org/draft-07/schema",
9210
- $id: "https://api.kohost.io/schemas/v3/user.json",
9197
+ $id: "user.json",
9211
9198
  title: "User",
9212
9199
  type: "object",
9213
9200
  required: ["firstName", "lastName"],
9214
9201
  properties: {
9215
9202
  id: {
9216
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
9203
+ $ref: "definitions.json#/definitions/id"
9217
9204
  },
9218
9205
  type: {
9219
9206
  type: "string",
@@ -9240,13 +9227,13 @@ var require_user = __commonJS({
9240
9227
  type: "boolean"
9241
9228
  },
9242
9229
  address: {
9243
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/address"
9230
+ $ref: "definitions.json#/definitions/address"
9244
9231
  },
9245
9232
  secretKey: {
9246
9233
  type: "string"
9247
9234
  },
9248
9235
  photo: {
9249
- $ref: "https://api.kohost.io/schemas/v3/mediaFile.json#"
9236
+ $ref: "mediaFile.json#"
9250
9237
  },
9251
9238
  jobTitle: {
9252
9239
  type: "string"
@@ -9300,19 +9287,19 @@ var require_user = __commonJS({
9300
9287
  files: {
9301
9288
  type: "array",
9302
9289
  items: {
9303
- $ref: "https://api.kohost.io/schemas/v3/mediaFile.json#"
9290
+ $ref: "mediaFile.json#"
9304
9291
  }
9305
9292
  },
9306
9293
  identifications: {
9307
9294
  type: "array",
9308
9295
  items: {
9309
- $ref: "https://api.kohost.io/schemas/v3/identification.json#"
9296
+ $ref: "identification.json#"
9310
9297
  }
9311
9298
  },
9312
9299
  payments: {
9313
9300
  type: "array",
9314
9301
  items: {
9315
- $ref: "https://api.kohost.io/schemas/v3/payment.json#"
9302
+ $ref: "payment.json#"
9316
9303
  }
9317
9304
  },
9318
9305
  location: {
@@ -9337,22 +9324,22 @@ var require_user = __commonJS({
9337
9324
  reservations: {
9338
9325
  type: "array",
9339
9326
  items: {
9340
- $ref: "https://api.kohost.io/schemas/v3/reservation.json"
9327
+ $ref: "reservation.json"
9341
9328
  }
9342
9329
  },
9343
9330
  spaceName: {
9344
9331
  type: "string"
9345
9332
  },
9346
9333
  createdAt: {
9347
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/createdAt"
9334
+ $ref: "definitions.json#/definitions/createdAt"
9348
9335
  },
9349
9336
  updatedAt: {
9350
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/updatedAt"
9337
+ $ref: "definitions.json#/definitions/updatedAt"
9351
9338
  },
9352
9339
  systemData: {
9353
9340
  type: "array",
9354
9341
  items: {
9355
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
9342
+ $ref: "definitions.json#/definitions/systemData"
9356
9343
  }
9357
9344
  }
9358
9345
  }
@@ -9365,13 +9352,13 @@ var require_payment = __commonJS({
9365
9352
  "src/schemas/payment.json"(exports, module) {
9366
9353
  module.exports = {
9367
9354
  $schema: "http://json-schema.org/draft-07/schema",
9368
- $id: "https://api.kohost.io/schemas/v3/payment.json",
9355
+ $id: "payment.json",
9369
9356
  title: "Payment",
9370
9357
  type: "object",
9371
9358
  required: ["type", "maskedNumber", "expires"],
9372
9359
  properties: {
9373
9360
  id: {
9374
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
9361
+ $ref: "definitions.json#/definitions/id"
9375
9362
  },
9376
9363
  type: {
9377
9364
  type: "string",
@@ -9406,7 +9393,7 @@ var require_payment = __commonJS({
9406
9393
  string: "string"
9407
9394
  },
9408
9395
  systemData: {
9409
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
9396
+ $ref: "definitions.json#/definitions/systemData"
9410
9397
  }
9411
9398
  }
9412
9399
  };
@@ -9460,15 +9447,15 @@ var init_index_browser2 = __esm({
9460
9447
  }
9461
9448
  });
9462
9449
 
9463
- // src/Models/user.js
9464
- var require_user2 = __commonJS({
9465
- "src/Models/user.js"(exports, module) {
9450
+ // src/Models/User.js
9451
+ var require_User = __commonJS({
9452
+ "src/Models/User.js"(exports, module) {
9466
9453
  var schemas = require_schema();
9467
9454
  var schema = require_user();
9468
9455
  var paymentSchema = require_payment();
9469
- var Kohost = require_kohost();
9470
- var MediaFile = require_mediaFile2();
9471
- var Reservation = require_reservation2();
9456
+ var Kohost = require_Kohost();
9457
+ var MediaFile = require_MediaFile();
9458
+ var Reservation = require_Reservation();
9472
9459
  var { nanoid: nanoid3 } = (init_index_browser2(), __toCommonJS(index_browser_exports2));
9473
9460
  schemas.add(paymentSchema);
9474
9461
  schemas.add(schema);
@@ -9532,21 +9519,21 @@ var require_systemUser = __commonJS({
9532
9519
  "src/schemas/systemUser.json"(exports, module) {
9533
9520
  module.exports = {
9534
9521
  $schema: "http://json-schema.org/draft-07/schema",
9535
- $id: "https://api.kohost.io/schemas/v3/systemUser.json",
9522
+ $id: "systemUser.json",
9536
9523
  title: "System User",
9537
9524
  description: "A system user is a user that originated from an external 3rd party system.",
9538
9525
  type: "object",
9539
9526
  required: ["firstName", "lastName"],
9540
9527
  properties: {
9541
9528
  id: {
9542
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
9529
+ $ref: "definitions.json#/definitions/id"
9543
9530
  },
9544
9531
  type: {
9545
9532
  type: "string",
9546
9533
  default: "systemUser"
9547
9534
  },
9548
9535
  driver: {
9549
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
9536
+ $ref: "definitions.json#/definitions/driver"
9550
9537
  },
9551
9538
  firstName: {
9552
9539
  type: "string"
@@ -9563,7 +9550,7 @@ var require_systemUser = __commonJS({
9563
9550
  format: "email"
9564
9551
  },
9565
9552
  address: {
9566
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/address"
9553
+ $ref: "definitions.json#/definitions/address"
9567
9554
  },
9568
9555
  photo: {
9569
9556
  type: "string"
@@ -9599,41 +9586,41 @@ var require_systemUser = __commonJS({
9599
9586
  files: {
9600
9587
  type: "array",
9601
9588
  items: {
9602
- $ref: "https://api.kohost.io/schemas/v3/mediaFile.json#"
9589
+ $ref: "mediaFile.json#"
9603
9590
  }
9604
9591
  },
9605
9592
  identifications: {
9606
9593
  type: "array",
9607
9594
  items: {
9608
- $ref: "https://api.kohost.io/schemas/v3/identification.json#"
9595
+ $ref: "identification.json#"
9609
9596
  }
9610
9597
  },
9611
9598
  payments: {
9612
9599
  type: "array",
9613
9600
  items: {
9614
- $ref: "https://api.kohost.io/schemas/v3/payment.json#"
9601
+ $ref: "payment.json#"
9615
9602
  }
9616
9603
  },
9617
9604
  createdAt: {
9618
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/createdAt"
9605
+ $ref: "definitions.json#/definitions/createdAt"
9619
9606
  },
9620
9607
  updatedAt: {
9621
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/updatedAt"
9608
+ $ref: "definitions.json#/definitions/updatedAt"
9622
9609
  },
9623
9610
  systemData: {
9624
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
9611
+ $ref: "definitions.json#/definitions/systemData"
9625
9612
  }
9626
9613
  }
9627
9614
  };
9628
9615
  }
9629
9616
  });
9630
9617
 
9631
- // src/Models/systemUser.js
9632
- var require_systemUser2 = __commonJS({
9633
- "src/Models/systemUser.js"(exports, module) {
9618
+ // src/Models/SystemUser.js
9619
+ var require_SystemUser = __commonJS({
9620
+ "src/Models/SystemUser.js"(exports, module) {
9634
9621
  var schemas = require_schema();
9635
9622
  var schema = require_systemUser();
9636
- var Kohost = require_kohost();
9623
+ var Kohost = require_Kohost();
9637
9624
  schemas.add(schema);
9638
9625
  var validator = schemas.compile(schema);
9639
9626
  var SystemUser = class extends Kohost {
@@ -9677,28 +9664,28 @@ var require_courtesy = __commonJS({
9677
9664
  "src/schemas/courtesy.json"(exports, module) {
9678
9665
  module.exports = {
9679
9666
  $schema: "http://json-schema.org/draft-07/schema",
9680
- $id: "https://api.kohost.io/schemas/v3/courtesy.json",
9667
+ $id: "courtesy.json",
9681
9668
  title: "Courtesy",
9682
9669
  description: "Any smart courtesy system",
9683
9670
  type: "object",
9684
9671
  properties: {
9685
9672
  id: {
9686
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
9673
+ $ref: "definitions.json#/definitions/id"
9687
9674
  },
9688
9675
  name: {
9689
9676
  type: "string"
9690
9677
  },
9691
9678
  type: {
9692
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
9679
+ $ref: "definitions.json#/definitions/type"
9693
9680
  },
9694
9681
  supportedNotifications: {
9695
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
9682
+ $ref: "definitions.json#/definitions/supportedNotifications"
9696
9683
  },
9697
9684
  notification: {
9698
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
9685
+ $ref: "definitions.json#/definitions/notification"
9699
9686
  },
9700
9687
  driver: {
9701
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
9688
+ $ref: "definitions.json#/definitions/driver"
9702
9689
  },
9703
9690
  supportedStates: {
9704
9691
  type: "array",
@@ -9712,10 +9699,10 @@ var require_courtesy = __commonJS({
9712
9699
  $ref: "#/properties/supportedStates/items"
9713
9700
  },
9714
9701
  systemData: {
9715
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
9702
+ $ref: "definitions.json#/definitions/systemData"
9716
9703
  },
9717
9704
  watts: {
9718
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
9705
+ $ref: "definitions.json#/definitions/watts"
9719
9706
  }
9720
9707
  },
9721
9708
  additionalProperties: false,
@@ -9724,12 +9711,12 @@ var require_courtesy = __commonJS({
9724
9711
  }
9725
9712
  });
9726
9713
 
9727
- // src/Models/courtesy.js
9728
- var require_courtesy2 = __commonJS({
9729
- "src/Models/courtesy.js"(exports, module) {
9714
+ // src/Models/Courtesy.js
9715
+ var require_Courtesy = __commonJS({
9716
+ "src/Models/Courtesy.js"(exports, module) {
9730
9717
  var schemas = require_schema();
9731
9718
  var schema = require_courtesy();
9732
- var Kohost = require_kohost();
9719
+ var Kohost = require_Kohost();
9733
9720
  schemas.add(schema);
9734
9721
  var validator = schemas.compile(schema);
9735
9722
  var Courtesy = class extends Kohost {
@@ -9763,28 +9750,28 @@ var require_camera = __commonJS({
9763
9750
  "src/schemas/camera.json"(exports, module) {
9764
9751
  module.exports = {
9765
9752
  $schema: "http://json-schema.org/draft-07/schema",
9766
- $id: "https://api.kohost.io/schemas/v3/camera.json",
9753
+ $id: "camera.json",
9767
9754
  title: "Camera",
9768
9755
  description: "Any smart camera",
9769
9756
  type: "object",
9770
9757
  properties: {
9771
9758
  id: {
9772
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
9759
+ $ref: "definitions.json#/definitions/id"
9773
9760
  },
9774
9761
  name: {
9775
9762
  type: "string"
9776
9763
  },
9777
9764
  type: {
9778
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
9765
+ $ref: "definitions.json#/definitions/type"
9779
9766
  },
9780
9767
  supportedNotifications: {
9781
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
9768
+ $ref: "definitions.json#/definitions/supportedNotifications"
9782
9769
  },
9783
9770
  notification: {
9784
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
9771
+ $ref: "definitions.json#/definitions/notification"
9785
9772
  },
9786
9773
  driver: {
9787
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
9774
+ $ref: "definitions.json#/definitions/driver"
9788
9775
  },
9789
9776
  liveStreams: {
9790
9777
  type: "object",
@@ -9802,10 +9789,10 @@ var require_camera = __commonJS({
9802
9789
  }
9803
9790
  },
9804
9791
  systemData: {
9805
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
9792
+ $ref: "definitions.json#/definitions/systemData"
9806
9793
  },
9807
9794
  watts: {
9808
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
9795
+ $ref: "definitions.json#/definitions/watts"
9809
9796
  }
9810
9797
  },
9811
9798
  additionalProperties: false,
@@ -9814,12 +9801,12 @@ var require_camera = __commonJS({
9814
9801
  }
9815
9802
  });
9816
9803
 
9817
- // src/Models/camera.js
9818
- var require_camera2 = __commonJS({
9819
- "src/Models/camera.js"(exports, module) {
9804
+ // src/Models/Camera.js
9805
+ var require_Camera = __commonJS({
9806
+ "src/Models/Camera.js"(exports, module) {
9820
9807
  var schemas = require_schema();
9821
9808
  var schema = require_camera();
9822
- var Kohost = require_kohost();
9809
+ var Kohost = require_Kohost();
9823
9810
  schemas.add(schema);
9824
9811
  var validator = schemas.compile(schema);
9825
9812
  var Camera = class extends Kohost {
@@ -9850,31 +9837,31 @@ var require_motionSensor = __commonJS({
9850
9837
  "src/schemas/motionSensor.json"(exports, module) {
9851
9838
  module.exports = {
9852
9839
  $schema: "http://json-schema.org/draft-07/schema",
9853
- $id: "https://api.kohost.io/schemas/v3/motionSensor.json",
9840
+ $id: "motionSensor.json",
9854
9841
  title: "Motion Sensor",
9855
9842
  description: "Any smart motion sensor",
9856
9843
  type: "object",
9857
9844
  properties: {
9858
9845
  id: {
9859
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
9846
+ $ref: "definitions.json#/definitions/id"
9860
9847
  },
9861
9848
  type: {
9862
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
9849
+ $ref: "definitions.json#/definitions/type"
9863
9850
  },
9864
9851
  driver: {
9865
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
9852
+ $ref: "definitions.json#/definitions/driver"
9866
9853
  },
9867
9854
  systemData: {
9868
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
9855
+ $ref: "definitions.json#/definitions/systemData"
9869
9856
  },
9870
9857
  supportedNotifications: {
9871
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
9858
+ $ref: "definitions.json#/definitions/supportedNotifications"
9872
9859
  },
9873
9860
  notification: {
9874
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
9861
+ $ref: "definitions.json#/definitions/notification"
9875
9862
  },
9876
9863
  watts: {
9877
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
9864
+ $ref: "definitions.json#/definitions/watts"
9878
9865
  }
9879
9866
  },
9880
9867
  additionalProperties: false,
@@ -9883,12 +9870,12 @@ var require_motionSensor = __commonJS({
9883
9870
  }
9884
9871
  });
9885
9872
 
9886
- // src/Models/motionSensor.js
9887
- var require_motionSensor2 = __commonJS({
9888
- "src/Models/motionSensor.js"(exports, module) {
9873
+ // src/Models/MotionSensor.js
9874
+ var require_MotionSensor = __commonJS({
9875
+ "src/Models/MotionSensor.js"(exports, module) {
9889
9876
  var schemas = require_schema();
9890
9877
  var schema = require_motionSensor();
9891
- var Kohost = require_kohost();
9878
+ var Kohost = require_Kohost();
9892
9879
  schemas.add(schema);
9893
9880
  var validator = schemas.compile(schema);
9894
9881
  var MotionSensor = class extends Kohost {
@@ -9919,14 +9906,14 @@ var require_mediaSource = __commonJS({
9919
9906
  "src/schemas/mediaSource.json"(exports, module) {
9920
9907
  module.exports = {
9921
9908
  $schema: "http://json-schema.org/draft-07/schema",
9922
- $id: "https://api.kohost.io/schemas/v3/mediaSource.json",
9909
+ $id: "mediaSource.json",
9923
9910
  title: "Media Source",
9924
9911
  description: "Any media source",
9925
9912
  type: "object",
9926
9913
  required: ["id", "type", "systemData", "audio", "video", "driver"],
9927
9914
  properties: {
9928
9915
  id: {
9929
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
9916
+ $ref: "definitions.json#/definitions/id"
9930
9917
  },
9931
9918
  type: {
9932
9919
  type: "string",
@@ -9940,10 +9927,10 @@ var require_mediaSource = __commonJS({
9940
9927
  ]
9941
9928
  },
9942
9929
  name: {
9943
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/name"
9930
+ $ref: "definitions.json#/definitions/name"
9944
9931
  },
9945
9932
  driver: {
9946
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
9933
+ $ref: "definitions.json#/definitions/driver"
9947
9934
  },
9948
9935
  audio: {
9949
9936
  type: "boolean"
@@ -10087,16 +10074,16 @@ var require_mediaSource = __commonJS({
10087
10074
  ]
10088
10075
  },
10089
10076
  supportedNotifications: {
10090
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
10077
+ $ref: "definitions.json#/definitions/supportedNotifications"
10091
10078
  },
10092
10079
  notification: {
10093
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
10080
+ $ref: "definitions.json#/definitions/notification"
10094
10081
  },
10095
10082
  systemData: {
10096
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
10083
+ $ref: "definitions.json#/definitions/systemData"
10097
10084
  },
10098
10085
  watts: {
10099
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
10086
+ $ref: "definitions.json#/definitions/watts"
10100
10087
  }
10101
10088
  },
10102
10089
  additionalProperties: false
@@ -10104,12 +10091,12 @@ var require_mediaSource = __commonJS({
10104
10091
  }
10105
10092
  });
10106
10093
 
10107
- // src/Models/mediaSource.js
10108
- var require_mediaSource2 = __commonJS({
10109
- "src/Models/mediaSource.js"(exports, module) {
10094
+ // src/Models/MediaSource.js
10095
+ var require_MediaSource = __commonJS({
10096
+ "src/Models/MediaSource.js"(exports, module) {
10110
10097
  var schemas = require_schema();
10111
10098
  var schema = require_mediaSource();
10112
- var Kohost = require_kohost();
10099
+ var Kohost = require_Kohost();
10113
10100
  schemas.add(schema);
10114
10101
  var validator = schemas.compile(schema);
10115
10102
  var MediaSource = class extends Kohost {
@@ -10140,13 +10127,13 @@ var require_room = __commonJS({
10140
10127
  "src/schemas/room.json"(exports, module) {
10141
10128
  module.exports = {
10142
10129
  $schema: "http://json-schema.org/draft-07/schema",
10143
- $id: "https://api.kohost.io/schemas/v3/room.json",
10130
+ $id: "room.json",
10144
10131
  title: "Room",
10145
10132
  description: "A room represents a physical space of controllable IoT devices",
10146
10133
  type: "object",
10147
10134
  properties: {
10148
10135
  id: {
10149
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
10136
+ $ref: "definitions.json#/definitions/id"
10150
10137
  },
10151
10138
  name: {
10152
10139
  type: "string"
@@ -10158,80 +10145,80 @@ var require_room = __commonJS({
10158
10145
  type: "array",
10159
10146
  default: [],
10160
10147
  items: {
10161
- $ref: "https://api.kohost.io/schemas/v3/dimmer.json"
10148
+ $ref: "dimmer.json"
10162
10149
  }
10163
10150
  },
10164
10151
  switches: {
10165
10152
  type: "array",
10166
10153
  default: [],
10167
10154
  items: {
10168
- $ref: "https://api.kohost.io/schemas/v3/switch.json"
10155
+ $ref: "switch.json"
10169
10156
  }
10170
10157
  },
10171
10158
  thermostats: {
10172
10159
  type: "array",
10173
10160
  default: [],
10174
10161
  items: {
10175
- $ref: "https://api.kohost.io/schemas/v3/thermostat.json"
10162
+ $ref: "thermostat.json"
10176
10163
  }
10177
10164
  },
10178
10165
  locks: {
10179
10166
  type: "array",
10180
10167
  default: [],
10181
10168
  items: {
10182
- $ref: "https://api.kohost.io/schemas/v3/lock.json"
10169
+ $ref: "lock.json"
10183
10170
  }
10184
10171
  },
10185
10172
  windowCoverings: {
10186
10173
  type: "array",
10187
10174
  default: [],
10188
10175
  items: {
10189
- $ref: "https://api.kohost.io/schemas/v3/windowCovering.json"
10176
+ $ref: "windowCovering.json"
10190
10177
  }
10191
10178
  },
10192
10179
  courtesy: {
10193
10180
  type: "array",
10194
10181
  default: [],
10195
10182
  items: {
10196
- $ref: "https://api.kohost.io/schemas/v3/courtesy.json"
10183
+ $ref: "courtesy.json"
10197
10184
  }
10198
10185
  },
10199
10186
  cameras: {
10200
10187
  type: "array",
10201
10188
  default: [],
10202
10189
  items: {
10203
- $ref: "https://api.kohost.io/schemas/v3/camera.json"
10190
+ $ref: "camera.json"
10204
10191
  }
10205
10192
  },
10206
10193
  mediaSources: {
10207
10194
  type: "array",
10208
10195
  default: [],
10209
10196
  items: {
10210
- $ref: "https://api.kohost.io/schemas/v3/mediaSource.json"
10197
+ $ref: "mediaSource.json"
10211
10198
  }
10212
10199
  },
10213
10200
  motionSensors: {
10214
10201
  type: "array",
10215
10202
  default: [],
10216
10203
  items: {
10217
- $ref: "https://api.kohost.io/schemas/v3/motionSensor.json"
10204
+ $ref: "motionSensor.json"
10218
10205
  }
10219
10206
  },
10220
10207
  alarms: {
10221
10208
  type: "array",
10222
10209
  default: [],
10223
10210
  items: {
10224
- $ref: "https://api.kohost.io/schemas/v3/alarm.json"
10211
+ $ref: "alarm.json"
10225
10212
  }
10226
10213
  },
10227
10214
  occupiedAt: {
10228
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/createdAt"
10215
+ $ref: "definitions.json#/definitions/createdAt"
10229
10216
  },
10230
10217
  createdAt: {
10231
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/createdAt"
10218
+ $ref: "definitions.json#/definitions/createdAt"
10232
10219
  },
10233
10220
  updatedAt: {
10234
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/updatedAt"
10221
+ $ref: "definitions.json#/definitions/updatedAt"
10235
10222
  }
10236
10223
  },
10237
10224
  additionalProperties: false
@@ -10945,13 +10932,13 @@ var require_scene = __commonJS({
10945
10932
  "src/schemas/scene.json"(exports, module) {
10946
10933
  module.exports = {
10947
10934
  $schema: "http://json-schema.org/draft-07/schema",
10948
- $id: "https://api.kohost.io/schemas/v3/scene.json",
10935
+ $id: "scene.json",
10949
10936
  title: "Scene",
10950
10937
  description: "A room represents a physical space of controllable IoT devices",
10951
10938
  type: "object",
10952
10939
  properties: {
10953
10940
  id: {
10954
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
10941
+ $ref: "definitions.json#/definitions/id"
10955
10942
  },
10956
10943
  name: {
10957
10944
  type: "string"
@@ -10965,10 +10952,10 @@ var require_scene = __commonJS({
10965
10952
  type: "object",
10966
10953
  properties: {
10967
10954
  id: {
10968
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
10955
+ $ref: "definitions.json#/definitions/id"
10969
10956
  },
10970
10957
  state: {
10971
- $ref: "https://api.kohost.io/schemas/v3/switch.json#/properties/state"
10958
+ $ref: "switch.json#/properties/state"
10972
10959
  }
10973
10960
  },
10974
10961
  default: []
@@ -10980,10 +10967,10 @@ var require_scene = __commonJS({
10980
10967
  type: "object",
10981
10968
  properties: {
10982
10969
  id: {
10983
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
10970
+ $ref: "definitions.json#/definitions/id"
10984
10971
  },
10985
10972
  level: {
10986
- $ref: "https://api.kohost.io/schemas/v3/dimmer.json#/properties/level"
10973
+ $ref: "dimmer.json#/properties/level"
10987
10974
  }
10988
10975
  }
10989
10976
  },
@@ -10995,10 +10982,10 @@ var require_scene = __commonJS({
10995
10982
  type: "object",
10996
10983
  properties: {
10997
10984
  id: {
10998
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
10985
+ $ref: "definitions.json#/definitions/id"
10999
10986
  },
11000
10987
  position: {
11001
- $ref: "https://api.kohost.io/schemas/v3/windowCovering.json#/properties/position"
10988
+ $ref: "windowCovering.json#/properties/position"
11002
10989
  }
11003
10990
  }
11004
10991
  },
@@ -11010,16 +10997,16 @@ var require_scene = __commonJS({
11010
10997
  type: "object",
11011
10998
  properties: {
11012
10999
  id: {
11013
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
11000
+ $ref: "definitions.json#/definitions/id"
11014
11001
  },
11015
11002
  hvacMode: {
11016
- $ref: "https://api.kohost.io/schemas/v3/thermostat.json#/properties/hvacMode"
11003
+ $ref: "thermostat.json#/properties/hvacMode"
11017
11004
  },
11018
11005
  setpoints: {
11019
- $ref: "https://api.kohost.io/schemas/v3/thermostat.json#/properties/setpoints"
11006
+ $ref: "thermostat.json#/properties/setpoints"
11020
11007
  },
11021
11008
  fanMode: {
11022
- $ref: "https://api.kohost.io/schemas/v3/thermostat.json#/properties/fanMode"
11009
+ $ref: "thermostat.json#/properties/fanMode"
11023
11010
  },
11024
11011
  setpointDelta: {
11025
11012
  type: "number"
@@ -11034,7 +11021,7 @@ var require_scene = __commonJS({
11034
11021
  type: "object",
11035
11022
  properties: {
11036
11023
  id: {
11037
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
11024
+ $ref: "definitions.json#/definitions/id"
11038
11025
  },
11039
11026
  volume: {
11040
11027
  type: "number",
@@ -11126,12 +11113,12 @@ var require_SetSceneCommand = __commonJS({
11126
11113
  }
11127
11114
  });
11128
11115
 
11129
- // src/Models/scene.js
11130
- var require_scene2 = __commonJS({
11131
- "src/Models/scene.js"(exports, module) {
11116
+ // src/Models/Scene.js
11117
+ var require_Scene = __commonJS({
11118
+ "src/Models/Scene.js"(exports, module) {
11132
11119
  var schemas = require_schema();
11133
11120
  var schema = require_scene();
11134
- var Kohost = require_kohost();
11121
+ var Kohost = require_Kohost();
11135
11122
  var SetSceneCommand = require_SetSceneCommand();
11136
11123
  schemas.add(schema);
11137
11124
  var validator = schemas.compile(schema);
@@ -11142,13 +11129,15 @@ var require_scene2 = __commonJS({
11142
11129
  constructor(data) {
11143
11130
  super(data);
11144
11131
  }
11145
- static createSceneCommandPayload(room, scene) {
11132
+ static createSceneCommandPayload(room, scene, restore) {
11146
11133
  const commandsByDriver = [];
11147
11134
  const sceneDevices = scene?.devices || {};
11148
11135
  const sceneId = scene.id;
11149
11136
  for (const deviceType in sceneDevices) {
11150
11137
  const sceneData = sceneDevices[deviceType];
11151
11138
  const roomDevices = room[deviceType];
11139
+ if (sceneId === "1" && restore && deviceType !== "thermostats")
11140
+ continue;
11152
11141
  for (const data of sceneData) {
11153
11142
  const { id, ...deviceProps } = data;
11154
11143
  if (id === "*") {
@@ -11165,10 +11154,16 @@ var require_scene2 = __commonJS({
11165
11154
  const minAutoDelta = device.minAutoDelta;
11166
11155
  const currentSetpoint = setpoints[currentMode];
11167
11156
  if (currentMode === "heat") {
11168
- const setpointValue = Math.min(
11157
+ let setpointValue = Math.min(
11169
11158
  currentSetpoint.min,
11170
11159
  currentSetpoint.value - delta
11171
11160
  );
11161
+ if (restore) {
11162
+ setpointValue = Math.min(
11163
+ currentSetpoint.max,
11164
+ currentSetpoint.value + delta
11165
+ );
11166
+ }
11172
11167
  deviceCmd.setpoints = {
11173
11168
  heat: {
11174
11169
  value: setpointValue
@@ -11176,10 +11171,16 @@ var require_scene2 = __commonJS({
11176
11171
  };
11177
11172
  }
11178
11173
  if (currentMode === "cool") {
11179
- const setpointValue = Math.max(
11174
+ let setpointValue = Math.max(
11180
11175
  currentSetpoint.max,
11181
11176
  currentSetpoint.value + delta
11182
11177
  );
11178
+ if (restore) {
11179
+ setpointValue = Math.max(
11180
+ currentSetpoint.min,
11181
+ currentSetpoint.value - delta
11182
+ );
11183
+ }
11183
11184
  deviceCmd.setpoints = {
11184
11185
  cool: {
11185
11186
  value: setpointValue
@@ -11188,14 +11189,24 @@ var require_scene2 = __commonJS({
11188
11189
  }
11189
11190
  if (currentMode === "auto") {
11190
11191
  if (!currentSetpoint && setpoints.cool && setpoints.heat) {
11191
- const heatSetpoint = Math.min(
11192
+ let heatSetpoint = Math.min(
11192
11193
  setpoints.heat.min,
11193
11194
  setpoints.heat.value - delta
11194
11195
  );
11195
- const coolSetpoint = Math.max(
11196
+ let coolSetpoint = Math.max(
11196
11197
  setpoints.cool.max,
11197
11198
  setpoints.cool.value + delta
11198
11199
  );
11200
+ if (restore) {
11201
+ heatSetpoint = Math.min(
11202
+ setpoints.heat.max,
11203
+ setpoints.heat.value + delta
11204
+ );
11205
+ coolSetpoint = Math.max(
11206
+ setpoints.cool.min,
11207
+ setpoints.cool.value - delta
11208
+ );
11209
+ }
11199
11210
  if (Math.abs(heatSetpoint - coolSetpoint) < minAutoDelta) {
11200
11211
  continue;
11201
11212
  }
@@ -11262,25 +11273,25 @@ var require_scene2 = __commonJS({
11262
11273
  }
11263
11274
  });
11264
11275
 
11265
- // src/Models/room.js
11266
- var require_room2 = __commonJS({
11267
- "src/Models/room.js"(exports, module) {
11276
+ // src/Models/Room.js
11277
+ var require_Room = __commonJS({
11278
+ "src/Models/Room.js"(exports, module) {
11268
11279
  var schemas = require_schema();
11269
11280
  var schema = require_room();
11270
- var deviceSchema = require_device();
11271
- var Kohost = require_kohost();
11281
+ var deviceSchema = require_definitions();
11282
+ var Kohost = require_Kohost();
11272
11283
  var cloneDeep = require_lodash();
11273
- var Switch = require_switch2();
11274
- var Dimmer = require_dimmer2();
11275
- var Thermostat = require_thermostat2();
11276
- var Lock = require_lock2();
11277
- var WindowCovering = require_windowCovering2();
11278
- var Courtesy = require_courtesy2();
11279
- var Camera = require_camera2();
11280
- var Alarm = require_alarm2();
11281
- var MediaSource = require_mediaSource2();
11282
- var MotionSensor = require_motionSensor2();
11283
- var Scene = require_scene2();
11284
+ var Switch = require_Switch();
11285
+ var Dimmer = require_Dimmer();
11286
+ var Thermostat = require_Thermostat();
11287
+ var Lock = require_Lock();
11288
+ var WindowCovering = require_WindowCovering();
11289
+ var Courtesy = require_Courtesy();
11290
+ var Camera = require_Camera();
11291
+ var Alarm = require_Alarm();
11292
+ var MediaSource = require_MediaSource();
11293
+ var MotionSensor = require_MotionSensor();
11294
+ var Scene = require_Scene();
11284
11295
  schemas.add(schema);
11285
11296
  var validator = schemas.compile(schema);
11286
11297
  var Room = class extends Kohost {
@@ -11473,12 +11484,12 @@ var require_space = __commonJS({
11473
11484
  "src/schemas/space.json"(exports, module) {
11474
11485
  module.exports = {
11475
11486
  $schema: "http://json-schema.org/draft-07/schema",
11476
- $id: "https://api.kohost.io/schemas/v3/space.json",
11487
+ $id: "space.json",
11477
11488
  title: "Space",
11478
11489
  type: "object",
11479
11490
  properties: {
11480
11491
  id: {
11481
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
11492
+ $ref: "definitions.json#/definitions/id"
11482
11493
  },
11483
11494
  name: {
11484
11495
  type: "string",
@@ -11496,7 +11507,7 @@ var require_space = __commonJS({
11496
11507
  ]
11497
11508
  },
11498
11509
  driver: {
11499
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
11510
+ $ref: "definitions.json#/definitions/driver"
11500
11511
  },
11501
11512
  subType: {
11502
11513
  type: "string"
@@ -11557,7 +11568,7 @@ var require_space = __commonJS({
11557
11568
  enum: ["inService", "outOfOrder", "outOfService"]
11558
11569
  },
11559
11570
  systemData: {
11560
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
11571
+ $ref: "definitions.json#/definitions/systemData"
11561
11572
  }
11562
11573
  },
11563
11574
  if: {
@@ -11594,22 +11605,27 @@ var require_space = __commonJS({
11594
11605
  }
11595
11606
  });
11596
11607
 
11597
- // src/Models/space.js
11598
- var require_space2 = __commonJS({
11599
- "src/Models/space.js"(exports, module) {
11608
+ // src/Models/Space.js
11609
+ var require_Space = __commonJS({
11610
+ "src/Models/Space.js"(exports, module) {
11600
11611
  var schemas = require_schema();
11601
11612
  var schema = require_space();
11602
- var Kohost = require_kohost();
11603
- var cloneDeep = require_lodash();
11604
- var Room = require_room2();
11613
+ var Kohost = require_Kohost();
11614
+ var Room = require_Room();
11605
11615
  schemas.add(schema);
11606
11616
  var validator = schemas.compile(schema);
11607
11617
  var Space = class extends Kohost {
11608
11618
  static {
11609
11619
  __name(this, "Space");
11610
11620
  }
11611
- constructor(data) {
11612
- const spaceData = mapSpaceData(data);
11621
+ /**
11622
+ * @typedef {import("../schemas/SpaceSchema").Space} SpaceSchema
11623
+ * Create a Dimmer instance.
11624
+ * @constructor
11625
+ * @param {SpaceSchema} space - The dimmer object of type Dimmer.
11626
+ */
11627
+ constructor(space) {
11628
+ const spaceData = mapSpaceData(space);
11613
11629
  super(spaceData);
11614
11630
  }
11615
11631
  get floor() {
@@ -11660,7 +11676,7 @@ var require_space2 = __commonJS({
11660
11676
  value: Object.keys(schema.properties)
11661
11677
  });
11662
11678
  function mapSpaceData(data) {
11663
- const spaceData = cloneDeep(data);
11679
+ const spaceData = structuredClone(data);
11664
11680
  if (spaceData.rooms?.length) {
11665
11681
  spaceData.rooms.map((room) => {
11666
11682
  if (typeof room === "string")
@@ -11682,12 +11698,12 @@ var require_spaceType = __commonJS({
11682
11698
  "src/schemas/spaceType.json"(exports, module) {
11683
11699
  module.exports = {
11684
11700
  $schema: "http://json-schema.org/draft-07/schema",
11685
- $id: "https://api.kohost.io/schemas/v3/spaceType.json",
11701
+ $id: "spaceType.json",
11686
11702
  title: "Space Type",
11687
11703
  type: "object",
11688
11704
  properties: {
11689
11705
  id: {
11690
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
11706
+ $ref: "definitions.json#/definitions/id"
11691
11707
  },
11692
11708
  type: {
11693
11709
  type: "string"
@@ -11697,28 +11713,28 @@ var require_spaceType = __commonJS({
11697
11713
  minLength: 1
11698
11714
  },
11699
11715
  driver: {
11700
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
11716
+ $ref: "definitions.json#/definitions/driver"
11701
11717
  },
11702
11718
  description: {
11703
11719
  type: "string"
11704
11720
  },
11705
11721
  image: {
11706
- $ref: "https://api.kohost.io/schemas/v3/mediaFile.json"
11722
+ $ref: "mediaFile.json"
11707
11723
  },
11708
11724
  systemData: {
11709
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
11725
+ $ref: "definitions.json#/definitions/systemData"
11710
11726
  }
11711
11727
  }
11712
11728
  };
11713
11729
  }
11714
11730
  });
11715
11731
 
11716
- // src/Models/spaceType.js
11717
- var require_spaceType2 = __commonJS({
11718
- "src/Models/spaceType.js"(exports, module) {
11732
+ // src/Models/SpaceType.js
11733
+ var require_SpaceType = __commonJS({
11734
+ "src/Models/SpaceType.js"(exports, module) {
11719
11735
  var schemas = require_schema();
11720
11736
  var schema = require_spaceType();
11721
- var Kohost = require_kohost();
11737
+ var Kohost = require_Kohost();
11722
11738
  schemas.add(schema);
11723
11739
  var validator = schemas.compile(schema);
11724
11740
  var SpaceType = class extends Kohost {
@@ -11749,13 +11765,13 @@ var require_ticket = __commonJS({
11749
11765
  "src/schemas/ticket.json"(exports, module) {
11750
11766
  module.exports = {
11751
11767
  $schema: "http://json-schema.org/draft-07/schema",
11752
- $id: "https://api.kohost.io/schemas/v3/ticket.json",
11768
+ $id: "ticket.json",
11753
11769
  title: "Ticket",
11754
11770
  description: "A ticket is a request for help from a user.",
11755
11771
  type: "object",
11756
11772
  properties: {
11757
11773
  id: {
11758
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
11774
+ $ref: "definitions.json#/definitions/id"
11759
11775
  },
11760
11776
  conversation: {
11761
11777
  type: "array",
@@ -11774,7 +11790,7 @@ var require_ticket = __commonJS({
11774
11790
  type: "string"
11775
11791
  },
11776
11792
  timestamp: {
11777
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/createdAt"
11793
+ $ref: "definitions.json#/definitions/createdAt"
11778
11794
  },
11779
11795
  body: {
11780
11796
  type: "string"
@@ -11787,7 +11803,7 @@ var require_ticket = __commonJS({
11787
11803
  }
11788
11804
  },
11789
11805
  media: {
11790
- $ref: "https://api.kohost.io/schemas/v3/mediaFile.json"
11806
+ $ref: "mediaFile.json"
11791
11807
  }
11792
11808
  },
11793
11809
  required: ["userId", "id", "timestamp", "body"]
@@ -11820,16 +11836,16 @@ var require_ticket = __commonJS({
11820
11836
  type: "string"
11821
11837
  },
11822
11838
  createdAt: {
11823
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
11839
+ $ref: "definitions.json#/definitions/date"
11824
11840
  },
11825
11841
  updatedAt: {
11826
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
11842
+ $ref: "definitions.json#/definitions/date"
11827
11843
  },
11828
11844
  solvedAt: {
11829
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
11845
+ $ref: "definitions.json#/definitions/date"
11830
11846
  },
11831
11847
  closedAt: {
11832
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
11848
+ $ref: "definitions.json#/definitions/date"
11833
11849
  }
11834
11850
  },
11835
11851
  required: [
@@ -13910,13 +13926,13 @@ var require_lodash3 = __commonJS({
13910
13926
  }
13911
13927
  });
13912
13928
 
13913
- // src/Models/ticket.js
13914
- var require_ticket2 = __commonJS({
13915
- "src/Models/ticket.js"(exports, module) {
13929
+ // src/Models/Ticket.js
13930
+ var require_Ticket = __commonJS({
13931
+ "src/Models/Ticket.js"(exports, module) {
13916
13932
  var schemas = require_schema();
13917
13933
  var schema = require_ticket();
13918
- var Kohost = require_kohost();
13919
- var MediaFile = require_mediaFile2();
13934
+ var Kohost = require_Kohost();
13935
+ var MediaFile = require_MediaFile();
13920
13936
  var sortBy = require_lodash2();
13921
13937
  var findLast = require_lodash3();
13922
13938
  var { nanoid: nanoid3 } = (init_index_browser(), __toCommonJS(index_browser_exports));
@@ -14011,34 +14027,34 @@ var require_gateway = __commonJS({
14011
14027
  "src/schemas/gateway.json"(exports, module) {
14012
14028
  module.exports = {
14013
14029
  $schema: "http://json-schema.org/draft-07/schema",
14014
- $id: "https://api.kohost.io/schemas/v3/iotGateway.json",
14030
+ $id: "iotGateway.json",
14015
14031
  title: "IoT Gateway",
14016
14032
  description: "Any smart gateway that is an entrypoint for controlling devices",
14017
14033
  type: "object",
14018
14034
  properties: {
14019
14035
  id: {
14020
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/id"
14036
+ $ref: "definitions.json#/definitions/id"
14021
14037
  },
14022
14038
  type: {
14023
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
14039
+ $ref: "definitions.json#/definitions/type"
14024
14040
  },
14025
14041
  supportedNotifications: {
14026
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
14042
+ $ref: "definitions.json#/definitions/supportedNotifications"
14027
14043
  },
14028
14044
  notification: {
14029
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/notification"
14045
+ $ref: "definitions.json#/definitions/notification"
14030
14046
  },
14031
14047
  status: {
14032
14048
  type: "string"
14033
14049
  },
14034
14050
  systemData: {
14035
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
14051
+ $ref: "definitions.json#/definitions/systemData"
14036
14052
  },
14037
14053
  driver: {
14038
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
14054
+ $ref: "definitions.json#/definitions/driver"
14039
14055
  },
14040
14056
  watts: {
14041
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
14057
+ $ref: "definitions.json#/definitions/watts"
14042
14058
  }
14043
14059
  },
14044
14060
  additionalProperties: false,
@@ -14047,12 +14063,12 @@ var require_gateway = __commonJS({
14047
14063
  }
14048
14064
  });
14049
14065
 
14050
- // src/Models/gateway.js
14051
- var require_gateway2 = __commonJS({
14052
- "src/Models/gateway.js"(exports, module) {
14066
+ // src/Models/Gateway.js
14067
+ var require_Gateway = __commonJS({
14068
+ "src/Models/Gateway.js"(exports, module) {
14053
14069
  var schemas = require_schema();
14054
14070
  var schema = require_gateway();
14055
- var Kohost = require_kohost();
14071
+ var Kohost = require_Kohost();
14056
14072
  schemas.add(schema);
14057
14073
  var validator = schemas.compile(schema);
14058
14074
  var Gateway = class extends Kohost {
@@ -14083,13 +14099,13 @@ var require_product = __commonJS({
14083
14099
  "src/schemas/product.json"(exports, module) {
14084
14100
  module.exports = {
14085
14101
  $schema: "http://json-schema.org/draft-07/schema",
14086
- $id: "https://api.kohost.io/schemas/v3/product.json",
14102
+ $id: "product.json",
14087
14103
  title: "Product",
14088
14104
  type: "object",
14089
14105
  required: ["name", "price", "driver"],
14090
14106
  properties: {
14091
14107
  id: {
14092
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14108
+ $ref: "definitions.json#/definitions/id"
14093
14109
  },
14094
14110
  type: {
14095
14111
  type: "string"
@@ -14098,7 +14114,7 @@ var require_product = __commonJS({
14098
14114
  type: "string"
14099
14115
  },
14100
14116
  driver: {
14101
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
14117
+ $ref: "definitions.json#/definitions/driver"
14102
14118
  },
14103
14119
  description: {
14104
14120
  string: "string"
@@ -14107,7 +14123,7 @@ var require_product = __commonJS({
14107
14123
  type: "number"
14108
14124
  },
14109
14125
  image: {
14110
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/file"
14126
+ $ref: "definitions.json#/definitions/file"
14111
14127
  },
14112
14128
  category: {
14113
14129
  type: "string"
@@ -14117,19 +14133,19 @@ var require_product = __commonJS({
14117
14133
  pattern: "^https?://"
14118
14134
  },
14119
14135
  systemData: {
14120
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
14136
+ $ref: "definitions.json#/definitions/systemData"
14121
14137
  }
14122
14138
  }
14123
14139
  };
14124
14140
  }
14125
14141
  });
14126
14142
 
14127
- // src/Models/product.js
14128
- var require_product2 = __commonJS({
14129
- "src/Models/product.js"(exports, module) {
14143
+ // src/Models/Product.js
14144
+ var require_Product = __commonJS({
14145
+ "src/Models/Product.js"(exports, module) {
14130
14146
  var schemas = require_schema();
14131
14147
  var schema = require_product();
14132
- var Kohost = require_kohost();
14148
+ var Kohost = require_Kohost();
14133
14149
  schemas.add(schema);
14134
14150
  var validator = schemas.compile(schema);
14135
14151
  var Product = class extends Kohost {
@@ -14160,14 +14176,14 @@ var require_discoveredDevice = __commonJS({
14160
14176
  "src/schemas/discoveredDevice.json"(exports, module) {
14161
14177
  module.exports = {
14162
14178
  $schema: "http://json-schema.org/draft-07/schema",
14163
- $id: "https://api.kohost.io/schemas/v3/discoveredDevice.json",
14179
+ $id: "discoveredDevice.json",
14164
14180
  title: "Discovered Device",
14165
14181
  description: "A device that has been discovered by Kohost, but not yet added to the Kohost system.",
14166
14182
  type: "object",
14167
14183
  required: ["name", "deviceId", "deviceData"],
14168
14184
  properties: {
14169
14185
  id: {
14170
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14186
+ $ref: "definitions.json#/definitions/id"
14171
14187
  },
14172
14188
  name: {
14173
14189
  type: "string"
@@ -14176,7 +14192,7 @@ var require_discoveredDevice = __commonJS({
14176
14192
  type: "string"
14177
14193
  },
14178
14194
  type: {
14179
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
14195
+ $ref: "definitions.json#/definitions/type"
14180
14196
  },
14181
14197
  driver: {
14182
14198
  type: "string"
@@ -14192,12 +14208,12 @@ var require_discoveredDevice = __commonJS({
14192
14208
  }
14193
14209
  });
14194
14210
 
14195
- // src/Models/discoveredDevice.js
14196
- var require_discoveredDevice2 = __commonJS({
14197
- "src/Models/discoveredDevice.js"(exports, module) {
14211
+ // src/Models/DiscoveredDevice.js
14212
+ var require_DiscoveredDevice = __commonJS({
14213
+ "src/Models/DiscoveredDevice.js"(exports, module) {
14198
14214
  var schemas = require_schema();
14199
14215
  var schema = require_discoveredDevice();
14200
- var Kohost = require_kohost();
14216
+ var Kohost = require_Kohost();
14201
14217
  schemas.add(schema);
14202
14218
  var validator = schemas.compile(schema);
14203
14219
  var DiscoveredDevice = class extends Kohost {
@@ -14228,13 +14244,13 @@ var require_credential = __commonJS({
14228
14244
  "src/schemas/credential.json"(exports, module) {
14229
14245
  module.exports = {
14230
14246
  $schema: "http://json-schema.org/draft-07/schema",
14231
- $id: "https://api.kohost.io/schemas/v3/credential.json",
14247
+ $id: "credential.json",
14232
14248
  title: "Credential",
14233
14249
  type: "object",
14234
14250
  required: ["type", "credential", "expires"],
14235
14251
  properties: {
14236
14252
  id: {
14237
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14253
+ $ref: "definitions.json#/definitions/id"
14238
14254
  },
14239
14255
  type: {
14240
14256
  type: "string",
@@ -14253,19 +14269,19 @@ var require_credential = __commonJS({
14253
14269
  string: "string"
14254
14270
  },
14255
14271
  systemData: {
14256
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
14272
+ $ref: "definitions.json#/definitions/systemData"
14257
14273
  }
14258
14274
  }
14259
14275
  };
14260
14276
  }
14261
14277
  });
14262
14278
 
14263
- // src/Models/credential.js
14264
- var require_credential2 = __commonJS({
14265
- "src/Models/credential.js"(exports, module) {
14279
+ // src/Models/Credential.js
14280
+ var require_Credential = __commonJS({
14281
+ "src/Models/Credential.js"(exports, module) {
14266
14282
  var schemas = require_schema();
14267
14283
  var schema = require_credential();
14268
- var Kohost = require_kohost();
14284
+ var Kohost = require_Kohost();
14269
14285
  schemas.add(schema);
14270
14286
  var validator = schemas.compile(schema);
14271
14287
  var Credential = class extends Kohost {
@@ -14296,13 +14312,13 @@ var require_shortLink = __commonJS({
14296
14312
  "src/schemas/shortLink.json"(exports, module) {
14297
14313
  module.exports = {
14298
14314
  $schema: "http://json-schema.org/draft-07/schema",
14299
- $id: "https://api.kohost.io/schemas/v3/shortLink.json",
14315
+ $id: "shortLink.json",
14300
14316
  title: "Short Link",
14301
14317
  type: "object",
14302
14318
  required: ["destination", "url"],
14303
14319
  properties: {
14304
14320
  id: {
14305
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14321
+ $ref: "definitions.json#/definitions/id"
14306
14322
  },
14307
14323
  type: {
14308
14324
  type: "string",
@@ -14320,19 +14336,19 @@ var require_shortLink = __commonJS({
14320
14336
  format: "uri"
14321
14337
  },
14322
14338
  systemData: {
14323
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
14339
+ $ref: "definitions.json#/definitions/systemData"
14324
14340
  }
14325
14341
  }
14326
14342
  };
14327
14343
  }
14328
14344
  });
14329
14345
 
14330
- // src/Models/shortLink.js
14331
- var require_shortLink2 = __commonJS({
14332
- "src/Models/shortLink.js"(exports, module) {
14346
+ // src/Models/ShortLink.js
14347
+ var require_ShortLink = __commonJS({
14348
+ "src/Models/ShortLink.js"(exports, module) {
14333
14349
  var schemas = require_schema();
14334
14350
  var schema = require_shortLink();
14335
- var Kohost = require_kohost();
14351
+ var Kohost = require_Kohost();
14336
14352
  schemas.add(schema);
14337
14353
  var validator = schemas.compile(schema);
14338
14354
  var ShortLink = class extends Kohost {
@@ -14363,7 +14379,7 @@ var require_energyReportShard = __commonJS({
14363
14379
  "src/schemas/energyReportShard.json"(exports, module) {
14364
14380
  module.exports = {
14365
14381
  $schema: "http://json-schema.org/draft-07/schema",
14366
- $id: "https://api.kohost.io/schemas/v3/energyReportShard.json",
14382
+ $id: "energyReportShard.json",
14367
14383
  title: "Energy Report Shard",
14368
14384
  description: "Shard used for Energy Reports",
14369
14385
  type: "object",
@@ -14379,7 +14395,7 @@ var require_energyReportShard = __commonJS({
14379
14395
  ],
14380
14396
  properties: {
14381
14397
  id: {
14382
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14398
+ $ref: "definitions.json#/definitions/id"
14383
14399
  },
14384
14400
  type: {
14385
14401
  type: "string",
@@ -14387,7 +14403,7 @@ var require_energyReportShard = __commonJS({
14387
14403
  default: "energyReportShard"
14388
14404
  },
14389
14405
  roomId: {
14390
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14406
+ $ref: "definitions.json#/definitions/id"
14391
14407
  },
14392
14408
  first: {
14393
14409
  type: ["string", "object"],
@@ -14408,13 +14424,13 @@ var require_energyReportShard = __commonJS({
14408
14424
  format: "date-time"
14409
14425
  },
14410
14426
  watts: {
14411
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/watts"
14427
+ $ref: "definitions.json#/definitions/watts"
14412
14428
  },
14413
14429
  id: {
14414
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14430
+ $ref: "definitions.json#/definitions/id"
14415
14431
  },
14416
14432
  type: {
14417
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
14433
+ $ref: "definitions.json#/definitions/type"
14418
14434
  },
14419
14435
  value: {
14420
14436
  type: "number",
@@ -14439,12 +14455,12 @@ var require_energyReportShard = __commonJS({
14439
14455
  }
14440
14456
  });
14441
14457
 
14442
- // src/Models/energyReportShard.js
14443
- var require_energyReportShard2 = __commonJS({
14444
- "src/Models/energyReportShard.js"(exports, module) {
14458
+ // src/Models/EnergyReportShard.js
14459
+ var require_EnergyReportShard = __commonJS({
14460
+ "src/Models/EnergyReportShard.js"(exports, module) {
14445
14461
  var schemas = require_schema();
14446
14462
  var schema = require_energyReportShard();
14447
- var Kohost = require_kohost();
14463
+ var Kohost = require_Kohost();
14448
14464
  schemas.add(schema);
14449
14465
  var validator = schemas.compile(schema);
14450
14466
  var EnergyReportShard = class extends Kohost {
@@ -14475,7 +14491,7 @@ var require_energyReport = __commonJS({
14475
14491
  "src/schemas/energyReport.json"(exports, module) {
14476
14492
  module.exports = {
14477
14493
  $schema: "http://json-schema.org/draft-07/schema",
14478
- $id: "https://api.kohost.io/schemas/v3/energyReport.json",
14494
+ $id: "energyReport.json",
14479
14495
  title: "Energy Report Hourly",
14480
14496
  description: "Hourly Report for Energy based on energy report shards",
14481
14497
  type: "object",
@@ -14491,7 +14507,7 @@ var require_energyReport = __commonJS({
14491
14507
  ],
14492
14508
  properties: {
14493
14509
  id: {
14494
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14510
+ $ref: "definitions.json#/definitions/id"
14495
14511
  },
14496
14512
  type: {
14497
14513
  type: "string",
@@ -14503,7 +14519,7 @@ var require_energyReport = __commonJS({
14503
14519
  enum: ["hourly", "daily", "monthly"]
14504
14520
  },
14505
14521
  roomId: {
14506
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14522
+ $ref: "definitions.json#/definitions/id"
14507
14523
  },
14508
14524
  first: {
14509
14525
  type: ["string", "object"],
@@ -14520,10 +14536,10 @@ var require_energyReport = __commonJS({
14520
14536
  required: ["id", "type", "kwh"],
14521
14537
  properties: {
14522
14538
  id: {
14523
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14539
+ $ref: "definitions.json#/definitions/id"
14524
14540
  },
14525
14541
  type: {
14526
- $ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
14542
+ $ref: "definitions.json#/definitions/type"
14527
14543
  },
14528
14544
  kwh: {
14529
14545
  type: "number",
@@ -14562,12 +14578,12 @@ var require_energyReport = __commonJS({
14562
14578
  }
14563
14579
  });
14564
14580
 
14565
- // src/Models/energyReport.js
14566
- var require_energyReport2 = __commonJS({
14567
- "src/Models/energyReport.js"(exports, module) {
14581
+ // src/Models/EnergyReport.js
14582
+ var require_EnergyReport = __commonJS({
14583
+ "src/Models/EnergyReport.js"(exports, module) {
14568
14584
  var schemas = require_schema();
14569
14585
  var schema = require_energyReport();
14570
- var Kohost = require_kohost();
14586
+ var Kohost = require_Kohost();
14571
14587
  schemas.add(schema);
14572
14588
  var validator = schemas.compile(schema);
14573
14589
  var EnergyReport = class extends Kohost {
@@ -14598,13 +14614,13 @@ var require_smsMessage = __commonJS({
14598
14614
  "src/schemas/smsMessage.json"(exports, module) {
14599
14615
  module.exports = {
14600
14616
  $schema: "http://json-schema.org/draft-07/schema",
14601
- $id: "https://api.kohost.io/schemas/v3/smsMessage.json",
14617
+ $id: "smsMessage.json",
14602
14618
  title: "SMS Message",
14603
14619
  type: "object",
14604
14620
  required: ["to", "from", "body", "status"],
14605
14621
  properties: {
14606
14622
  id: {
14607
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14623
+ $ref: "definitions.json#/definitions/id"
14608
14624
  },
14609
14625
  type: {
14610
14626
  type: "string",
@@ -14647,25 +14663,25 @@ var require_smsMessage = __commonJS({
14647
14663
  type: "object"
14648
14664
  },
14649
14665
  createdAt: {
14650
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
14666
+ $ref: "definitions.json#/definitions/date"
14651
14667
  },
14652
14668
  updatedAt: {
14653
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
14669
+ $ref: "definitions.json#/definitions/date"
14654
14670
  },
14655
14671
  systemData: {
14656
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
14672
+ $ref: "definitions.json#/definitions/systemData"
14657
14673
  }
14658
14674
  }
14659
14675
  };
14660
14676
  }
14661
14677
  });
14662
14678
 
14663
- // src/Models/smsMessage.js
14664
- var require_smsMessage2 = __commonJS({
14665
- "src/Models/smsMessage.js"(exports, module) {
14679
+ // src/Models/SmsMessage.js
14680
+ var require_SmsMessage = __commonJS({
14681
+ "src/Models/SmsMessage.js"(exports, module) {
14666
14682
  var schemas = require_schema();
14667
14683
  var schema = require_smsMessage();
14668
- var Kohost = require_kohost();
14684
+ var Kohost = require_Kohost();
14669
14685
  schemas.add(schema);
14670
14686
  var validator = schemas.compile(schema);
14671
14687
  var SMSMessage = class extends Kohost {
@@ -14696,13 +14712,13 @@ var require_emailMessage = __commonJS({
14696
14712
  "src/schemas/emailMessage.json"(exports, module) {
14697
14713
  module.exports = {
14698
14714
  $schema: "http://json-schema.org/draft-07/schema",
14699
- $id: "https://api.kohost.io/schemas/v3/emailMessage.json",
14715
+ $id: "emailMessage.json",
14700
14716
  title: "Email Message",
14701
14717
  type: "object",
14702
14718
  required: ["to", "from", "status", "subject"],
14703
14719
  properties: {
14704
14720
  id: {
14705
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14721
+ $ref: "definitions.json#/definitions/id"
14706
14722
  },
14707
14723
  type: {
14708
14724
  type: "string",
@@ -14755,25 +14771,25 @@ var require_emailMessage = __commonJS({
14755
14771
  type: "object"
14756
14772
  },
14757
14773
  createdAt: {
14758
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
14774
+ $ref: "definitions.json#/definitions/date"
14759
14775
  },
14760
14776
  updatedAt: {
14761
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
14777
+ $ref: "definitions.json#/definitions/date"
14762
14778
  },
14763
14779
  systemData: {
14764
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
14780
+ $ref: "definitions.json#/definitions/systemData"
14765
14781
  }
14766
14782
  }
14767
14783
  };
14768
14784
  }
14769
14785
  });
14770
14786
 
14771
- // src/Models/emailMessage.js
14772
- var require_emailMessage2 = __commonJS({
14773
- "src/Models/emailMessage.js"(exports, module) {
14787
+ // src/Models/EmailMessage.js
14788
+ var require_EmailMessage = __commonJS({
14789
+ "src/Models/EmailMessage.js"(exports, module) {
14774
14790
  var schemas = require_schema();
14775
14791
  var schema = require_emailMessage();
14776
- var Kohost = require_kohost();
14792
+ var Kohost = require_Kohost();
14777
14793
  schemas.add(schema);
14778
14794
  var validator = schemas.compile(schema);
14779
14795
  var EmailMessage = class extends Kohost {
@@ -14804,14 +14820,14 @@ var require_property = __commonJS({
14804
14820
  "src/schemas/property.json"(exports, module) {
14805
14821
  module.exports = {
14806
14822
  $schema: "http://json-schema.org/draft-07/schema",
14807
- $id: "https://api.kohost.io/schemas/v3/admin/property.json",
14823
+ $id: "property.json",
14808
14824
  title: "Property",
14809
14825
  type: "object",
14810
14826
  description: "A property is a physical asset or building",
14811
14827
  required: ["id", "name", "type", "hostname", "organization"],
14812
14828
  properties: {
14813
14829
  id: {
14814
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
14830
+ $ref: "definitions.json#/definitions/id"
14815
14831
  },
14816
14832
  name: {
14817
14833
  type: "string"
@@ -15050,12 +15066,12 @@ var require_property = __commonJS({
15050
15066
  }
15051
15067
  });
15052
15068
 
15053
- // src/Models/property.js
15054
- var require_property2 = __commonJS({
15055
- "src/Models/property.js"(exports, module) {
15069
+ // src/Models/Property.js
15070
+ var require_Property = __commonJS({
15071
+ "src/Models/Property.js"(exports, module) {
15056
15072
  var schemas = require_schema();
15057
15073
  var schema = require_property();
15058
- var Kohost = require_kohost();
15074
+ var Kohost = require_Kohost();
15059
15075
  schemas.add(schema);
15060
15076
  var validator = schemas.compile(schema);
15061
15077
  var Property = class extends Kohost {
@@ -15086,14 +15102,14 @@ var require_organization = __commonJS({
15086
15102
  "src/schemas/organization.json"(exports, module) {
15087
15103
  module.exports = {
15088
15104
  $schema: "http://json-schema.org/draft-07/schema",
15089
- $id: "https://api.kohost.io/schemas/v3/admin/organization.json",
15105
+ $id: "organization.json",
15090
15106
  title: "Organization",
15091
15107
  type: "object",
15092
15108
  description: "An organization is a group or entity that subscribes to Kohost software.",
15093
15109
  required: ["accountNumber", "name"],
15094
15110
  properties: {
15095
15111
  id: {
15096
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
15112
+ $ref: "definitions.json#/definitions/id"
15097
15113
  },
15098
15114
  accountNumber: {
15099
15115
  type: "number",
@@ -15113,22 +15129,22 @@ var require_organization = __commonJS({
15113
15129
  additionalProperties: true
15114
15130
  },
15115
15131
  createdAt: {
15116
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/createdAt"
15132
+ $ref: "definitions.json#/definitions/createdAt"
15117
15133
  },
15118
15134
  updatedAt: {
15119
- $ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/updatedAt"
15135
+ $ref: "definitions.json#/definitions/updatedAt"
15120
15136
  }
15121
15137
  }
15122
15138
  };
15123
15139
  }
15124
15140
  });
15125
15141
 
15126
- // src/Models/organization.js
15127
- var require_organization2 = __commonJS({
15128
- "src/Models/organization.js"(exports, module) {
15142
+ // src/Models/Organization.js
15143
+ var require_Organization = __commonJS({
15144
+ "src/Models/Organization.js"(exports, module) {
15129
15145
  var schemas = require_schema();
15130
15146
  var schema = require_organization();
15131
- var Kohost = require_kohost();
15147
+ var Kohost = require_Kohost();
15132
15148
  schemas.add(schema);
15133
15149
  var validator = schemas.compile(schema);
15134
15150
  var Organization = class extends Kohost {
@@ -15157,37 +15173,37 @@ var require_organization2 = __commonJS({
15157
15173
  // src/Models/index.js
15158
15174
  var require_Models = __commonJS({
15159
15175
  "src/Models/index.js"(exports, module) {
15160
- var Reservation = require_reservation2();
15161
- var MediaFile = require_mediaFile2();
15162
- var Switch = require_switch2();
15163
- var Alarm = require_alarm2();
15164
- var Dimmer = require_dimmer2();
15165
- var Lock = require_lock2();
15166
- var Thermostat = require_thermostat2();
15167
- var WindowCovering = require_windowCovering2();
15168
- var Identification = require_identification2();
15169
- var User = require_user2();
15170
- var SystemUser = require_systemUser2();
15171
- var Courtesy = require_courtesy2();
15172
- var Camera = require_camera2();
15173
- var MotionSensor = require_motionSensor2();
15174
- var MediaSource = require_mediaSource2();
15175
- var Room = require_room2();
15176
- var Space = require_space2();
15177
- var SpaceType = require_spaceType2();
15178
- var Ticket = require_ticket2();
15179
- var Scene = require_scene2();
15180
- var Gateway = require_gateway2();
15181
- var Product = require_product2();
15182
- var DiscoveredDevice = require_discoveredDevice2();
15183
- var Credential = require_credential2();
15184
- var ShortLink = require_shortLink2();
15185
- var EnergyReportShard = require_energyReportShard2();
15186
- var EnergyReport = require_energyReport2();
15187
- var SMSMessage = require_smsMessage2();
15188
- var EmailMessage = require_emailMessage2();
15189
- var Property = require_property2();
15190
- var Organization = require_organization2();
15176
+ var Reservation = require_Reservation();
15177
+ var MediaFile = require_MediaFile();
15178
+ var Switch = require_Switch();
15179
+ var Alarm = require_Alarm();
15180
+ var Dimmer = require_Dimmer();
15181
+ var Lock = require_Lock();
15182
+ var Thermostat = require_Thermostat();
15183
+ var WindowCovering = require_WindowCovering();
15184
+ var Identification = require_Identification();
15185
+ var User = require_User();
15186
+ var SystemUser = require_SystemUser();
15187
+ var Courtesy = require_Courtesy();
15188
+ var Camera = require_Camera();
15189
+ var MotionSensor = require_MotionSensor();
15190
+ var MediaSource = require_MediaSource();
15191
+ var Room = require_Room();
15192
+ var Space = require_Space();
15193
+ var SpaceType = require_SpaceType();
15194
+ var Ticket = require_Ticket();
15195
+ var Scene = require_Scene();
15196
+ var Gateway = require_Gateway();
15197
+ var Product = require_Product();
15198
+ var DiscoveredDevice = require_DiscoveredDevice();
15199
+ var Credential = require_Credential();
15200
+ var ShortLink = require_ShortLink();
15201
+ var EnergyReportShard = require_EnergyReportShard();
15202
+ var EnergyReport = require_EnergyReport();
15203
+ var SMSMessage = require_SmsMessage();
15204
+ var EmailMessage = require_EmailMessage();
15205
+ var Property = require_Property();
15206
+ var Organization = require_Organization();
15191
15207
  module.exports = {
15192
15208
  Organization,
15193
15209
  Property,