@riocrypto/common-server 1.0.2314 → 1.0.2316
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.
|
@@ -4,10 +4,11 @@ declare class ClusterClient {
|
|
|
4
4
|
private clusterApiKey;
|
|
5
5
|
private axios;
|
|
6
6
|
constructor(baseUrl: string, clusterApiKey: string);
|
|
7
|
-
refreshQuote({ orderId, newAmountFiat, newAmountCrypto, }: {
|
|
7
|
+
refreshQuote({ orderId, newAmountFiat, newAmountCrypto, useSamePrice, }: {
|
|
8
8
|
orderId: string;
|
|
9
9
|
newAmountFiat?: number;
|
|
10
10
|
newAmountCrypto?: number;
|
|
11
|
+
useSamePrice?: boolean;
|
|
11
12
|
}): Promise<Quote>;
|
|
12
13
|
createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, settlementTime, netPrice, price, ignoreLiquidityError, }: {
|
|
13
14
|
userId: string;
|
|
@@ -55,7 +55,7 @@ class ClusterClient {
|
|
|
55
55
|
}
|
|
56
56
|
this.axios.defaults.headers.common["Host"] = hostHeader;
|
|
57
57
|
}
|
|
58
|
-
refreshQuote({ orderId, newAmountFiat, newAmountCrypto, }) {
|
|
58
|
+
refreshQuote({ orderId, newAmountFiat, newAmountCrypto, useSamePrice, }) {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
if (newAmountCrypto && newAmountFiat) {
|
|
61
61
|
throw new common_1.GenericInternalError("Cannot specify both newAmountCrypto and newAmountFiat");
|
|
@@ -64,6 +64,7 @@ class ClusterClient {
|
|
|
64
64
|
orderId,
|
|
65
65
|
newAmountFiat,
|
|
66
66
|
newAmountCrypto,
|
|
67
|
+
useSamePrice,
|
|
67
68
|
ignoreLiquidityError: true,
|
|
68
69
|
}, {
|
|
69
70
|
headers: {
|
package/build/models/order.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, Partner, OrderSubstatus, OrderAttribute } from "@riocrypto/common";
|
|
1
|
+
import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, Partner, OrderSubstatus, OrderAttribute, SettlementTime } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface OrderAttrs {
|
|
4
4
|
quoteId: string;
|
|
@@ -58,7 +58,8 @@ interface OrderAttrs {
|
|
|
58
58
|
amount: number;
|
|
59
59
|
};
|
|
60
60
|
attributes?: OrderAttribute[];
|
|
61
|
-
settleBy
|
|
61
|
+
settleBy: Date;
|
|
62
|
+
settlementTime: SettlementTime;
|
|
62
63
|
destinationOfFunds?: {
|
|
63
64
|
blockchainAddress?: string;
|
|
64
65
|
accountHolderName?: string;
|
|
@@ -184,7 +185,8 @@ interface OrderDoc extends Document {
|
|
|
184
185
|
amount: number;
|
|
185
186
|
};
|
|
186
187
|
attributes?: OrderAttribute[];
|
|
187
|
-
settleBy
|
|
188
|
+
settleBy: Date;
|
|
189
|
+
settlementTime: SettlementTime;
|
|
188
190
|
destinationOfFunds?: {
|
|
189
191
|
blockchainAddress?: string;
|
|
190
192
|
accountHolderName?: string;
|
package/build/models/order.js
CHANGED
package/build/models/quote.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto } from "@riocrypto/common";
|
|
1
|
+
import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto, SettlementTime } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface QuoteAttrs {
|
|
4
4
|
userId: string;
|
|
@@ -33,7 +33,8 @@ interface QuoteAttrs {
|
|
|
33
33
|
isSurgePricing?: boolean;
|
|
34
34
|
netPrice: number;
|
|
35
35
|
requestedNetPrice?: number;
|
|
36
|
-
settleBy
|
|
36
|
+
settleBy: Date;
|
|
37
|
+
settlementTime: SettlementTime;
|
|
37
38
|
}
|
|
38
39
|
interface QuoteDoc extends Document {
|
|
39
40
|
userId: string;
|
|
@@ -68,7 +69,8 @@ interface QuoteDoc extends Document {
|
|
|
68
69
|
isAfterHours?: boolean;
|
|
69
70
|
netPrice: number;
|
|
70
71
|
requestedNetPrice?: number;
|
|
71
|
-
settleBy
|
|
72
|
+
settleBy: Date;
|
|
73
|
+
settlementTime: SettlementTime;
|
|
72
74
|
}
|
|
73
75
|
interface QuoteModel extends Model<QuoteDoc> {
|
|
74
76
|
build(attrs: QuoteAttrs): QuoteDoc;
|