@kohost/api-client 3.2.14 → 3.3.0-beta.1

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 (124) hide show
  1. package/dist/cjs/AMQPClient/index.js +1 -45
  2. package/dist/cjs/Commands/{CheckInReservationCommand.js → CheckInReservation.js} +2 -6
  3. package/dist/cjs/Commands/{CheckOutReservationCommand.js → CheckOutReservation.js} +2 -6
  4. package/dist/cjs/Commands/Command.js +5 -7
  5. package/dist/cjs/Commands/{CreateImageUploadEndpointCommand.js → CreateImageUploadEndpoint.js} +2 -6
  6. package/dist/cjs/Commands/{CreateShortLinkCommand.js → CreateShortLink.js} +0 -4
  7. package/dist/cjs/Commands/GetCategories.js +13 -0
  8. package/dist/cjs/Commands/{GetMobileKeyCommand.js → GetMobileKey.js} +2 -6
  9. package/dist/cjs/Commands/GetProducts.js +13 -0
  10. package/dist/cjs/Commands/GetReservationSpaceCategoryAvailabilities.js +16 -0
  11. package/dist/cjs/Commands/{DiscoverReservationsCommand.js → GetReservations.js} +3 -7
  12. package/dist/cjs/Commands/{DiscoverRoomsCommand.js → GetRooms.js} +3 -9
  13. package/dist/cjs/Commands/GetUsers.js +13 -0
  14. package/dist/cjs/Commands/{OCRDocumentCommand.js → OCRDocument.js} +2 -2
  15. package/dist/cjs/Commands/{SellProductsCommand.js → SellProducts.js} +2 -6
  16. package/dist/cjs/Commands/{SendEmailCommand.js → SendEmail.js} +2 -6
  17. package/dist/cjs/Commands/{SendSMSCommand.js → SendSMS.js} +2 -6
  18. package/dist/cjs/Commands/{SetAlarmCommand.js → SetAlarm.js} +2 -6
  19. package/dist/cjs/Commands/{SetCourtesyCommand.js → SetCourtesy.js} +2 -6
  20. package/dist/cjs/Commands/{SetDimmerCommand.js → SetDimmer.js} +2 -6
  21. package/dist/cjs/Commands/{SetLockCommand.js → SetLock.js} +2 -6
  22. package/dist/cjs/Commands/{SetMediaCommand.js → SetMedia.js} +2 -6
  23. package/dist/cjs/Commands/{SetSceneCommand.js → SetScene.js} +2 -6
  24. package/dist/cjs/Commands/{SetSwitchCommand.js → SetSwitch.js} +2 -6
  25. package/dist/cjs/Commands/{SetThermostatCommand.js → SetThermostat.js} +2 -6
  26. package/dist/cjs/Commands/{SetWindowCoveringCommand.js → SetWindowCovering.js} +2 -6
  27. package/dist/cjs/Commands/{UpdateReservationCommand.js → UpdateReservation.js} +2 -6
  28. package/dist/cjs/Commands/{UpdateUserCommand.js → UpdateUser.js} +2 -6
  29. package/dist/cjs/Commands/{UploadImageCommand.js → UploadImage.js} +2 -6
  30. package/dist/cjs/Commands/index.js +56 -54
  31. package/dist/cjs/Events/ApplicationInUse.js +22 -0
  32. package/dist/cjs/Events/ApplicationOutOfUse.js +22 -0
  33. package/dist/cjs/Events/EmailEvent.js +3 -4
  34. package/dist/cjs/Events/Event.js +17 -28
  35. package/dist/cjs/Events/ReservationCheckedIn.js +17 -0
  36. package/dist/cjs/Events/ReservationCheckedOut.js +17 -0
  37. package/dist/cjs/Events/SMSEvent.js +3 -4
  38. package/dist/cjs/Events/SceneSet.js +17 -0
  39. package/dist/cjs/Events/ShortLinkCreated.js +17 -0
  40. package/dist/cjs/Events/SystemAlarmUpdated.js +17 -0
  41. package/dist/cjs/Events/SystemCameraUpdated.js +17 -0
  42. package/dist/cjs/Events/SystemCategoryUpdated.js +17 -0
  43. package/dist/cjs/Events/SystemCourtesyUpdated.js +17 -0
  44. package/dist/cjs/Events/SystemCredentialUpdated.js +17 -0
  45. package/dist/cjs/Events/SystemDimmerUpdated.js +17 -0
  46. package/dist/cjs/Events/SystemEntityDeleted.js +17 -0
  47. package/dist/cjs/Events/SystemGatewayUpdated.js +17 -0
  48. package/dist/cjs/Events/SystemLockUpdated.js +17 -0
  49. package/dist/cjs/Events/SystemMediaSourceUpdated.js +17 -0
  50. package/dist/cjs/Events/SystemMotionSensorUpdated.js +17 -0
  51. package/dist/cjs/Events/SystemOrganizationUpdated.js +17 -0
  52. package/dist/cjs/Events/SystemProductUpdated.js +17 -0
  53. package/dist/cjs/Events/SystemPropertyUpdated.js +17 -0
  54. package/dist/cjs/Events/SystemReservationUpdated.js +17 -0
  55. package/dist/cjs/Events/SystemSpaceUpdated.js +17 -0
  56. package/dist/cjs/Events/SystemSwitchUpdated.js +17 -0
  57. package/dist/cjs/Events/SystemThermostatUpdated.js +17 -0
  58. package/dist/cjs/Events/SystemUserUpdated.js +17 -0
  59. package/dist/cjs/Events/SystemWindowCoveringUpdated.js +17 -0
  60. package/dist/cjs/Events/index.js +53 -55
  61. package/dist/cjs/defs/amqpExchanges.js +46 -0
  62. package/dist/cjs/schemas/AlarmSchema.d.ts +1 -0
  63. package/dist/cjs/schemas/CameraSchema.d.ts +1 -0
  64. package/dist/cjs/schemas/CategorySchema.d.ts +1 -0
  65. package/dist/cjs/schemas/CourtesySchema.d.ts +1 -0
  66. package/dist/cjs/schemas/CredentialSchema.d.ts +1 -0
  67. package/dist/cjs/schemas/DimmerSchema.d.ts +1 -0
  68. package/dist/cjs/schemas/GatewaySchema.d.ts +1 -0
  69. package/dist/cjs/schemas/LockSchema.d.ts +1 -0
  70. package/dist/cjs/schemas/MediaSourceSchema.d.ts +1 -0
  71. package/dist/cjs/schemas/MotionSensorSchema.d.ts +1 -0
  72. package/dist/cjs/schemas/ProductSchema.d.ts +1 -0
  73. package/dist/cjs/schemas/ReservationSchema.d.ts +1 -0
  74. package/dist/cjs/schemas/RoomSchema.d.ts +10 -0
  75. package/dist/cjs/schemas/SpaceSchema.d.ts +1 -0
  76. package/dist/cjs/schemas/SwitchSchema.d.ts +1 -0
  77. package/dist/cjs/schemas/SystemUserSchema.d.ts +1 -0
  78. package/dist/cjs/schemas/ThermostatSchema.d.ts +1 -0
  79. package/dist/cjs/schemas/UserSchema.d.ts +1 -0
  80. package/dist/cjs/schemas/WindowCoveringSchema.d.ts +1 -0
  81. package/dist/cjs/schemas/definitions.json +1 -0
  82. package/dist/esm/Commands.js +276 -324
  83. package/dist/esm/Commands.js.map +3 -3
  84. package/dist/esm/Events.js +387 -472
  85. package/dist/esm/Events.js.map +3 -3
  86. package/dist/esm/Models.js +21 -10
  87. package/dist/esm/Models.js.map +3 -3
  88. package/dist/esm/SocketIoClient.js +18 -18
  89. package/dist/esm/SocketIoClient.js.map +3 -3
  90. package/dist/esm/utils.js +21 -10
  91. package/dist/esm/utils.js.map +3 -3
  92. package/package.json +1 -24
  93. package/dist/cjs/Commands/DiscoverCategoriesCommand.js +0 -20
  94. package/dist/cjs/Commands/DiscoverProductsCommand.js +0 -27
  95. package/dist/cjs/Commands/DiscoverReservationSpaceCategoryAvailabilitiesCommand.js +0 -20
  96. package/dist/cjs/Commands/DiscoverUsersCommand.js +0 -19
  97. package/dist/cjs/Events/ApplicationInUseEvent.js +0 -25
  98. package/dist/cjs/Events/ApplicationOutOfUseEvent.js +0 -25
  99. package/dist/cjs/Events/ReservationCheckInEvent.js +0 -23
  100. package/dist/cjs/Events/ReservationCheckOutEvent.js +0 -23
  101. package/dist/cjs/Events/SMSSentEvent.js +0 -17
  102. package/dist/cjs/Events/SceneSetEvent.js +0 -17
  103. package/dist/cjs/Events/ShortLinkCreatedEvent.js +0 -17
  104. package/dist/cjs/Events/SystemAlarmUpdatedEvent.js +0 -17
  105. package/dist/cjs/Events/SystemCameraUpdatedEvent.js +0 -17
  106. package/dist/cjs/Events/SystemCategoryUpdatedEvent.js +0 -17
  107. package/dist/cjs/Events/SystemCourtesyUpdatedEvent.js +0 -17
  108. package/dist/cjs/Events/SystemCredentialUpdatedEvent.js +0 -17
  109. package/dist/cjs/Events/SystemDimmerUpdatedEvent.js +0 -17
  110. package/dist/cjs/Events/SystemEntityDeletedEvent.js +0 -17
  111. package/dist/cjs/Events/SystemGatewayUpdatedEvent.js +0 -17
  112. package/dist/cjs/Events/SystemLockUpdatedEvent.js +0 -17
  113. package/dist/cjs/Events/SystemMediaSourceUpdatedEvent.js +0 -17
  114. package/dist/cjs/Events/SystemMotionSensorUpdatedEvent.js +0 -17
  115. package/dist/cjs/Events/SystemOrganizationUpdatedEvent.js +0 -17
  116. package/dist/cjs/Events/SystemProductUpdatedEvent.js +0 -17
  117. package/dist/cjs/Events/SystemPropertyUpdatedEvent.js +0 -17
  118. package/dist/cjs/Events/SystemReservationUpdatedEvent.js +0 -17
  119. package/dist/cjs/Events/SystemSceneControllerUpdatedEvent.js +0 -17
  120. package/dist/cjs/Events/SystemSpaceUpdatedEvent.js +0 -17
  121. package/dist/cjs/Events/SystemSwitchUpdatedEvent.js +0 -17
  122. package/dist/cjs/Events/SystemThermostatUpdatedEvent.js +0 -17
  123. package/dist/cjs/Events/SystemUserUpdatedEvent.js +0 -17
  124. package/dist/cjs/Events/SystemWindowCoveringUpdatedEvent.js +0 -17
