@kohost/api-client 3.0.0-beta.47 → 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/dist/cjs/AMQPClient/index.js +290 -0
- 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.js → SocketIoClient/index.js} +19 -14
- 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.js +23 -0
- 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/Models.js +451 -435
- package/dist/esm/Models.js.map +4 -4
- package/dist/esm/utils.js +7 -26
- package/dist/esm/utils.js.map +3 -3
- package/package.json +12 -7
- package/dist/cjs/AMQPClient.js +0 -462
- package/dist/cjs/Commands.js +0 -973
- package/dist/cjs/Errors.js +0 -209
- package/dist/cjs/Events.js +0 -578
- package/dist/cjs/Models.js +0 -4905
- package/dist/cjs/defs.js +0 -167
- package/dist/cjs/index.cjs.js +0 -6755
- package/dist/cjs/utils.js +0 -525
- /package/dist/cjs/{Client.js → Client/index.js} +0 -0
package/dist/cjs/Commands.js
DELETED
|
@@ -1,973 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
5
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
// src/Commands/Command.js
|
|
9
|
-
var require_Command = __commonJS({
|
|
10
|
-
"src/Commands/Command.js"(exports2, module2) {
|
|
11
|
-
var Command = class {
|
|
12
|
-
static {
|
|
13
|
-
__name(this, "Command");
|
|
14
|
-
}
|
|
15
|
-
constructor(data) {
|
|
16
|
-
this.data = {};
|
|
17
|
-
if (!data)
|
|
18
|
-
throw new Error("Command data is required");
|
|
19
|
-
if (typeof data !== "object")
|
|
20
|
-
throw new Error("Command data must be an object");
|
|
21
|
-
for (const key in data) {
|
|
22
|
-
this.data[key] = data[key];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
get name() {
|
|
26
|
-
throw new Error("Command name is required");
|
|
27
|
-
}
|
|
28
|
-
get type() {
|
|
29
|
-
return "Command";
|
|
30
|
-
}
|
|
31
|
-
get routingKey() {
|
|
32
|
-
return "";
|
|
33
|
-
}
|
|
34
|
-
get exchange() {
|
|
35
|
-
return "Commands";
|
|
36
|
-
}
|
|
37
|
-
build() {
|
|
38
|
-
return { data: { ...this.data } };
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
module2.exports = Command;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
// src/Commands/SetSceneCommand.js
|
|
46
|
-
var require_SetSceneCommand = __commonJS({
|
|
47
|
-
"src/Commands/SetSceneCommand.js"(exports2, module2) {
|
|
48
|
-
var Command = require_Command();
|
|
49
|
-
var SetSceneCommand2 = 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
|
-
module2.exports = SetSceneCommand2;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// src/Commands/SetAlarmCommand.js
|
|
68
|
-
var require_SetAlarmCommand = __commonJS({
|
|
69
|
-
"src/Commands/SetAlarmCommand.js"(exports2, module2) {
|
|
70
|
-
var Command = require_Command();
|
|
71
|
-
var SetAlarmCommand2 = class extends Command {
|
|
72
|
-
static {
|
|
73
|
-
__name(this, "SetAlarmCommand");
|
|
74
|
-
}
|
|
75
|
-
constructor({ id, zones, areas }) {
|
|
76
|
-
super({ id, zones, areas });
|
|
77
|
-
}
|
|
78
|
-
get name() {
|
|
79
|
-
return "SetAlarm";
|
|
80
|
-
}
|
|
81
|
-
get routingKey() {
|
|
82
|
-
return `alarm.${this.data.id}.set`;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
module2.exports = SetAlarmCommand2;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// src/Commands/SetDimmerCommand.js
|
|
90
|
-
var require_SetDimmerCommand = __commonJS({
|
|
91
|
-
"src/Commands/SetDimmerCommand.js"(exports2, module2) {
|
|
92
|
-
var Command = require_Command();
|
|
93
|
-
var SetDimmerCommand2 = class extends Command {
|
|
94
|
-
static {
|
|
95
|
-
__name(this, "SetDimmerCommand");
|
|
96
|
-
}
|
|
97
|
-
constructor({ id, level }) {
|
|
98
|
-
super({ id, level });
|
|
99
|
-
}
|
|
100
|
-
get name() {
|
|
101
|
-
return "SetDimmer";
|
|
102
|
-
}
|
|
103
|
-
get routingKey() {
|
|
104
|
-
return `dimmer.${this.data.id}.set`;
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
module2.exports = SetDimmerCommand2;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
// src/Commands/SetSwitchCommand.js
|
|
112
|
-
var require_SetSwitchCommand = __commonJS({
|
|
113
|
-
"src/Commands/SetSwitchCommand.js"(exports2, module2) {
|
|
114
|
-
var Command = require_Command();
|
|
115
|
-
var SetSwitchCommand2 = class extends Command {
|
|
116
|
-
static {
|
|
117
|
-
__name(this, "SetSwitchCommand");
|
|
118
|
-
}
|
|
119
|
-
constructor({ id, state }) {
|
|
120
|
-
super({ id, state });
|
|
121
|
-
}
|
|
122
|
-
get name() {
|
|
123
|
-
return "SetSwitch";
|
|
124
|
-
}
|
|
125
|
-
get routingKey() {
|
|
126
|
-
return `switch.${this.data.id}.set`;
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
module2.exports = SetSwitchCommand2;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
// src/Commands/SetThermostatCommand.js
|
|
134
|
-
var require_SetThermostatCommand = __commonJS({
|
|
135
|
-
"src/Commands/SetThermostatCommand.js"(exports2, module2) {
|
|
136
|
-
var Command = require_Command();
|
|
137
|
-
var SetThermostatCommand2 = class extends Command {
|
|
138
|
-
static {
|
|
139
|
-
__name(this, "SetThermostatCommand");
|
|
140
|
-
}
|
|
141
|
-
constructor({ id, setpoints, hvacMode, fanMode }) {
|
|
142
|
-
super({ id, setpoints, hvacMode, fanMode });
|
|
143
|
-
}
|
|
144
|
-
get name() {
|
|
145
|
-
return "SetThermostat";
|
|
146
|
-
}
|
|
147
|
-
get routingKey() {
|
|
148
|
-
return `thermostat.${this.data.id}.set`;
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
module2.exports = SetThermostatCommand2;
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
// src/Commands/SetLockCommand.js
|
|
156
|
-
var require_SetLockCommand = __commonJS({
|
|
157
|
-
"src/Commands/SetLockCommand.js"(exports2, module2) {
|
|
158
|
-
var Command = require_Command();
|
|
159
|
-
var SetLockCommand2 = class extends Command {
|
|
160
|
-
static {
|
|
161
|
-
__name(this, "SetLockCommand");
|
|
162
|
-
}
|
|
163
|
-
constructor({ id, state }) {
|
|
164
|
-
super({ id, state });
|
|
165
|
-
}
|
|
166
|
-
get name() {
|
|
167
|
-
return "SetLock";
|
|
168
|
-
}
|
|
169
|
-
get routingKey() {
|
|
170
|
-
return `lock.${this.data.id}.set`;
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
module2.exports = SetLockCommand2;
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
// src/Commands/SetWindowCoveringCommand.js
|
|
178
|
-
var require_SetWindowCoveringCommand = __commonJS({
|
|
179
|
-
"src/Commands/SetWindowCoveringCommand.js"(exports2, module2) {
|
|
180
|
-
var Command = require_Command();
|
|
181
|
-
var SetWindowCoveringCommand2 = class extends Command {
|
|
182
|
-
static {
|
|
183
|
-
__name(this, "SetWindowCoveringCommand");
|
|
184
|
-
}
|
|
185
|
-
constructor({ id, position }) {
|
|
186
|
-
super({ id, position });
|
|
187
|
-
}
|
|
188
|
-
get name() {
|
|
189
|
-
return "SetWindowCovering";
|
|
190
|
-
}
|
|
191
|
-
get routingKey() {
|
|
192
|
-
return `windowCovering.${this.data.id}.set`;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
module2.exports = SetWindowCoveringCommand2;
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
// src/Commands/SetCourtesyCommand.js
|
|
200
|
-
var require_SetCourtesyCommand = __commonJS({
|
|
201
|
-
"src/Commands/SetCourtesyCommand.js"(exports2, module2) {
|
|
202
|
-
var Command = require_Command();
|
|
203
|
-
var SetCourtesyCommand2 = class extends Command {
|
|
204
|
-
static {
|
|
205
|
-
__name(this, "SetCourtesyCommand");
|
|
206
|
-
}
|
|
207
|
-
constructor({ id, state }) {
|
|
208
|
-
super({ id, state });
|
|
209
|
-
}
|
|
210
|
-
get name() {
|
|
211
|
-
return "SetCourtesy";
|
|
212
|
-
}
|
|
213
|
-
get routingKey() {
|
|
214
|
-
return `courtesy.${this.data.id}.set`;
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
module2.exports = SetCourtesyCommand2;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
// src/Commands/SetMediaCommand.js
|
|
222
|
-
var require_SetMediaCommand = __commonJS({
|
|
223
|
-
"src/Commands/SetMediaCommand.js"(exports2, module2) {
|
|
224
|
-
var Command = require_Command();
|
|
225
|
-
var SetMediaCommand2 = 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
|
-
module2.exports = SetMediaCommand2;
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
// src/Commands/DiscoverUsersCommand.js
|
|
244
|
-
var require_DiscoverUsersCommand = __commonJS({
|
|
245
|
-
"src/Commands/DiscoverUsersCommand.js"(exports2, module2) {
|
|
246
|
-
var Command = require_Command();
|
|
247
|
-
var DiscoverUsersCommand2 = class extends Command {
|
|
248
|
-
static {
|
|
249
|
-
__name(this, "DiscoverUsersCommand");
|
|
250
|
-
}
|
|
251
|
-
constructor({ id }) {
|
|
252
|
-
super({ id });
|
|
253
|
-
}
|
|
254
|
-
get name() {
|
|
255
|
-
return "DiscoverUsers";
|
|
256
|
-
}
|
|
257
|
-
get routingKey() {
|
|
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";
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
module2.exports = DiscoverUsersCommand2;
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
// src/Errors/AppError.js
|
|
270
|
-
var require_AppError = __commonJS({
|
|
271
|
-
"src/Errors/AppError.js"(exports2, module2) {
|
|
272
|
-
module2.exports = class AppError extends Error {
|
|
273
|
-
static {
|
|
274
|
-
__name(this, "AppError");
|
|
275
|
-
}
|
|
276
|
-
constructor(message = "Internal Server Error", options) {
|
|
277
|
-
super(message, options);
|
|
278
|
-
this.type = this.constructor.name;
|
|
279
|
-
this.statusCode = 500;
|
|
280
|
-
Object.setPrototypeOf(this, AppError.prototype);
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
// src/Errors/RequestError.js
|
|
287
|
-
var require_RequestError = __commonJS({
|
|
288
|
-
"src/Errors/RequestError.js"(exports2, module2) {
|
|
289
|
-
var AppError = require_AppError();
|
|
290
|
-
module2.exports = class RequestError extends AppError {
|
|
291
|
-
static {
|
|
292
|
-
__name(this, "RequestError");
|
|
293
|
-
}
|
|
294
|
-
constructor(message = "Bad Request", options = {}) {
|
|
295
|
-
super(message, options);
|
|
296
|
-
this.statusCode = 400;
|
|
297
|
-
Object.setPrototypeOf(this, RequestError.prototype);
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
// src/Commands/OCRDocumentCommand.js
|
|
304
|
-
var require_OCRDocumentCommand = __commonJS({
|
|
305
|
-
"src/Commands/OCRDocumentCommand.js"(exports2, module2) {
|
|
306
|
-
var Command = require_Command();
|
|
307
|
-
var RequestError = require_RequestError();
|
|
308
|
-
var OCRDocumentCommand2 = class extends Command {
|
|
309
|
-
static {
|
|
310
|
-
__name(this, "OCRDocumentCommand");
|
|
311
|
-
}
|
|
312
|
-
constructor({ type, image }) {
|
|
313
|
-
if (!image)
|
|
314
|
-
throw new RequestError("document image is required");
|
|
315
|
-
super({ type, image });
|
|
316
|
-
}
|
|
317
|
-
get name() {
|
|
318
|
-
return "OCRDocument";
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
module2.exports = OCRDocumentCommand2;
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
// src/Commands/CheckInReservationCommand.js
|
|
326
|
-
var require_CheckInReservationCommand = __commonJS({
|
|
327
|
-
"src/Commands/CheckInReservationCommand.js"(exports2, module2) {
|
|
328
|
-
var Command = require_Command();
|
|
329
|
-
var RequestError = require_RequestError();
|
|
330
|
-
var CheckInReservationCommand2 = class extends Command {
|
|
331
|
-
static {
|
|
332
|
-
__name(this, "CheckInReservationCommand");
|
|
333
|
-
}
|
|
334
|
-
constructor({ id }) {
|
|
335
|
-
if (!id)
|
|
336
|
-
throw new RequestError("document type is required");
|
|
337
|
-
super({ id });
|
|
338
|
-
}
|
|
339
|
-
get name() {
|
|
340
|
-
return "CheckInReservation";
|
|
341
|
-
}
|
|
342
|
-
get routingKey() {
|
|
343
|
-
return `reservation.${this.data.id}.checkin`;
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
module2.exports = CheckInReservationCommand2;
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
// src/Commands/SendEmailCommand.js
|
|
351
|
-
var require_SendEmailCommand = __commonJS({
|
|
352
|
-
"src/Commands/SendEmailCommand.js"(exports2, module2) {
|
|
353
|
-
var Command = require_Command();
|
|
354
|
-
var RequestError = require_RequestError();
|
|
355
|
-
var SendEmailCommand2 = 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
|
-
module2.exports = SendEmailCommand2;
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
// src/Commands/SendSMSCommand.js
|
|
382
|
-
var require_SendSMSCommand = __commonJS({
|
|
383
|
-
"src/Commands/SendSMSCommand.js"(exports2, module2) {
|
|
384
|
-
var Command = require_Command();
|
|
385
|
-
var RequestError = require_RequestError();
|
|
386
|
-
var SendSMSCommand2 = class extends Command {
|
|
387
|
-
static {
|
|
388
|
-
__name(this, "SendSMSCommand");
|
|
389
|
-
}
|
|
390
|
-
constructor({ id, body, to, from, ...rest }) {
|
|
391
|
-
if (!body)
|
|
392
|
-
throw new RequestError("sms body is required");
|
|
393
|
-
if (!to)
|
|
394
|
-
throw new RequestError("sms to is required");
|
|
395
|
-
if (!from)
|
|
396
|
-
throw new RequestError("sms from is required");
|
|
397
|
-
super({ id, body, to, from, ...rest });
|
|
398
|
-
}
|
|
399
|
-
get name() {
|
|
400
|
-
return "SendSMS";
|
|
401
|
-
}
|
|
402
|
-
get routingKey() {
|
|
403
|
-
return "comm.sms.send";
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
module2.exports = SendSMSCommand2;
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
// src/Errors/AuthenticationError.js
|
|
411
|
-
var require_AuthenticationError = __commonJS({
|
|
412
|
-
"src/Errors/AuthenticationError.js"(exports2, module2) {
|
|
413
|
-
var AppError = require_AppError();
|
|
414
|
-
module2.exports = class AuthenticationError extends AppError {
|
|
415
|
-
static {
|
|
416
|
-
__name(this, "AuthenticationError");
|
|
417
|
-
}
|
|
418
|
-
constructor(message = "Authentication Error", options = {}) {
|
|
419
|
-
super(message, options);
|
|
420
|
-
this.statusCode = 401;
|
|
421
|
-
Object.setPrototypeOf(this, AuthenticationError.prototype);
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
|
|
427
|
-
// src/Errors/AuthorizationError.js
|
|
428
|
-
var require_AuthorizationError = __commonJS({
|
|
429
|
-
"src/Errors/AuthorizationError.js"(exports2, module2) {
|
|
430
|
-
var AppError = require_AppError();
|
|
431
|
-
module2.exports = class AuthorizationError extends AppError {
|
|
432
|
-
static {
|
|
433
|
-
__name(this, "AuthorizationError");
|
|
434
|
-
}
|
|
435
|
-
constructor(message = "Authorization Error", options = {}) {
|
|
436
|
-
super(message, options);
|
|
437
|
-
this.statusCode = 403;
|
|
438
|
-
Object.setPrototypeOf(this, AuthorizationError.prototype);
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
// src/Errors/DeviceCommError.js
|
|
445
|
-
var require_DeviceCommError = __commonJS({
|
|
446
|
-
"src/Errors/DeviceCommError.js"(exports2, module2) {
|
|
447
|
-
var AppError = require_AppError();
|
|
448
|
-
module2.exports = class DeviceCommError extends AppError {
|
|
449
|
-
static {
|
|
450
|
-
__name(this, "DeviceCommError");
|
|
451
|
-
}
|
|
452
|
-
constructor(message = "Device Communication Error", options = {}) {
|
|
453
|
-
super(message, options);
|
|
454
|
-
this.statusCode = 503;
|
|
455
|
-
Object.setPrototypeOf(this, DeviceCommError.prototype);
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
// src/Errors/LoginError.js
|
|
462
|
-
var require_LoginError = __commonJS({
|
|
463
|
-
"src/Errors/LoginError.js"(exports2, module2) {
|
|
464
|
-
var AppError = require_AppError();
|
|
465
|
-
module2.exports = class LoginError extends AppError {
|
|
466
|
-
static {
|
|
467
|
-
__name(this, "LoginError");
|
|
468
|
-
}
|
|
469
|
-
constructor(message = "Invalid Login information provided", options = {}) {
|
|
470
|
-
super(message, options);
|
|
471
|
-
this.statusCode = 401;
|
|
472
|
-
Object.setPrototypeOf(this, LoginError.prototype);
|
|
473
|
-
}
|
|
474
|
-
};
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
|
|
478
|
-
// src/Errors/NotFoundError.js
|
|
479
|
-
var require_NotFoundError = __commonJS({
|
|
480
|
-
"src/Errors/NotFoundError.js"(exports2, module2) {
|
|
481
|
-
var AppError = require_AppError();
|
|
482
|
-
module2.exports = class NotFoundError extends AppError {
|
|
483
|
-
static {
|
|
484
|
-
__name(this, "NotFoundError");
|
|
485
|
-
}
|
|
486
|
-
constructor(message = "Resource Not Found", options = {}) {
|
|
487
|
-
super(message, options);
|
|
488
|
-
this.statusCode = 404;
|
|
489
|
-
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
// src/Errors/SystemCommError.js
|
|
496
|
-
var require_SystemCommError = __commonJS({
|
|
497
|
-
"src/Errors/SystemCommError.js"(exports2, module2) {
|
|
498
|
-
var AppError = require_AppError();
|
|
499
|
-
module2.exports = class SystemCommError extends AppError {
|
|
500
|
-
static {
|
|
501
|
-
__name(this, "SystemCommError");
|
|
502
|
-
}
|
|
503
|
-
constructor(message = "System Communication Error", options = {}) {
|
|
504
|
-
super(message, options);
|
|
505
|
-
this.statusCode = 503;
|
|
506
|
-
Object.setPrototypeOf(this, SystemCommError.prototype);
|
|
507
|
-
}
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
// src/Errors/TokenExpiredError.js
|
|
513
|
-
var require_TokenExpiredError = __commonJS({
|
|
514
|
-
"src/Errors/TokenExpiredError.js"(exports2, module2) {
|
|
515
|
-
var AppError = require_AppError();
|
|
516
|
-
module2.exports = class TokenExpiredError extends AppError {
|
|
517
|
-
static {
|
|
518
|
-
__name(this, "TokenExpiredError");
|
|
519
|
-
}
|
|
520
|
-
constructor(message = "Token Expired", options = {}) {
|
|
521
|
-
super(message, options);
|
|
522
|
-
this.statusCode = 401;
|
|
523
|
-
Object.setPrototypeOf(this, TokenExpiredError.prototype);
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
// src/Errors/UnprocessableRequestError.js
|
|
530
|
-
var require_UnprocessableRequestError = __commonJS({
|
|
531
|
-
"src/Errors/UnprocessableRequestError.js"(exports2, module2) {
|
|
532
|
-
var AppError = require_AppError();
|
|
533
|
-
module2.exports = class UnprocessableRequestError extends AppError {
|
|
534
|
-
static {
|
|
535
|
-
__name(this, "UnprocessableRequestError");
|
|
536
|
-
}
|
|
537
|
-
constructor(message = "Unprocessable Request Error", options = {}) {
|
|
538
|
-
super(message, options);
|
|
539
|
-
this.statusCode = 422;
|
|
540
|
-
Object.setPrototypeOf(this, UnprocessableRequestError.prototype);
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
|
|
546
|
-
// src/Errors/ValidationError.js
|
|
547
|
-
var require_ValidationError = __commonJS({
|
|
548
|
-
"src/Errors/ValidationError.js"(exports2, module2) {
|
|
549
|
-
var AppError = require_AppError();
|
|
550
|
-
module2.exports = class ValidationError extends AppError {
|
|
551
|
-
static {
|
|
552
|
-
__name(this, "ValidationError");
|
|
553
|
-
}
|
|
554
|
-
constructor(message = "Validation Error", options = {}) {
|
|
555
|
-
super(message, options);
|
|
556
|
-
this.statusCode = 400;
|
|
557
|
-
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
|
|
563
|
-
// src/Errors/index.js
|
|
564
|
-
var require_Errors = __commonJS({
|
|
565
|
-
"src/Errors/index.js"(exports2, module2) {
|
|
566
|
-
var Errors = {
|
|
567
|
-
AppError: require_AppError(),
|
|
568
|
-
AuthenticationError: require_AuthenticationError(),
|
|
569
|
-
AuthorizationError: require_AuthorizationError(),
|
|
570
|
-
DeviceCommError: require_DeviceCommError(),
|
|
571
|
-
LoginError: require_LoginError(),
|
|
572
|
-
NotFoundError: require_NotFoundError(),
|
|
573
|
-
RequestError: require_RequestError(),
|
|
574
|
-
SystemCommError: require_SystemCommError(),
|
|
575
|
-
TokenExpiredError: require_TokenExpiredError(),
|
|
576
|
-
UnprocessableRequestError: require_UnprocessableRequestError(),
|
|
577
|
-
ValidationError: require_ValidationError()
|
|
578
|
-
};
|
|
579
|
-
module2.exports = Errors;
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
|
|
583
|
-
// src/Commands/DiscoverReservationsCommand.js
|
|
584
|
-
var require_DiscoverReservationsCommand = __commonJS({
|
|
585
|
-
"src/Commands/DiscoverReservationsCommand.js"(exports2, module2) {
|
|
586
|
-
var { RequestError } = require_Errors();
|
|
587
|
-
var Command = require_Command();
|
|
588
|
-
var DiscoverReservationsCommand2 = class extends Command {
|
|
589
|
-
static {
|
|
590
|
-
__name(this, "DiscoverReservationsCommand");
|
|
591
|
-
}
|
|
592
|
-
constructor(options) {
|
|
593
|
-
if (!options)
|
|
594
|
-
throw new RequestError("options are required");
|
|
595
|
-
const { id, startDate, endDate, status, ...rest } = options;
|
|
596
|
-
super({ id, startDate, endDate, status, ...rest });
|
|
597
|
-
}
|
|
598
|
-
get name() {
|
|
599
|
-
return "DiscoverReservations";
|
|
600
|
-
}
|
|
601
|
-
get routingKey() {
|
|
602
|
-
return "reservation.discover";
|
|
603
|
-
}
|
|
604
|
-
};
|
|
605
|
-
module2.exports = DiscoverReservationsCommand2;
|
|
606
|
-
}
|
|
607
|
-
});
|
|
608
|
-
|
|
609
|
-
// src/Commands/DiscoverReservationRoomTypeUpsellOptionsCommand.js
|
|
610
|
-
var require_DiscoverReservationRoomTypeUpsellOptionsCommand = __commonJS({
|
|
611
|
-
"src/Commands/DiscoverReservationRoomTypeUpsellOptionsCommand.js"(exports2, module2) {
|
|
612
|
-
var { RequestError } = require_Errors();
|
|
613
|
-
var Command = require_Command();
|
|
614
|
-
var DiscoverReservationRoomTypeUpsellOptionsCommand2 = 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
|
-
module2.exports = DiscoverReservationRoomTypeUpsellOptionsCommand2;
|
|
632
|
-
}
|
|
633
|
-
});
|
|
634
|
-
|
|
635
|
-
// src/Commands/DiscoverRoomsCommand.js
|
|
636
|
-
var require_DiscoverRoomsCommand = __commonJS({
|
|
637
|
-
"src/Commands/DiscoverRoomsCommand.js"(exports2, module2) {
|
|
638
|
-
var Command = require_Command();
|
|
639
|
-
var DiscoverRoomsCommand2 = 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
|
-
module2.exports = DiscoverRoomsCommand2;
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
|
|
677
|
-
// src/Commands/DiscoverRoomTypesCommand.js
|
|
678
|
-
var require_DiscoverRoomTypesCommand = __commonJS({
|
|
679
|
-
"src/Commands/DiscoverRoomTypesCommand.js"(exports2, module2) {
|
|
680
|
-
var Command = require_Command();
|
|
681
|
-
var DiscoverRoomTypesCommand2 = class extends Command {
|
|
682
|
-
static {
|
|
683
|
-
__name(this, "DiscoverRoomTypesCommand");
|
|
684
|
-
}
|
|
685
|
-
constructor({ id }) {
|
|
686
|
-
super({ id });
|
|
687
|
-
}
|
|
688
|
-
get name() {
|
|
689
|
-
return "DiscoverRoomTypes";
|
|
690
|
-
}
|
|
691
|
-
get routingKey() {
|
|
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
|
-
module2.exports = DiscoverRoomTypesCommand2;
|
|
700
|
-
}
|
|
701
|
-
});
|
|
702
|
-
|
|
703
|
-
// src/Commands/CreateShortLinkCommand.js
|
|
704
|
-
var require_CreateShortLinkCommand = __commonJS({
|
|
705
|
-
"src/Commands/CreateShortLinkCommand.js"(exports2, module2) {
|
|
706
|
-
var Command = require_Command();
|
|
707
|
-
var RequestError = require_RequestError();
|
|
708
|
-
var CreateShortLinkCommand2 = class extends Command {
|
|
709
|
-
static {
|
|
710
|
-
__name(this, "CreateShortLinkCommand");
|
|
711
|
-
}
|
|
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";
|
|
724
|
-
}
|
|
725
|
-
};
|
|
726
|
-
module2.exports = CreateShortLinkCommand2;
|
|
727
|
-
}
|
|
728
|
-
});
|
|
729
|
-
|
|
730
|
-
// src/Commands/UpdateReservationCommand.js
|
|
731
|
-
var require_UpdateReservationCommand = __commonJS({
|
|
732
|
-
"src/Commands/UpdateReservationCommand.js"(exports2, module2) {
|
|
733
|
-
var Command = require_Command();
|
|
734
|
-
var RequestError = require_RequestError();
|
|
735
|
-
var UpdateReservationCommand2 = 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
|
-
module2.exports = UpdateReservationCommand2;
|
|
752
|
-
}
|
|
753
|
-
});
|
|
754
|
-
|
|
755
|
-
// src/Commands/UpdateUserCommand.js
|
|
756
|
-
var require_UpdateUserCommand = __commonJS({
|
|
757
|
-
"src/Commands/UpdateUserCommand.js"(exports2, module2) {
|
|
758
|
-
var Command = require_Command();
|
|
759
|
-
var RequestError = require_RequestError();
|
|
760
|
-
var UpdateUserCommand2 = 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
|
-
module2.exports = UpdateUserCommand2;
|
|
799
|
-
}
|
|
800
|
-
});
|
|
801
|
-
|
|
802
|
-
// src/Commands/GetMobileKeyCommand.js
|
|
803
|
-
var require_GetMobileKeyCommand = __commonJS({
|
|
804
|
-
"src/Commands/GetMobileKeyCommand.js"(exports2, module2) {
|
|
805
|
-
var Command = require_Command();
|
|
806
|
-
var GetMobileKeyCommand2 = 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
|
-
module2.exports = GetMobileKeyCommand2;
|
|
828
|
-
}
|
|
829
|
-
});
|
|
830
|
-
|
|
831
|
-
// src/Commands/CreateImageUploadEndpointCommand.js
|
|
832
|
-
var require_CreateImageUploadEndpointCommand = __commonJS({
|
|
833
|
-
"src/Commands/CreateImageUploadEndpointCommand.js"(exports2, module2) {
|
|
834
|
-
var Command = require_Command();
|
|
835
|
-
var CreateImageUploadEndpointCommand2 = 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
|
-
module2.exports = CreateImageUploadEndpointCommand2;
|
|
850
|
-
}
|
|
851
|
-
});
|
|
852
|
-
|
|
853
|
-
// src/Commands/UploadImageCommand.js
|
|
854
|
-
var require_UploadImageCommand = __commonJS({
|
|
855
|
-
"src/Commands/UploadImageCommand.js"(exports2, module2) {
|
|
856
|
-
var Command = require_Command();
|
|
857
|
-
var UploadImageCommand2 = 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
|
-
module2.exports = UploadImageCommand2;
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
|
|
875
|
-
// src/Commands/GetProductsCommand.js
|
|
876
|
-
var require_GetProductsCommand = __commonJS({
|
|
877
|
-
"src/Commands/GetProductsCommand.js"(exports2, module2) {
|
|
878
|
-
var Command = require_Command();
|
|
879
|
-
var GetProductsCommand2 = 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
|
-
module2.exports = GetProductsCommand2;
|
|
894
|
-
}
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
// src/Commands/SellProductsCommand.js
|
|
898
|
-
var require_SellProductsCommand = __commonJS({
|
|
899
|
-
"src/Commands/SellProductsCommand.js"(exports2, module2) {
|
|
900
|
-
var Command = require_Command();
|
|
901
|
-
var SellProductsCommand2 = 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
|
-
module2.exports = SellProductsCommand2;
|
|
916
|
-
}
|
|
917
|
-
});
|
|
918
|
-
|
|
919
|
-
// src/Commands/index.js
|
|
920
|
-
var SetSceneCommand = require_SetSceneCommand();
|
|
921
|
-
var SetAlarmCommand = require_SetAlarmCommand();
|
|
922
|
-
var SetDimmerCommand = require_SetDimmerCommand();
|
|
923
|
-
var SetSwitchCommand = require_SetSwitchCommand();
|
|
924
|
-
var SetThermostatCommand = require_SetThermostatCommand();
|
|
925
|
-
var SetLockCommand = require_SetLockCommand();
|
|
926
|
-
var SetWindowCoveringCommand = require_SetWindowCoveringCommand();
|
|
927
|
-
var SetCourtesyCommand = require_SetCourtesyCommand();
|
|
928
|
-
var SetMediaCommand = require_SetMediaCommand();
|
|
929
|
-
var DiscoverUsersCommand = require_DiscoverUsersCommand();
|
|
930
|
-
var OCRDocumentCommand = require_OCRDocumentCommand();
|
|
931
|
-
var CheckInReservationCommand = require_CheckInReservationCommand();
|
|
932
|
-
var SendEmailCommand = require_SendEmailCommand();
|
|
933
|
-
var SendSMSCommand = require_SendSMSCommand();
|
|
934
|
-
var DiscoverReservationsCommand = require_DiscoverReservationsCommand();
|
|
935
|
-
var DiscoverReservationRoomTypeUpsellOptionsCommand = require_DiscoverReservationRoomTypeUpsellOptionsCommand();
|
|
936
|
-
var DiscoverRoomsCommand = require_DiscoverRoomsCommand();
|
|
937
|
-
var DiscoverRoomTypesCommand = require_DiscoverRoomTypesCommand();
|
|
938
|
-
var CreateShortLinkCommand = require_CreateShortLinkCommand();
|
|
939
|
-
var UpdateReservationCommand = require_UpdateReservationCommand();
|
|
940
|
-
var UpdateUserCommand = require_UpdateUserCommand();
|
|
941
|
-
var GetMobileKeyCommand = require_GetMobileKeyCommand();
|
|
942
|
-
var CreateImageUploadEndpointCommand = require_CreateImageUploadEndpointCommand();
|
|
943
|
-
var UploadImageCommand = require_UploadImageCommand();
|
|
944
|
-
var GetProductsCommand = require_GetProductsCommand();
|
|
945
|
-
var SellProductsCommand = require_SellProductsCommand();
|
|
946
|
-
module.exports = {
|
|
947
|
-
SetSceneCommand,
|
|
948
|
-
SetAlarmCommand,
|
|
949
|
-
SetDimmerCommand,
|
|
950
|
-
SetSwitchCommand,
|
|
951
|
-
SetThermostatCommand,
|
|
952
|
-
SetLockCommand,
|
|
953
|
-
SetWindowCoveringCommand,
|
|
954
|
-
SetCourtesyCommand,
|
|
955
|
-
SetMediaCommand,
|
|
956
|
-
OCRDocumentCommand,
|
|
957
|
-
DiscoverUsersCommand,
|
|
958
|
-
CheckInReservationCommand,
|
|
959
|
-
SendSMSCommand,
|
|
960
|
-
SendEmailCommand,
|
|
961
|
-
DiscoverReservationsCommand,
|
|
962
|
-
DiscoverReservationRoomTypeUpsellOptionsCommand,
|
|
963
|
-
DiscoverRoomsCommand,
|
|
964
|
-
DiscoverRoomTypesCommand,
|
|
965
|
-
CreateShortLinkCommand,
|
|
966
|
-
UpdateReservationCommand,
|
|
967
|
-
UpdateUserCommand,
|
|
968
|
-
GetMobileKeyCommand,
|
|
969
|
-
CreateImageUploadEndpointCommand,
|
|
970
|
-
UploadImageCommand,
|
|
971
|
-
GetProductsCommand,
|
|
972
|
-
SellProductsCommand
|
|
973
|
-
};
|