mp-front-cli 0.0.84 → 0.0.85
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-2c99e6eb.js → index-721e6908.js} +22 -22
- package/dist/lang/common/errors/enrollment/en_MX/index.d.ts +1 -1
- package/dist/lang/common/errors/enrollment/en_MX/index.d.ts.map +1 -1
- package/dist/lang/common/errors/es_MX/index.d.ts +127 -129
- 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 +396 -170
- 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;AAqmBrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;CA8B7B"}
|
|
@@ -186,11 +186,11 @@ const e = {
|
|
|
186
186
|
message: "Error de servicio"
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
},
|
|
189
|
+
}, o = {
|
|
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.",
|
|
193
|
-
message: "
|
|
193
|
+
message: "No está configurada la variable o no tiene el valor correspondiente"
|
|
194
194
|
},
|
|
195
195
|
"ENROLLMENT-INVALIDDEVICEDID-0001": {
|
|
196
196
|
title: "Es necesario enviar el deviceId para poder validar el enrolamiento.",
|
|
@@ -210,7 +210,7 @@ const e = {
|
|
|
210
210
|
},
|
|
211
211
|
"ENROLLMENT-IMEIDOESNTMATCH-0005": {
|
|
212
212
|
title: "Por favor verifique que el imei enviado coincida con el imei enrolado en la plataforma de Nuovo.",
|
|
213
|
-
message: "
|
|
213
|
+
message: "El imei no corresponde al imei enrolado."
|
|
214
214
|
},
|
|
215
215
|
"ENROLLMENT-QRMACROLOCKNOTGENERATE-0006": {
|
|
216
216
|
title: "Por favor verifique los logs del servicio para generar el código QR de Macrolock.",
|
|
@@ -218,63 +218,63 @@ const e = {
|
|
|
218
218
|
},
|
|
219
219
|
"ENROLLMENT-IMEINOTVALIDATED-0007": {
|
|
220
220
|
title: "Por favor verifique los logs del servicio para validar imei de Macrolock.",
|
|
221
|
-
message: "
|
|
221
|
+
message: "Ocurrió un error al intentar validar el imei con el proveedor MACROLOCK."
|
|
222
222
|
},
|
|
223
223
|
"ENROLLMENT-DEVICESNOTFOUNDINSAPINVENTORY-0008": {
|
|
224
224
|
title: "Por favor verifique los parámetros proporcionados para consultar de manera correcta los dispositivos en existencia.",
|
|
225
|
-
message: "
|
|
225
|
+
message: "No se tienen dispositivos con los datos proporcionados"
|
|
226
226
|
},
|
|
227
227
|
"ENROLLMENT-JOURNEYERROR-0009": {
|
|
228
228
|
title: "Revise los logs del servicio de jornada para un informe mas detallado.",
|
|
229
|
-
message: "
|
|
229
|
+
message: "Ocurrió un error al avanzar la jornada al siguiente proceso."
|
|
230
230
|
},
|
|
231
231
|
"ENROLLMENT-APPLICATIONSNOTFOUND-0010": {
|
|
232
232
|
title: "Verifique los datos enviados para consultar las solitudes en la bd.",
|
|
233
|
-
message: "
|
|
233
|
+
message: "No se encontraron solicitudes con los ids proporcionados."
|
|
234
234
|
},
|
|
235
235
|
"ENROLLMENT-LOCKTYPENOTFOUND-0011": {
|
|
236
236
|
title: "Valide que los parámetros enviados sean correctos.",
|
|
237
|
-
message: "
|
|
237
|
+
message: "No hay un tipo de bloque definido para este IMEI."
|
|
238
238
|
},
|
|
239
239
|
"ENROLLMENT-PREAPPLICATIONNOTFOUND-0012": {
|
|
240
240
|
title: "Valide que los parámetros enviados sean correctos.",
|
|
241
|
-
message: "
|
|
241
|
+
message: "No se encontró datos con la presolicitud"
|
|
242
242
|
},
|
|
243
243
|
"ENROLLMENT-UNSUPPORTED_MEDIA_TYPE-0013": {
|
|
244
244
|
title: "Asegúrese de que el encabezado Content-Type esté establecido en el valor adecuado como se especifica en la documentación de la API.",
|
|
245
|
-
message: "
|
|
245
|
+
message: "El encabezado Content-Type de la solicitud es incorrecto."
|
|
246
246
|
},
|
|
247
247
|
"ENROLLMENT-NOT_ACCEPTABLE-0014": {
|
|
248
248
|
title: "Asegúrese de que está utilizando el método HTTP adecuado especificado en la documentación de la API.",
|
|
249
|
-
message: "
|
|
249
|
+
message: "El método utilizado para la solicitud de API es incorrecto."
|
|
250
250
|
},
|
|
251
251
|
"ENROLLMENT-RESOURCENOTFOUND-0015": {
|
|
252
|
-
title: "
|
|
252
|
+
title: "Asegúrese de que la URL sea correcta.",
|
|
253
253
|
message: "El recurso solicitado no se encontró en el servidor."
|
|
254
254
|
},
|
|
255
255
|
"ENROLLMENT-BADREQUEST-0016": {
|
|
256
256
|
title: "Asegúrese de que el formato de los datos sea correcto y siga la documentación de la API.",
|
|
257
|
-
message: "
|
|
257
|
+
message: "Validación de cualquier parámetro que llegue en el body request"
|
|
258
258
|
},
|
|
259
259
|
"ENROLLMENT-METHODNOTIMPLEMENT-0017": {
|
|
260
260
|
title: "Por favor, contacte a mesa de ayuda para solucionar el error.",
|
|
261
|
-
message: "
|
|
261
|
+
message: "El tipo de bloqueo no se encuentra implementado en el sistema."
|
|
262
262
|
},
|
|
263
263
|
"ENROLLMENT-PRODUCTNOTFOUNDINSAPINVENTORY-0018": {
|
|
264
264
|
title: "Por favor verifique los parámetros proporcionados para consultar de manera correcta los productos en existencia.",
|
|
265
|
-
message: "
|
|
265
|
+
message: "No se encontraron productos para la sucursal"
|
|
266
266
|
},
|
|
267
267
|
"ENROLLMENT-PRODUCTKEYNOTFOUND-0019": {
|
|
268
268
|
title: "Por favor verifique la clave de producto sea correcta o exista en el catálogo de productos sap.",
|
|
269
|
-
message: "
|
|
269
|
+
message: "No se encontraron productos con esa clave"
|
|
270
270
|
},
|
|
271
271
|
"ENROLLMENT-FAILEDTORETRIEVEIMEI-0020": {
|
|
272
272
|
title: "Revise los logs del servicio de sap para un obtener información mas detallada",
|
|
273
|
-
message: "
|
|
273
|
+
message: "No se pudo recuperar información del imei"
|
|
274
274
|
},
|
|
275
275
|
"ENROLLMENT-LOCKTYPENOTFOUND-0021": {
|
|
276
276
|
title: "Verifique los datos enviados para consultar el tipo de bloqueo en el catálogo en la bd.",
|
|
277
|
-
message: "
|
|
277
|
+
message: "No se encontraron tipo de bloqueos con el identificador proporcionado."
|
|
278
278
|
},
|
|
279
279
|
"ENROLLMENT-AUTH_HEADER_MISSING-0022": {
|
|
280
280
|
title: "Falta el encabezado de autorización.",
|
|
@@ -312,12 +312,12 @@ const e = {
|
|
|
312
312
|
title: "Error al consultar la api de validación de estatus de tipo de bloqueo por proveedores",
|
|
313
313
|
message: "Revise los logs del servicio de estatus de tipo de bloqueo por proveedor para un informe mas detallado."
|
|
314
314
|
},
|
|
315
|
-
"
|
|
315
|
+
"ENROLLMENT-INVALIDTOKENTRUSTONICSUPPLIER-0031": {
|
|
316
316
|
title: "Asegúrese de estar autenticado y tener los permisos necesarios para acceder a este recurso.",
|
|
317
317
|
message: "No se pudo obtener el token de autenticación para la API de Trustonic"
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
},
|
|
320
|
+
}, a = {
|
|
321
321
|
errors: {
|
|
322
322
|
default: {
|
|
323
323
|
title: "No pudimos cargar alguno de los datos solicitados.",
|
|
@@ -479,7 +479,7 @@ const e = {
|
|
|
479
479
|
message: "Código invalido, por favor de generar uno nuevo"
|
|
480
480
|
},
|
|
481
481
|
//ENROLLMENT
|
|
482
|
-
...
|
|
482
|
+
...o.enrollment,
|
|
483
483
|
//Personal References
|
|
484
484
|
"PERSONALREFERENCE-ACTIVECREDITSEXCEPTION-01": {
|
|
485
485
|
title: "Intentar con otra referencia",
|
|
@@ -496,5 +496,5 @@ const e = {
|
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
export {
|
|
499
|
-
|
|
499
|
+
a as t
|
|
500
500
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lang/common/errors/enrollment/en_MX/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lang/common/errors/enrollment/en_MX/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmKhB,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -12,135 +12,133 @@ declare const translation: {
|
|
|
12
12
|
title: string;
|
|
13
13
|
message: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
message: string;
|
|
143
|
-
};
|
|
15
|
+
"ENROLLMENT-INVALIDCONFIGURATION-0000": {
|
|
16
|
+
title: string;
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
"ENROLLMENT-INVALIDDEVICEDID-0001": {
|
|
20
|
+
title: string;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
"ENROLLMENT-INVALIDIMEI-0002": {
|
|
24
|
+
title: string;
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
"ENROLLMENT-INVALIDLOCKTYPE-0003": {
|
|
28
|
+
title: string;
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
31
|
+
"ENROLLMENT-INVALIDTOKENSUPPLIERS-0004": {
|
|
32
|
+
title: string;
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
"ENROLLMENT-IMEIDOESNTMATCH-0005": {
|
|
36
|
+
title: string;
|
|
37
|
+
message: string;
|
|
38
|
+
};
|
|
39
|
+
"ENROLLMENT-QRMACROLOCKNOTGENERATE-0006": {
|
|
40
|
+
title: string;
|
|
41
|
+
message: string;
|
|
42
|
+
};
|
|
43
|
+
"ENROLLMENT-IMEINOTVALIDATED-0007": {
|
|
44
|
+
title: string;
|
|
45
|
+
message: string;
|
|
46
|
+
};
|
|
47
|
+
"ENROLLMENT-DEVICESNOTFOUNDINSAPINVENTORY-0008": {
|
|
48
|
+
title: string;
|
|
49
|
+
message: string;
|
|
50
|
+
};
|
|
51
|
+
"ENROLLMENT-JOURNEYERROR-0009": {
|
|
52
|
+
title: string;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
"ENROLLMENT-APPLICATIONSNOTFOUND-0010": {
|
|
56
|
+
title: string;
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
59
|
+
"ENROLLMENT-LOCKTYPENOTFOUND-0011": {
|
|
60
|
+
title: string;
|
|
61
|
+
message: string;
|
|
62
|
+
};
|
|
63
|
+
"ENROLLMENT-PREAPPLICATIONNOTFOUND-0012": {
|
|
64
|
+
title: string;
|
|
65
|
+
message: string;
|
|
66
|
+
};
|
|
67
|
+
"ENROLLMENT-UNSUPPORTED_MEDIA_TYPE-0013": {
|
|
68
|
+
title: string;
|
|
69
|
+
message: string;
|
|
70
|
+
};
|
|
71
|
+
"ENROLLMENT-NOT_ACCEPTABLE-0014": {
|
|
72
|
+
title: string;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
"ENROLLMENT-RESOURCENOTFOUND-0015": {
|
|
76
|
+
title: string;
|
|
77
|
+
message: string;
|
|
78
|
+
};
|
|
79
|
+
"ENROLLMENT-BADREQUEST-0016": {
|
|
80
|
+
title: string;
|
|
81
|
+
message: string;
|
|
82
|
+
};
|
|
83
|
+
"ENROLLMENT-METHODNOTIMPLEMENT-0017": {
|
|
84
|
+
title: string;
|
|
85
|
+
message: string;
|
|
86
|
+
};
|
|
87
|
+
"ENROLLMENT-PRODUCTNOTFOUNDINSAPINVENTORY-0018": {
|
|
88
|
+
title: string;
|
|
89
|
+
message: string;
|
|
90
|
+
};
|
|
91
|
+
"ENROLLMENT-PRODUCTKEYNOTFOUND-0019": {
|
|
92
|
+
title: string;
|
|
93
|
+
message: string;
|
|
94
|
+
};
|
|
95
|
+
"ENROLLMENT-FAILEDTORETRIEVEIMEI-0020": {
|
|
96
|
+
title: string;
|
|
97
|
+
message: string;
|
|
98
|
+
};
|
|
99
|
+
"ENROLLMENT-LOCKTYPENOTFOUND-0021": {
|
|
100
|
+
title: string;
|
|
101
|
+
message: string;
|
|
102
|
+
};
|
|
103
|
+
"ENROLLMENT-AUTH_HEADER_MISSING-0022": {
|
|
104
|
+
title: string;
|
|
105
|
+
message: string;
|
|
106
|
+
};
|
|
107
|
+
"ENROLLMENT-AUTH_HEADER_INVALID_FORMAT-0023": {
|
|
108
|
+
title: string;
|
|
109
|
+
message: string;
|
|
110
|
+
};
|
|
111
|
+
"ENROLLMENT-AUTH_TOKEN_MISSING-0024": {
|
|
112
|
+
title: string;
|
|
113
|
+
message: string;
|
|
114
|
+
};
|
|
115
|
+
"ENROLLMENT-AUTH_TOKEN_INVALID-0025": {
|
|
116
|
+
title: string;
|
|
117
|
+
message: string;
|
|
118
|
+
};
|
|
119
|
+
"ENROLLMENT-AUTH_UNSUPPORTED_MEDIA_TYPE-0026": {
|
|
120
|
+
title: string;
|
|
121
|
+
message: string;
|
|
122
|
+
};
|
|
123
|
+
"ENROLLMENT-AUTH_UNKNOWN_ERROR-0027": {
|
|
124
|
+
title: string;
|
|
125
|
+
message: string;
|
|
126
|
+
};
|
|
127
|
+
"ENROLLMENT-APISAPNOTAVAILABLE-0028": {
|
|
128
|
+
title: string;
|
|
129
|
+
message: string;
|
|
130
|
+
};
|
|
131
|
+
"ENROLLMENT-APIAUTHSUPPLIERNOTAVAILABLE-0029": {
|
|
132
|
+
title: string;
|
|
133
|
+
message: string;
|
|
134
|
+
};
|
|
135
|
+
"ENROLLMENT-APIAPISTATUSLOCKTYPEBYSUPPLIERNOTAVAILABLE-0030": {
|
|
136
|
+
title: string;
|
|
137
|
+
message: string;
|
|
138
|
+
};
|
|
139
|
+
"ENROLLMENT-INVALIDTOKENTRUSTONICSUPPLIER-0031": {
|
|
140
|
+
title: string;
|
|
141
|
+
message: string;
|
|
144
142
|
};
|
|
145
143
|
"JOURNEY-INVALIDATEDATA-01": {
|
|
146
144
|
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-721e6908.js";
|
|
5
5
|
import "./mp-front-cli-logger.es.js";
|
|
6
6
|
import "rxjs";
|
|
7
7
|
import "./mp-front-cli-encrypter.es.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { MessageHandler as
|
|
5
|
-
import { RxSubjectManager as
|
|
6
|
-
import
|
|
7
|
-
import { t as Q } from "./index-
|
|
8
|
-
import { CustomLogger as
|
|
9
|
-
import { of as
|
|
10
|
-
import { CustomEncrypter as
|
|
11
|
-
import { C as
|
|
12
|
-
import { CustomEncoder as
|
|
13
|
-
import { u as
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var v = (E, t, e) => t in E ? y(E, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : E[t] = e;
|
|
3
|
+
var i = (E, t, e) => (v(E, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import { MessageHandler as P, LoadingHandler as c } from "./mp-front-cli-utils-rxjs.es.js";
|
|
5
|
+
import { RxSubjectManager as Ue } from "./mp-front-cli-utils-rxjs.es.js";
|
|
6
|
+
import h, { t as C } from "i18next";
|
|
7
|
+
import { t as Q } from "./index-721e6908.js";
|
|
8
|
+
import { CustomLogger as w } from "./mp-front-cli-logger.es.js";
|
|
9
|
+
import { of as N, switchMap as L, forkJoin as B, catchError as g, EMPTY as u, filter as f } from "rxjs";
|
|
10
|
+
import { CustomEncrypter as V } from "./mp-front-cli-encrypter.es.js";
|
|
11
|
+
import { C as x, f as S } from "./custom-header-b6432556.js";
|
|
12
|
+
import { CustomEncoder as F } from "./mp-front-cli-encoder.es.js";
|
|
13
|
+
import { u as Y } from "./stringify-788d71a0.js";
|
|
14
14
|
import "node-jose";
|
|
15
15
|
import "crypto";
|
|
16
|
-
const
|
|
16
|
+
const H = {
|
|
17
17
|
es: {
|
|
18
18
|
translation: {
|
|
19
19
|
...Q
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
resources:
|
|
23
|
+
h.init({
|
|
24
|
+
resources: H,
|
|
25
25
|
lng: "es",
|
|
26
26
|
// language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
|
|
27
27
|
// you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
|
|
@@ -33,7 +33,232 @@ x.init({
|
|
|
33
33
|
},
|
|
34
34
|
debug: !1
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const _ = {
|
|
37
|
+
"ENROLLMENT-INVALIDCONFIGURATION-0000": {
|
|
38
|
+
code: 500,
|
|
39
|
+
type: "modal",
|
|
40
|
+
message: "errors.ENROLLMENT-INVALIDCONFIGURATION-0000.message",
|
|
41
|
+
title: "errors.ENROLLMENT-INVALIDCONFIGURATION-0000.title",
|
|
42
|
+
level: "error"
|
|
43
|
+
},
|
|
44
|
+
"ENROLLMENT-INVALIDDEVICEDID-0001": {
|
|
45
|
+
code: 400,
|
|
46
|
+
type: "modal",
|
|
47
|
+
message: "errors.ENROLLMENT-INVALIDDEVICEDID-0001.message",
|
|
48
|
+
title: "errors.ENROLLMENT-INVALIDDEVICEDID-0001.title",
|
|
49
|
+
level: "error"
|
|
50
|
+
},
|
|
51
|
+
"ENROLLMENT-INVALIDIMEI-0002": {
|
|
52
|
+
code: 400,
|
|
53
|
+
type: "modal",
|
|
54
|
+
message: "errors.ENROLLMENT-INVALIDIMEI-0002.message",
|
|
55
|
+
title: "errors.ENROLLMENT-INVALIDIMEI-0002.title",
|
|
56
|
+
level: "error"
|
|
57
|
+
},
|
|
58
|
+
"ENROLLMENT-INVALIDLOCKTYPE-0003": {
|
|
59
|
+
code: 400,
|
|
60
|
+
type: "modal",
|
|
61
|
+
message: "errors.ENROLLMENT-INVALIDLOCKTYPE-0003.message",
|
|
62
|
+
title: "errors.ENROLLMENT-INVALIDLOCKTYPE-0003.title",
|
|
63
|
+
level: "error"
|
|
64
|
+
},
|
|
65
|
+
"ENROLLMENT-INVALIDTOKENSUPPLIERS-0004": {
|
|
66
|
+
code: 401,
|
|
67
|
+
type: "modal",
|
|
68
|
+
message: "errors.ENROLLMENT-INVALIDTOKENSUPPLIERS-0004.message",
|
|
69
|
+
title: "errors.ENROLLMENT-INVALIDTOKENSUPPLIERS-0004.title",
|
|
70
|
+
level: "error"
|
|
71
|
+
},
|
|
72
|
+
"ENROLLMENT-IMEIDOESNTMATCH-0005": {
|
|
73
|
+
code: 400,
|
|
74
|
+
type: "modal",
|
|
75
|
+
message: "errors.ENROLLMENT-IMEIDOESNTMATCH-0005.message",
|
|
76
|
+
title: "errors.ENROLLMENT-IMEIDOESNTMATCH-0005.title",
|
|
77
|
+
level: "error"
|
|
78
|
+
},
|
|
79
|
+
"ENROLLMENT-QRMACROLOCKNOTGENERATE-0006": {
|
|
80
|
+
code: 400,
|
|
81
|
+
type: "modal",
|
|
82
|
+
message: "errors.ENROLLMENT-QRMACROLOCKNOTGENERATE-0006.message",
|
|
83
|
+
title: "errors.ENROLLMENT-QRMACROLOCKNOTGENERATE-0006.title",
|
|
84
|
+
level: "error"
|
|
85
|
+
},
|
|
86
|
+
"ENROLLMENT-IMEINOTVALIDATED-0007": {
|
|
87
|
+
code: 500,
|
|
88
|
+
type: "modal",
|
|
89
|
+
message: "errors.ENROLLMENT-IMEINOTVALIDATED-0007.message",
|
|
90
|
+
title: "errors.ENROLLMENT-IMEINOTVALIDATED-0007.title",
|
|
91
|
+
level: "error"
|
|
92
|
+
},
|
|
93
|
+
"ENROLLMENT-DEVICESNOTFOUNDINSAPINVENTORY-0008": {
|
|
94
|
+
code: 404,
|
|
95
|
+
type: "modal",
|
|
96
|
+
message: "errors.ENROLLMENT-DEVICESNOTFOUNDINSAPINVENTORY-0008.message",
|
|
97
|
+
title: "errors.ENROLLMENT-DEVICESNOTFOUNDINSAPINVENTORY-0008.title",
|
|
98
|
+
level: "error"
|
|
99
|
+
},
|
|
100
|
+
"ENROLLMENT-JOURNEYERROR-0009": {
|
|
101
|
+
code: 500,
|
|
102
|
+
type: "modal",
|
|
103
|
+
message: "errors.ENROLLMENT-JOURNEYERROR-0009.message",
|
|
104
|
+
title: "errors.ENROLLMENT-JOURNEYERROR-0009.title",
|
|
105
|
+
level: "error"
|
|
106
|
+
},
|
|
107
|
+
"ENROLLMENT-APPLICATIONSNOTFOUND-0010": {
|
|
108
|
+
code: 404,
|
|
109
|
+
type: "modal",
|
|
110
|
+
message: "errors.ENROLLMENT-APPLICATIONSNOTFOUND-0010.message",
|
|
111
|
+
title: "errors.ENROLLMENT-APPLICATIONSNOTFOUND-0010.title",
|
|
112
|
+
level: "error"
|
|
113
|
+
},
|
|
114
|
+
"ENROLLMENT-LOCKTYPENOTFOUND-0011": {
|
|
115
|
+
code: 404,
|
|
116
|
+
type: "modal",
|
|
117
|
+
message: "errors.ENROLLMENT-LOCKTYPENOTFOUND-0011.message",
|
|
118
|
+
title: "errors.ENROLLMENT-LOCKTYPENOTFOUND-0011.title",
|
|
119
|
+
level: "error"
|
|
120
|
+
},
|
|
121
|
+
"ENROLLMENT-PREAPPLICATIONNOTFOUND-0012": {
|
|
122
|
+
code: 404,
|
|
123
|
+
type: "modal",
|
|
124
|
+
message: "errors.ENROLLMENT-PREAPPLICATIONNOTFOUND-0012.message",
|
|
125
|
+
title: "errors.ENROLLMENT-PREAPPLICATIONNOTFOUND-0012.title",
|
|
126
|
+
level: "error"
|
|
127
|
+
},
|
|
128
|
+
"ENROLLMENT-UNSUPPORTED_MEDIA_TYPE-0013": {
|
|
129
|
+
code: 415,
|
|
130
|
+
type: "modal",
|
|
131
|
+
message: "errors.ENROLLMENT-UNSUPPORTED_MEDIA_TYPE-0013.message",
|
|
132
|
+
title: "errors.ENROLLMENT-UNSUPPORTED_MEDIA_TYPE-0013.title",
|
|
133
|
+
level: "error"
|
|
134
|
+
},
|
|
135
|
+
"ENROLLMENT-NOT_ACCEPTABLE-0014": {
|
|
136
|
+
code: 406,
|
|
137
|
+
type: "modal",
|
|
138
|
+
message: "errors.ENROLLMENT-NOT_ACCEPTABLE-0014.message",
|
|
139
|
+
title: "errors.ENROLLMENT-NOT_ACCEPTABLE-0014.title",
|
|
140
|
+
level: "error"
|
|
141
|
+
},
|
|
142
|
+
"ENROLLMENT-RESOURCENOTFOUND-0015": {
|
|
143
|
+
code: 404,
|
|
144
|
+
type: "modal",
|
|
145
|
+
message: "errors.ENROLLMENT-RESOURCENOTFOUND-0015.message",
|
|
146
|
+
title: "errors.ENROLLMENT-RESOURCENOTFOUND-0015.title",
|
|
147
|
+
level: "error"
|
|
148
|
+
},
|
|
149
|
+
"ENROLLMENT-BADREQUEST-0016": {
|
|
150
|
+
code: 400,
|
|
151
|
+
type: "modal",
|
|
152
|
+
message: "errors.ENROLLMENT-BADREQUEST-0016.message",
|
|
153
|
+
title: "errors.ENROLLMENT-BADREQUEST-0016.title",
|
|
154
|
+
level: "error"
|
|
155
|
+
},
|
|
156
|
+
"ENROLLMENT-METHODNOTIMPLEMENT-0017": {
|
|
157
|
+
code: 501,
|
|
158
|
+
type: "modal",
|
|
159
|
+
message: "errors.ENROLLMENT-METHODNOTIMPLEMENT-0017.message",
|
|
160
|
+
title: "errors.ENROLLMENT-METHODNOTIMPLEMENT-0017.title",
|
|
161
|
+
level: "error"
|
|
162
|
+
},
|
|
163
|
+
"ENROLLMENT-PRODUCTNOTFOUNDINSAPINVENTORY-0018": {
|
|
164
|
+
code: 404,
|
|
165
|
+
type: "modal",
|
|
166
|
+
message: "errors.ENROLLMENT-PRODUCTNOTFOUNDINSAPINVENTORY-0018.message",
|
|
167
|
+
title: "errors.ENROLLMENT-PRODUCTNOTFOUNDINSAPINVENTORY-0018.title",
|
|
168
|
+
level: "error"
|
|
169
|
+
},
|
|
170
|
+
"ENROLLMENT-PRODUCTKEYNOTFOUND-0019": {
|
|
171
|
+
code: 404,
|
|
172
|
+
type: "modal",
|
|
173
|
+
message: "errors.ENROLLMENT-PRODUCTKEYNOTFOUND-0019.message",
|
|
174
|
+
title: "errors.ENROLLMENT-PRODUCTKEYNOTFOUND-0019.title",
|
|
175
|
+
level: "error"
|
|
176
|
+
},
|
|
177
|
+
"ENROLLMENT-FAILEDTORETRIEVEIMEI-0020": {
|
|
178
|
+
code: 500,
|
|
179
|
+
type: "modal",
|
|
180
|
+
message: "errors.ENROLLMENT-FAILEDTORETRIEVEIMEI-0020.message",
|
|
181
|
+
title: "errors.ENROLLMENT-FAILEDTORETRIEVEIMEI-0020.title",
|
|
182
|
+
level: "error"
|
|
183
|
+
},
|
|
184
|
+
"ENROLLMENT-LOCKTYPENOTFOUND-0021": {
|
|
185
|
+
code: 404,
|
|
186
|
+
type: "modal",
|
|
187
|
+
message: "errors.ENROLLMENT-LOCKTYPENOTFOUND-0021.message",
|
|
188
|
+
title: "errors.ENROLLMENT-LOCKTYPENOTFOUND-0021.title",
|
|
189
|
+
level: "error"
|
|
190
|
+
},
|
|
191
|
+
"ENROLLMENT-AUTH_HEADER_MISSING-0022": {
|
|
192
|
+
code: 401,
|
|
193
|
+
type: "modal",
|
|
194
|
+
message: "errors.ENROLLMENT-AUTH_HEADER_MISSING-0022.message",
|
|
195
|
+
title: "errors.ENROLLMENT-AUTH_HEADER_MISSING-0022.title",
|
|
196
|
+
level: "error"
|
|
197
|
+
},
|
|
198
|
+
"ENROLLMENT-AUTH_HEADER_INVALID_FORMAT-0023": {
|
|
199
|
+
code: 401,
|
|
200
|
+
type: "modal",
|
|
201
|
+
message: "errors.ENROLLMENT-AUTH_HEADER_INVALID_FORMAT-0023.message",
|
|
202
|
+
title: "errors.ENROLLMENT-AUTH_HEADER_INVALID_FORMAT-0023.title",
|
|
203
|
+
level: "error"
|
|
204
|
+
},
|
|
205
|
+
"ENROLLMENT-AUTH_TOKEN_MISSING-0024": {
|
|
206
|
+
code: 401,
|
|
207
|
+
type: "modal",
|
|
208
|
+
message: "errors.ENROLLMENT-AUTH_TOKEN_MISSING-0024.message",
|
|
209
|
+
title: "errors.ENROLLMENT-AUTH_TOKEN_MISSING-0024.title",
|
|
210
|
+
level: "error"
|
|
211
|
+
},
|
|
212
|
+
"ENROLLMENT-AUTH_TOKEN_INVALID-0025": {
|
|
213
|
+
code: 401,
|
|
214
|
+
type: "modal",
|
|
215
|
+
message: "errors.ENROLLMENT-AUTH_TOKEN_INVALID-0025.message",
|
|
216
|
+
title: "errors.ENROLLMENT-AUTH_TOKEN_INVALID-0025.title",
|
|
217
|
+
level: "error"
|
|
218
|
+
},
|
|
219
|
+
"ENROLLMENT-AUTH_UNSUPPORTED_MEDIA_TYPE-0026": {
|
|
220
|
+
code: 415,
|
|
221
|
+
type: "modal",
|
|
222
|
+
message: "errors.ENROLLMENT-AUTH_UNSUPPORTED_MEDIA_TYPE-0026.message",
|
|
223
|
+
title: "errors.ENROLLMENT-AUTH_UNSUPPORTED_MEDIA_TYPE-0026.title",
|
|
224
|
+
level: "error"
|
|
225
|
+
},
|
|
226
|
+
"ENROLLMENT-AUTH_UNKNOWN_ERROR-0027": {
|
|
227
|
+
code: 500,
|
|
228
|
+
type: "modal",
|
|
229
|
+
message: "errors.ENROLLMENT-AUTH_UNKNOWN_ERROR-0027.message",
|
|
230
|
+
title: "errors.ENROLLMENT-AUTH_UNKNOWN_ERROR-0027.title",
|
|
231
|
+
level: "error"
|
|
232
|
+
},
|
|
233
|
+
"ENROLLMENT-APISAPNOTAVAILABLE-0028": {
|
|
234
|
+
code: 500,
|
|
235
|
+
type: "modal",
|
|
236
|
+
message: "errors.ENROLLMENT-APISAPNOTAVAILABLE-0028.message",
|
|
237
|
+
title: "errors.ENROLLMENT-APISAPNOTAVAILABLE-0028.title",
|
|
238
|
+
level: "error"
|
|
239
|
+
},
|
|
240
|
+
"ENROLLMENT-APIAUTHSUPPLIERNOTAVAILABLE-0029": {
|
|
241
|
+
code: 500,
|
|
242
|
+
type: "modal",
|
|
243
|
+
message: "errors.ENROLLMENT-APIAUTHSUPPLIERNOTAVAILABLE-0029.message",
|
|
244
|
+
title: "errors.ENROLLMENT-APIAUTHSUPPLIERNOTAVAILABLE-0029.title",
|
|
245
|
+
level: "error"
|
|
246
|
+
},
|
|
247
|
+
"ENROLLMENT-APIAPISTATUSLOCKTYPEBYSUPPLIERNOTAVAILABLE-0030": {
|
|
248
|
+
code: 500,
|
|
249
|
+
type: "modal",
|
|
250
|
+
message: "errors.ENROLLMENT-APIAPISTATUSLOCKTYPEBYSUPPLIERNOTAVAILABLE-0030.message",
|
|
251
|
+
title: "errors.ENROLLMENT-APIAPISTATUSLOCKTYPEBYSUPPLIERNOTAVAILABLE-0030.title",
|
|
252
|
+
level: "error"
|
|
253
|
+
},
|
|
254
|
+
"ENROLLMENT-INVALIDTOKENTRUSTONICSUPPLIER-0031": {
|
|
255
|
+
code: 401,
|
|
256
|
+
type: "modal",
|
|
257
|
+
message: "errors.ENROLLMENT-INVALIDTOKENTRUSTONICSUPPLIER-0031.message",
|
|
258
|
+
title: "errors.ENROLLMENT-INVALIDTOKENTRUSTONICSUPPLIER-0031.title",
|
|
259
|
+
level: "error"
|
|
260
|
+
}
|
|
261
|
+
}, m = {
|
|
37
262
|
"MP-001": {
|
|
38
263
|
code: 400,
|
|
39
264
|
type: "modal",
|
|
@@ -636,215 +861,216 @@ const C = {
|
|
|
636
861
|
code: 403,
|
|
637
862
|
type: "modal",
|
|
638
863
|
level: "warning"
|
|
639
|
-
}
|
|
864
|
+
},
|
|
865
|
+
..._
|
|
640
866
|
};
|
|
641
|
-
class
|
|
867
|
+
class U extends w {
|
|
642
868
|
get(t = "default", e = "NOT_FOUND") {
|
|
643
|
-
var
|
|
869
|
+
var s, A;
|
|
644
870
|
if (t instanceof Error)
|
|
645
871
|
return this.logError(t.message), {
|
|
646
|
-
...
|
|
647
|
-
title:
|
|
648
|
-
message:
|
|
872
|
+
...m.internalError,
|
|
873
|
+
title: C(m.internalError.title),
|
|
874
|
+
message: C(m.internalError.message),
|
|
649
875
|
uuid: e
|
|
650
876
|
};
|
|
651
877
|
const r = typeof t == "string" ? t : t.code ?? t.errorType;
|
|
652
878
|
this.logDebug("statusCode", r);
|
|
653
|
-
const
|
|
879
|
+
const l = typeof t == "string" ? {} : { ...t };
|
|
654
880
|
return {
|
|
655
|
-
...
|
|
656
|
-
title:
|
|
657
|
-
((
|
|
658
|
-
|
|
881
|
+
...m[r] ?? m.default,
|
|
882
|
+
title: C(
|
|
883
|
+
((s = m[r]) == null ? void 0 : s.title) ?? m.default.title,
|
|
884
|
+
l
|
|
659
885
|
),
|
|
660
|
-
message:
|
|
661
|
-
((A =
|
|
662
|
-
|
|
886
|
+
message: C(
|
|
887
|
+
((A = m[r]) == null ? void 0 : A.message) ?? m.default.message,
|
|
888
|
+
l
|
|
663
889
|
),
|
|
664
890
|
uuid: e
|
|
665
891
|
};
|
|
666
892
|
}
|
|
667
893
|
}
|
|
668
|
-
class
|
|
894
|
+
class Ne extends V {
|
|
669
895
|
constructor() {
|
|
670
896
|
super(...arguments);
|
|
671
|
-
|
|
672
|
-
|
|
897
|
+
i(this, "uuid", "");
|
|
898
|
+
i(this, "session", null);
|
|
673
899
|
}
|
|
674
900
|
setSession(e) {
|
|
675
901
|
this.session = e;
|
|
676
902
|
}
|
|
677
903
|
getSession() {
|
|
678
904
|
if (!this.session)
|
|
679
|
-
throw new
|
|
905
|
+
throw new U().get("SESSION_NOT_FOUND");
|
|
680
906
|
return this.session;
|
|
681
907
|
}
|
|
682
|
-
returnData(e, r,
|
|
683
|
-
const
|
|
684
|
-
e.status(200).json(
|
|
908
|
+
returnData(e, r, l) {
|
|
909
|
+
const s = this.encode(r, l);
|
|
910
|
+
e.status(200).json(s);
|
|
685
911
|
}
|
|
686
912
|
returnError(e, r) {
|
|
687
|
-
return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new
|
|
913
|
+
return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new U().get(r, this.uuid));
|
|
688
914
|
}
|
|
689
915
|
get(e) {
|
|
690
|
-
return this.logDebug("get ApiMiddleware"), (r,
|
|
691
|
-
var
|
|
692
|
-
this.logDebug("return ApiMiddleware"), this.uuid = (
|
|
693
|
-
|
|
694
|
-
(A) =>
|
|
695
|
-
params:
|
|
696
|
-
headers:
|
|
916
|
+
return this.logDebug("get ApiMiddleware"), (r, l) => {
|
|
917
|
+
var s;
|
|
918
|
+
this.logDebug("return ApiMiddleware"), this.uuid = (s = r == null ? void 0 : r.body) == null ? void 0 : s.uuid, N(r).pipe(
|
|
919
|
+
L(
|
|
920
|
+
(A) => B({
|
|
921
|
+
params: N(this.decode(A.body)),
|
|
922
|
+
headers: N(A.headers)
|
|
697
923
|
})
|
|
698
924
|
),
|
|
699
|
-
|
|
700
|
-
({ params: A, headers: o }) =>
|
|
925
|
+
L(
|
|
926
|
+
({ params: A, headers: o }) => B({
|
|
701
927
|
response: e(A, this.uuid, o),
|
|
702
|
-
headers:
|
|
703
|
-
params:
|
|
928
|
+
headers: N(o),
|
|
929
|
+
params: N(A)
|
|
704
930
|
})
|
|
705
931
|
),
|
|
706
|
-
|
|
707
|
-
`ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
708
|
-
),
|
|
709
|
-
|
|
932
|
+
L(({ params: A, response: o, headers: a }) => (this.logDebug(
|
|
933
|
+
`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(A)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(o)}`
|
|
934
|
+
), N(o))),
|
|
935
|
+
g((A) => {
|
|
710
936
|
var o;
|
|
711
937
|
return this.logError(
|
|
712
938
|
`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(
|
|
939
|
+
), this.returnError(l, A), u;
|
|
714
940
|
})
|
|
715
941
|
).subscribe({
|
|
716
942
|
next: (A) => {
|
|
717
|
-
this.logDebug("ApiMiddleware subscribe next", JSON.stringify(A)), this.returnData(
|
|
943
|
+
this.logDebug("ApiMiddleware subscribe next", JSON.stringify(A)), this.returnData(l, A, this.uuid);
|
|
718
944
|
}
|
|
719
945
|
});
|
|
720
946
|
};
|
|
721
947
|
}
|
|
722
948
|
}
|
|
723
|
-
const
|
|
724
|
-
class
|
|
725
|
-
constructor(e, r,
|
|
726
|
-
super(
|
|
727
|
-
|
|
728
|
-
|
|
949
|
+
const G = process.env.ID_FRONT ?? "NOT_AVAILABLE";
|
|
950
|
+
class Le extends x {
|
|
951
|
+
constructor(e, r, l = {}) {
|
|
952
|
+
super(l);
|
|
953
|
+
i(this, "apiUrl");
|
|
954
|
+
i(this, "method");
|
|
729
955
|
this.apiUrl = e, this.method = r ?? "POST";
|
|
730
956
|
}
|
|
731
957
|
errorHandler(e, r) {
|
|
732
958
|
if (e != null && e.errors)
|
|
733
|
-
throw new
|
|
959
|
+
throw new U().get(e.errors[0], r);
|
|
734
960
|
return !(e != null && e.errors);
|
|
735
961
|
}
|
|
736
962
|
formatParams(e) {
|
|
737
963
|
return JSON.stringify({
|
|
738
964
|
data: {
|
|
739
|
-
type:
|
|
965
|
+
type: G,
|
|
740
966
|
attributes: e
|
|
741
967
|
}
|
|
742
968
|
});
|
|
743
969
|
}
|
|
744
970
|
fetchData(e = {}, r) {
|
|
745
971
|
return this.getHeaders().pipe(
|
|
746
|
-
|
|
747
|
-
(
|
|
972
|
+
L(
|
|
973
|
+
(l) => S(
|
|
748
974
|
this.apiUrl,
|
|
749
975
|
{
|
|
750
976
|
method: "POST",
|
|
751
|
-
headers:
|
|
977
|
+
headers: l,
|
|
752
978
|
body: this.formatParams(e),
|
|
753
|
-
selector: (
|
|
979
|
+
selector: (s) => s.json()
|
|
754
980
|
}
|
|
755
981
|
).pipe(
|
|
756
|
-
|
|
757
|
-
throw this.logError(JSON.stringify(
|
|
982
|
+
g((s) => {
|
|
983
|
+
throw this.logError(JSON.stringify(s)), this.logError(
|
|
758
984
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
759
|
-
|
|
985
|
+
l
|
|
760
986
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
761
987
|
this.formatParams(e)
|
|
762
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
763
|
-
), new
|
|
988
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
|
|
989
|
+
), new U().get("default", r);
|
|
764
990
|
}),
|
|
765
|
-
|
|
991
|
+
L((s) => (this.logDebug(
|
|
766
992
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
767
|
-
|
|
993
|
+
l
|
|
768
994
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
769
995
|
this.formatParams(e)
|
|
770
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
771
|
-
),
|
|
996
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
|
|
997
|
+
), N(s)))
|
|
772
998
|
)
|
|
773
999
|
),
|
|
774
|
-
|
|
1000
|
+
f((l) => this.errorHandler(l, r))
|
|
775
1001
|
);
|
|
776
1002
|
}
|
|
777
1003
|
fetchCustomData(e = {}, r) {
|
|
778
1004
|
return this.getHeaders().pipe(
|
|
779
|
-
|
|
780
|
-
(
|
|
1005
|
+
L(
|
|
1006
|
+
(l) => S(this.apiUrl, {
|
|
781
1007
|
method: this.method,
|
|
782
|
-
headers:
|
|
1008
|
+
headers: l,
|
|
783
1009
|
body: this.method === "GET" ? null : JSON.stringify(e),
|
|
784
|
-
selector: (
|
|
1010
|
+
selector: (s) => s.json()
|
|
785
1011
|
}).pipe(
|
|
786
|
-
|
|
787
|
-
throw this.logError(JSON.stringify(
|
|
1012
|
+
g((s) => {
|
|
1013
|
+
throw this.logError(JSON.stringify(s)), this.logError(
|
|
788
1014
|
`FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
|
|
789
|
-
|
|
1015
|
+
l
|
|
790
1016
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
791
1017
|
this.formatParams(e)
|
|
792
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
793
|
-
), new
|
|
1018
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
|
|
1019
|
+
), new U().get("default", r);
|
|
794
1020
|
}),
|
|
795
|
-
|
|
1021
|
+
L((s) => (this.logDebug(
|
|
796
1022
|
`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(
|
|
797
|
-
|
|
1023
|
+
l
|
|
798
1024
|
)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
|
|
799
1025
|
e
|
|
800
|
-
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(
|
|
801
|
-
),
|
|
1026
|
+
)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(s)} \x1B[33m`
|
|
1027
|
+
), N(s)))
|
|
802
1028
|
)
|
|
803
1029
|
)
|
|
804
1030
|
);
|
|
805
1031
|
}
|
|
806
1032
|
}
|
|
807
|
-
const
|
|
808
|
-
function
|
|
809
|
-
return typeof
|
|
1033
|
+
const J = /^(?:[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;
|
|
1034
|
+
function K(E) {
|
|
1035
|
+
return typeof E == "string" && J.test(E);
|
|
810
1036
|
}
|
|
811
|
-
function
|
|
812
|
-
if (!
|
|
1037
|
+
function $(E) {
|
|
1038
|
+
if (!K(E))
|
|
813
1039
|
throw TypeError("Invalid UUID");
|
|
814
1040
|
let t;
|
|
815
1041
|
const e = new Uint8Array(16);
|
|
816
|
-
return e[0] = (t = parseInt(
|
|
1042
|
+
return e[0] = (t = parseInt(E.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(E.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(E.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(E.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(E.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;
|
|
817
1043
|
}
|
|
818
|
-
function
|
|
819
|
-
|
|
1044
|
+
function b(E) {
|
|
1045
|
+
E = unescape(encodeURIComponent(E));
|
|
820
1046
|
const t = [];
|
|
821
|
-
for (let e = 0; e <
|
|
822
|
-
t.push(
|
|
1047
|
+
for (let e = 0; e < E.length; ++e)
|
|
1048
|
+
t.push(E.charCodeAt(e));
|
|
823
1049
|
return t;
|
|
824
1050
|
}
|
|
825
|
-
const
|
|
826
|
-
function
|
|
827
|
-
function r(
|
|
828
|
-
var
|
|
829
|
-
if (typeof
|
|
1051
|
+
const X = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", j = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
1052
|
+
function W(E, t, e) {
|
|
1053
|
+
function r(l, s, A, o) {
|
|
1054
|
+
var a;
|
|
1055
|
+
if (typeof l == "string" && (l = b(l)), typeof s == "string" && (s = $(s)), ((a = s) === null || a === void 0 ? void 0 : a.length) !== 16)
|
|
830
1056
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
831
|
-
let R = new Uint8Array(16 +
|
|
832
|
-
if (R.set(
|
|
1057
|
+
let R = new Uint8Array(16 + l.length);
|
|
1058
|
+
if (R.set(s), R.set(l, s.length), R = e(R), R[6] = R[6] & 15 | t, R[8] = R[8] & 63 | 128, A) {
|
|
833
1059
|
o = o || 0;
|
|
834
|
-
for (let
|
|
835
|
-
A[o +
|
|
1060
|
+
for (let O = 0; O < 16; ++O)
|
|
1061
|
+
A[o + O] = R[O];
|
|
836
1062
|
return A;
|
|
837
1063
|
}
|
|
838
|
-
return
|
|
1064
|
+
return Y(R);
|
|
839
1065
|
}
|
|
840
1066
|
try {
|
|
841
|
-
r.name =
|
|
1067
|
+
r.name = E;
|
|
842
1068
|
} catch {
|
|
843
1069
|
}
|
|
844
|
-
return r.DNS =
|
|
1070
|
+
return r.DNS = X, r.URL = j, r;
|
|
845
1071
|
}
|
|
846
|
-
function
|
|
847
|
-
switch (
|
|
1072
|
+
function Z(E, t, e, r) {
|
|
1073
|
+
switch (E) {
|
|
848
1074
|
case 0:
|
|
849
1075
|
return t & e ^ ~t & r;
|
|
850
1076
|
case 1:
|
|
@@ -855,89 +1081,89 @@ function W(s, t, e, r) {
|
|
|
855
1081
|
return t ^ e ^ r;
|
|
856
1082
|
}
|
|
857
1083
|
}
|
|
858
|
-
function D(
|
|
859
|
-
return
|
|
1084
|
+
function D(E, t) {
|
|
1085
|
+
return E << t | E >>> 32 - t;
|
|
860
1086
|
}
|
|
861
|
-
function
|
|
1087
|
+
function k(E) {
|
|
862
1088
|
const t = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
863
|
-
if (typeof
|
|
864
|
-
const A = unescape(encodeURIComponent(
|
|
865
|
-
|
|
1089
|
+
if (typeof E == "string") {
|
|
1090
|
+
const A = unescape(encodeURIComponent(E));
|
|
1091
|
+
E = [];
|
|
866
1092
|
for (let o = 0; o < A.length; ++o)
|
|
867
|
-
|
|
1093
|
+
E.push(A.charCodeAt(o));
|
|
868
1094
|
} else
|
|
869
|
-
Array.isArray(
|
|
870
|
-
|
|
871
|
-
const r =
|
|
872
|
-
for (let A = 0; A <
|
|
1095
|
+
Array.isArray(E) || (E = Array.prototype.slice.call(E));
|
|
1096
|
+
E.push(128);
|
|
1097
|
+
const r = E.length / 4 + 2, l = Math.ceil(r / 16), s = new Array(l);
|
|
1098
|
+
for (let A = 0; A < l; ++A) {
|
|
873
1099
|
const o = new Uint32Array(16);
|
|
874
|
-
for (let
|
|
875
|
-
o[
|
|
876
|
-
|
|
1100
|
+
for (let a = 0; a < 16; ++a)
|
|
1101
|
+
o[a] = E[A * 64 + a * 4] << 24 | E[A * 64 + a * 4 + 1] << 16 | E[A * 64 + a * 4 + 2] << 8 | E[A * 64 + a * 4 + 3];
|
|
1102
|
+
s[A] = o;
|
|
877
1103
|
}
|
|
878
|
-
l
|
|
879
|
-
for (let A = 0; A <
|
|
1104
|
+
s[l - 1][14] = (E.length - 1) * 8 / Math.pow(2, 32), s[l - 1][14] = Math.floor(s[l - 1][14]), s[l - 1][15] = (E.length - 1) * 8 & 4294967295;
|
|
1105
|
+
for (let A = 0; A < l; ++A) {
|
|
880
1106
|
const o = new Uint32Array(80);
|
|
881
|
-
for (let
|
|
882
|
-
o[
|
|
883
|
-
for (let
|
|
884
|
-
o[
|
|
885
|
-
let
|
|
886
|
-
for (let
|
|
887
|
-
const
|
|
888
|
-
|
|
1107
|
+
for (let T = 0; T < 16; ++T)
|
|
1108
|
+
o[T] = s[A][T];
|
|
1109
|
+
for (let T = 16; T < 80; ++T)
|
|
1110
|
+
o[T] = D(o[T - 3] ^ o[T - 8] ^ o[T - 14] ^ o[T - 16], 1);
|
|
1111
|
+
let a = e[0], R = e[1], O = e[2], I = e[3], n = e[4];
|
|
1112
|
+
for (let T = 0; T < 80; ++T) {
|
|
1113
|
+
const d = Math.floor(T / 20), p = D(a, 5) + Z(d, R, O, I) + n + t[d] + o[T] >>> 0;
|
|
1114
|
+
n = I, I = O, O = D(R, 30) >>> 0, R = a, a = p;
|
|
889
1115
|
}
|
|
890
|
-
e[0] = e[0] +
|
|
1116
|
+
e[0] = e[0] + a >>> 0, e[1] = e[1] + R >>> 0, e[2] = e[2] + O >>> 0, e[3] = e[3] + I >>> 0, e[4] = e[4] + n >>> 0;
|
|
891
1117
|
}
|
|
892
1118
|
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];
|
|
893
1119
|
}
|
|
894
|
-
const
|
|
895
|
-
class
|
|
896
|
-
constructor(e, r = "POST",
|
|
1120
|
+
const z = W("v5", 80, k), M = z;
|
|
1121
|
+
class Oe extends F {
|
|
1122
|
+
constructor(e, r = "POST", l = {}) {
|
|
897
1123
|
super();
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
1124
|
+
i(this, "apiUrl");
|
|
1125
|
+
i(this, "method");
|
|
1126
|
+
i(this, "headers");
|
|
1127
|
+
i(this, "isLoadingEnabled", !0);
|
|
902
1128
|
this.apiUrl = e, this.method = r, this.headers = {
|
|
903
1129
|
"Content-Type": "application/json",
|
|
904
|
-
...
|
|
1130
|
+
...l
|
|
905
1131
|
};
|
|
906
1132
|
}
|
|
907
1133
|
setIsLoadingEnabled(e) {
|
|
908
1134
|
this.isLoadingEnabled = e;
|
|
909
1135
|
}
|
|
910
1136
|
errorHandler(e) {
|
|
911
|
-
return e.code && (e.type === "modal" || e.type === "message") && (
|
|
1137
|
+
return e.code && (e.type === "modal" || e.type === "message") && (P.getInstance().setSubject(e), c.getInstance().setSubject(!1)), !e.code;
|
|
912
1138
|
}
|
|
913
1139
|
fetchData(e = {}) {
|
|
914
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(),
|
|
915
|
-
|
|
1140
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), l = M(r, M.URL), s = this.encode({ ...e }, l);
|
|
1141
|
+
c.getInstance().setSubject(this.isLoadingEnabled);
|
|
916
1142
|
const o = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
|
|
917
|
-
return
|
|
1143
|
+
return S(this.apiUrl, {
|
|
918
1144
|
method: this.method,
|
|
919
1145
|
headers: { ...this.headers, flow: o },
|
|
920
|
-
body:
|
|
921
|
-
selector: (
|
|
1146
|
+
body: s,
|
|
1147
|
+
selector: (a) => a.json()
|
|
922
1148
|
}).pipe(
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${
|
|
926
|
-
),
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
new
|
|
931
|
-
),
|
|
1149
|
+
L((a) => N(this.decode(a))),
|
|
1150
|
+
L((a) => (this.logDebug(
|
|
1151
|
+
`FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${s} <RESPONSE>: ${JSON.stringify(a)}`
|
|
1152
|
+
), N(a))),
|
|
1153
|
+
f(this.errorHandler),
|
|
1154
|
+
L((a) => (c.getInstance().setSubject(!1), N(a))),
|
|
1155
|
+
g((a) => (c.getInstance().setSubject(!1), P.getInstance().setSubject(
|
|
1156
|
+
new U().get(a, l)
|
|
1157
|
+
), u))
|
|
932
1158
|
);
|
|
933
1159
|
}
|
|
934
1160
|
}
|
|
935
1161
|
export {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1162
|
+
Ne as ApiMiddleware,
|
|
1163
|
+
U as ErrorCatalog,
|
|
1164
|
+
Le as FetchServiceBE,
|
|
1165
|
+
Oe as FetchServiceFE,
|
|
1166
|
+
c as LoadingHandler,
|
|
1167
|
+
P as MessageHandler,
|
|
1168
|
+
Ue as RxSubjectManager
|
|
943
1169
|
};
|