@riocrypto/common 1.0.359 → 1.0.361

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.
@@ -0,0 +1,8 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class AuthNotFoundError extends CustomError {
3
+ statusCode: number;
4
+ constructor();
5
+ serializeErrors(): {
6
+ message: string;
7
+ }[];
8
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthNotFoundError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class AuthNotFoundError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("Auth not found");
8
+ this.statusCode = 404;
9
+ Object.setPrototypeOf(this, AuthNotFoundError.prototype);
10
+ }
11
+ serializeErrors() {
12
+ return [{ message: "Auth not found" }];
13
+ }
14
+ }
15
+ exports.AuthNotFoundError = AuthNotFoundError;
@@ -0,0 +1,8 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class MissingPasswordError extends CustomError {
3
+ statusCode: number;
4
+ constructor();
5
+ serializeErrors(): {
6
+ message: string;
7
+ }[];
8
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MissingPasswordError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class MissingPasswordError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("Password is not registered");
8
+ this.statusCode = 400;
9
+ Object.setPrototypeOf(this, MissingPasswordError.prototype);
10
+ }
11
+ serializeErrors() {
12
+ return [{ message: "Password is not registered" }];
13
+ }
14
+ }
15
+ exports.MissingPasswordError = MissingPasswordError;
package/build/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export * from "./errors/admin-not-found-error";
13
13
  export * from "./errors/wrong-password-error";
14
14
  export * from "./errors/password-already-used-error";
15
15
  export * from "./errors/auth-already-exists-error";
16
+ export * from "./errors/auth-not-found-error";
17
+ export * from "./errors/missing-password-error";
16
18
  export * from "./middlewares/error-handler";
17
19
  export * from "./middlewares/validate-request";
18
20
  export * from "./middlewares/current-auth";
package/build/index.js CHANGED
@@ -29,6 +29,8 @@ __exportStar(require("./errors/admin-not-found-error"), exports);
29
29
  __exportStar(require("./errors/wrong-password-error"), exports);
30
30
  __exportStar(require("./errors/password-already-used-error"), exports);
31
31
  __exportStar(require("./errors/auth-already-exists-error"), exports);
32
+ __exportStar(require("./errors/auth-not-found-error"), exports);
33
+ __exportStar(require("./errors/missing-password-error"), exports);
32
34
  __exportStar(require("./middlewares/error-handler"), exports);
33
35
  __exportStar(require("./middlewares/validate-request"), exports);
34
36
  __exportStar(require("./middlewares/current-auth"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.359",
3
+ "version": "1.0.361",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",