@riocrypto/common 1.0.1501 → 1.0.1503
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.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Country } from "../types/country";
|
|
2
|
+
import { CustomError } from "./custom-error";
|
|
3
|
+
export declare class OnboardingNotApprovedError extends CustomError {
|
|
4
|
+
private userId;
|
|
5
|
+
private country;
|
|
6
|
+
statusCode: number;
|
|
7
|
+
internalCode: number;
|
|
8
|
+
constructor(userId: string, country: Country);
|
|
9
|
+
serializeErrors(): {
|
|
10
|
+
code: number;
|
|
11
|
+
message: string;
|
|
12
|
+
country: Country;
|
|
13
|
+
userId: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnboardingNotApprovedError = void 0;
|
|
4
|
+
const CountryAsset_1 = require("../classes/CountryAsset");
|
|
5
|
+
const custom_error_1 = require("./custom-error");
|
|
6
|
+
class OnboardingNotApprovedError extends custom_error_1.CustomError {
|
|
7
|
+
constructor(userId, country) {
|
|
8
|
+
super(`Onboarding not approved in ${new CountryAsset_1.CountryAsset(country).getName()}`);
|
|
9
|
+
this.userId = userId;
|
|
10
|
+
this.country = country;
|
|
11
|
+
this.statusCode = 409;
|
|
12
|
+
this.internalCode = 99;
|
|
13
|
+
Object.setPrototypeOf(this, OnboardingNotApprovedError.prototype);
|
|
14
|
+
}
|
|
15
|
+
serializeErrors() {
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
code: this.internalCode,
|
|
19
|
+
message: `Onboarding not approved in ${new CountryAsset_1.CountryAsset(this.country).getName()}`,
|
|
20
|
+
country: this.country,
|
|
21
|
+
userId: this.userId,
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.OnboardingNotApprovedError = OnboardingNotApprovedError;
|
package/build/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export * from "./errors/secret-manager-error";
|
|
|
39
39
|
export * from "./errors/expired-quote-error";
|
|
40
40
|
export * from "./errors/user-not-enabled-in-us-error";
|
|
41
41
|
export * from "./errors/above-limit-error";
|
|
42
|
+
export * from "./errors/onboarding-not-approved-error";
|
|
42
43
|
export * from "./events/base-listener";
|
|
43
44
|
export * from "./events/base-publisher";
|
|
44
45
|
export * from "./events/subjects";
|
package/build/index.js
CHANGED
|
@@ -55,6 +55,7 @@ __exportStar(require("./errors/secret-manager-error"), exports);
|
|
|
55
55
|
__exportStar(require("./errors/expired-quote-error"), exports);
|
|
56
56
|
__exportStar(require("./errors/user-not-enabled-in-us-error"), exports);
|
|
57
57
|
__exportStar(require("./errors/above-limit-error"), exports);
|
|
58
|
+
__exportStar(require("./errors/onboarding-not-approved-error"), exports);
|
|
58
59
|
__exportStar(require("./events/base-listener"), exports);
|
|
59
60
|
__exportStar(require("./events/base-publisher"), exports);
|
|
60
61
|
__exportStar(require("./events/subjects"), exports);
|
package/build/types/user.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare type IndividualUser = {
|
|
|
14
14
|
middleName?: string;
|
|
15
15
|
lastName: string;
|
|
16
16
|
secondLastName?: string;
|
|
17
|
-
birthday
|
|
17
|
+
birthday?: Date;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
declare type BusinessUser = {
|
|
@@ -32,7 +32,7 @@ export declare type User = {
|
|
|
32
32
|
brokerId?: string;
|
|
33
33
|
referrerId?: string;
|
|
34
34
|
type: UserType;
|
|
35
|
-
phoneNumber
|
|
35
|
+
phoneNumber?: string;
|
|
36
36
|
email: string;
|
|
37
37
|
risk: RiskTier;
|
|
38
38
|
hasPassedEDD: boolean;
|