@kohost/api-client 3.0.0-beta.8 → 3.0.0-beta.80

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 (265) hide show
  1. package/README.md +71 -0
  2. package/dist/cjs/AMQPClient/index.js +296 -0
  3. package/dist/cjs/{Client.js → Client/index.js} +1535 -586
  4. package/dist/cjs/Commands/CheckInReservationCommand.js +19 -0
  5. package/dist/cjs/Commands/Command.js +34 -0
  6. package/dist/cjs/Commands/CreateImageUploadEndpointCommand.js +17 -0
  7. package/dist/cjs/Commands/CreateShortLinkCommand.js +20 -0
  8. package/dist/cjs/Commands/DiscoverCategoriesCommand.js +20 -0
  9. package/dist/cjs/Commands/DiscoverReservationSpaceCategoryAvailabilitiesCommand.js +20 -0
  10. package/dist/cjs/Commands/DiscoverReservationsCommand.js +20 -0
  11. package/dist/cjs/Commands/DiscoverRoomsCommand.js +37 -0
  12. package/dist/cjs/Commands/DiscoverUsersCommand.js +19 -0
  13. package/dist/cjs/Commands/GetMobileKeyCommand.js +24 -0
  14. package/dist/cjs/Commands/GetProductsCommand.js +17 -0
  15. package/dist/cjs/Commands/OCRDocumentCommand.js +15 -0
  16. package/dist/cjs/Commands/SellProductsCommand.js +17 -0
  17. package/dist/cjs/Commands/SendEmailCommand.js +24 -0
  18. package/dist/cjs/Commands/SendSMSCommand.js +21 -0
  19. package/dist/cjs/Commands/SetAlarmCommand.js +17 -0
  20. package/dist/cjs/Commands/SetCourtesyCommand.js +17 -0
  21. package/dist/cjs/Commands/SetDimmerCommand.js +17 -0
  22. package/dist/cjs/Commands/SetLockCommand.js +17 -0
  23. package/dist/cjs/Commands/SetMediaCommand.js +17 -0
  24. package/dist/cjs/Commands/SetSceneCommand.js +17 -0
  25. package/dist/cjs/Commands/SetSwitchCommand.js +17 -0
  26. package/dist/cjs/Commands/SetThermostatCommand.js +17 -0
  27. package/dist/cjs/Commands/SetWindowCoveringCommand.js +17 -0
  28. package/dist/cjs/Commands/UpdateReservationCommand.js +19 -0
  29. package/dist/cjs/Commands/UpdateUserCommand.js +41 -0
  30. package/dist/cjs/Commands/UploadImageCommand.js +17 -0
  31. package/dist/cjs/Commands/index.js +55 -0
  32. package/dist/cjs/Errors/AppError.js +8 -0
  33. package/dist/cjs/Errors/AuthenticationError.js +9 -0
  34. package/dist/cjs/Errors/AuthorizationError.js +9 -0
  35. package/dist/cjs/Errors/ConflictError.js +9 -0
  36. package/dist/cjs/Errors/DeviceCommError.js +9 -0
  37. package/dist/cjs/Errors/LoginError.js +9 -0
  38. package/dist/cjs/Errors/NotFoundError.js +9 -0
  39. package/dist/cjs/Errors/RequestError.js +9 -0
  40. package/dist/cjs/Errors/SystemCommError.js +9 -0
  41. package/dist/cjs/Errors/TokenExpiredError.js +9 -0
  42. package/dist/cjs/Errors/UnprocessableRequestError.js +9 -0
  43. package/dist/cjs/Errors/ValidationError.js +9 -0
  44. package/dist/cjs/Errors/index.js +16 -0
  45. package/dist/cjs/Events/ApplicationInUseEvent.js +21 -0
  46. package/dist/cjs/Events/ApplicationOutOfUseEvent.js +21 -0
  47. package/dist/cjs/Events/EmailEvent.js +18 -0
  48. package/dist/cjs/Events/Event.js +55 -0
  49. package/dist/cjs/Events/SMSEvent.js +18 -0
  50. package/dist/cjs/Events/SMSSentEvent.js +17 -0
  51. package/dist/cjs/Events/SceneSetEvent.js +17 -0
  52. package/dist/cjs/Events/ShortLinkCreatedEvent.js +17 -0
  53. package/dist/cjs/Events/SystemAlarmUpdatedEvent.js +17 -0
  54. package/dist/cjs/Events/SystemCameraUpdatedEvent.js +17 -0
  55. package/dist/cjs/Events/SystemCategoryUpdatedEvent.js +17 -0
  56. package/dist/cjs/Events/SystemCourtesyUpdatedEvent.js +17 -0
  57. package/dist/cjs/Events/SystemCredentialUpdatedEvent.js +17 -0
  58. package/dist/cjs/Events/SystemDimmerUpdatedEvent.js +17 -0
  59. package/dist/cjs/Events/SystemEntityDeletedEvent.js +17 -0
  60. package/dist/cjs/Events/SystemGatewayUpdatedEvent.js +17 -0
  61. package/dist/cjs/Events/SystemLockUpdatedEvent.js +17 -0
  62. package/dist/cjs/Events/SystemMediaSourceUpdatedEvent.js +17 -0
  63. package/dist/cjs/Events/SystemMotionSensorUpdatedEvent.js +17 -0
  64. package/dist/cjs/Events/SystemOrganizationUpdatedEvent.js +17 -0
  65. package/dist/cjs/Events/SystemProductUpdatedEvent.js +17 -0
  66. package/dist/cjs/Events/SystemPropertyUpdatedEvent.js +17 -0
  67. package/dist/cjs/Events/SystemReservationUpdatedEvent.js +17 -0
  68. package/dist/cjs/Events/SystemSceneControllerUpdatedEvent.js +17 -0
  69. package/dist/cjs/Events/SystemSpaceUpdatedEvent.js +17 -0
  70. package/dist/cjs/Events/SystemSwitchUpdatedEvent.js +17 -0
  71. package/dist/cjs/Events/SystemThermostatUpdatedEvent.js +17 -0
  72. package/dist/cjs/Events/SystemUserUpdatedEvent.js +17 -0
  73. package/dist/cjs/Events/SystemWindowCoveringUpdatedEvent.js +17 -0
  74. package/dist/cjs/Events/index.js +65 -0
  75. package/dist/cjs/Models/Alarm.js +35 -0
  76. package/dist/cjs/Models/Camera.js +35 -0
  77. package/dist/cjs/Models/Category.js +36 -0
  78. package/dist/cjs/Models/Courtesy.js +39 -0
  79. package/dist/cjs/Models/Credential.js +35 -0
  80. package/dist/cjs/Models/Dimmer.js +61 -0
  81. package/dist/cjs/Models/DiscoveredDevice.js +36 -0
  82. package/dist/cjs/Models/EmailMessage.js +35 -0
  83. package/dist/cjs/Models/EnergyReport.js +35 -0
  84. package/dist/cjs/Models/EnergyReportShard.js +35 -0
  85. package/dist/cjs/Models/Gateway.js +35 -0
  86. package/dist/cjs/Models/Identification.js +38 -0
  87. package/dist/cjs/Models/Kohost.js +96 -0
  88. package/dist/cjs/Models/Lock.js +39 -0
  89. package/dist/cjs/Models/MediaFile.js +48 -0
  90. package/dist/cjs/Models/MediaSource.js +35 -0
  91. package/dist/cjs/Models/MotionSensor.js +35 -0
  92. package/dist/cjs/Models/Notification.js +34 -0
  93. package/dist/cjs/Models/Order.js +97 -0
  94. package/dist/cjs/Models/Organization.js +34 -0
  95. package/dist/cjs/Models/Product.js +35 -0
  96. package/dist/cjs/Models/Property.js +34 -0
  97. package/dist/cjs/Models/Reservation.js +114 -0
  98. package/dist/cjs/Models/Room.js +218 -0
  99. package/dist/cjs/Models/Scene.js +169 -0
  100. package/dist/cjs/Models/ShortLink.js +35 -0
  101. package/dist/cjs/Models/SmsMessage.js +35 -0
  102. package/dist/cjs/Models/Space.js +97 -0
  103. package/dist/cjs/Models/Switch.js +39 -0
  104. package/dist/cjs/Models/SystemUser.js +55 -0
  105. package/dist/cjs/Models/Thermostat.js +86 -0
  106. package/dist/cjs/Models/Ticket.js +112 -0
  107. package/dist/cjs/Models/User.js +115 -0
  108. package/dist/cjs/Models/WindowCovering.js +55 -0
  109. package/dist/cjs/Models/index.js +72 -0
  110. package/dist/cjs/SocketIoClient/index.js +74 -0
  111. package/dist/cjs/defs/deviceTypes.js +15 -0
  112. package/dist/cjs/defs/formalDeviceTypes.js +6 -0
  113. package/dist/cjs/defs/index.js +11 -0
  114. package/dist/cjs/{index.cjs.js → index.js} +7 -1
  115. package/dist/cjs/schemas/AlarmSchema.d.ts +152 -0
  116. package/dist/cjs/schemas/CameraSchema.d.ts +143 -0
  117. package/dist/cjs/schemas/CategorySchema.d.ts +82 -0
  118. package/dist/cjs/schemas/CourtesySchema.d.ts +142 -0
  119. package/dist/cjs/schemas/CredentialSchema.d.ts +52 -0
  120. package/dist/cjs/schemas/DefinitionsSchema.d.ts +10 -0
  121. package/dist/cjs/schemas/DimmerSchema.d.ts +142 -0
  122. package/dist/cjs/schemas/DiscoveredDeviceSchema.d.ts +39 -0
  123. package/dist/cjs/schemas/EmailMessageSchema.d.ts +49 -0
  124. package/dist/cjs/schemas/EnergyReportSchema.d.ts +57 -0
  125. package/dist/cjs/schemas/EnergyReportShardSchema.d.ts +61 -0
  126. package/dist/cjs/schemas/GatewaySchema.d.ts +139 -0
  127. package/dist/cjs/schemas/IdentificationSchema.d.ts +45 -0
  128. package/dist/cjs/schemas/LockSchema.d.ts +142 -0
  129. package/dist/cjs/schemas/MediaFileSchema.d.ts +43 -0
  130. package/dist/cjs/schemas/MediaSourceSchema.d.ts +238 -0
  131. package/dist/cjs/schemas/MotionSensorSchema.d.ts +137 -0
  132. package/dist/cjs/schemas/NotificationSchema.d.ts +54 -0
  133. package/dist/cjs/schemas/OrderSchema.d.ts +91 -0
  134. package/dist/cjs/schemas/OrganizationSchema.d.ts +34 -0
  135. package/dist/cjs/schemas/PaymentSchema.d.ts +33 -0
  136. package/dist/cjs/schemas/ProductSchema.d.ts +66 -0
  137. package/dist/cjs/schemas/PropertySchema.d.ts +144 -0
  138. package/dist/cjs/schemas/ReservationSchema.d.ts +118 -0
  139. package/dist/cjs/schemas/RoomSchema.d.ts +1076 -0
  140. package/dist/cjs/schemas/SceneSchema.d.ts +57 -0
  141. package/dist/cjs/schemas/ShortLinkSchema.d.ts +20 -0
  142. package/dist/cjs/schemas/SmsMessageSchema.d.ts +40 -0
  143. package/dist/cjs/schemas/SpaceSchema.d.ts +69 -0
  144. package/dist/cjs/schemas/SwitchSchema.d.ts +142 -0
  145. package/dist/cjs/schemas/SystemUserSchema.d.ts +193 -0
  146. package/dist/cjs/schemas/ThermostatSchema.d.ts +172 -0
  147. package/dist/cjs/schemas/TicketSchema.d.ts +88 -0
  148. package/dist/cjs/schemas/UserSchema.d.ts +286 -0
  149. package/dist/cjs/schemas/WindowCoveringSchema.d.ts +141 -0
  150. package/dist/cjs/schemas/alarm.json +81 -0
  151. package/dist/cjs/schemas/camera.json +50 -0
  152. package/dist/cjs/schemas/category.json +42 -0
  153. package/dist/cjs/schemas/courtesy.json +48 -0
  154. package/dist/cjs/schemas/credential.json +44 -0
  155. package/dist/cjs/schemas/definitions.json +218 -0
  156. package/dist/cjs/schemas/dimmer.json +45 -0
  157. package/dist/cjs/schemas/discoveredDevice.json +31 -0
  158. package/dist/cjs/schemas/emailMessage.json +71 -0
  159. package/dist/cjs/schemas/energyReport.json +86 -0
  160. package/dist/cjs/schemas/energyReportShard.json +75 -0
  161. package/dist/cjs/schemas/gateway.json +34 -0
  162. package/dist/cjs/schemas/identification.json +61 -0
  163. package/dist/cjs/schemas/lock.json +44 -0
  164. package/dist/cjs/schemas/mediaFile.json +70 -0
  165. package/dist/cjs/schemas/mediaSource.json +187 -0
  166. package/dist/cjs/schemas/motionSensor.json +32 -0
  167. package/dist/cjs/schemas/notification.json +29 -0
  168. package/dist/cjs/schemas/order.json +182 -0
  169. package/dist/cjs/schemas/organization.json +40 -0
  170. package/dist/cjs/schemas/payment.json +47 -0
  171. package/dist/cjs/schemas/product.json +41 -0
  172. package/dist/cjs/schemas/property.json +347 -0
  173. package/dist/cjs/schemas/reservation.json +137 -0
  174. package/dist/cjs/schemas/room.json +98 -0
  175. package/dist/cjs/schemas/scene.json +121 -0
  176. package/dist/cjs/schemas/shortLink.json +30 -0
  177. package/dist/cjs/schemas/smsMessage.json +61 -0
  178. package/dist/cjs/schemas/space.json +129 -0
  179. package/dist/cjs/schemas/switch.json +44 -0
  180. package/dist/cjs/schemas/systemUser.json +98 -0
  181. package/dist/cjs/schemas/thermostat.json +150 -0
  182. package/dist/cjs/schemas/ticket.json +141 -0
  183. package/dist/cjs/schemas/user.json +170 -0
  184. package/dist/cjs/schemas/windowCovering.json +42 -0
  185. package/dist/cjs/utils/errorFactory.js +8 -0
  186. package/dist/cjs/utils/eventFactory.js +10 -0
  187. package/dist/cjs/utils/getDeviceTypes.js +7 -0
  188. package/dist/cjs/utils/getFormalDeviceType.js +5 -0
  189. package/dist/cjs/utils/index.js +11 -0
  190. package/dist/cjs/utils/schema.js +25 -0
  191. package/dist/esm/Client.js +1632 -627
  192. package/dist/esm/Client.js.map +4 -4
  193. package/dist/esm/Commands.js +493 -116
  194. package/dist/esm/Commands.js.map +3 -3
  195. package/dist/esm/Errors.js +73 -22
  196. package/dist/esm/Errors.js.map +3 -3
  197. package/dist/esm/Events.js +414 -73
  198. package/dist/esm/Events.js.map +3 -3
  199. package/dist/esm/Models.js +3418 -1271
  200. package/dist/esm/Models.js.map +4 -4
  201. package/dist/esm/SocketIoClient.js +4846 -0
  202. package/dist/esm/SocketIoClient.js.map +7 -0
  203. package/dist/esm/defs.js +146 -101
  204. package/dist/esm/defs.js.map +4 -4
  205. package/dist/esm/index.js +17 -10
  206. package/dist/esm/utils.js +446 -73
  207. package/dist/esm/utils.js.map +3 -3
  208. package/dist/useCases/AdminUpdateCustomer.js +1 -1
  209. package/dist/useCases/AssignSpaceToReservation.js +32 -0
  210. package/dist/useCases/{AdminCreateProperty.js → BatchNotifyCheckIn.js} +2 -2
  211. package/dist/useCases/{AdminCreateCustomer.js → CreateCateory.js} +2 -2
  212. package/dist/useCases/CreateImageUploadEndpoint.js +32 -0
  213. package/dist/useCases/{DeleteIntegration.js → CreateMediaSource.js} +4 -4
  214. package/dist/useCases/{AdminListCustomers.js → CreateOrganization.js} +3 -3
  215. package/dist/useCases/{AdminLoginUser.js → CreateProperty.js} +2 -2
  216. package/dist/useCases/DeleteCategory.js +32 -0
  217. package/dist/useCases/DeleteMediaFile.js +32 -0
  218. package/dist/useCases/DeleteMediaSource.js +32 -0
  219. package/dist/useCases/{ListIntegrations.js → DescribeCategory.js} +3 -3
  220. package/dist/useCases/{DeleteSource.js → DescribeLockCredential.js} +3 -3
  221. package/dist/useCases/{AdminListAdminUsers.js → DescribeMediaSource.js} +3 -3
  222. package/dist/useCases/DescribeMyAccessCredentials.js +32 -0
  223. package/dist/useCases/{AdminCreateAdminUser.js → DescribeOrganization.js} +4 -4
  224. package/dist/useCases/{DescribeIntegration.js → DescribeProduct.js} +2 -2
  225. package/dist/useCases/{AdminDescribeCustomer.js → DescribeProperty.js} +2 -2
  226. package/dist/useCases/DescribeReservationEarlyCheckInProducts.js +32 -0
  227. package/dist/useCases/DescribeReservationLateCheckOutProducts.js +32 -0
  228. package/dist/useCases/{AdminDescribeProperty.js → DescribeReservationRoomUpgrades.js} +2 -2
  229. package/dist/useCases/ListCategories.js +32 -0
  230. package/dist/useCases/ListMediaSources.js +32 -0
  231. package/dist/useCases/{CreateSource.js → ListMyOrders.js} +4 -4
  232. package/dist/useCases/{AdminListProperties.js → ListMyTickets.js} +2 -2
  233. package/dist/useCases/ListOrders.js +32 -0
  234. package/dist/useCases/{AdminRefreshToken.js → ListOrganizations.js} +3 -3
  235. package/dist/useCases/ListProperties.js +32 -0
  236. package/dist/useCases/ListScenes.js +32 -0
  237. package/dist/useCases/ListTeam.js +32 -0
  238. package/dist/useCases/ListUserOrders.js +32 -0
  239. package/dist/useCases/ListUserSpaces.js +32 -0
  240. package/dist/useCases/LogoutUser.js +32 -0
  241. package/dist/useCases/PurchaseReservationEarlyCheckInProducts.js +32 -0
  242. package/dist/useCases/PurchaseReservationLateCheckOutProducts.js +32 -0
  243. package/dist/useCases/{CreateIntegrationDeviceMapEntry.js → PurchaseReservationRoomUpgrades.js} +2 -2
  244. package/dist/useCases/RequestLoginLink.js +1 -1
  245. package/dist/useCases/{CreateIntegration.js → RequestMyKeyToken.js} +2 -2
  246. package/dist/useCases/RequestPWAToken.js +32 -0
  247. package/dist/useCases/SendCheckInSMS.js +32 -0
  248. package/dist/useCases/{SetSource.js → SetDimmer.js} +2 -2
  249. package/dist/useCases/{DescribeSource.js → SetMediaSource.js} +3 -3
  250. package/dist/useCases/{UpdateSource.js → SetRoomScene.js} +3 -3
  251. package/dist/useCases/SetSpaceScene.js +32 -0
  252. package/dist/useCases/TipUser.js +32 -0
  253. package/dist/useCases/{AdminUpdateProperty.js → UpdateCategory.js} +2 -2
  254. package/dist/useCases/{UpdateIntegration.js → UpdateMediaSource.js} +3 -3
  255. package/dist/useCases/UpdateProperty.js +32 -0
  256. package/dist/useCases/UpdateReservationExpectedArrivalTime.js +32 -0
  257. package/dist/useCases/{ListSources.js → UploadImage.js} +4 -4
  258. package/package.json +36 -10
  259. package/dist/cjs/Commands.js +0 -616
  260. package/dist/cjs/Errors.js +0 -176
  261. package/dist/cjs/Events.js +0 -387
  262. package/dist/cjs/Models.js +0 -3612
  263. package/dist/cjs/defs.js +0 -178
  264. package/dist/cjs/utils.js +0 -250
  265. package/dist/useCases/AdminRequestLoginLink.js +0 -32
