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