@@ -1,57 +1,59 @@
1
- const SetSceneCommand = require("./SetSceneCommand");
2
- const SetAlarmCommand = require("./SetAlarmCommand");
3
- const SetDimmerCommand = require("./SetDimmerCommand");
4
- const SetSwitchCommand = require("./SetSwitchCommand");
5
- const SetThermostatCommand = require("./SetThermostatCommand");
6
- const SetLockCommand = require("./SetLockCommand");
7
- const SetWindowCoveringCommand = require("./SetWindowCoveringCommand");
8
- const SetCourtesyCommand = require("./SetCourtesyCommand");
9
- const SetMediaCommand = require("./SetMediaCommand");
10
- const DiscoverUsersCommand = require("./DiscoverUsersCommand");
11
- const OCRDocumentCommand = require("./OCRDocumentCommand");
12
- const CheckInReservationCommand = require("./CheckInReservationCommand");
13
- const CheckOutReservationCommand = require("./CheckOutReservationCommand");
14
- const SendEmailCommand = require("./SendEmailCommand");
15
- const SendSMSCommand = require("./SendSMSCommand");
16
- const DiscoverReservationsCommand = require("./DiscoverReservationsCommand");
17
- const DiscoverReservationSpaceCategoryAvailabilitiesCommand = require("./DiscoverReservationSpaceCategoryAvailabilitiesCommand");
18
- const DiscoverRoomsCommand = require("./DiscoverRoomsCommand");
19
- const DiscoverCategoriesCommand = require("./DiscoverCategoriesCommand");
20
- const CreateShortLinkCommand = require("./CreateShortLinkCommand");
21
- const UpdateReservationCommand = require("./UpdateReservationCommand");
22
- const UpdateUserCommand = require("./UpdateUserCommand");
23
- const GetMobileKeyCommand = require("./GetMobileKeyCommand");
24
- const CreateImageUploadEndpointCommand = require("./CreateImageUploadEndpointCommand");
25
- const UploadImageCommand = require("./UploadImageCommand");
26
- const DiscoverProductsCommand = require("./DiscoverProductsCommand");
27
- const SellProductsCommand = require("./SellProductsCommand");
1
+ const Command = require("./Command");
2
+ const SetScene = require("./SetScene");
3
+ const SetAlarm = require("./SetAlarm");
4
+ const SetDimmer = require("./SetDimmer");
5
+ const SetSwitch = require("./SetSwitch");
6
+ const SetThermostat = require("./SetThermostat");
7
+ const SetLock = require("./SetLock");
8
+ const SetWindowCovering = require("./SetWindowCovering");
9
+ const SetCourtesy = require("./SetCourtesy");
10
+ const SetMedia = require("./SetMedia");
11
+ const GetUsers = require("./GetUsers");
12
+ const OCRDocument = require("./OCRDocument");
13
+ const CheckInReservation = require("./CheckInReservation");
14
+ const CheckOutReservation = require("./CheckOutReservation");
15
+ const SendEmail = require("./SendEmail");
16
+ const SendSMS = require("./SendSMS");
17
+ const GetReservations = require("./GetReservations");
18
+ const GetReservationSpaceCategoryAvailabilities = require("./GetReservationSpaceCategoryAvailabilities");
19
+ const GetRooms = require("./GetRooms");
20
+ const GetCategories = require("./GetCategories");
21
+ const CreateShortLink = require("./CreateShortLink");
22
+ const UpdateReservation = require("./UpdateReservation");
23
+ const UpdateUser = require("./UpdateUser");
24
+ const GetMobileKey = require("./GetMobileKey");
25
+ const CreateImageUploadEndpoint = require("./CreateImageUploadEndpoint");
26
+ const UploadImage = require("./UploadImage");
27
+ const GetProducts = require("./GetProducts");
28
+ const SellProducts = require("./SellProducts");
28
29
 
