mp-front-cli 0.0.83 → 0.0.84
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/enrollment/error-catalog-enrollment.d.ts +5 -0
- package/dist/core/errors/enrollment/error-catalog-enrollment.d.ts.map +1 -0
- package/dist/core/errors/error-catalog.d.ts.map +1 -1
- package/dist/core/utils/api-request/fetch-service-be.d.ts.map +1 -1
- package/dist/{index-93655627.js → index-2c99e6eb.js} +20 -7
- package/dist/lang/common/errors/es_MX/index.d.ts +12 -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 +199 -137
- package/dist/mp-front-cli-locale.es.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-catalog-enrollment.d.ts","sourceRoot":"","sources":["../../../../src/core/errors/enrollment/error-catalog-enrollment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,eAAO,MAAM,sBAAsB,EAAE;IACnC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAA;CAqOnC,CAAA"}
|
|
@@ -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;AAmmBrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;CA8B7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-service-be.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/api-request/fetch-service-be.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,
|
|
1
|
+
{"version":3,"file":"fetch-service-be.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/api-request/fetch-service-be.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAA0B,MAAM,MAAM,CAAA;AAEpE,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,qBAAa,cAAc,CACzB,IAAI,EACJ,KAAK,GAAG,EAAE,EACV,gBAAgB,SAAS,iBAAiB,GAAG,QAAQ,EACrD,aAAa,GAAG,EAAE,CAClB,SAAQ,YAAY;IACpB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB;IAMtE,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,YAAY;IASpB,SAAS,CACP,MAAM,GAAE,KAAmB,EAC3B,IAAI,CAAC,EAAE,MAAM,GACZ,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;IA2CjE,eAAe,CACb,MAAM,GAAE,KAAmB,EAC3B,IAAI,CAAC,EAAE,MAAM,GACZ,UAAU,CAAC,IAAI,CAAC;CAwCpB"}
|
|
@@ -186,7 +186,7 @@ const e = {
|
|
|
186
186
|
message: "Error de servicio"
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
},
|
|
189
|
+
}, a = {
|
|
190
190
|
enrollment: {
|
|
191
191
|
"ENROLLMENT-INVALIDCONFIGURATION-0000": {
|
|
192
192
|
title: "Por favor comuníquese con la mesa de ayuda para que activen las banderas de Nuovo.",
|
|
@@ -317,7 +317,7 @@ const e = {
|
|
|
317
317
|
message: "No se pudo obtener el token de autenticación para la API de Trustonic"
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
},
|
|
320
|
+
}, o = {
|
|
321
321
|
errors: {
|
|
322
322
|
default: {
|
|
323
323
|
title: "No pudimos cargar alguno de los datos solicitados.",
|
|
@@ -468,20 +468,33 @@ const e = {
|
|
|
468
468
|
//TERMINOS Y CONDICIONES
|
|
469
469
|
"COMMUNICATIONS-INVALIDCODEEXCEPTION-001": {
|
|
470
470
|
title: "Código incorrecto.",
|
|
471
|
-
message: "Código invalido, por favor de generar uno nuevo
|
|
471
|
+
message: "Código invalido, por favor de generar uno nuevo"
|
|
472
472
|
},
|
|
473
473
|
"COMMUNICATIONS-INVALIDEXPIRATIONDATEEXCEPTION-001": {
|
|
474
474
|
title: "Código expirado",
|
|
475
|
-
message: "Por favor de generar otro código
|
|
475
|
+
message: "Por favor de generar otro código"
|
|
476
476
|
},
|
|
477
477
|
"COMMUNICATIONS-INVALIDCODEEXCEPTION-002": {
|
|
478
478
|
title: "El código ya fue canjeado.",
|
|
479
|
-
message: "Código invalido, por favor de generar uno nuevo
|
|
479
|
+
message: "Código invalido, por favor de generar uno nuevo"
|
|
480
480
|
},
|
|
481
481
|
//ENROLLMENT
|
|
482
|
-
...
|
|
482
|
+
...a,
|
|
483
|
+
//Personal References
|
|
484
|
+
"PERSONALREFERENCE-ACTIVECREDITSEXCEPTION-01": {
|
|
485
|
+
title: "Intentar con otra referencia",
|
|
486
|
+
message: "La referencia se encuentra con creditos activos"
|
|
487
|
+
},
|
|
488
|
+
"PERSONALREFERENCE-REFERENCESEXCEPTION-01": {
|
|
489
|
+
title: "Intentar con otra referencia",
|
|
490
|
+
message: "El número telefónico proporcionado se encuentra referido con más de 3 clientes"
|
|
491
|
+
},
|
|
492
|
+
"PERSONALREFERENCE-BLACKLISTEXCEPTION-01": {
|
|
493
|
+
title: "Intentar con otra referencia",
|
|
494
|
+
message: "El número telefónico se encuentra en listas negras"
|
|
495
|
+
}
|
|
483
496
|
}
|
|
484
497
|
};
|
|
485
498
|
export {
|
|
486
|
-
|
|
499
|
+
o as t
|
|
487
500
|
};
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
declare const translation: {
|
|
2
2
|
errors: {
|
|
3
|
+
"PERSONALREFERENCE-ACTIVECREDITSEXCEPTION-01": {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
"PERSONALREFERENCE-REFERENCESEXCEPTION-01": {
|
|
8
|
+
title: string;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
"PERSONALREFERENCE-BLACKLISTEXCEPTION-01": {
|
|
12
|
+
title: string;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
3
15
|
enrollment: {
|
|
4
16
|
"ENROLLMENT-INVALIDCONFIGURATION-0000": {
|
|
5
17
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6LhB,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiMiddleware as n, ErrorCatalog as x, FetchServiceBE as E, FetchServiceFE as F } from "./mp-front-cli-core.es.js";
|
|
2
2
|
import { LoadingHandler as S, MessageHandler as f, RxSubjectManager as h } from "./mp-front-cli-utils-rxjs.es.js";
|
|
3
3
|
import "i18next";
|
|
4
|
-
import "./index-
|
|
4
|
+
import "./index-2c99e6eb.js";
|
|
5
5
|
import "./mp-front-cli-logger.es.js";
|
|
6
6
|
import "rxjs";
|
|
7
7
|
import "./mp-front-cli-encrypter.es.js";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (
|
|
4
|
-
import { MessageHandler as
|
|
5
|
-
import { RxSubjectManager as
|
|
6
|
-
import
|
|
7
|
-
import { t as
|
|
8
|
-
import { CustomLogger as
|
|
9
|
-
import { of as T, switchMap as c, forkJoin as
|
|
10
|
-
import { CustomEncrypter as
|
|
11
|
-
import { C as
|
|
12
|
-
import { CustomEncoder as
|
|
13
|
-
import { u as
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var w = (s, t, e) => t in s ? h(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var L = (s, t, e) => (w(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import { MessageHandler as B, LoadingHandler as g } from "./mp-front-cli-utils-rxjs.es.js";
|
|
5
|
+
import { RxSubjectManager as Ce } from "./mp-front-cli-utils-rxjs.es.js";
|
|
6
|
+
import x, { t as U } from "i18next";
|
|
7
|
+
import { t as Q } from "./index-2c99e6eb.js";
|
|
8
|
+
import { CustomLogger as v } from "./mp-front-cli-logger.es.js";
|
|
9
|
+
import { of as T, switchMap as c, forkJoin as u, catchError as N, EMPTY as P, filter as p } from "rxjs";
|
|
10
|
+
import { CustomEncrypter as M } from "./mp-front-cli-encrypter.es.js";
|
|
11
|
+
import { C as F, f as d } from "./custom-header-b6432556.js";
|
|
12
|
+
import { CustomEncoder as V } from "./mp-front-cli-encoder.es.js";
|
|
13
|
+
import { u as G } from "./stringify-788d71a0.js";
|
|
14
14
|
import "node-jose";
|
|
15
15
|
import "crypto";
|
|
16
16
|
const J = {
|
|
17
17
|
es: {
|
|
18
18
|
translation: {
|
|
19
|
-
...
|
|
19
|
+
...Q
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
x.init({
|
|
24
24
|
resources: J,
|
|
25
25
|
lng: "es",
|
|
26
26
|
// language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
|
|
@@ -33,7 +33,7 @@ w.init({
|
|
|
33
33
|
},
|
|
34
34
|
debug: !1
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const C = {
|
|
37
37
|
"MP-001": {
|
|
38
38
|
code: 400,
|
|
39
39
|
type: "modal",
|
|
@@ -105,13 +105,35 @@ const g = {
|
|
|
105
105
|
code: 420,
|
|
106
106
|
type: "modal"
|
|
107
107
|
},
|
|
108
|
+
//Terms and conditions
|
|
109
|
+
"COMMUNICATIONS-INVALIDCODEEXCEPTION-001": {
|
|
110
|
+
title: "errors.COMMUNICATIONS-INVALIDCODEEXCEPTION-001.title",
|
|
111
|
+
message: "errors.COMMUNICATIONS-INVALIDCODEEXCEPTION-001.message",
|
|
112
|
+
code: 400,
|
|
113
|
+
type: "modal",
|
|
114
|
+
level: "warning"
|
|
115
|
+
},
|
|
116
|
+
"COMMUNICATIONS-INVALIDEXPIRATIONDATEEXCEPTION-001": {
|
|
117
|
+
title: "errors.COMMUNICATIONS-INVALIDEXPIRATIONDATEEXCEPTION-001.title",
|
|
118
|
+
message: "errors.COMMUNICATIONS-INVALIDEXPIRATIONDATEEXCEPTION-001.message",
|
|
119
|
+
code: 400,
|
|
120
|
+
type: "modal",
|
|
121
|
+
level: "warning"
|
|
122
|
+
},
|
|
123
|
+
"COMMUNICATIONS-INVALIDCODEEXCEPTION-002": {
|
|
124
|
+
title: "errors.COMMUNICATIONS-INVALIDCODEEXCEPTION-002.title",
|
|
125
|
+
message: "errors.COMMUNICATIONS-INVALIDCODEEXCEPTION-002.message",
|
|
126
|
+
code: 400,
|
|
127
|
+
type: "modal",
|
|
128
|
+
level: "warning"
|
|
129
|
+
},
|
|
108
130
|
// Calculator
|
|
109
131
|
"SCORE-CLIENTREJECTED-01": {
|
|
110
132
|
title: "errors.calculator.SCORE-CLIENTREJECTED-01.title",
|
|
111
133
|
message: "errors.calculator.SCORE-CLIENTREJECTED-01.message",
|
|
112
134
|
code: 310,
|
|
113
135
|
type: "modal",
|
|
114
|
-
level: "
|
|
136
|
+
level: "info"
|
|
115
137
|
},
|
|
116
138
|
"CALCULATOR-MAPPING-01": {
|
|
117
139
|
title: "errors.calculator.CALCULATOR-MAPPING-01.title",
|
|
@@ -592,36 +614,58 @@ const g = {
|
|
|
592
614
|
code: 420,
|
|
593
615
|
type: "modal",
|
|
594
616
|
level: "warning"
|
|
617
|
+
},
|
|
618
|
+
//Personal references
|
|
619
|
+
"PERSONALREFERENCE-ACTIVECREDITSEXCEPTION-01": {
|
|
620
|
+
title: "errors.PERSONALREFERENCE-ACTIVECREDITSEXCEPTION-01.title",
|
|
621
|
+
message: "errors.PERSONALREFERENCE-ACTIVECREDITSEXCEPTION-01.message",
|
|
622
|
+
code: 422,
|
|
623
|
+
type: "modal",
|
|
624
|
+
level: "warning"
|
|
625
|
+
},
|
|
626
|
+
"PERSONALREFERENCE-REFERENCESEXCEPTION-01": {
|
|
627
|
+
title: "errors.PERSONALREFERENCE-REFERENCESEXCEPTION-01.title",
|
|
628
|
+
message: "errors.PERSONALREFERENCE-REFERENCESEXCEPTION-01.message",
|
|
629
|
+
code: 422,
|
|
630
|
+
type: "modal",
|
|
631
|
+
level: "warning"
|
|
632
|
+
},
|
|
633
|
+
"PERSONALREFERENCE-BLACKLISTEXCEPTION-01": {
|
|
634
|
+
title: "errors.PERSONALREFERENCE-BLACKLISTEXCEPTION-01.title",
|
|
635
|
+
message: "errors.PERSONALREFERENCE-BLACKLISTEXCEPTION-01.message",
|
|
636
|
+
code: 403,
|
|
637
|
+
type: "modal",
|
|
638
|
+
level: "warning"
|
|
595
639
|
}
|
|
596
640
|
};
|
|
597
|
-
class
|
|
641
|
+
class m extends v {
|
|
598
642
|
get(t = "default", e = "NOT_FOUND") {
|
|
599
|
-
var
|
|
643
|
+
var l, A;
|
|
600
644
|
if (t instanceof Error)
|
|
601
645
|
return this.logError(t.message), {
|
|
602
|
-
...
|
|
603
|
-
title: C
|
|
604
|
-
message: C
|
|
646
|
+
...C.internalError,
|
|
647
|
+
title: U(C.internalError.title),
|
|
648
|
+
message: U(C.internalError.message),
|
|
605
649
|
uuid: e
|
|
606
650
|
};
|
|
607
651
|
const r = typeof t == "string" ? t : t.code ?? t.errorType;
|
|
608
652
|
this.logDebug("statusCode", r);
|
|
609
|
-
const
|
|
653
|
+
const a = typeof t == "string" ? {} : { ...t };
|
|
610
654
|
return {
|
|
611
|
-
...
|
|
612
|
-
title:
|
|
613
|
-
((
|
|
614
|
-
|
|
655
|
+
...C[r] ?? C.default,
|
|
656
|
+
title: U(
|
|
657
|
+
((l = C[r]) == null ? void 0 : l.title) ?? C.default.title,
|
|
658
|
+
a
|
|
615
659
|
),
|
|
616
|
-
message:
|
|
617
|
-
((
|
|
618
|
-
|
|
660
|
+
message: U(
|
|
661
|
+
((A = C[r]) == null ? void 0 : A.message) ?? C.default.message,
|
|
662
|
+
a
|
|
619
663
|
),
|
|
620
664
|
uuid: e
|
|
621
665
|
};
|
|
622
666
|
}
|
|
623
667
|
}
|
|
624
|
-
class Re extends
|
|
668
|
+
class Re extends M {
|
|
625
669
|
constructor() {
|
|
626
670
|
super(...arguments);
|
|
627
671
|
L(this, "uuid", "");
|
|
@@ -632,67 +676,67 @@ class Re extends G {
|
|
|
632
676
|
}
|
|
633
677
|
getSession() {
|
|
634
678
|
if (!this.session)
|
|
635
|
-
throw new
|
|
679
|
+
throw new m().get("SESSION_NOT_FOUND");
|
|
636
680
|
return this.session;
|
|
637
681
|
}
|
|
638
|
-
returnData(e, r,
|
|
639
|
-
const
|
|
640
|
-
e.status(200).json(
|
|
682
|
+
returnData(e, r, a) {
|
|
683
|
+
const l = this.encode(r, a);
|
|
684
|
+
e.status(200).json(l);
|
|
641
685
|
}
|
|
642
686
|
returnError(e, r) {
|
|
643
|
-
return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new
|
|
687
|
+
return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new m().get(r, this.uuid));
|
|
644
688
|
}
|
|
645
689
|
get(e) {
|
|
646
|
-
return this.logDebug("get ApiMiddleware"), (r,
|
|
647
|
-
var
|
|
648
|
-
this.logDebug("return ApiMiddleware"), this.uuid = (
|
|
690
|
+
return this.logDebug("get ApiMiddleware"), (r, a) => {
|
|
691
|
+
var l;
|
|
692
|
+
this.logDebug("return ApiMiddleware"), this.uuid = (l = r == null ? void 0 : r.body) == null ? void 0 : l.uuid, T(r).pipe(
|
|
649
693
|
c(
|
|
650
|
-
(
|
|
651
|
-
params: T(this.decode(
|
|
652
|
-
headers: T(
|
|
694
|
+
(A) => u({
|
|
695
|
+
params: T(this.decode(A.body)),
|
|
696
|
+
headers: T(A.headers)
|
|
653
697
|
})
|
|
654
698
|
),
|
|
655
699
|
c(
|
|
656
|
-
({ params:
|
|
657
|
-
response: e(
|
|
700
|
+
({ params: A, headers: o }) => u({
|
|
701
|
+
response: e(A, this.uuid, o),
|
|
658
702
|
headers: T(o),
|
|
659
|
-
params: T(
|
|
703
|
+
params: T(A)
|
|
660
704
|
})
|
|
661
705
|
),
|
|
662
|
-
c(({ params:
|
|
663
|
-
`ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(E)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(
|
|
706
|
+
c(({ params: A, response: o, headers: E }) => (this.logDebug(
|
|
707
|
+
`ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(E)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(A)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(o)}`
|
|
664
708
|
), T(o))),
|
|
665
|
-
|
|
709
|
+
N((A) => {
|
|
666
710
|
var o;
|
|
667
711
|
return this.logError(
|
|
668
|
-
`ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(o = r == null ? void 0 : r.body) == null ? void 0 : o.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(
|
|
669
|
-
), this.returnError(
|
|
712
|
+
`ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(o = r == null ? void 0 : r.body) == null ? void 0 : o.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(A)}`
|
|
713
|
+
), this.returnError(a, A), P;
|
|
670
714
|
})
|
|
671
715
|
).subscribe({
|
|
672
|
-
next: (
|
|
673
|
-
this.logDebug("ApiMiddleware subscribe next", JSON.stringify(
|
|
716
|
+
next: (A) => {
|
|
717
|
+
this.logDebug("ApiMiddleware subscribe next", JSON.stringify(A)), this.returnData(a, A, this.uuid);
|
|
674
718
|
}
|
|
675
719
|
});
|
|
676
720
|
};
|
|
677
721
|
}
|
|
678
722
|
}
|
|
679
|
-
const
|
|
680
|
-
class Te extends
|
|
681
|
-
constructor(e, r,
|
|
682
|
-
super(
|
|
723
|
+
const $ = process.env.ID_FRONT ?? "NOT_AVAILABLE";
|
|
724
|
+
class Te extends F {
|
|
725
|
+
constructor(e, r, a = {}) {
|
|
726
|
+
super(a);
|
|
683
727
|
L(this, "apiUrl");
|
|
684
728
|
L(this, "method");
|
|
685
729
|
this.apiUrl = e, this.method = r ?? "POST";
|
|
686
730
|
}
|
|
687
731
|
errorHandler(e, r) {
|
|
688
732
|
if (e != null && e.errors)
|
|
689
|
-
throw new
|
|
733
|
+
throw new m().get(e.errors[0], r);
|
|
690
734
|
return !(e != null && e.errors);
|
|
691
735
|
}
|
|
692
736
|
formatParams(e) {
|
|
693
737
|
return JSON.stringify({
|
|
694
738
|
data: {
|
|
695
|
-
type:
|
|
739
|
+
type: $,
|
|
696
740
|
attributes: e
|
|
697
741
|
}
|
|
698
742
|
});
|
|
@@ -700,89 +744,107 @@ class Te extends M {
|
|
|
700
744
|
fetchData(e = {}, r) {
|
|
701
745
|
return this.getHeaders().pipe(
|
|
702
746
|
c(
|
|
703
|
-
(
|
|
747
|
+
(a) => d(
|
|
704
748
|
this.apiUrl,
|
|
705
749
|
{
|
|
706
750
|
method: "POST",
|
|
707
|
-
headers:
|
|
751
|
+
headers: a,
|
|
708
752
|
body: this.formatParams(e),
|
|
709
|
-
selector: (
|
|
753
|
+
selector: (l) => l.json()
|
|
710
754
|
}
|
|
711
755
|
).pipe(
|
|
712
|
-
|
|
756
|
+
N((l) => {
|
|
757
|
+
throw this.logError(JSON.stringify(l)), this.logError(
|
|
758
|
+
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
759
|
+
a
|
|
760
|
+
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
761
|
+
this.formatParams(e)
|
|
762
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(l)} \x1B[33m`
|
|
763
|
+
), new m().get("default", r);
|
|
764
|
+
}),
|
|
765
|
+
c((l) => (this.logDebug(
|
|
713
766
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
714
|
-
|
|
767
|
+
a
|
|
715
768
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
716
769
|
this.formatParams(e)
|
|
717
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
718
|
-
), T(
|
|
770
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(l)} \x1B[33m`
|
|
771
|
+
), T(l)))
|
|
719
772
|
)
|
|
720
773
|
),
|
|
721
|
-
|
|
774
|
+
p((a) => this.errorHandler(a, r))
|
|
722
775
|
);
|
|
723
776
|
}
|
|
724
777
|
fetchCustomData(e = {}, r) {
|
|
725
778
|
return this.getHeaders().pipe(
|
|
726
779
|
c(
|
|
727
|
-
(
|
|
780
|
+
(a) => d(this.apiUrl, {
|
|
728
781
|
method: this.method,
|
|
729
|
-
headers:
|
|
782
|
+
headers: a,
|
|
730
783
|
body: this.method === "GET" ? null : JSON.stringify(e),
|
|
731
|
-
selector: (
|
|
784
|
+
selector: (l) => l.json()
|
|
732
785
|
}).pipe(
|
|
733
|
-
|
|
786
|
+
N((l) => {
|
|
787
|
+
throw this.logError(JSON.stringify(l)), this.logError(
|
|
788
|
+
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
789
|
+
a
|
|
790
|
+
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
791
|
+
this.formatParams(e)
|
|
792
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(l)} \x1B[33m`
|
|
793
|
+
), new m().get("default", r);
|
|
794
|
+
}),
|
|
795
|
+
c((l) => (this.logDebug(
|
|
734
796
|
`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(
|
|
735
|
-
|
|
797
|
+
a
|
|
736
798
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
737
799
|
e
|
|
738
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
739
|
-
), T(
|
|
800
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(l)} \x1B[33m`
|
|
801
|
+
), T(l)))
|
|
740
802
|
)
|
|
741
803
|
)
|
|
742
804
|
);
|
|
743
805
|
}
|
|
744
806
|
}
|
|
745
|
-
const
|
|
746
|
-
function
|
|
747
|
-
return typeof
|
|
807
|
+
const b = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
808
|
+
function Y(s) {
|
|
809
|
+
return typeof s == "string" && b.test(s);
|
|
748
810
|
}
|
|
749
|
-
function
|
|
750
|
-
if (!
|
|
811
|
+
function H(s) {
|
|
812
|
+
if (!Y(s))
|
|
751
813
|
throw TypeError("Invalid UUID");
|
|
752
814
|
let t;
|
|
753
815
|
const e = new Uint8Array(16);
|
|
754
|
-
return e[0] = (t = parseInt(
|
|
816
|
+
return e[0] = (t = parseInt(s.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(s.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(s.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(s.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(s.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = t / 4294967296 & 255, e[12] = t >>> 24 & 255, e[13] = t >>> 16 & 255, e[14] = t >>> 8 & 255, e[15] = t & 255, e;
|
|
755
817
|
}
|
|
756
|
-
function
|
|
757
|
-
|
|
818
|
+
function X(s) {
|
|
819
|
+
s = unescape(encodeURIComponent(s));
|
|
758
820
|
const t = [];
|
|
759
|
-
for (let e = 0; e <
|
|
760
|
-
t.push(
|
|
821
|
+
for (let e = 0; e < s.length; ++e)
|
|
822
|
+
t.push(s.charCodeAt(e));
|
|
761
823
|
return t;
|
|
762
824
|
}
|
|
763
|
-
const
|
|
764
|
-
function K(
|
|
765
|
-
function r(
|
|
825
|
+
const j = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", _ = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
826
|
+
function K(s, t, e) {
|
|
827
|
+
function r(a, l, A, o) {
|
|
766
828
|
var E;
|
|
767
|
-
if (typeof
|
|
829
|
+
if (typeof a == "string" && (a = X(a)), typeof l == "string" && (l = H(l)), ((E = l) === null || E === void 0 ? void 0 : E.length) !== 16)
|
|
768
830
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
769
|
-
let R = new Uint8Array(16 +
|
|
770
|
-
if (R.set(
|
|
831
|
+
let R = new Uint8Array(16 + a.length);
|
|
832
|
+
if (R.set(l), R.set(a, l.length), R = e(R), R[6] = R[6] & 15 | t, R[8] = R[8] & 63 | 128, A) {
|
|
771
833
|
o = o || 0;
|
|
772
834
|
for (let n = 0; n < 16; ++n)
|
|
773
|
-
|
|
774
|
-
return
|
|
835
|
+
A[o + n] = R[n];
|
|
836
|
+
return A;
|
|
775
837
|
}
|
|
776
|
-
return
|
|
838
|
+
return G(R);
|
|
777
839
|
}
|
|
778
840
|
try {
|
|
779
|
-
r.name =
|
|
841
|
+
r.name = s;
|
|
780
842
|
} catch {
|
|
781
843
|
}
|
|
782
|
-
return r.DNS =
|
|
844
|
+
return r.DNS = j, r.URL = _, r;
|
|
783
845
|
}
|
|
784
|
-
function
|
|
785
|
-
switch (
|
|
846
|
+
function W(s, t, e, r) {
|
|
847
|
+
switch (s) {
|
|
786
848
|
case 0:
|
|
787
849
|
return t & e ^ ~t & r;
|
|
788
850
|
case 1:
|
|
@@ -793,45 +855,45 @@ function Z(l, t, e, r) {
|
|
|
793
855
|
return t ^ e ^ r;
|
|
794
856
|
}
|
|
795
857
|
}
|
|
796
|
-
function
|
|
797
|
-
return
|
|
858
|
+
function D(s, t) {
|
|
859
|
+
return s << t | s >>> 32 - t;
|
|
798
860
|
}
|
|
799
|
-
function
|
|
861
|
+
function Z(s) {
|
|
800
862
|
const t = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
801
|
-
if (typeof
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
for (let o = 0; o <
|
|
805
|
-
|
|
863
|
+
if (typeof s == "string") {
|
|
864
|
+
const A = unescape(encodeURIComponent(s));
|
|
865
|
+
s = [];
|
|
866
|
+
for (let o = 0; o < A.length; ++o)
|
|
867
|
+
s.push(A.charCodeAt(o));
|
|
806
868
|
} else
|
|
807
|
-
Array.isArray(
|
|
808
|
-
|
|
809
|
-
const r =
|
|
810
|
-
for (let
|
|
869
|
+
Array.isArray(s) || (s = Array.prototype.slice.call(s));
|
|
870
|
+
s.push(128);
|
|
871
|
+
const r = s.length / 4 + 2, a = Math.ceil(r / 16), l = new Array(a);
|
|
872
|
+
for (let A = 0; A < a; ++A) {
|
|
811
873
|
const o = new Uint32Array(16);
|
|
812
874
|
for (let E = 0; E < 16; ++E)
|
|
813
|
-
o[E] =
|
|
814
|
-
A
|
|
875
|
+
o[E] = s[A * 64 + E * 4] << 24 | s[A * 64 + E * 4 + 1] << 16 | s[A * 64 + E * 4 + 2] << 8 | s[A * 64 + E * 4 + 3];
|
|
876
|
+
l[A] = o;
|
|
815
877
|
}
|
|
816
|
-
|
|
817
|
-
for (let
|
|
878
|
+
l[a - 1][14] = (s.length - 1) * 8 / Math.pow(2, 32), l[a - 1][14] = Math.floor(l[a - 1][14]), l[a - 1][15] = (s.length - 1) * 8 & 4294967295;
|
|
879
|
+
for (let A = 0; A < a; ++A) {
|
|
818
880
|
const o = new Uint32Array(80);
|
|
819
881
|
for (let i = 0; i < 16; ++i)
|
|
820
|
-
o[i] = A
|
|
882
|
+
o[i] = l[A][i];
|
|
821
883
|
for (let i = 16; i < 80; ++i)
|
|
822
|
-
o[i] =
|
|
823
|
-
let E = e[0], R = e[1], n = e[2],
|
|
884
|
+
o[i] = D(o[i - 3] ^ o[i - 8] ^ o[i - 14] ^ o[i - 16], 1);
|
|
885
|
+
let E = e[0], R = e[1], n = e[2], O = e[3], S = e[4];
|
|
824
886
|
for (let i = 0; i < 80; ++i) {
|
|
825
|
-
const
|
|
826
|
-
|
|
887
|
+
const I = Math.floor(i / 20), y = D(E, 5) + W(I, R, n, O) + S + t[I] + o[i] >>> 0;
|
|
888
|
+
S = O, O = n, n = D(R, 30) >>> 0, R = E, E = y;
|
|
827
889
|
}
|
|
828
|
-
e[0] = e[0] + E >>> 0, e[1] = e[1] + R >>> 0, e[2] = e[2] + n >>> 0, e[3] = e[3] +
|
|
890
|
+
e[0] = e[0] + E >>> 0, e[1] = e[1] + R >>> 0, e[2] = e[2] + n >>> 0, e[3] = e[3] + O >>> 0, e[4] = e[4] + S >>> 0;
|
|
829
891
|
}
|
|
830
892
|
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];
|
|
831
893
|
}
|
|
832
|
-
const
|
|
833
|
-
class ce extends
|
|
834
|
-
constructor(e, r = "POST",
|
|
894
|
+
const k = K("v5", 80, Z), f = k;
|
|
895
|
+
class ce extends V {
|
|
896
|
+
constructor(e, r = "POST", a = {}) {
|
|
835
897
|
super();
|
|
836
898
|
L(this, "apiUrl");
|
|
837
899
|
L(this, "method");
|
|
@@ -839,43 +901,43 @@ class ce extends F {
|
|
|
839
901
|
L(this, "isLoadingEnabled", !0);
|
|
840
902
|
this.apiUrl = e, this.method = r, this.headers = {
|
|
841
903
|
"Content-Type": "application/json",
|
|
842
|
-
...
|
|
904
|
+
...a
|
|
843
905
|
};
|
|
844
906
|
}
|
|
845
907
|
setIsLoadingEnabled(e) {
|
|
846
908
|
this.isLoadingEnabled = e;
|
|
847
909
|
}
|
|
848
910
|
errorHandler(e) {
|
|
849
|
-
return e.code && (e.type === "modal" || e.type === "message") && (
|
|
911
|
+
return e.code && (e.type === "modal" || e.type === "message") && (B.getInstance().setSubject(e), g.getInstance().setSubject(!1)), !e.code;
|
|
850
912
|
}
|
|
851
913
|
fetchData(e = {}) {
|
|
852
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(),
|
|
853
|
-
|
|
914
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), a = f(r, f.URL), l = this.encode({ ...e }, a);
|
|
915
|
+
g.getInstance().setSubject(this.isLoadingEnabled);
|
|
854
916
|
const o = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
|
|
855
|
-
return
|
|
917
|
+
return d(this.apiUrl, {
|
|
856
918
|
method: this.method,
|
|
857
919
|
headers: { ...this.headers, flow: o },
|
|
858
|
-
body:
|
|
920
|
+
body: l,
|
|
859
921
|
selector: (E) => E.json()
|
|
860
922
|
}).pipe(
|
|
861
923
|
c((E) => T(this.decode(E))),
|
|
862
924
|
c((E) => (this.logDebug(
|
|
863
|
-
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${
|
|
925
|
+
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${l} <RESPONSE>: ${JSON.stringify(E)}`
|
|
864
926
|
), T(E))),
|
|
865
|
-
|
|
866
|
-
c((E) => (
|
|
867
|
-
|
|
868
|
-
new
|
|
869
|
-
),
|
|
927
|
+
p(this.errorHandler),
|
|
928
|
+
c((E) => (g.getInstance().setSubject(!1), T(E))),
|
|
929
|
+
N((E) => (g.getInstance().setSubject(!1), B.getInstance().setSubject(
|
|
930
|
+
new m().get(E, a)
|
|
931
|
+
), P))
|
|
870
932
|
);
|
|
871
933
|
}
|
|
872
934
|
}
|
|
873
935
|
export {
|
|
874
936
|
Re as ApiMiddleware,
|
|
875
|
-
|
|
937
|
+
m as ErrorCatalog,
|
|
876
938
|
Te as FetchServiceBE,
|
|
877
939
|
ce as FetchServiceFE,
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
940
|
+
g as LoadingHandler,
|
|
941
|
+
B as MessageHandler,
|
|
942
|
+
Ce as RxSubjectManager
|
|
881
943
|
};
|