@riocrypto/common-server 1.0.1411 → 1.0.1413
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.
|
@@ -68,7 +68,7 @@ class InvopopClient {
|
|
|
68
68
|
zone: ((_e = (_d = user.invoicing) === null || _d === void 0 ? void 0 : _d.MX) === null || _e === void 0 ? void 0 : _e.shouldInvoice)
|
|
69
69
|
? user.address.postalCode
|
|
70
70
|
: "66260",
|
|
71
|
-
code: ((_g = (_f = user.
|
|
71
|
+
code: ((_g = (_f = user.onboarding) === null || _f === void 0 ? void 0 : _f.MX) === null || _g === void 0 ? void 0 : _g.taxId) || "XAXX010101000",
|
|
72
72
|
},
|
|
73
73
|
identities: [
|
|
74
74
|
{
|
|
@@ -41,7 +41,7 @@ class KapstarClient {
|
|
|
41
41
|
amount,
|
|
42
42
|
name: (0, common_1.getUserName)(user),
|
|
43
43
|
tags: [orderId],
|
|
44
|
-
tax_id: (_b = (_a = user.
|
|
44
|
+
tax_id: (_b = (_a = user.onboarding) === null || _a === void 0 ? void 0 : _a.BR) === null || _b === void 0 ? void 0 : _b.taxId,
|
|
45
45
|
});
|
|
46
46
|
return kapstarResponse.data;
|
|
47
47
|
});
|
|
@@ -126,8 +126,8 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
126
126
|
req.user = user;
|
|
127
127
|
}
|
|
128
128
|
else {
|
|
129
|
-
if (((_f = (_e = user.onboarding) === null || _e === void 0 ? void 0 : _e.MX) === null || _f === void 0 ? void 0 : _f.status) === common_1.
|
|
130
|
-
((_h = (_g = user.onboarding) === null || _g === void 0 ? void 0 : _g.PE) === null || _h === void 0 ? void 0 : _h.status) === common_1.
|
|
129
|
+
if (((_f = (_e = user.onboarding) === null || _e === void 0 ? void 0 : _e.MX) === null || _f === void 0 ? void 0 : _f.status) === common_1.OnboardingStatus.Approved ||
|
|
130
|
+
((_h = (_g = user.onboarding) === null || _g === void 0 ? void 0 : _g.PE) === null || _h === void 0 ? void 0 : _h.status) === common_1.OnboardingStatus.Approved) {
|
|
131
131
|
req.user = user;
|
|
132
132
|
}
|
|
133
133
|
}
|
package/build/models/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country,
|
|
1
|
+
import { Country, OnboardingStatus, 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;
|
|
@@ -35,7 +35,7 @@ interface UserAttrs {
|
|
|
35
35
|
state: USState | string;
|
|
36
36
|
postalCode: string;
|
|
37
37
|
country: CountryOfOrigin;
|
|
38
|
-
kycStatus:
|
|
38
|
+
kycStatus: OnboardingStatus;
|
|
39
39
|
hasPassedEDD: boolean;
|
|
40
40
|
firstName?: string;
|
|
41
41
|
middleName?: string;
|
|
@@ -92,7 +92,7 @@ interface UserAttrs {
|
|
|
92
92
|
usKYCStatus?: "none" | "pending" | "failed" | "approved";
|
|
93
93
|
onboarding?: {
|
|
94
94
|
[country in CountryOfOrigin]?: {
|
|
95
|
-
status?:
|
|
95
|
+
status?: OnboardingStatus;
|
|
96
96
|
personalId?: string;
|
|
97
97
|
taxId?: string;
|
|
98
98
|
isResident?: boolean;
|
|
@@ -173,7 +173,7 @@ interface UserDoc extends Document {
|
|
|
173
173
|
state: USState | string;
|
|
174
174
|
postalCode: string;
|
|
175
175
|
country: CountryOfOrigin;
|
|
176
|
-
kycStatus:
|
|
176
|
+
kycStatus: OnboardingStatus;
|
|
177
177
|
hasPassedEDD: boolean;
|
|
178
178
|
firstName?: string;
|
|
179
179
|
middleName?: string;
|
|
@@ -230,7 +230,7 @@ interface UserDoc extends Document {
|
|
|
230
230
|
usKYCStatus?: "none" | "pending" | "failed" | "approved";
|
|
231
231
|
onboarding?: {
|
|
232
232
|
[country in CountryOfOrigin]?: {
|
|
233
|
-
status?:
|
|
233
|
+
status?: OnboardingStatus;
|
|
234
234
|
personalId?: string;
|
|
235
235
|
taxId?: string;
|
|
236
236
|
isResident?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1413",
|
|
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.1246",
|
|
31
31
|
"@types/express": "^4.17.13",
|
|
32
32
|
"axios": "^0.27.2",
|
|
33
33
|
"ccxt": "^3.0.30",
|