@riocrypto/common 1.0.1032 → 1.0.1034
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,14 +101,19 @@ 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>;
|
|
110
|
+
cancelChainedOrder(id?: string): Promise<void>;
|
|
103
111
|
getOrder(id: string): Promise<Order>;
|
|
104
112
|
createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
|
|
105
113
|
getBankPayout(orderId: string): Promise<BankPayout>;
|
|
106
114
|
getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
|
|
107
115
|
createCryptoAddress(address: string, crypto: Crypto, userId: string, label?: string): Promise<CryptoAddress>;
|
|
116
|
+
createChainedQuote(input: ChainedQuoteInput): Promise<ChainedQuote>;
|
|
108
117
|
createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, CCI?: string, notes?: string): Promise<BankAccount>;
|
|
109
118
|
updateBankAccount(id: string, userId?: string, country?: Country, fiat?: Fiat, bankName?: string, accountHolderName?: string, accountNumber?: string, swiftCode?: string, notes?: string, approved?: boolean): Promise<BankAccount>;
|
|
110
119
|
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);
|
|
@@ -338,6 +359,11 @@ class RioAdminClient {
|
|
|
338
359
|
return response.data;
|
|
339
360
|
});
|
|
340
361
|
}
|
|
362
|
+
cancelChainedOrder(id) {
|
|
363
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
364
|
+
yield this.axios.post(`/api/orders/chained/${id}/cancel`);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
341
367
|
getOrder(id) {
|
|
342
368
|
return __awaiter(this, void 0, void 0, function* () {
|
|
343
369
|
const response = yield this.axios.get(`/api/orders/${id}`);
|
|
@@ -379,6 +405,12 @@ class RioAdminClient {
|
|
|
379
405
|
return response.data;
|
|
380
406
|
});
|
|
381
407
|
}
|
|
408
|
+
createChainedQuote(input) {
|
|
409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
+
const { data } = yield this.axios.post(`/api/quotes/chained`, input);
|
|
411
|
+
return data;
|
|
412
|
+
});
|
|
413
|
+
}
|
|
382
414
|
createBankAccount(userId, country, fiat, bankName, accountHolderName, accountNumber, swiftCode, CCI, notes) {
|
|
383
415
|
return __awaiter(this, void 0, void 0, function* () {
|
|
384
416
|
const response = yield this.axios.post(`/api/bank/accounts`, {
|