@riocrypto/common-server 1.0.2171 → 1.0.2172
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType } from "@riocrypto/common";
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, SettlementTime } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -13,11 +13,12 @@ declare class ClusterClient {
|
|
|
13
13
|
getNewChainedQuote(chainedOrderId: string, chainedQuote: ChainedQuote, newOriginAmount?: number): Promise<ChainedQuote>;
|
|
14
14
|
getBidQuote(userId: string, side: Side, country: Country, fiat: Fiat, crypto: Crypto, amountFiat?: number, amountCrypto?: number, USBankTransferMethod?: "ach_push" | "wire", netPrice?: string): Promise<Quote>;
|
|
15
15
|
getCryptoAddresses(userId: string, crypto: Crypto): Promise<CryptoAddress[]>;
|
|
16
|
-
createOrder({ quoteId, userAddressId, payoutBankAccountId, notes, }: {
|
|
16
|
+
createOrder({ quoteId, userAddressId, payoutBankAccountId, notes, settlementTime, }: {
|
|
17
17
|
quoteId: string;
|
|
18
18
|
userAddressId?: string;
|
|
19
19
|
payoutBankAccountId?: string;
|
|
20
20
|
notes?: string;
|
|
21
|
+
settlementTime?: SettlementTime;
|
|
21
22
|
}): Promise<Order>;
|
|
22
23
|
confirmPayment(orderId: string): Promise<void>;
|
|
23
24
|
createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
|
|
@@ -146,7 +146,7 @@ class ClusterClient {
|
|
|
146
146
|
return response.data;
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
createOrder({ quoteId, userAddressId, payoutBankAccountId, notes, }) {
|
|
149
|
+
createOrder({ quoteId, userAddressId, payoutBankAccountId, notes, settlementTime, }) {
|
|
150
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
151
|
const response = yield this.axios.post(`${this.baseUrl}/api/orders`, {
|
|
152
152
|
quoteId,
|
|
@@ -155,6 +155,7 @@ class ClusterClient {
|
|
|
155
155
|
? payoutBankAccountId
|
|
156
156
|
: undefined,
|
|
157
157
|
notes: notes ? notes : undefined,
|
|
158
|
+
settlementTime: settlementTime ? settlementTime : undefined,
|
|
158
159
|
}, {
|
|
159
160
|
headers: {
|
|
160
161
|
"x-cluster-api-key": this.clusterApiKey,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country, Fiat, Side, Crypto } from "@riocrypto/common";
|
|
1
|
+
import { Country, Fiat, Side, Crypto, SettlementTime } from "@riocrypto/common";
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
3
|
interface TelegramSessionAttrs {
|
|
4
4
|
createdAt: Date;
|
|
@@ -23,6 +23,7 @@ interface TelegramSessionAttrs {
|
|
|
23
23
|
orderId?: string;
|
|
24
24
|
userAddressId?: string;
|
|
25
25
|
payoutBankAccountId?: string;
|
|
26
|
+
settlementTime?: SettlementTime;
|
|
26
27
|
}
|
|
27
28
|
interface TelegramSessionDoc extends mongoose.Document {
|
|
28
29
|
createdAt: Date;
|
|
@@ -47,6 +48,7 @@ interface TelegramSessionDoc extends mongoose.Document {
|
|
|
47
48
|
orderId?: string;
|
|
48
49
|
userAddressId?: string;
|
|
49
50
|
payoutBankAccountId?: string;
|
|
51
|
+
settlementTime?: SettlementTime;
|
|
50
52
|
}
|
|
51
53
|
interface TelegramSessionModel extends mongoose.Model<TelegramSessionDoc> {
|
|
52
54
|
build(attrs: TelegramSessionAttrs): TelegramSessionDoc;
|