@riocrypto/common 1.0.1001 → 1.0.1003
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.
|
@@ -26,6 +26,8 @@ import { Invoice } from "../types/invoice";
|
|
|
26
26
|
import { CryptoAddressQuery } from "../types/crypto-address-query";
|
|
27
27
|
import { ChainedQuoteInput } from "../types/chained-quote-input";
|
|
28
28
|
import { ChainedQuote } from "../types/chained-quote";
|
|
29
|
+
import { ChainedOrderInput } from "../types/chained-order-input";
|
|
30
|
+
import { ChainedOrder } from "../types/chained-order";
|
|
29
31
|
export declare class RioClient {
|
|
30
32
|
private axios;
|
|
31
33
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -64,6 +66,7 @@ export declare class RioClient {
|
|
|
64
66
|
}>;
|
|
65
67
|
refreshToken(): Promise<void>;
|
|
66
68
|
createOrder(order: OrderInput): Promise<Order>;
|
|
69
|
+
createChainedOrder(order: ChainedOrderInput): Promise<ChainedOrder>;
|
|
67
70
|
cancelOrder(id?: string): Promise<Order>;
|
|
68
71
|
getOrder(id: string): Promise<Order>;
|
|
69
72
|
createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
|
|
@@ -93,6 +96,7 @@ export declare class RioClient {
|
|
|
93
96
|
revenue: number;
|
|
94
97
|
}>;
|
|
95
98
|
getQuote(id: string): Promise<Quote>;
|
|
99
|
+
getChainedQuote(id: string): Promise<ChainedQuote>;
|
|
96
100
|
createVerificationLink(userId: string, firstName: string, lastName: string): Promise<string>;
|
|
97
101
|
getPaymentMethods(fiat: Fiat, country: Country): Promise<PaymentMethod[]>;
|
|
98
102
|
getBankAccounts(page: number, limit: number, query?: BankAccountQuery): Promise<BankAccount[]>;
|
|
@@ -196,10 +196,12 @@ class RioClient {
|
|
|
196
196
|
return response.data;
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
createChainedOrder(order) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
const response = yield this.axios.post("/api/orders/chained", order);
|
|
202
|
+
return response.data;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
203
205
|
cancelOrder(id) {
|
|
204
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
205
207
|
const response = yield this.axios.post(`/api/orders${id ? `/${id}/cancel` : "/cancel"}`);
|
|
@@ -319,6 +321,12 @@ class RioClient {
|
|
|
319
321
|
return data;
|
|
320
322
|
});
|
|
321
323
|
}
|
|
324
|
+
getChainedQuote(id) {
|
|
325
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
+
const { data } = yield this.axios.get(`/api/quotes/chained/${id}`);
|
|
327
|
+
return data;
|
|
328
|
+
});
|
|
329
|
+
}
|
|
322
330
|
createVerificationLink(userId, firstName, lastName) {
|
|
323
331
|
return __awaiter(this, void 0, void 0, function* () {
|
|
324
332
|
const { data } = yield this.axios.post("/api/kyc/link", {
|
|
@@ -2,7 +2,7 @@ import { Country } from "./country";
|
|
|
2
2
|
import { Fees } from "./fees";
|
|
3
3
|
import { Fiat } from "./fiat";
|
|
4
4
|
import { OrderStatus } from "./order-status";
|
|
5
|
-
export interface
|
|
5
|
+
export interface ChainedOrder {
|
|
6
6
|
id: string;
|
|
7
7
|
userId: string;
|
|
8
8
|
crypto: Crypto;
|