@kohost/api-client 3.0.0-beta.9 → 3.0.0-beta.90

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 (277) 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} +1907 -598
  4. package/dist/cjs/Commands/CheckInReservationCommand.js +19 -0
  5. package/dist/cjs/Commands/CheckOutReservationCommand.js +20 -0
  6. package/dist/cjs/Commands/Command.js +34 -0
  7. package/dist/cjs/Commands/CreateImageUploadEndpointCommand.js +17 -0
  8. package/dist/cjs/Commands/CreateShortLinkCommand.js +20 -0
  9. package/dist/cjs/Commands/DiscoverCategoriesCommand.js +20 -0
  10. package/dist/cjs/Commands/DiscoverReservationSpaceCategoryAvailabilitiesCommand.js +20 -0
  11. package/dist/cjs/Commands/DiscoverReservationsCommand.js +20 -0
  12. package/dist/cjs/Commands/DiscoverRoomsCommand.js +37 -0
  13. package/dist/cjs/Commands/DiscoverUsersCommand.js +19 -0
  14. package/dist/cjs/Commands/GetMobileKeyCommand.js +24 -0
  15. package/dist/cjs/Commands/GetProductsCommand.js +17 -0
  16. package/dist/cjs/Commands/OCRDocumentCommand.js +15 -0
  17. package/dist/cjs/Commands/SellProductsCommand.js +17 -0
  18. package/dist/cjs/Commands/SendEmailCommand.js +24 -0
  19. package/dist/cjs/Commands/SendSMSCommand.js +21 -0
  20. package/dist/cjs/Commands/SetAlarmCommand.js +17 -0
  21. package/dist/cjs/Commands/SetCourtesyCommand.js +17 -0
  22. package/dist/cjs/Commands/SetDimmerCommand.js +17 -0
  23. package/dist/cjs/Commands/SetLockCommand.js +17 -0
  24. package/dist/cjs/Commands/SetMediaCommand.js +17 -0
  25. package/dist/cjs/Commands/SetSceneCommand.js +17 -0
  26. package/dist/cjs/Commands/SetSwitchCommand.js +17 -0
  27. package/dist/cjs/Commands/SetThermostatCommand.js +17 -0
  28. package/dist/cjs/Commands/SetWindowCoveringCommand.js +17 -0
  29. package/dist/cjs/Commands/UpdateReservationCommand.js +19 -0
  30. package/dist/cjs/Commands/UpdateUserCommand.js +41 -0
  31. package/dist/cjs/Commands/UploadImageCommand.js +17 -0
  32. package/dist/cjs/Commands/index.js +57 -0
  33. package/dist/cjs/Errors/AppError.js +8 -0
  34. package/dist/cjs/Errors/AuthenticationError.js +9 -0
  35. package/dist/cjs/Errors/AuthorizationError.js +9 -0
  36. package/dist/cjs/Errors/ConflictError.js +9 -0
  37. package/dist/cjs/Errors/DeviceCommError.js +9 -0
  38. package/dist/cjs/Errors/LoginError.js +9 -0
  39. package/dist/cjs/Errors/NotFoundError.js +9 -0
  40. package/dist/cjs/Errors/RequestError.js +9 -0
  41. package/dist/cjs/Errors/SystemCommError.js +9 -0
  42. package/dist/cjs/Errors/TokenExpiredError.js +9 -0
  43. package/dist/cjs/Errors/UnprocessableRequestError.js +9 -0
  44. package/dist/cjs/Errors/ValidationError.js +9 -0
  45. package/dist/cjs/Errors/index.js +16 -0
  46. package/dist/cjs/Events/ApplicationInUseEvent.js +21 -0
  47. package/dist/cjs/Events/ApplicationOutOfUseEvent.js +21 -0
  48. package/dist/cjs/Events/EmailEvent.js +18 -0
  49. package/dist/cjs/Events/Event.js +55 -0
  50. package/dist/cjs/Events/SMSEvent.js +18 -0
  51. package/dist/cjs/Events/SMSSentEvent.js +17 -0
  52. package/dist/cjs/Events/SceneSetEvent.js +17 -0
  53. package/dist/cjs/Events/ShortLinkCreatedEvent.js +17 -0
  54. package/dist/cjs/Events/SystemAlarmUpdatedEvent.js +17 -0
  55. package/dist/cjs/Events/SystemCameraUpdatedEvent.js +17 -0
  56. package/dist/cjs/Events/SystemCategoryUpdatedEvent.js +17 -0
  57. package/dist/cjs/Events/SystemCourtesyUpdatedEvent.js +17 -0
  58. package/dist/cjs/Events/SystemCredentialUpdatedEvent.js +17 -0
  59. package/dist/cjs/Events/SystemDimmerUpdatedEvent.js +17 -0
  60. package/dist/cjs/Events/SystemEntityDeletedEvent.js +17 -0
  61. package/dist/cjs/Events/SystemGatewayUpdatedEvent.js +17 -0
  62. package/dist/cjs/Events/SystemLockUpdatedEvent.js +17 -0
  63. package/dist/cjs/Events/SystemMediaSourceUpdatedEvent.js +17 -0
  64. package/dist/cjs/Events/SystemMotionSensorUpdatedEvent.js +17 -0
  65. package/dist/cjs/Events/SystemOrganizationUpdatedEvent.js +17 -0
  66. package/dist/cjs/Events/SystemProductUpdatedEvent.js +17 -0
  67. package/dist/cjs/Events/SystemPropertyUpdatedEvent.js +17 -0
  68. package/dist/cjs/Events/SystemReservationUpdatedEvent.js +17 -0
  69. package/dist/cjs/Events/SystemSceneControllerUpdatedEvent.js +17 -0
  70. package/dist/cjs/Events/SystemSpaceUpdatedEvent.js +17 -0
  71. package/dist/cjs/Events/SystemSwitchUpdatedEvent.js +17 -0
  72. package/dist/cjs/Events/SystemThermostatUpdatedEvent.js +17 -0
  73. package/dist/cjs/Events/SystemUserUpdatedEvent.js +17 -0
  74. package/dist/cjs/Events/SystemWindowCoveringUpdatedEvent.js +17 -0
  75. package/dist/cjs/Events/index.js +65 -0
  76. package/dist/cjs/Models/Alarm.js +35 -0
  77. package/dist/cjs/Models/Announcement.js +34 -0
  78. package/dist/cjs/Models/Camera.js +35 -0
  79. package/dist/cjs/Models/Category.js +36 -0
  80. package/dist/cjs/Models/Courtesy.js +39 -0
  81. package/dist/cjs/Models/Credential.js +35 -0
  82. package/dist/cjs/Models/Dimmer.js +61 -0
  83. package/dist/cjs/Models/DiscoveredDevice.js +36 -0
  84. package/dist/cjs/Models/EmailMessage.js +35 -0
  85. package/dist/cjs/Models/EnergyReport.js +35 -0
  86. package/dist/cjs/Models/EnergyReportShard.js +35 -0
  87. package/dist/cjs/Models/Gateway.js +35 -0
  88. package/dist/cjs/Models/Identification.js +38 -0
  89. package/dist/cjs/Models/Kohost.js +96 -0
  90. package/dist/cjs/Models/Lock.js +39 -0
  91. package/dist/cjs/Models/MediaFile.js +48 -0
  92. package/dist/cjs/Models/MediaSource.js +35 -0
  93. package/dist/cjs/Models/MotionSensor.js +35 -0
  94. package/dist/cjs/Models/Order.js +97 -0
  95. package/dist/cjs/Models/Organization.js +34 -0
  96. package/dist/cjs/Models/Product.js +35 -0
  97. package/dist/cjs/Models/Property.js +34 -0
  98. package/dist/cjs/Models/Reservation.js +114 -0
  99. package/dist/cjs/Models/Room.js +217 -0
  100. package/dist/cjs/Models/Scene.js +169 -0
  101. package/dist/cjs/Models/ShortLink.js +35 -0
  102. package/dist/cjs/Models/SmsMessage.js +35 -0
  103. package/dist/cjs/Models/Space.js +97 -0
  104. package/dist/cjs/Models/Switch.js +39 -0
  105. package/dist/cjs/Models/SystemUser.js +55 -0
  106. package/dist/cjs/Models/Thermostat.js +86 -0
  107. package/dist/cjs/Models/Ticket.js +55 -0
  108. package/dist/cjs/Models/User.js +115 -0
  109. package/dist/cjs/Models/WindowCovering.js +55 -0
  110. package/dist/cjs/Models/index.js +72 -0
  111. package/dist/cjs/SocketIoClient/index.js +74 -0
  112. package/dist/cjs/defs/deviceTypes.js +15 -0
  113. package/dist/cjs/defs/formalDeviceTypes.js +6 -0
  114. package/dist/cjs/defs/index.js +11 -0
  115. package/dist/cjs/{index.cjs.js → index.js} +7 -1
  116. package/dist/cjs/schemas/AlarmSchema.d.ts +158 -0
  117. package/dist/cjs/schemas/AnnouncementSchema.d.ts +59 -0
  118. package/dist/cjs/schemas/CameraSchema.d.ts +149 -0
  119. package/dist/cjs/schemas/CategorySchema.d.ts +82 -0
  120. package/dist/cjs/schemas/CourtesySchema.d.ts +148 -0
  121. package/dist/cjs/schemas/CredentialSchema.d.ts +53 -0
  122. package/dist/cjs/schemas/DefinitionsSchema.d.ts +10 -0
  123. package/dist/cjs/schemas/DimmerSchema.d.ts +147 -0
  124. package/dist/cjs/schemas/DiscoveredDeviceSchema.d.ts +39 -0
  125. package/dist/cjs/schemas/EmailMessageSchema.d.ts +49 -0
  126. package/dist/cjs/schemas/EnergyReportSchema.d.ts +57 -0
  127. package/dist/cjs/schemas/EnergyReportShardSchema.d.ts +61 -0
  128. package/dist/cjs/schemas/GatewaySchema.d.ts +145 -0
  129. package/dist/cjs/schemas/IdentificationSchema.d.ts +45 -0
  130. package/dist/cjs/schemas/LockSchema.d.ts +152 -0
  131. package/dist/cjs/schemas/MediaFileSchema.d.ts +43 -0
  132. package/dist/cjs/schemas/MediaSourceSchema.d.ts +244 -0
  133. package/dist/cjs/schemas/MotionSensorSchema.d.ts +143 -0
  134. package/dist/cjs/schemas/OrderSchema.d.ts +91 -0
  135. package/dist/cjs/schemas/OrganizationSchema.d.ts +34 -0
  136. package/dist/cjs/schemas/PaymentSchema.d.ts +33 -0
  137. package/dist/cjs/schemas/ProductSchema.d.ts +66 -0
  138. package/dist/cjs/schemas/PropertySchema.d.ts +144 -0
  139. package/dist/cjs/schemas/ReservationSchema.d.ts +119 -0
  140. package/dist/cjs/schemas/RoomSchema.d.ts +1103 -0
  141. package/dist/cjs/schemas/SceneSchema.d.ts +57 -0
  142. package/dist/cjs/schemas/ShortLinkSchema.d.ts +20 -0
  143. package/dist/cjs/schemas/SmsMessageSchema.d.ts +40 -0
  144. package/dist/cjs/schemas/SpaceSchema.d.ts +73 -0
  145. package/dist/cjs/schemas/SwitchSchema.d.ts +148 -0
  146. package/dist/cjs/schemas/SystemUserSchema.d.ts +194 -0
  147. package/dist/cjs/schemas/ThermostatSchema.d.ts +178 -0
  148. package/dist/cjs/schemas/TicketSchema.d.ts +89 -0
  149. package/dist/cjs/schemas/UserSchema.d.ts +287 -0
  150. package/dist/cjs/schemas/WindowCoveringSchema.d.ts +147 -0
  151. package/dist/cjs/schemas/alarm.json +81 -0
  152. package/dist/cjs/schemas/announcement.json +36 -0
  153. package/dist/cjs/schemas/camera.json +50 -0
  154. package/dist/cjs/schemas/category.json +42 -0
  155. package/dist/cjs/schemas/courtesy.json +48 -0
  156. package/dist/cjs/schemas/credential.json +44 -0
  157. package/dist/cjs/schemas/definitions.json +223 -0
  158. package/dist/cjs/schemas/dimmer.json +42 -0
  159. package/dist/cjs/schemas/discoveredDevice.json +31 -0
  160. package/dist/cjs/schemas/emailMessage.json +71 -0
  161. package/dist/cjs/schemas/energyReport.json +86 -0
  162. package/dist/cjs/schemas/energyReportShard.json +75 -0
  163. package/dist/cjs/schemas/gateway.json +34 -0
  164. package/dist/cjs/schemas/identification.json +61 -0
  165. package/dist/cjs/schemas/lock.json +50 -0
  166. package/dist/cjs/schemas/mediaFile.json +70 -0
  167. package/dist/cjs/schemas/mediaSource.json +187 -0
  168. package/dist/cjs/schemas/motionSensor.json +32 -0
  169. package/dist/cjs/schemas/order.json +182 -0
  170. package/dist/cjs/schemas/organization.json +40 -0
  171. package/dist/cjs/schemas/payment.json +47 -0
  172. package/dist/cjs/schemas/product.json +41 -0
  173. package/dist/cjs/schemas/property.json +347 -0
  174. package/dist/cjs/schemas/reservation.json +137 -0
  175. package/dist/cjs/schemas/room.json +98 -0
  176. package/dist/cjs/schemas/scene.json +121 -0
  177. package/dist/cjs/schemas/shortLink.json +30 -0
  178. package/dist/cjs/schemas/smsMessage.json +61 -0
  179. package/dist/cjs/schemas/space.json +129 -0
  180. package/dist/cjs/schemas/switch.json +44 -0
  181. package/dist/cjs/schemas/systemUser.json +98 -0
  182. package/dist/cjs/schemas/thermostat.json +150 -0
  183. package/dist/cjs/schemas/ticket.json +176 -0
  184. package/dist/cjs/schemas/user.json +170 -0
  185. package/dist/cjs/schemas/windowCovering.json +42 -0
  186. package/dist/cjs/utils/errorFactory.js +8 -0
  187. package/dist/cjs/utils/eventFactory.js +10 -0
  188. package/dist/cjs/utils/getDeviceTypes.js +7 -0
  189. package/dist/cjs/utils/getFormalDeviceType.js +5 -0
  190. package/dist/cjs/utils/index.js +11 -0
  191. package/dist/cjs/utils/schema.js +25 -0
  192. package/dist/esm/Client.js +2013 -637
  193. package/dist/esm/Client.js.map +4 -4
  194. package/dist/esm/Commands.js +499 -120
  195. package/dist/esm/Commands.js.map +3 -3
  196. package/dist/esm/Errors.js +73 -22
  197. package/dist/esm/Errors.js.map +3 -3
  198. package/dist/esm/Events.js +414 -73
  199. package/dist/esm/Events.js.map +3 -3
  200. package/dist/esm/Models.js +3297 -3915
  201. package/dist/esm/Models.js.map +4 -4
  202. package/dist/esm/SocketIoClient.js +4846 -0
  203. package/dist/esm/SocketIoClient.js.map +7 -0
  204. package/dist/esm/defs.js +168 -112
  205. package/dist/esm/defs.js.map +4 -4
  206. package/dist/esm/index.js +17 -10
  207. package/dist/esm/utils.js +451 -73
  208. package/dist/esm/utils.js.map +3 -3
  209. package/dist/useCases/AdminUpdateCustomer.js +1 -1
  210. package/dist/useCases/AssignSpaceToReservation.js +32 -0
  211. package/dist/useCases/{AdminCreateProperty.js → BatchNotifyCheckIn.js} +2 -2
  212. package/dist/useCases/{AdminCreateCustomer.js → BatchNotifyCheckOut.js} +2 -2
  213. package/dist/useCases/BatchNotifyMissedCheckOut.js +32 -0
  214. package/dist/useCases/{AdminUpdateProperty.js → CheckOutReservation.js} +3 -3
  215. package/dist/useCases/{AdminListCustomers.js → CreateAnnouncement.js} +3 -3
  216. package/dist/useCases/CreateCateory.js +32 -0
  217. package/dist/useCases/CreateImageUploadEndpoint.js +32 -0
  218. package/dist/useCases/CreateMediaSource.js +32 -0
  219. package/dist/useCases/CreateOrganization.js +32 -0
  220. package/dist/useCases/{AdminLoginUser.js → CreateProperty.js} +2 -2
  221. package/dist/useCases/DeleteAnnouncement.js +32 -0
  222. package/dist/useCases/DeleteCategory.js +32 -0
  223. package/dist/useCases/DeleteMediaFile.js +32 -0
  224. package/dist/useCases/DeleteMediaSource.js +32 -0
  225. package/dist/useCases/{AdminCreateAdminUser.js → DescribeAnnouncement.js} +4 -4
  226. package/dist/useCases/{ListIntegrations.js → DescribeCategory.js} +3 -3
  227. package/dist/useCases/{DeleteSource.js → DescribeLockCredential.js} +3 -3
  228. package/dist/useCases/{AdminListAdminUsers.js → DescribeMediaSource.js} +3 -3
  229. package/dist/useCases/DescribeMyAccessCredentials.js +32 -0
  230. package/dist/useCases/{AdminDescribeCustomer.js → DescribeOrganization.js} +2 -2
  231. package/dist/useCases/{DescribeIntegration.js → DescribeProduct.js} +2 -2
  232. package/dist/useCases/DescribeProperty.js +32 -0
  233. package/dist/useCases/DescribeReservationEarlyCheckInProducts.js +32 -0
  234. package/dist/useCases/DescribeReservationLateCheckOutProducts.js +32 -0
  235. package/dist/useCases/{AdminDescribeProperty.js → DescribeReservationRoomUpgrades.js} +2 -2
  236. package/dist/useCases/{AdminRefreshToken.js → ListAnnouncements.js} +3 -3
  237. package/dist/useCases/ListCategories.js +32 -0
  238. package/dist/useCases/ListMediaSources.js +32 -0
  239. package/dist/useCases/{CreateSource.js → ListMyOrders.js} +4 -4
  240. package/dist/useCases/{AdminListProperties.js → ListMyTickets.js} +2 -2
  241. package/dist/useCases/ListOrders.js +32 -0
  242. package/dist/useCases/{DeleteIntegration.js → ListOrganizations.js} +3 -3
  243. package/dist/useCases/ListProperties.js +32 -0
  244. package/dist/useCases/ListScenes.js +32 -0
  245. package/dist/useCases/ListTeam.js +32 -0
  246. package/dist/useCases/ListUserOrders.js +32 -0
  247. package/dist/useCases/ListUserSpaces.js +32 -0
  248. package/dist/useCases/LogoutUser.js +32 -0
  249. package/dist/useCases/PurchaseReservationEarlyCheckInProducts.js +32 -0
  250. package/dist/useCases/PurchaseReservationLateCheckOutProducts.js +32 -0
  251. package/dist/useCases/{CreateIntegrationDeviceMapEntry.js → PurchaseReservationRoomUpgrades.js} +2 -2
  252. package/dist/useCases/RequestLoginLink.js +1 -1
  253. package/dist/useCases/{CreateIntegration.js → RequestMyKeyToken.js} +2 -2
  254. package/dist/useCases/RequestPWAToken.js +32 -0
  255. package/dist/useCases/SendCheckInSMS.js +32 -0
  256. package/dist/useCases/SendCheckOutSMS.js +32 -0
  257. package/dist/useCases/SendRoomControlSMS.js +32 -0
  258. package/dist/useCases/{SetSource.js → SetDimmer.js} +2 -2
  259. package/dist/useCases/{DescribeSource.js → SetMediaSource.js} +3 -3
  260. package/dist/useCases/{UpdateSource.js → SetRoomScene.js} +3 -3
  261. package/dist/useCases/SetSpaceScene.js +32 -0
  262. package/dist/useCases/TipUser.js +32 -0
  263. package/dist/useCases/UpdateAnnouncement.js +32 -0
  264. package/dist/useCases/UpdateCategory.js +32 -0
  265. package/dist/useCases/{UpdateIntegration.js → UpdateMediaSource.js} +3 -3
  266. package/dist/useCases/UpdateProperty.js +32 -0
  267. package/dist/useCases/UpdateReservationExpectedArrivalTime.js +32 -0
  268. package/dist/useCases/{ListSources.js → UploadImage.js} +4 -4
  269. package/package.json +37 -14
  270. package/dist/cjs/Commands.js +0 -643
  271. package/dist/cjs/Errors.js +0 -176
  272. package/dist/cjs/Events.js +0 -387
  273. package/dist/cjs/Models.js +0 -3612
  274. package/dist/cjs/defs.js +0 -178
  275. package/dist/cjs/utils.js +0 -250
  276. package/dist/useCases/AdminRequestLoginLink.js +0 -32
  277. package/dist/useCases/DescribeReservationCheckinStatus.js +0 -32
