@riocrypto/common-server 1.0.1152 → 1.0.1154
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.
|
@@ -3,16 +3,16 @@ import { Mongoose, Model, Document } from "mongoose";
|
|
|
3
3
|
interface ChainedOrderAttrs {
|
|
4
4
|
userId: string;
|
|
5
5
|
crypto: Crypto;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
originFiat: Fiat;
|
|
7
|
+
destinationFiat: Fiat;
|
|
8
|
+
originCountry: Country;
|
|
9
|
+
destinationCountry: Country;
|
|
10
|
+
originAmountFiat: number;
|
|
11
|
+
destinationAmountFiat: number;
|
|
12
|
+
originOrderId: string;
|
|
13
|
+
destinationOrderId: string;
|
|
14
|
+
originOrderStatus: OrderStatus;
|
|
15
|
+
destinationOrderStatus: OrderStatus;
|
|
16
16
|
fees: Fees;
|
|
17
17
|
netPrice: number;
|
|
18
18
|
createdAt: Date;
|
|
@@ -21,16 +21,16 @@ interface ChainedOrderAttrs {
|
|
|
21
21
|
interface ChainedOrderDoc extends Document {
|
|
22
22
|
userId: string;
|
|
23
23
|
crypto: Crypto;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
originFiat: Fiat;
|
|
25
|
+
destinationFiat: Fiat;
|
|
26
|
+
originCountry: Country;
|
|
27
|
+
destinationCountry: Country;
|
|
28
|
+
originAmountFiat: number;
|
|
29
|
+
destinationAmountFiat: number;
|
|
30
|
+
originOrderId: string;
|
|
31
|
+
destinationOrderId: string;
|
|
32
|
+
originOrderStatus: OrderStatus;
|
|
33
|
+
destinationOrderStatus: OrderStatus;
|
|
34
34
|
fees: Fees;
|
|
35
35
|
netPrice: number;
|
|
36
36
|
createdAt: Date;
|
|
@@ -15,43 +15,43 @@ const buildChainedOrder = (mongoose) => {
|
|
|
15
15
|
type: String,
|
|
16
16
|
required: true,
|
|
17
17
|
},
|
|
18
|
-
|
|
18
|
+
originFiat: {
|
|
19
19
|
type: String,
|
|
20
20
|
required: true,
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
destinationFiat: {
|
|
23
23
|
type: String,
|
|
24
24
|
required: true,
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
originCountry: {
|
|
27
27
|
type: String,
|
|
28
28
|
required: true,
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
destinationCountry: {
|
|
31
31
|
type: String,
|
|
32
32
|
required: true,
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
originAmountFiat: {
|
|
35
35
|
type: Number,
|
|
36
36
|
required: true,
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
destinationAmountFiat: {
|
|
39
39
|
type: Number,
|
|
40
40
|
required: true,
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
originOrderId: {
|
|
43
43
|
type: String,
|
|
44
44
|
required: true,
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
destinationOrderId: {
|
|
47
47
|
type: String,
|
|
48
48
|
required: true,
|
|
49
49
|
},
|
|
50
|
-
|
|
50
|
+
originOrderStatus: {
|
|
51
51
|
type: String,
|
|
52
52
|
required: true,
|
|
53
53
|
},
|
|
54
|
-
|
|
54
|
+
destinationOrderStatus: {
|
|
55
55
|
type: String,
|
|
56
56
|
required: true,
|
|
57
57
|
},
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { Country, Fees, Fiat, Crypto } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface ChainedQuoteAttrs {
|
|
4
|
-
|
|
4
|
+
originUserId: string;
|
|
5
|
+
destinationUserId: string;
|
|
5
6
|
crypto: Crypto;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
originFiat: Fiat;
|
|
8
|
+
destinationFiat: Fiat;
|
|
8
9
|
expiresAt: Date;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
originCountry: Country;
|
|
11
|
+
destinationCountry: Country;
|
|
12
|
+
originAmountFiat: number;
|
|
13
|
+
destinationAmountFiat: number;
|
|
14
|
+
originQuoteId: string;
|
|
15
|
+
destinationQuoteId: string;
|
|
15
16
|
fees: Fees;
|
|
16
17
|
netPrice: number;
|
|
17
18
|
createdAt: Date;
|
|
18
19
|
brokerId?: string;
|
|
19
20
|
}
|
|
20
21
|
interface ChainedQuoteDoc extends Document {
|
|
21
|
-
|
|
22
|
+
originUserId: string;
|
|
23
|
+
destinationUserId: string;
|
|
22
24
|
crypto: Crypto;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
originFiat: Fiat;
|
|
26
|
+
destinationFiat: Fiat;
|
|
25
27
|
expiresAt: Date;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
originCountry: Country;
|
|
29
|
+
destinationCountry: Country;
|
|
30
|
+
originAmountFiat: number;
|
|
31
|
+
destinationAmountFiat: number;
|
|
32
|
+
originQuoteId: string;
|
|
33
|
+
destinationQuoteId: string;
|
|
32
34
|
fees: Fees;
|
|
33
35
|
netPrice: number;
|
|
34
36
|
createdAt: Date;
|
|
@@ -7,7 +7,11 @@ const buildChainedQuote = (mongoose) => {
|
|
|
7
7
|
return mongoose.model("ChainedQuote");
|
|
8
8
|
}
|
|
9
9
|
const ChainedQuoteSchema = new mongoose.Schema({
|
|
10
|
-
|
|
10
|
+
originUserId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
destinationUserId: {
|
|
11
15
|
type: String,
|
|
12
16
|
required: true,
|
|
13
17
|
},
|
|
@@ -15,11 +19,11 @@ const buildChainedQuote = (mongoose) => {
|
|
|
15
19
|
type: String,
|
|
16
20
|
required: true,
|
|
17
21
|
},
|
|
18
|
-
|
|
22
|
+
originFiat: {
|
|
19
23
|
type: String,
|
|
20
24
|
required: true,
|
|
21
25
|
},
|
|
22
|
-
|
|
26
|
+
destinationFiat: {
|
|
23
27
|
type: String,
|
|
24
28
|
required: true,
|
|
25
29
|
},
|
|
@@ -27,27 +31,27 @@ const buildChainedQuote = (mongoose) => {
|
|
|
27
31
|
type: mongoose.Schema.Types.Date,
|
|
28
32
|
required: true,
|
|
29
33
|
},
|
|
30
|
-
|
|
34
|
+
originCountry: {
|
|
31
35
|
type: String,
|
|
32
36
|
required: true,
|
|
33
37
|
},
|
|
34
|
-
|
|
38
|
+
destinationCountry: {
|
|
35
39
|
type: String,
|
|
36
40
|
required: true,
|
|
37
41
|
},
|
|
38
|
-
|
|
42
|
+
originAmountFiat: {
|
|
39
43
|
type: Number,
|
|
40
44
|
required: true,
|
|
41
45
|
},
|
|
42
|
-
|
|
46
|
+
destinationAmountFiat: {
|
|
43
47
|
type: Number,
|
|
44
48
|
required: true,
|
|
45
49
|
},
|
|
46
|
-
|
|
50
|
+
originQuoteId: {
|
|
47
51
|
type: String,
|
|
48
52
|
required: true,
|
|
49
53
|
},
|
|
50
|
-
|
|
54
|
+
destinationQuoteId: {
|
|
51
55
|
type: String,
|
|
52
56
|
required: true,
|
|
53
57
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1154",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
27
27
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
|
-
"@riocrypto/common": "^1.0.
|
|
29
|
+
"@riocrypto/common": "^1.0.1001",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^0.27.2",
|
|
32
32
|
"ccxt": "^3.0.30",
|