@riocrypto/common-server 1.0.1204 → 1.0.1206
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.
|
@@ -50,9 +50,7 @@ class BitsoClient {
|
|
|
50
50
|
"Content-Type": "application/json",
|
|
51
51
|
},
|
|
52
52
|
data: {
|
|
53
|
-
alias: `CLABE for ${user
|
|
54
|
-
? user.companyName
|
|
55
|
-
: user.firstName + " " + user.lastName} - ${user.id}`,
|
|
53
|
+
alias: `CLABE for ${(0, common_1.getUserName)(user)} - ${user.id}`,
|
|
56
54
|
user_id: this.env === "production" ? "8298933" : "53166",
|
|
57
55
|
currency: "mxn",
|
|
58
56
|
taxonomy: {
|
|
@@ -56,9 +56,7 @@ class InvopopClient {
|
|
|
56
56
|
customer: {
|
|
57
57
|
name: user.mexicoFiscalName
|
|
58
58
|
? user.mexicoFiscalName.toLocaleUpperCase()
|
|
59
|
-
:
|
|
60
|
-
? user.companyName.toLocaleUpperCase()
|
|
61
|
-
: `${user.firstName.toLocaleUpperCase()} ${user.lastName.toLocaleUpperCase()}`,
|
|
59
|
+
: (0, common_1.getUserName)(user),
|
|
62
60
|
tax_id: {
|
|
63
61
|
country: "MX",
|
|
64
62
|
zone: user.rfc ? user.postalCode : "66260",
|
|
@@ -38,9 +38,7 @@ class KapstarClient {
|
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
const kapstarResponse = yield this.axiosInstance.post("/transaction-service/v1/external/invoice", {
|
|
40
40
|
amount,
|
|
41
|
-
name:
|
|
42
|
-
? user.companyName
|
|
43
|
-
: user.firstName + " " + user.lastName,
|
|
41
|
+
name: (0, common_1.getUserName)(user),
|
|
44
42
|
tags: [orderId],
|
|
45
43
|
tax_id: user.cpf,
|
|
46
44
|
});
|
package/build/models/user.d.ts
CHANGED
|
@@ -14,7 +14,9 @@ interface UserAttrs {
|
|
|
14
14
|
country: CountryOfOrigin;
|
|
15
15
|
kycStatus: KYCStatus;
|
|
16
16
|
firstName?: string;
|
|
17
|
+
middleName?: string;
|
|
17
18
|
lastName?: string;
|
|
19
|
+
secondLastName?: string;
|
|
18
20
|
companyName?: string;
|
|
19
21
|
birthday?: Date;
|
|
20
22
|
legalRepresentative?: string;
|
|
@@ -62,7 +64,9 @@ interface UserDoc extends Document {
|
|
|
62
64
|
country: CountryOfOrigin;
|
|
63
65
|
kycStatus: KYCStatus;
|
|
64
66
|
firstName?: string;
|
|
67
|
+
middleName?: string;
|
|
65
68
|
lastName?: string;
|
|
69
|
+
secondLastName?: string;
|
|
66
70
|
companyName?: string;
|
|
67
71
|
legalRepresentative?: string;
|
|
68
72
|
cpf?: string;
|
package/build/models/user.js
CHANGED
|
@@ -24,9 +24,15 @@ const buildUser = (mongoose) => {
|
|
|
24
24
|
firstName: {
|
|
25
25
|
type: String,
|
|
26
26
|
},
|
|
27
|
+
middleName: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
27
30
|
lastName: {
|
|
28
31
|
type: String,
|
|
29
32
|
},
|
|
33
|
+
secondLastName: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
30
36
|
phoneNumber: {
|
|
31
37
|
type: String,
|
|
32
38
|
required: true,
|
|
@@ -221,7 +227,13 @@ const buildUser = (mongoose) => {
|
|
|
221
227
|
ret.street2 = ret.street2 ? (0, unescape_1.unescape)(ret.street2) : undefined;
|
|
222
228
|
ret.state = ret.state ? (0, unescape_1.unescape)(ret.state) : undefined;
|
|
223
229
|
ret.firstName = ret.firstName ? (0, unescape_1.unescape)(ret.firstName) : undefined;
|
|
230
|
+
ret.middleName = ret.middleName
|
|
231
|
+
? (0, unescape_1.unescape)(ret.middleName)
|
|
232
|
+
: undefined;
|
|
224
233
|
ret.lastName = ret.lastName ? (0, unescape_1.unescape)(ret.lastName) : undefined;
|
|
234
|
+
ret.secondLastName = ret.secondLastName
|
|
235
|
+
? (0, unescape_1.unescape)(ret.secondLastName)
|
|
236
|
+
: undefined;
|
|
225
237
|
ret.economicActivity = ret.economicActivity
|
|
226
238
|
? (0, unescape_1.unescape)(ret.economicActivity)
|
|
227
239
|
: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1206",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
27
27
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
|
-
"@riocrypto/common": "^1.0.
|
|
29
|
+
"@riocrypto/common": "^1.0.1094",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^0.27.2",
|
|
32
32
|
"ccxt": "^3.0.30",
|