29
30
  module.exports = {
30
- SetSceneCommand,
31
- SetAlarmCommand,
32
- SetDimmerCommand,
33
- SetSwitchCommand,
34
- SetThermostatCommand,
35
- SetLockCommand,
36
- SetWindowCoveringCommand,
37
- SetCourtesyCommand,
38
- SetMediaCommand,
39
- OCRDocumentCommand,
40
- DiscoverUsersCommand,
41
- CheckInReservationCommand,
42
- CheckOutReservationCommand,
43
- SendSMSCommand,
44
- SendEmailCommand,
45
- DiscoverReservationsCommand,
46
- DiscoverReservationSpaceCategoryAvailabilitiesCommand,
47
- DiscoverRoomsCommand,
48
- DiscoverCategoriesCommand,
49
- CreateShortLinkCommand,
50
- UpdateReservationCommand,
51
- UpdateUserCommand,
52
- GetMobileKeyCommand,
53
- CreateImageUploadEndpointCommand,
54
- UploadImageCommand,
55
- DiscoverProductsCommand,
56
- SellProductsCommand,
31
+ Command,
32
+ SetScene,
33
+ SetAlarm,
34
+ SetDimmer,
35
+ SetSwitch,
36
+ SetThermostat,
37
+ SetLock,
38
+ SetWindowCovering,
39
+ SetCourtesy,
40
+ SetMedia,
41
+ OCRDocument,
42
+ GetUsers,
43
+ CheckInReservation,
44
+ CheckOutReservation,
45
+ SendSMS,
46
+ SendEmail,
47
+ GetReservations,
48
+ GetReservationSpaceCategoryAvailabilities,
49
+ GetRooms,
50
+ GetCategories,
51
+ CreateShortLink,
52
+ UpdateReservation,
53
+ UpdateUser,
54
+ GetMobileKey,
55
+ CreateImageUploadEndpoint,
56
+ UploadImage,
57
+ GetProducts,
58
+ SellProducts,
57
59
  };
