mp-front-cli 0.0.91 → 0.0.92
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/dist/core/errors/error-catalog.d.ts.map +1 -1
- package/dist/{index-d4f88744.js → index-21452318.js} +17 -1
- package/dist/lang/common/errors/es_MX/index.d.ts +16 -0
- package/dist/lang/common/errors/es_MX/index.d.ts.map +1 -1
- package/dist/mp-front-cli-all.es.js +1 -1
- package/dist/mp-front-cli-core.es.js +70 -42
- package/dist/mp-front-cli-locale.es.js +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
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;AAstBrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;CA8B7B"}
|
|
@@ -515,7 +515,7 @@ const e = {
|
|
|
515
515
|
},
|
|
516
516
|
//TERMINOS Y CONDICIONES
|
|
517
517
|
"COMMUNICATIONS-INVALIDCODEEXCEPTION-001": {
|
|
518
|
-
title: "Código incorrecto
|
|
518
|
+
title: "Código incorrecto",
|
|
519
519
|
message: "Código invalido, por favor de generar uno nuevo"
|
|
520
520
|
},
|
|
521
521
|
"COMMUNICATIONS-INVALIDEXPIRATIONDATEEXCEPTION-001": {
|
|
@@ -526,6 +526,22 @@ const e = {
|
|
|
526
526
|
title: "El código ya fue canjeado.",
|
|
527
527
|
message: "Código invalido, por favor de generar uno nuevo"
|
|
528
528
|
},
|
|
529
|
+
"COMMUNICATIONS-BLACKLISTEXCEPTION-001": {
|
|
530
|
+
title: "Por favor de intentar con otro número telefónico",
|
|
531
|
+
message: "El número telefónico se encuentra en listas negras"
|
|
532
|
+
},
|
|
533
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003": {
|
|
534
|
+
title: "Número de teléfono inválido",
|
|
535
|
+
message: "Por favor de revisar el número de teléfono"
|
|
536
|
+
},
|
|
537
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004": {
|
|
538
|
+
title: "No se encontró el número de teléfono",
|
|
539
|
+
message: "Por favor de revisar el número de teléfono"
|
|
540
|
+
},
|
|
541
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005": {
|
|
542
|
+
title: "El número ya está registrado",
|
|
543
|
+
message: "Por favor ingresa otro número de teléfono"
|
|
544
|
+
},
|
|
529
545
|
//ENROLLMENT
|
|
530
546
|
...o.enrollment,
|
|
531
547
|
//Personal References
|
|
@@ -292,6 +292,22 @@ declare const translation: {
|
|
|
292
292
|
title: string;
|
|
293
293
|
message: string;
|
|
294
294
|
};
|
|
295
|
+
"COMMUNICATIONS-BLACKLISTEXCEPTION-001": {
|
|
296
|
+
title: string;
|
|
297
|
+
message: string;
|
|
298
|
+
};
|
|
299
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003": {
|
|
300
|
+
title: string;
|
|
301
|
+
message: string;
|
|
302
|
+
};
|
|
303
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004": {
|
|
304
|
+
title: string;
|
|
305
|
+
message: string;
|
|
306
|
+
};
|
|
307
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005": {
|
|
308
|
+
title: string;
|
|
309
|
+
message: string;
|
|
310
|
+
};
|
|
295
311
|
calculator: {
|
|
296
312
|
"SCORE-CLIENTREJECTED-01": {
|
|
297
313
|
title: 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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0OhB,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-
|
|
5
|
+
import "./index-21452318.js";
|
|
6
6
|
import "./mp-front-cli-logger.es.js";
|
|
7
7
|
import "rxjs";
|
|
8
8
|
import "./mp-front-cli-encrypter.es.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
2
|
var n = (N, s, e) => s in N ? c(N, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : N[s] = e;
|
|
3
|
-
var
|
|
4
|
-
import { LoadingHandler as i, MessageHandler as
|
|
3
|
+
var T = (N, s, e) => (n(N, typeof s != "symbol" ? s + "" : s, e), e);
|
|
4
|
+
import { LoadingHandler as i, MessageHandler as g } from "./mp-front-cli-utils-rxjs.es.js";
|
|
5
5
|
import { RxSubjectManager as z } from "./mp-front-cli-utils-rxjs.es.js";
|
|
6
|
-
import { f as
|
|
6
|
+
import { f as U } from "./index-def0b487.js";
|
|
7
7
|
import { S as ee } from "./index-def0b487.js";
|
|
8
8
|
import d, { t as m } from "i18next";
|
|
9
|
-
import { t as P } from "./index-
|
|
9
|
+
import { t as P } from "./index-21452318.js";
|
|
10
10
|
import { CustomLogger as B } from "./mp-front-cli-logger.es.js";
|
|
11
|
-
import { of as o, switchMap as
|
|
11
|
+
import { of as o, switchMap as R, forkJoin as S, catchError as I, EMPTY as C, filter as M } from "rxjs";
|
|
12
12
|
import { CustomEncrypter as u } from "./mp-front-cli-encrypter.es.js";
|
|
13
13
|
import { CustomHeader as p } from "./mp-front-cli-header.es.js";
|
|
14
14
|
import { CustomEncoder as y } from "./mp-front-cli-encoder.es.js";
|
|
15
|
-
import { a as
|
|
15
|
+
import { a as D } from "./v5-cbd101aa.js";
|
|
16
16
|
import "node-jose";
|
|
17
17
|
import "crypto";
|
|
18
18
|
const v = {
|
|
@@ -354,6 +354,34 @@ const Q = {
|
|
|
354
354
|
type: "modal",
|
|
355
355
|
level: "warning"
|
|
356
356
|
},
|
|
357
|
+
"COMMUNICATIONS-BLACKLISTEXCEPTION-001": {
|
|
358
|
+
title: "errors.COMMUNICATIONS-BLACKLISTEXCEPTION-001.title",
|
|
359
|
+
message: "errors.COMMUNICATIONS-BLACKLISTEXCEPTION-001.message",
|
|
360
|
+
code: 403,
|
|
361
|
+
type: "modal",
|
|
362
|
+
level: "warning"
|
|
363
|
+
},
|
|
364
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003": {
|
|
365
|
+
title: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003.title",
|
|
366
|
+
message: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-003.message",
|
|
367
|
+
code: 400,
|
|
368
|
+
type: "modal",
|
|
369
|
+
level: "warning"
|
|
370
|
+
},
|
|
371
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004": {
|
|
372
|
+
title: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004.title",
|
|
373
|
+
message: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-004.message",
|
|
374
|
+
code: 400,
|
|
375
|
+
type: "modal",
|
|
376
|
+
level: "warning"
|
|
377
|
+
},
|
|
378
|
+
"COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005": {
|
|
379
|
+
title: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005.title",
|
|
380
|
+
message: "errors.COMMUNICATIONS-INVALIDNUMBEREXCEPTION-005.message",
|
|
381
|
+
code: 400,
|
|
382
|
+
type: "modal",
|
|
383
|
+
level: "warning"
|
|
384
|
+
},
|
|
357
385
|
// Calculator
|
|
358
386
|
"SCORE-CLIENTREJECTED-01": {
|
|
359
387
|
title: "errors.calculator.SCORE-CLIENTREJECTED-01.title",
|
|
@@ -980,8 +1008,8 @@ class O extends B {
|
|
|
980
1008
|
class X extends u {
|
|
981
1009
|
constructor() {
|
|
982
1010
|
super(...arguments);
|
|
983
|
-
|
|
984
|
-
|
|
1011
|
+
T(this, "uuid", "");
|
|
1012
|
+
T(this, "session", null);
|
|
985
1013
|
}
|
|
986
1014
|
setSession(e) {
|
|
987
1015
|
this.session = e;
|
|
@@ -1002,27 +1030,27 @@ class X extends u {
|
|
|
1002
1030
|
return this.logDebug("get ApiMiddleware"), (r, t) => {
|
|
1003
1031
|
var E;
|
|
1004
1032
|
this.logDebug("return ApiMiddleware"), this.uuid = (E = r == null ? void 0 : r.body) == null ? void 0 : E.uuid, o(r).pipe(
|
|
1005
|
-
|
|
1006
|
-
(l) =>
|
|
1033
|
+
R(
|
|
1034
|
+
(l) => S({
|
|
1007
1035
|
params: o(this.decode(l.body)),
|
|
1008
1036
|
headers: o(l.headers)
|
|
1009
1037
|
})
|
|
1010
1038
|
),
|
|
1011
|
-
|
|
1012
|
-
({ params: l, headers: a }) =>
|
|
1039
|
+
R(
|
|
1040
|
+
({ params: l, headers: a }) => S({
|
|
1013
1041
|
response: e(l, this.uuid, a),
|
|
1014
1042
|
headers: o(a),
|
|
1015
1043
|
params: o(l)
|
|
1016
1044
|
})
|
|
1017
1045
|
),
|
|
1018
|
-
|
|
1046
|
+
R(({ params: l, response: a, headers: A }) => (this.logDebug(
|
|
1019
1047
|
`ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(A)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(l)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)}`
|
|
1020
1048
|
), o(a))),
|
|
1021
|
-
|
|
1049
|
+
I((l) => {
|
|
1022
1050
|
var a;
|
|
1023
1051
|
return this.logError(
|
|
1024
1052
|
`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(l)}`
|
|
1025
|
-
), this.returnError(t, l),
|
|
1053
|
+
), this.returnError(t, l), C;
|
|
1026
1054
|
})
|
|
1027
1055
|
).subscribe({
|
|
1028
1056
|
next: (l) => {
|
|
@@ -1032,12 +1060,12 @@ class X extends u {
|
|
|
1032
1060
|
};
|
|
1033
1061
|
}
|
|
1034
1062
|
}
|
|
1035
|
-
const
|
|
1063
|
+
const V = process.env.ID_FRONT ?? "NOT_AVAILABLE";
|
|
1036
1064
|
class W extends p {
|
|
1037
1065
|
constructor(e, r, t = {}) {
|
|
1038
1066
|
super(t);
|
|
1039
|
-
|
|
1040
|
-
|
|
1067
|
+
T(this, "apiUrl");
|
|
1068
|
+
T(this, "method");
|
|
1041
1069
|
this.apiUrl = e, this.method = r ?? "POST";
|
|
1042
1070
|
}
|
|
1043
1071
|
errorHandler(e, r) {
|
|
@@ -1048,15 +1076,15 @@ class W extends p {
|
|
|
1048
1076
|
formatParams(e) {
|
|
1049
1077
|
return JSON.stringify({
|
|
1050
1078
|
data: {
|
|
1051
|
-
type:
|
|
1079
|
+
type: V,
|
|
1052
1080
|
attributes: e
|
|
1053
1081
|
}
|
|
1054
1082
|
});
|
|
1055
1083
|
}
|
|
1056
1084
|
fetchData(e = {}, r) {
|
|
1057
1085
|
return this.getHeaders().pipe(
|
|
1058
|
-
|
|
1059
|
-
(t) =>
|
|
1086
|
+
R(
|
|
1087
|
+
(t) => U(
|
|
1060
1088
|
this.apiUrl,
|
|
1061
1089
|
{
|
|
1062
1090
|
method: "POST",
|
|
@@ -1065,7 +1093,7 @@ class W extends p {
|
|
|
1065
1093
|
selector: (E) => E.json()
|
|
1066
1094
|
}
|
|
1067
1095
|
).pipe(
|
|
1068
|
-
|
|
1096
|
+
I((E) => {
|
|
1069
1097
|
throw this.logError(JSON.stringify(E)), this.logError(
|
|
1070
1098
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1071
1099
|
t
|
|
@@ -1074,7 +1102,7 @@ class W extends p {
|
|
|
1074
1102
|
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
|
|
1075
1103
|
), new O().get("default", r);
|
|
1076
1104
|
}),
|
|
1077
|
-
|
|
1105
|
+
R((E) => (this.logDebug(
|
|
1078
1106
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1079
1107
|
t
|
|
1080
1108
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
@@ -1088,14 +1116,14 @@ class W extends p {
|
|
|
1088
1116
|
}
|
|
1089
1117
|
fetchCustomData(e = {}, r) {
|
|
1090
1118
|
return this.getHeaders().pipe(
|
|
1091
|
-
|
|
1092
|
-
(t) =>
|
|
1119
|
+
R(
|
|
1120
|
+
(t) => U(this.apiUrl, {
|
|
1093
1121
|
method: this.method,
|
|
1094
1122
|
headers: t,
|
|
1095
1123
|
body: this.method === "GET" ? null : JSON.stringify(e),
|
|
1096
1124
|
selector: (E) => E.json()
|
|
1097
1125
|
}).pipe(
|
|
1098
|
-
|
|
1126
|
+
I((E) => {
|
|
1099
1127
|
throw this.logError(JSON.stringify(E)), this.logError(
|
|
1100
1128
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1101
1129
|
t
|
|
@@ -1104,7 +1132,7 @@ class W extends p {
|
|
|
1104
1132
|
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
|
|
1105
1133
|
), new O().get("default", r);
|
|
1106
1134
|
}),
|
|
1107
|
-
|
|
1135
|
+
R((E) => (this.logDebug(
|
|
1108
1136
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
1109
1137
|
t
|
|
1110
1138
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
@@ -1119,11 +1147,11 @@ class W extends p {
|
|
|
1119
1147
|
class j extends y {
|
|
1120
1148
|
constructor(e, r = "POST", t = {}) {
|
|
1121
1149
|
super();
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1150
|
+
T(this, "apiUrl");
|
|
1151
|
+
T(this, "method");
|
|
1152
|
+
T(this, "headers");
|
|
1153
|
+
T(this, "isLoadingEnabled", !0);
|
|
1154
|
+
T(this, "errorResponse");
|
|
1127
1155
|
this.apiUrl = e, this.method = r, this.headers = {
|
|
1128
1156
|
"Content-Type": "application/json",
|
|
1129
1157
|
...t
|
|
@@ -1136,27 +1164,27 @@ class j extends y {
|
|
|
1136
1164
|
this.errorResponse = e;
|
|
1137
1165
|
}
|
|
1138
1166
|
fetchData(e = {}) {
|
|
1139
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), t =
|
|
1167
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), t = D(r, D.URL), E = this.encode({ ...e }, t);
|
|
1140
1168
|
i.getInstance().setSubject(this.isLoadingEnabled);
|
|
1141
1169
|
const a = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
|
|
1142
|
-
return
|
|
1170
|
+
return U(this.apiUrl, {
|
|
1143
1171
|
method: this.method,
|
|
1144
1172
|
headers: { ...this.headers, flow: a },
|
|
1145
1173
|
body: E,
|
|
1146
1174
|
selector: (A) => A.json()
|
|
1147
1175
|
}).pipe(
|
|
1148
|
-
|
|
1149
|
-
|
|
1176
|
+
R((A) => o(this.decode(A))),
|
|
1177
|
+
R((A) => A.code && (A.type === "modal" || A.type === "message") ? (this.logError(
|
|
1150
1178
|
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(A)}`
|
|
1151
|
-
), i.getInstance().setSubject(!1),
|
|
1152
|
-
|
|
1179
|
+
), i.getInstance().setSubject(!1), g.getInstance().setSubject(A), this.errorResponse ? o(this.errorResponse) : C) : o(A)),
|
|
1180
|
+
R((A) => (i.getInstance().setSubject(!1), this.logDebug(
|
|
1153
1181
|
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(A)}`
|
|
1154
1182
|
), o(A))),
|
|
1155
|
-
|
|
1183
|
+
I((A) => (this.logError(
|
|
1156
1184
|
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(A)}`
|
|
1157
|
-
), i.getInstance().setSubject(!1),
|
|
1185
|
+
), i.getInstance().setSubject(!1), g.getInstance().setSubject(
|
|
1158
1186
|
new O().get(A, t)
|
|
1159
|
-
), this.errorResponse ? o(this.errorResponse) :
|
|
1187
|
+
), this.errorResponse ? o(this.errorResponse) : C))
|
|
1160
1188
|
);
|
|
1161
1189
|
}
|
|
1162
1190
|
}
|
|
@@ -1166,7 +1194,7 @@ export {
|
|
|
1166
1194
|
W as FetchServiceBE,
|
|
1167
1195
|
j as FetchServiceFE,
|
|
1168
1196
|
i as LoadingHandler,
|
|
1169
|
-
|
|
1197
|
+
g as MessageHandler,
|
|
1170
1198
|
z as RxSubjectManager,
|
|
1171
1199
|
ee as ServiceToken
|
|
1172
1200
|
};
|