@riocrypto/common 1.0.493 → 1.0.495

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.
@@ -1,6 +1,7 @@
1
1
  import { AxiosInstance, AxiosStatic } from "axios";
2
2
  import { Admin } from "../types/admin";
3
3
  import { Auth } from "../types/auth";
4
+ import { AuthUpdate } from "../types/auth-update";
4
5
  import { BankPayout } from "../types/bank-payout";
5
6
  import { BusinessUser } from "../types/business-user";
6
7
  import { BusinessUserInput } from "../types/business-user-input";
@@ -55,8 +56,7 @@ export declare class RioClient {
55
56
  verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
56
57
  createAuth(password: string): Promise<void>;
57
58
  resetPassword(answer: string, password: string): Promise<void>;
58
- createBuyOrder(order: OrderInput): Promise<Order>;
59
- createSellOrder(order: OrderInput): Promise<Order>;
59
+ createOrder(order: OrderInput): Promise<Order>;
60
60
  getOrder(id: string): Promise<Order>;
61
61
  initBankPayout(oid: string, accountNumber: string): Promise<BankPayout>;
62
62
  getBankPayout(orderId: string): Promise<BankPayout>;
@@ -80,5 +80,5 @@ export declare class RioClient {
80
80
  createSPIDPayment(orderId: string): Promise<any>;
81
81
  createSWIFTPayment(orderId: string): Promise<any>;
82
82
  createInterbankPayment(orderId: string): Promise<any>;
83
- updateAuth(): Promise<Auth>;
83
+ updateAuth(update: AuthUpdate, id?: string): Promise<Auth>;
84
84
  }
@@ -196,15 +196,9 @@ class RioClient {
196
196
  });
197
197
  });
198
198
  }
199
- createBuyOrder(order) {
199
+ createOrder(order) {
200
200
  return __awaiter(this, void 0, void 0, function* () {
201
- const response = yield this.axios.post("/api/orders/buy", order);
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
  }
@@ -327,9 +321,9 @@ class RioClient {
327
321
  return data;
328
322
  });
329
323
  }
330
- updateAuth() {
324
+ updateAuth(update, id) {
331
325
  return __awaiter(this, void 0, void 0, function* () {
332
- const { data } = yield this.axios.patch(`/api/auth`);
326
+ const { data } = yield this.axios.patch(`/api/auth/${id}`, update);
333
327
  return data;
334
328
  });
335
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.493",
3
+ "version": "1.0.495",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",