@riocrypto/common 1.0.495 → 1.0.497

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.
@@ -55,7 +55,6 @@ export declare class RioClient {
55
55
  signout(): Promise<void>;
56
56
  verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
57
57
  createAuth(password: string): Promise<void>;
58
- resetPassword(answer: string, password: string): Promise<void>;
59
58
  createOrder(order: OrderInput): Promise<Order>;
60
59
  getOrder(id: string): Promise<Order>;
61
60
  initBankPayout(oid: string, accountNumber: string): Promise<BankPayout>;
@@ -188,14 +188,6 @@ class RioClient {
188
188
  });
189
189
  });
190
190
  }
191
- resetPassword(answer, password) {
192
- return __awaiter(this, void 0, void 0, function* () {
193
- yield this.axios.patch("/api/auth/password", {
194
- answer,
195
- password,
196
- });
197
- });
198
- }
199
191
  createOrder(order) {
200
192
  return __awaiter(this, void 0, void 0, function* () {
201
193
  const response = yield this.axios.post("/api/orders", order);
@@ -0,0 +1,8 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class WrongSecurityAnswerError 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.WrongSecurityAnswerError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class WrongSecurityAnswerError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("Wrong security answer");
8
+ this.statusCode = 401;
9
+ Object.setPrototypeOf(this, WrongSecurityAnswerError.prototype);
10
+ }
11
+ serializeErrors() {
12
+ return [{ message: "Wrong security answer" }];
13
+ }
14
+ }
15
+ exports.WrongSecurityAnswerError = WrongSecurityAnswerError;
package/build/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export * from "./errors/invalid-order-size-error";
29
29
  export * from "./errors/partner-not-found-error";
30
30
  export * from "./errors/insufficient-liquidity-error";
31
31
  export * from "./errors/rio-settings-already-exists-error";
32
+ export * from "./errors/wrong-security-answer-error";
32
33
  export * from "./middlewares/error-handler";
33
34
  export * from "./middlewares/validate-request";
34
35
  export * from "./middlewares/current-auth";
package/build/index.js CHANGED
@@ -45,6 +45,7 @@ __exportStar(require("./errors/invalid-order-size-error"), exports);
45
45
  __exportStar(require("./errors/partner-not-found-error"), exports);
46
46
  __exportStar(require("./errors/insufficient-liquidity-error"), exports);
47
47
  __exportStar(require("./errors/rio-settings-already-exists-error"), exports);
48
+ __exportStar(require("./errors/wrong-security-answer-error"), exports);
48
49
  __exportStar(require("./middlewares/error-handler"), exports);
49
50
  __exportStar(require("./middlewares/validate-request"), exports);
50
51
  __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.495",
3
+ "version": "1.0.497",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",