@@ -9,6 +9,9 @@ var __commonJS = (cb, mod) => function __require() {
9
9
  var require_Command = __commonJS({
10
10
  "src/Commands/Command.js"(exports, module) {
11
11
  var Command = class {
12
+ static {
13
+ __name(this, "Command");
14
+ }
12
15
  constructor(data) {
13
16
  this.data = {};
14
17
  if (!data)
@@ -31,23 +34,44 @@ var require_Command = __commonJS({
31
34
  get exchange() {
32
35
  return "Commands";
33
36
  }
34
- get replyTo() {
35
- return "amq.rabbitmq.reply-to";
36
- }
37
37
  build() {
38
38
  return { data: { ...this.data } };
39
39
  }
40
40
  };
41
- __name(Command, "Command");
42
41
  module.exports = Command;
43
42
  }
44
43
  });
45
44
 
45
+ // src/Commands/SetSceneCommand.js
46
+ var require_SetSceneCommand = __commonJS({
47
+ "src/Commands/SetSceneCommand.js"(exports, module) {
48
+ var Command = require_Command();
49
+ var SetSceneCommand = class extends Command {
50
+ static {
51
+ __name(this, "SetSceneCommand");
52
+ }
53
+ constructor({ id, devices, ...rest }) {
54
+ super({ id, devices, ...rest });
55
+ }
56
+ get name() {
57
+ return "SetScene";
58
+ }
59
+ get routingKey() {
60
+ return `scene.${this.data.id}.set`;
61
+ }
62
+ };
63
+ module.exports = SetSceneCommand;
64
+ }
65
+ });
66
+
46
67
  // src/Commands/SetAlarmCommand.js
47
68
  var require_SetAlarmCommand = __commonJS({
48
69
  "src/Commands/SetAlarmCommand.js"(exports, module) {
49
70
  var Command = require_Command();
50
71
  var SetAlarmCommand = class extends Command {
72
+ static {
73
+ __name(this, "SetAlarmCommand");
74
+ }
51
75
  constructor({ id, zones, areas }) {
52
76
  super({ id, zones, areas });
53
77
  }
@@ -57,11 +81,7 @@ var require_SetAlarmCommand = __commonJS({
57
81
  get routingKey() {
58
82
  return `alarm.${this.data.id}.set`;
59
83
  }
60
- get replyTo() {
61
- return "system.response.devices";
62
- }
63
84
  };
64
- __name(SetAlarmCommand, "SetAlarmCommand");
65
85
  module.exports = SetAlarmCommand;
66
86
  }
67
87
  });
@@ -71,6 +91,9 @@ var require_SetDimmerCommand = __commonJS({
71
91
  "src/Commands/SetDimmerCommand.js"(exports, module) {
72
92
  var Command = require_Command();
73
93
  var SetDimmerCommand = class extends Command {
94
+ static {
95
+ __name(this, "SetDimmerCommand");
96
+ }
74
97
  constructor({ id, level }) {
75
98
  super({ id, level });
76
99
  }
@@ -80,11 +103,7 @@ var require_SetDimmerCommand = __commonJS({
80
103
  get routingKey() {
81
104
  return `dimmer.${this.data.id}.set`;
82
105
  }
83
- get replyTo() {
84
- return "system.response.devices";
85
- }
86
106
  };
87
- __name(SetDimmerCommand, "SetDimmerCommand");
88
107
  module.exports = SetDimmerCommand;
89
108
  }
90
109
  });
@@ -94,6 +113,9 @@ var require_SetSwitchCommand = __commonJS({
94
113
  "src/Commands/SetSwitchCommand.js"(exports, module) {
95
114
  var Command = require_Command();
96
115
  var SetSwitchCommand = class extends Command {
116
+ static {
117
+ __name(this, "SetSwitchCommand");
118
+ }
97
119
  constructor({ id, state }) {
98
120
  super({ id, state });
99
121
  }
@@ -103,11 +125,7 @@ var require_SetSwitchCommand = __commonJS({
103
125
  get routingKey() {
104
126
  return `switch.${this.data.id}.set`;
105
127
  }
106
- get replyTo() {
107
- return "system.response.devices";
108
- }
109
128
  };
110
- __name(SetSwitchCommand, "SetSwitchCommand");
111
129
  module.exports = SetSwitchCommand;
112
130
  }
113
131
  });
@@ -117,6 +135,9 @@ var require_SetThermostatCommand = __commonJS({
117
135
  "src/Commands/SetThermostatCommand.js"(exports, module) {
118
136
  var Command = require_Command();
119
137
  var SetThermostatCommand = class extends Command {
138
+ static {
139
+ __name(this, "SetThermostatCommand");
140
+ }
120
141
  constructor({ id, setpoints, hvacMode, fanMode }) {
121
142
  super({ id, setpoints, hvacMode, fanMode });
122
143
  }
@@ -126,11 +147,7 @@ var require_SetThermostatCommand = __commonJS({
126
147
  get routingKey() {
127
148
  return `thermostat.${this.data.id}.set`;
128
149
  }
129
- get replyTo() {
130
- return "system.response.devices";
131
- }
132
150
  };
133
- __name(SetThermostatCommand, "SetThermostatCommand");
134
151
  module.exports = SetThermostatCommand;
135
152
  }
136
153
  });
@@ -140,6 +157,9 @@ var require_SetLockCommand = __commonJS({
140
157
  "src/Commands/SetLockCommand.js"(exports, module) {
141
158
  var Command = require_Command();
142
159
  var SetLockCommand = class extends Command {
160
+ static {
161
+ __name(this, "SetLockCommand");
162
+ }
143
163
  constructor({ id, state }) {
144
164
  super({ id, state });
145
165
  }
@@ -149,43 +169,19 @@ var require_SetLockCommand = __commonJS({
149
169
  get routingKey() {
150
170
  return `lock.${this.data.id}.set`;
151
171
  }
152
- get replyTo() {
153
- return "system.response.devices";
154
- }
155
172
  };
156
- __name(SetLockCommand, "SetLockCommand");
157
173
  module.exports = SetLockCommand;
158
174
  }
159
175
  });
160
176
 
161
- // src/Commands/SetSceneControllerCommand.js
162
- var require_SetSceneControllerCommand = __commonJS({
163
- "src/Commands/SetSceneControllerCommand.js"(exports, module) {
164
- var Command = require_Command();
165
- var SetSceneControllerCommand = class extends Command {
166
- constructor({ id, scene }) {
167
- super({ id, scene });
168
- }
169
- get name() {
170
- return "SetSceneController";
171
- }
172
- get routingKey() {
173
- return `sceneController.${this.data.id}.set`;
174
- }
175
- get replyTo() {
176
- return "system.response.devices";
177
- }
178
- };
179
- __name(SetSceneControllerCommand, "SetSceneControllerCommand");
180
- module.exports = SetSceneControllerCommand;
181
- }
182
- });
183
-
184
177
  // src/Commands/SetWindowCoveringCommand.js
185
178
  var require_SetWindowCoveringCommand = __commonJS({
186
179
  "src/Commands/SetWindowCoveringCommand.js"(exports, module) {
187
180
  var Command = require_Command();
188
181
  var SetWindowCoveringCommand = class extends Command {
182
+ static {
183
+ __name(this, "SetWindowCoveringCommand");
184
+ }
189
185
  constructor({ id, position }) {
190
186
  super({ id, position });
191
187
  }
@@ -195,11 +191,7 @@ var require_SetWindowCoveringCommand = __commonJS({
195
191
  get routingKey() {
196
192
  return `windowCovering.${this.data.id}.set`;
197
193
  }
198
- get replyTo() {
199
- return "system.response.devices";
200
- }
201
194
  };
202
- __name(SetWindowCoveringCommand, "SetWindowCoveringCommand");
203
195
  module.exports = SetWindowCoveringCommand;
204
196
  }
205
197
  });
@@ -209,6 +201,9 @@ var require_SetCourtesyCommand = __commonJS({
209
201
  "src/Commands/SetCourtesyCommand.js"(exports, module) {
210
202
  var Command = require_Command();
211
203
  var SetCourtesyCommand = class extends Command {
204
+ static {
205
+ __name(this, "SetCourtesyCommand");
206
+ }
212
207
  constructor({ id, state }) {
213
208
  super({ id, state });
214
209
  }
@@ -218,34 +213,55 @@ var require_SetCourtesyCommand = __commonJS({
218
213
  get routingKey() {
219
214
  return `courtesy.${this.data.id}.set`;
220
215
  }
221
- get replyTo() {
222
- return "system.response.devices";
223
- }
224
216
  };
225
- __name(SetCourtesyCommand, "SetCourtesyCommand");
226
217
  module.exports = SetCourtesyCommand;
227
218
  }
228
219
  });
229
220
 
221
+ // src/Commands/SetMediaCommand.js
222
+ var require_SetMediaCommand = __commonJS({
223
+ "src/Commands/SetMediaCommand.js"(exports, module) {
224
+ var Command = require_Command();
225
+ var SetMediaCommand = class extends Command {
226
+ static {
227
+ __name(this, "SetMediaCommand");
228
+ }
229
+ constructor({ id, command, ...rest }) {
230
+ super({ id, command, ...rest });
231
+ }
232
+ get name() {
233
+ return "SetMedia";
234
+ }
235
+ get routingKey() {
236
+ return `mediaSource.${this.data.id}.set`;
237
+ }
238
+ };
239
+ module.exports = SetMediaCommand;
240
+ }
241
+ });
242
+
230
243
  // src/Commands/DiscoverUsersCommand.js
231
244
  var require_DiscoverUsersCommand = __commonJS({
232
245
  "src/Commands/DiscoverUsersCommand.js"(exports, module) {
233
246
  var Command = require_Command();
234
247
  var DiscoverUsersCommand = class extends Command {
235
- constructor({ id }) {
236
- super({ id });
248
+ static {
249
+ __name(this, "DiscoverUsersCommand");
250
+ }
251
+ constructor({ id, ...rest }) {
252
+ super({ id, ...rest });
237
253
  }
238
254
  get name() {
239
255
  return "DiscoverUsers";
240
256
  }
241
257
  get routingKey() {
242
- return `users.${this.data.id}.get`;
243
- }
244
- get replyTo() {
245
- return "system.response.users";
258
+ if (typeof this.data.id === "string")
259
+ return `users.${this.data.id}.get`;
260
+ if (Array.isArray(this.data.id))
261
+ return "users.batch.get";
262
+ return "users.get";
246
263
  }
247
264
  };
248
- __name(DiscoverUsersCommand, "DiscoverUsersCommand");
249
265
  module.exports = DiscoverUsersCommand;
250
266
  }
251
267
  });
@@ -253,14 +269,17 @@ var require_DiscoverUsersCommand = __commonJS({
253
269
  // src/Errors/AppError.js
254
270
  var require_AppError = __commonJS({
255
271
  "src/Errors/AppError.js"(exports, module) {
256
- module.exports = /* @__PURE__ */ __name(class AppError extends Error {
272
+ module.exports = class AppError extends Error {
273
+ static {
274
+ __name(this, "AppError");
275
+ }
257
276
  constructor(message = "Internal Server Error", options) {
258
277
  super(message, options);
259
278
  this.type = this.constructor.name;
260
279
  this.statusCode = 500;
261
280
  Object.setPrototypeOf(this, AppError.prototype);
262
281
  }
263
- }, "AppError");
282
+ };
264
283
  }
265
284
  });
266
285
 
@@ -268,13 +287,16 @@ var require_AppError = __commonJS({
268
287
  var require_RequestError = __commonJS({
269
288
  "src/Errors/RequestError.js"(exports, module) {
270
289
  var AppError = require_AppError();
271
- module.exports = /* @__PURE__ */ __name(class RequestError extends AppError {
290
+ module.exports = class RequestError extends AppError {
291
+ static {
292
+ __name(this, "RequestError");
293
+ }
272
294
  constructor(message = "Bad Request", options = {}) {
273
295
  super(message, options);
274
296
  this.statusCode = 400;
275
297
  Object.setPrototypeOf(this, RequestError.prototype);
276
298
  }
277
- }, "RequestError");
299
+ };
278
300
  }
279
301
  });
280
302
 
@@ -284,9 +306,10 @@ var require_OCRDocumentCommand = __commonJS({
284
306
  var Command = require_Command();
285
307
  var RequestError = require_RequestError();
286
308
  var OCRDocumentCommand = class extends Command {
309
+ static {
310
+ __name(this, "OCRDocumentCommand");
311
+ }
287
312
  constructor({ type, image }) {
288
- if (!type)
289
- throw new RequestError("document type is required");
290
313
  if (!image)
291
314
  throw new RequestError("document image is required");
292
315
  super({ type, image });
@@ -294,11 +317,7 @@ var require_OCRDocumentCommand = __commonJS({
294
317
  get name() {
295
318
  return "OCRDocument";
296
319
  }
297
- get routingKey() {
298
- return `document.${this.data.type}.ocr`;
299
- }
300
320
  };
301
- __name(OCRDocumentCommand, "OCRDocumentCommand");
302
321
  module.exports = OCRDocumentCommand;
303
322
  }
304
323
  });
@@ -309,10 +328,13 @@ var require_CheckInReservationCommand = __commonJS({
309
328
  var Command = require_Command();
310
329
  var RequestError = require_RequestError();
311
330
  var CheckInReservationCommand = class extends Command {
312
- constructor({ id }) {
331
+ static {
332
+ __name(this, "CheckInReservationCommand");
333
+ }
334
+ constructor({ id, ...rest }) {
313
335
  if (!id)
314
- throw new RequestError("document type is required");
315
- super({ id });
336
+ throw new RequestError("reservation id is required");
337
+ super({ id, ...rest });
316
338
  }
317
339
  get name() {
318
340
  return "CheckInReservation";
@@ -320,22 +342,48 @@ var require_CheckInReservationCommand = __commonJS({
320
342
  get routingKey() {
321
343
  return `reservation.${this.data.id}.checkin`;
322
344
  }
323
- get replyTo() {
324
- return "system.response.reservations";
325
- }
326
345
  };
327
- __name(CheckInReservationCommand, "CheckInReservationCommand");
328
346
  module.exports = CheckInReservationCommand;
329
347
  }
330
348
  });
331
349
 
350
+ // src/Commands/CheckOutReservationCommand.js
351
+ var require_CheckOutReservationCommand = __commonJS({
352
+ "src/Commands/CheckOutReservationCommand.js"(exports, module) {
353
+ var Command = require_Command();
354
+ var RequestError = require_RequestError();
355
+ var CheckOutReservationCommand = class extends Command {
356
+ static {
357
+ __name(this, "CheckOutReservationCommand");
358
+ }
359
+ constructor({ reservationId, userId, ...rest }) {
360
+ if (!reservationId)
361
+ throw new RequestError("reservation id is required");
362
+ if (!userId)
363
+ throw new RequestError("user id is required");
364
+ super({ reservationId, userId, ...rest });
365
+ }
366
+ get name() {
367
+ return "CheckOutReservation";
368
+ }
369
+ get routingKey() {
370
+ return `reservation.${this.data.id}.checkout`;
371
+ }
372
+ };
373
+ module.exports = CheckOutReservationCommand;
374
+ }
375
+ });
376
+
332
377
  // src/Commands/SendEmailCommand.js
333
378
  var require_SendEmailCommand = __commonJS({
334
379
  "src/Commands/SendEmailCommand.js"(exports, module) {
335
380
  var Command = require_Command();
336
381
  var RequestError = require_RequestError();
337
382
  var SendEmailCommand = class extends Command {
338
- constructor({ text, html, to, from, subject, eventData }) {
383
+ static {
384
+ __name(this, "SendEmailCommand");
385
+ }
386
+ constructor({ text, html, to, from, subject, ...rest }) {
339
387
  if (!to)
340
388
  throw new RequestError("email to is required");
341
389
  if (!from)
@@ -344,7 +392,7 @@ var require_SendEmailCommand = __commonJS({
344
392
  throw new RequestError("email subject is required");
345
393
  if (!text && !html)
346
394
  throw new RequestError("email text or html is required");
347
- super({ text, html, to, from, subject, eventData });
395
+ super({ text, html, to, from, subject, ...rest });
348
396
  }
349
397
  get name() {
350
398
  return "SendEmail";
@@ -353,7 +401,6 @@ var require_SendEmailCommand = __commonJS({
353
401
  return "comm.email.send";
354
402
  }
355
403
  };
356
- __name(SendEmailCommand, "SendEmailCommand");
357
404
  module.exports = SendEmailCommand;
358
405
  }
359
406
  });
@@ -364,14 +411,17 @@ var require_SendSMSCommand = __commonJS({
364
411
  var Command = require_Command();
365
412
  var RequestError = require_RequestError();
366
413
  var SendSMSCommand = class extends Command {
367
- constructor({ body, to, from, metaData }) {
414
+ static {
415
+ __name(this, "SendSMSCommand");
416
+ }
417
+ constructor({ id, body, to, from, ...rest }) {
368
418
  if (!body)
369
419
  throw new RequestError("sms body is required");
370
420
  if (!to)
371
421
  throw new RequestError("sms to is required");
372
422
  if (!from)
373
423
  throw new RequestError("sms from is required");
374
- super({ body, to, from, metaData });
424
+ super({ id, body, to, from, ...rest });
375
425
  }
376
426
  get name() {
377
427
  return "SendSMS";
@@ -380,7 +430,6 @@ var require_SendSMSCommand = __commonJS({
380
430
  return "comm.sms.send";
381
431
  }
382
432
  };
383
- __name(SendSMSCommand, "SendSMSCommand");
384
433
  module.exports = SendSMSCommand;
385
434
  }
386
435
  });
@@ -389,13 +438,16 @@ var require_SendSMSCommand = __commonJS({
389
438
  var require_AuthenticationError = __commonJS({
390
439
  "src/Errors/AuthenticationError.js"(exports, module) {
391
440
  var AppError = require_AppError();
392
- module.exports = /* @__PURE__ */ __name(class AuthenticationError extends AppError {
441
+ module.exports = class AuthenticationError extends AppError {
442
+ static {
443
+ __name(this, "AuthenticationError");
444
+ }
393
445
  constructor(message = "Authentication Error", options = {}) {
394
446
  super(message, options);
395
447
  this.statusCode = 401;
396
448
  Object.setPrototypeOf(this, AuthenticationError.prototype);
397
449
  }
398
- }, "AuthenticationError");
450
+ };
399
451
  }
400
452
  });
401
453
 
@@ -403,13 +455,33 @@ var require_AuthenticationError = __commonJS({
403
455
  var require_AuthorizationError = __commonJS({
404
456
  "src/Errors/AuthorizationError.js"(exports, module) {
405
457
  var AppError = require_AppError();
406
- module.exports = /* @__PURE__ */ __name(class AuthorizationError extends AppError {
458
+ module.exports = class AuthorizationError extends AppError {
459
+ static {
460
+ __name(this, "AuthorizationError");
461
+ }
407
462
  constructor(message = "Authorization Error", options = {}) {
408
463
  super(message, options);
409
464
  this.statusCode = 403;
410
465
  Object.setPrototypeOf(this, AuthorizationError.prototype);
411
466
  }
412
- }, "AuthorizationError");
467
+ };
468
+ }
469
+ });
470
+
471
+ // src/Errors/ConflictError.js
472
+ var require_ConflictError = __commonJS({
473
+ "src/Errors/ConflictError.js"(exports, module) {
474
+ var AppError = require_AppError();
475
+ module.exports = class ConflictError extends AppError {
476
+ static {
477
+ __name(this, "ConflictError");
478
+ }
479
+ constructor(message = "Bad Request", options = {}) {
480
+ super(message, options);
481
+ this.statusCode = 409;
482
+ Object.setPrototypeOf(this, ConflictError.prototype);
483
+ }
484
+ };
413
485
  }
414
486
  });
415
487
 
@@ -417,13 +489,16 @@ var require_AuthorizationError = __commonJS({
417
489
  var require_DeviceCommError = __commonJS({
418
490
  "src/Errors/DeviceCommError.js"(exports, module) {
419
491
  var AppError = require_AppError();
420
- module.exports = /* @__PURE__ */ __name(class DeviceCommError extends AppError {
492
+ module.exports = class DeviceCommError extends AppError {
493
+ static {
494
+ __name(this, "DeviceCommError");
495
+ }
421
496
  constructor(message = "Device Communication Error", options = {}) {
422
497
  super(message, options);
423
498
  this.statusCode = 503;
424
499
  Object.setPrototypeOf(this, DeviceCommError.prototype);
425
500
  }
426
- }, "DeviceCommError");
501
+ };
427
502
  }
428
503
  });
429
504
 
@@ -431,13 +506,16 @@ var require_DeviceCommError = __commonJS({
431
506
  var require_LoginError = __commonJS({
432
507
  "src/Errors/LoginError.js"(exports, module) {
433
508
  var AppError = require_AppError();
434
- module.exports = /* @__PURE__ */ __name(class LoginError extends AppError {
509
+ module.exports = class LoginError extends AppError {
510
+ static {
511
+ __name(this, "LoginError");
512
+ }
435
513
  constructor(message = "Invalid Login information provided", options = {}) {
436
514
  super(message, options);
437
515
  this.statusCode = 401;
438
516
  Object.setPrototypeOf(this, LoginError.prototype);
439
517
  }
440
- }, "LoginError");
518
+ };
441
519
  }
442
520
  });
443
521
 
@@ -445,13 +523,16 @@ var require_LoginError = __commonJS({
445
523
  var require_NotFoundError = __commonJS({
446
524
  "src/Errors/NotFoundError.js"(exports, module) {
447
525
  var AppError = require_AppError();
448
- module.exports = /* @__PURE__ */ __name(class NotFoundError extends AppError {
526
+ module.exports = class NotFoundError extends AppError {
527
+ static {
528
+ __name(this, "NotFoundError");
529
+ }
449
530
  constructor(message = "Resource Not Found", options = {}) {
450
531
  super(message, options);
451
532
  this.statusCode = 404;
452
533
  Object.setPrototypeOf(this, NotFoundError.prototype);
453
534
  }
454
- }, "NotFoundError");
535
+ };
455
536
  }
456
537
  });
457
538
 
@@ -459,13 +540,16 @@ var require_NotFoundError = __commonJS({
459
540
  var require_SystemCommError = __commonJS({
460
541
  "src/Errors/SystemCommError.js"(exports, module) {
461
542
  var AppError = require_AppError();
462
- module.exports = /* @__PURE__ */ __name(class SystemCommError extends AppError {
543
+ module.exports = class SystemCommError extends AppError {
544
+ static {
545
+ __name(this, "SystemCommError");
546
+ }
463
547
  constructor(message = "System Communication Error", options = {}) {
464
548
  super(message, options);
465
549
  this.statusCode = 503;
466
550
  Object.setPrototypeOf(this, SystemCommError.prototype);
467
551
  }
468
- }, "SystemCommError");
552
+ };
469
553
  }
470
554
  });
471
555
 
@@ -473,13 +557,16 @@ var require_SystemCommError = __commonJS({
473
557
  var require_TokenExpiredError = __commonJS({
474
558
  "src/Errors/TokenExpiredError.js"(exports, module) {
475
559
  var AppError = require_AppError();
476
- module.exports = /* @__PURE__ */ __name(class TokenExpiredError extends AppError {
560
+ module.exports = class TokenExpiredError extends AppError {
561
+ static {
562
+ __name(this, "TokenExpiredError");
563
+ }
477
564
  constructor(message = "Token Expired", options = {}) {
478
565
  super(message, options);
479
566
  this.statusCode = 401;
480
567
  Object.setPrototypeOf(this, TokenExpiredError.prototype);
481
568
  }
482
- }, "TokenExpiredError");
569
+ };
483
570
  }
484
571
  });
485
572
 
@@ -487,13 +574,16 @@ var require_TokenExpiredError = __commonJS({
487
574
  var require_UnprocessableRequestError = __commonJS({
488
575
  "src/Errors/UnprocessableRequestError.js"(exports, module) {
489
576
  var AppError = require_AppError();
490
- module.exports = /* @__PURE__ */ __name(class UnprocessableRequestError extends AppError {
577
+ module.exports = class UnprocessableRequestError extends AppError {
578
+ static {
579
+ __name(this, "UnprocessableRequestError");
580
+ }
491
581
  constructor(message = "Unprocessable Request Error", options = {}) {
492
582
  super(message, options);
493
583
  this.statusCode = 422;
494
584
  Object.setPrototypeOf(this, UnprocessableRequestError.prototype);
495
585
  }
496
- }, "UnprocessableRequestError");
586
+ };
497
587
  }
498
588
  });
499
589
 
@@ -501,13 +591,16 @@ var require_UnprocessableRequestError = __commonJS({
501
591
  var require_ValidationError = __commonJS({
502
592
  "src/Errors/ValidationError.js"(exports, module) {
503
593
  var AppError = require_AppError();
504
- module.exports = /* @__PURE__ */ __name(class ValidationError extends AppError {
594
+ module.exports = class ValidationError extends AppError {
595
+ static {
596
+ __name(this, "ValidationError");
597
+ }
505
598
  constructor(message = "Validation Error", options = {}) {
506
599
  super(message, options);
507
600
  this.statusCode = 400;
508
601
  Object.setPrototypeOf(this, ValidationError.prototype);
509
602
  }
510
- }, "ValidationError");
603
+ };
511
604
  }
512
605
  });
513
606
 
@@ -518,6 +611,7 @@ var require_Errors = __commonJS({
518
611
  AppError: require_AppError(),
519
612
  AuthenticationError: require_AuthenticationError(),
520
613
  AuthorizationError: require_AuthorizationError(),
614
+ ConflictError: require_ConflictError(),
521
615
  DeviceCommError: require_DeviceCommError(),
522
616
  LoginError: require_LoginError(),
523
617
  NotFoundError: require_NotFoundError(),
@@ -537,11 +631,14 @@ var require_DiscoverReservationsCommand = __commonJS({
537
631
  var { RequestError } = require_Errors();
538
632
  var Command = require_Command();
539
633
  var DiscoverReservationsCommand = class extends Command {
634
+ static {
635
+ __name(this, "DiscoverReservationsCommand");
636
+ }
540
637
  constructor(options) {
541
638
  if (!options)
542
639
  throw new RequestError("options are required");
543
- const { id, startDate, endDate, status } = options;
544
- super({ id, startDate, endDate, status });
640
+ const { id, startDate, endDate, status, ...rest } = options;
641
+ super({ id, startDate, endDate, status, ...rest });
545
642
  }
546
643
  get name() {
547
644
  return "DiscoverReservations";
@@ -549,44 +646,116 @@ var require_DiscoverReservationsCommand = __commonJS({
549
646
  get routingKey() {
550
647
  return "reservation.discover";
551
648
  }
552
- get replyTo() {
553
- return "system.response.reservations";
554
- }
555
649
  };
556
- __name(DiscoverReservationsCommand, "DiscoverReservationsCommand");
557
650
  module.exports = DiscoverReservationsCommand;
558
651
  }
559
652
  });
560
653
 
654
+ // src/Commands/DiscoverReservationSpaceCategoryAvailabilitiesCommand.js
655
+ var require_DiscoverReservationSpaceCategoryAvailabilitiesCommand = __commonJS({
656
+ "src/Commands/DiscoverReservationSpaceCategoryAvailabilitiesCommand.js"(exports, module) {
657
+ var { RequestError } = require_Errors();
658
+ var Command = require_Command();
659
+ var DiscoverReservationSpaceCategoryAvailabilitiesCommand = class extends Command {
660
+ static {
661
+ __name(this, "DiscoverReservationSpaceCategoryAvailabilitiesCommand");
662
+ }
663
+ constructor(options) {
664
+ if (!options)
665
+ throw new RequestError("options are required");
666
+ const { id, ...rest } = options;
667
+ super({ id, ...rest });
668
+ }
669
+ get name() {
670
+ return "DiscoverReservationSpaceCategoryAvailabilities";
671
+ }
672
+ get routingKey() {
673
+ return "reservation.discoverRoomUpsells";
674
+ }
675
+ };
676
+ module.exports = DiscoverReservationSpaceCategoryAvailabilitiesCommand;
677
+ }
678
+ });
679
+
561
680
  // src/Commands/DiscoverRoomsCommand.js
562
681
  var require_DiscoverRoomsCommand = __commonJS({
563
682
  "src/Commands/DiscoverRoomsCommand.js"(exports, module) {
564
683
  var Command = require_Command();
565
684
  var DiscoverRoomsCommand = class extends Command {
566
- constructor({ id }) {
567
- super({ id });
685
+ static {
686
+ __name(this, "DiscoverRoomsCommand");
687
+ }
688
+ constructor({
689
+ id,
690
+ types,
691
+ categories,
692
+ startDate,
693
+ endDate,
694
+ serviceStatus,
695
+ housekeepingStatus,
696
+ ...rest
697
+ }) {
698
+ super({
699
+ id,
700
+ types,
701
+ categories,
702
+ startDate,
703
+ endDate,
704
+ serviceStatus,
705
+ housekeepingStatus,
706
+ ...rest
707
+ });
568
708
  }
569
709
  get name() {
570
710
  return "DiscoverRooms";
571
711
  }
572
712
  get routingKey() {
573
- return `rooms.${this.data.id}.get`;
574
- }
575
- get replyTo() {
576
- return "system.response.users";
713
+ if (typeof this.data.id === "string")
714
+ return `rooms.${this.data.id}.get`;
715
+ if (Array.isArray(this.data.id))
716
+ return "rooms.batch.get";
717
+ return "rooms.get";
577
718
  }
578
719
  };
579
- __name(DiscoverRoomsCommand, "DiscoverRoomsCommand");
580
720
  module.exports = DiscoverRoomsCommand;
581
721
  }
582
722
  });
583
723
 
724
+ // src/Commands/DiscoverCategoriesCommand.js
725
+ var require_DiscoverCategoriesCommand = __commonJS({
726
+ "src/Commands/DiscoverCategoriesCommand.js"(exports, module) {
727
+ var Command = require_Command();
728
+ var DiscoverCategoriesCommand = class extends Command {
729
+ static {
730
+ __name(this, "DiscoverCategoriesCommand");
731
+ }
732
+ constructor({ id, ...rest }) {
733
+ super({ id, ...rest });
734
+ }
735
+ get name() {
736
+ return "DiscoverCategories";
737
+ }
738
+ get routingKey() {
739
+ if (typeof this.data.id === "string")
740
+ return `categories.${this.data.id}.get`;
741
+ if (Array.isArray(this.data.id))
742
+ return "categories.batch.get";
743
+ return "categories.get";
744
+ }
745
+ };
746
+ module.exports = DiscoverCategoriesCommand;
747
+ }
748
+ });
749
+
584
750
  // src/Commands/CreateShortLinkCommand.js
585
751
  var require_CreateShortLinkCommand = __commonJS({
586
752
  "src/Commands/CreateShortLinkCommand.js"(exports, module) {
587
753
  var Command = require_Command();
588
754
  var RequestError = require_RequestError();
589
755
  var CreateShortLinkCommand = class extends Command {
756
+ static {
757
+ __name(this, "CreateShortLinkCommand");
758
+ }
590
759
  constructor({ title, destination }) {
591
760
  if (!title)
592
761
  throw new RequestError("title is required");
@@ -601,47 +770,257 @@ var require_CreateShortLinkCommand = __commonJS({
601
770
  return "comm.shortlink.create";
602
771
  }
603
772
  };
604
- __name(CreateShortLinkCommand, "CreateShortLinkCommand");
605
773
  module.exports = CreateShortLinkCommand;
606
774
  }
607
775
  });
608
776
 
777
+ // src/Commands/UpdateReservationCommand.js
778
+ var require_UpdateReservationCommand = __commonJS({
779
+ "src/Commands/UpdateReservationCommand.js"(exports, module) {
780
+ var Command = require_Command();
781
+ var RequestError = require_RequestError();
782
+ var UpdateReservationCommand = class extends Command {
783
+ static {
784
+ __name(this, "UpdateReservationCommand");
785
+ }
786
+ constructor({ id, ...rest }) {
787
+ if (!id)
788
+ throw new RequestError("document type is required");
789
+ super({ id, ...rest });
790
+ }
791
+ get name() {
792
+ return "UpdateReservation";
793
+ }
794
+ get routingKey() {
795
+ return `reservation.${this.data.id}.update`;
796
+ }
797
+ };
798
+ module.exports = UpdateReservationCommand;
799
+ }
800
+ });
801
+
802
+ // src/Commands/UpdateUserCommand.js
803
+ var require_UpdateUserCommand = __commonJS({
804
+ "src/Commands/UpdateUserCommand.js"(exports, module) {
805
+ var Command = require_Command();
806
+ var RequestError = require_RequestError();
807
+ var UpdateUserCommand = class extends Command {
808
+ static {
809
+ __name(this, "UpdateUserCommand");
810
+ }
811
+ constructor({
812
+ id,
813
+ email,
814
+ phone,
815
+ identification,
816
+ address,
817
+ note,
818
+ nationality,
819
+ file,
820
+ payment,
821
+ ...rest
822
+ }) {
823
+ if (!id)
824
+ throw new RequestError("document type is required");
825
+ super({
826
+ id,
827
+ email,
828
+ phone,
829
+ identification,
830
+ address,
831
+ note,
832
+ nationality,
833
+ file,
834
+ payment,
835
+ ...rest
836
+ });
837
+ }
838
+ get name() {
839
+ return "UpdateUser";
840
+ }
841
+ get routingKey() {
842
+ return `user.${this.data.id}.update`;
843
+ }
844
+ };
845
+ module.exports = UpdateUserCommand;
846
+ }
847
+ });
848
+
849
+ // src/Commands/GetMobileKeyCommand.js
850
+ var require_GetMobileKeyCommand = __commonJS({
851
+ "src/Commands/GetMobileKeyCommand.js"(exports, module) {
852
+ var Command = require_Command();
853
+ var GetMobileKeyCommand = class extends Command {
854
+ static {
855
+ __name(this, "GetMobileKeyCommand");
856
+ }
857
+ constructor({
858
+ id,
859
+ phone,
860
+ beginDateTime,
861
+ endDateTime,
862
+ keyToReplace,
863
+ ...rest
864
+ }) {
865
+ super({ id, phone, beginDateTime, endDateTime, keyToReplace, ...rest });
866
+ }
867
+ get name() {
868
+ return "GetMobileKey";
869
+ }
870
+ get routingKey() {
871
+ return `lock.${this.data.id}.set`;
872
+ }
873
+ };
874
+ module.exports = GetMobileKeyCommand;
875
+ }
876
+ });
877
+
878
+ // src/Commands/CreateImageUploadEndpointCommand.js
879
+ var require_CreateImageUploadEndpointCommand = __commonJS({
880
+ "src/Commands/CreateImageUploadEndpointCommand.js"(exports, module) {
881
+ var Command = require_Command();
882
+ var CreateImageUploadEndpointCommand = class extends Command {
883
+ static {
884
+ __name(this, "CreateImageUploadEndpointCommand");
885
+ }
886
+ constructor({ id, expires, ...rest }) {
887
+ super({ id, expires, ...rest });
888
+ }
889
+ get name() {
890
+ return "CreateImageUploadEndpoint";
891
+ }
892
+ get routingKey() {
893
+ return "image.createUploadEndpoint";
894
+ }
895
+ };
896
+ module.exports = CreateImageUploadEndpointCommand;
897
+ }
898
+ });
899
+
900
+ // src/Commands/UploadImageCommand.js
901
+ var require_UploadImageCommand = __commonJS({
902
+ "src/Commands/UploadImageCommand.js"(exports, module) {
903
+ var Command = require_Command();
904
+ var UploadImageCommand = class extends Command {
905
+ static {
906
+ __name(this, "UploadImageCommand");
907
+ }
908
+ constructor({ id, url, file, ...rest }) {
909
+ super({ id, url, file, ...rest });
910
+ }
911
+ get name() {
912
+ return "UploadImage";
913
+ }
914
+ get routingKey() {
915
+ return `image.${this.data.id}.upload`;
916
+ }
917
+ };
918
+ module.exports = UploadImageCommand;
919
+ }
920
+ });
921
+
922
+ // src/Commands/GetProductsCommand.js
923
+ var require_GetProductsCommand = __commonJS({
924
+ "src/Commands/GetProductsCommand.js"(exports, module) {
925
+ var Command = require_Command();
926
+ var GetProductsCommand = class extends Command {
927
+ static {
928
+ __name(this, "GetProductsCommand");
929
+ }
930
+ constructor({ id, externalSystemId, ...rest }) {
931
+ super({ id, externalSystemId, ...rest });
932
+ }
933
+ get name() {
934
+ return "GetProducts";
935
+ }
936
+ get routingKey() {
937
+ return `product.${this.data.id}.get`;
938
+ }
939
+ };
940
+ module.exports = GetProductsCommand;
941
+ }
942
+ });
943
+
944
+ // src/Commands/SellProductsCommand.js
945
+ var require_SellProductsCommand = __commonJS({
946
+ "src/Commands/SellProductsCommand.js"(exports, module) {
947
+ var Command = require_Command();
948
+ var SellProductsCommand = class extends Command {
949
+ static {
950
+ __name(this, "SellProductsCommand");
951
+ }
952
+ constructor({ reservationId, userId, products, ...rest }) {
953
+ super({ reservationId, userId, products, ...rest });
954
+ }
955
+ get name() {
956
+ return "SellProducts";
957
+ }
958
+ get routingKey() {
959
+ return `product.${this.data.id}.sell`;
960
+ }
961
+ };
962
+ module.exports = SellProductsCommand;
963
+ }
964
+ });
965
+
609
966
  // src/Commands/index.js
610
967
  var require_Commands = __commonJS({
611
968
  "src/Commands/index.js"(exports, module) {
969
+ var SetSceneCommand = require_SetSceneCommand();
612
970
  var SetAlarmCommand = require_SetAlarmCommand();
613
971
  var SetDimmerCommand = require_SetDimmerCommand();
614
972
  var SetSwitchCommand = require_SetSwitchCommand();
615
973
  var SetThermostatCommand = require_SetThermostatCommand();
616
974
  var SetLockCommand = require_SetLockCommand();
617
- var SetSceneControllerCommand = require_SetSceneControllerCommand();
618
975
  var SetWindowCoveringCommand = require_SetWindowCoveringCommand();
619
976
  var SetCourtesyCommand = require_SetCourtesyCommand();
977
+ var SetMediaCommand = require_SetMediaCommand();
620
978
  var DiscoverUsersCommand = require_DiscoverUsersCommand();
621
979
  var OCRDocumentCommand = require_OCRDocumentCommand();
622
980
  var CheckInReservationCommand = require_CheckInReservationCommand();
981
+ var CheckOutReservationCommand = require_CheckOutReservationCommand();
623
982
  var SendEmailCommand = require_SendEmailCommand();
624
983
  var SendSMSCommand = require_SendSMSCommand();
625
984
  var DiscoverReservationsCommand = require_DiscoverReservationsCommand();
985
+ var DiscoverReservationSpaceCategoryAvailabilitiesCommand = require_DiscoverReservationSpaceCategoryAvailabilitiesCommand();
626
986
  var DiscoverRoomsCommand = require_DiscoverRoomsCommand();
987
+ var DiscoverCategoriesCommand = require_DiscoverCategoriesCommand();
627
988
  var CreateShortLinkCommand = require_CreateShortLinkCommand();
989
+ var UpdateReservationCommand = require_UpdateReservationCommand();
990
+ var UpdateUserCommand = require_UpdateUserCommand();
991
+ var GetMobileKeyCommand = require_GetMobileKeyCommand();
992
+ var CreateImageUploadEndpointCommand = require_CreateImageUploadEndpointCommand();
993
+ var UploadImageCommand = require_UploadImageCommand();
994
+ var GetProductsCommand = require_GetProductsCommand();
995
+ var SellProductsCommand = require_SellProductsCommand();
628
996
  module.exports = {
997
+ SetSceneCommand,
629
998
  SetAlarmCommand,
630
999
  SetDimmerCommand,
631
1000
  SetSwitchCommand,
632
1001
  SetThermostatCommand,
633
1002
  SetLockCommand,
634
- SetSceneControllerCommand,
635
1003
  SetWindowCoveringCommand,
636
1004
  SetCourtesyCommand,
1005
+ SetMediaCommand,
637
1006
  OCRDocumentCommand,
638
1007
  DiscoverUsersCommand,
639
1008
  CheckInReservationCommand,
1009
+ CheckOutReservationCommand,
640
1010
  SendSMSCommand,
641
1011
  SendEmailCommand,
642
1012
  DiscoverReservationsCommand,
1013
+ DiscoverReservationSpaceCategoryAvailabilitiesCommand,
643
1014
  DiscoverRoomsCommand,
644
- CreateShortLinkCommand
1015
+ DiscoverCategoriesCommand,
1016
+ CreateShortLinkCommand,
1017
+ UpdateReservationCommand,
1018
+ UpdateUserCommand,
1019
+ GetMobileKeyCommand,
1020
+ CreateImageUploadEndpointCommand,
1021
+ UploadImageCommand,
1022
+ GetProductsCommand,
1023
+ SellProductsCommand
645
1024
  };
646
1025
  }
647
1026
  });