@riocrypto/common-server 1.0.1596 → 1.0.1598
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/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/models/rio-bank-account.d.ts +37 -0
- package/build/models/rio-bank-account.js +67 -0
- package/build/models/user.d.ts +11 -1
- package/build/models/user.js +27 -0
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export * from "./models/telegram-session";
|
|
|
53
53
|
export * from "./models/UBO";
|
|
54
54
|
export * from "./models/temporary-verification";
|
|
55
55
|
export * from "./models/bid";
|
|
56
|
+
export * from "./models/rio-bank-account";
|
|
56
57
|
export * from "./clients/bitstamp-client";
|
|
57
58
|
export * from "./clients/ccxt-client";
|
|
58
59
|
export * from "./clients/slack-client";
|
package/build/index.js
CHANGED
|
@@ -69,6 +69,7 @@ __exportStar(require("./models/telegram-session"), exports);
|
|
|
69
69
|
__exportStar(require("./models/UBO"), exports);
|
|
70
70
|
__exportStar(require("./models/temporary-verification"), exports);
|
|
71
71
|
__exportStar(require("./models/bid"), exports);
|
|
72
|
+
__exportStar(require("./models/rio-bank-account"), exports);
|
|
72
73
|
__exportStar(require("./clients/bitstamp-client"), exports);
|
|
73
74
|
__exportStar(require("./clients/ccxt-client"), exports);
|
|
74
75
|
__exportStar(require("./clients/slack-client"), exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Country, Fiat } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface RioBankAccountAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
country: Country;
|
|
6
|
+
fiat: Fiat;
|
|
7
|
+
bankName?: string;
|
|
8
|
+
companyName?: string;
|
|
9
|
+
companyAddress?: string;
|
|
10
|
+
bankAddress?: string;
|
|
11
|
+
accountNumber?: string;
|
|
12
|
+
routingNumber?: string;
|
|
13
|
+
CLABE?: string;
|
|
14
|
+
RUC?: string;
|
|
15
|
+
RFC?: string;
|
|
16
|
+
CCI?: string;
|
|
17
|
+
}
|
|
18
|
+
interface RioBankAccountDoc extends Document {
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
country: Country;
|
|
21
|
+
fiat: Fiat;
|
|
22
|
+
bankName?: string;
|
|
23
|
+
companyName?: string;
|
|
24
|
+
companyAddress?: string;
|
|
25
|
+
bankAddress?: string;
|
|
26
|
+
accountNumber?: string;
|
|
27
|
+
routingNumber?: string;
|
|
28
|
+
CLABE?: string;
|
|
29
|
+
RUC?: string;
|
|
30
|
+
RFC?: string;
|
|
31
|
+
CCI?: string;
|
|
32
|
+
}
|
|
33
|
+
interface RioBankAccountModel extends Model<RioBankAccountDoc> {
|
|
34
|
+
build(attrs: RioBankAccountAttrs): RioBankAccountDoc;
|
|
35
|
+
}
|
|
36
|
+
declare const buildRioBankAccount: (mongoose: Mongoose) => RioBankAccountModel;
|
|
37
|
+
export { buildRioBankAccount, RioBankAccountDoc, RioBankAccountAttrs };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildRioBankAccount = void 0;
|
|
4
|
+
const buildRioBankAccount = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.RioBankAccount) {
|
|
7
|
+
return mongoose.model("RioBankAccount");
|
|
8
|
+
}
|
|
9
|
+
const RioBankAccountSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
country: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
fiat: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
bankName: {
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
25
|
+
companyName: {
|
|
26
|
+
type: String,
|
|
27
|
+
},
|
|
28
|
+
companyAddress: {
|
|
29
|
+
type: String,
|
|
30
|
+
},
|
|
31
|
+
bankAddress: {
|
|
32
|
+
type: String,
|
|
33
|
+
},
|
|
34
|
+
accountNumber: {
|
|
35
|
+
type: String,
|
|
36
|
+
},
|
|
37
|
+
routingNumber: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
CLABE: {
|
|
41
|
+
type: String,
|
|
42
|
+
},
|
|
43
|
+
RUC: {
|
|
44
|
+
type: String,
|
|
45
|
+
},
|
|
46
|
+
RFC: {
|
|
47
|
+
type: String,
|
|
48
|
+
},
|
|
49
|
+
CCI: {
|
|
50
|
+
type: String,
|
|
51
|
+
},
|
|
52
|
+
}, {
|
|
53
|
+
toJSON: {
|
|
54
|
+
transform(doc, ret) {
|
|
55
|
+
ret.id = ret._id.valueOf();
|
|
56
|
+
delete ret._id;
|
|
57
|
+
delete ret.__v;
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
RioBankAccountSchema.statics.build = (attrs) => {
|
|
62
|
+
return new RioBankAccount(attrs);
|
|
63
|
+
};
|
|
64
|
+
const RioBankAccount = mongoose.model("RioBankAccount", RioBankAccountSchema);
|
|
65
|
+
return RioBankAccount;
|
|
66
|
+
};
|
|
67
|
+
exports.buildRioBankAccount = buildRioBankAccount;
|
package/build/models/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier, ImmigrationStatus } from "@riocrypto/common";
|
|
1
|
+
import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier, ImmigrationStatus, Country } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface UserAttrs {
|
|
4
4
|
createdAt: Date;
|
|
@@ -96,6 +96,11 @@ interface UserAttrs {
|
|
|
96
96
|
};
|
|
97
97
|
quotationTime?: number;
|
|
98
98
|
referrerId?: string;
|
|
99
|
+
rioBankAccount?: {
|
|
100
|
+
[country in Country]?: {
|
|
101
|
+
id: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
99
104
|
}
|
|
100
105
|
interface UserModel extends Model<UserDoc> {
|
|
101
106
|
build(attrs: UserAttrs): UserDoc;
|
|
@@ -197,6 +202,11 @@ interface UserDoc extends Document {
|
|
|
197
202
|
};
|
|
198
203
|
quotationTime?: number;
|
|
199
204
|
referrerId?: string;
|
|
205
|
+
rioBankAccount?: {
|
|
206
|
+
[country in Country]?: {
|
|
207
|
+
id: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
200
210
|
}
|
|
201
211
|
declare const buildUser: (mongoose: Mongoose) => UserModel;
|
|
202
212
|
export { buildUser, UserDoc, UserAttrs };
|
package/build/models/user.js
CHANGED
|
@@ -227,6 +227,33 @@ const buildUser = (mongoose) => {
|
|
|
227
227
|
type: String,
|
|
228
228
|
},
|
|
229
229
|
],
|
|
230
|
+
rioBankAccount: {
|
|
231
|
+
MX: {
|
|
232
|
+
id: {
|
|
233
|
+
type: String,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
US: {
|
|
237
|
+
id: {
|
|
238
|
+
type: String,
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
PE: {
|
|
242
|
+
id: {
|
|
243
|
+
type: String,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
CO: {
|
|
247
|
+
id: {
|
|
248
|
+
type: String,
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
BR: {
|
|
252
|
+
id: {
|
|
253
|
+
type: String,
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
},
|
|
230
257
|
referrerId: {
|
|
231
258
|
type: String,
|
|
232
259
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1598",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
29
|
"@google-cloud/vision": "^4.0.2",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.4.2",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.1436",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.6.0",
|
|
34
34
|
"ccxt": "^3.0.30",
|