mp-front-cli 0.0.134 → 0.0.136

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;AA40BrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7B"}
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;AAm1BrD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CACD,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB,EAC5C,IAAI,GAAE,MAAoB;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7B"}
@@ -9,6 +9,6 @@ export declare class FetchServiceBE<TRes, TData = {}, TypeDataResponse extends T
9
9
  private errorHandler;
10
10
  private formatParams;
11
11
  fetchData(params?: TData, uuid?: string): Observable<ApiResponse<TRes, TypeDataResponse, Relationships>>;
12
- fetchCustomData(params?: TData, uuid?: string): Observable<TRes>;
12
+ fetchCustomData(params?: TData, uuid?: string, useToken?: boolean): Observable<TRes>;
13
13
  }
14
14
  //# sourceMappingURL=fetch-service-be.d.ts.map
@@ -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,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;AAM/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;CA8CpB"}
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;AAM/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,EACb,QAAQ,CAAC,EAAE,OAAO,GACjB,UAAU,CAAC,IAAI,CAAC;CA8CpB"}
@@ -4,6 +4,6 @@ export declare class CustomHeader extends CustomEncrypter {
4
4
  private headers;
5
5
  constructor(headers?: HeadersInit);
6
6
  addTokenBackend(headers: HeadersInit): Observable<HeadersInit>;
7
- getHeaders(headers?: HeadersInit): Observable<HeadersInit>;
7
+ getHeaders(headers?: HeadersInit, useToken?: boolean): Observable<HeadersInit>;
8
8
  }
9
9
  //# sourceMappingURL=custom-header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-header.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,MAAM,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAGpD,qBAAa,YAAa,SAAQ,eAAe;IAC/C,OAAO,CAAC,OAAO,CAAa;gBAEhB,OAAO,GAAE,WAAgB;IASrC,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;IAS9D,UAAU,CAAC,OAAO,GAAE,WAAgB,GAAG,UAAU,CAAC,WAAW,CAAC;CAM/D"}
