@riocrypto/common 1.0.1156 → 1.0.1158

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.
@@ -2,5 +2,5 @@ import { SecurityQuestion } from "../types/security-question";
2
2
  export declare class SecurityQuestionClass {
3
3
  private key;
4
4
  constructor(key: SecurityQuestion);
5
- getQuestionText(): "ERR" | "What city were you born in?" | "What was the brand of your first car?" | "What was the name of your first pet?" | "What was the name of your first school?";
5
+ getQuestionText(): "ERR" | "What is your mother's maiden name?" | "What city were you born in?" | "What was the brand of your first car?" | "What was the name of your first pet?" | "What was the name of your first school?";
6
6
  }
@@ -7,7 +7,10 @@ class SecurityQuestionClass {
7
7
  this.key = key;
8
8
  }
9
9
  getQuestionText() {
10
- if (this.key === security_question_1.SecurityQuestion.cityOfBirth) {
10
+ if (this.key === security_question_1.SecurityQuestion.mothersMaidenName) {
11
+ return "What is your mother's maiden name?";
12
+ }
13
+ else if (this.key === security_question_1.SecurityQuestion.cityOfBirth) {
11
14
  return "What city were you born in?";
12
15
  }
13
16
  else if (this.key === security_question_1.SecurityQuestion.firstCarBrand) {
@@ -0,0 +1,10 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class AboveLimitError extends CustomError {
3
+ statusCode: number;
4
+ internalCode: number;
5
+ constructor();
6
+ serializeErrors(): {
7
+ code: number;
8
+ message: string;
9
+ }[];
10
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AboveLimitError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class AboveLimitError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("Order would go above user's transaction limit");
8
+ this.statusCode = 400;
9
+ this.internalCode = 43;
10
+ Object.setPrototypeOf(this, AboveLimitError.prototype);
11
+ }
12
+ serializeErrors() {
13
+ return [
14
+ {
15
+ code: this.internalCode,
16
+ message: "Order would go above user's transaction limit",
17
+ },
18
+ ];
19
+ }
20
+ }
21
+ exports.AboveLimitError = AboveLimitError;
package/build/index.d.ts CHANGED
@@ -38,6 +38,7 @@ export * from "./errors/invalid-refresh-token-error";
38
38
  export * from "./errors/secret-manager-error";
39
39
  export * from "./errors/expired-quote-error";
40
40
  export * from "./errors/user-not-enabled-in-us-error";
41
+ export * from "./errors/above-limit-error";
41
42
  export * from "./events/base-listener";
42
43
  export * from "./events/base-publisher";
43
44
  export * from "./events/subjects";
package/build/index.js CHANGED
@@ -54,6 +54,7 @@ __exportStar(require("./errors/invalid-refresh-token-error"), exports);
54
54
  __exportStar(require("./errors/secret-manager-error"), exports);
55
55
  __exportStar(require("./errors/expired-quote-error"), exports);
56
56
  __exportStar(require("./errors/user-not-enabled-in-us-error"), exports);
57
+ __exportStar(require("./errors/above-limit-error"), exports);
57
58
  __exportStar(require("./events/base-listener"), exports);
58
59
  __exportStar(require("./events/base-publisher"), exports);
59
60
  __exportStar(require("./events/subjects"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1156",
3
+ "version": "1.0.1158",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",