@riocrypto/common 1.0.1033 → 1.0.1035
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.
|
@@ -32,6 +32,7 @@ import { ChainedOrderQuery } from "../types/chained-order-query";
|
|
|
32
32
|
import { ChainedOrder } from "../types/chained-order";
|
|
33
33
|
import { ChainedQuoteInput } from "../types/chained-quote-input";
|
|
34
34
|
import { ChainedQuote } from "../types/chained-quote";
|
|
35
|
+
import { ChainedOrderInput } from "../types/chained-order-input";
|
|
35
36
|
export declare class RioAdminClient {
|
|
36
37
|
private axios;
|
|
37
38
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -107,10 +108,12 @@ export declare class RioAdminClient {
|
|
|
107
108
|
importOrder(order: ImportOrderInput): Promise<Order>;
|
|
108
109
|
registerExchangeRate(orderId: string, amount: number, price: number, provider: string): Promise<void>;
|
|
109
110
|
cancelOrder(id?: string): Promise<Order>;
|
|
111
|
+
cancelChainedOrder(id?: string): Promise<void>;
|
|
110
112
|
getOrder(id: string): Promise<Order>;
|
|
111
113
|
createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
|
|
112
114
|
getBankPayout(orderId: string): Promise<BankPayout>;
|
|
113
115
|
getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
|
|
116
|
+
createChainedOrder(order: ChainedOrderInput): Promise<ChainedOrder>;
|
|
114
117
|
createCryptoAddress(address: string, crypto: Crypto, userId: string, label?: string): Promise<CryptoAddress>;
|
|
115
118
|
createChainedQuote(input: ChainedQuoteInput): Promise<ChainedQuote>;
|
|
116
119
|
createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, CCI?: string, notes?: string): Promise<BankAccount>;
|
|
@@ -359,6 +359,11 @@ class RioAdminClient {
|
|
|
359
359
|
return response.data;
|
|
360
360
|
});
|
|
361
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
|
+
}
|
|
362
367
|
getOrder(id) {
|
|
363
368
|
return __awaiter(this, void 0, void 0, function* () {
|
|
364
369
|
const response = yield this.axios.get(`/api/orders/${id}`);
|
|
@@ -389,6 +394,12 @@ class RioAdminClient {
|
|
|
389
394
|
return data;
|
|
390
395
|
});
|
|
391
396
|
}
|
|
397
|
+
createChainedOrder(order) {
|
|
398
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
+
const response = yield this.axios.post("/api/orders/chained", order);
|
|
400
|
+
return response.data;
|
|
401
|
+
});
|
|
402
|
+
}
|
|
392
403
|
createCryptoAddress(address, crypto, userId, label) {
|
|
393
404
|
return __awaiter(this, void 0, void 0, function* () {
|
|
394
405
|
const response = yield this.axios.post(`/api/addresses`, {
|