@riocrypto/common-server 1.0.2417 → 1.0.2419
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.
- package/build/models/order.d.ts +28 -22
- package/build/models/order.js +10 -8
- package/build/models/quote.d.ts +2 -0
- package/build/models/quote.js +3 -0
- package/package.json +2 -2
package/build/models/order.d.ts
CHANGED
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, DeferredPaymentType, TwoWaySettlementType } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
import { OrderExecutionType } from "@riocrypto/common/build/types/order-execution-type";
|
|
3
4
|
interface OrderAttrs {
|
|
4
|
-
quoteId
|
|
5
|
+
quoteId?: string;
|
|
5
6
|
userId: string;
|
|
6
7
|
crypto: Crypto;
|
|
7
8
|
side: Side;
|
|
8
9
|
fiat: Fiat;
|
|
10
|
+
executionType: OrderExecutionType;
|
|
11
|
+
amountFiat: number;
|
|
12
|
+
amountCrypto: number;
|
|
9
13
|
paymentMethod?: PaymentMethod;
|
|
10
14
|
payoutMethod?: PayoutMethod;
|
|
11
15
|
createdAt: Date;
|
|
12
|
-
twoWaySettlementDate
|
|
16
|
+
twoWaySettlementDate?: Date;
|
|
13
17
|
status: OrderStatus;
|
|
14
18
|
cryptoAddress?: string;
|
|
15
19
|
country: Country;
|
|
16
|
-
|
|
20
|
+
limitPrice?: number;
|
|
17
21
|
amountFiatReceived?: number;
|
|
18
|
-
amountCrypto: number;
|
|
19
22
|
amountCryptoReceived?: number;
|
|
20
|
-
liquidityProvider
|
|
21
|
-
processor
|
|
22
|
-
fees
|
|
23
|
+
liquidityProvider?: LiquidityProvider;
|
|
24
|
+
processor?: Processor;
|
|
25
|
+
fees?: Fees;
|
|
23
26
|
actualFees?: Fees;
|
|
24
27
|
wireMessage?: string;
|
|
25
|
-
price
|
|
28
|
+
price?: number;
|
|
26
29
|
depositAddress?: string;
|
|
27
30
|
depositTxId?: string;
|
|
28
31
|
withdrawalTxId?: string;
|
|
29
32
|
withdrawalTxIds?: string[];
|
|
30
33
|
brokerId?: string;
|
|
31
|
-
conversionRateUSD
|
|
32
|
-
conversionRateUSDWithMarkups
|
|
34
|
+
conversionRateUSD?: number;
|
|
35
|
+
conversionRateUSDWithMarkups?: number;
|
|
33
36
|
actualConversionRateUSD?: number;
|
|
34
37
|
notes?: string;
|
|
35
38
|
discount?: number;
|
|
@@ -41,7 +44,7 @@ interface OrderAttrs {
|
|
|
41
44
|
isAfterHours?: boolean;
|
|
42
45
|
isSurgePricing?: boolean;
|
|
43
46
|
chainedOrderId?: string;
|
|
44
|
-
netPrice
|
|
47
|
+
netPrice?: number;
|
|
45
48
|
requestedNetPrice?: number;
|
|
46
49
|
payoutAddressId?: string;
|
|
47
50
|
payoutBankAccountId?: string;
|
|
@@ -57,9 +60,10 @@ interface OrderAttrs {
|
|
|
57
60
|
amount: number;
|
|
58
61
|
};
|
|
59
62
|
attributes?: OrderAttribute[];
|
|
60
|
-
deferredPaymentType
|
|
61
|
-
twoWaySettlementType
|
|
63
|
+
deferredPaymentType?: DeferredPaymentType;
|
|
64
|
+
twoWaySettlementType?: TwoWaySettlementType;
|
|
62
65
|
twoWaySettlementDateOffset?: number;
|
|
66
|
+
effectiveTwoWaySettlementDateOffset?: number;
|
|
63
67
|
destinationOfFunds?: {
|
|
64
68
|
blockchainAddress?: string;
|
|
65
69
|
accountHolderName?: string;
|
|
@@ -125,35 +129,36 @@ interface OrderAttrs {
|
|
|
125
129
|
};
|
|
126
130
|
}
|
|
127
131
|
interface OrderDoc extends Document {
|
|
128
|
-
quoteId
|
|
132
|
+
quoteId?: string;
|
|
129
133
|
userId: string;
|
|
130
134
|
status: OrderStatus;
|
|
131
135
|
crypto: Crypto;
|
|
132
136
|
side: Side;
|
|
133
137
|
fiat: Fiat;
|
|
138
|
+
executionType: OrderExecutionType;
|
|
139
|
+
limitPrice?: number;
|
|
134
140
|
paymentMethod?: PaymentMethod;
|
|
135
141
|
payoutMethod?: PayoutMethod;
|
|
136
142
|
createdAt: Date;
|
|
137
|
-
twoWaySettlementDate
|
|
143
|
+
twoWaySettlementDate?: Date;
|
|
138
144
|
country: Country;
|
|
139
|
-
state?: string;
|
|
140
145
|
cryptoAddress?: string;
|
|
141
146
|
amountFiat: number;
|
|
142
147
|
amountCrypto: number;
|
|
143
148
|
amountFiatReceived?: number;
|
|
144
149
|
amountCryptoReceived?: number;
|
|
145
|
-
liquidityProvider
|
|
146
|
-
processor
|
|
147
|
-
fees
|
|
150
|
+
liquidityProvider?: LiquidityProvider;
|
|
151
|
+
processor?: Processor;
|
|
152
|
+
fees?: Fees;
|
|
148
153
|
actualFees?: Fees;
|
|
149
|
-
price
|
|
154
|
+
price?: number;
|
|
150
155
|
depositAddress?: string;
|
|
151
156
|
depositTxId?: string;
|
|
152
157
|
withdrawalTxId?: string;
|
|
153
158
|
withdrawalTxIds?: string[];
|
|
154
159
|
brokerId?: string;
|
|
155
|
-
conversionRateUSD
|
|
156
|
-
conversionRateUSDWithMarkups
|
|
160
|
+
conversionRateUSD?: number;
|
|
161
|
+
conversionRateUSDWithMarkups?: number;
|
|
157
162
|
actualConversionRateUSD?: number;
|
|
158
163
|
notes?: string;
|
|
159
164
|
discount?: number;
|
|
@@ -188,6 +193,7 @@ interface OrderDoc extends Document {
|
|
|
188
193
|
deferredPaymentType: DeferredPaymentType;
|
|
189
194
|
twoWaySettlementType: TwoWaySettlementType;
|
|
190
195
|
twoWaySettlementDateOffset?: number;
|
|
196
|
+
effectiveTwoWaySettlementDateOffset?: number;
|
|
191
197
|
destinationOfFunds?: {
|
|
192
198
|
blockchainAddress?: string;
|
|
193
199
|
accountHolderName?: string;
|
package/build/models/order.js
CHANGED
|
@@ -11,6 +11,13 @@ const buildOrder = (mongoose) => {
|
|
|
11
11
|
quoteId: {
|
|
12
12
|
type: String,
|
|
13
13
|
},
|
|
14
|
+
executionType: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
limitPrice: {
|
|
19
|
+
type: Number,
|
|
20
|
+
},
|
|
14
21
|
userId: {
|
|
15
22
|
type: String,
|
|
16
23
|
required: true,
|
|
@@ -68,9 +75,6 @@ const buildOrder = (mongoose) => {
|
|
|
68
75
|
type: String,
|
|
69
76
|
required: true,
|
|
70
77
|
},
|
|
71
|
-
state: {
|
|
72
|
-
type: String,
|
|
73
|
-
},
|
|
74
78
|
amountFiat: {
|
|
75
79
|
type: Number,
|
|
76
80
|
required: true,
|
|
@@ -87,11 +91,9 @@ const buildOrder = (mongoose) => {
|
|
|
87
91
|
},
|
|
88
92
|
processor: {
|
|
89
93
|
type: String,
|
|
90
|
-
required: true,
|
|
91
94
|
},
|
|
92
95
|
liquidityProvider: {
|
|
93
96
|
type: String,
|
|
94
|
-
required: true,
|
|
95
97
|
},
|
|
96
98
|
depositTxId: {
|
|
97
99
|
type: String,
|
|
@@ -149,18 +151,15 @@ const buildOrder = (mongoose) => {
|
|
|
149
151
|
},
|
|
150
152
|
price: {
|
|
151
153
|
type: Number,
|
|
152
|
-
required: true,
|
|
153
154
|
},
|
|
154
155
|
brokerId: {
|
|
155
156
|
type: String,
|
|
156
157
|
},
|
|
157
158
|
conversionRateUSD: {
|
|
158
159
|
type: Number,
|
|
159
|
-
required: true,
|
|
160
160
|
},
|
|
161
161
|
conversionRateUSDWithMarkups: {
|
|
162
162
|
type: Number,
|
|
163
|
-
required: true,
|
|
164
163
|
},
|
|
165
164
|
actualConversionRateUSD: {
|
|
166
165
|
type: Number,
|
|
@@ -250,6 +249,9 @@ const buildOrder = (mongoose) => {
|
|
|
250
249
|
twoWaySettlementDateOffset: {
|
|
251
250
|
type: Number,
|
|
252
251
|
},
|
|
252
|
+
effectiveTwoWaySettlementDateOffset: {
|
|
253
|
+
type: Number,
|
|
254
|
+
},
|
|
253
255
|
attributes: [
|
|
254
256
|
{
|
|
255
257
|
type: String,
|
package/build/models/quote.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ interface QuoteAttrs {
|
|
|
37
37
|
deferredPaymentType: DeferredPaymentType;
|
|
38
38
|
twoWaySettlementType: TwoWaySettlementType;
|
|
39
39
|
twoWaySettlementDateOffset?: number;
|
|
40
|
+
effectiveTwoWaySettlementDateOffset?: number;
|
|
40
41
|
twoWaySettlementDate: Date;
|
|
41
42
|
}
|
|
42
43
|
interface QuoteDoc extends Document {
|
|
@@ -76,6 +77,7 @@ interface QuoteDoc extends Document {
|
|
|
76
77
|
deferredPaymentType: DeferredPaymentType;
|
|
77
78
|
twoWaySettlementType: TwoWaySettlementType;
|
|
78
79
|
twoWaySettlementDateOffset?: number;
|
|
80
|
+
effectiveTwoWaySettlementDateOffset?: number;
|
|
79
81
|
twoWaySettlementDate: Date;
|
|
80
82
|
}
|
|
81
83
|
interface QuoteModel extends Model<QuoteDoc> {
|
package/build/models/quote.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2419",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
29
29
|
"@google-cloud/storage": "^6.9.5",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.7.0",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.2167",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|