@@ -0,0 +1,57 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * A room represents a physical space of controllable IoT devices
10
+ */
11
+ export interface Scene {
12
+ id?: string;
13
+ name?: string;
14
+ devices?: {
15
+ switches?: {
16
+ id?: string;
17
+ state?: "on" | "off";
18
+ [k: string]: unknown;
19
+ }[];
20
+ dimmers?: {
21
+ id?: string;
22
+ level?: number;
23
+ [k: string]: unknown;
24
+ }[];
25
+ windowCoverings?: {
26
+ id?: string;
27
+ position?: number;
28
+ [k: string]: unknown;
29
+ }[];
30
+ thermostats?: {
31
+ id?: string;
32
+ hvacMode?: "cool" | "heat" | "auto" | "off";
33
+ setpoints?: Setpoints;
34
+ fanMode?: "auto" | "low" | "medium" | "high" | "off" | "on";
35
+ setpointDelta?: number;
36
+ [k: string]: unknown;
37
+ }[];
38
+ mediaSources?: {
39
+ id?: string;
40
+ volume?: number;
41
+ commands?: string[];
42
+ [k: string]: unknown;
43
+ }[];
44
+ };
45
+ isDefault?: boolean;
46
+ showOnUi?: boolean;
47
+ }
48
+ export interface Setpoints {
49
+ cool?: Setpoint;
50
+ heat?: Setpoint;
51
+ auto?: Setpoint;
52
+ }
53
+ export interface Setpoint {
54
+ value?: number;
55
+ min?: number | null;
56
+ max?: number | null;
57
+ }
@@ -0,0 +1,20 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export interface ShortLink {
9
+ id?: string;
10
+ type?: string;
11
+ title?: string;
12
+ destination: {
13
+ [k: string]: unknown;
14
+ };
15
+ url: {
16
+ [k: string]: unknown;
17
+ };
18
+ systemId?: string;
19
+ [k: string]: unknown;
20
+ }
@@ -0,0 +1,40 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type Date =
9
+ | string
10
+ | {
11
+ [k: string]: unknown;
12
+ };
13
+
14
+ export interface SMSMessage {
15
+ id?: string;
16
+ type?: string;
17
+ to: string;
18
+ from: string;
19
+ media?: string;
20
+ status:
21
+ | "queued"
22
+ | "accepted"
23
+ | "sending"
24
+ | "sent"
25
+ | "failed"
26
+ | "delivered"
27
+ | "undelivered"
28
+ | "receiving"
29
+ | "received"
30
+ | "read";
31
+ body: string;
32
+ driver?: string;
33
+ appData?: {
34
+ [k: string]: unknown;
35
+ };
36
+ createdAt?: Date;
37
+ updatedAt?: Date;
38
+ systemId?: string;
39
+ [k: string]: unknown;
40
+ }
@@ -0,0 +1,69 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export interface Space {
9
+ id?: string;
10
+ name?: string;
11
+ type?: string;
12
+ discriminator?:
13
+ | "classRoom"
14
+ | "hotelRoom"
15
+ | "office"
16
+ | "building"
17
+ | "commonArea"
18
+ | "conferenceRoom"
19
+ | "lobby"
20
+ | "gym"
21
+ | "pool"
22
+ | "restaurant";
23
+ driver?:
24
+ | "aws-kinesis"
25
+ | "butler"
26
+ | "crestron"
27
+ | "dmp"
28
+ | "dormakaba"
29
+ | "dsc"
30
+ | "ecobee"
31
+ | "igor"
32
+ | "inncom"
33
+ | "kohost-k7"
34
+ | "kohost-pms"
35
+ | "lg"
36
+ | "lirc"
37
+ | "mews"
38
+ | "mht"
39
+ | "paxton"
40
+ | "pelican-wireless"
41
+ | "rebrandly"
42
+ | "salto"
43
+ | "salto-irn"
44
+ | "se"
45
+ | "sendgrid"
46
+ | "stay-n-touch"
47
+ | "twilio"
48
+ | "cloudflare-images"
49
+ | "cloudflare-stream"
50
+ | "insperia-privacy";
51
+ /**
52
+ * This is the category id
53
+ */
54
+ category?: string;
55
+ rooms?: string[];
56
+ subGroups?: string[];
57
+ occupied?: boolean;
58
+ eco?: {
59
+ active?: boolean;
60
+ activatedAt?: string;
61
+ allowed?: boolean;
62
+ };
63
+ features?: string[];
64
+ maximumOccupancy?: number;
65
+ housekeepingStatus?: "clean" | "dirty" | "inspected" | "pickup";
66
+ serviceStatus?: "inService" | "outOfOrder" | "outOfService";
67
+ systemId?: string;
68
+ [k: string]: unknown;
69
+ }
@@ -0,0 +1,142 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type SupportedNotifications = (
9
+ | "button 1"
10
+ | "button 2"
11
+ | "button 3"
12
+ | "button 4"
13
+ | "button 5"
14
+ | "idle"
15
+ | "powerHasBeedApplied"
16
+ | "acMainsDisconnected"
17
+ | "acMainsReconnected"
18
+ | "replaceBatterySoon"
19
+ | "replaceBatteryNow"
20
+ | "hardwareFailure"
21
+ | "softwareFailure"
22
+ | "hardwareFailureWithCode"
23
+ | "softwareFailureWithCode"
24
+ | "motionDetection"
25
+ | "airFilterNeedsCleaned"
26
+ | "smokeDetected"
27
+ | "outsideSafeTemperatureRange"
28
+ | "outsideSafeHumidityRange"
29
+ )[];
30
+ export type Notification = {
31
+ name?:
32
+ | "button 1"
33
+ | "button 2"
34
+ | "button 3"
35
+ | "button 4"
36
+ | "button 5"
37
+ | "idle"
38
+ | "powerHasBeedApplied"
39
+ | "acMainsDisconnected"
40
+ | "acMainsReconnected"
41
+ | "replaceBatterySoon"
42
+ | "replaceBatteryNow"
43
+ | "hardwareFailure"
44
+ | "softwareFailure"
45
+ | "hardwareFailureWithCode"
46
+ | "softwareFailureWithCode"
47
+ | "motionDetection"
48
+ | "airFilterNeedsCleaned"
49
+ | "smokeDetected"
50
+ | "outsideSafeTemperatureRange"
51
+ | "outsideSafeHumidityRange";
52
+ timestamp?: number;
53
+ description?: string;
54
+ [k: string]: unknown;
55
+ } & ({
56
+ name?:
57
+ | "button 1"
58
+ | "button 2"
59
+ | "button 3"
60
+ | "button 4"
61
+ | "button 5"
62
+ | "idle"
63
+ | "powerHasBeedApplied"
64
+ | "acMainsDisconnected"
65
+ | "acMainsReconnected"
66
+ | "replaceBatterySoon"
67
+ | "replaceBatteryNow"
68
+ | "hardwareFailure"
69
+ | "softwareFailure"
70
+ | "hardwareFailureWithCode"
71
+ | "softwareFailureWithCode"
72
+ | "motionDetection"
73
+ | "airFilterNeedsCleaned"
74
+ | "smokeDetected"
75
+ | "outsideSafeTemperatureRange"
76
+ | "outsideSafeHumidityRange";
77
+ timestamp?: number;
78
+ description?: string;
79
+ [k: string]: unknown;
80
+ } | null);
81
+
82
+ /**
83
+ * Any smart switch
84
+ */
85
+ export interface Switch {
86
+ id: string;
87
+ name?: string;
88
+ type:
89
+ | "alarm"
90
+ | "dimmer"
91
+ | "switch"
92
+ | "motionSensor"
93
+ | "windowCovering"
94
+ | "camera"
95
+ | "mediaSource"
96
+ | "thermostat"
97
+ | "lock"
98
+ | "courtesy"
99
+ | "gateway"
100
+ | "tv"
101
+ | "dvr"
102
+ | "appleTv"
103
+ | "discPlayer"
104
+ | "mediaPlayer"
105
+ | "uncontrolledDevice";
106
+ subType?: string | null;
107
+ supportedNotifications?: SupportedNotifications;
108
+ notification?: Notification;
109
+ driver:
110
+ | "aws-kinesis"
111
+ | "butler"
112
+ | "crestron"
113
+ | "dmp"
114
+ | "dormakaba"
115
+ | "dsc"
116
+ | "ecobee"
117
+ | "igor"
118
+ | "inncom"
119
+ | "kohost-k7"
120
+ | "kohost-pms"
121
+ | "lg"
122
+ | "lirc"
123
+ | "mews"
124
+ | "mht"
125
+ | "paxton"
126
+ | "pelican-wireless"
127
+ | "rebrandly"
128
+ | "salto"
129
+ | "salto-irn"
130
+ | "se"
131
+ | "sendgrid"
132
+ | "stay-n-touch"
133
+ | "twilio"
134
+ | "cloudflare-images"
135
+ | "cloudflare-stream"
136
+ | "insperia-privacy";
137
+ offline?: boolean;
138
+ state: "on" | "off";
139
+ systemId?: string;
140
+ watts?: number;
141
+ [k: string]: unknown;
142
+ }
@@ -0,0 +1,193 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type Date =
9
+ | string
10
+ | {
11
+ [k: string]: unknown;
12
+ };
13
+ export type Identification = Identification1 & Identification2;
14
+ export type Identification2 =
15
+ | {
16
+ [k: string]: unknown;
17
+ }
18
+ | {
19
+ [k: string]: unknown;
20
+ };
21
+ export type Revenue = {
22
+ id?: string;
23
+ name?: string;
24
+ date?: string;
25
+ price?: number;
26
+ [k: string]: unknown;
27
+ }[];
28
+ export type CreatedAt =
29
+ | string
30
+ | {
31
+ [k: string]: unknown;
32
+ };
33
+ export type UpdatedAt =
34
+ | string
35
+ | {
36
+ [k: string]: unknown;
37
+ };
38
+
39
+ /**
40
+ * A system user is a user that originated from an external 3rd party system.
41
+ */
42
+ export interface SystemUser {
43
+ id?: string;
44
+ type?: string;
45
+ driver?:
46
+ | "aws-kinesis"
47
+ | "butler"
48
+ | "crestron"
49
+ | "dmp"
50
+ | "dormakaba"
51
+ | "dsc"
52
+ | "ecobee"
53
+ | "igor"
54
+ | "inncom"
55
+ | "kohost-k7"
56
+ | "kohost-pms"
57
+ | "lg"
58
+ | "lirc"
59
+ | "mews"
60
+ | "mht"
61
+ | "paxton"
62
+ | "pelican-wireless"
63
+ | "rebrandly"
64
+ | "salto"
65
+ | "salto-irn"
66
+ | "se"
67
+ | "sendgrid"
68
+ | "stay-n-touch"
69
+ | "twilio"
70
+ | "cloudflare-images"
71
+ | "cloudflare-stream"
72
+ | "insperia-privacy";
73
+ firstName: string;
74
+ lastName: string;
75
+ phone?: string | null;
76
+ email?: string | null;
77
+ address?: Address;
78
+ photo?: string;
79
+ jobTitle?: string;
80
+ dob?: string;
81
+ gender?: "male" | "female";
82
+ roles?: ("Guest" | "User" | "Manager" | "Administrator" | "SuperAdmin")[];
83
+ nationality?: string;
84
+ notes?: string[];
85
+ files?: MediaFile[];
86
+ identifications?: Identification[];
87
+ payments?: Payment[];
88
+ revenue?: Revenue;
89
+ createdAt?: CreatedAt;
90
+ updatedAt?: UpdatedAt;
91
+ systemId?: string;
92
+ [k: string]: unknown;
93
+ }
94
+ export interface Address {
95
+ id?: string;
96
+ line1?: string;
97
+ line2?: string;
98
+ line3?: string;
99
+ city?: string;
100
+ state?: string;
101
+ postalCode?: string;
102
+ countryCode?: string;
103
+ [k: string]: unknown;
104
+ }
105
+ /**
106
+ * Any media file
107
+ */
108
+ export interface MediaFile {
109
+ id?: string;
110
+ type: string;
111
+ name?: string;
112
+ fileHash?: string;
113
+ mimeType?:
114
+ | "image/*"
115
+ | "image/jpeg"
116
+ | "image/png"
117
+ | "image/gif"
118
+ | "image/webp"
119
+ | "image/avif"
120
+ | "image/svg+xml"
121
+ | "application/pdf";
122
+ data?: string;
123
+ url?: string;
124
+ width?: number;
125
+ height?: number;
126
+ /**
127
+ * Size in bytes
128
+ */
129
+ size?: number;
130
+ uploadUrl?: string;
131
+ uploadUrlExpires?: Date;
132
+ createdBy?: string;
133
+ systemId?: string;
134
+ }
135
+ export interface Identification1 {
136
+ id?: string;
137
+ type: "driversLicense" | "passport" | "identityCard" | "visa";
138
+ number?: {
139
+ [k: string]: unknown;
140
+ };
141
+ maskedNumber?: {
142
+ [k: string]: unknown;
143
+ };
144
+ encryptedNumber?: {
145
+ [k: string]: unknown;
146
+ };
147
+ issued?:
148
+ | string
149
+ | {
150
+ [k: string]: unknown;
151
+ };
152
+ expires?:
153
+ | string
154
+ | {
155
+ [k: string]: unknown;
156
+ }
157
+ | null;
158
+ verified?: boolean;
159
+ matched?: boolean;
160
+ firstName?: string;
161
+ lastName?: string;
162
+ issuingCountry?: {
163
+ [k: string]: unknown;
164
+ };
165
+ systemId?: string;
166
+ [k: string]: unknown;
167
+ }
168
+ export interface Payment {
169
+ id?: string;
170
+ type:
171
+ | "amex"
172
+ | "visa"
173
+ | "masterCard"
174
+ | "maestro"
175
+ | "discover"
176
+ | "diners"
177
+ | "jcb"
178
+ | "applePay"
179
+ | "alipay"
180
+ | "chinaUnionPay"
181
+ | "vpay";
182
+ enabled?: boolean;
183
+ storageData?: string | null;
184
+ maskedNumber: {
185
+ [k: string]: unknown;
186
+ };
187
+ issued?: string | null;
188
+ expires: {
189
+ [k: string]: unknown;
190
+ };
191
+ systemId?: string;
192
+ [k: string]: unknown;
193
+ }
@@ -0,0 +1,172 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type SupportedNotifications = (
9
+ | "button 1"
10
+ | "button 2"
11
+ | "button 3"
12
+ | "button 4"
13
+ | "button 5"
14
+ | "idle"
15
+ | "powerHasBeedApplied"
16
+ | "acMainsDisconnected"
17
+ | "acMainsReconnected"
18
+ | "replaceBatterySoon"
19
+ | "replaceBatteryNow"
20
+ | "hardwareFailure"
21
+ | "softwareFailure"
22
+ | "hardwareFailureWithCode"
23
+ | "softwareFailureWithCode"
24
+ | "motionDetection"
25
+ | "airFilterNeedsCleaned"
26
+ | "smokeDetected"
27
+ | "outsideSafeTemperatureRange"
28
+ | "outsideSafeHumidityRange"
29
+ )[];
30
+ export type Notification = {
31
+ name?:
32
+ | "button 1"
33
+ | "button 2"
34
+ | "button 3"
35
+ | "button 4"
36
+ | "button 5"
37
+ | "idle"
38
+ | "powerHasBeedApplied"
39
+ | "acMainsDisconnected"
40
+ | "acMainsReconnected"
41
+ | "replaceBatterySoon"
42
+ | "replaceBatteryNow"
43
+ | "hardwareFailure"
44
+ | "softwareFailure"
45
+ | "hardwareFailureWithCode"
46
+ | "softwareFailureWithCode"
47
+ | "motionDetection"
48
+ | "airFilterNeedsCleaned"
49
+ | "smokeDetected"
50
+ | "outsideSafeTemperatureRange"
51
+ | "outsideSafeHumidityRange";
52
+ timestamp?: number;
53
+ description?: string;
54
+ [k: string]: unknown;
55
+ } & ({
56
+ name?:
57
+ | "button 1"
58
+ | "button 2"
59
+ | "button 3"
60
+ | "button 4"
61
+ | "button 5"
62
+ | "idle"
63
+ | "powerHasBeedApplied"
64
+ | "acMainsDisconnected"
65
+ | "acMainsReconnected"
66
+ | "replaceBatterySoon"
67
+ | "replaceBatteryNow"
68
+ | "hardwareFailure"
69
+ | "softwareFailure"
70
+ | "hardwareFailureWithCode"
71
+ | "softwareFailureWithCode"
72
+ | "motionDetection"
73
+ | "airFilterNeedsCleaned"
74
+ | "smokeDetected"
75
+ | "outsideSafeTemperatureRange"
76
+ | "outsideSafeHumidityRange";
77
+ timestamp?: number;
78
+ description?: string;
79
+ [k: string]: unknown;
80
+ } | null);
81
+ export type SetpointValue = number;
82
+ export type SetpointMinMax = number | null;
83
+
84
+ /**
85
+ * Any smart thermostat
86
+ */
87
+ export interface Thermostat {
88
+ id: string;
89
+ name?: string;
90
+ type:
91
+ | "alarm"
92
+ | "dimmer"
93
+ | "switch"
94
+ | "motionSensor"
95
+ | "windowCovering"
96
+ | "camera"
97
+ | "mediaSource"
98
+ | "thermostat"
99
+ | "lock"
100
+ | "courtesy"
101
+ | "gateway"
102
+ | "tv"
103
+ | "dvr"
104
+ | "appleTv"
105
+ | "discPlayer"
106
+ | "mediaPlayer"
107
+ | "uncontrolledDevice";
108
+ driver:
109
+ | "aws-kinesis"
110
+ | "butler"
111
+ | "crestron"
112
+ | "dmp"
113
+ | "dormakaba"
114
+ | "dsc"
115
+ | "ecobee"
116
+ | "igor"
117
+ | "inncom"
118
+ | "kohost-k7"
119
+ | "kohost-pms"
120
+ | "lg"
121
+ | "lirc"
122
+ | "mews"
123
+ | "mht"
124
+ | "paxton"
125
+ | "pelican-wireless"
126
+ | "rebrandly"
127
+ | "salto"
128
+ | "salto-irn"
129
+ | "se"
130
+ | "sendgrid"
131
+ | "stay-n-touch"
132
+ | "twilio"
133
+ | "cloudflare-images"
134
+ | "cloudflare-stream"
135
+ | "insperia-privacy";
136
+ offline?: boolean;
137
+ supportedNotifications?: SupportedNotifications;
138
+ notification?: Notification;
139
+ currentTemperature?: number;
140
+ currentHumidity?: number;
141
+ hvacMode: "cool" | "heat" | "auto" | "off";
142
+ hvacState: "cooling" | "heating" | "off" | null;
143
+ fanMode: "auto" | "low" | "medium" | "high" | "off" | "on";
144
+ fanState: "off" | "low" | "medium" | "high" | "on" | null;
145
+ temperatureScale: "celsius" | "fahrenheit";
146
+ humidityScale?: "absolute" | "relative" | null;
147
+ /**
148
+ * @minItems 2
149
+ */
150
+ supportedHvacModes: [
151
+ "cool" | "heat" | "auto" | "off",
152
+ "cool" | "heat" | "auto" | "off",
153
+ ...("cool" | "heat" | "auto" | "off")[]
154
+ ];
155
+ supportedFanModes: ("auto" | "low" | "medium" | "high" | "off" | "on")[];
156
+ setpoints: {
157
+ cool?: Setpoint;
158
+ heat?: Setpoint;
159
+ auto?: Setpoint;
160
+ };
161
+ minAutoDelta?: number;
162
+ cycleRate?: number;
163
+ batteryLevel?: number;
164
+ systemId?: string;
165
+ watts?: number;
166
+ [k: string]: unknown;
167
+ }
168
+ export interface Setpoint {
169
+ value?: SetpointValue;
170
+ min?: SetpointMinMax;
171
+ max?: SetpointMinMax;
172
+ }