@riocrypto/common-server 1.0.1420 → 1.0.1422
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.
- package/build/clients/invopop-client.js +6 -6
- package/build/models/ubo.d.ts +8 -16
- package/build/models/ubo.js +0 -4
- package/build/models/user.d.ts +16 -16
- package/build/models/user.js +0 -25
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ class InvopopClient {
|
|
|
23
23
|
this.baseUrl = "https://api.invopop.com";
|
|
24
24
|
}
|
|
25
25
|
createJob(order, user) {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
const uuid = (0, uuid_1.v1)();
|
|
29
29
|
const operationDate = new Date(order.createdAt);
|
|
@@ -66,18 +66,18 @@ class InvopopClient {
|
|
|
66
66
|
tax_id: {
|
|
67
67
|
country: "MX",
|
|
68
68
|
zone: ((_e = (_d = user.invoicing) === null || _d === void 0 ? void 0 : _d.MX) === null || _e === void 0 ? void 0 : _e.shouldInvoice)
|
|
69
|
-
? user.address.postalCode
|
|
69
|
+
? (_h = (_g = (_f = user.onboarding) === null || _f === void 0 ? void 0 : _f.MX) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.postalCode
|
|
70
70
|
: "66260",
|
|
71
|
-
code: ((
|
|
71
|
+
code: ((_k = (_j = user.onboarding) === null || _j === void 0 ? void 0 : _j.MX) === null || _k === void 0 ? void 0 : _k.taxId) || "XAXX010101000",
|
|
72
72
|
},
|
|
73
73
|
identities: [
|
|
74
74
|
{
|
|
75
75
|
key: "mx-cfdi-fiscal-regime",
|
|
76
|
-
code: ((
|
|
76
|
+
code: ((_o = (_m = (_l = user.invoicing) === null || _l === void 0 ? void 0 : _l.MX) === null || _m === void 0 ? void 0 : _m.fiscalRegimenCode) === null || _o === void 0 ? void 0 : _o.toString()) || "616",
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
key: "mx-cfdi-use",
|
|
80
|
-
code: ((
|
|
80
|
+
code: ((_q = (_p = user.invoicing) === null || _p === void 0 ? void 0 : _p.MX) === null || _q === void 0 ? void 0 : _q.shouldInvoice) ? "G03" : "S01",
|
|
81
81
|
},
|
|
82
82
|
],
|
|
83
83
|
},
|
|
@@ -88,7 +88,7 @@ class InvopopClient {
|
|
|
88
88
|
item: {
|
|
89
89
|
name: "Facilitación de Compra-Venta de Activos Virtuales",
|
|
90
90
|
identities: [{ key: "mx-cfdi-prod-serv", code: "80151500" }],
|
|
91
|
-
price: (
|
|
91
|
+
price: (_r = order.actualFees.platformFeeFiat) === null || _r === void 0 ? void 0 : _r.toFixed(2),
|
|
92
92
|
},
|
|
93
93
|
taxes: [
|
|
94
94
|
{
|
package/build/models/ubo.d.ts
CHANGED
|
@@ -34,16 +34,16 @@ interface UBOAttrs {
|
|
|
34
34
|
personalIdentificationCertificate?: string;
|
|
35
35
|
extraFiles?: string[];
|
|
36
36
|
};
|
|
37
|
+
address?: {
|
|
38
|
+
street1?: string;
|
|
39
|
+
street2?: string;
|
|
40
|
+
city?: string;
|
|
41
|
+
state?: string;
|
|
42
|
+
postalCode?: string;
|
|
43
|
+
country: CountryOfOrigin;
|
|
44
|
+
};
|
|
37
45
|
};
|
|
38
46
|
};
|
|
39
|
-
address: {
|
|
40
|
-
street1: string;
|
|
41
|
-
street2?: string;
|
|
42
|
-
city: string;
|
|
43
|
-
state: string;
|
|
44
|
-
postalCode: string;
|
|
45
|
-
country: CountryOfOrigin;
|
|
46
|
-
};
|
|
47
47
|
}
|
|
48
48
|
interface UBOModel extends Model<UBODoc> {
|
|
49
49
|
build(attrs: UBOAttrs): UBODoc;
|
|
@@ -85,14 +85,6 @@ interface UBODoc extends Document {
|
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
-
address: {
|
|
89
|
-
street1: string;
|
|
90
|
-
street2?: string;
|
|
91
|
-
city: string;
|
|
92
|
-
state: string;
|
|
93
|
-
postalCode: string;
|
|
94
|
-
country: CountryOfOrigin;
|
|
95
|
-
};
|
|
96
88
|
}
|
|
97
89
|
declare const buildUBO: (mongoose: Mongoose) => UBOModel;
|
|
98
90
|
export { buildUBO, UBODoc };
|
package/build/models/ubo.js
CHANGED
package/build/models/user.d.ts
CHANGED
|
@@ -112,16 +112,16 @@ interface UserAttrs {
|
|
|
112
112
|
personalIdentificationCertificate?: string;
|
|
113
113
|
extraFiles?: string[];
|
|
114
114
|
};
|
|
115
|
+
address?: {
|
|
116
|
+
street1?: string;
|
|
117
|
+
street2?: string;
|
|
118
|
+
city?: string;
|
|
119
|
+
state?: string;
|
|
120
|
+
postalCode?: string;
|
|
121
|
+
country?: CountryOfOrigin;
|
|
122
|
+
};
|
|
115
123
|
};
|
|
116
124
|
};
|
|
117
|
-
address: {
|
|
118
|
-
street1: string;
|
|
119
|
-
street2?: string;
|
|
120
|
-
city: string;
|
|
121
|
-
state: string;
|
|
122
|
-
postalCode: string;
|
|
123
|
-
country: CountryOfOrigin;
|
|
124
|
-
};
|
|
125
125
|
invoicing?: {
|
|
126
126
|
MX: {
|
|
127
127
|
shouldInvoice: boolean;
|
|
@@ -246,16 +246,16 @@ interface UserDoc extends Document {
|
|
|
246
246
|
personalIdentificationCertificate?: string;
|
|
247
247
|
extraFiles?: string[];
|
|
248
248
|
};
|
|
249
|
+
address?: {
|
|
250
|
+
street1?: string;
|
|
251
|
+
street2?: string;
|
|
252
|
+
city?: string;
|
|
253
|
+
state?: string;
|
|
254
|
+
postalCode?: string;
|
|
255
|
+
country?: CountryOfOrigin;
|
|
256
|
+
};
|
|
249
257
|
};
|
|
250
258
|
};
|
|
251
|
-
address: {
|
|
252
|
-
street1: string;
|
|
253
|
-
street2?: string;
|
|
254
|
-
city: string;
|
|
255
|
-
state: string;
|
|
256
|
-
postalCode: string;
|
|
257
|
-
country: CountryOfOrigin;
|
|
258
|
-
};
|
|
259
259
|
invoicing?: {
|
|
260
260
|
MX: {
|
|
261
261
|
shouldInvoice: boolean;
|
package/build/models/user.js
CHANGED
|
@@ -302,31 +302,6 @@ const buildUser = (mongoose) => {
|
|
|
302
302
|
type: String,
|
|
303
303
|
},
|
|
304
304
|
],
|
|
305
|
-
address: {
|
|
306
|
-
street1: {
|
|
307
|
-
type: String,
|
|
308
|
-
required: true,
|
|
309
|
-
},
|
|
310
|
-
street2: {
|
|
311
|
-
type: String,
|
|
312
|
-
},
|
|
313
|
-
city: {
|
|
314
|
-
type: String,
|
|
315
|
-
required: true,
|
|
316
|
-
},
|
|
317
|
-
state: {
|
|
318
|
-
type: String,
|
|
319
|
-
required: true,
|
|
320
|
-
},
|
|
321
|
-
postalCode: {
|
|
322
|
-
type: String,
|
|
323
|
-
required: true,
|
|
324
|
-
},
|
|
325
|
-
country: {
|
|
326
|
-
type: String,
|
|
327
|
-
required: true,
|
|
328
|
-
},
|
|
329
|
-
},
|
|
330
305
|
onboarding: Object,
|
|
331
306
|
invoicing: {
|
|
332
307
|
MX: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1422",
|
|
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.1266",
|
|
31
31
|
"@types/express": "^4.17.13",
|
|
32
32
|
"axios": "^0.27.2",
|
|
33
33
|
"ccxt": "^3.0.30",
|