1
+ {"version":3,"file":"custom-header.d.ts","sourceRoot":"","sources":["../../../src/core/utils/custom-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,MAAM,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAGpD,qBAAa,YAAa,SAAQ,eAAe;IAC/C,OAAO,CAAC,OAAO,CAAa;gBAEhB,OAAO,GAAE,WAAgB;IASrC,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;IAS9D,UAAU,CACR,OAAO,GAAE,WAAgB,EACzB,QAAQ,UAAO,GACd,UAAU,CAAC,WAAW,CAAC;CAW3B"}
@@ -185,6 +185,10 @@ const o = {
185
185
  title: "No hay existencias",
186
186
  message: "Por el momento no pudimos encontrar productos para ti, intenta más tarde"
187
187
  },
188
+ "CALCULATOR-BAD-REQUEST-34": {
189
+ title: "Crédito Insuficiente",
190
+ message: "Lamentamos informarte que tu línea de crédito no es suficiente para adquirir los productos de esta marca. Intenta con otra marca o regresa de nuevo en 90 días."
191
+ },
188
192
  //Apartadito
189
193
  "SAVING_NOT_FOUND-01": {
190
194
  title: "Verificar la identificación de guardado",
@@ -399,7 +403,7 @@ const o = {
399
403
  },
400
404
  "ENROLLMENT-LOANBALANCE-0062": {
401
405
  title: "Contacta con el equipo de soporte",
402
- message: "El IMEI se encuentra en una venta activa en el sistema"
406
+ message: "El IMEI se encuentra en una venta activa en el sistema."
403
407
  },
404
408
  "ENROLLMENT-USED-IMEI-0001": {
405
409
  title: "Validación de IMEI",
@@ -184,6 +184,10 @@ declare const translation: {
184
184
  title: string;
185
185
  message: string;
186
186
  };
187
+ "CALCULATOR-BAD-REQUEST-34": {
188
+ title: string;
189
+ message: string;
190
+ };
187
191
  "SAVING_NOT_FOUND-01": {
188
192
  title: string;
189
193
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lang/common/errors/calculator/es_MX/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyNhB,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lang/common/errors/calculator/es_MX/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6NhB,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -655,6 +655,10 @@ declare const translation: {
655
655
  title: string;
656
656
  message: string;
657
657
  };
658
+ "CALCULATOR-BAD-REQUEST-34": {
659
+ title: string;
660
+ message: string;
661
+ };
658
662
  "SAVING_NOT_FOUND-01": {
659
663
  title: string;
660
664
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ShB,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lang/common/errors/es_MX/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ShB,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { ApiMiddleware as l, ErrorCatalog as x, FetchServiceBE as f, FetchServiceFE as s } from "./mp-front-cli-core.es.js";
2
2
  import { LoadingHandler as E, MessageHandler as F, RxSubjectManager as M } from "./mp-front-cli-utils-rxjs.es.js";
3
3
  import { S as H } from "./index-def0b487.js";
4
- import "./i18n-9949c669.js";
4
+ import "./i18n-b5bc087a.js";
5
5
  import "i18next";
6
6
  import "./mp-front-cli-logger.es.js";
7
7
  import "rxjs";
@@ -1,14 +1,14 @@
1
1
  var u = Object.defineProperty;
2
2
  var f = (t, r, e) => r in t ? u(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var O = (t, r, e) => (f(t, typeof r != "symbol" ? r + "" : r, e), e);
3
+ var L = (t, r, e) => (f(t, typeof r != "symbol" ? r + "" : r, e), e);
4
4
  import { LoadingHandler as g, MessageHandler as M } from "./mp-front-cli-utils-rxjs.es.js";
5
- import { RxSubjectManager as Se } from "./mp-front-cli-utils-rxjs.es.js";
5
+ import { RxSubjectManager as Ue } from "./mp-front-cli-utils-rxjs.es.js";
6
6
  import { f as c } from "./index-def0b487.js";
7
7
  import { S as ne } from "./index-def0b487.js";
8
- import "./i18n-9949c669.js";
9
- import { t as S } from "i18next";
8
+ import "./i18n-b5bc087a.js";
9
+ import { t as U } from "i18next";
10
10
  import { CustomLogger as F } from "./mp-front-cli-logger.es.js";
11
- import { of as o, switchMap as L, forkJoin as p, catchError as U, EMPTY as P, filter as w } from "rxjs";
11
+ import { of as O, switchMap as I, forkJoin as B, catchError as S, EMPTY as P, filter as w } from "rxjs";
12
12
  import { CustomEncrypter as v } from "./mp-front-cli-encrypter.es.js";
13
13
  import { CustomHeader as h } from "./mp-front-cli-header.es.js";
14
14
  import V from "querystring";
@@ -908,6 +908,13 @@ const x = {
908
908
  type: "modal",
909
909
  level: "warning"
910
910
  },
911
+ "CALCULATOR-BAD-REQUEST-34": {
912
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-34.title",
913
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-34.message",
914
+ code: 420,
915
+ type: "modal",
916
+ level: "warning"
917
+ },
911
918
  //Apartadito
912
919
  "SAVING_NOT_FOUND-01": {
913
920
  title: "errors.calculator.SAVING_NOT_FOUND-01.title",
@@ -1253,8 +1260,8 @@ class C extends F {
1253
1260
  if (r instanceof Error)
1254
1261
  return this.logError(r.message), {
1255
1262
  ...i.internalError,
1256
- title: S(i.internalError.title),
1257
- message: S(i.internalError.message),
1263
+ title: U(i.internalError.title),
1264
+ message: U(i.internalError.message),
1258
1265
  uuid: e
1259
1266
  };
1260
1267
  const E = typeof r == "string" ? r : r.code ?? r.errorType;
@@ -1262,11 +1269,11 @@ class C extends F {
1262
1269
  const l = typeof r == "string" ? {} : { ...r };
1263
1270
  return {
1264
1271
  ...i[E] ?? i.default,
1265
- title: S(
1272
+ title: U(
1266
1273
  ((N = i[E]) == null ? void 0 : N.title) ?? i.default.title,
1267
1274
  l
1268
1275
  ),
1269
- message: S(
1276
+ message: U(
1270
1277
  ((A = i[E]) == null ? void 0 : A.message) ?? i.default.message,
1271
1278
  l
1272
1279
  ),
@@ -1278,8 +1285,8 @@ class C extends F {
1278
1285
  class Ie extends v {
1279
1286
  constructor() {
1280
1287
  super(...arguments);
1281
- O(this, "uuid", "");
1282
- O(this, "session", null);
1288
+ L(this, "uuid", "");
1289
+ L(this, "session", null);
1283
1290
  }
1284
1291
  setSession(e) {
1285
1292
  this.session = e;
@@ -1299,24 +1306,24 @@ class Ie extends v {
1299
1306
  get(e) {
1300
1307
  return this.logDebug("get ApiMiddleware"), (E, l) => {
1301
1308
  var N;
1302
- this.logDebug("return ApiMiddleware"), this.uuid = (N = E == null ? void 0 : E.body) == null ? void 0 : N.uuid, o(E).pipe(
1303
- L(
1304
- (A) => p({
1305
- params: o(this.decode(A.body)),
1306
- headers: o(A.headers)
1309
+ this.logDebug("return ApiMiddleware"), this.uuid = (N = E == null ? void 0 : E.body) == null ? void 0 : N.uuid, O(E).pipe(
1310
+ I(
1311
+ (A) => B({
1312
+ params: O(this.decode(A.body)),
1313
+ headers: O(A.headers)
1307
1314
  })
1308
1315
  ),
1309
- L(
1310
- ({ params: A, headers: R }) => p({
1316
+ I(
1317
+ ({ params: A, headers: R }) => B({
1311
1318
  response: e(A, this.uuid, R),
1312
- headers: o(R),
1313
- params: o(A)
1319
+ headers: O(R),
1320
+ params: O(A)
1314
1321
  })
1315
1322
  ),
1316
- L(({ params: A, response: R, headers: s }) => (this.logDebug(
1323
+ I(({ params: A, response: R, headers: s }) => (this.logDebug(
1317
1324
  `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${E.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(s)} \x1B[37m <UUID> \x1B[33m ${E.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(A)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(R)}`
1318
- ), o(R))),
1319
- U((A) => {
1325
+ ), O(R))),
1326
+ S((A) => {
1320
1327
  var R;
1321
1328
  return this.logError(
1322
1329
  `ApiMiddleware <URL>: ${E == null ? void 0 : E.url} <HEADERS>: ${JSON.stringify(E == null ? void 0 : E.headers)} <UUID> ${(R = E == null ? void 0 : E.body) == null ? void 0 : R.uuid} <PARAMS> ${JSON.stringify(E == null ? void 0 : E.body)} <ERROR>: ${JSON.stringify(A)}`
@@ -1334,8 +1341,8 @@ const X = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1334
1341
  class ie extends h {
1335
1342
  constructor(e, E, l = {}) {
1336
1343
  super(l);
1337
- O(this, "apiUrl");
1338
- O(this, "method");
1344
+ L(this, "apiUrl");
1345
+ L(this, "method");
1339
1346
  this.apiUrl = e, this.method = E ?? "POST";
1340
1347
  }
1341
1348
  errorHandler(e, E) {
@@ -1353,7 +1360,7 @@ class ie extends h {
1353
1360
  }
1354
1361
  fetchData(e = {}, E) {
1355
1362
  return this.getHeaders().pipe(
1356
- L(
1363
+ I(
1357
1364
  (l) => c(
1358
1365
  this.apiUrl,
1359
1366
  {
@@ -1363,7 +1370,7 @@ class ie extends h {
1363
1370
  selector: (N) => N.json()
1364
1371
  }
1365
1372
  ).pipe(
1366
- U((N) => {
1373
+ S((N) => {
1367
1374
  throw this.logError(JSON.stringify(N)), this.logError(
1368
1375
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${E} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1369
1376
  l
@@ -1372,48 +1379,48 @@ class ie extends h {
1372
1379
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(N)} \x1B[33m`
1373
1380
  ), new C().get("default", E);
1374
1381
  }),
1375
- L((N) => (this.logDebug(
1382
+ I((N) => (this.logDebug(
1376
1383
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${E} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1377
1384
  l
1378
1385
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1379
1386
  this.formatParams(e)
1380
1387
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(N)} \x1B[33m`
1381
- ), o(N)))
1388
+ ), O(N)))
1382
1389
  )
1383
1390
  ),
1384
1391
  w((l) => this.errorHandler(l, E))
1385
1392
  );
1386
1393
  }
1387
- fetchCustomData(e = {}, E) {
1388
- const l = {
1394
+ fetchCustomData(e = {}, E, l) {
1395
+ const N = {
1389
1396
  "Content-Type": "application/json"
1390
- }, N = V.stringify(
1397
+ }, A = V.stringify(
1391
1398
  e
1392
- ), A = `${this.apiUrl}?${N}`, R = this.method === "GET" ? A : this.apiUrl;
1393
- return this.getHeaders(l).pipe(
1394
- L(
1395
- (s) => c(R, {
1399
+ ), R = `${this.apiUrl}?${A}`, s = this.method === "GET" ? R : this.apiUrl;
1400
+ return this.getHeaders(N, l).pipe(
1401
+ I(
1402
+ (T) => c(s, {
1396
1403
  method: this.method,
1397
- headers: s,
1404
+ headers: T,
1398
1405
  body: this.method === "GET" ? null : JSON.stringify(e),
1399
- selector: (T) => T.json()
1406
+ selector: (a) => a.json()
1400
1407
  }).pipe(
1401
- U((T) => {
1402
- throw this.logError(JSON.stringify(T)), this.logError(
1403
- `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${R} \x1B[37m <UUID>: \x1B[33m ${E} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1404
- s
1408
+ S((a) => {
1409
+ throw this.logError(JSON.stringify(a)), this.logError(
1410
+ `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${s} \x1B[37m <UUID>: \x1B[33m ${E} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1411
+ T
1405
1412
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1406
1413
  this.formatParams(e)
1407
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(T)} \x1B[33m`
1414
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)} \x1B[33m`
1408
1415
  ), new C().get("default", E);
1409
1416
  }),
1410
- L((T) => (this.logDebug(
1411
- `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${R} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${E} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1412
- s
1417
+ I((a) => (this.logDebug(
1418
+ `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${s} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${E} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1419
+ T
1413
1420
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1414
1421
  e
1415
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(T)} \x1B[33m`
1416
- ), o(T)))
1422
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)} \x1B[33m`
1423
+ ), O(a)))
1417
1424
  )
1418
1425
  )
1419
1426
  );
@@ -1446,8 +1453,8 @@ function j(t, r, e) {
1446
1453
  let T = new Uint8Array(16 + l.length);
1447
1454
  if (T.set(N), T.set(l, N.length), T = e(T), T[6] = T[6] & 15 | r, T[8] = T[8] & 63 | 128, A) {
1448
1455
  R = R || 0;
1449
- for (let I = 0; I < 16; ++I)
1450
- A[R + I] = T[I];
1456
+ for (let a = 0; a < 16; ++a)
1457
+ A[R + a] = T[a];
1451
1458
  return A;
1452
1459
  }
1453
1460
  return H(T);
@@ -1493,28 +1500,28 @@ function z(t) {
1493
1500
  N[l - 1][14] = (t.length - 1) * 8 / Math.pow(2, 32), N[l - 1][14] = Math.floor(N[l - 1][14]), N[l - 1][15] = (t.length - 1) * 8 & 4294967295;
1494
1501
  for (let A = 0; A < l; ++A) {
1495
1502
  const R = new Uint32Array(80);
1496
- for (let a = 0; a < 16; ++a)
1497
- R[a] = N[A][a];
1498
- for (let a = 16; a < 80; ++a)
1499
- R[a] = D(R[a - 3] ^ R[a - 8] ^ R[a - 14] ^ R[a - 16], 1);
1500
- let s = e[0], T = e[1], I = e[2], m = e[3], n = e[4];
1501
- for (let a = 0; a < 80; ++a) {
1502
- const d = Math.floor(a / 20), y = D(s, 5) + Z(d, T, I, m) + n + r[d] + R[a] >>> 0;
1503
- n = m, m = I, I = D(T, 30) >>> 0, T = s, s = y;
1503
+ for (let o = 0; o < 16; ++o)
1504
+ R[o] = N[A][o];
1505
+ for (let o = 16; o < 80; ++o)
1506
+ R[o] = D(R[o - 3] ^ R[o - 8] ^ R[o - 14] ^ R[o - 16], 1);
1507
+ let s = e[0], T = e[1], a = e[2], m = e[3], n = e[4];
1508
+ for (let o = 0; o < 80; ++o) {
1509
+ const d = Math.floor(o / 20), y = D(s, 5) + Z(d, T, a, m) + n + r[d] + R[o] >>> 0;
1510
+ n = m, m = a, a = D(T, 30) >>> 0, T = s, s = y;
1504
1511
  }
1505
- e[0] = e[0] + s >>> 0, e[1] = e[1] + T >>> 0, e[2] = e[2] + I >>> 0, e[3] = e[3] + m >>> 0, e[4] = e[4] + n >>> 0;
1512
+ e[0] = e[0] + s >>> 0, e[1] = e[1] + T >>> 0, e[2] = e[2] + a >>> 0, e[3] = e[3] + m >>> 0, e[4] = e[4] + n >>> 0;
1506
1513
  }
1507
1514
  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];
1508
1515
  }
1509
- const q = j("v5", 80, z), B = q;
1516
+ const q = j("v5", 80, z), p = q;
1510
1517
  class Ce extends Q {
1511
1518
  constructor(e, E = "POST", l = {}) {
1512
1519
  super();
1513
- O(this, "apiUrl");
1514
- O(this, "method");
1515
- O(this, "headers");
1516
- O(this, "isLoadingEnabled", !0);
1517
- O(this, "errorResponse");
1520
+ L(this, "apiUrl");
1521
+ L(this, "method");
1522
+ L(this, "headers");
1523
+ L(this, "isLoadingEnabled", !0);
1524
+ L(this, "errorResponse");
1518
1525
  this.apiUrl = e, this.method = E, this.headers = {
1519
1526
  "Content-Type": "application/json",
1520
1527
  ...l
@@ -1527,7 +1534,7 @@ class Ce extends Q {
1527
1534
  this.errorResponse = e;
1528
1535
  }
1529
1536
  fetchData(e = {}) {
1530
- const E = (/* @__PURE__ */ new Date()).toISOString(), l = B(E, B.URL), N = this.encode({ ...e }, l);
1537
+ const E = (/* @__PURE__ */ new Date()).toISOString(), l = p(E, p.URL), N = this.encode({ ...e }, l);
1531
1538
  g.getInstance().setSubject(this.isLoadingEnabled);
1532
1539
  const R = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
1533
1540
  return c(this.apiUrl, {
@@ -1536,18 +1543,18 @@ class Ce extends Q {
1536
1543
  body: N,
1537
1544
  selector: (s) => s.json()
1538
1545
  }).pipe(
1539
- L((s) => o(this.decode(s))),
1540
- L((s) => s.code && (s.type === "modal" || s.type === "message") ? (this.logError(
1546
+ I((s) => O(this.decode(s))),
1547
+ I((s) => s.code && (s.type === "modal" || s.type === "message") ? (this.logError(
1541
1548
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${N} <RESPONSE>: ${JSON.stringify(s)}`
1542
- ), g.getInstance().setSubject(!1), M.getInstance().setSubject(s), this.errorResponse ? o(this.errorResponse) : P) : o(s)),
1543
- L((s) => (g.getInstance().setSubject(!1), this.logDebug(
1549
+ ), g.getInstance().setSubject(!1), M.getInstance().setSubject(s), this.errorResponse ? O(this.errorResponse) : P) : O(s)),
1550
+ I((s) => (g.getInstance().setSubject(!1), this.logDebug(
1544
1551
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${N} <RESPONSE>: ${JSON.stringify(s)}`
1545
- ), o(s))),
1546
- U((s) => (this.logError(
1552
+ ), O(s))),
1553
+ S((s) => (this.logError(
1547
1554
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${N} <RESPONSE>: ${JSON.stringify(s)}`
1548
1555
  ), g.getInstance().setSubject(!1), M.getInstance().setSubject(
1549
1556
  new C().get(s, l)
1550
- ), this.errorResponse ? o(this.errorResponse) : P))
1557
+ ), this.errorResponse ? O(this.errorResponse) : P))
1551
1558
  );
1552
1559
  }
1553
1560
  }
@@ -1558,6 +1565,6 @@ export {
1558
1565
  Ce as FetchServiceFE,
1559
1566
  g as LoadingHandler,
1560
1567
  M as MessageHandler,
1561
- Se as RxSubjectManager,
1568
+ Ue as RxSubjectManager,
1562
1569
  ne as ServiceToken
1563
1570
  };
@@ -1,17 +1,17 @@
1
1
  var n = Object.defineProperty;
2
- var p = (r, t, e) => t in r ? n(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var i = (r, t, e) => (p(r, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { switchMap as a, of as s } from "rxjs";
5
- import { CustomEncrypter as d } from "./mp-front-cli-encrypter.es.js";
6
- import { S as m } from "./index-def0b487.js";
2
+ var d = (r, t, e) => t in r ? n(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var a = (r, t, e) => (d(r, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { switchMap as s, of as o } from "rxjs";
5
+ import { CustomEncrypter as m } from "./mp-front-cli-encrypter.es.js";
6
+ import { S as c } from "./index-def0b487.js";
7
7
  import "node-jose";
8
8
  import "crypto";
9
9
  import "./mp-front-cli-encoder.es.js";
10
10
  import "./mp-front-cli-logger.es.js";
11
- class H extends d {
11
+ class T extends m {
12
12
  constructor(e = {}) {
13
13
  super();
14
- i(this, "headers");
14
+ a(this, "headers");
15
15
  this.headers = {
16
16
  Accept: "application/json",
17
17
  "Content-Type": "application/vnd.api+json",
@@ -19,16 +19,18 @@ class H extends d {
19
19
  };
20
20
  }
21
21
  addTokenBackend(e) {
22
- return this.logDebug("addTokenBackend CustomHeader", JSON.stringify(e)), new m().get().pipe(
23
- a((o) => s({ ...e, Authorization: `Bearer ${o}` }))
22
+ return this.logDebug("addTokenBackend CustomHeader", JSON.stringify(e)), new c().get().pipe(
23
+ s((i) => o({ ...e, Authorization: `Bearer ${i}` }))
24
24
  );
25
25
  }
26
- getHeaders(e = {}) {
27
- return this.logDebug("getHeaders CustomHeader"), this.addTokenBackend(e).pipe(
28
- a((o) => s({ ...o, ...this.headers }))
26
+ getHeaders(e = {}, i = !0) {
27
+ return this.logDebug("getHeaders CustomHeader"), i ? this.addTokenBackend(e).pipe(
28
+ s((p) => o({ ...p, ...this.headers }))
29
+ ) : o(e).pipe(
30
+ s((p) => o({ ...p, ...this.headers }))
29
31
  );
30
32
  }
31
33
  }
32
34
  export {
33
- H as CustomHeader
35
+ T as CustomHeader
34
36
  };
@@ -1,4 +1,4 @@
1
- import { t } from "./i18n-9949c669.js";
1
+ import { t } from "./i18n-b5bc087a.js";
2
2
  import { default as i } from "i18next";
3
3
  const e = {
4
4
  errors: {}
package/package.json CHANGED
@@ -1,91 +1,91 @@
1
- {
2
- "name": "mp-front-cli",
3
- "version": "0.0.134",
4
- "private": false,
5
- "type": "module",
6
- "scripts": {
7
- "build": "tsc && vite build",
8
- "package": "npm pack",
9
- "lint": "eslint --ext .js,.jsx,.ts,.tsx .",
10
- "snyk": "snyk test",
11
- "husky:prepare": "husky install"
12
- },
13
- "files": [
14
- "dist"
15
- ],
16
- "engines": {
17
- "node": ">=20.0.0"
18
- },
19
- "exports": {
20
- ".": {
21
- "types": "./dist/index.d.ts",
22
- "import": "./dist/mp-front-cli-all.es.js"
23
- },
24
- "./core": {
25
- "types": "./dist/core/index.d.ts",
26
- "import": "./dist/mp-front-cli-core.es.js"
27
- },
28
- "./core/rxjs": {
29
- "types": "./dist/core/utils/rxjs/index.d.ts",
30
- "import": "./dist/mp-front-cli-utils-rxjs.es.js"
31
- },
32
- "./core/encoder": {
33
- "types": "./dist/core/utils/custom-encoder.d.ts",
34
- "import": "./dist/mp-front-cli-encoder.es.js"
35
- },
36
- "./core/header": {
37
- "types": "./dist/core/utils/custom-header.d.ts",
38
- "import": "./dist/mp-front-cli-header.es.js"
39
- },
40
- "./core/logger": {
41
- "types": "./dist/core/utils/custom-logger.d.ts",
42
- "import": "./dist/mp-front-cli-logger.es.js"
43
- },
44
- "./core/encrypter": {
45
- "types": "./dist/core/utils/custom-encrypter.d.ts",
46
- "import": "./dist/mp-front-cli-encrypter.es.js"
47
- },
48
- "./core/cache": {
49
- "types": "./dist/core/utils/custom-cache.d.ts",
50
- "import": "./dist/mp-front-cli-cache.es.js"
51
- },
52
- "./core/adapter": {
53
- "types": "./dist/core/utils/custom-adapter.d.ts",
54
- "import": "./dist/mp-front-cli-adapter.es.js"
55
- },
56
- "./core/services": {
57
- "types": "./dist/core/services/index.d.ts",
58
- "import": "./dist/mp-front-cli-services.es.js"
59
- },
60
- "./locale": {
61
- "types": "./dist/lang/index.d.ts",
62
- "import": "./dist/mp-front-cli-locale.es.js"
63
- }
64
- },
65
- "peerDependencies": {
66
- "i18next": "23.10.0",
67
- "ioredis": "5.3.2",
68
- "next-auth": "4.24.10",
69
- "node-jose": "2.2.0",
70
- "rxjs": "7.8.1"
71
- },
72
- "dependencies": {
73
- "@types/node-jose": "1.1.13",
74
- "@types/uuid": "9.0.8",
75
- "husky": "^9.0.11",
76
- "lodash": "4.17.21",
77
- "uuid": "9.0.1"
78
- },
79
- "devDependencies": {
80
- "@types/lodash": "4.14.202",
81
- "@types/node": "20.10.6",
82
- "@typescript-eslint/eslint-plugin": "6.19.0",
83
- "eslint": "8.56.0",
84
- "eslint-config-prettier": "9.1.0",
85
- "eslint-plugin-prettier": "5.1.3",
86
- "typescript": "5.3.3",
87
- "vite": "^4.5.3",
88
- "vite-plugin-dts": "3.7.1",
89
- "vite-tsconfig-paths": "4.2.2"
90
- }
1
+ {
2
+ "name": "mp-front-cli",
3
+ "version": "0.0.136",
4
+ "private": false,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "tsc && vite build",
8
+ "package": "npm pack",
9
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx .",
10
+ "snyk": "snyk test",
11
+ "husky:prepare": "husky install"
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "engines": {
17
+ "node": ">=20.0.0"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/mp-front-cli-all.es.js"
23
+ },
24
+ "./core": {
25
+ "types": "./dist/core/index.d.ts",
26
+ "import": "./dist/mp-front-cli-core.es.js"
27
+ },
28
+ "./core/rxjs": {
29
+ "types": "./dist/core/utils/rxjs/index.d.ts",
30
+ "import": "./dist/mp-front-cli-utils-rxjs.es.js"
31
+ },
32
+ "./core/encoder": {
33
+ "types": "./dist/core/utils/custom-encoder.d.ts",
34
+ "import": "./dist/mp-front-cli-encoder.es.js"
35
+ },
36
+ "./core/header": {
37
+ "types": "./dist/core/utils/custom-header.d.ts",
38
+ "import": "./dist/mp-front-cli-header.es.js"
39
+ },
40
+ "./core/logger": {
41
+ "types": "./dist/core/utils/custom-logger.d.ts",
42
+ "import": "./dist/mp-front-cli-logger.es.js"
43
+ },
44
+ "./core/encrypter": {
45
+ "types": "./dist/core/utils/custom-encrypter.d.ts",
46
+ "import": "./dist/mp-front-cli-encrypter.es.js"
47
+ },
48
+ "./core/cache": {
49
+ "types": "./dist/core/utils/custom-cache.d.ts",
50
+ "import": "./dist/mp-front-cli-cache.es.js"
51
+ },
52
+ "./core/adapter": {
53
+ "types": "./dist/core/utils/custom-adapter.d.ts",
54
+ "import": "./dist/mp-front-cli-adapter.es.js"
55
+ },
56
+ "./core/services": {
57
+ "types": "./dist/core/services/index.d.ts",
58
+ "import": "./dist/mp-front-cli-services.es.js"
59
+ },
60
+ "./locale": {
61
+ "types": "./dist/lang/index.d.ts",
62
+ "import": "./dist/mp-front-cli-locale.es.js"
63
+ }
64
+ },
65
+ "peerDependencies": {
66
+ "i18next": "23.10.0",
67
+ "ioredis": "5.3.2",
68
+ "next-auth": "4.24.10",
69
+ "node-jose": "2.2.0",
70
+ "rxjs": "7.8.1"
71
+ },
72
+ "dependencies": {
73
+ "@types/node-jose": "1.1.13",
74
+ "@types/uuid": "9.0.8",
75
+ "husky": "^9.0.11",
76
+ "lodash": "4.17.21",
77
+ "uuid": "9.0.1"
78
+ },
79
+ "devDependencies": {
80
+ "@types/lodash": "4.14.202",
81
+ "@types/node": "20.10.6",
82
+ "@typescript-eslint/eslint-plugin": "6.19.0",
83
+ "eslint": "8.56.0",
84
+ "eslint-config-prettier": "9.1.0",
85
+ "eslint-plugin-prettier": "5.1.3",
86
+ "typescript": "5.3.3",
87
+ "vite": "^4.5.3",
88
+ "vite-plugin-dts": "3.7.1",
89
+ "vite-tsconfig-paths": "4.2.2"
90
+ }
91
91
  }