mp-front-cli 0.0.4 → 0.0.6

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.
Files changed (53) hide show
  1. package/dist/core/index.d.ts +1 -0
  2. package/dist/core/index.d.ts.map +1 -1
  3. package/dist/core/index.js +1 -0
  4. package/dist/core/services/ServiceToken.d.ts +1 -1
  5. package/dist/core/services/ServiceToken.d.ts.map +1 -1
  6. package/dist/core/services/ServiceToken.js +1 -1
  7. package/dist/core/services/index.d.ts +2 -0
  8. package/dist/core/services/index.d.ts.map +1 -0
  9. package/dist/core/services/index.js +1 -0
  10. package/dist/core/utils/ApiMiddleware/index.d.ts +1 -2
  11. package/dist/core/utils/ApiMiddleware/index.d.ts.map +1 -1
  12. package/dist/core/utils/ApiMiddleware/index.js +1 -2
  13. package/dist/core/utils/CustomEncoder/index.d.ts +1 -1
  14. package/dist/core/utils/CustomEncoder/index.d.ts.map +1 -1
  15. package/dist/core/utils/CustomEncoder/index.js +8 -8
  16. package/dist/core/utils/CustomHeader/index.d.ts +1 -1
  17. package/dist/core/utils/CustomHeader/index.d.ts.map +1 -1
  18. package/dist/core/utils/CustomHeader/index.js +2 -2
  19. package/dist/core/utils/CustomValidator/index.d.ts +1 -1
  20. package/dist/core/utils/CustomValidator/index.d.ts.map +1 -1
  21. package/dist/core/utils/CustomValidator/index.js +1 -1
  22. package/dist/core/utils/ErrorCatalog/index.d.ts +3 -3
  23. package/dist/core/utils/ErrorCatalog/index.d.ts.map +1 -1
  24. package/dist/core/utils/ErrorCatalog/index.js +1 -1
  25. package/dist/core/utils/MessageErrorBFF/index.d.ts +2 -3
  26. package/dist/core/utils/MessageErrorBFF/index.d.ts.map +1 -1
  27. package/dist/core/utils/MessageErrorBFF/index.js +1 -2
  28. package/dist/core/utils/apiRequest/FetchServiceBE.d.ts +2 -3
  29. package/dist/core/utils/apiRequest/FetchServiceBE.d.ts.map +1 -1
  30. package/dist/core/utils/apiRequest/FetchServiceBE.js +1 -3
  31. package/dist/core/utils/apiRequest/FetchServiceFE.d.ts +2 -3
  32. package/dist/core/utils/apiRequest/FetchServiceFE.d.ts.map +1 -1
  33. package/dist/core/utils/apiRequest/FetchServiceFE.js +1 -2
  34. package/dist/core/utils/index.d.ts +1 -2
  35. package/dist/core/utils/index.d.ts.map +1 -1
  36. package/dist/core/utils/interfaces/messageError.d.ts +1 -1
  37. package/dist/core/utils/interfaces/messageError.d.ts.map +1 -1
  38. package/dist/core/utils/rxSubjects/ErrorHandler.d.ts +2 -2
  39. package/dist/core/utils/rxSubjects/ErrorHandler.d.ts.map +1 -1
  40. package/dist/core/utils/rxSubjects/ErrorHandler.js +1 -1
  41. package/dist/types/ApiResponse.d.ts +40 -0
  42. package/dist/types/ApiResponse.d.ts.map +1 -0
  43. package/dist/types/ApiResponse.js +1 -0
  44. package/dist/types/index.d.ts +4 -0
  45. package/dist/types/index.d.ts.map +1 -0
  46. package/dist/types/index.js +3 -0
  47. package/dist/types/messageError.d.ts +14 -0
  48. package/dist/types/messageError.d.ts.map +1 -0
  49. package/dist/types/messageError.js +1 -0
  50. package/dist/types/method.d.ts +2 -0
  51. package/dist/types/method.d.ts.map +1 -0
  52. package/dist/types/method.js +1 -0
  53. package/package.json +1 -1
@@ -1,2 +1,3 @@
1
1
  export * from "./utils";
2
+ export * from "./services";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
@@ -1 +1,2 @@
1
1
  export * from "./utils";
