@riocrypto/common-server 1.0.667 → 1.0.671

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,3 +1,3 @@
1
1
  import { Mongoose } from "mongoose";
2
- import { User as UserType, BusinessUser as BusinessUserType } from "@riocrypto/common";
3
- export declare const getUserHelper: (id: string, mongoose: Mongoose) => Promise<UserType | BusinessUserType | null>;
2
+ import { BusinessUser as BusinessUserType } from "@riocrypto/common";
3
+ export declare const getUserHelper: (id: string, mongoose: Mongoose) => Promise<BusinessUserType | null>;
@@ -1,10 +1,8 @@
1
1
  import { Country, KYCStatus, Language, PlatformFeeRange, USState, UserAttribute, UserType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface UserAttrs {
4
- authId: string;
4
+ authIds?: string[];
5
5
  type: UserType;
6
- firstName: string;
7
- lastName: string;
8
6
  phoneNumber: string;
9
7
  birthday: Date;
10
8
  email: string;
@@ -15,22 +13,26 @@ interface UserAttrs {
15
13
  postalCode: string;
16
14
  country: Country;
17
15
  kycStatus: KYCStatus;
16
+ firstName?: string;
17
+ lastName?: string;
18
+ companyName?: string;
19
+ legalRepresentative?: string;
18
20
  cpf?: string;
19
21
  language?: Language;
20
22
  attributes?: UserAttribute[];
21
23
  partnerId?: string;
22
24
  brokerId?: string;
23
25
  platformFeeRanges?: PlatformFeeRange[];
26
+ COIFile?: string;
27
+ KYCReportFile?: string;
24
28
  }
25
29
  interface UserModel extends Model<UserDoc> {
26
30
  build(attrs: UserAttrs): UserDoc;
27
31
  }
28
32
  interface UserDoc extends Document {
29
33
  _id: string;
30
- authId: string;
34
+ authIds?: string[];
31
35
  type: UserType;
32
- firstName: string;
33
- lastName: string;
34
36
  phoneNumber: string;
35
37
  birthday: Date;
36
38
  email: string;
@@ -41,12 +43,18 @@ interface UserDoc extends Document {
41
43
  postalCode: string;
42
44
  country: Country;
43
45
  kycStatus: KYCStatus;
46
+ firstName?: string;
47
+ lastName?: string;
48
+ companyName?: string;
49
+ legalRepresentative?: string;
44
50
  cpf?: string;
45
51
  language?: Language;
46
52
  attributes?: UserAttribute[];
47
53
  partnerId?: string;
48
54
  brokerId?: string;
49
55
  platformFeeRanges?: PlatformFeeRange[];
56
+ COIFile?: string;
57
+ KYCReportFile?: string;
50
58
  }
51
59
  declare const buildUser: (mongoose: Mongoose) => UserModel;
52
60
  export { buildUser, UserDoc };
@@ -7,10 +7,11 @@ const buildUser = (mongoose) => {
7
7
  return mongoose.model("User");
8
8
  }
9
9
  const userSchema = new mongoose.Schema({
10
- authId: {
11
- type: String,
12
- required: true,
13
- },
10
+ authIds: [
11
+ {
12
+ type: String,
13
+ },
14
+ ],
14
15
  type: {
15
16
  type: String,
16
17
  required: true,
@@ -79,6 +80,18 @@ const buildUser = (mongoose) => {
79
80
  brokerId: {
80
81
  type: String,
81
82
  },
83
+ companyName: {
84
+ type: String,
85
+ },
86
+ legalRepresentative: {
87
+ type: String,
88
+ },
89
+ COIFile: {
90
+ type: String,
91
+ },
92
+ KYCReportFile: {
93
+ type: String,
94
+ },
82
95
  platformFeeRanges: [
83
96
  {
84
97
  min: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.667",
3
+ "version": "1.0.671",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "@aws-sdk/client-s3": "^3.297.0",
25
25
  "@everapi/currencyapi-js": "^1.0.6",
26
26
  "@google-cloud/storage": "^6.9.5",
27
- "@riocrypto/common": "^1.0.604",
27
+ "@riocrypto/common": "^1.0.609",
28
28
  "@types/express": "^4.17.13",
29
29
  "axios": "^0.27.2",
30
30
  "ccxt": "^3.0.30",