@riocrypto/common-server 1.0.2418 → 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 +26 -22
- package/build/models/order.js +7 -8
- 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,8 +60,8 @@ 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;
|
|
63
66
|
effectiveTwoWaySettlementDateOffset?: number;
|
|
64
67
|
destinationOfFunds?: {
|
|
@@ -126,35 +129,36 @@ interface OrderAttrs {
|
|
|
126
129
|
};
|
|
127
130
|
}
|
|
128
131
|
interface OrderDoc extends Document {
|
|
129
|
-
quoteId
|
|
132
|
+
quoteId?: string;
|
|
130
133
|
userId: string;
|
|
131
134
|
status: OrderStatus;
|
|
132
135
|
crypto: Crypto;
|
|
133
136
|
side: Side;
|
|
134
137
|
fiat: Fiat;
|
|
138
|
+
executionType: OrderExecutionType;
|
|
139
|
+
limitPrice?: number;
|
|
135
140
|
paymentMethod?: PaymentMethod;
|
|
136
141
|
payoutMethod?: PayoutMethod;
|
|
137
142
|
createdAt: Date;
|
|
138
|
-
twoWaySettlementDate
|
|
143
|
+
twoWaySettlementDate?: Date;
|
|
139
144
|
country: Country;
|
|
140
|
-
state?: string;
|
|
141
145
|
cryptoAddress?: string;
|
|
142
146
|
amountFiat: number;
|
|
143
147
|
amountCrypto: number;
|
|
144
148
|
amountFiatReceived?: number;
|
|
145
149
|
amountCryptoReceived?: number;
|
|
146
|
-
liquidityProvider
|
|
147
|
-
processor
|
|
148
|
-
fees
|
|
150
|
+
liquidityProvider?: LiquidityProvider;
|
|
151
|
+
processor?: Processor;
|
|
152
|
+
fees?: Fees;
|
|
149
153
|
actualFees?: Fees;
|
|
150
|
-
price
|
|
154
|
+
price?: number;
|
|
151
155
|
depositAddress?: string;
|
|
152
156
|
depositTxId?: string;
|
|
153
157
|
withdrawalTxId?: string;
|
|
154
158
|
withdrawalTxIds?: string[];
|
|
155
159
|
brokerId?: string;
|
|
156
|
-
conversionRateUSD
|
|
157
|
-
conversionRateUSDWithMarkups
|
|
160
|
+
conversionRateUSD?: number;
|
|
161
|
+
conversionRateUSDWithMarkups?: number;
|
|
158
162
|
actualConversionRateUSD?: number;
|
|
159
163
|
notes?: string;
|
|
160
164
|
discount?: number;
|
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,
|
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",
|