2
+ export * from "./services";
@@ -1,4 +1,4 @@
1
- import CustomLogger from "../utils/CustomLogger";
1
+ import { CustomLogger } from "@mp-front/core";
2
2
  export declare class ServiceToken extends CustomLogger {
3
3
  private API_AUTH_BACK_URL;
4
4
  private API_AUTH_BACK_USERNAME_AUTH;
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceToken.d.ts","sourceRoot":"","sources":["../../../src/core/services/ServiceToken.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAEhD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,2BAA2B,CAAQ;IAC3C,OAAO,CAAC,2BAA2B,CAAQ;IAC3C,OAAO,CAAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,mBAAmB,CAAQ;IACnC,OAAO,CAAC,sBAAsB,CAAQ;IACtC,OAAO,CAAC,OAAO,CAAa;;IAqB5B,GAAG;CAsBJ"}
1
+ {"version":3,"file":"ServiceToken.d.ts","sourceRoot":"","sources":["../../../src/core/services/ServiceToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,2BAA2B,CAAQ;IAC3C,OAAO,CAAC,2BAA2B,CAAQ;IAC3C,OAAO,CAAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,mBAAmB,CAAQ;IACnC,OAAO,CAAC,sBAAsB,CAAQ;IACtC,OAAO,CAAC,OAAO,CAAa;;IAqB5B,GAAG;CAsBJ"}
@@ -1,6 +1,6 @@
1
+ import { CustomLogger } from "@mp-front/core";
1
2
  import { catchError, of, switchMap } from "rxjs";
2
3
  import { fromFetch } from "rxjs/fetch";
3
- import CustomLogger from "../utils/CustomLogger";
4
4
  export class ServiceToken extends CustomLogger {
5
5
  API_AUTH_BACK_URL;
6
6
  API_AUTH_BACK_USERNAME_AUTH;
@@ -0,0 +1,2 @@
1
+ export { ServiceToken } from "./ServiceToken";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1 @@
1
+ export { ServiceToken } from "./ServiceToken";
@@ -1,7 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
- import CustomValidator from "../CustomValidator";
3
2
  import type { NextApiRequest, NextApiResponse } from "next";
4
- import { ApiResponse } from "../interfaces/ApiResponse";
3
+ import { ApiResponse, CustomValidator } from "@mp-front/core";
5
4
  export declare class ApiMiddleware<TRes, TData> extends CustomValidator {
6
5
  get(handle: (params: TData) => Observable<ApiResponse<TRes>>): (req: NextApiRequest, res: NextApiResponse) => void;
7
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/ApiMiddleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6B,MAAM,MAAM,CAAA;AAC5D,OAAO,eAAe,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEvD,qBAAa,aAAa,CAAC,IAAI,EAAE,KAAK,CAAE,SAAQ,eAAe;IAC7D,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAG7C,cAAc,OAAO,eAAe;CA+BpD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/ApiMiddleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6B,MAAM,MAAM,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAgB,MAAM,gBAAgB,CAAA;AAE3E,qBAAa,aAAa,CAAC,IAAI,EAAE,KAAK,CAAE,SAAQ,eAAe;IAC7D,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAG7C,cAAc,OAAO,eAAe;CA+BpD"}
@@ -1,6 +1,5 @@
1
1
  import { catchError, of, switchMap } from "rxjs";
2
- import CustomValidator from "../CustomValidator";
3
- import { ErrorHandler } from "../rxSubjects/ErrorHandler";
2
+ import { CustomValidator, ErrorHandler } from "@mp-front/core";
4
3
  export class ApiMiddleware extends CustomValidator {
5
4
  get(handle) {
6
5
  this.logDebug("get ApiMiddleware");
@@ -1,4 +1,4 @@
1
- import { CustomLogger } from "@/core";
1
+ import { CustomLogger } from '@mp-front/core';
2
2
  export declare class CustomEncoder extends CustomLogger {
3
3
  encode<T>(data: T): string;
4
4
  decode<T>(data: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/CustomEncoder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAGrC,qBAAa,aAAc,SAAQ,YAAY;IAC7C,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IAajB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE;CAiBjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/CustomEncoder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,qBAAa,aAAc,SAAQ,YAAY;IAC7C,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IAajB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE;CAiBjE"}
@@ -1,31 +1,31 @@
1
- import { CustomLogger } from "@/core";
2
- import { isString } from "lodash";
1
+ import { CustomLogger } from '@mp-front/core';
2
+ import { isString } from 'lodash';
3
3
  export class CustomEncoder extends CustomLogger {
4
4
  encode(data) {
5
5
  try {
6
- this.logDebug("encode CustomEncoder", JSON.stringify(data));
6
+ this.logDebug('encode CustomEncoder', JSON.stringify(data));
7
7
  const json = JSON.stringify(data);
8
- const base64 = Buffer.from(json).toString("base64");
8
+ const base64 = Buffer.from(json).toString('base64');
9
9
  return JSON.stringify({ base64 });
10
10
  }
11
11
  catch (error) {
12
- this.logError("error convert to base64");
12
+ this.logError('error convert to base64');
13
13
  }
14
14
  return JSON.stringify(data);
15
15
  }
16
16
  decode(data) {
17
17
  const { base64 } = data;
18
18
  try {
19
- this.logDebug("decode CustomEncoder", JSON.stringify(base64));
19
+ this.logDebug('decode CustomEncoder', JSON.stringify(base64));
20
20
  const regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
21
21
  if (isString(base64) && regex.test(base64)) {
22
- const json = Buffer.from(base64, "base64").toString();
22
+ const json = Buffer.from(base64, 'base64').toString();
23
23
  const data = JSON.parse(json);
24
24
  return data;
25
25
  }
26
26
  }
27
27
  catch (error) {
28
- this.logError("error convert to base64");
28
+ this.logError('error convert to base64');
29
29
  }
30
30
  return base64;
31
31
  }
@@ -1,4 +1,4 @@
1
- import { CustomValidator } from "@/core";
1
+ import { CustomValidator } from "@mp-front/core";
2
2
  export default class CustomHeader extends CustomValidator {
3
3
  private headers;
4
4
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/CustomHeader/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAExC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IACvD,OAAO,CAAC,OAAO,CAAa;;IAU5B,eAAe,CAAC,OAAO,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASpC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMX"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/CustomHeader/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGhD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IACvD,OAAO,CAAC,OAAO,CAAa;;IAU5B,eAAe,CAAC,OAAO,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASpC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMX"}
@@ -1,6 +1,6 @@
1
+ import { ServiceToken } from "@mp-front/core";
2
+ import { CustomValidator } from "@mp-front/core";
1
3
  import { of, switchMap } from "rxjs";
2
- import { ServiceToken } from "@/core/services/ServiceToken";
3
- import { CustomValidator } from "@/core";
4
4
  export default class CustomHeader extends CustomValidator {
5
5
  headers;
6
6
  constructor() {
@@ -1,4 +1,4 @@
1
- import { CustomEncoder } from "@/core";
1
+ import { CustomEncoder } from "@mp-front/core";
2
2
  import type { NextApiRequest } from "next";
3
3
  import type { NextRequest } from "next/server";
4
4
  export default class CustomValidator extends CustomEncoder {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/CustomValidator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAmB,MAAM,QAAQ,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,aAAa;IAClD,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,WAAW;CAS3D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/CustomValidator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAmB,MAAM,gBAAgB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,aAAa;IAClD,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,WAAW;CAS3D"}
@@ -1,4 +1,4 @@
1
- import { CustomEncoder, MessageErrorBFF } from "@/core";
1
+ import { CustomEncoder, MessageErrorBFF } from "@mp-front/core";
2
2
  import { getToken } from "next-auth/jwt";
3
3
  export default class CustomValidator extends CustomEncoder {
4
4
  async validateTokenFront(req) {
@@ -1,12 +1,12 @@
1
- import { CustomLogger } from "..";
2
- import { ApiError } from "../interfaces/ApiResponse";
1
+ import { CustomLogger } from "@mp-front/core";
2
+ import { ApiError } from "@mp-front/types";
3
3
  export declare class ErrorCatalog extends CustomLogger {
4
4
  get(error?: string | Error | ApiError): {
5
5
  title: string;
6
6
  message: string;
7
7
  code?: number | undefined;
8
8
  type: "modal" | "message";
9
- level: "error" | "success" | "warning" | "info" | "confirm";
9
+ level: "error" | "success" | "warning" | "info";
10
10
  payload?: {} | undefined;
11
11
  clearCookieSession?: boolean | undefined;
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/ErrorCatalog/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AA2CpD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CAAC,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB;;;;;;;;;CA0BjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/ErrorCatalog/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAoB,MAAM,iBAAiB,CAAA;AA4C5D,qBAAa,YAAa,SAAQ,YAAY;IAC5C,GAAG,CAAC,KAAK,GAAE,MAAM,GAAG,KAAK,GAAG,QAAoB;;;;;;;;;CA0BjD"}
@@ -1,5 +1,5 @@
1
+ import { CustomLogger } from "@mp-front/core";
1
2
  import { t } from "i18next";
2
- import { CustomLogger } from "..";
3
3
  const errorCatalog = {
4
4
  // EXAMPLE ERROR
5
5
  "MP-001": {
@@ -1,6 +1,5 @@
1
- import CustomLogger from "../CustomLogger";
2
- import { ApiError } from "../interfaces/ApiResponse";
3
- import { IMessageErrorBFF } from "../interfaces/messageError";
1
+ import { CustomLogger } from "@mp-front/core";
2
+ import { ApiError, IMessageErrorBFF } from "@mp-front/types";
4
3
  /**
5
4
  * clase para manejar los errores de la aplicación
6
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/MessageErrorBFF/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,YAAY;IACvD,OAAO,CAAC,YAAY,CAAkB;gBAE1B,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ;IAO7C,GAAG;CAGJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/MessageErrorBFF/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE5D;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,YAAY;IACvD,OAAO,CAAC,YAAY,CAAkB;gBAE1B,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ;IAO7C,GAAG;CAGJ"}
@@ -1,5 +1,4 @@
1
- import CustomLogger from "../CustomLogger";
2
- import { ErrorCatalog } from "../ErrorCatalog";
1
+ import { CustomLogger, ErrorCatalog } from "@mp-front/core";
3
2
  /**
4
3
  * clase para manejar los errores de la aplicación
5
4
  *
@@ -1,7 +1,6 @@
1
+ import { ApiResponse, CustomHeader } from "@mp-front/core";
2
+ import { Method } from "@mp-front/types";
1
3
  import { Observable } from "rxjs";
2
- import CustomHeader from "../CustomHeader";
3
- import { Method } from "../../../../types/types";
4
- import { ApiResponse } from "../interfaces/ApiResponse";
5
4
  declare abstract class FetchServiceBE<TRes, TData = {}> extends CustomHeader {
6
5
  private apiUrl;
7
6
  private method;
@@ -1 +1 @@
1
- {"version":3,"file":"FetchServiceBE.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/apiRequest/FetchServiceBE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAA0B,MAAM,MAAM,CAAA;AAEpE,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAGvD,uBAAe,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAE,SAAQ,YAAY;IAClE,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAM3C,QAAQ,CAAC,UAAU,IAAI,MAAM;IAE7B,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC;IASxC,gBAAgB,CAAC,KAAK,EAAE,KAAK;;;IAK7B,SAAS,CAAC,MAAM,GAAE,KAAmB,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;CA0BtE;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"FetchServiceBE.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/apiRequest/FetchServiceBE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAiC,MAAM,gBAAgB,CAAA;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAa,UAAU,EAA0B,MAAM,MAAM,CAAA;AAGpE,uBAAe,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAE,SAAQ,YAAY;IAClE,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAM3C,QAAQ,CAAC,UAAU,IAAI,MAAM;IAE7B,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC;IASxC,gBAAgB,CAAC,KAAK,EAAE,KAAK;;;IAK7B,SAAS,CAAC,MAAM,GAAE,KAAmB,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;CA0BtE;AAED,eAAe,cAAc,CAAA"}
@@ -1,8 +1,6 @@
1
+ import { CustomHeader, ErrorHandler, MessageErrorBFF } from "@mp-front/core";
1
2
  import { switchMap, of, catchError, filter } from "rxjs";
2
3
  import { fromFetch } from "rxjs/fetch";
3
- import CustomHeader from "../CustomHeader";
4
- import MessageErrorBFF from "../MessageErrorBFF";
5
- import { ErrorHandler } from "../rxSubjects/ErrorHandler";
6
4
  class FetchServiceBE extends CustomHeader {
7
5
  apiUrl;
8
6
  method;
@@ -1,7 +1,6 @@
1
+ import { CustomValidator } from "@mp-front/core";
1
2
  import { Observable } from "rxjs";
2
- import { Method } from "../../../../types/types";
3
- import { IMessageErrorBFF } from "../interfaces/messageError";
4
- import { CustomValidator } from "@/core";
3
+ import { IMessageErrorBFF, Method } from "@mp-front/types";
5
4
  declare class FetchServiceFE<TRes, TData = {}> extends CustomValidator {
6
5
  private apiUrl;
7
6
  private method;
@@ -1 +1 @@
1
- {"version":3,"file":"FetchServiceFE.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/apiRequest/FetchServiceFE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAE,MAAM,MAAM,CAAA;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAmB,MAAM,QAAQ,CAAA;AAGzD,cAAM,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAE,SAAQ,eAAe;IAC5D,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAa;gBAEhB,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAS3C,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,gBAAgB;IAK1C,gBAAgB,CAAC,KAAK,EAAE,KAAK;IAO7B,SAAS,CAAC,MAAM,GAAE,KAAmB,GAAG,UAAU,CAAC,IAAI,CAAC;CAkBzD;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"FetchServiceFE.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/apiRequest/FetchServiceFE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiC,MAAM,gBAAgB,CAAA;AAC/E,OAAO,EAAqC,UAAU,EAAE,MAAM,MAAM,CAAA;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAE1D,cAAM,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAE,SAAQ,eAAe;IAC5D,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAa;gBAEhB,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAS3C,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,gBAAgB;IAK1C,gBAAgB,CAAC,KAAK,EAAE,KAAK;IAO7B,SAAS,CAAC,MAAM,GAAE,KAAmB,GAAG,UAAU,CAAC,IAAI,CAAC;CAkBzD;AAED,eAAe,cAAc,CAAA"}
@@ -1,7 +1,6 @@
1
+ import { CustomValidator, ErrorHandler, MessageErrorBFF } from "@mp-front/core";
1
2
  import { switchMap, catchError, of, filter } from "rxjs";
2
3
  import { fromFetch } from "rxjs/fetch";
3
- import { CustomValidator, MessageErrorBFF } from "@/core";
4
- import { ErrorHandler } from "../rxSubjects/ErrorHandler";
5
4
  class FetchServiceFE extends CustomValidator {
6
5
  apiUrl;
7
6
  method;
@@ -9,6 +9,5 @@ export { ErrorCatalog } from "./ErrorCatalog";
9
9
  export { default as MessageErrorBFF } from "./MessageErrorBFF";
10
10
  export { ErrorHandler } from "./rxSubjects/ErrorHandler";
11
11
  export { default as RxSubjectManager } from "./rxSubjects/RxSubjectManager";
12
- export type { IMessageErrorBFF } from "./interfaces/messageError";
13
- export type { ApiResponse } from "./interfaces/ApiResponse";
12
+ export type { ApiResponse } from "../../types/ApiResponse";
14
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  type MessageType = "modal" | "message";
2
- type MessageLevel = "error" | "success" | "warning" | "info" | "confirm";
2
+ type MessageLevel = "error" | "success" | "warning" | "info";
3
3
  export interface IMessageErrorBFF {
4
4
  code?: number;
5
5
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"messageError.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/interfaces/messageError.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG,OAAO,GAAG,SAAS,CAAA;AACtC,KAAK,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;AAExE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,EAAE,CAAA;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,MAAM,MAAM,gBAAgB,GAAG,CAC7B,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,IAAI,KACd,IAAI,CAAA"}
1
+ {"version":3,"file":"messageError.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/interfaces/messageError.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG,OAAO,GAAG,SAAS,CAAA;AACtC,KAAK,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,EAAE,CAAA;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,MAAM,MAAM,gBAAgB,GAAG,CAC7B,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,IAAI,KACd,IAAI,CAAA"}
@@ -1,5 +1,5 @@
1
- import { IMessageErrorBFF } from "../interfaces/messageError";
2
- import RxSubjectManager from "./RxSubjectManager";
1
+ import { RxSubjectManager } from "@mp-front/core";
2
+ import { IMessageErrorBFF } from "@mp-front/types";
3
3
  export declare class ErrorHandler extends RxSubjectManager<IMessageErrorBFF> {
4
4
  private static instance;
5
5
  private constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorHandler.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/rxSubjects/ErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AAEjD,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,gBAAgB,CAAC;IAClE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAc;IAErC,OAAO;IAIP,MAAM,CAAC,WAAW;CAMnB"}
1
+ {"version":3,"file":"ErrorHandler.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/rxSubjects/ErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElD,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,gBAAgB,CAAC;IAClE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAc;IAErC,OAAO;IAIP,MAAM,CAAC,WAAW;CAMnB"}
@@ -1,4 +1,4 @@
1
- import RxSubjectManager from "./RxSubjectManager";
1
+ import { RxSubjectManager } from "@mp-front/core";
2
2
  export class ErrorHandler extends RxSubjectManager {
3
3
  static instance;
4
4
  constructor() {
@@ -0,0 +1,40 @@
1
+ export interface ApiResponse<T> {
2
+ data: Data<T>[];
3
+ links?: Links;
4
+ errors?: ApiError[];
5
+ }
6
+ export interface Data<T> {
7
+ type: string;
8
+ id: string;
9
+ attributes: T;
10
+ relationships: Relationships;
11
+ links: Pick<Links, "self">;
12
+ }
13
+ export interface Relationships {
14
+ user: User;
15
+ }
16
+ export interface User {
17
+ data: UserData;
18
+ }
19
+ export interface UserData {
20
+ [key: string]: string | number | boolean | null;
21
+ }
22
+ export interface ApiError {
23
+ code: string;
24
+ status: string;
25
+ source: Source;
26
+ title: string;
27
+ detail: string;
28
+ suggestedActions: string;
29
+ }
30
+ export interface Source {
31
+ pointer: string;
32
+ }
33
+ export interface Links {
34
+ self: string;
35
+ first: string;
36
+ prev: string;
37
+ next: string;
38
+ last: string;
39
+ }
40
+ //# sourceMappingURL=ApiResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiResponse.d.ts","sourceRoot":"","sources":["../../src/types/ApiResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,IAAI,CAAC,CAAC;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,CAAC,CAAA;IACb,aAAa,EAAE,aAAa,CAAA;IAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAA;CACX;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CAChD;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,MAAM;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./ApiResponse";
2
+ export * from "./messageError";
3
+ export * from "./method";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from "./ApiResponse";
2
+ export * from "./messageError";
3
+ export * from "./method";
@@ -0,0 +1,14 @@
1
+ type MessageType = "modal" | "message";
2
+ type MessageLevel = "error" | "success" | "warning" | "info";
3
+ export interface IMessageErrorBFF {
4
+ code?: number;
5
+ message: string;
6
+ type: MessageType;
7
+ level: MessageLevel;
8
+ title: string;
9
+ payload?: {};
10
+ clearCookieSession?: boolean;
11
+ }
12
+ export type messageManagerFn = (type: MessageType, level: MessageLevel, message: string, title: string, onOk?: () => void) => void;
13
+ export {};
14
+ //# sourceMappingURL=messageError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageError.d.ts","sourceRoot":"","sources":["../../src/types/messageError.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG,OAAO,GAAG,SAAS,CAAA;AACtC,KAAK,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,EAAE,CAAA;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,MAAM,MAAM,gBAAgB,GAAG,CAC7B,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,IAAI,KACd,IAAI,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export type Method = "get" | "GET" | "delete" | "DELETE" | "head" | "HEAD" | "options" | "OPTIONS" | "post" | "POST" | "put" | "PUT" | "patch" | "PATCH" | "purge" | "PURGE" | "link" | "LINK" | "unlink" | "UNLINK";
2
+ //# sourceMappingURL=method.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"method.d.ts","sourceRoot":"","sources":["../../src/types/method.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GACd,KAAK,GACL,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,SAAS,GACT,SAAS,GACT,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",