@riocrypto/common 1.0.1000 → 1.0.1001
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.
|
@@ -24,11 +24,14 @@ import { OrderQuery } from "../types/order-query";
|
|
|
24
24
|
import { BankAccountQuery } from "../types/bank-account-query";
|
|
25
25
|
import { Invoice } from "../types/invoice";
|
|
26
26
|
import { CryptoAddressQuery } from "../types/crypto-address-query";
|
|
27
|
+
import { ChainedQuoteInput } from "../types/chained-quote-input";
|
|
28
|
+
import { ChainedQuote } from "../types/chained-quote";
|
|
27
29
|
export declare class RioClient {
|
|
28
30
|
private axios;
|
|
29
31
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
30
32
|
getOrders(page: number, limit?: number, query?: OrderQuery, includeOwnOrders?: boolean): Promise<Order[]>;
|
|
31
33
|
createQuote(input: QuoteInput): Promise<Quote>;
|
|
34
|
+
createChainedQuote(input: ChainedQuoteInput): Promise<ChainedQuote>;
|
|
32
35
|
getUsers(page: number, limit?: number, query?: UserQuery): Promise<User[]>;
|
|
33
36
|
updateUser(update: UserUpdate, userId?: string): Promise<User>;
|
|
34
37
|
uploadCOI(id: string, formData: FormData): Promise<User>;
|
|
@@ -36,6 +36,12 @@ class RioClient {
|
|
|
36
36
|
return data;
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
+
createChainedQuote(input) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const { data } = yield this.axios.post(`/api/quotes/chained`, input);
|
|
42
|
+
return data;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
39
45
|
getUsers(page, limit, query) {
|
|
40
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
47
|
const { data } = yield this.axios.get(`/api/users?`, {
|
|
@@ -190,6 +196,10 @@ class RioClient {
|
|
|
190
196
|
return response.data;
|
|
191
197
|
});
|
|
192
198
|
}
|
|
199
|
+
// async createChainedOrder(order: ChainedOrder): Promise<Order> {
|
|
200
|
+
// const response = await this.axios.post("/api/orders", order);
|
|
201
|
+
// return response.data as Order;
|
|
202
|
+
// }
|
|
193
203
|
cancelOrder(id) {
|
|
194
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
195
205
|
const response = yield this.axios.post(`/api/orders${id ? `/${id}/cancel` : "/cancel"}`);
|
|
@@ -3,13 +3,14 @@ import { Fees } from "./fees";
|
|
|
3
3
|
import { Fiat } from "./fiat";
|
|
4
4
|
export interface ChainedQuote {
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
6
|
+
originUserId: string;
|
|
7
|
+
destinationUserId: string;
|
|
7
8
|
crypto: Crypto;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
originFiat: Fiat;
|
|
10
|
+
destinationFiat: Fiat;
|
|
10
11
|
expiresAt: Date;
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
originCountry: Country;
|
|
13
|
+
destinationCountry: Country;
|
|
13
14
|
originAmountFiat: number;
|
|
14
15
|
destinationAmountFiat: number;
|
|
15
16
|
originQuoteId: string;
|