@riocrypto/common-server 1.0.2360 → 1.0.2362

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.
@@ -10,8 +10,10 @@ interface OnboardingAttrs {
10
10
  userId?: string;
11
11
  brokerId?: string;
12
12
  authId?: string;
13
- aiPriseId?: string;
14
- aiPriseURL?: string;
13
+ aiPriseBusinessProfileId?: string;
14
+ aiPriseUserProfileId?: string;
15
+ aiPriseBusinessVerificationSessionUrl?: string;
16
+ aiPriseUserVerificationSessionUrl?: string;
15
17
  bridgeId?: string;
16
18
  bridgeCustomerId?: string;
17
19
  referrerId?: string;
@@ -28,8 +30,10 @@ interface OnboardingDoc extends mongoose.Document {
28
30
  userId?: string;
29
31
  brokerId?: string;
30
32
  authId?: string;
31
- aiPriseId?: string;
32
- aiPriseURL?: string;
33
+ aiPriseBusinessProfileId?: string;
34
+ aiPriseUserProfileId?: string;
35
+ aiPriseBusinessVerificationSessionUrl?: string;
36
+ aiPriseUserVerificationSessionUrl?: string;
33
37
  bridgeId?: string;
34
38
  bridgeCustomerId?: string;
35
39
  referrerId?: string;
@@ -34,10 +34,16 @@ const buildOnboarding = (mongoose) => {
34
34
  type: Boolean,
35
35
  required: true,
36
36
  },
37
- aiPriseId: {
37
+ aiPriseBusinessProfileId: {
38
38
  type: String,
39
39
  },
40
- aiPriseURL: {
40
+ aiPriseUserProfileId: {
41
+ type: String,
42
+ },
43
+ aiPriseBusinessVerificationSessionUrl: {
44
+ type: String,
45
+ },
46
+ aiPriseUserVerificationSessionUrl: {
41
47
  type: String,
42
48
  },
43
49
  bridgeId: {
@@ -1,5 +1,50 @@
1
1
  import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier, ImmigrationStatus, Country, Fiat, Side, Crypto } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
+ interface OnboardingBase {
4
+ aipriseBusinessProfileId?: string;
5
+ aipriseUserProfileId?: string;
6
+ }
7
+ type OnboardingCountryData = {
8
+ [country in CountryOfOrigin]?: {
9
+ status?: OnboardingStatus;
10
+ hasAcceptedTerms?: boolean;
11
+ onboardingId?: string;
12
+ bridgeId?: string;
13
+ personalId?: string;
14
+ taxId?: string;
15
+ immigrationStatus?: ImmigrationStatus;
16
+ individualIdentityVerification?: {
17
+ status?: "passed" | "failed" | "review";
18
+ };
19
+ legalRepresentative?: {
20
+ firstName?: string;
21
+ middleName?: string;
22
+ lastName?: string;
23
+ secondLastName?: string;
24
+ verificationStatus?: "passed" | "failed" | "review";
25
+ email?: string;
26
+ };
27
+ files?: {
28
+ certificateOfIncorporation?: string;
29
+ KYCReport?: string;
30
+ taxTranscript?: string;
31
+ proofOfAddress?: string;
32
+ businessRegistration?: string;
33
+ taxIdentificationCertificate?: string;
34
+ legalRepresentativeIdPowerOfAttorney?: string;
35
+ personalIdentificationCertificate?: string;
36
+ extraFiles?: string[];
37
+ };
38
+ address?: {
39
+ street1?: string;
40
+ street2?: string;
41
+ city?: string;
42
+ state?: string;
43
+ postalCode?: string;
44
+ country?: CountryOfOrigin;
45
+ };
46
+ };
47
+ };
3
48
  interface UserAttrs {
4
49
  createdAt: Date;
5
50
  authIds?: string[];
@@ -69,48 +114,7 @@ interface UserAttrs {
69
114
  };
70
115
  };
71
116
  authorizedPhoneNumbers?: string[];
72
- onboarding?: {
73
- [country in CountryOfOrigin]?: {
74
- status?: OnboardingStatus;
75
- hasAcceptedTerms?: boolean;
76
- onboardingId?: string;
77
- aiPriseId?: string;
78
- bridgeId?: string;
79
- personalId?: string;
80
- taxId?: string;
81
- immigrationStatus?: ImmigrationStatus;
82
- individualIdentityVerification?: {
83
- status?: "passed" | "failed" | "review";
84
- };
85
- legalRepresentative?: {
86
- firstName?: string;
87
- middleName?: string;
88
- lastName?: string;
89
- secondLastName?: string;
90
- verificationStatus?: "passed" | "failed" | "review";
91
- email?: string;
92
- };
93
- files?: {
94
- certificateOfIncorporation?: string;
95
- KYCReport?: string;
96
- taxTranscript?: string;
97
- proofOfAddress?: string;
98
- businessRegistration?: string;
99
- taxIdentificationCertificate?: string;
100
- legalRepresentativeIdPowerOfAttorney?: string;
101
- personalIdentificationCertificate?: string;
102
- extraFiles?: string[];
103
- };
104
- address?: {
105
- street1?: string;
106
- street2?: string;
107
- city?: string;
108
- state?: string;
109
- postalCode?: string;
110
- country?: CountryOfOrigin;
111
- };
112
- };
113
- };
117
+ onboarding?: OnboardingBase & OnboardingCountryData;
114
118
  invoicing?: {
115
119
  MX: {
116
120
  shouldInvoice: boolean;
@@ -206,48 +210,7 @@ interface UserDoc extends Document {
206
210
  };
207
211
  };
208
212
  authorizedPhoneNumbers?: string[];
209
- onboarding?: {
210
- [country in CountryOfOrigin]?: {
211
- status?: OnboardingStatus;
212
- hasAcceptedTerms?: boolean;
213
- onboardingId?: string;
214
- aiPriseId?: string;
215
- bridgeId?: string;
216
- personalId?: string;
217
- taxId?: string;
218
- immigrationStatus?: ImmigrationStatus;
219
- individualIdentityVerification?: {
220
- status?: "passed" | "failed" | "review";
221
- };
222
- legalRepresentative?: {
223
- firstName?: string;
224
- middleName?: string;
225
- lastName?: string;
226
- secondLastName?: string;
227
- verificationStatus?: "passed" | "failed" | "review";
228
- email?: string;
229
- };
230
- files?: {
231
- certificateOfIncorporation?: string;
232
- KYCReport?: string;
233
- taxTranscript?: string;
234
- proofOfAddress?: string;
235
- businessRegistration?: string;
236
- taxIdentificationCertificate?: string;
237
- legalRepresentativeIdPowerOfAttorney?: string;
238
- personalIdentificationCertificate?: string;
239
- extraFiles?: string[];
240
- };
241
- address?: {
242
- street1?: string;
243
- street2?: string;
244
- city?: string;
245
- state?: string;
246
- postalCode?: string;
247
- country?: CountryOfOrigin;
248
- };
249
- };
250
- };
213
+ onboarding?: OnboardingBase & OnboardingCountryData;
251
214
  invoicing?: {
252
215
  MX: {
253
216
  shouldInvoice: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2360",
3
+ "version": "1.0.2362",
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.2079",
31
+ "@riocrypto/common": "^1.0.2080",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",