@riocrypto/common 1.0.1032 → 1.0.1033

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.
@@ -28,6 +28,10 @@ import { AdminTaskType } from "../types/admin-task-type";
28
28
  import { ImportOrderInput } from "../types/import-order-input";
29
29
  import { Invoice } from "../types/invoice";
30
30
  import { CryptoAddressQuery } from "../types/crypto-address-query";
31
+ import { ChainedOrderQuery } from "../types/chained-order-query";
32
+ import { ChainedOrder } from "../types/chained-order";
33
+ import { ChainedQuoteInput } from "../types/chained-quote-input";
34
+ import { ChainedQuote } from "../types/chained-quote";
31
35
  export declare class RioAdminClient {
32
36
  private axios;
33
37
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -97,6 +101,9 @@ export declare class RioAdminClient {
97
101
  }>;
98
102
  refreshAdminToken(): Promise<void>;
99
103
  createOrder(order: OrderInput): Promise<Order>;
104
+ getChainedOrders(page: number, limit?: number, query?: ChainedOrderQuery): Promise<ChainedOrder[]>;
105
+ getChainedQuote(id: string): Promise<ChainedQuote>;
106
+ getChainedOrder(id: string): Promise<ChainedOrder>;
100
107
  importOrder(order: ImportOrderInput): Promise<Order>;
101
108
  registerExchangeRate(orderId: string, amount: number, price: number, provider: string): Promise<void>;
102
109
  cancelOrder(id?: string): Promise<Order>;
@@ -105,6 +112,7 @@ export declare class RioAdminClient {
105
112
  getBankPayout(orderId: string): Promise<BankPayout>;
106
113
  getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
107
114
  createCryptoAddress(address: string, crypto: Crypto, userId: string, label?: string): Promise<CryptoAddress>;
115
+ createChainedQuote(input: ChainedQuoteInput): Promise<ChainedQuote>;
108
116
  createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, CCI?: string, notes?: string): Promise<BankAccount>;
109
117
  updateBankAccount(id: string, userId?: string, country?: Country, fiat?: Fiat, bankName?: string, accountHolderName?: string, accountNumber?: string, swiftCode?: string, notes?: string, approved?: boolean): Promise<BankAccount>;
110
118
  deleteBankAccount(id: string): Promise<void>;
@@ -316,6 +316,27 @@ class RioAdminClient {
316
316
  return response.data;
317
317
  });
318
318
  }
319
+ getChainedOrders(page, limit, query) {
320
+ return __awaiter(this, void 0, void 0, function* () {
321
+ const { data } = yield this.axios.get(`/api/orders/chained?`, {
322
+ params: Object.assign({ page,
323
+ limit }, query),
324
+ });
325
+ return data;
326
+ });
327
+ }
328
+ getChainedQuote(id) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ const { data } = yield this.axios.get(`/api/quotes/chained/${id}`);
331
+ return data;
332
+ });
333
+ }
334
+ getChainedOrder(id) {
335
+ return __awaiter(this, void 0, void 0, function* () {
336
+ const response = yield this.axios.get(`/api/orders/chained/${id}`);
337
+ return response.data;
338
+ });
339
+ }
319
340
  importOrder(order) {
320
341
  return __awaiter(this, void 0, void 0, function* () {
321
342
  const response = yield this.axios.post("/api/orders/import", order);
@@ -379,6 +400,12 @@ class RioAdminClient {
379
400
  return response.data;
380
401
  });
381
402
  }
403
+ createChainedQuote(input) {
404
+ return __awaiter(this, void 0, void 0, function* () {
405
+ const { data } = yield this.axios.post(`/api/quotes/chained`, input);
406
+ return data;
407
+ });
408
+ }
382
409
  createBankAccount(userId, country, fiat, bankName, accountHolderName, accountNumber, swiftCode, CCI, notes) {
383
410
  return __awaiter(this, void 0, void 0, function* () {
384
411
  const response = yield this.axios.post(`/api/bank/accounts`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1032",
3
+ "version": "1.0.1033",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",