mp-front-cli 0.0.105 → 0.0.107

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.
@@ -1 +1 @@
1
- {"version":3,"file":"error-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/errors/error-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAywBrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;CA8B7B"}
1
+ {"version":3,"file":"error-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/errors/error-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAkxBrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;CA8B7B"}
@@ -573,6 +573,10 @@ const e = {
573
573
  title: "Eliminar excepción de referencia",
574
574
  message: "Ocurrió un error al eliminar la referencia."
575
575
  },
576
+ "PERSONALREFERENCE-INVALIDREFERENCESRELATIONSHIPSCOUNTEXCEPTION-001": {
577
+ title: "Referencias no válidas",
578
+ message: "El cliente debe tener al menos una referencia con parentesco directo"
579
+ },
576
580
  //PAYMENTS
577
581
  "SALES-SUMMARY-GENERIC-ERROR-001": {
578
582
  title: "Ocurrió un error resumen de venta",
@@ -20,6 +20,10 @@ declare const translation: {
20
20
  title: string;
21
21
  message: string;
22
22
  };
23
+ "PERSONALREFERENCE-INVALIDREFERENCESRELATIONSHIPSCOUNTEXCEPTION-001": {
24
+ title: string;
25
+ message: string;
26
+ };
23
27
  "SALES-SUMMARY-GENERIC-ERROR-001": {
24
28
  title: string;
25
29
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgQhB,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqQhB,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -2,7 +2,7 @@ import { ApiMiddleware as g, ErrorCatalog as l, FetchServiceBE as x, FetchServic
2
2
  import { LoadingHandler as v, MessageHandler as E, RxSubjectManager as F } from "./mp-front-cli-utils-rxjs.es.js";
3
3
  import { S as h } from "./index-def0b487.js";
4
4
  import "i18next";
5
- import "./index-9490465f.js";
5
+ import "./index-58ea5a82.js";
6
6
  import "./mp-front-cli-logger.es.js";
7
7
  import "rxjs";
8
8
  import "./mp-front-cli-encrypter.es.js";
@@ -2,20 +2,20 @@ var f = Object.defineProperty;
2
2
  var y = (t, E, e) => E in t ? f(t, E, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[E] = e;
3
3
  var L = (t, E, e) => (y(t, typeof E != "symbol" ? E + "" : E, e), e);
4
4
  import { LoadingHandler as U, MessageHandler as B } from "./mp-front-cli-utils-rxjs.es.js";
5
- import { RxSubjectManager as Ie } from "./mp-front-cli-utils-rxjs.es.js";
5
+ import { RxSubjectManager as me } from "./mp-front-cli-utils-rxjs.es.js";
6
6
  import { f as n } from "./index-def0b487.js";
7
7
  import { S as ge } from "./index-def0b487.js";
8
8
  import v, { t as g } from "i18next";
9
- import { t as Q } from "./index-9490465f.js";
9
+ import { t as Q } from "./index-58ea5a82.js";
10
10
  import { CustomLogger as w } from "./mp-front-cli-logger.es.js";
11
- import { of as N, switchMap as O, forkJoin as M, catchError as c, EMPTY as d, filter as h } from "rxjs";
12
- import { CustomEncrypter as V } from "./mp-front-cli-encrypter.es.js";
11
+ import { of as T, switchMap as O, forkJoin as M, catchError as S, EMPTY as d, filter as V } from "rxjs";
12
+ import { CustomEncrypter as h } from "./mp-front-cli-encrypter.es.js";
13
13
  import { CustomHeader as F } from "./mp-front-cli-header.es.js";
14
14
  import { CustomEncoder as x } from "./mp-front-cli-encoder.es.js";
15
15
  import { u as Y } from "./stringify-788d71a0.js";
16
16
  import "node-jose";
17
17
  import "crypto";
18
- const G = {
18
+ const H = {
19
19
  es: {
20
20
  translation: {
21
21
  ...Q
@@ -23,7 +23,7 @@ const G = {
23
23
  }
24
24
  };
25
25
  v.init({
26
- resources: G,
26
+ resources: H,
27
27
  lng: "es",
28
28
  // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
29
29
  // you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
@@ -35,7 +35,7 @@ v.init({
35
35
  },
36
36
  debug: !1
37
37
  });
38
- const H = {
38
+ const G = {
39
39
  "ENROLLMENT-INVALIDCONFIGURATION-0000": {
40
40
  code: 400,
41
41
  type: "modal",
@@ -260,7 +260,7 @@ const H = {
260
260
  title: "errors.ENROLLMENT-INVALIDTOKENTRUSTONICSUPPLIER-0031.title",
261
261
  level: "error"
262
262
  }
263
- }, m = {
263
+ }, I = {
264
264
  "MP-001": {
265
265
  code: 400,
266
266
  type: "modal",
@@ -400,7 +400,7 @@ const H = {
400
400
  "SCORE-CLIENTREJECTED-02": {
401
401
  title: "errors.calculator.SCORE-CLIENTREJECTED-02.title",
402
402
  message: "errors.calculator.SCORE-CLIENTREJECTED-02.message",
403
- code: 310,
403
+ code: 420,
404
404
  type: "modal",
405
405
  level: "info"
406
406
  },
@@ -1011,6 +1011,13 @@ const H = {
1011
1011
  type: "modal",
1012
1012
  level: "warning"
1013
1013
  },
1014
+ "PERSONALREFERENCE-INVALIDREFERENCESRELATIONSHIPSCOUNTEXCEPTION-001": {
1015
+ title: "errors.PERSONALREFERENCE-INVALIDREFERENCESRELATIONSHIPSCOUNTEXCEPTION-001.title",
1016
+ message: "errors.PERSONALREFERENCE-INVALIDREFERENCESRELATIONSHIPSCOUNTEXCEPTION-001.message",
1017
+ code: 420,
1018
+ type: "modal",
1019
+ level: "warning"
1020
+ },
1014
1021
  //PAYMENTS
1015
1022
  "SALES-SUMMARY-GENERIC-ERROR-001": {
1016
1023
  title: "errors.SALES-SUMMARY-GENERIC-ERROR-001.title",
@@ -1026,36 +1033,36 @@ const H = {
1026
1033
  type: "modal",
1027
1034
  level: "warning"
1028
1035
  },
1029
- ...H
1036
+ ...G
1030
1037
  };
1031
1038
  class C extends w {
1032
1039
  get(E = "default", e = "NOT_FOUND") {
1033
1040
  var s, A;
1034
1041
  if (E instanceof Error)
1035
1042
  return this.logError(E.message), {
1036
- ...m.internalError,
1037
- title: g(m.internalError.title),
1038
- message: g(m.internalError.message),
1043
+ ...I.internalError,
1044
+ title: g(I.internalError.title),
1045
+ message: g(I.internalError.message),
1039
1046
  uuid: e
1040
1047
  };
1041
1048
  const r = typeof E == "string" ? E : E.code ?? E.errorType;
1042
1049
  this.logDebug("statusCode", r);
1043
1050
  const l = typeof E == "string" ? {} : { ...E };
1044
1051
  return {
1045
- ...m[r] ?? m.default,
1052
+ ...I[r] ?? I.default,
1046
1053
  title: g(
1047
- ((s = m[r]) == null ? void 0 : s.title) ?? m.default.title,
1054
+ ((s = I[r]) == null ? void 0 : s.title) ?? I.default.title,
1048
1055
  l
1049
1056
  ),
1050
1057
  message: g(
1051
- ((A = m[r]) == null ? void 0 : A.message) ?? m.default.message,
1058
+ ((A = I[r]) == null ? void 0 : A.message) ?? I.default.message,
1052
1059
  l
1053
1060
  ),
1054
1061
  uuid: e
1055
1062
  };
1056
1063
  }
1057
1064
  }
1058
- class Le extends V {
1065
+ class Le extends h {
1059
1066
  constructor() {
1060
1067
  super(...arguments);
1061
1068
  L(this, "uuid", "");
@@ -1079,24 +1086,24 @@ class Le extends V {
1079
1086
  get(e) {
1080
1087
  return this.logDebug("get ApiMiddleware"), (r, l) => {
1081
1088
  var s;
1082
- this.logDebug("return ApiMiddleware"), this.uuid = (s = r == null ? void 0 : r.body) == null ? void 0 : s.uuid, N(r).pipe(
1089
+ this.logDebug("return ApiMiddleware"), this.uuid = (s = r == null ? void 0 : r.body) == null ? void 0 : s.uuid, T(r).pipe(
1083
1090
  O(
1084
1091
  (A) => M({
1085
- params: N(this.decode(A.body)),
1086
- headers: N(A.headers)
1092
+ params: T(this.decode(A.body)),
1093
+ headers: T(A.headers)
1087
1094
  })
1088
1095
  ),
1089
1096
  O(
1090
1097
  ({ params: A, headers: a }) => M({
1091
1098
  response: e(A, this.uuid, a),
1092
- headers: N(a),
1093
- params: N(A)
1099
+ headers: T(a),
1100
+ params: T(A)
1094
1101
  })
1095
1102
  ),
1096
1103
  O(({ params: A, response: a, headers: o }) => (this.logDebug(
1097
1104
  `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(o)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(A)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)}`
1098
- ), N(a))),
1099
- c((A) => {
1105
+ ), T(a))),
1106
+ S((A) => {
1100
1107
  var a;
1101
1108
  return this.logError(
1102
1109
  `ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(a = r == null ? void 0 : r.body) == null ? void 0 : a.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(A)}`
@@ -1143,7 +1150,7 @@ class Oe extends F {
1143
1150
  selector: (s) => s.json()
1144
1151
  }
1145
1152
  ).pipe(
1146
- c((s) => {
1153
+ S((s) => {
1147
1154
  throw this.logError(JSON.stringify(s)), this.logError(
1148
1155
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1149
1156
  l
@@ -1158,10 +1165,10 @@ class Oe extends F {
1158
1165
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1159
1166
  this.formatParams(e)
1160
1167
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
1161
- ), N(s)))
1168
+ ), T(s)))
1162
1169
  )
1163
1170
  ),
1164
- h((l) => this.errorHandler(l, r))
1171
+ V((l) => this.errorHandler(l, r))
1165
1172
  );
1166
1173
  }
1167
1174
  fetchCustomData(e = {}, r) {
@@ -1173,7 +1180,7 @@ class Oe extends F {
1173
1180
  body: this.method === "GET" ? null : JSON.stringify(e),
1174
1181
  selector: (s) => s.json()
1175
1182
  }).pipe(
1176
- c((s) => {
1183
+ S((s) => {
1177
1184
  throw this.logError(JSON.stringify(s)), this.logError(
1178
1185
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1179
1186
  l
@@ -1188,7 +1195,7 @@ class Oe extends F {
1188
1195
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1189
1196
  e
1190
1197
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
1191
- ), N(s)))
1198
+ ), T(s)))
1192
1199
  )
1193
1200
  )
1194
1201
  );
@@ -1218,14 +1225,14 @@ function j(t, E, e) {
1218
1225
  var o;
1219
1226
  if (typeof l == "string" && (l = X(l)), typeof s == "string" && (s = $(s)), ((o = s) === null || o === void 0 ? void 0 : o.length) !== 16)
1220
1227
  throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
1221
- let T = new Uint8Array(16 + l.length);
1222
- if (T.set(s), T.set(l, s.length), T = e(T), T[6] = T[6] & 15 | E, T[8] = T[8] & 63 | 128, A) {
1228
+ let N = new Uint8Array(16 + l.length);
1229
+ if (N.set(s), N.set(l, s.length), N = e(N), N[6] = N[6] & 15 | E, N[8] = N[8] & 63 | 128, A) {
1223
1230
  a = a || 0;
1224
1231
  for (let i = 0; i < 16; ++i)
1225
- A[a + i] = T[i];
1232
+ A[a + i] = N[i];
1226
1233
  return A;
1227
1234
  }
1228
- return Y(T);
1235
+ return Y(N);
1229
1236
  }
1230
1237
  try {
1231
1238
  r.name = t;
@@ -1272,12 +1279,12 @@ function k(t) {
1272
1279
  a[R] = s[A][R];
1273
1280
  for (let R = 16; R < 80; ++R)
1274
1281
  a[R] = D(a[R - 3] ^ a[R - 8] ^ a[R - 14] ^ a[R - 16], 1);
1275
- let o = e[0], T = e[1], i = e[2], I = e[3], S = e[4];
1282
+ let o = e[0], N = e[1], i = e[2], m = e[3], c = e[4];
1276
1283
  for (let R = 0; R < 80; ++R) {
1277
- const P = Math.floor(R / 20), u = D(o, 5) + Z(P, T, i, I) + S + E[P] + a[R] >>> 0;
1278
- S = I, I = i, i = D(T, 30) >>> 0, T = o, o = u;
1284
+ const P = Math.floor(R / 20), u = D(o, 5) + Z(P, N, i, m) + c + E[P] + a[R] >>> 0;
1285
+ c = m, m = i, i = D(N, 30) >>> 0, N = o, o = u;
1279
1286
  }
1280
- e[0] = e[0] + o >>> 0, e[1] = e[1] + T >>> 0, e[2] = e[2] + i >>> 0, e[3] = e[3] + I >>> 0, e[4] = e[4] + S >>> 0;
1287
+ e[0] = e[0] + o >>> 0, e[1] = e[1] + N >>> 0, e[2] = e[2] + i >>> 0, e[3] = e[3] + m >>> 0, e[4] = e[4] + c >>> 0;
1281
1288
  }
1282
1289
  return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
1283
1290
  }
@@ -1311,18 +1318,18 @@ class ie extends x {
1311
1318
  body: s,
1312
1319
  selector: (o) => o.json()
1313
1320
  }).pipe(
1314
- O((o) => N(this.decode(o))),
1321
+ O((o) => T(this.decode(o))),
1315
1322
  O((o) => o.code && (o.type === "modal" || o.type === "message") ? (this.logError(
1316
1323
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(o)}`
1317
- ), U.getInstance().setSubject(!1), B.getInstance().setSubject(o), this.errorResponse ? N(this.errorResponse) : d) : N(o)),
1324
+ ), U.getInstance().setSubject(!1), B.getInstance().setSubject(o), this.errorResponse ? T(this.errorResponse) : d) : T(o)),
1318
1325
  O((o) => (U.getInstance().setSubject(!1), this.logDebug(
1319
1326
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(o)}`
1320
- ), N(o))),
1321
- c((o) => (this.logError(
1327
+ ), T(o))),
1328
+ S((o) => (this.logError(
1322
1329
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(o)}`
1323
1330
  ), U.getInstance().setSubject(!1), B.getInstance().setSubject(
1324
1331
  new C().get(o, l)
1325
- ), this.errorResponse ? N(this.errorResponse) : d))
1332
+ ), this.errorResponse ? T(this.errorResponse) : d))
1326
1333
  );
1327
1334
  }
1328
1335
  }
@@ -1333,6 +1340,6 @@ export {
1333
1340
  ie as FetchServiceFE,
1334
1341
  U as LoadingHandler,
1335
1342
  B as MessageHandler,
1336
- Ie as RxSubjectManager,
1343
+ me as RxSubjectManager,
1337
1344
  ge as ServiceToken
1338
1345
  };
@@ -1,4 +1,4 @@
1
- import { t } from "./index-9490465f.js";
1
+ import { t } from "./index-58ea5a82.js";
2
2
  const e = {
3
3
  errors: {}
4
4
  }, a = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.105",
3
+ "version": "0.0.107",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {