@riocrypto/common-server 1.0.1414 → 1.0.1416
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/ubo.d.ts +98 -0
- package/build/models/ubo.js +57 -0
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export * from "./models/circle-address-book-recipient";
|
|
|
41
41
|
export * from "./models/circle-payout";
|
|
42
42
|
export * from "./models/market-data";
|
|
43
43
|
export * from "./models/telegram-session";
|
|
44
|
+
export * from "./models/ubo";
|
|
44
45
|
export * from "./clients/bitstamp-client";
|
|
45
46
|
export * from "./clients/ccxt-client";
|
|
46
47
|
export * from "./clients/slack-client";
|
package/build/index.js
CHANGED
|
@@ -57,6 +57,7 @@ __exportStar(require("./models/circle-address-book-recipient"), exports);
|
|
|
57
57
|
__exportStar(require("./models/circle-payout"), exports);
|
|
58
58
|
__exportStar(require("./models/market-data"), exports);
|
|
59
59
|
__exportStar(require("./models/telegram-session"), exports);
|
|
60
|
+
__exportStar(require("./models/ubo"), exports);
|
|
60
61
|
__exportStar(require("./clients/bitstamp-client"), exports);
|
|
61
62
|
__exportStar(require("./clients/ccxt-client"), exports);
|
|
62
63
|
__exportStar(require("./clients/slack-client"), exports);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { OnboardingStatus, CountryOfOrigin } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface UBOAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
individualData?: {
|
|
6
|
+
firstName: string;
|
|
7
|
+
middleName?: string;
|
|
8
|
+
lastName: string;
|
|
9
|
+
secondLastName?: string;
|
|
10
|
+
birthday: Date;
|
|
11
|
+
countryOfOrigin: CountryOfOrigin;
|
|
12
|
+
};
|
|
13
|
+
phoneNumber: string;
|
|
14
|
+
email: string;
|
|
15
|
+
birthday?: Date;
|
|
16
|
+
associatedUserId?: string;
|
|
17
|
+
onboarding?: {
|
|
18
|
+
[country in CountryOfOrigin]?: {
|
|
19
|
+
status?: OnboardingStatus;
|
|
20
|
+
personalId?: string;
|
|
21
|
+
taxId?: string;
|
|
22
|
+
isResident?: boolean;
|
|
23
|
+
individualIdentityVerification?: {
|
|
24
|
+
status?: "passed" | "failed" | "review";
|
|
25
|
+
};
|
|
26
|
+
files?: {
|
|
27
|
+
certificateOfIncorporation?: string;
|
|
28
|
+
KYCReport?: string;
|
|
29
|
+
taxTranscript?: string;
|
|
30
|
+
proofOfAddress?: string;
|
|
31
|
+
businessRegistration?: string;
|
|
32
|
+
taxIdentificationCertificate?: string;
|
|
33
|
+
legalRepresentativeIdPowerOfAttorney?: string;
|
|
34
|
+
personalIdentificationCertificate?: string;
|
|
35
|
+
extraFiles?: string[];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
address: {
|
|
40
|
+
street1: string;
|
|
41
|
+
street2?: string;
|
|
42
|
+
city: string;
|
|
43
|
+
state: string;
|
|
44
|
+
postalCode: string;
|
|
45
|
+
country: CountryOfOrigin;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
interface UBOModel extends Model<UBODoc> {
|
|
49
|
+
build(attrs: UBOAttrs): UBODoc;
|
|
50
|
+
}
|
|
51
|
+
interface UBODoc extends Document {
|
|
52
|
+
_id: string;
|
|
53
|
+
createdAt: Date;
|
|
54
|
+
individualData?: {
|
|
55
|
+
firstName: string;
|
|
56
|
+
middleName?: string;
|
|
57
|
+
lastName: string;
|
|
58
|
+
secondLastName?: string;
|
|
59
|
+
birthday: Date;
|
|
60
|
+
countryOfOrigin: CountryOfOrigin;
|
|
61
|
+
};
|
|
62
|
+
phoneNumber: string;
|
|
63
|
+
email: string;
|
|
64
|
+
birthday?: Date;
|
|
65
|
+
associatedUserId?: string;
|
|
66
|
+
onboarding?: {
|
|
67
|
+
[country in CountryOfOrigin]?: {
|
|
68
|
+
status?: OnboardingStatus;
|
|
69
|
+
personalId?: string;
|
|
70
|
+
taxId?: string;
|
|
71
|
+
isResident?: boolean;
|
|
72
|
+
individualIdentityVerification?: {
|
|
73
|
+
status?: "passed" | "failed" | "review";
|
|
74
|
+
};
|
|
75
|
+
files?: {
|
|
76
|
+
certificateOfIncorporation?: string;
|
|
77
|
+
KYCReport?: string;
|
|
78
|
+
taxTranscript?: string;
|
|
79
|
+
proofOfAddress?: string;
|
|
80
|
+
businessRegistration?: string;
|
|
81
|
+
taxIdentificationCertificate?: string;
|
|
82
|
+
legalRepresentativeIdPowerOfAttorney?: string;
|
|
83
|
+
personalIdentificationCertificate?: string;
|
|
84
|
+
extraFiles?: string[];
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
address: {
|
|
89
|
+
street1: string;
|
|
90
|
+
street2?: string;
|
|
91
|
+
city: string;
|
|
92
|
+
state: string;
|
|
93
|
+
postalCode: string;
|
|
94
|
+
country: CountryOfOrigin;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
declare const buildUBO: (mongoose: Mongoose) => UBOModel;
|
|
98
|
+
export { buildUBO, UBODoc };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildUBO = void 0;
|
|
4
|
+
const buildUBO = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.UBO) {
|
|
7
|
+
return mongoose.model("UBO");
|
|
8
|
+
}
|
|
9
|
+
const UBOSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: mongoose.Schema.Types.Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
individualData: {
|
|
15
|
+
type: mongoose.Schema.Types.Mixed,
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
phoneNumber: {
|
|
19
|
+
type: mongoose.Schema.Types.String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
email: {
|
|
23
|
+
type: mongoose.Schema.Types.String,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
birthday: {
|
|
27
|
+
type: mongoose.Schema.Types.Date,
|
|
28
|
+
required: false,
|
|
29
|
+
},
|
|
30
|
+
associatedUserId: {
|
|
31
|
+
type: mongoose.Schema.Types.String,
|
|
32
|
+
required: false,
|
|
33
|
+
},
|
|
34
|
+
onboarding: {
|
|
35
|
+
type: mongoose.Schema.Types.Mixed,
|
|
36
|
+
required: false,
|
|
37
|
+
},
|
|
38
|
+
address: {
|
|
39
|
+
type: mongoose.Schema.Types.Mixed,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
}, {
|
|
43
|
+
toJSON: {
|
|
44
|
+
transform(doc, ret) {
|
|
45
|
+
ret.id = ret._id.valueOf();
|
|
46
|
+
delete ret._id;
|
|
47
|
+
delete ret.__v;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
UBOSchema.statics.build = (attrs) => {
|
|
52
|
+
return new UBO(attrs);
|
|
53
|
+
};
|
|
54
|
+
const UBO = mongoose.model("UBO", UBOSchema);
|
|
55
|
+
return UBO;
|
|
56
|
+
};
|
|
57
|
+
exports.buildUBO = buildUBO;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1416",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
29
|
"@google-cloud/vision": "^4.0.2",
|
|
30
|
-
"@riocrypto/common": "^1.0.
|
|
30
|
+
"@riocrypto/common": "^1.0.1250",
|
|
31
31
|
"@types/express": "^4.17.13",
|
|
32
32
|
"axios": "^0.27.2",
|
|
33
33
|
"ccxt": "^3.0.30",
|