@riocrypto/common-server 1.0.1390 → 1.0.1392
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/user.d.ts +94 -22
- package/build/models/user.js +33 -35
- package/package.json +1 -1
package/build/models/user.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { KYCStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier } from "@riocrypto/common";
|
|
1
|
+
import { Country, KYCStatus, Language, PlatformFeeRange, USState, UserAttribute, UserType, CountryOfOrigin, RiskTier } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface UserAttrs {
|
|
4
4
|
createdAt: Date;
|
|
5
5
|
authIds?: string[];
|
|
6
|
-
brokerId?: string;
|
|
7
|
-
type: UserType;
|
|
8
|
-
phoneNumber: string;
|
|
9
|
-
email: string;
|
|
10
6
|
individualData?: {
|
|
11
7
|
firstName: string;
|
|
12
8
|
middleName?: string;
|
|
@@ -20,18 +16,45 @@ interface UserAttrs {
|
|
|
20
16
|
legalRepresentative?: {
|
|
21
17
|
name: string;
|
|
22
18
|
status?: string;
|
|
19
|
+
email?: string;
|
|
23
20
|
};
|
|
24
21
|
UBO?: {
|
|
25
|
-
name: string;
|
|
26
22
|
id?: string;
|
|
23
|
+
name: string;
|
|
27
24
|
status?: string;
|
|
25
|
+
email?: string;
|
|
28
26
|
};
|
|
29
27
|
};
|
|
30
28
|
risk: RiskTier;
|
|
29
|
+
type: UserType;
|
|
30
|
+
phoneNumber: string;
|
|
31
|
+
email: string;
|
|
32
|
+
street1: string;
|
|
33
|
+
street2?: string;
|
|
34
|
+
city: string;
|
|
35
|
+
state: USState | string;
|
|
36
|
+
postalCode: string;
|
|
37
|
+
country: CountryOfOrigin;
|
|
38
|
+
kycStatus: KYCStatus;
|
|
31
39
|
hasPassedEDD: boolean;
|
|
40
|
+
firstName?: string;
|
|
41
|
+
middleName?: string;
|
|
42
|
+
lastName?: string;
|
|
43
|
+
secondLastName?: string;
|
|
44
|
+
companyName?: string;
|
|
45
|
+
birthday?: Date;
|
|
32
46
|
cosignerGroupId?: string;
|
|
47
|
+
legalRepresentative?: string;
|
|
48
|
+
cpf?: string;
|
|
49
|
+
CPF?: string;
|
|
50
|
+
language?: Language;
|
|
33
51
|
attributes?: UserAttribute[];
|
|
34
|
-
|
|
52
|
+
brokerId?: string;
|
|
53
|
+
curp?: string;
|
|
54
|
+
ruc?: string;
|
|
55
|
+
CURP?: string;
|
|
56
|
+
RUC?: string;
|
|
57
|
+
economicActivity?: string;
|
|
35
58
|
platformFeeRanges?: {
|
|
36
59
|
MX?: {
|
|
37
60
|
buy?: PlatformFeeRange[];
|
|
@@ -54,11 +77,24 @@ interface UserAttrs {
|
|
|
54
77
|
sell?: PlatformFeeRange[];
|
|
55
78
|
};
|
|
56
79
|
};
|
|
80
|
+
COIFile?: string;
|
|
81
|
+
KYCReportFile?: string;
|
|
82
|
+
CSFFile?: string;
|
|
83
|
+
proofOfAddressFile?: string;
|
|
84
|
+
authorizedPhoneNumbers?: string[];
|
|
85
|
+
notificationUrl?: string;
|
|
86
|
+
rfc?: string;
|
|
87
|
+
RFC?: string;
|
|
88
|
+
countriesToInvoice?: Country[];
|
|
89
|
+
mexicoFiscalRegimenCode?: number;
|
|
90
|
+
mexicoFiscalName?: string;
|
|
91
|
+
taxId?: string;
|
|
92
|
+
usKYCStatus?: "none" | "pending" | "failed" | "approved";
|
|
57
93
|
KYC?: {
|
|
58
94
|
MX?: {
|
|
59
|
-
status
|
|
95
|
+
status?: KYCStatus;
|
|
60
96
|
personalId?: string;
|
|
61
|
-
taxId
|
|
97
|
+
taxId?: string;
|
|
62
98
|
files?: {
|
|
63
99
|
certificateOfIncorporation?: string;
|
|
64
100
|
kycReport?: string;
|
|
@@ -72,7 +108,7 @@ interface UserAttrs {
|
|
|
72
108
|
};
|
|
73
109
|
};
|
|
74
110
|
PE?: {
|
|
75
|
-
status
|
|
111
|
+
status?: KYCStatus;
|
|
76
112
|
personalId?: string;
|
|
77
113
|
taxId?: string;
|
|
78
114
|
files?: {
|
|
@@ -88,7 +124,7 @@ interface UserAttrs {
|
|
|
88
124
|
};
|
|
89
125
|
};
|
|
90
126
|
US?: {
|
|
91
|
-
status
|
|
127
|
+
status?: KYCStatus;
|
|
92
128
|
personalId?: string;
|
|
93
129
|
taxId?: string;
|
|
94
130
|
files?: {
|
|
@@ -137,10 +173,6 @@ interface UserDoc extends Document {
|
|
|
137
173
|
_id: string;
|
|
138
174
|
createdAt: Date;
|
|
139
175
|
authIds?: string[];
|
|
140
|
-
brokerId?: string;
|
|
141
|
-
type: UserType;
|
|
142
|
-
phoneNumber: string;
|
|
143
|
-
email: string;
|
|
144
176
|
individualData?: {
|
|
145
177
|
firstName: string;
|
|
146
178
|
middleName?: string;
|
|
@@ -153,19 +185,46 @@ interface UserDoc extends Document {
|
|
|
153
185
|
businessName: string;
|
|
154
186
|
legalRepresentative?: {
|
|
155
187
|
name: string;
|
|
188
|
+
email?: string;
|
|
156
189
|
status?: string;
|
|
157
190
|
};
|
|
158
191
|
UBO?: {
|
|
159
|
-
name: string;
|
|
160
192
|
id?: string;
|
|
193
|
+
name: string;
|
|
194
|
+
email?: string;
|
|
161
195
|
status?: string;
|
|
162
196
|
};
|
|
163
197
|
};
|
|
164
198
|
risk: RiskTier;
|
|
199
|
+
type: UserType;
|
|
200
|
+
phoneNumber: string;
|
|
201
|
+
email: string;
|
|
202
|
+
street1: string;
|
|
203
|
+
street2?: string;
|
|
204
|
+
city: string;
|
|
205
|
+
state: USState | string;
|
|
206
|
+
postalCode: string;
|
|
207
|
+
country: CountryOfOrigin;
|
|
208
|
+
kycStatus: KYCStatus;
|
|
165
209
|
hasPassedEDD: boolean;
|
|
210
|
+
firstName?: string;
|
|
211
|
+
middleName?: string;
|
|
212
|
+
lastName?: string;
|
|
213
|
+
secondLastName?: string;
|
|
214
|
+
companyName?: string;
|
|
215
|
+
birthday?: Date;
|
|
166
216
|
cosignerGroupId?: string;
|
|
217
|
+
legalRepresentative?: string;
|
|
218
|
+
cpf?: string;
|
|
219
|
+
CPF?: string;
|
|
220
|
+
language?: Language;
|
|
167
221
|
attributes?: UserAttribute[];
|
|
168
|
-
|
|
222
|
+
brokerId?: string;
|
|
223
|
+
curp?: string;
|
|
224
|
+
ruc?: string;
|
|
225
|
+
CURP?: string;
|
|
226
|
+
RUC?: string;
|
|
227
|
+
economicActivity?: string;
|
|
169
228
|
platformFeeRanges?: {
|
|
170
229
|
MX?: {
|
|
171
230
|
buy?: PlatformFeeRange[];
|
|
@@ -188,11 +247,24 @@ interface UserDoc extends Document {
|
|
|
188
247
|
sell?: PlatformFeeRange[];
|
|
189
248
|
};
|
|
190
249
|
};
|
|
250
|
+
COIFile?: string;
|
|
251
|
+
KYCReportFile?: string;
|
|
252
|
+
CSFFile?: string;
|
|
253
|
+
proofOfAddressFile?: string;
|
|
254
|
+
authorizedPhoneNumbers?: string[];
|
|
255
|
+
notificationUrl?: string;
|
|
256
|
+
rfc?: string;
|
|
257
|
+
RFC?: string;
|
|
258
|
+
countriesToInvoice?: Country[];
|
|
259
|
+
mexicoFiscalRegimenCode?: number;
|
|
260
|
+
mexicoFiscalName?: string;
|
|
261
|
+
taxId?: string;
|
|
262
|
+
usKYCStatus?: "none" | "pending" | "failed" | "approved";
|
|
191
263
|
KYC?: {
|
|
192
264
|
MX?: {
|
|
193
|
-
status
|
|
265
|
+
status?: KYCStatus;
|
|
194
266
|
personalId?: string;
|
|
195
|
-
taxId
|
|
267
|
+
taxId?: string;
|
|
196
268
|
files?: {
|
|
197
269
|
certificateOfIncorporation?: string;
|
|
198
270
|
kycReport?: string;
|
|
@@ -206,7 +278,7 @@ interface UserDoc extends Document {
|
|
|
206
278
|
};
|
|
207
279
|
};
|
|
208
280
|
PE?: {
|
|
209
|
-
status
|
|
281
|
+
status?: KYCStatus;
|
|
210
282
|
personalId?: string;
|
|
211
283
|
taxId?: string;
|
|
212
284
|
files?: {
|
|
@@ -222,7 +294,7 @@ interface UserDoc extends Document {
|
|
|
222
294
|
};
|
|
223
295
|
};
|
|
224
296
|
US?: {
|
|
225
|
-
status
|
|
297
|
+
status?: KYCStatus;
|
|
226
298
|
personalId?: string;
|
|
227
299
|
taxId?: string;
|
|
228
300
|
files?: {
|
|
@@ -232,7 +304,7 @@ interface UserDoc extends Document {
|
|
|
232
304
|
};
|
|
233
305
|
};
|
|
234
306
|
BR?: {
|
|
235
|
-
status
|
|
307
|
+
status?: KYCStatus;
|
|
236
308
|
personalId?: string;
|
|
237
309
|
taxId?: string;
|
|
238
310
|
files?: {
|
package/build/models/user.js
CHANGED
|
@@ -110,14 +110,6 @@ const buildUser = (mongoose) => {
|
|
|
110
110
|
type: String,
|
|
111
111
|
required: true,
|
|
112
112
|
},
|
|
113
|
-
status: {
|
|
114
|
-
local: {
|
|
115
|
-
type: String,
|
|
116
|
-
},
|
|
117
|
-
US: {
|
|
118
|
-
type: String,
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
113
|
brokerId: {
|
|
122
114
|
type: String,
|
|
123
115
|
},
|
|
@@ -316,33 +308,6 @@ const buildUser = (mongoose) => {
|
|
|
316
308
|
type: String,
|
|
317
309
|
},
|
|
318
310
|
],
|
|
319
|
-
notificationUrl: {
|
|
320
|
-
type: String,
|
|
321
|
-
},
|
|
322
|
-
rfc: {
|
|
323
|
-
type: String,
|
|
324
|
-
},
|
|
325
|
-
ruc: {
|
|
326
|
-
type: String,
|
|
327
|
-
},
|
|
328
|
-
RFC: {
|
|
329
|
-
type: String,
|
|
330
|
-
},
|
|
331
|
-
RUC: {
|
|
332
|
-
type: String,
|
|
333
|
-
},
|
|
334
|
-
mexicoFiscalRegimenCode: {
|
|
335
|
-
type: Number,
|
|
336
|
-
},
|
|
337
|
-
mexicoFiscalName: {
|
|
338
|
-
type: String,
|
|
339
|
-
},
|
|
340
|
-
taxId: {
|
|
341
|
-
type: String,
|
|
342
|
-
},
|
|
343
|
-
usKYCStatus: {
|
|
344
|
-
type: String,
|
|
345
|
-
},
|
|
346
311
|
address: {
|
|
347
312
|
street1: {
|
|
348
313
|
type: String,
|
|
@@ -545,6 +510,9 @@ const buildUser = (mongoose) => {
|
|
|
545
510
|
name: {
|
|
546
511
|
type: String,
|
|
547
512
|
},
|
|
513
|
+
email: {
|
|
514
|
+
type: String,
|
|
515
|
+
},
|
|
548
516
|
status: {
|
|
549
517
|
type: String,
|
|
550
518
|
},
|
|
@@ -553,6 +521,9 @@ const buildUser = (mongoose) => {
|
|
|
553
521
|
name: {
|
|
554
522
|
type: String,
|
|
555
523
|
},
|
|
524
|
+
email: {
|
|
525
|
+
type: String,
|
|
526
|
+
},
|
|
556
527
|
id: {
|
|
557
528
|
type: String,
|
|
558
529
|
},
|
|
@@ -581,6 +552,33 @@ const buildUser = (mongoose) => {
|
|
|
581
552
|
type: String,
|
|
582
553
|
},
|
|
583
554
|
},
|
|
555
|
+
notificationUrl: {
|
|
556
|
+
type: String,
|
|
557
|
+
},
|
|
558
|
+
rfc: {
|
|
559
|
+
type: String,
|
|
560
|
+
},
|
|
561
|
+
ruc: {
|
|
562
|
+
type: String,
|
|
563
|
+
},
|
|
564
|
+
RFC: {
|
|
565
|
+
type: String,
|
|
566
|
+
},
|
|
567
|
+
RUC: {
|
|
568
|
+
type: String,
|
|
569
|
+
},
|
|
570
|
+
mexicoFiscalRegimenCode: {
|
|
571
|
+
type: Number,
|
|
572
|
+
},
|
|
573
|
+
mexicoFiscalName: {
|
|
574
|
+
type: String,
|
|
575
|
+
},
|
|
576
|
+
taxId: {
|
|
577
|
+
type: String,
|
|
578
|
+
},
|
|
579
|
+
usKYCStatus: {
|
|
580
|
+
type: String,
|
|
581
|
+
},
|
|
584
582
|
}, {
|
|
585
583
|
toJSON: {
|
|
586
584
|
transform(doc, ret) {
|