@kohost/api-client 3.0.0-beta.6 → 3.0.0-beta.8

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.
@@ -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
  };
@@ -36,6 +38,7 @@ var require_Command = __commonJS({
36
38
  return { data: { ...this.data } };
37
39
  }
38
40
  };
41
+ __name(Command, "Command");
39
42
  module.exports = Command;
40
43
  }
41
44
  });
@@ -58,6 +61,7 @@ var require_SetAlarmCommand = __commonJS({
58
61
  return "system.response.devices";
59
62
  }
60
63
  };
64
+ __name(SetAlarmCommand, "SetAlarmCommand");
61
65
  module.exports = SetAlarmCommand;
62
66
  }
63
67
  });
@@ -80,6 +84,7 @@ var require_SetDimmerCommand = __commonJS({
80
84
  return "system.response.devices";
81
85
  }
82
86
  };
87
+ __name(SetDimmerCommand, "SetDimmerCommand");
83
88
  module.exports = SetDimmerCommand;
84
89
  }
85
90
  });
@@ -102,6 +107,7 @@ var require_SetSwitchCommand = __commonJS({
102
107
  return "system.response.devices";
103
108
  }
104
109
  };
110
+ __name(SetSwitchCommand, "SetSwitchCommand");
105
111
  module.exports = SetSwitchCommand;
106
112
  }
107
113
  });
@@ -124,6 +130,7 @@ var require_SetThermostatCommand = __commonJS({
124
130
  return "system.response.devices";
125
131
  }
126
132
  };
133
+ __name(SetThermostatCommand, "SetThermostatCommand");
127
134
  module.exports = SetThermostatCommand;
128
135
  }
129
136
  });
@@ -146,6 +153,7 @@ var require_SetLockCommand = __commonJS({
146
153
  return "system.response.devices";
147
154
  }
148
155
  };
156
+ __name(SetLockCommand, "SetLockCommand");
149
157
  module.exports = SetLockCommand;
150
158
  }
151
159
  });
@@ -168,6 +176,7 @@ var require_SetSceneControllerCommand = __commonJS({
168
176
  return "system.response.devices";
169
177
  }
170
178
  };
179
+ __name(SetSceneControllerCommand, "SetSceneControllerCommand");
171
180
  module.exports = SetSceneControllerCommand;
172
181
  }
173
182
  });
@@ -190,6 +199,7 @@ var require_SetWindowCoveringCommand = __commonJS({
190
199
  return "system.response.devices";
191
200
  }
192
201
  };
202
+ __name(SetWindowCoveringCommand, "SetWindowCoveringCommand");
193
203
  module.exports = SetWindowCoveringCommand;
194
204
  }
195
205
  });
@@ -212,6 +222,7 @@ var require_SetCourtesyCommand = __commonJS({
212
222
  return "system.response.devices";
213
223
  }
214
224
  };
225
+ __name(SetCourtesyCommand, "SetCourtesyCommand");
215
226
  module.exports = SetCourtesyCommand;
216
227
  }
217
228
  });
@@ -234,6 +245,7 @@ var require_DiscoverUsersCommand = __commonJS({
234
245
  return "system.response.users";
235
246
  }
236
247
  };
248
+ __name(DiscoverUsersCommand, "DiscoverUsersCommand");
237
249
  module.exports = DiscoverUsersCommand;
238
250
  }
239
251
  });
@@ -241,14 +253,14 @@ var require_DiscoverUsersCommand = __commonJS({
241
253
  // src/Errors/AppError.js
242
254
  var require_AppError = __commonJS({
243
255
  "src/Errors/AppError.js"(exports, module) {
244
- module.exports = class AppError extends Error {
256
+ module.exports = /* @__PURE__ */ __name(class AppError extends Error {
245
257
  constructor(message = "Internal Server Error", options) {
246
258
  super(message, options);
247
259
  this.type = this.constructor.name;
248
260
  this.statusCode = 500;
249
261
  Object.setPrototypeOf(this, AppError.prototype);
250
262
  }
251
- };
263
+ }, "AppError");
252
264
  }
253
265
  });
254
266
 
@@ -256,13 +268,13 @@ var require_AppError = __commonJS({
256
268
  var require_RequestError = __commonJS({
257
269
  "src/Errors/RequestError.js"(exports, module) {
258
270
  var AppError = require_AppError();
259
- module.exports = class RequestError extends AppError {
271
+ module.exports = /* @__PURE__ */ __name(class RequestError extends AppError {
260
272
  constructor(message = "Bad Request", options = {}) {
261
273
  super(message, options);
262
274
  this.statusCode = 400;
263
275
  Object.setPrototypeOf(this, RequestError.prototype);
264
276
  }
265
- };
277
+ }, "RequestError");
266
278
  }
267
279
  });
268
280
 
@@ -286,6 +298,7 @@ var require_OCRDocumentCommand = __commonJS({
286
298
  return `document.${this.data.type}.ocr`;
287
299
  }
288
300
  };
301
+ __name(OCRDocumentCommand, "OCRDocumentCommand");
289
302
  module.exports = OCRDocumentCommand;
290
303
  }
291
304
  });
@@ -311,10 +324,40 @@ var require_CheckInReservationCommand = __commonJS({
311
324
  return "system.response.reservations";
312
325
  }
313
326
  };
327
+ __name(CheckInReservationCommand, "CheckInReservationCommand");
314
328
  module.exports = CheckInReservationCommand;
315
329
  }
316
330
  });
317
331
 
332
+ // src/Commands/SendEmailCommand.js
333
+ var require_SendEmailCommand = __commonJS({
334
+ "src/Commands/SendEmailCommand.js"(exports, module) {
335
+ var Command = require_Command();
336
+ var RequestError = require_RequestError();
337
+ var SendEmailCommand = class extends Command {
338
+ constructor({ text, html, to, from, subject, eventData }) {
339
+ if (!to)
340
+ throw new RequestError("email to is required");
341
+ if (!from)
342
+ throw new RequestError("email from is required");
343
+ if (!subject)
344
+ throw new RequestError("email subject is required");
345
+ if (!text && !html)
346
+ throw new RequestError("email text or html is required");
347
+ super({ text, html, to, from, subject, eventData });
348
+ }
349
+ get name() {
350
+ return "SendEmail";
351
+ }
352
+ get routingKey() {
353
+ return "comm.email.send";
354
+ }
355
+ };
356
+ __name(SendEmailCommand, "SendEmailCommand");
357
+ module.exports = SendEmailCommand;
358
+ }
359
+ });
360
+
318
361
  // src/Commands/SendSMSCommand.js
