@riocrypto/common 1.0.494 → 1.0.496
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.
|
@@ -56,8 +56,7 @@ export declare class RioClient {
|
|
|
56
56
|
verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
|
|
57
57
|
createAuth(password: string): Promise<void>;
|
|
58
58
|
resetPassword(answer: string, password: string): Promise<void>;
|
|
59
|
-
|
|
60
|
-
createSellOrder(order: OrderInput): Promise<Order>;
|
|
59
|
+
createOrder(order: OrderInput): Promise<Order>;
|
|
61
60
|
getOrder(id: string): Promise<Order>;
|
|
62
61
|
initBankPayout(oid: string, accountNumber: string): Promise<BankPayout>;
|
|
63
62
|
getBankPayout(orderId: string): Promise<BankPayout>;
|
|
@@ -196,15 +196,9 @@ class RioClient {
|
|
|
196
196
|
});
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
createOrder(order) {
|
|
200
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
-
const response = yield this.axios.post("/api/orders
|
|
202
|
-
return response.data;
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
createSellOrder(order) {
|
|
206
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
-
const response = yield this.axios.post("/api/orders/sell", order);
|
|
201
|
+
const response = yield this.axios.post("/api/orders", order);
|
|
208
202
|
return response.data;
|
|
209
203
|
});
|
|
210
204
|
}
|
|
@@ -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);
|