@riocrypto/common-server 1.0.2073 → 1.0.2075
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 { Fiat, Crypto } from "@riocrypto/common";
|
|
1
|
+
import { Fiat, Crypto, Country } from "@riocrypto/common";
|
|
2
2
|
import { PreSettlementTransactionType } from "@riocrypto/common";
|
|
3
3
|
import mongoose from "mongoose";
|
|
4
4
|
interface PreSettlementTransactionAttrs {
|
|
@@ -6,6 +6,7 @@ interface PreSettlementTransactionAttrs {
|
|
|
6
6
|
type: PreSettlementTransactionType;
|
|
7
7
|
amount: number;
|
|
8
8
|
currency: Fiat | Crypto;
|
|
9
|
+
country: Country;
|
|
9
10
|
orderId?: string;
|
|
10
11
|
}
|
|
11
12
|
interface PreSettlementTransactionDoc extends mongoose.Document {
|
|
@@ -13,6 +14,7 @@ interface PreSettlementTransactionDoc extends mongoose.Document {
|
|
|
13
14
|
type: PreSettlementTransactionType;
|
|
14
15
|
amount: number;
|
|
15
16
|
currency: Fiat | Crypto;
|
|
17
|
+
country: Country;
|
|
16
18
|
orderId?: string;
|
|
17
19
|
}
|
|
18
20
|
interface PreSettlementTransactionModel extends mongoose.Model<PreSettlementTransactionDoc> {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildPreSettlementTransaction = void 0;
|
|
4
4
|
const common_1 = require("@riocrypto/common");
|
|
5
|
+
const common_2 = require("@riocrypto/common");
|
|
5
6
|
const buildPreSettlementTransaction = (mongoose) => {
|
|
6
7
|
// if model is already defined, return it
|
|
7
8
|
if (mongoose.models.PreSettlementTransaction) {
|
|
@@ -13,7 +14,7 @@ const buildPreSettlementTransaction = (mongoose) => {
|
|
|
13
14
|
},
|
|
14
15
|
type: {
|
|
15
16
|
type: String,
|
|
16
|
-
enum: Object.values(
|
|
17
|
+
enum: Object.values(common_2.PreSettlementTransactionType),
|
|
17
18
|
},
|
|
18
19
|
amount: {
|
|
19
20
|
type: Number,
|
|
@@ -21,6 +22,10 @@ const buildPreSettlementTransaction = (mongoose) => {
|
|
|
21
22
|
currency: {
|
|
22
23
|
type: String,
|
|
23
24
|
},
|
|
25
|
+
country: {
|
|
26
|
+
type: String,
|
|
27
|
+
enum: Object.values(common_1.Country),
|
|
28
|
+
},
|
|
24
29
|
orderId: {
|
|
25
30
|
type: String,
|
|
26
31
|
},
|
package/build/models/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier, ImmigrationStatus, Country, Fiat } from "@riocrypto/common";
|
|
1
|
+
import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier, ImmigrationStatus, Country, Fiat, Crypto, PreSettlementTransactionType } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface UserAttrs {
|
|
4
4
|
createdAt: Date;
|
|
@@ -124,6 +124,11 @@ interface UserAttrs {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
attioRecordId?: string;
|
|
127
|
+
preSettlementTransactions?: {
|
|
128
|
+
[transactionType in PreSettlementTransactionType]?: {
|
|
129
|
+
[currency in Fiat | Crypto]?: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
127
132
|
}
|
|
128
133
|
interface UserModel extends Model<UserDoc> {
|
|
129
134
|
build(attrs: UserAttrs): UserDoc;
|
|
@@ -253,6 +258,11 @@ interface UserDoc extends Document {
|
|
|
253
258
|
};
|
|
254
259
|
};
|
|
255
260
|
};
|
|
261
|
+
preSettlementTransactions?: {
|
|
262
|
+
[transactionType in PreSettlementTransactionType]?: {
|
|
263
|
+
[currency in Fiat | Crypto]?: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
256
266
|
}
|
|
257
267
|
declare const buildUser: (mongoose: Mongoose) => UserModel;
|
|
258
268
|
export { buildUser, UserDoc, UserAttrs };
|
package/build/models/user.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.2075",
|
|
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.1816",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|