@riocrypto/common-server 1.0.1421 → 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.
@@ -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: ((_g = (_f = user.onboarding) === null || _f === void 0 ? void 0 : _f.MX) === null || _g === void 0 ? void 0 : _g.taxId) || "XAXX010101000",
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: ((_k = (_j = (_h = user.invoicing) === null || _h === void 0 ? void 0 : _h.MX) === null || _j === void 0 ? void 0 : _j.fiscalRegimenCode) === null || _k === void 0 ? void 0 : _k.toString()) || "616",
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: ((_m = (_l = user.invoicing) === null || _l === void 0 ? void 0 : _l.MX) === null || _m === void 0 ? void 0 : _m.shouldInvoice) ? "G03" : "S01",
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: (_o = order.actualFees.platformFeeFiat) === null || _o === void 0 ? void 0 : _o.toFixed(2),
91
+ price: (_r = order.actualFees.platformFeeFiat) === null || _r === void 0 ? void 0 : _r.toFixed(2),
92
92
  },
93
93
  taxes: [
94
94
  {
@@ -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 };
@@ -35,10 +35,6 @@ const buildUBO = (mongoose) => {
35
35
  type: mongoose.Schema.Types.Mixed,
36
36
  required: false,
37
37
  },
38
- address: {
39
- type: mongoose.Schema.Types.Mixed,
40
- required: true,
41
- },
42
38
  }, {
43
39
  toJSON: {
44
40
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1421",
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.1265",
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",