@kohost/api-client 3.0.0-beta.60 → 3.0.0-beta.62

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 (37) hide show
  1. package/dist/cjs/Client/index.js +80 -40
  2. package/dist/cjs/Commands/DiscoverRoomsCommand.js +2 -2
  3. package/dist/cjs/Events/SystemCategoryUpdatedEvent.js +17 -0
  4. package/dist/cjs/Events/index.js +2 -2
  5. package/dist/cjs/Models/Category.js +36 -0
  6. package/dist/cjs/Models/MediaFile.js +1 -0
  7. package/dist/cjs/Models/Ticket.js +1 -0
  8. package/dist/cjs/Models/index.js +2 -2
  9. package/dist/cjs/schemas/{SpaceTypeSchema.d.ts → CategorySchema.d.ts} +3 -2
  10. package/dist/cjs/schemas/PropertySchema.d.ts +1 -0
  11. package/dist/cjs/schemas/ReservationSchema.d.ts +14 -1
  12. package/dist/cjs/schemas/SpaceSchema.d.ts +6 -12
  13. package/dist/cjs/schemas/TicketSchema.d.ts +18 -3
  14. package/dist/cjs/schemas/UserSchema.d.ts +10 -3
  15. package/dist/cjs/schemas/{spaceType.json → category.json} +9 -3
  16. package/dist/cjs/schemas/product.json +2 -1
  17. package/dist/cjs/schemas/property.json +3 -0
  18. package/dist/cjs/schemas/reservation.json +25 -2
  19. package/dist/cjs/schemas/space.json +9 -9
  20. package/dist/cjs/schemas/ticket.json +48 -3
  21. package/dist/esm/Client.js +80 -40
  22. package/dist/esm/Client.js.map +3 -3
  23. package/dist/esm/Commands.js +2 -2
  24. package/dist/esm/Commands.js.map +1 -1
  25. package/dist/esm/Events.js +10 -10
  26. package/dist/esm/Events.js.map +3 -3
  27. package/dist/esm/Models.js +119 -38
  28. package/dist/esm/Models.js.map +3 -3
  29. package/dist/useCases/{CreateSpaceType.js → CreateCateory.js} +2 -2
  30. package/dist/useCases/{DeleteSpaceType.js → DeleteCategory.js} +2 -2
  31. package/dist/useCases/{DescribeSpaceType.js → DescribeCategory.js} +2 -2
  32. package/dist/useCases/{ListSpaceTypes.js → ListCategories.js} +2 -2
  33. package/dist/useCases/TipUser.js +32 -0
  34. package/dist/useCases/{UpdateSpaceType.js → UpdateCategory.js} +2 -2
  35. package/package.json +1 -1
  36. package/dist/cjs/Events/SystemSpaceTypeUpdatedEvent.js +0 -17
  37. package/dist/cjs/Models/SpaceType.js +0 -36
