@riocrypto/common 1.0.1163 → 1.0.1165
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.
|
@@ -37,7 +37,7 @@ import { InternalSwap } from "../types/internal-swap";
|
|
|
37
37
|
import { BridgeExternalAccountQuery } from "../types/bridge-external-account-query";
|
|
38
38
|
export declare class RioAdminClient {
|
|
39
39
|
private axios;
|
|
40
|
-
constructor(axios: AxiosStatic | AxiosInstance);
|
|
40
|
+
constructor(axios: AxiosStatic | AxiosInstance, isLocal: boolean);
|
|
41
41
|
getOrders(page: number, limit?: number, query?: OrderQuery): Promise<Order[]>;
|
|
42
42
|
createQuote(input: QuoteInput): Promise<{
|
|
43
43
|
quote: Quote;
|
|
@@ -11,8 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RioAdminClient = void 0;
|
|
13
13
|
class RioAdminClient {
|
|
14
|
-
constructor(axios) {
|
|
14
|
+
constructor(axios, isLocal) {
|
|
15
15
|
this.axios = axios;
|
|
16
|
+
if (isLocal) {
|
|
17
|
+
this.axios.defaults.baseURL = "https://dev.riotransfer.co";
|
|
18
|
+
}
|
|
16
19
|
axios.interceptors.request.use((config) => {
|
|
17
20
|
// Exclude specific cookies from being sent
|
|
18
21
|
if (config.headers && config.headers.Cookie) {
|
|
@@ -33,7 +33,7 @@ import { BridgeExternalAccountQuery } from "../types/bridge-external-account-que
|
|
|
33
33
|
import { SecurityQuestion } from "../types/security-question";
|
|
34
34
|
export declare class RioClient {
|
|
35
35
|
private axios;
|
|
36
|
-
constructor(axios: AxiosStatic | AxiosInstance);
|
|
36
|
+
constructor(axios: AxiosStatic | AxiosInstance, isLocal?: boolean);
|
|
37
37
|
getOrders(page: number, limit?: number, query?: OrderQuery, includeOwnOrders?: boolean): Promise<Order[]>;
|
|
38
38
|
getChainedOrders(page: number, limit?: number, query?: ChainedOrderQuery): Promise<ChainedOrder[]>;
|
|
39
39
|
createQuote(input: QuoteInput): Promise<Quote>;
|
|
@@ -49,6 +49,11 @@ export declare class RioClient {
|
|
|
49
49
|
}): Promise<void>;
|
|
50
50
|
updateRioSettings(update: RioSettingsUpdate): Promise<void>;
|
|
51
51
|
confirmBankPayment(orderId: string, amountFiat?: number): Promise<any>;
|
|
52
|
+
createAPIKey(label: string): Promise<{
|
|
53
|
+
value: string;
|
|
54
|
+
label: string;
|
|
55
|
+
}>;
|
|
56
|
+
deleteAPIKey(id: string): Promise<void>;
|
|
52
57
|
confirmBankPayout(orderId: string): Promise<any>;
|
|
53
58
|
getUser(userId?: string): Promise<User>;
|
|
54
59
|
createUser(user: UserInput): Promise<User>;
|
|
@@ -11,8 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RioClient = void 0;
|
|
13
13
|
class RioClient {
|
|
14
|
-
constructor(axios) {
|
|
14
|
+
constructor(axios, isLocal) {
|
|
15
15
|
this.axios = axios;
|
|
16
|
+
if (isLocal) {
|
|
17
|
+
this.axios.defaults.baseURL = "https://dev.riotransfer.co";
|
|
18
|
+
}
|
|
16
19
|
axios.interceptors.request.use((config) => {
|
|
17
20
|
// Exclude specific cookie from being sent
|
|
18
21
|
if (config.headers && config.headers.Cookie) {
|
|
@@ -110,6 +113,19 @@ class RioClient {
|
|
|
110
113
|
return data;
|
|
111
114
|
});
|
|
112
115
|
}
|
|
116
|
+
createAPIKey(label) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const { data } = yield this.axios.post(`/api/auth/api-key`, {
|
|
119
|
+
label,
|
|
120
|
+
});
|
|
121
|
+
return data;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
deleteAPIKey(id) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
yield this.axios.delete(`/api/auth/api-key/${id}`);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
113
129
|
confirmBankPayout(orderId) {
|
|
114
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
115
131
|
const { data } = yield this.axios.post(`/api/payouts/bank/confirm`, {
|