319
362
  var require_SendSMSCommand = __commonJS({
320
363
  "src/Commands/SendSMSCommand.js"(exports, module) {
@@ -337,6 +380,7 @@ var require_SendSMSCommand = __commonJS({
337
380
  return "comm.sms.send";
338
381
  }
339
382
  };
383
+ __name(SendSMSCommand, "SendSMSCommand");
340
384
  module.exports = SendSMSCommand;
341
385
  }
342
386
  });
@@ -345,13 +389,13 @@ var require_SendSMSCommand = __commonJS({
345
389
  var require_AuthenticationError = __commonJS({
346
390
  "src/Errors/AuthenticationError.js"(exports, module) {
347
391
  var AppError = require_AppError();
348
- module.exports = class AuthenticationError extends AppError {
392
+ module.exports = /* @__PURE__ */ __name(class AuthenticationError extends AppError {
349
393
  constructor(message = "Authentication Error", options = {}) {
350
394
  super(message, options);
351
395
  this.statusCode = 401;
352
396
  Object.setPrototypeOf(this, AuthenticationError.prototype);
353
397
  }
354
- };
398
+ }, "AuthenticationError");
355
399
  }
356
400
  });
357
401
 
@@ -359,13 +403,13 @@ var require_AuthenticationError = __commonJS({
359
403
  var require_AuthorizationError = __commonJS({
360
404
  "src/Errors/AuthorizationError.js"(exports, module) {
361
405
  var AppError = require_AppError();
362
- module.exports = class AuthorizationError extends AppError {
406
+ module.exports = /* @__PURE__ */ __name(class AuthorizationError extends AppError {
363
407
  constructor(message = "Authorization Error", options = {}) {
364
408
  super(message, options);
365
409
  this.statusCode = 403;
366
410
  Object.setPrototypeOf(this, AuthorizationError.prototype);
367
411
  }
368
- };
412
+ }, "AuthorizationError");
369
413
  }
370
414
  });
371
415
 
@@ -373,13 +417,13 @@ var require_AuthorizationError = __commonJS({
373
417
  var require_DeviceCommError = __commonJS({
374
418
  "src/Errors/DeviceCommError.js"(exports, module) {
375
419
  var AppError = require_AppError();
376
- module.exports = class DeviceCommError extends AppError {
420
+ module.exports = /* @__PURE__ */ __name(class DeviceCommError extends AppError {
377
421
  constructor(message = "Device Communication Error", options = {}) {
378
422
  super(message, options);
379
423
  this.statusCode = 503;
380
424
  Object.setPrototypeOf(this, DeviceCommError.prototype);
381
425
  }
382
- };
426
+ }, "DeviceCommError");
383
427
  }
384
428
  });
385
429
 
@@ -387,13 +431,13 @@ var require_DeviceCommError = __commonJS({
387
431
  var require_LoginError = __commonJS({
388
432
  "src/Errors/LoginError.js"(exports, module) {
389
433
  var AppError = require_AppError();
390
- module.exports = class LoginError extends AppError {
434
+ module.exports = /* @__PURE__ */ __name(class LoginError extends AppError {
391
435
  constructor(message = "Invalid Login information provided", options = {}) {
392
436
  super(message, options);
393
437
  this.statusCode = 401;
394
438
  Object.setPrototypeOf(this, LoginError.prototype);
395
439
  }
396
- };
440
+ }, "LoginError");
397
441
  }
398
442
  });
399
443
 
@@ -401,13 +445,13 @@ var require_LoginError = __commonJS({
401
445
  var require_NotFoundError = __commonJS({
402
446
  "src/Errors/NotFoundError.js"(exports, module) {
403
447
  var AppError = require_AppError();
404
- module.exports = class NotFoundError extends AppError {
448
+ module.exports = /* @__PURE__ */ __name(class NotFoundError extends AppError {
405
449
  constructor(message = "Resource Not Found", options = {}) {
406
450
  super(message, options);
407
451
  this.statusCode = 404;
408
452
  Object.setPrototypeOf(this, NotFoundError.prototype);
409
453
  }
410
- };
454
+ }, "NotFoundError");
411
455
  }
412
456
  });
413
457
 
@@ -415,13 +459,13 @@ var require_NotFoundError = __commonJS({
415
459
  var require_SystemCommError = __commonJS({
416
460
  "src/Errors/SystemCommError.js"(exports, module) {
417
461
  var AppError = require_AppError();
418
- module.exports = class SystemCommError extends AppError {
462
+ module.exports = /* @__PURE__ */ __name(class SystemCommError extends AppError {
419
463
  constructor(message = "System Communication Error", options = {}) {
420
464
  super(message, options);
421
465
  this.statusCode = 503;
422
466
  Object.setPrototypeOf(this, SystemCommError.prototype);
423
467
  }
424
- };
468
+ }, "SystemCommError");
425
469
  }
426
470
  });
427
471
 
@@ -429,13 +473,13 @@ var require_SystemCommError = __commonJS({
429
473
  var require_TokenExpiredError = __commonJS({
430
474
  "src/Errors/TokenExpiredError.js"(exports, module) {
431
475
  var AppError = require_AppError();
432
- module.exports = class TokenExpiredError extends AppError {
476
+ module.exports = /* @__PURE__ */ __name(class TokenExpiredError extends AppError {
433
477
  constructor(message = "Token Expired", options = {}) {
434
478
  super(message, options);
435
479
  this.statusCode = 401;
436
480
  Object.setPrototypeOf(this, TokenExpiredError.prototype);
437
481
  }
438
- };
482
+ }, "TokenExpiredError");
439
483
  }
440
484
  });
441
485
 
@@ -443,13 +487,13 @@ var require_TokenExpiredError = __commonJS({
443
487
  var require_UnprocessableRequestError = __commonJS({
444
488
  "src/Errors/UnprocessableRequestError.js"(exports, module) {
445
489
  var AppError = require_AppError();
446
- module.exports = class UnprocessableRequestError extends AppError {
490
+ module.exports = /* @__PURE__ */ __name(class UnprocessableRequestError extends AppError {
447
491
  constructor(message = "Unprocessable Request Error", options = {}) {
448
492
  super(message, options);
449
493
  this.statusCode = 422;
450
494
  Object.setPrototypeOf(this, UnprocessableRequestError.prototype);
451
495
  }
452
- };
496
+ }, "UnprocessableRequestError");
453
497
  }
454
498
  });
455
499
 
@@ -457,13 +501,13 @@ var require_UnprocessableRequestError = __commonJS({
457
501
  var require_ValidationError = __commonJS({
458
502
  "src/Errors/ValidationError.js"(exports, module) {
459
503
  var AppError = require_AppError();
460
- module.exports = class ValidationError extends AppError {
504
+ module.exports = /* @__PURE__ */ __name(class ValidationError extends AppError {
461
505
  constructor(message = "Validation Error", options = {}) {
462
506
  super(message, options);
463
507
  this.statusCode = 400;
464
508
  Object.setPrototypeOf(this, ValidationError.prototype);
465
509
  }
466
- };
510
+ }, "ValidationError");
467
511
  }
468
512
  });
469
513
 
@@ -509,6 +553,7 @@ var require_DiscoverReservationsCommand = __commonJS({
509
553
  return "system.response.reservations";
510
554
  }
511
555
  };
556
+ __name(DiscoverReservationsCommand, "DiscoverReservationsCommand");
512
557
  module.exports = DiscoverReservationsCommand;
513
558
  }
514
559
  });
@@ -531,6 +576,7 @@ var require_DiscoverRoomsCommand = __commonJS({
531
576
  return "system.response.users";
532
577
  }
533
578
  };
579
+ __name(DiscoverRoomsCommand, "DiscoverRoomsCommand");
534
580
  module.exports = DiscoverRoomsCommand;
535
581
  }
536
582
  });
@@ -549,6 +595,7 @@ var require_Commands = __commonJS({
549
595
  var DiscoverUsersCommand = require_DiscoverUsersCommand();
550
596
  var OCRDocumentCommand = require_OCRDocumentCommand();
551
597
  var CheckInReservationCommand = require_CheckInReservationCommand();
598
+ var SendEmailCommand = require_SendEmailCommand();
552
599
  var SendSMSCommand = require_SendSMSCommand();
553
600
  var DiscoverReservationsCommand = require_DiscoverReservationsCommand();
554
601
  var DiscoverRoomsCommand = require_DiscoverRoomsCommand();
@@ -565,6 +612,7 @@ var require_Commands = __commonJS({
565
612
  DiscoverUsersCommand,
566
613
  CheckInReservationCommand,
567
614
  SendSMSCommand,
615
+ SendEmailCommand,
568
616
  DiscoverReservationsCommand,
569
617
  DiscoverRoomsCommand
570
618
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Commands/Command.js", "../../src/Commands/SetAlarmCommand.js", "../../src/Commands/SetDimmerCommand.js", "../../src/Commands/SetSwitchCommand.js", "../../src/Commands/SetThermostatCommand.js", "../../src/Commands/SetLockCommand.js", "../../src/Commands/SetSceneControllerCommand.js", "../../src/Commands/SetWindowCoveringCommand.js", "../../src/Commands/SetCourtesyCommand.js", "../../src/Commands/DiscoverUsersCommand.js", "../../src/Errors/AppError.js", "../../src/Errors/RequestError.js", "../../src/Commands/OCRDocumentCommand.js", "../../src/Commands/CheckInReservationCommand.js", "../../src/Commands/SendSMSCommand.js", "../../src/Errors/AuthenticationError.js", "../../src/Errors/AuthorizationError.js", "../../src/Errors/DeviceCommError.js", "../../src/Errors/LoginError.js", "../../src/Errors/NotFoundError.js", "../../src/Errors/SystemCommError.js", "../../src/Errors/TokenExpiredError.js", "../../src/Errors/UnprocessableRequestError.js", "../../src/Errors/ValidationError.js", "../../src/Errors/index.js", "../../src/Commands/DiscoverReservationsCommand.js", "../../src/Commands/DiscoverRoomsCommand.js", "../../src/Commands/index.js"],
4
- "sourcesContent": ["class Command {\n constructor(data) {\n this.data = {};\n if (!data) throw new Error(\"Command data is required\");\n if (typeof data !== \"object\")\n throw new Error(\"Command data must be an object\");\n\n for (const key in data) {\n this.data[key] = data[key];\n }\n }\n\n get name() {\n throw new Error(\"Command name is required\");\n }\n\n get type() {\n return \"Command\";\n }\n\n get routingKey() {\n return \"\";\n }\n\n get exchange() {\n return \"Commands\";\n }\n\n get replyTo() {\n return \"amq.rabbitmq.reply-to\";\n }\n\n build() {\n return { data: { ...this.data } };\n }\n}\n\nmodule.exports = Command;\n", "const Command = require(\"./Command\");\n\nclass SetAlarmCommand extends Command {\n constructor({ id, zones, areas }) {\n super({ id, zones, areas });\n }\n\n get name() {\n return \"SetAlarm\";\n }\n\n get routingKey() {\n return `alarm.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetAlarmCommand;\n", "const Command = require(\"./Command\");\n\nclass SetDimmerCommand extends Command {\n constructor({ id, level }) {\n super({ id, level });\n }\n\n get name() {\n return \"SetDimmer\";\n }\n\n get routingKey() {\n return `dimmer.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetDimmerCommand;\n", "const Command = require(\"./Command\");\n\nclass SetSwitchCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetSwitch\";\n }\n\n get routingKey() {\n return `switch.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetSwitchCommand;\n", "const Command = require(\"./Command\");\n\nclass SetThermostatCommand extends Command {\n constructor({ id, setpoints, hvacMode, fanMode }) {\n super({ id, setpoints, hvacMode, fanMode });\n }\n\n get name() {\n return \"SetThermostat\";\n }\n\n get routingKey() {\n return `thermostat.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetThermostatCommand;\n", "const Command = require(\"./Command\");\n\nclass SetLockCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetLock\";\n }\n\n get routingKey() {\n return `lock.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetLockCommand;\n", "const Command = require(\"./Command\");\n\nclass SetSceneControllerCommand extends Command {\n constructor({ id, scene }) {\n super({ id, scene });\n }\n\n get name() {\n return \"SetSceneController\";\n }\n\n get routingKey() {\n return `sceneController.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetSceneControllerCommand;\n", "const Command = require(\"./Command\");\n\nclass SetWindowCoveringCommand extends Command {\n constructor({ id, position }) {\n super({ id, position });\n }\n\n get name() {\n return \"SetWindowCovering\";\n }\n\n get routingKey() {\n return `windowCovering.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetWindowCoveringCommand;\n", "const Command = require(\"./Command\");\n\nclass SetCourtesyCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetCourtesy\";\n }\n\n get routingKey() {\n return `courtesy.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetCourtesyCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverUsersCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverUsers\";\n }\n\n get routingKey() {\n return `users.${this.data.id}.get`;\n }\n\n get replyTo() {\n return \"system.response.users\";\n }\n}\n\nmodule.exports = DiscoverUsersCommand;\n", "module.exports = class AppError extends Error {\n constructor(message = \"Internal Server Error\", options) {\n super(message, options);\n this.type = this.constructor.name;\n this.statusCode = 500;\n Object.setPrototypeOf(this, AppError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class RequestError extends AppError {\n constructor(message = \"Bad Request\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, RequestError.prototype);\n }\n};\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass OCRDocumentCommand extends Command {\n constructor({ type, image }) {\n if (!type) throw new RequestError(\"document type is required\");\n if (!image) throw new RequestError(\"document image is required\");\n super({ type, image });\n }\n\n get name() {\n return \"OCRDocument\";\n }\n\n get routingKey() {\n return `document.${this.data.type}.ocr`;\n }\n}\n\nmodule.exports = OCRDocumentCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass CheckInReservationCommand extends Command {\n constructor({ id }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({ id });\n }\n\n get name() {\n return \"CheckInReservation\";\n }\n\n get routingKey() {\n return `reservation.${this.data.id}.checkin`;\n }\n\n get replyTo() {\n return \"system.response.reservations\";\n }\n}\n\nmodule.exports = CheckInReservationCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass SendSMSCommand extends Command {\n constructor({ body, to, from, metaData }) {\n if (!body) throw new RequestError(\"sms body is required\");\n if (!to) throw new RequestError(\"sms to is required\");\n if (!from) throw new RequestError(\"sms from is required\");\n super({ body, to, from, metaData });\n }\n\n get name() {\n return \"SendSMS\";\n }\n\n get routingKey() {\n return \"comm.sms.send\";\n }\n}\n\nmodule.exports = SendSMSCommand;\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthenticationError extends AppError {\n constructor(message = \"Authentication Error\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthorizationError extends AppError {\n constructor(message = \"Authorization Error\", options = {}) {\n super(message, options);\n this.statusCode = 403;\n Object.setPrototypeOf(this, AuthorizationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class DeviceCommError extends AppError {\n constructor(message = \"Device Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, DeviceCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class LoginError extends AppError {\n constructor(message = \"Invalid Login information provided\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, LoginError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class NotFoundError extends AppError {\n constructor(message = \"Resource Not Found\", options = {}) {\n super(message, options);\n this.statusCode = 404;\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class SystemCommError extends AppError {\n constructor(message = \"System Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, SystemCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class TokenExpiredError extends AppError {\n constructor(message = \"Token Expired\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, TokenExpiredError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class UnprocessableRequestError extends AppError {\n constructor(message = \"Unprocessable Request Error\", options = {}) {\n super(message, options);\n this.statusCode = 422;\n Object.setPrototypeOf(this, UnprocessableRequestError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class ValidationError extends AppError {\n constructor(message = \"Validation Error\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n};\n", "const Errors = {\n AppError: require(\"./AppError\"),\n AuthenticationError: require(\"./AuthenticationError\"),\n AuthorizationError: require(\"./AuthorizationError\"),\n DeviceCommError: require(\"./DeviceCommError\"),\n LoginError: require(\"./LoginError\"),\n NotFoundError: require(\"./NotFoundError\"),\n RequestError: require(\"./RequestError\"),\n SystemCommError: require(\"./SystemCommError\"),\n TokenExpiredError: require(\"./TokenExpiredError\"),\n UnprocessableRequestError: require(\"./UnprocessableRequestError\"),\n ValidationError: require(\"./ValidationError\"),\n};\n\nmodule.exports = Errors;\n", "const { RequestError } = require(\"../Errors\");\nconst Command = require(\"./Command\");\n\nclass DiscoverReservationsCommand extends Command {\n constructor(options) {\n if (!options) throw new RequestError(\"options are required\");\n const { id, startDate, endDate, status } = options;\n super({ id, startDate, endDate, status });\n }\n\n get name() {\n return \"DiscoverReservations\";\n }\n\n get routingKey() {\n return \"reservation.discover\";\n }\n\n get replyTo() {\n return \"system.response.reservations\";\n }\n}\n\nmodule.exports = DiscoverReservationsCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverRoomsCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverRooms\";\n }\n\n get routingKey() {\n return `rooms.${this.data.id}.get`;\n }\n\n get replyTo() {\n return \"system.response.users\";\n }\n}\n\nmodule.exports = DiscoverRoomsCommand;\n", "const SetAlarmCommand = require(\"./SetAlarmCommand\");\nconst SetDimmerCommand = require(\"./SetDimmerCommand\");\nconst SetSwitchCommand = require(\"./SetSwitchCommand\");\nconst SetThermostatCommand = require(\"./SetThermostatCommand\");\nconst SetLockCommand = require(\"./SetLockCommand\");\nconst SetSceneControllerCommand = require(\"./SetSceneControllerCommand\");\nconst SetWindowCoveringCommand = require(\"./SetWindowCoveringCommand\");\nconst SetCourtesyCommand = require(\"./SetCourtesyCommand\");\nconst DiscoverUsersCommand = require(\"./DiscoverUsersCommand\");\nconst OCRDocumentCommand = require(\"./OCRDocumentCommand\");\nconst CheckInReservationCommand = require(\"./CheckInReservationCommand\");\nconst SendSMSCommand = require(\"./SendSMSCommand\");\nconst DiscoverReservationsCommand = require(\"./DiscoverReservationsCommand\");\nconst DiscoverRoomsCommand = require(\"./DiscoverRoomsCommand\");\n\nmodule.exports = {\n SetAlarmCommand,\n SetDimmerCommand,\n SetSwitchCommand,\n SetThermostatCommand,\n SetLockCommand,\n SetSceneControllerCommand,\n SetWindowCoveringCommand,\n SetCourtesyCommand,\n OCRDocumentCommand,\n DiscoverUsersCommand,\n CheckInReservationCommand,\n SendSMSCommand,\n DiscoverReservationsCommand,\n DiscoverRoomsCommand,\n};\n"],
5
- "mappings": ";;;;;;AAAA;AAAA;AAAA,QAAM,UAAN,MAAc;AAAA,MACZ,YAAY,MAAM;AAChB,aAAK,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N,cAAmC,QAAQ;AAAA,MACzC,YAAY,EAAE,GAAG,GAAG;AAClB,cAAM,EAAE,GAAG,CAAC;AAAA,MACd;AAAA,MAEA,IAAI,OAAO;AACT,eAAO;AAAA,MACT;AAAA,MAEA,IAAI,aAAa;AACf,eAAO,SAAS,KAAK,KAAK;AAAA,MAC5B;AAAA,MAEA,IAAI,UAAU;AACZ,eAAO;AAAA,MACT;AAAA,IACF;AAEA,WAAO,UAAU;AAAA;AAAA;;;ACpBjB;AAAA;AAAA,QAAM,kBAAkB;AACxB,QAAM,mBAAmB;AACzB,QAAM,mBAAmB;AACzB,QAAM,uBAAuB;AAC7B,QAAM,iBAAiB;AACvB,QAAM,4BAA4B;AAClC,QAAM,2BAA2B;AACjC,QAAM,qBAAqB;AAC3B,QAAM,uBAAuB;AAC7B,QAAM,qBAAqB;AAC3B,QAAM,4BAA4B;AAClC,QAAM,iBAAiB;AACvB,QAAM,8BAA8B;AACpC,QAAM,uBAAuB;AAE7B,WAAO,UAAU;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA;",
3
+ "sources": ["../../src/Commands/Command.js", "../../src/Commands/SetAlarmCommand.js", "../../src/Commands/SetDimmerCommand.js", "../../src/Commands/SetSwitchCommand.js", "../../src/Commands/SetThermostatCommand.js", "../../src/Commands/SetLockCommand.js", "../../src/Commands/SetSceneControllerCommand.js", "../../src/Commands/SetWindowCoveringCommand.js", "../../src/Commands/SetCourtesyCommand.js", "../../src/Commands/DiscoverUsersCommand.js", "../../src/Errors/AppError.js", "../../src/Errors/RequestError.js", "../../src/Commands/OCRDocumentCommand.js", "../../src/Commands/CheckInReservationCommand.js", "../../src/Commands/SendEmailCommand.js", "../../src/Commands/SendSMSCommand.js", "../../src/Errors/AuthenticationError.js", "../../src/Errors/AuthorizationError.js", "../../src/Errors/DeviceCommError.js", "../../src/Errors/LoginError.js", "../../src/Errors/NotFoundError.js", "../../src/Errors/SystemCommError.js", "../../src/Errors/TokenExpiredError.js", "../../src/Errors/UnprocessableRequestError.js", "../../src/Errors/ValidationError.js", "../../src/Errors/index.js", "../../src/Commands/DiscoverReservationsCommand.js", "../../src/Commands/DiscoverRoomsCommand.js", "../../src/Commands/index.js"],
4
+ "sourcesContent": ["class Command {\n constructor(data) {\n this.data = {};\n if (!data) throw new Error(\"Command data is required\");\n if (typeof data !== \"object\")\n throw new Error(\"Command data must be an object\");\n\n for (const key in data) {\n this.data[key] = data[key];\n }\n }\n\n get name() {\n throw new Error(\"Command name is required\");\n }\n\n get type() {\n return \"Command\";\n }\n\n get routingKey() {\n return \"\";\n }\n\n get exchange() {\n return \"Commands\";\n }\n\n get replyTo() {\n return \"amq.rabbitmq.reply-to\";\n }\n\n build() {\n return { data: { ...this.data } };\n }\n}\n\nmodule.exports = Command;\n", "const Command = require(\"./Command\");\n\nclass SetAlarmCommand extends Command {\n constructor({ id, zones, areas }) {\n super({ id, zones, areas });\n }\n\n get name() {\n return \"SetAlarm\";\n }\n\n get routingKey() {\n return `alarm.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetAlarmCommand;\n", "const Command = require(\"./Command\");\n\nclass SetDimmerCommand extends Command {\n constructor({ id, level }) {\n super({ id, level });\n }\n\n get name() {\n return \"SetDimmer\";\n }\n\n get routingKey() {\n return `dimmer.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetDimmerCommand;\n", "const Command = require(\"./Command\");\n\nclass SetSwitchCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetSwitch\";\n }\n\n get routingKey() {\n return `switch.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetSwitchCommand;\n", "const Command = require(\"./Command\");\n\nclass SetThermostatCommand extends Command {\n constructor({ id, setpoints, hvacMode, fanMode }) {\n super({ id, setpoints, hvacMode, fanMode });\n }\n\n get name() {\n return \"SetThermostat\";\n }\n\n get routingKey() {\n return `thermostat.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetThermostatCommand;\n", "const Command = require(\"./Command\");\n\nclass SetLockCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetLock\";\n }\n\n get routingKey() {\n return `lock.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetLockCommand;\n", "const Command = require(\"./Command\");\n\nclass SetSceneControllerCommand extends Command {\n constructor({ id, scene }) {\n super({ id, scene });\n }\n\n get name() {\n return \"SetSceneController\";\n }\n\n get routingKey() {\n return `sceneController.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetSceneControllerCommand;\n", "const Command = require(\"./Command\");\n\nclass SetWindowCoveringCommand extends Command {\n constructor({ id, position }) {\n super({ id, position });\n }\n\n get name() {\n return \"SetWindowCovering\";\n }\n\n get routingKey() {\n return `windowCovering.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetWindowCoveringCommand;\n", "const Command = require(\"./Command\");\n\nclass SetCourtesyCommand extends Command {\n constructor({ id, state }) {\n super({ id, state });\n }\n\n get name() {\n return \"SetCourtesy\";\n }\n\n get routingKey() {\n return `courtesy.${this.data.id}.set`;\n }\n\n get replyTo() {\n return \"system.response.devices\";\n }\n}\n\nmodule.exports = SetCourtesyCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverUsersCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverUsers\";\n }\n\n get routingKey() {\n return `users.${this.data.id}.get`;\n }\n\n get replyTo() {\n return \"system.response.users\";\n }\n}\n\nmodule.exports = DiscoverUsersCommand;\n", "module.exports = class AppError extends Error {\n constructor(message = \"Internal Server Error\", options) {\n super(message, options);\n this.type = this.constructor.name;\n this.statusCode = 500;\n Object.setPrototypeOf(this, AppError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class RequestError extends AppError {\n constructor(message = \"Bad Request\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, RequestError.prototype);\n }\n};\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass OCRDocumentCommand extends Command {\n constructor({ type, image }) {\n if (!type) throw new RequestError(\"document type is required\");\n if (!image) throw new RequestError(\"document image is required\");\n super({ type, image });\n }\n\n get name() {\n return \"OCRDocument\";\n }\n\n get routingKey() {\n return `document.${this.data.type}.ocr`;\n }\n}\n\nmodule.exports = OCRDocumentCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass CheckInReservationCommand extends Command {\n constructor({ id }) {\n if (!id) throw new RequestError(\"document type is required\");\n super({ id });\n }\n\n get name() {\n return \"CheckInReservation\";\n }\n\n get routingKey() {\n return `reservation.${this.data.id}.checkin`;\n }\n\n get replyTo() {\n return \"system.response.reservations\";\n }\n}\n\nmodule.exports = CheckInReservationCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../errors/RequestError\");\n\nclass SendEmailCommand extends Command {\n constructor({ text, html, to, from, subject, eventData }) {\n if (!to) throw new RequestError(\"email to is required\");\n if (!from) throw new RequestError(\"email from is required\");\n if (!subject) throw new RequestError(\"email subject is required\");\n if (!text && !html)\n throw new RequestError(\"email text or html is required\");\n\n super({ text, html, to, from, subject, eventData });\n }\n\n get name() {\n return \"SendEmail\";\n }\n\n get routingKey() {\n return \"comm.email.send\";\n }\n}\n\nmodule.exports = SendEmailCommand;\n", "const Command = require(\"./Command\");\nconst RequestError = require(\"../Errors/RequestError\");\n\nclass SendSMSCommand extends Command {\n constructor({ body, to, from, metaData }) {\n if (!body) throw new RequestError(\"sms body is required\");\n if (!to) throw new RequestError(\"sms to is required\");\n if (!from) throw new RequestError(\"sms from is required\");\n super({ body, to, from, metaData });\n }\n\n get name() {\n return \"SendSMS\";\n }\n\n get routingKey() {\n return \"comm.sms.send\";\n }\n}\n\nmodule.exports = SendSMSCommand;\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthenticationError extends AppError {\n constructor(message = \"Authentication Error\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class AuthorizationError extends AppError {\n constructor(message = \"Authorization Error\", options = {}) {\n super(message, options);\n this.statusCode = 403;\n Object.setPrototypeOf(this, AuthorizationError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class DeviceCommError extends AppError {\n constructor(message = \"Device Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, DeviceCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class LoginError extends AppError {\n constructor(message = \"Invalid Login information provided\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, LoginError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class NotFoundError extends AppError {\n constructor(message = \"Resource Not Found\", options = {}) {\n super(message, options);\n this.statusCode = 404;\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class SystemCommError extends AppError {\n constructor(message = \"System Communication Error\", options = {}) {\n super(message, options);\n this.statusCode = 503;\n Object.setPrototypeOf(this, SystemCommError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class TokenExpiredError extends AppError {\n constructor(message = \"Token Expired\", options = {}) {\n super(message, options);\n this.statusCode = 401;\n Object.setPrototypeOf(this, TokenExpiredError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class UnprocessableRequestError extends AppError {\n constructor(message = \"Unprocessable Request Error\", options = {}) {\n super(message, options);\n this.statusCode = 422;\n Object.setPrototypeOf(this, UnprocessableRequestError.prototype);\n }\n};\n", "const AppError = require(\"./AppError\");\n\nmodule.exports = class ValidationError extends AppError {\n constructor(message = \"Validation Error\", options = {}) {\n super(message, options);\n this.statusCode = 400;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n};\n", "const Errors = {\n AppError: require(\"./AppError\"),\n AuthenticationError: require(\"./AuthenticationError\"),\n AuthorizationError: require(\"./AuthorizationError\"),\n DeviceCommError: require(\"./DeviceCommError\"),\n LoginError: require(\"./LoginError\"),\n NotFoundError: require(\"./NotFoundError\"),\n RequestError: require(\"./RequestError\"),\n SystemCommError: require(\"./SystemCommError\"),\n TokenExpiredError: require(\"./TokenExpiredError\"),\n UnprocessableRequestError: require(\"./UnprocessableRequestError\"),\n ValidationError: require(\"./ValidationError\"),\n};\n\nmodule.exports = Errors;\n", "const { RequestError } = require(\"../Errors\");\nconst Command = require(\"./Command\");\n\nclass DiscoverReservationsCommand extends Command {\n constructor(options) {\n if (!options) throw new RequestError(\"options are required\");\n const { id, startDate, endDate, status } = options;\n super({ id, startDate, endDate, status });\n }\n\n get name() {\n return \"DiscoverReservations\";\n }\n\n get routingKey() {\n return \"reservation.discover\";\n }\n\n get replyTo() {\n return \"system.response.reservations\";\n }\n}\n\nmodule.exports = DiscoverReservationsCommand;\n", "const Command = require(\"./Command\");\n\nclass DiscoverRoomsCommand extends Command {\n constructor({ id }) {\n super({ id });\n }\n\n get name() {\n return \"DiscoverRooms\";\n }\n\n get routingKey() {\n return `rooms.${this.data.id}.get`;\n }\n\n get replyTo() {\n return \"system.response.users\";\n }\n}\n\nmodule.exports = DiscoverRoomsCommand;\n", "const SetAlarmCommand = require(\"./SetAlarmCommand\");\nconst SetDimmerCommand = require(\"./SetDimmerCommand\");\nconst SetSwitchCommand = require(\"./SetSwitchCommand\");\nconst SetThermostatCommand = require(\"./SetThermostatCommand\");\nconst SetLockCommand = require(\"./SetLockCommand\");\nconst SetSceneControllerCommand = require(\"./SetSceneControllerCommand\");\nconst SetWindowCoveringCommand = require(\"./SetWindowCoveringCommand\");\nconst SetCourtesyCommand = require(\"./SetCourtesyCommand\");\nconst DiscoverUsersCommand = require(\"./DiscoverUsersCommand\");\nconst OCRDocumentCommand = require(\"./OCRDocumentCommand\");\nconst CheckInReservationCommand = require(\"./CheckInReservationCommand\");\nconst SendEmailCommand = require(\"./SendEmailCommand\");\nconst SendSMSCommand = require(\"./SendSMSCommand\");\nconst DiscoverReservationsCommand = require(\"./DiscoverReservationsCommand\");\nconst DiscoverRoomsCommand = require(\"./DiscoverRoomsCommand\");\n\nmodule.exports = {\n SetAlarmCommand,\n SetDimmerCommand,\n SetSwitchCommand,\n SetThermostatCommand,\n SetLockCommand,\n SetSceneControllerCommand,\n SetWindowCoveringCommand,\n SetCourtesyCommand,\n OCRDocumentCommand,\n DiscoverUsersCommand,\n CheckInReservationCommand,\n SendSMSCommand,\n SendEmailCommand,\n DiscoverReservationsCommand,\n DiscoverRoomsCommand,\n};\n"],
5
+ "mappings": ";;;;;;;;AAAA;AAAA;AAAA,QAAM,UAAN,MAAc;AAAA,MACZ,YAAY,MAAM;AAChB,aAAK,OAAO,CAAC;AACb,YAAI,CAAC;AAAM,gBAAM,IAAI,MAAM,0BAA0B;AACrD,YAAI,OAAO,SAAS;AAClB,gBAAM,IAAI,MAAM,gCAAgC;AAElD,mBAAW,OAAO,MAAM;AACtB,eAAK,KAAK,GAAG,IAAI,KAAK,GAAG;AAAA,QAC3B;AAAA,MACF;AAAA,MAEA,IAAI,OAAO;AACT,cAAM,IAAI,MAAM,0BAA0B;AAAA,MAC5C;AAAA,MAEA,IAAI,OAAO;AACT,eAAO;AAAA,MACT;AAAA,MAEA,IAAI,aAAa;AACf,eAAO;AAAA,MACT;AAAA,MAEA,IA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F;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -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
  };
@@ -6,14 +8,14 @@ var __commonJS = (cb, mod) => function __require() {
6
8
  // src/Errors/AppError.js
7
9
  var require_AppError = __commonJS({
8
10
  "src/Errors/AppError.js"(exports, module) {
9
- module.exports = class AppError extends Error {
11
+ module.exports = /* @__PURE__ */ __name(class AppError extends Error {
10
12
  constructor(message = "Internal Server Error", options) {
11
13
  super(message, options);
12
14
  this.type = this.constructor.name;
13
15
  this.statusCode = 500;
14
16
  Object.setPrototypeOf(this, AppError.prototype);
15
17
  }
16
- };
18
+ }, "AppError");
17
19
  }
18
20
  });
19
21
 
@@ -21,13 +23,13 @@ var require_AppError = __commonJS({
21
23
  var require_AuthenticationError = __commonJS({
22
24
  "src/Errors/AuthenticationError.js"(exports, module) {
23
25
  var AppError = require_AppError();
24
- module.exports = class AuthenticationError extends AppError {
26
+ module.exports = /* @__PURE__ */ __name(class AuthenticationError extends AppError {
25
27
  constructor(message = "Authentication Error", options = {}) {
26
28
  super(message, options);
27
29
  this.statusCode = 401;
28
30
  Object.setPrototypeOf(this, AuthenticationError.prototype);
29
31
  }
30
- };
32
+ }, "AuthenticationError");
31
33
  }
32
34
  });
33
35
 
@@ -35,13 +37,13 @@ var require_AuthenticationError = __commonJS({
35
37
  var require_AuthorizationError = __commonJS({
36
38
  "src/Errors/AuthorizationError.js"(exports, module) {
37
39
  var AppError = require_AppError();
38
- module.exports = class AuthorizationError extends AppError {
40
+ module.exports = /* @__PURE__ */ __name(class AuthorizationError extends AppError {
39
41
  constructor(message = "Authorization Error", options = {}) {
40
42
  super(message, options);
41
43
  this.statusCode = 403;
42
44
  Object.setPrototypeOf(this, AuthorizationError.prototype);
43
45
  }
44
- };
46
+ }, "AuthorizationError");
45
47
  }
46
48
  });
47
49
 
@@ -49,13 +51,13 @@ var require_AuthorizationError = __commonJS({
49
51
  var require_DeviceCommError = __commonJS({
50
52
  "src/Errors/DeviceCommError.js"(exports, module) {
51
53
  var AppError = require_AppError();
52
- module.exports = class DeviceCommError extends AppError {
54
+ module.exports = /* @__PURE__ */ __name(class DeviceCommError extends AppError {
53
55
  constructor(message = "Device Communication Error", options = {}) {
54
56
  super(message, options);
55
57
  this.statusCode = 503;
56
58
  Object.setPrototypeOf(this, DeviceCommError.prototype);
57
59
  }
58
- };
60
+ }, "DeviceCommError");
59
61
  }
60
62
  });
61
63
 
@@ -63,13 +65,13 @@ var require_DeviceCommError = __commonJS({
63
65
  var require_LoginError = __commonJS({
64
66
  "src/Errors/LoginError.js"(exports, module) {
65
67
  var AppError = require_AppError();
66
- module.exports = class LoginError extends AppError {
68
+ module.exports = /* @__PURE__ */ __name(class LoginError extends AppError {
67
69
  constructor(message = "Invalid Login information provided", options = {}) {
68
70
  super(message, options);
69
71
  this.statusCode = 401;
70
72
  Object.setPrototypeOf(this, LoginError.prototype);
71
73
  }
72
- };
74
+ }, "LoginError");
73
75
  }
74
76
  });
75
77
 
@@ -77,13 +79,13 @@ var require_LoginError = __commonJS({
77
79
  var require_NotFoundError = __commonJS({
78
80
  "src/Errors/NotFoundError.js"(exports, module) {
79
81
  var AppError = require_AppError();
80
- module.exports = class NotFoundError extends AppError {
82
+ module.exports = /* @__PURE__ */ __name(class NotFoundError extends AppError {
81
83
  constructor(message = "Resource Not Found", options = {}) {
82
84
  super(message, options);
83
85
  this.statusCode = 404;
84
86
  Object.setPrototypeOf(this, NotFoundError.prototype);
85
87
  }
86
- };
88
+ }, "NotFoundError");
87
89
  }
88
90
  });
89
91
 
@@ -91,13 +93,13 @@ var require_NotFoundError = __commonJS({
91
93
  var require_RequestError = __commonJS({
92
94
  "src/Errors/RequestError.js"(exports, module) {
93
95
  var AppError = require_AppError();
94
- module.exports = class RequestError extends AppError {
96
+ module.exports = /* @__PURE__ */ __name(class RequestError extends AppError {
95
97
  constructor(message = "Bad Request", options = {}) {
96
98
  super(message, options);
97
99
  this.statusCode = 400;
98
100
  Object.setPrototypeOf(this, RequestError.prototype);
99
101
  }
100
- };
102
+ }, "RequestError");
101
103
  }
102
104
  });
103
105
 
@@ -105,13 +107,13 @@ var require_RequestError = __commonJS({
105
107
  var require_SystemCommError = __commonJS({
106
108
  "src/Errors/SystemCommError.js"(exports, module) {
107
109
  var AppError = require_AppError();
108
- module.exports = class SystemCommError extends AppError {
110
+ module.exports = /* @__PURE__ */ __name(class SystemCommError extends AppError {
109
111
  constructor(message = "System Communication Error", options = {}) {
110
112
  super(message, options);
111
113
  this.statusCode = 503;
112
114
  Object.setPrototypeOf(this, SystemCommError.prototype);
113
115
  }
114
- };
116
+ }, "SystemCommError");
115
117
  }
116
118
  });
117
119
 
@@ -119,13 +121,13 @@ var require_SystemCommError = __commonJS({
119
121
  var require_TokenExpiredError = __commonJS({
120
122
  "src/Errors/TokenExpiredError.js"(exports, module) {
121
123
  var AppError = require_AppError();
122
- module.exports = class TokenExpiredError extends AppError {
124
+ module.exports = /* @__PURE__ */ __name(class TokenExpiredError extends AppError {
123
125
  constructor(message = "Token Expired", options = {}) {
124
126
  super(message, options);
125
127
  this.statusCode = 401;
126
128
  Object.setPrototypeOf(this, TokenExpiredError.prototype);
127
129
  }
128
- };
130
+ }, "TokenExpiredError");
129
131
  }
130
132
  });
131
133
 
@@ -133,13 +135,13 @@ var require_TokenExpiredError = __commonJS({
133
135
  var require_UnprocessableRequestError = __commonJS({
134
136
  "src/Errors/UnprocessableRequestError.js"(exports, module) {
135
137
  var AppError = require_AppError();
136
- module.exports = class UnprocessableRequestError extends AppError {
138
+ module.exports = /* @__PURE__ */ __name(class UnprocessableRequestError extends AppError {
137
139
  constructor(message = "Unprocessable Request Error", options = {}) {
138
140
  super(message, options);
139
141
  this.statusCode = 422;
140
142
  Object.setPrototypeOf(this, UnprocessableRequestError.prototype);
141
143
  }
142
- };
144
+ }, "UnprocessableRequestError");
143
145
  }
144
146
  });
145
147
 
@@ -147,13 +149,13 @@ var require_UnprocessableRequestError = __commonJS({
147
149
  var require_ValidationError = __commonJS({
148
150
  "src/Errors/ValidationError.js"(exports, module) {
149
151
  var AppError = require_AppError();
150
- module.exports = class ValidationError extends AppError {
152
+ module.exports = /* @__PURE__ */ __name(class ValidationError extends AppError {
151
153
  constructor(message = "Validation Error", options = {}) {
152
154
  super(message, options);
153
155
  this.statusCode = 400;
154
156
  Object.setPrototypeOf(this, ValidationError.prototype);
155
157
  }
156
- };
158
+ }, "ValidationError");
157
159
  }
158
160
  });
159
161