@@ -661,7 +661,7 @@ var require_DiscoverRoomsCommand = __commonJS({
661
661
  constructor({
662
662
  id,
663
663
  types,
664
- spaceTypes,
664
+ categories,
665
665
  startDate,
666
666
  endDate,
667
667
  serviceStatus,
@@ -671,7 +671,7 @@ var require_DiscoverRoomsCommand = __commonJS({
671
671
  super({
672
672
  id,
673
673
  types,
674
- spaceTypes,
674
+ categories,
675
675
  startDate,
676
676
  endDate,
677
677
  serviceStatus,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Commands/Command.js", "../../src/Commands/SetSceneCommand.js", "../../src/Commands/SetAlarmCommand.js", "../../src/Commands/SetDimmerCommand.js", "../../src/Commands/SetSwitchCommand.js", "../../src/Commands/SetThermostatCommand.js", "../../src/Commands/SetLockCommand.js", "../../src/Commands/SetWindowCoveringCommand.js", "../../src/Commands/SetCourtesyCommand.js", "../../src/Commands/SetMediaCommand.js", "../../src/Commands/DiscoverUsersCommand.js", "../../src/Errors/AppError.js", "../../src/Errors/RequestError.js", "../../src/Commands/OCRDocumentCommand.js", "../../src/Commands/CheckInReservationCommand.js", "../../src/Commands/SendEmailCommand.js", "../../src/Commands/SendSMSCommand.js", "../../src/Errors/AuthenticationError.js", "../../src/Errors/AuthorizationError.js", "../../src/Errors/ConflictError.js", "../../src/Errors/DeviceCommError.js", "../../src/Errors/LoginError.js", "../../src/Errors/NotFoundError.js", "../../src/Errors/SystemCommError.js", "../../src/Errors/TokenExpiredError.js", "../../src/Errors/UnprocessableRequestError.js", "../../src/Errors/ValidationError.js", "../../src/Errors/index.js", "../../src/Commands/DiscoverReservationsCommand.js", "../../src/Commands/DiscoverReservationRoomTypeUpsellOptionsCommand.js", "../../src/Commands/DiscoverRoomsCommand.js", "../../src/Commands/DiscoverRoomTypesCommand.js", "../../src/Commands/CreateShortLinkCommand.js", "../../src/Commands/UpdateReservationCommand.js", "../../src/Commands/UpdateUserCommand.js", "../../src/Commands/GetMobileKeyCommand.js", "../../src/Commands/CreateImageUploadEndpointCommand.js", "../../src/Commands/UploadImageCommand.js", "../../src/Commands/GetProductsCommand.js", "../../src/Commands/SellProductsCommand.js", "../../src/Commands/index.js"],
4
- "sourcesContent": ["class Command {\n constructor(data) {\n this.data = {};\n if (!data) throw new Error(\"Command data is required\");\n if (typeof data !== \"object\")\n throw new Error(\"Command data must be an object\");\n\n for (const key in data) {\n this.data[key] = data[key];\n }\n }\n\n get name() {\n throw new Error(\"Command name is required\");\n }\n\n get type() {\n return \"Command\";\n }\n\n get routingKey() {\n return \"\";\n }\n\n get exchange() {\n return \"Commands\";\n }\n\n build() {\n return { data: { ...this.data } };\n }\n}\n\nmodule.exports = Command;\n", "const Command = require(\"./Command\");\n\nclass SetSceneCommand extends Command {\n constructor({ id, devices, ...rest }) {\n super({ id, devices, ...rest });\n }\n\n get name() {\n return \"SetScene\";\n }\n\n get routingKey() {\n return `scene.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetSceneCommand;\n", "const Command = require(\"./Command\");\n\nclass SetAlarmCommand extends Command {\n constructor({ id, zones, areas }) {\n super({ id, zones, areas });\n }\n\n get name() {\n return \"SetAlarm\";\n }\n\n get routingKey() {\n return `alarm.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetAlarmCommand;\n", "const Command = require(\"./Command\");\n\nclass SetDimmerCommand extends Command {\n constructor({ id, level }) {\n super({ id, level });\n }\n\n get name() {\n return \"SetDimmer\";\n }\n\n get routingKey() {\n return `dimmer.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetDimmerCommand;\n", "const Command = require(\"./Command\");\n\nclass SetSwitchCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetSwitch\";\n }\n\n get routingKey() {\n return `switch.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetSwitchCommand;\n", "const Command = require(\"./Command\");\n\nclass SetThermostatCommand extends Command {\n constructor({ id, setpoints, hvacMode, fanMode }) {\n super({ id, setpoints, hvacMode, fanMode });\n }\n\n get name() {\n return \"SetThermostat\";\n }\n\n get routingKey() {\n return `thermostat.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetThermostatCommand;\n", "const Command = require(\"./Command\");\n\nclass SetLockCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetLock\";\n }\n\n get routingKey() {\n return `lock.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetLockCommand;\n", "const Command = require(\"./Command\");\n\nclass SetWindowCoveringCommand extends Command {\n constructor({ id, position }) {\n super({ id, position });\n }\n\n get name() {\n return \"SetWindowCovering\";\n }\n\n get routingKey() {\n return `windowCovering.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetWindowCoveringCommand;\n", "const Command = require(\"./Command\");\n\nclass SetCourtesyCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetCourtesy\";\n }\n\n get routingKey() {\n return `courtesy.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetCourtesyCommand;\n", "const Command = require(\"./Command\");\n\nclass SetMediaCommand extends Command {\n constructor({ id, command, ...rest }) {\n super({ id, command, ...rest });\n }\n\n get name() {\n return \"SetMedia\";\n }\n\n get routingKey() {\n return `mediaSource.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetMediaCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverUsersCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverUsers\";\n }\n\n get routingKey() {\n if (typeof this.data.id === \"string\") return `users.${this.data.id}.get`;\n if (Array.isArray(this.data.id)) return \"users.batch.get\";\n return \"users.get\";\n }\n}\n\nmodule.exports = DiscoverUsersCommand;\n", "module.exports = class AppError extends Error {\n constructor(message = \"Internal Server Error\", options) {\n super(message, options);\n this.type = this.constructor.name;\n this.statusCode = 500;\n Object.setPrototypeOf(this, AppError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class RequestError extends AppError {\n constructor(message = \"Bad Request\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, RequestError.prototype);\n }\n};\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass OCRDocumentCommand extends Command {\n constructor({ type, image }) {\n if (!image) throw new RequestError(\"document image is required\");\n super({ type, image });\n }\n\n get name() {\n return \"OCRDocument\";\n }\n}\n\nmodule.exports = OCRDocumentCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass CheckInReservationCommand extends Command {\n constructor({ id }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({ id });\n }\n\n get name() {\n return \"CheckInReservation\";\n }\n\n get routingKey() {\n return `reservation.${this.data.id}.checkin`;\n }\n}\n\nmodule.exports = CheckInReservationCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass SendEmailCommand extends Command {\n constructor({ text, html, to, from, subject, ...rest }) {\n if (!to) throw new RequestError(\"email to is required\");\n if (!from) throw new RequestError(\"email from is required\");\n if (!subject) throw new RequestError(\"email subject is required\");\n if (!text && !html)\n throw new RequestError(\"email text or html is required\");\n\n super({ text, html, to, from, subject, ...rest });\n }\n\n get name() {\n return \"SendEmail\";\n }\n\n get routingKey() {\n return \"comm.email.send\";\n }\n}\n\nmodule.exports = SendEmailCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass SendSMSCommand extends Command {\n constructor({ id, body, to, from, ...rest }) {\n if (!body) throw new RequestError(\"sms body is required\");\n if (!to) throw new RequestError(\"sms to is required\");\n if (!from) throw new RequestError(\"sms from is required\");\n super({ id, body, to, from, ...rest });\n }\n\n get name() {\n return \"SendSMS\";\n }\n\n get routingKey() {\n return \"comm.sms.send\";\n }\n}\n\nmodule.exports = SendSMSCommand;\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthenticationError extends AppError {\n constructor(message = \"Authentication Error\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthorizationError extends AppError {\n constructor(message = \"Authorization Error\", options = {}) {\n super(message, options);\n this.statusCode = 403;\n Object.setPrototypeOf(this, AuthorizationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class ConflictError extends AppError {\n constructor(message = \"Bad Request\", options = {}) {\n super(message, options);\n this.statusCode = 409;\n Object.setPrototypeOf(this, ConflictError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class DeviceCommError extends AppError {\n constructor(message = \"Device Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, DeviceCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class LoginError extends AppError {\n constructor(message = \"Invalid Login information provided\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, LoginError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class NotFoundError extends AppError {\n constructor(message = \"Resource Not Found\", options = {}) {\n super(message, options);\n this.statusCode = 404;\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class SystemCommError extends AppError {\n constructor(message = \"System Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, SystemCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class TokenExpiredError extends AppError {\n constructor(message = \"Token Expired\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, TokenExpiredError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class UnprocessableRequestError extends AppError {\n constructor(message = \"Unprocessable Request Error\", options = {}) {\n super(message, options);\n this.statusCode = 422;\n Object.setPrototypeOf(this, UnprocessableRequestError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class ValidationError extends AppError {\n constructor(message = \"Validation Error\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n};\n", "const Errors = {\n AppError: require(\"./AppError\"),\n AuthenticationError: require(\"./AuthenticationError\"),\n AuthorizationError: require(\"./AuthorizationError\"),\n ConflictError: require(\"./ConflictError\"),\n DeviceCommError: require(\"./DeviceCommError\"),\n LoginError: require(\"./LoginError\"),\n NotFoundError: require(\"./NotFoundError\"),\n RequestError: require(\"./RequestError\"),\n SystemCommError: require(\"./SystemCommError\"),\n TokenExpiredError: require(\"./TokenExpiredError\"),\n UnprocessableRequestError: require(\"./UnprocessableRequestError\"),\n ValidationError: require(\"./ValidationError\"),\n};\n\nmodule.exports = Errors;\n", "const { RequestError } = require(\"../Errors\");\nconst Command = require(\"./Command\");\n\nclass DiscoverReservationsCommand extends Command {\n constructor(options) {\n if (!options) throw new RequestError(\"options are required\");\n const { id, startDate, endDate, status, ...rest } = options;\n super({ id, startDate, endDate, status, ...rest });\n }\n\n get name() {\n return \"DiscoverReservations\";\n }\n\n get routingKey() {\n return \"reservation.discover\";\n }\n}\n\nmodule.exports = DiscoverReservationsCommand;\n", "const { RequestError } = require(\"../Errors\");\nconst Command = require(\"./Command\");\n\nclass DiscoverReservationRoomTypeUpsellOptionsCommand extends Command {\n constructor(options) {\n if (!options) throw new RequestError(\"options are required\");\n const { id, ...rest } = options;\n super({ id, ...rest });\n }\n\n get name() {\n return \"DiscoverReservationRoomTypeUpsellOptions\";\n }\n\n get routingKey() {\n return \"reservation.discoverRoomUpsells\";\n }\n}\n\nmodule.exports = DiscoverReservationRoomTypeUpsellOptionsCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverRoomsCommand extends Command {\n constructor({\n id,\n types,\n spaceTypes,\n startDate,\n endDate,\n serviceStatus,\n housekeepingStatus,\n ...rest\n }) {\n super({\n id,\n types,\n spaceTypes,\n startDate,\n endDate,\n serviceStatus,\n housekeepingStatus,\n ...rest,\n });\n }\n\n get name() {\n return \"DiscoverRooms\";\n }\n\n get routingKey() {\n if (typeof this.data.id === \"string\") return `rooms.${this.data.id}.get`;\n if (Array.isArray(this.data.id)) return \"rooms.batch.get\";\n return \"rooms.get\";\n }\n}\n\nmodule.exports = DiscoverRoomsCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverRoomTypesCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverRoomTypes\";\n }\n\n get routingKey() {\n if (typeof this.data.id === \"string\") return `rooms.${this.data.id}.get`;\n if (Array.isArray(this.data.id)) return \"rooms.batch.get\";\n return \"rooms.get\";\n }\n}\n\nmodule.exports = DiscoverRoomTypesCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass CreateShortLinkCommand extends Command {\n constructor({ title, destination }) {\n if (!title) throw new RequestError(\"title is required\");\n if (!destination) throw new RequestError(\"destination to is required\");\n super({ title, destination });\n }\n\n get name() {\n return \"CreateShortLink\";\n }\n\n get routingKey() {\n return \"comm.shortlink.create\";\n }\n}\n\nmodule.exports = CreateShortLinkCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass UpdateReservationCommand extends Command {\n constructor({ id, ...rest }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({ id, ...rest });\n }\n\n get name() {\n return \"UpdateReservation\";\n }\n\n get routingKey() {\n return `reservation.${this.data.id}.update`;\n }\n}\n\nmodule.exports = UpdateReservationCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass UpdateUserCommand extends Command {\n constructor({\n id,\n email,\n phone,\n identification,\n address,\n note,\n nationality,\n file,\n payment,\n ...rest\n }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({\n id,\n email,\n phone,\n identification,\n address,\n note,\n nationality,\n file,\n payment,\n ...rest,\n });\n }\n\n get name() {\n return \"UpdateUser\";\n }\n\n get routingKey() {\n return `user.${this.data.id}.update`;\n }\n}\n\nmodule.exports = UpdateUserCommand;\n", "const Command = require(\"./Command\");\n\nclass GetMobileKeyCommand extends Command {\n constructor({\n id,\n phone,\n beginDateTime,\n endDateTime,\n keyToReplace,\n ...rest\n }) {\n super({ id, phone, beginDateTime, endDateTime, keyToReplace, ...rest });\n }\n\n get name() {\n return \"GetMobileKey\";\n }\n\n get routingKey() {\n return `lock.${this.data.id}.set`;\n }\n}\n\nmodule.exports = GetMobileKeyCommand;\n", "const Command = require(\"./Command\");\n\nclass CreateImageUploadEndpointCommand extends Command {\n constructor({ id, expires, ...rest }) {\n super({ id, expires, ...rest });\n }\n\n get name() {\n return \"CreateImageUploadEndpoint\";\n }\n\n get routingKey() {\n return \"image.createUploadEndpoint\";\n }\n}\n\nmodule.exports = CreateImageUploadEndpointCommand;\n", "const Command = require(\"./Command\");\n\nclass UploadImageCommand extends Command {\n constructor({ id, url, file, ...rest }) {\n super({ id, url, file, ...rest });\n }\n\n get name() {\n return \"UploadImage\";\n }\n\n get routingKey() {\n return `image.${this.data.id}.upload`;\n }\n}\n\nmodule.exports = UploadImageCommand;\n", "const Command = require(\"./Command\");\n\nclass GetProductsCommand extends Command {\n constructor({ id, externalSystemId, ...rest }) {\n super({ id, externalSystemId, ...rest });\n }\n\n get name() {\n return \"GetProducts\";\n }\n\n get routingKey() {\n return `product.${this.data.id}.get`;\n }\n}\n\nmodule.exports = GetProductsCommand;\n", "const Command = require(\"./Command\");\n\nclass SellProductsCommand extends Command {\n constructor({ reservationId, userId, products, ...rest }) {\n super({ reservationId, userId, products, ...rest });\n }\n\n get name() {\n return \"SellProducts\";\n }\n\n get routingKey() {\n return `product.${this.data.id}.sell`;\n }\n}\n\nmodule.exports = SellProductsCommand;\n", "const SetSceneCommand = require(\"./SetSceneCommand\");\nconst SetAlarmCommand = require(\"./SetAlarmCommand\");\nconst SetDimmerCommand = require(\"./SetDimmerCommand\");\nconst SetSwitchCommand = require(\"./SetSwitchCommand\");\nconst SetThermostatCommand = require(\"./SetThermostatCommand\");\nconst SetLockCommand = require(\"./SetLockCommand\");\nconst SetWindowCoveringCommand = require(\"./SetWindowCoveringCommand\");\nconst SetCourtesyCommand = require(\"./SetCourtesyCommand\");\nconst SetMediaCommand = require(\"./SetMediaCommand\");\nconst DiscoverUsersCommand = require(\"./DiscoverUsersCommand\");\nconst OCRDocumentCommand = require(\"./OCRDocumentCommand\");\nconst CheckInReservationCommand = require(\"./CheckInReservationCommand\");\nconst SendEmailCommand = require(\"./SendEmailCommand\");\nconst SendSMSCommand = require(\"./SendSMSCommand\");\nconst DiscoverReservationsCommand = require(\"./DiscoverReservationsCommand\");\nconst DiscoverReservationRoomTypeUpsellOptionsCommand = require(\"./DiscoverReservationRoomTypeUpsellOptionsCommand\");\nconst DiscoverRoomsCommand = require(\"./DiscoverRoomsCommand\");\nconst DiscoverRoomTypesCommand = require(\"./DiscoverRoomTypesCommand\");\nconst CreateShortLinkCommand = require(\"./CreateShortLinkCommand\");\nconst UpdateReservationCommand = require(\"./UpdateReservationCommand\");\nconst UpdateUserCommand = require(\"./UpdateUserCommand\");\nconst GetMobileKeyCommand = require(\"./GetMobileKeyCommand\");\nconst CreateImageUploadEndpointCommand = require(\"./CreateImageUploadEndpointCommand\");\nconst UploadImageCommand = require(\"./UploadImageCommand\");\nconst GetProductsCommand = require(\"./GetProductsCommand\");\nconst SellProductsCommand = require(\"./SellProductsCommand\");\n\nmodule.exports = {\n SetSceneCommand,\n SetAlarmCommand,\n SetDimmerCommand,\n SetSwitchCommand,\n SetThermostatCommand,\n SetLockCommand,\n SetWindowCoveringCommand,\n SetCourtesyCommand,\n SetMediaCommand,\n OCRDocumentCommand,\n DiscoverUsersCommand,\n CheckInReservationCommand,\n SendSMSCommand,\n SendEmailCommand,\n DiscoverReservationsCommand,\n DiscoverReservationRoomTypeUpsellOptionsCommand,\n DiscoverRoomsCommand,\n DiscoverRoomTypesCommand,\n CreateShortLinkCommand,\n UpdateReservationCommand,\n UpdateUserCommand,\n GetMobileKeyCommand,\n CreateImageUploadEndpointCommand,\n UploadImageCommand,\n GetProductsCommand,\n SellProductsCommand,\n};\n"],
4
+ "sourcesContent": ["class Command {\n constructor(data) {\n this.data = {};\n if (!data) throw new Error(\"Command data is required\");\n if (typeof data !== \"object\")\n throw new Error(\"Command data must be an object\");\n\n for (const key in data) {\n this.data[key] = data[key];\n }\n }\n\n get name() {\n throw new Error(\"Command name is required\");\n }\n\n get type() {\n return \"Command\";\n }\n\n get routingKey() {\n return \"\";\n }\n\n get exchange() {\n return \"Commands\";\n }\n\n build() {\n return { data: { ...this.data } };\n }\n}\n\nmodule.exports = Command;\n", "const Command = require(\"./Command\");\n\nclass SetSceneCommand extends Command {\n constructor({ id, devices, ...rest }) {\n super({ id, devices, ...rest });\n }\n\n get name() {\n return \"SetScene\";\n }\n\n get routingKey() {\n return `scene.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetSceneCommand;\n", "const Command = require(\"./Command\");\n\nclass SetAlarmCommand extends Command {\n constructor({ id, zones, areas }) {\n super({ id, zones, areas });\n }\n\n get name() {\n return \"SetAlarm\";\n }\n\n get routingKey() {\n return `alarm.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetAlarmCommand;\n", "const Command = require(\"./Command\");\n\nclass SetDimmerCommand extends Command {\n constructor({ id, level }) {\n super({ id, level });\n }\n\n get name() {\n return \"SetDimmer\";\n }\n\n get routingKey() {\n return `dimmer.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetDimmerCommand;\n", "const Command = require(\"./Command\");\n\nclass SetSwitchCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetSwitch\";\n }\n\n get routingKey() {\n return `switch.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetSwitchCommand;\n", "const Command = require(\"./Command\");\n\nclass SetThermostatCommand extends Command {\n constructor({ id, setpoints, hvacMode, fanMode }) {\n super({ id, setpoints, hvacMode, fanMode });\n }\n\n get name() {\n return \"SetThermostat\";\n }\n\n get routingKey() {\n return `thermostat.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetThermostatCommand;\n", "const Command = require(\"./Command\");\n\nclass SetLockCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetLock\";\n }\n\n get routingKey() {\n return `lock.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetLockCommand;\n", "const Command = require(\"./Command\");\n\nclass SetWindowCoveringCommand extends Command {\n constructor({ id, position }) {\n super({ id, position });\n }\n\n get name() {\n return \"SetWindowCovering\";\n }\n\n get routingKey() {\n return `windowCovering.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetWindowCoveringCommand;\n", "const Command = require(\"./Command\");\n\nclass SetCourtesyCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetCourtesy\";\n }\n\n get routingKey() {\n return `courtesy.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetCourtesyCommand;\n", "const Command = require(\"./Command\");\n\nclass SetMediaCommand extends Command {\n constructor({ id, command, ...rest }) {\n super({ id, command, ...rest });\n }\n\n get name() {\n return \"SetMedia\";\n }\n\n get routingKey() {\n return `mediaSource.${this.data.id}.set`;\n }\n}\n\nmodule.exports = SetMediaCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverUsersCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverUsers\";\n }\n\n get routingKey() {\n if (typeof this.data.id === \"string\") return `users.${this.data.id}.get`;\n if (Array.isArray(this.data.id)) return \"users.batch.get\";\n return \"users.get\";\n }\n}\n\nmodule.exports = DiscoverUsersCommand;\n", "module.exports = class AppError extends Error {\n constructor(message = \"Internal Server Error\", options) {\n super(message, options);\n this.type = this.constructor.name;\n this.statusCode = 500;\n Object.setPrototypeOf(this, AppError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class RequestError extends AppError {\n constructor(message = \"Bad Request\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, RequestError.prototype);\n }\n};\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass OCRDocumentCommand extends Command {\n constructor({ type, image }) {\n if (!image) throw new RequestError(\"document image is required\");\n super({ type, image });\n }\n\n get name() {\n return \"OCRDocument\";\n }\n}\n\nmodule.exports = OCRDocumentCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass CheckInReservationCommand extends Command {\n constructor({ id }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({ id });\n }\n\n get name() {\n return \"CheckInReservation\";\n }\n\n get routingKey() {\n return `reservation.${this.data.id}.checkin`;\n }\n}\n\nmodule.exports = CheckInReservationCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass SendEmailCommand extends Command {\n constructor({ text, html, to, from, subject, ...rest }) {\n if (!to) throw new RequestError(\"email to is required\");\n if (!from) throw new RequestError(\"email from is required\");\n if (!subject) throw new RequestError(\"email subject is required\");\n if (!text && !html)\n throw new RequestError(\"email text or html is required\");\n\n super({ text, html, to, from, subject, ...rest });\n }\n\n get name() {\n return \"SendEmail\";\n }\n\n get routingKey() {\n return \"comm.email.send\";\n }\n}\n\nmodule.exports = SendEmailCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass SendSMSCommand extends Command {\n constructor({ id, body, to, from, ...rest }) {\n if (!body) throw new RequestError(\"sms body is required\");\n if (!to) throw new RequestError(\"sms to is required\");\n if (!from) throw new RequestError(\"sms from is required\");\n super({ id, body, to, from, ...rest });\n }\n\n get name() {\n return \"SendSMS\";\n }\n\n get routingKey() {\n return \"comm.sms.send\";\n }\n}\n\nmodule.exports = SendSMSCommand;\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthenticationError extends AppError {\n constructor(message = \"Authentication Error\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthorizationError extends AppError {\n constructor(message = \"Authorization Error\", options = {}) {\n super(message, options);\n this.statusCode = 403;\n Object.setPrototypeOf(this, AuthorizationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class ConflictError extends AppError {\n constructor(message = \"Bad Request\", options = {}) {\n super(message, options);\n this.statusCode = 409;\n Object.setPrototypeOf(this, ConflictError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class DeviceCommError extends AppError {\n constructor(message = \"Device Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, DeviceCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class LoginError extends AppError {\n constructor(message = \"Invalid Login information provided\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, LoginError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class NotFoundError extends AppError {\n constructor(message = \"Resource Not Found\", options = {}) {\n super(message, options);\n this.statusCode = 404;\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class SystemCommError extends AppError {\n constructor(message = \"System Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, SystemCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class TokenExpiredError extends AppError {\n constructor(message = \"Token Expired\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, TokenExpiredError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class UnprocessableRequestError extends AppError {\n constructor(message = \"Unprocessable Request Error\", options = {}) {\n super(message, options);\n this.statusCode = 422;\n Object.setPrototypeOf(this, UnprocessableRequestError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class ValidationError extends AppError {\n constructor(message = \"Validation Error\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n};\n", "const Errors = {\n AppError: require(\"./AppError\"),\n AuthenticationError: require(\"./AuthenticationError\"),\n AuthorizationError: require(\"./AuthorizationError\"),\n ConflictError: require(\"./ConflictError\"),\n DeviceCommError: require(\"./DeviceCommError\"),\n LoginError: require(\"./LoginError\"),\n NotFoundError: require(\"./NotFoundError\"),\n RequestError: require(\"./RequestError\"),\n SystemCommError: require(\"./SystemCommError\"),\n TokenExpiredError: require(\"./TokenExpiredError\"),\n UnprocessableRequestError: require(\"./UnprocessableRequestError\"),\n ValidationError: require(\"./ValidationError\"),\n};\n\nmodule.exports = Errors;\n", "const { RequestError } = require(\"../Errors\");\nconst Command = require(\"./Command\");\n\nclass DiscoverReservationsCommand extends Command {\n constructor(options) {\n if (!options) throw new RequestError(\"options are required\");\n const { id, startDate, endDate, status, ...rest } = options;\n super({ id, startDate, endDate, status, ...rest });\n }\n\n get name() {\n return \"DiscoverReservations\";\n }\n\n get routingKey() {\n return \"reservation.discover\";\n }\n}\n\nmodule.exports = DiscoverReservationsCommand;\n", "const { RequestError } = require(\"../Errors\");\nconst Command = require(\"./Command\");\n\nclass DiscoverReservationRoomTypeUpsellOptionsCommand extends Command {\n constructor(options) {\n if (!options) throw new RequestError(\"options are required\");\n const { id, ...rest } = options;\n super({ id, ...rest });\n }\n\n get name() {\n return \"DiscoverReservationRoomTypeUpsellOptions\";\n }\n\n get routingKey() {\n return \"reservation.discoverRoomUpsells\";\n }\n}\n\nmodule.exports = DiscoverReservationRoomTypeUpsellOptionsCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverRoomsCommand extends Command {\n constructor({\n id,\n types,\n categories,\n startDate,\n endDate,\n serviceStatus,\n housekeepingStatus,\n ...rest\n }) {\n super({\n id,\n types,\n categories,\n startDate,\n endDate,\n serviceStatus,\n housekeepingStatus,\n ...rest,\n });\n }\n\n get name() {\n return \"DiscoverRooms\";\n }\n\n get routingKey() {\n if (typeof this.data.id === \"string\") return `rooms.${this.data.id}.get`;\n if (Array.isArray(this.data.id)) return \"rooms.batch.get\";\n return \"rooms.get\";\n }\n}\n\nmodule.exports = DiscoverRoomsCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverRoomTypesCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverRoomTypes\";\n }\n\n get routingKey() {\n if (typeof this.data.id === \"string\") return `rooms.${this.data.id}.get`;\n if (Array.isArray(this.data.id)) return \"rooms.batch.get\";\n return \"rooms.get\";\n }\n}\n\nmodule.exports = DiscoverRoomTypesCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass CreateShortLinkCommand extends Command {\n constructor({ title, destination }) {\n if (!title) throw new RequestError(\"title is required\");\n if (!destination) throw new RequestError(\"destination to is required\");\n super({ title, destination });\n }\n\n get name() {\n return \"CreateShortLink\";\n }\n\n get routingKey() {\n return \"comm.shortlink.create\";\n }\n}\n\nmodule.exports = CreateShortLinkCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass UpdateReservationCommand extends Command {\n constructor({ id, ...rest }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({ id, ...rest });\n }\n\n get name() {\n return \"UpdateReservation\";\n }\n\n get routingKey() {\n return `reservation.${this.data.id}.update`;\n }\n}\n\nmodule.exports = UpdateReservationCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass UpdateUserCommand extends Command {\n constructor({\n id,\n email,\n phone,\n identification,\n address,\n note,\n nationality,\n file,\n payment,\n ...rest\n }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({\n id,\n email,\n phone,\n identification,\n address,\n note,\n nationality,\n file,\n payment,\n ...rest,\n });\n }\n\n get name() {\n return \"UpdateUser\";\n }\n\n get routingKey() {\n return `user.${this.data.id}.update`;\n }\n}\n\nmodule.exports = UpdateUserCommand;\n", "const Command = require(\"./Command\");\n\nclass GetMobileKeyCommand extends Command {\n constructor({\n id,\n phone,\n beginDateTime,\n endDateTime,\n keyToReplace,\n ...rest\n }) {\n super({ id, phone, beginDateTime, endDateTime, keyToReplace, ...rest });\n }\n\n get name() {\n return \"GetMobileKey\";\n }\n\n get routingKey() {\n return `lock.${this.data.id}.set`;\n }\n}\n\nmodule.exports = GetMobileKeyCommand;\n", "const Command = require(\"./Command\");\n\nclass CreateImageUploadEndpointCommand extends Command {\n constructor({ id, expires, ...rest }) {\n super({ id, expires, ...rest });\n }\n\n get name() {\n return \"CreateImageUploadEndpoint\";\n }\n\n get routingKey() {\n return \"image.createUploadEndpoint\";\n }\n}\n\nmodule.exports = CreateImageUploadEndpointCommand;\n", "const Command = require(\"./Command\");\n\nclass UploadImageCommand extends Command {\n constructor({ id, url, file, ...rest }) {\n super({ id, url, file, ...rest });\n }\n\n get name() {\n return \"UploadImage\";\n }\n\n get routingKey() {\n return `image.${this.data.id}.upload`;\n }\n}\n\nmodule.exports = UploadImageCommand;\n", "const Command = require(\"./Command\");\n\nclass GetProductsCommand extends Command {\n constructor({ id, externalSystemId, ...rest }) {\n super({ id, externalSystemId, ...rest });\n }\n\n get name() {\n return \"GetProducts\";\n }\n\n get routingKey() {\n return `product.${this.data.id}.get`;\n }\n}\n\nmodule.exports = GetProductsCommand;\n", "const Command = require(\"./Command\");\n\nclass SellProductsCommand extends Command {\n constructor({ reservationId, userId, products, ...rest }) {\n super({ reservationId, userId, products, ...rest });\n }\n\n get name() {\n return \"SellProducts\";\n }\n\n get routingKey() {\n return `product.${this.data.id}.sell`;\n }\n}\n\nmodule.exports = SellProductsCommand;\n", "const SetSceneCommand = require(\"./SetSceneCommand\");\nconst SetAlarmCommand = require(\"./SetAlarmCommand\");\nconst SetDimmerCommand = require(\"./SetDimmerCommand\");\nconst SetSwitchCommand = require(\"./SetSwitchCommand\");\nconst SetThermostatCommand = require(\"./SetThermostatCommand\");\nconst SetLockCommand = require(\"./SetLockCommand\");\nconst SetWindowCoveringCommand = require(\"./SetWindowCoveringCommand\");\nconst SetCourtesyCommand = require(\"./SetCourtesyCommand\");\nconst SetMediaCommand = require(\"./SetMediaCommand\");\nconst DiscoverUsersCommand = require(\"./DiscoverUsersCommand\");\nconst OCRDocumentCommand = require(\"./OCRDocumentCommand\");\nconst CheckInReservationCommand = require(\"./CheckInReservationCommand\");\nconst SendEmailCommand = require(\"./SendEmailCommand\");\nconst SendSMSCommand = require(\"./SendSMSCommand\");\nconst DiscoverReservationsCommand = require(\"./DiscoverReservationsCommand\");\nconst DiscoverReservationRoomTypeUpsellOptionsCommand = require(\"./DiscoverReservationRoomTypeUpsellOptionsCommand\");\nconst DiscoverRoomsCommand = require(\"./DiscoverRoomsCommand\");\nconst DiscoverRoomTypesCommand = require(\"./DiscoverRoomTypesCommand\");\nconst CreateShortLinkCommand = require(\"./CreateShortLinkCommand\");\nconst UpdateReservationCommand = require(\"./UpdateReservationCommand\");\nconst UpdateUserCommand = require(\"./UpdateUserCommand\");\nconst GetMobileKeyCommand = require(\"./GetMobileKeyCommand\");\nconst CreateImageUploadEndpointCommand = require(\"./CreateImageUploadEndpointCommand\");\nconst UploadImageCommand = require(\"./UploadImageCommand\");\nconst GetProductsCommand = require(\"./GetProductsCommand\");\nconst SellProductsCommand = require(\"./SellProductsCommand\");\n\nmodule.exports = {\n SetSceneCommand,\n SetAlarmCommand,\n SetDimmerCommand,\n SetSwitchCommand,\n SetThermostatCommand,\n SetLockCommand,\n SetWindowCoveringCommand,\n SetCourtesyCommand,\n SetMediaCommand,\n OCRDocumentCommand,\n DiscoverUsersCommand,\n CheckInReservationCommand,\n SendSMSCommand,\n SendEmailCommand,\n DiscoverReservationsCommand,\n DiscoverReservationRoomTypeUpsellOptionsCommand,\n DiscoverRoomsCommand,\n DiscoverRoomTypesCommand,\n CreateShortLinkCommand,\n UpdateReservationCommand,\n UpdateUserCommand,\n GetMobileKeyCommand,\n CreateImageUploadEndpointCommand,\n UploadImageCommand,\n GetProductsCommand,\n SellProductsCommand,\n};\n"],
5
5
  "mappings": ";;;;;;;;AAAA;AAAA;AAAA,QAAM,UAAN,MAAc;AAAA,MAAd,OAAc;AAAA;AAAA;AAAA,MACZ,YAAY,MAAM;AAChB,aAAK,OAAO,CAAC;AACb,YAAI,CAAC;AAAM,gBAAM,IAAI,MAAM,0BAA0B;AACrD,YAAI,OAAO,SAAS;AAClB,gBAAM,IAAI,MAAM,gCAAgC;AAElD,mBAAW,OAAO,MAAM;AACtB,eAAK,KAAK,GAAG,IAAI,KAAK,GAAG;AAAA,QAC3B;AAAA,MACF;AAAA,MAEA,IAAI,OAAO;AACT,cAAM,IAAI,MAAM,0BAA0B;AAAA,MAC5C;AAAA,MAEA,IAAI,OAAO;AACT,eAAO;AAAA,MACT;AAAA,MAEA,IAAI,aAAa;AACf,eAAO;AAAA,MACT;AAAA,MAEA,IAAI,WAAW;AACb,eAAO;AAAA,MACT;AAAA,MAEA,QAAQ;AACN,eAAO,EAAE,MAAM,EAAE,GAAG,KAAK,KAAK,EAAE;AAAA,MAClC;AAAA,IACF;AAEA,WAAO,UAAU;AAAA;AAAA;;;ACjCjB;AAAA;AAAA,QAAM,UAAU;AAEhB,QAAM,kBAAN,cAA8B,QAAQ;AAAA,MAFtC,OAEsC;AAAA;AAAA;AAAA,MACpC,YAAY,EAAE,IAAI,SAAS,GAAG,KAAK,GAAG;AACpC,cAAM,EAAE,IAAI,SAAS,GAAG,KAAK,CAAC;AAAA,MAChC;AAAA,MAEA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AAM,2BAA2B;AACjC,QAAM,oBAAoB;AAC1B,QAAM,sBAAsB;AAC5B,QAAM,mCAAmC;AACzC,QAAM,qBAAqB;AAC3B,QAAM,qBAAqB;AAC3B,QAAM,sBAAsB;AAE5B,WAAO,UAAU;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -397,25 +397,25 @@ var require_SystemSpaceUpdatedEvent = __commonJS({
397
397
  }
398
398
  });
399
399
 
400
- // src/Events/SystemSpaceTypeUpdatedEvent.js
401
- var require_SystemSpaceTypeUpdatedEvent = __commonJS({
402
- "src/Events/SystemSpaceTypeUpdatedEvent.js"(exports, module) {
400
+ // src/Events/SystemCategoryUpdatedEvent.js
401
+ var require_SystemCategoryUpdatedEvent = __commonJS({
402
+ "src/Events/SystemCategoryUpdatedEvent.js"(exports, module) {
403
403
  var Event = require_Event();
404
- var SystemSpaceTypeUpdatedEvent = class extends Event {
404
+ var SystemCategoryUpdatedEvent = class extends Event {
405
405
  static {
406
- __name(this, "SystemSpaceTypeUpdatedEvent");
406
+ __name(this, "SystemCategoryUpdatedEvent");
407
407
  }
408
408
  constructor(space) {
409
409
  super(space);
410
410
  }
411
411
  get name() {
412
- return "SystemSpaceTypeUpdated";
412
+ return "SystemCategoryUpdated";
413
413
  }
414
414
  get routingKey() {
415
- return `spaceType.${this.keyId}.updated`;
415
+ return `category.${this.keyId}.updated`;
416
416
  }
417
417
  };
418
- module.exports = SystemSpaceTypeUpdatedEvent;
418
+ module.exports = SystemCategoryUpdatedEvent;
419
419
  }
420
420
  });
421
421
 
@@ -593,7 +593,7 @@ var require_Events = __commonJS({
593
593
  var SceneSetEvent = require_SceneSetEvent();
594
594
  var SystemUserUpdatedEvent = require_SystemUserUpdatedEvent();
595
595
  var SystemSpaceUpdatedEvent = require_SystemSpaceUpdatedEvent();
596
- var SystemSpaceTypeUpdatedEvent = require_SystemSpaceTypeUpdatedEvent();
596
+ var SystemCategoryUpdatedEvent = require_SystemCategoryUpdatedEvent();
597
597
  var SystemProductUpdatedEvent = require_SystemProductUpdatedEvent();
598
598
  var SystemReservationUpdatedEvent = require_SystemReservationUpdatedEvent();
599
599
  var SMSEvent = require_SMSEvent();
@@ -616,7 +616,7 @@ var require_Events = __commonJS({
616
616
  SystemCourtesyUpdatedEvent,
617
617
  SystemUserUpdatedEvent,
618
618
  SystemSpaceUpdatedEvent,
619
- SystemSpaceTypeUpdatedEvent,
619
+ SystemCategoryUpdatedEvent,
620
620
  SystemProductUpdatedEvent,
621
621
  SystemReservationUpdatedEvent,
622
622
  SceneSetEvent,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Events/Event.js", "../../src/Events/SystemGatewayUpdatedEvent.js", "../../src/Events/SystemThermostatUpdatedEvent.js", "../../src/Events/SystemDimmerUpdatedEvent.js", "../../src/Events/SystemSwitchUpdatedEvent.js", "../../src/Events/SystemLockUpdatedEvent.js", "../../src/Events/SystemCameraUpdatedEvent.js", "../../src/Events/SystemSceneControllerUpdatedEvent.js", "../../src/Events/SystemWindowCoveringUpdatedEvent.js", "../../src/Events/SystemMediaSourceUpdatedEvent.js", "../../src/Events/SystemCourtesyUpdatedEvent.js", "../../src/Events/SystemAlarmUpdatedEvent.js", "../../src/Events/SystemMotionSensorUpdatedEvent.js", "../../src/Events/SceneSetEvent.js", "../../src/Events/SystemUserUpdatedEvent.js", "../../src/Events/SystemSpaceUpdatedEvent.js", "../../src/Events/SystemSpaceTypeUpdatedEvent.js", "../../src/Events/SystemProductUpdatedEvent.js", "../../src/Events/SystemReservationUpdatedEvent.js", "../../src/Events/SMSEvent.js", "../../src/Events/EmailEvent.js", "../../src/Events/ShortLinkCreatedEvent.js", "../../src/Events/ApplicationInUseEvent.js", "../../src/Events/ApplicationOutOfUseEvent.js", "../../src/Events/index.js"],
4
- "sourcesContent": ["class Event {\n constructor(data, context) {\n this.data = [];\n this.context = {};\n if (!data) throw new Error(\"Event data is required\");\n if (typeof data !== \"object\" && !Array.isArray(data))\n throw new Error(\"Event data must be an object or array\");\n\n if (!Array.isArray(data)) this.data = [data];\n else this.data = data;\n\n this.data = this.data.map((d) => {\n if (d.eventData) {\n if (!d.eventData.timestamp) d.eventData.timestamp = new Date();\n if (!d.eventData.name) d.eventData.name = this.name;\n if (!d.eventData.type) d.eventData.type = this.type;\n }\n return d;\n });\n\n if (context) {\n for (const key in context) {\n this.context[key] = context[key];\n }\n }\n }\n\n get keyId() {\n if (Array.isArray(this.data)) return \"batch\";\n if (this.data.id) return this.data.id;\n return \"unknown\";\n }\n\n get name() {\n throw new Error(\"Event name is required\");\n }\n\n get type() {\n return \"Event\";\n }\n\n get routingKey() {\n return \"\";\n }\n\n get exchange() {\n return \"Events\";\n }\n\n build() {\n return { data: { ...this.data } };\n }\n}\n\nmodule.exports = Event;\n", "const Event = require(\"./Event\");\n\nclass SystemGatewayUpdatedEvent extends Event {\n constructor(space) {\n super(space);\n }\n\n get name() {\n return \"SystemGatewayUpdated\";\n }\n\n get routingKey() {\n return `gateway.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemGatewayUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemThermostatUpdatedEvent extends Event {\n constructor(thermostat) {\n super(thermostat);\n }\n\n get name() {\n return \"SystemThermostatUpdated\";\n }\n\n get routingKey() {\n return `thermostat.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemThermostatUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemDimmerUpdatedEvent extends Event {\n constructor(dimmer) {\n super(dimmer);\n }\n\n get name() {\n return \"SystemDimmerUpdated\";\n }\n\n get routingKey() {\n return `dimmer.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemDimmerUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemSwitchUpdatedEvent extends Event {\n constructor(_switch) {\n super(_switch);\n }\n\n get name() {\n return \"SystemSwitchUpdated\";\n }\n\n get routingKey() {\n return `switch.${this.keyId}.updated`; \n }\n}\n\nmodule.exports = SystemSwitchUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemLockUpdatedEvent extends Event {\n constructor(lock) {\n super(lock);\n }\n\n get name() {\n return \"SystemLockUpdated\";\n }\n\n get routingKey() {\n return `lock.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemLockUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemCameraUpdatedEvent extends Event {\n constructor(camera) {\n super(camera);\n }\n\n get name() {\n return \"SystemCameraUpdated\";\n }\n\n get routingKey() {\n return `camera.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemCameraUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemSceneControllerUpdatedEvent extends Event {\n constructor(sceneController) {\n super(sceneController);\n }\n\n get name() {\n return \"SystemSceneControllerUpdated\";\n }\n\n get routingKey() {\n return `sceneController.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemSceneControllerUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemWindowCoveringUpdatedEvent extends Event {\n constructor(wc) {\n super(wc);\n }\n\n get name() {\n return \"SystemWindowCoveringUpdated\";\n }\n\n get routingKey() {\n return `windowCovering.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemWindowCoveringUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemMediaSourceUpdatedEvent extends Event {\n constructor(mediaSource) {\n super(mediaSource);\n }\n\n get name() {\n return \"SystemMediaSourceUpdated\";\n }\n\n get routingKey() {\n return `mediaSource.${this.keyId}.updated`;\n }\n}\n \nmodule.exports = SystemMediaSourceUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemCourtesyUpdatedEvent extends Event {\n constructor(courtesy) {\n super(courtesy);\n }\n\n get name() {\n return \"SystemCourtesyUpdated\";\n }\n\n get routingKey() {\n return `courtesy.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemCourtesyUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemAlarmUpdatedEvent extends Event {\n constructor(alarm) {\n super(alarm);\n }\n\n get name() {\n return \"SystemAlarmUpdated\";\n }\n\n get routingKey() {\n return `alarm.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemAlarmUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemMotionSensorUpdatedEvent extends Event {\n constructor(mediaSource) {\n super(mediaSource);\n }\n\n get name() {\n return \"SystemMotionSensorUpdated\";\n }\n\n get routingKey() {\n return `mediaSource.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemMotionSensorUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SceneSetEvent extends Event {\n constructor(scene) {\n super(scene);\n }\n\n get name() {\n return \"SceneSet\";\n }\n\n get routingKey() {\n return `scene.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SceneSetEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemUserUpdatedEvent extends Event {\n constructor(user) {\n super(user);\n }\n\n get name() {\n return \"SystemUserUpdated\";\n }\n\n get routingKey() {\n return `user.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemUserUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemSpaceUpdatedEvent extends Event {\n constructor(space) {\n super(space);\n }\n\n get name() {\n return \"SystemSpaceUpdated\";\n }\n\n get routingKey() {\n return `space.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemSpaceUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemSpaceTypeUpdatedEvent extends Event {\n constructor(space) {\n super(space);\n }\n\n get name() {\n return \"SystemSpaceTypeUpdated\";\n }\n\n get routingKey() {\n return `spaceType.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemSpaceTypeUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemProductUpdatedEvent extends Event {\n constructor(product) {\n super(product);\n }\n\n get name() {\n return \"SystemProductUpdated\";\n }\n\n get routingKey() {\n return `product.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemProductUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemReservationUpdatedEvent extends Event {\n constructor(reservation) {\n super(reservation);\n }\n\n get name() {\n return \"SystemReservationUpdated\";\n }\n\n get routingKey() {\n return `reservation.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemReservationUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SMSEvent extends Event {\n constructor(sms, context) {\n super(sms, context);\n this.status = sms.status;\n }\n\n get name() {\n return \"SMSEvent\";\n }\n\n get routingKey() {\n return `comm.sms.${this.status}`;\n }\n}\n\nmodule.exports = SMSEvent;\n", "const Event = require(\"./Event\");\n\nclass EmailEvent extends Event {\n constructor(email, context) {\n super(email, context);\n this.status = email.status;\n }\n\n get name() {\n return \"EmailEvent\";\n }\n\n get routingKey() {\n return `comm.email.${this.status}`;\n }\n}\n\nmodule.exports = EmailEvent;\n", "const Event = require(\"./Event\");\n\nclass ShortLinkCreatedEvent extends Event {\n constructor(shortLink, context) {\n super(shortLink, context);\n }\n\n get name() {\n return \"ShortLinkCreated\";\n }\n\n get routingKey() {\n return `shortlink.${this.keyId}.created`;\n }\n}\n\nmodule.exports = ShortLinkCreatedEvent;\n", "const Event = require(\"./Event\");\n\nclass ApplicationInUseEvent extends Event {\n constructor({ propertyId }) {\n super({ propertyId });\n }\n\n get name() {\n return \"ApplicationInUse\";\n }\n\n get routingKey() {\n return `app.${this.data[0].propertyId}.inUse`;\n }\n}\n\nmodule.exports = ApplicationInUseEvent;\n", "const Event = require(\"./Event\");\n\nclass ApplicationOutOfUseEvent extends Event {\n constructor({ propertyId }) {\n super({ propertyId });\n }\n\n get name() {\n return \"ApplicationOutOfUse\";\n }\n\n get routingKey() {\n return `app.${this.data[0].propertyId}.notInUse`;\n }\n}\n\nmodule.exports = ApplicationOutOfUseEvent;\n", "const SystemGatewayUpdatedEvent = require(\"./SystemGatewayUpdatedEvent\");\nconst SystemThermostatUpdatedEvent = require(\"./SystemThermostatUpdatedEvent\");\nconst SystemDimmerUpdatedEvent = require(\"./SystemDimmerUpdatedEvent\");\nconst SystemSwitchUpdatedEvent = require(\"./SystemSwitchUpdatedEvent\");\nconst SystemLockUpdatedEvent = require(\"./SystemLockUpdatedEvent\");\nconst SystemCameraUpdatedEvent = require(\"./SystemCameraUpdatedEvent\");\nconst SystemSceneControllerUpdatedEvent = require(\"./SystemSceneControllerUpdatedEvent\");\nconst SystemWindowCoveringUpdatedEvent = require(\"./SystemWindowCoveringUpdatedEvent\");\nconst SystemMediaSourceUpdatedEvent = require(\"./SystemMediaSourceUpdatedEvent\");\nconst SystemCourtesyUpdatedEvent = require(\"./SystemCourtesyUpdatedEvent\");\nconst SystemAlarmUpdatedEvent = require(\"./SystemAlarmUpdatedEvent\");\nconst SystemMotionSensorUpdatedEvent = require(\"./SystemMotionSensorUpdatedEvent\");\n\nconst SceneSetEvent = require(\"./SceneSetEvent\");\n\nconst SystemUserUpdatedEvent = require(\"./SystemUserUpdatedEvent\");\nconst SystemSpaceUpdatedEvent = require(\"./SystemSpaceUpdatedEvent\");\nconst SystemSpaceTypeUpdatedEvent = require(\"./SystemSpaceTypeUpdatedEvent\");\nconst SystemProductUpdatedEvent = require(\"./SystemProductUpdatedEvent\");\n\nconst SystemReservationUpdatedEvent = require(\"./SystemReservationUpdatedEvent\");\n\nconst SMSEvent = require(\"./SMSEvent\");\nconst EmailEvent = require(\"./EmailEvent\");\nconst ShortLinkCreatedEvent = require(\"./ShortLinkCreatedEvent\");\n\nconst ApplicationInUseEvent = require(\"./ApplicationInUseEvent\");\nconst ApplicationOutOfUseEvent = require(\"./ApplicationOutOfUseEvent\");\n\nmodule.exports = {\n SystemAlarmUpdatedEvent,\n SystemGatewayUpdatedEvent,\n SystemThermostatUpdatedEvent,\n SystemDimmerUpdatedEvent,\n SystemSwitchUpdatedEvent,\n SystemLockUpdatedEvent,\n SystemCameraUpdatedEvent,\n SystemSceneControllerUpdatedEvent,\n SystemWindowCoveringUpdatedEvent,\n SystemMediaSourceUpdatedEvent,\n SystemMotionSensorUpdatedEvent,\n SystemCourtesyUpdatedEvent,\n SystemUserUpdatedEvent,\n SystemSpaceUpdatedEvent,\n SystemSpaceTypeUpdatedEvent,\n SystemProductUpdatedEvent,\n SystemReservationUpdatedEvent,\n SceneSetEvent,\n SMSEvent,\n EmailEvent,\n ShortLinkCreatedEvent,\n ApplicationInUseEvent,\n ApplicationOutOfUseEvent,\n};\n"],
5
- "mappings": ";;;;;;;;AAAA;AAAA;AAAA,QAAM,QAAN,MAAY;AAAA,MAAZ,OAAY;AAAA;AAAA;AAAA,MACV,YAAY,MAAM,SAAS;AACzB,aAAK,OAAO,CAAC;AACb,aAAK,UAAU,CAAC;AAChB,YAAI,CAAC;AAAM,gBAAM,IAAI,MAAM,wBAAwB;AACnD,YAAI,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI;AACjD,gBAAM,IAAI,MAAM,uCAAuC;AAEzD,YAAI,CAAC,MAAM,QAAQ,IAAI;AAAG,eAAK,OAAO,CAAC,IAAI;AAAA;AACtC,eAAK,OAAO;AAEjB,aAAK,OAAO,KAAK,KAAK,IAAI,CAAC,MAAM;AAC/B,cAAI,EAAE,WAAW;AACf,gBAAI,CAAC,EAAE,UAAU;AAAW,gBAAE,UAAU,YAAY,oBAAI,KAAK;AAC7D,gBAAI,CAAC,EAAE,UAAU;AAAM,gBAAE,UAAU,OAAO,KAAK;AAC/C,gBAAI,CAAC,EAAE,UAAU;AAAM,gBAAE,UAAU,OAAO,KAAK;AAAA,UACjD;AACA,iBAAO;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;AAAA;",
3
+ "sources": ["../../src/Events/Event.js", "../../src/Events/SystemGatewayUpdatedEvent.js", "../../src/Events/SystemThermostatUpdatedEvent.js", "../../src/Events/SystemDimmerUpdatedEvent.js", "../../src/Events/SystemSwitchUpdatedEvent.js", "../../src/Events/SystemLockUpdatedEvent.js", "../../src/Events/SystemCameraUpdatedEvent.js", "../../src/Events/SystemSceneControllerUpdatedEvent.js", "../../src/Events/SystemWindowCoveringUpdatedEvent.js", "../../src/Events/SystemMediaSourceUpdatedEvent.js", "../../src/Events/SystemCourtesyUpdatedEvent.js", "../../src/Events/SystemAlarmUpdatedEvent.js", "../../src/Events/SystemMotionSensorUpdatedEvent.js", "../../src/Events/SceneSetEvent.js", "../../src/Events/SystemUserUpdatedEvent.js", "../../src/Events/SystemSpaceUpdatedEvent.js", "../../src/Events/SystemCategoryUpdatedEvent.js", "../../src/Events/SystemProductUpdatedEvent.js", "../../src/Events/SystemReservationUpdatedEvent.js", "../../src/Events/SMSEvent.js", "../../src/Events/EmailEvent.js", "../../src/Events/ShortLinkCreatedEvent.js", "../../src/Events/ApplicationInUseEvent.js", "../../src/Events/ApplicationOutOfUseEvent.js", "../../src/Events/index.js"],
4
+ "sourcesContent": ["class Event {\n constructor(data, context) {\n this.data = [];\n this.context = {};\n if (!data) throw new Error(\"Event data is required\");\n if (typeof data !== \"object\" && !Array.isArray(data))\n throw new Error(\"Event data must be an object or array\");\n\n if (!Array.isArray(data)) this.data = [data];\n else this.data = data;\n\n this.data = this.data.map((d) => {\n if (d.eventData) {\n if (!d.eventData.timestamp) d.eventData.timestamp = new Date();\n if (!d.eventData.name) d.eventData.name = this.name;\n if (!d.eventData.type) d.eventData.type = this.type;\n }\n return d;\n });\n\n if (context) {\n for (const key in context) {\n this.context[key] = context[key];\n }\n }\n }\n\n get keyId() {\n if (Array.isArray(this.data)) return \"batch\";\n if (this.data.id) return this.data.id;\n return \"unknown\";\n }\n\n get name() {\n throw new Error(\"Event name is required\");\n }\n\n get type() {\n return \"Event\";\n }\n\n get routingKey() {\n return \"\";\n }\n\n get exchange() {\n return \"Events\";\n }\n\n build() {\n return { data: { ...this.data } };\n }\n}\n\nmodule.exports = Event;\n", "const Event = require(\"./Event\");\n\nclass SystemGatewayUpdatedEvent extends Event {\n constructor(space) {\n super(space);\n }\n\n get name() {\n return \"SystemGatewayUpdated\";\n }\n\n get routingKey() {\n return `gateway.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemGatewayUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemThermostatUpdatedEvent extends Event {\n constructor(thermostat) {\n super(thermostat);\n }\n\n get name() {\n return \"SystemThermostatUpdated\";\n }\n\n get routingKey() {\n return `thermostat.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemThermostatUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemDimmerUpdatedEvent extends Event {\n constructor(dimmer) {\n super(dimmer);\n }\n\n get name() {\n return \"SystemDimmerUpdated\";\n }\n\n get routingKey() {\n return `dimmer.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemDimmerUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemSwitchUpdatedEvent extends Event {\n constructor(_switch) {\n super(_switch);\n }\n\n get name() {\n return \"SystemSwitchUpdated\";\n }\n\n get routingKey() {\n return `switch.${this.keyId}.updated`; \n }\n}\n\nmodule.exports = SystemSwitchUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemLockUpdatedEvent extends Event {\n constructor(lock) {\n super(lock);\n }\n\n get name() {\n return \"SystemLockUpdated\";\n }\n\n get routingKey() {\n return `lock.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemLockUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemCameraUpdatedEvent extends Event {\n constructor(camera) {\n super(camera);\n }\n\n get name() {\n return \"SystemCameraUpdated\";\n }\n\n get routingKey() {\n return `camera.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemCameraUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemSceneControllerUpdatedEvent extends Event {\n constructor(sceneController) {\n super(sceneController);\n }\n\n get name() {\n return \"SystemSceneControllerUpdated\";\n }\n\n get routingKey() {\n return `sceneController.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemSceneControllerUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemWindowCoveringUpdatedEvent extends Event {\n constructor(wc) {\n super(wc);\n }\n\n get name() {\n return \"SystemWindowCoveringUpdated\";\n }\n\n get routingKey() {\n return `windowCovering.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemWindowCoveringUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemMediaSourceUpdatedEvent extends Event {\n constructor(mediaSource) {\n super(mediaSource);\n }\n\n get name() {\n return \"SystemMediaSourceUpdated\";\n }\n\n get routingKey() {\n return `mediaSource.${this.keyId}.updated`;\n }\n}\n \nmodule.exports = SystemMediaSourceUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemCourtesyUpdatedEvent extends Event {\n constructor(courtesy) {\n super(courtesy);\n }\n\n get name() {\n return \"SystemCourtesyUpdated\";\n }\n\n get routingKey() {\n return `courtesy.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemCourtesyUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemAlarmUpdatedEvent extends Event {\n constructor(alarm) {\n super(alarm);\n }\n\n get name() {\n return \"SystemAlarmUpdated\";\n }\n\n get routingKey() {\n return `alarm.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemAlarmUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemMotionSensorUpdatedEvent extends Event {\n constructor(mediaSource) {\n super(mediaSource);\n }\n\n get name() {\n return \"SystemMotionSensorUpdated\";\n }\n\n get routingKey() {\n return `mediaSource.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemMotionSensorUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SceneSetEvent extends Event {\n constructor(scene) {\n super(scene);\n }\n\n get name() {\n return \"SceneSet\";\n }\n\n get routingKey() {\n return `scene.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SceneSetEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemUserUpdatedEvent extends Event {\n constructor(user) {\n super(user);\n }\n\n get name() {\n return \"SystemUserUpdated\";\n }\n\n get routingKey() {\n return `user.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemUserUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemSpaceUpdatedEvent extends Event {\n constructor(space) {\n super(space);\n }\n\n get name() {\n return \"SystemSpaceUpdated\";\n }\n\n get routingKey() {\n return `space.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemSpaceUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemCategoryUpdatedEvent extends Event {\n constructor(space) {\n super(space);\n }\n\n get name() {\n return \"SystemCategoryUpdated\";\n }\n\n get routingKey() {\n return `category.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemCategoryUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemProductUpdatedEvent extends Event {\n constructor(product) {\n super(product);\n }\n\n get name() {\n return \"SystemProductUpdated\";\n }\n\n get routingKey() {\n return `product.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemProductUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SystemReservationUpdatedEvent extends Event {\n constructor(reservation) {\n super(reservation);\n }\n\n get name() {\n return \"SystemReservationUpdated\";\n }\n\n get routingKey() {\n return `reservation.${this.keyId}.updated`;\n }\n}\n\nmodule.exports = SystemReservationUpdatedEvent;\n", "const Event = require(\"./Event\");\n\nclass SMSEvent extends Event {\n constructor(sms, context) {\n super(sms, context);\n this.status = sms.status;\n }\n\n get name() {\n return \"SMSEvent\";\n }\n\n get routingKey() {\n return `comm.sms.${this.status}`;\n }\n}\n\nmodule.exports = SMSEvent;\n", "const Event = require(\"./Event\");\n\nclass EmailEvent extends Event {\n constructor(email, context) {\n super(email, context);\n this.status = email.status;\n }\n\n get name() {\n return \"EmailEvent\";\n }\n\n get routingKey() {\n return `comm.email.${this.status}`;\n }\n}\n\nmodule.exports = EmailEvent;\n", "const Event = require(\"./Event\");\n\nclass ShortLinkCreatedEvent extends Event {\n constructor(shortLink, context) {\n super(shortLink, context);\n }\n\n get name() {\n return \"ShortLinkCreated\";\n }\n\n get routingKey() {\n return `shortlink.${this.keyId}.created`;\n }\n}\n\nmodule.exports = ShortLinkCreatedEvent;\n", "const Event = require(\"./Event\");\n\nclass ApplicationInUseEvent extends Event {\n constructor({ propertyId }) {\n super({ propertyId });\n }\n\n get name() {\n return \"ApplicationInUse\";\n }\n\n get routingKey() {\n return `app.${this.data[0].propertyId}.inUse`;\n }\n}\n\nmodule.exports = ApplicationInUseEvent;\n", "const Event = require(\"./Event\");\n\nclass ApplicationOutOfUseEvent extends Event {\n constructor({ propertyId }) {\n super({ propertyId });\n }\n\n get name() {\n return \"ApplicationOutOfUse\";\n }\n\n get routingKey() {\n return `app.${this.data[0].propertyId}.notInUse`;\n }\n}\n\nmodule.exports = ApplicationOutOfUseEvent;\n", "const SystemGatewayUpdatedEvent = require(\"./SystemGatewayUpdatedEvent\");\nconst SystemThermostatUpdatedEvent = require(\"./SystemThermostatUpdatedEvent\");\nconst SystemDimmerUpdatedEvent = require(\"./SystemDimmerUpdatedEvent\");\nconst SystemSwitchUpdatedEvent = require(\"./SystemSwitchUpdatedEvent\");\nconst SystemLockUpdatedEvent = require(\"./SystemLockUpdatedEvent\");\nconst SystemCameraUpdatedEvent = require(\"./SystemCameraUpdatedEvent\");\nconst SystemSceneControllerUpdatedEvent = require(\"./SystemSceneControllerUpdatedEvent\");\nconst SystemWindowCoveringUpdatedEvent = require(\"./SystemWindowCoveringUpdatedEvent\");\nconst SystemMediaSourceUpdatedEvent = require(\"./SystemMediaSourceUpdatedEvent\");\nconst SystemCourtesyUpdatedEvent = require(\"./SystemCourtesyUpdatedEvent\");\nconst SystemAlarmUpdatedEvent = require(\"./SystemAlarmUpdatedEvent\");\nconst SystemMotionSensorUpdatedEvent = require(\"./SystemMotionSensorUpdatedEvent\");\n\nconst SceneSetEvent = require(\"./SceneSetEvent\");\n\nconst SystemUserUpdatedEvent = require(\"./SystemUserUpdatedEvent\");\nconst SystemSpaceUpdatedEvent = require(\"./SystemSpaceUpdatedEvent\");\nconst SystemCategoryUpdatedEvent = require(\"./SystemCategoryUpdatedEvent\");\nconst SystemProductUpdatedEvent = require(\"./SystemProductUpdatedEvent\");\n\nconst SystemReservationUpdatedEvent = require(\"./SystemReservationUpdatedEvent\");\n\nconst SMSEvent = require(\"./SMSEvent\");\nconst EmailEvent = require(\"./EmailEvent\");\nconst ShortLinkCreatedEvent = require(\"./ShortLinkCreatedEvent\");\n\nconst ApplicationInUseEvent = require(\"./ApplicationInUseEvent\");\nconst ApplicationOutOfUseEvent = require(\"./ApplicationOutOfUseEvent\");\n\nmodule.exports = {\n SystemAlarmUpdatedEvent,\n SystemGatewayUpdatedEvent,\n SystemThermostatUpdatedEvent,\n SystemDimmerUpdatedEvent,\n SystemSwitchUpdatedEvent,\n SystemLockUpdatedEvent,\n SystemCameraUpdatedEvent,\n SystemSceneControllerUpdatedEvent,\n SystemWindowCoveringUpdatedEvent,\n SystemMediaSourceUpdatedEvent,\n SystemMotionSensorUpdatedEvent,\n SystemCourtesyUpdatedEvent,\n SystemUserUpdatedEvent,\n SystemSpaceUpdatedEvent,\n SystemCategoryUpdatedEvent,\n SystemProductUpdatedEvent,\n SystemReservationUpdatedEvent,\n SceneSetEvent,\n SMSEvent,\n EmailEvent,\n ShortLinkCreatedEvent,\n ApplicationInUseEvent,\n ApplicationOutOfUseEvent,\n};\n"],
5
+ "mappings": ";;;;;;;;AAAA;AAAA;AAAA,QAAM,QAAN,MAAY;AAAA,MAAZ,OAAY;AAAA;AAAA;AAAA,MACV,YAAY,MAAM,SAAS;AACzB,aAAK,OAAO,CAAC;AACb,aAA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AM,0BAA0B;AAChC,QAAM,iCAAiC;AAEvC,QAAM,gBAAgB;AAEtB,QAAM,yBAAyB;AAC/B,QAAM,0BAA0B;AAChC,QAAM,6BAA6B;AACnC,QAAM,4BAA4B;AAElC,QAAM,gCAAgC;AAEtC,QAAM,WAAW;AACjB,QAAM,aAAa;AACnB,QAAM,wBAAwB;AAE9B,QAAM,wBAAwB;AAC9B,QAAM,2BAA2B;AAEjC,WAAO,UAAU;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -7701,7 +7701,8 @@ var require_reservation = __commonJS({
7701
7701
  type: "string"
7702
7702
  },
7703
7703
  type: {
7704
- type: "string"
7704
+ type: "string",
7705
+ default: "reservation"
7705
7706
  },
7706
7707
  sharedGuests: {
7707
7708
  type: "array",
@@ -7709,7 +7710,7 @@ var require_reservation = __commonJS({
7709
7710
  type: "string"
7710
7711
  }
7711
7712
  },
7712
- spaceType: {
7713
+ spaceCategory: {
7713
7714
  type: "string"
7714
7715
  },
7715
7716
  space: {
@@ -7763,6 +7764,24 @@ var require_reservation = __commonJS({
7763
7764
  type: "number",
7764
7765
  default: 0
7765
7766
  },
7767
+ spaceCategoryAvailabilites: {
7768
+ type: "array",
7769
+ items: {
7770
+ type: "object",
7771
+ properties: {
7772
+ id: {
7773
+ type: "string"
7774
+ },
7775
+ price: {
7776
+ type: "number"
7777
+ },
7778
+ unit: {
7779
+ type: "string",
7780
+ enum: ["night", "stay", "hour"]
7781
+ }
7782
+ }
7783
+ }
7784
+ },
7766
7785
  revenue: {
7767
7786
  type: "array",
7768
7787
  items: {
@@ -7799,6 +7818,9 @@ var require_reservation = __commonJS({
7799
7818
  },
7800
7819
  metadata: {
7801
7820
  ref: "definitions.json#/definitions/metadata"
7821
+ },
7822
+ updatedAt: {
7823
+ $ref: "definitions.json#/definitions/updatedAt"
7802
7824
  }
7803
7825
  }
7804
7826
  };
@@ -8371,6 +8393,8 @@ var require_MediaFile = __commonJS({
8371
8393
  createImageVariant(params) {
8372
8394
  if (this.mimeType != "image/*")
8373
8395
  throw new RequestError("Only dynamic images can have variants");
8396
+ if (!this.url)
8397
+ throw new RequestError("MediaFile has no url");
8374
8398
  const query = Object.keys(params).map((key) => `${key}=${params[key]}`).join(",");
8375
8399
  return this.url.replace(/\/public$/, `/${query}`);
8376
8400
  }
@@ -11576,25 +11600,25 @@ var require_space = __commonJS({
11576
11600
  minLength: 1
11577
11601
  },
11578
11602
  type: {
11579
- type: ["string"],
11603
+ type: "string",
11604
+ default: "space"
11605
+ },
11606
+ discriminator: {
11607
+ type: "string",
11580
11608
  enum: [
11581
11609
  "classRoom",
11582
11610
  "hotelRoom",
11583
11611
  "office",
11584
11612
  "building",
11585
- "commonArea",
11586
- "conferenceRoom",
11587
- "lobby",
11588
- "gym",
11589
- "pool",
11590
- "restaurant"
11613
+ "commonArea"
11591
11614
  ]
11592
11615
  },
11593
11616
  driver: {
11594
11617
  $ref: "definitions.json#/definitions/driver"
11595
11618
  },
11596
- spaceType: {
11597
- type: "string"
11619
+ category: {
11620
+ type: "string",
11621
+ description: "This is the category id"
11598
11622
  },
11599
11623
  rooms: {
11600
11624
  type: "array",
@@ -11777,20 +11801,22 @@ var require_Space = __commonJS({
11777
11801
  }
11778
11802
  });
11779
11803
 
11780
- // src/schemas/spaceType.json
11781
- var require_spaceType = __commonJS({
11782
- "src/schemas/spaceType.json"(exports, module) {
11804
+ // src/schemas/category.json
11805
+ var require_category = __commonJS({
11806
+ "src/schemas/category.json"(exports, module) {
11783
11807
  module.exports = {
11784
11808
  $schema: "http://json-schema.org/draft-07/schema",
11785
- $id: "spaceType.json",
11786
- title: "Space Type",
11809
+ $id: "category.json",
11810
+ title: "Category",
11787
11811
  type: "object",
11812
+ required: ["type", "discriminator"],
11788
11813
  properties: {
11789
11814
  id: {
11790
11815
  $ref: "definitions.json#/definitions/id"
11791
11816
  },
11792
11817
  type: {
11793
- type: "string"
11818
+ type: "string",
11819
+ default: "category"
11794
11820
  },
11795
11821
  name: {
11796
11822
  type: "string",
@@ -11811,6 +11837,10 @@ var require_spaceType = __commonJS({
11811
11837
  maximum: 10,
11812
11838
  default: 9
11813
11839
  },
11840
+ discriminator: {
11841
+ type: "string",
11842
+ enum: ["space", "product"]
11843
+ },
11814
11844
  systemData: {
11815
11845
  $ref: "definitions.json#/definitions/systemData"
11816
11846
  }
@@ -11819,40 +11849,40 @@ var require_spaceType = __commonJS({
11819
11849
  }
11820
11850
  });
11821
11851
 
11822
- // src/Models/SpaceType.js
11823
- var require_SpaceType = __commonJS({
11824
- "src/Models/SpaceType.js"(exports, module) {
11852
+ // src/Models/Category.js
11853
+ var require_Category = __commonJS({
11854
+ "src/Models/Category.js"(exports, module) {
11825
11855
  var schemas = require_schema();
11826
- var schema = require_spaceType();
11856
+ var schema = require_category();
11827
11857
  var Kohost = require_Kohost();
11828
11858
  schemas.add(schema);
11829
11859
  var validator = schemas.compile(schema);
11830
- var SpaceType = class extends Kohost {
11860
+ var Category = class extends Kohost {
11831
11861
  static {
11832
- __name(this, "SpaceType");
11862
+ __name(this, "Category");
11833
11863
  }
11834
11864
  /**
11835
- * @typedef {import("../schemas/SpaceTypeSchema").SpaceType} SpaceTypeType
11836
- * Create a SpaceType instance.
11865
+ * @typedef {import("../schemas/CategorySchema").Category} CategoryType
11866
+ * Create a Category instance.
11837
11867
  * @constructor
11838
- * @param {SpaceTypeType} spaceType - The spaceType object of type SpaceType.
11868
+ * @param {CategoryType} category - The category object of type SpaceType.
11839
11869
  */
11840
- constructor(spaceType) {
11841
- super(spaceType);
11870
+ constructor(category) {
11871
+ super(category);
11842
11872
  }
11843
11873
  };
11844
- Object.defineProperty(SpaceType.prototype, "schema", {
11874
+ Object.defineProperty(Category.prototype, "schema", {
11845
11875
  value: schema
11846
11876
  });
11847
- Object.defineProperty(SpaceType.prototype, "validator", {
11877
+ Object.defineProperty(Category.prototype, "validator", {
11848
11878
  get: function() {
11849
11879
  return validator;
11850
11880
  }
11851
11881
  });
11852
- Object.defineProperty(SpaceType, "validProperties", {
11882
+ Object.defineProperty(Category, "validProperties", {
11853
11883
  value: Object.keys(schema.properties)
11854
11884
  });
11855
- module.exports = SpaceType;
11885
+ module.exports = Category;
11856
11886
  }
11857
11887
  });
11858
11888
 
@@ -11863,7 +11893,7 @@ var require_ticket = __commonJS({
11863
11893
  $schema: "http://json-schema.org/draft-07/schema",
11864
11894
  $id: "ticket.json",
11865
11895
  title: "Ticket",
11866
- description: "A ticket is a request for help from a user.",
11896
+ description: "A ticket is a request from a user.",
11867
11897
  type: "object",
11868
11898
  properties: {
11869
11899
  id: {
@@ -11906,10 +11936,52 @@ var require_ticket = __commonJS({
11906
11936
  }
11907
11937
  },
11908
11938
  requester: {
11909
- type: "string"
11939
+ type: "object",
11940
+ properties: {
11941
+ userId: {
11942
+ type: "string"
11943
+ },
11944
+ userName: {
11945
+ type: "string"
11946
+ },
11947
+ userPhoto: {
11948
+ anyOf: [
11949
+ { $ref: "mediaFile.json" },
11950
+ { type: "null" },
11951
+ { type: "string" }
11952
+ ]
11953
+ },
11954
+ deviceId: {
11955
+ type: "string"
11956
+ },
11957
+ roomId: {
11958
+ type: "string"
11959
+ },
11960
+ spaceId: {
11961
+ type: "string"
11962
+ },
11963
+ spaceName: {
11964
+ type: "string"
11965
+ }
11966
+ }
11910
11967
  },
11911
11968
  assignedTo: {
11912
- type: ["string", "null"]
11969
+ type: "object",
11970
+ properties: {
11971
+ userId: {
11972
+ type: "string"
11973
+ },
11974
+ userName: {
11975
+ type: "string"
11976
+ },
11977
+ userPhoto: {
11978
+ anyOf: [
11979
+ { $ref: "mediaFile.json" },
11980
+ { type: "null" },
11981
+ { type: "string" }
11982
+ ]
11983
+ }
11984
+ }
11913
11985
  },
11914
11986
  status: {
11915
11987
  type: "string",
@@ -11931,6 +12003,9 @@ var require_ticket = __commonJS({
11931
12003
  ratingComment: {
11932
12004
  type: "string"
11933
12005
  },
12006
+ tipAmount: {
12007
+ type: "string"
12008
+ },
11934
12009
  createdAt: {
11935
12010
  $ref: "definitions.json#/definitions/date"
11936
12011
  },
@@ -14111,6 +14186,8 @@ var require_Ticket = __commonJS({
14111
14186
  });
14112
14187
  function mapConversationData(data) {
14113
14188
  const ticketData = cloneDeep(data);
14189
+ if (!ticketData.conversation)
14190
+ ticketData.conversation = [];
14114
14191
  ticketData.conversation = ticketData.conversation.map((msg) => {
14115
14192
  if (msg.media) {
14116
14193
  msg.media = new MediaFile(msg.media);
@@ -14216,7 +14293,8 @@ var require_product = __commonJS({
14216
14293
  $ref: "definitions.json#/definitions/id"
14217
14294
  },
14218
14295
  type: {
14219
- type: "string"
14296
+ type: "string",
14297
+ default: "product"
14220
14298
  },
14221
14299
  name: {
14222
14300
  type: "string"
@@ -15552,6 +15630,9 @@ var require_property = __commonJS({
15552
15630
  type: "boolean",
15553
15631
  default: false
15554
15632
  },
15633
+ enableApp: {
15634
+ type: "boolean"
15635
+ },
15555
15636
  branding: {
15556
15637
  type: "object",
15557
15638
  properties: {
@@ -15778,7 +15859,7 @@ var require_Models = __commonJS({
15778
15859
  var MediaSource = require_MediaSource();
15779
15860
  var Room = require_Room();
15780
15861
  var Space = require_Space();
15781
- var SpaceType = require_SpaceType();
15862
+ var Category = require_Category();
15782
15863
  var Ticket = require_Ticket();
15783
15864
  var Scene = require_Scene();
15784
15865
  var Gateway = require_Gateway();
@@ -15815,7 +15896,7 @@ var require_Models = __commonJS({
15815
15896
  SystemUser,
15816
15897
  Room,
15817
15898
  Space,
15818
- SpaceType,
15899
+ Category,
15819
15900
  Ticket,
15820
15901
  Scene,
15821
15902
  DiscoveredDevice,