@modernlock/common 1.0.9 → 1.0.12
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/build/errors/email-exist-error.d.ts +8 -0
- package/build/errors/email-exist-error.js +17 -0
- package/build/errors/file-not-exist-error.d.ts +8 -0
- package/build/errors/file-not-exist-error.js +17 -0
- package/build/errors/no-key-assigned-error.d.ts +8 -0
- package/build/errors/no-key-assigned-error.js +17 -0
- package/build/errors/not-primary-email-error.d.ts +8 -0
- package/build/errors/not-primary-email-error.js +17 -0
- package/build/errors/password-incorrect-error.d.ts +8 -0
- package/build/errors/password-incorrect-error.js +17 -0
- package/build/errors/user-not-found-error copy.d.ts +8 -0
- package/build/errors/user-not-found-error copy.js +17 -0
- package/build/events/queues.d.ts +3 -5
- package/build/events/queues.js +4 -5
- package/build/events/rabbitmq-wrapper.js +5 -1
- package/build/events/routing-keys.d.ts +3 -3
- package/build/events/routing-keys.js +5 -3
- package/build/index.js +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailExistsError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class EmailExistsError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Email already exists");
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, EmailExistsError.prototype);
|
|
10
|
+
}
|
|
11
|
+
;
|
|
12
|
+
serializeErrors() {
|
|
13
|
+
return [{ message: 'Email already exists' }];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.EmailExistsError = EmailExistsError;
|
|
17
|
+
;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileNotExistError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class FileNotExistError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('Please enter a file');
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, FileNotExistError.prototype);
|
|
10
|
+
}
|
|
11
|
+
;
|
|
12
|
+
serializeErrors() {
|
|
13
|
+
return [{ message: 'Please enter a file' }];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.FileNotExistError = FileNotExistError;
|
|
17
|
+
;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoKeyAssignedError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class NoKeyAssignedError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("No key assigned error");
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, NoKeyAssignedError.prototype);
|
|
10
|
+
}
|
|
11
|
+
;
|
|
12
|
+
serializeErrors() {
|
|
13
|
+
return [{ message: this.message }];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.NoKeyAssignedError = NoKeyAssignedError;
|
|
17
|
+
;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotPrimaryEmailError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class NotPrimaryEmailError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Please use the primary email to login!");
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, NotPrimaryEmailError.prototype);
|
|
10
|
+
}
|
|
11
|
+
;
|
|
12
|
+
serializeErrors() {
|
|
13
|
+
return [{ message: "Please use the primary email to login!" }];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.NotPrimaryEmailError = NotPrimaryEmailError;
|
|
17
|
+
;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PasswordIncorrectError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class PasswordIncorrectError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Password incorrect!");
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, PasswordIncorrectError.prototype);
|
|
10
|
+
}
|
|
11
|
+
;
|
|
12
|
+
serializeErrors() {
|
|
13
|
+
return [{ message: "Password incorrect!" }];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.PasswordIncorrectError = PasswordIncorrectError;
|
|
17
|
+
;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserNotFoundError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class UserNotFoundError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("User not found, please signup and try again later!");
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, UserNotFoundError.prototype);
|
|
10
|
+
}
|
|
11
|
+
;
|
|
12
|
+
serializeErrors() {
|
|
13
|
+
return [{ message: "User not found, please signup and try again later!" }];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.UserNotFoundError = UserNotFoundError;
|
|
17
|
+
;
|
package/build/events/queues.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
export declare enum Queues {
|
|
2
2
|
userCreatedQueue = "userCreatedQueue",
|
|
3
3
|
userUpdatedQueue = "userUpdatedQueue",
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
FileRemoveQeueu = "FileRemoveQeueu",
|
|
8
|
-
severalUserCreatedQeueu = "severalUserCreatedQeueu",
|
|
4
|
+
createKeyQueue = "createKeyQueue",
|
|
5
|
+
updateKeyStatusKey = "updateKeyStatusKey",
|
|
6
|
+
reservationCreatedQueue = "reservationCreatedQueue",
|
|
9
7
|
singleNotificationQeueu = "singleNotificationQeueu",
|
|
10
8
|
groupNotificationsQeueu = "groupNotificationsQeueu",
|
|
11
9
|
chatNotificationsQueue = "chatNotificationsQueue",
|
package/build/events/queues.js
CHANGED
|
@@ -5,11 +5,10 @@ var Queues;
|
|
|
5
5
|
(function (Queues) {
|
|
6
6
|
Queues["userCreatedQueue"] = "userCreatedQueue";
|
|
7
7
|
Queues["userUpdatedQueue"] = "userUpdatedQueue";
|
|
8
|
-
Queues["
|
|
9
|
-
Queues["
|
|
10
|
-
|
|
11
|
-
Queues["
|
|
12
|
-
Queues["severalUserCreatedQeueu"] = "severalUserCreatedQeueu";
|
|
8
|
+
Queues["createKeyQueue"] = "createKeyQueue";
|
|
9
|
+
Queues["updateKeyStatusKey"] = "updateKeyStatusKey";
|
|
10
|
+
// Reservations Queue
|
|
11
|
+
Queues["reservationCreatedQueue"] = "reservationCreatedQueue";
|
|
13
12
|
// notification service queues
|
|
14
13
|
Queues["singleNotificationQeueu"] = "singleNotificationQeueu";
|
|
15
14
|
Queues["groupNotificationsQeueu"] = "groupNotificationsQeueu";
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare enum RoutingKeys {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
createKey = "key:create",
|
|
3
|
+
updateKeyStatusKey = "key:statusUpdate",
|
|
4
|
+
reservationCreatedKey = "reservation:created",
|
|
5
5
|
userCreated = "user:created",
|
|
6
6
|
userUpdated = "user:updated",
|
|
7
7
|
userDeleted = "User:deleted",
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RoutingKeys = void 0;
|
|
4
4
|
var RoutingKeys;
|
|
5
5
|
(function (RoutingKeys) {
|
|
6
|
-
|
|
7
|
-
RoutingKeys["
|
|
8
|
-
RoutingKeys["
|
|
6
|
+
// Key service keys
|
|
7
|
+
RoutingKeys["createKey"] = "key:create";
|
|
8
|
+
RoutingKeys["updateKeyStatusKey"] = "key:statusUpdate";
|
|
9
|
+
// Reservation keys
|
|
10
|
+
RoutingKeys["reservationCreatedKey"] = "reservation:created";
|
|
9
11
|
RoutingKeys["userCreated"] = "user:created";
|
|
10
12
|
RoutingKeys["userUpdated"] = "user:updated";
|
|
11
13
|
RoutingKeys["userDeleted"] = "User:deleted";
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|