@@ -0,0 +1,22 @@
1
+ const Event = require("./Event");
2
+ const exchanges = require("../defs/amqpExchanges");
3
+
4
+ class ApplicationInUse extends Event {
5
+ constructor(data = {}, context) {
6
+ super(data, context);
7
+ }
8
+
9
+ static get name() {
10
+ return "ApplicationInUse";
11
+ }
12
+
13
+ static get entity() {
14
+ return "app";
15
+ }
16
+
17
+ static get exchange() {
18
+ return exchanges.AppEvents.name;
19
+ }
20
+ }
21
+
22
+ module.exports = ApplicationInUse;
@@ -0,0 +1,22 @@
1
+ const exchanges = require("../defs/amqpExchanges");
2
+ const Event = require("./Event");
3
+
4
+ class ApplicationOutOfUse extends Event {
5
+ constructor(data = {}, context = {}) {
6
+ super(data, context);
7
+ }
8
+
9
+ static get name() {
10
+ return "ApplicationOutOfUse";
11
+ }
12
+
13
+ static get entity() {
14
+ return "app";
15
+ }
16
+
17
+ static get exchange() {
18
+ return exchanges.AppEvents.name;
19
+ }
20
+ }
21
+
22
+ module.exports = ApplicationOutOfUse;
@@ -3,15 +3,14 @@ const Event = require("./Event");
3
3
  class EmailEvent extends Event {
4
4
  constructor(email, context) {
5
5
  super(email, context);
6
- this.status = email.status;
7
6
  }
8
7
 
9
- get name() {
8
+ static get name() {
10
9
  return "EmailEvent";
11
10
  }
12
11
 
13
- get routingKey() {
14
- return `comm.email.${this.status}`;
12
+ static get entity() {
13
+ return "emailMessage";
15
14
  }
16
15
  }
17
16
 
@@ -1,55 +1,44 @@
1
+ const exchanges = require("../defs/amqpExchanges");
2
+
1
3
  class Event {
2
- constructor(data, context) {
4
+ constructor(data, context = {}) {
3
5
  this.data = [];
4
- this.context = {};
6
+ this.context = context;
5
7
  if (!data) throw new Error("Event data is required");
6
8
  if (typeof data !== "object" && !Array.isArray(data))
7
9
  throw new Error("Event data must be an object or array");
8
10
 
9
11
  if (!Array.isArray(data)) this.data = [data];
10
12
  else this.data = data;
11
-
12
- this.data = this.data.map((d) => {
13
- if (d.eventData) {
14
- if (!d.eventData.timestamp) d.eventData.timestamp = new Date();
15
- if (!d.eventData.name) d.eventData.name = this.name;
16
- if (!d.eventData.type) d.eventData.type = this.type;
17
- }
18
- return d;
19
- });
20
-
21
- if (context) {
22
- for (const key in context) {
23
- this.context[key] = context[key];
24
- }
25
- }
26
13
  }
27
14
 
28
- get keyId() {
29
- if (Array.isArray(this.data)) return "batch";
30
- if (this.data.id) return this.data.id;
31
- return "unknown";
15
+ get organizationId() {
16
+ return this.context.organizationId || "*";
32
17
  }
33
18
 
34
- get name() {
35
- throw new Error("Event name is required");
19
+ get propertyId() {
20
+ return this.context.propertyId || "*";
36
21
  }
37
22
 
38
- get type() {
23
+ static get type() {
39
24
  return "Event";
40
25
  }
41
26
 
42
- get routingKey() {
43
- return "";
27
+ static get exchange() {
28
+ return exchanges.DriverEvents.name;
44
29
  }
45
30
 
46
- get exchange() {
47
- return "DriverEvents";
31
+ static get entity() {
32
+ throw new Error("Event entity is required");
48
33
  }
49
34
 
50
35
  build() {
51
36
  return { data: { ...this.data } };
52
37
  }
38
+
39
+ get routingKey() {
40
+ return `${this.organizationId}.${this.propertyId}.${this.constructor.entity}.${this.constructor.name}`;
41
+ }
53
42
  }
54
43
 
55
44
  module.exports = Event;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class ReservationCheckedIn extends Event {
4
+ constructor(reservation, context) {
5
+ super(reservation, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "ReservationCheckedIn";
10
+ }
11
+
12
+ static get entity() {
13
+ return "reservation";
14
+ }
15
+ }
16
+
17
+ module.exports = ReservationCheckedIn;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class ReservationCheckedOut extends Event {
4
+ constructor(reservation, context) {
5
+ super(reservation, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "ReservationCheckedOut";
10
+ }
11
+
12
+ static get entity() {
13
+ return "reservation";
14
+ }
15
+ }
16
+
17
+ module.exports = ReservationCheckedOut;
@@ -3,15 +3,14 @@ const Event = require("./Event");
3
3
  class SMSEvent extends Event {
4
4
  constructor(sms, context) {
5
5
  super(sms, context);
6
- this.status = sms.status;
7
6
  }
8
7
 
9
- get name() {
8
+ static get name() {
10
9
  return "SMSEvent";
11
10
  }
12
11
 
13
- get routingKey() {
14
- return `comm.sms.${this.status}`;
12
+ static get entity() {
13
+ return "smsMessage";
15
14
  }
16
15
  }
17
16
 
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SceneSet extends Event {
4
+ constructor(scene, context) {
5
+ super(scene, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SceneSet";
10
+ }
11
+
12
+ static get entity() {
13
+ return "scene";
14
+ }
15
+ }
16
+
17
+ module.exports = SceneSet;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class ShortLinkCreated extends Event {
4
+ constructor(shortLink, context) {
5
+ super(shortLink, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "ShortLinkCreated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "shortLink";
14
+ }
15
+ }
16
+
17
+ module.exports = ShortLinkCreated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemAlarmUpdated extends Event {
4
+ constructor(alarm, context) {
5
+ super(alarm, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemAlarmUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "alarm";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemAlarmUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemCameraUpdated extends Event {
4
+ constructor(camera, context) {
5
+ super(camera, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemCameraUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "camera";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemCameraUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemCategoryUpdated extends Event {
4
+ constructor(category, context) {
5
+ super(category, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemCategoryUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "category";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemCategoryUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemCourtesyUpdated extends Event {
4
+ constructor(courtesy, context) {
5
+ super(courtesy, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemCourtesyUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "courtesy";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemCourtesyUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemCredentialUpdated extends Event {
4
+ constructor(cred, context) {
5
+ super(cred, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemCredentialUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "credential";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemCredentialUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemDimmerUpdated extends Event {
4
+ constructor(dimmer, context) {
5
+ super(dimmer, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemDimmerUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "dimmer";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemDimmerUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemEntityDeleted extends Event {
4
+ constructor(data, context) {
5
+ super(data, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemEntityDeleted";
10
+ }
11
+
12
+ static get entity() {
13
+ return "entity";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemEntityDeleted;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemGatewayUpdated extends Event {
4
+ constructor(gateway, context) {
5
+ super(gateway, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemGatewayUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "gateway";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemGatewayUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemLockUpdated extends Event {
4
+ constructor(lock, context) {
5
+ super(lock, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemLockUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "lock";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemLockUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemMediaSourceUpdated extends Event {
4
+ constructor(mediaSource, context) {
5
+ super(mediaSource, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemMediaSourceUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "mediaSource";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemMediaSourceUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemMotionSensorUpdated extends Event {
4
+ constructor(motion, context) {
5
+ super(motion, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemMotionSensorUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "motionSensor";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemMotionSensorUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemOrganizationUpdated extends Event {
4
+ constructor(organization, context) {
5
+ super(organization, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemOrganizationUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "organization";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemOrganizationUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemProductUpdated extends Event {
4
+ constructor(product, context) {
5
+ super(product, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemProductUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "product";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemProductUpdated;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemPropertyUpdate extends Event {
4
+ constructor(property, context) {
5
+ super(property, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemPropertyUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "property";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemPropertyUpdate;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemReservationUpdate extends Event {
4
+ constructor(reservation, context) {
5
+ super(reservation, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemReservationUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "reservation";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemReservationUpdate;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemSpaceUpdate extends Event {
4
+ constructor(space, context) {
5
+ super(space, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemSpaceUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "space";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemSpaceUpdate;
@@ -0,0 +1,17 @@
1
+ const Event = require("./Event");
2
+
3
+ class SystemSwitchUpdate extends Event {
4
+ constructor(_switch, context) {
5
+ super(_switch, context);
6
+ }
7
+
8
+ static get name() {
9
+ return "SystemSwitchUpdated";
10
+ }
11
+
12
+ static get entity() {
13
+ return "switch";
14
+ }
15
+ }
16
+
17
+ module.exports = SystemSwitchUpdate;