@fiado/type-kit 3.1.9 → 3.1.11

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,6 +1,6 @@
1
1
  import { ReportConceptEnum } from "../enums/ReportConceptEnum";
2
2
  export interface CreatePayableRequest {
3
- directoryIdVendor: string;
3
+ directoryIdSponsor: string;
4
4
  directoryIdClient?: string;
5
5
  concept: ReportConceptEnum;
6
6
  dateAccountCreate?: string;
@@ -3,3 +3,4 @@ export * from './enums/ErrorSeverityEnum';
3
3
  export * from './enums/ErrorStatusEnum';
4
4
  export * from './enums/ResolutionTypeEnum';
5
5
  export { TRANSACTION_PROCESSOR_SEVERITY_BY_CODE } from './severity/transaction-processor.severity';
6
+ export { CARD_BUSINESS_SEVERITY_BY_CODE } from './severity/card-business.severity';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.TRANSACTION_PROCESSOR_SEVERITY_BY_CODE = void 0;
17
+ exports.CARD_BUSINESS_SEVERITY_BY_CODE = exports.TRANSACTION_PROCESSOR_SEVERITY_BY_CODE = void 0;
18
18
  //dtos/internal
19
19
  __exportStar(require("./dtos/internal/PlatformErrorEventMessage"), exports);
20
20
  //enums
@@ -24,3 +24,5 @@ __exportStar(require("./enums/ResolutionTypeEnum"), exports);
24
24
  // Mapas de severidad por lambda
25
25
  var transaction_processor_severity_1 = require("./severity/transaction-processor.severity");
26
26
  Object.defineProperty(exports, "TRANSACTION_PROCESSOR_SEVERITY_BY_CODE", { enumerable: true, get: function () { return transaction_processor_severity_1.TRANSACTION_PROCESSOR_SEVERITY_BY_CODE; } });
27
+ var card_business_severity_1 = require("./severity/card-business.severity");
28
+ Object.defineProperty(exports, "CARD_BUSINESS_SEVERITY_BY_CODE", { enumerable: true, get: function () { return card_business_severity_1.CARD_BUSINESS_SEVERITY_BY_CODE; } });
@@ -0,0 +1 @@
1
+ export declare const CARD_BUSINESS_SEVERITY_BY_CODE: Record<string, string>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CARD_BUSINESS_SEVERITY_BY_CODE = void 0;
4
+ // Mapa canónico de severidades para fiado-card-business.
5
+ // Cada lambda tiene su propio archivo en este directorio.
6
+ // Fuente de verdad: sincronizado con los error.code que lanzan las excepciones del lambda.
7
+ exports.CARD_BUSINESS_SEVERITY_BY_CODE = {
8
+ // CRITICAL — pérdida de datos, requiere acción inmediata
9
+ "DB_WRITE_ERROR": "CRITICAL",
10
+ // HIGH — errores técnicos inesperados
11
+ "SYSTEM_ERROR": "HIGH",
12
+ "TIME_OUT": "HIGH",
13
+ "CARD_PROCESSOR_ERROR": "HIGH",
14
+ // MEDIUM — errores de configuración o datos inválidos
15
+ "INVALID_TOKEN": "MEDIUM",
16
+ "PRODUCT_NOT_FOUND": "MEDIUM",
17
+ // LOW — errores de negocio esperados (útiles para soporte)
18
+ "INSUFFICIENT_FUNDS": "LOW",
19
+ "CARD_NOT_FOUND": "LOW",
20
+ "CARD_NOT_ACTIVE": "LOW",
21
+ "ACCOUNT_BLOCKED": "LOW",
22
+ "ACCOUNT_NOT_FOUND": "LOW",
23
+ "USER_NOT_ACTIVE": "LOW",
24
+ "INVALID_REQUEST": "LOW",
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.1.9",
3
+ "version": "3.1.11",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import { ReportConceptEnum } from "../enums/ReportConceptEnum";
2
2
 
3
3
  export interface CreatePayableRequest {
4
- directoryIdVendor: string;
4
+ directoryIdSponsor: string;
5
5
  directoryIdClient?: string;
6
6
  concept: ReportConceptEnum;
7
7
  dateAccountCreate?: string;
@@ -8,3 +8,4 @@ export * from './enums/ResolutionTypeEnum';
8
8
 
9
9
  // Mapas de severidad por lambda
10
10
  export { TRANSACTION_PROCESSOR_SEVERITY_BY_CODE } from './severity/transaction-processor.severity';
11
+ export { CARD_BUSINESS_SEVERITY_BY_CODE } from './severity/card-business.severity';
@@ -0,0 +1,25 @@
1
+ // Mapa canónico de severidades para fiado-card-business.
2
+ // Cada lambda tiene su propio archivo en este directorio.
3
+ // Fuente de verdad: sincronizado con los error.code que lanzan las excepciones del lambda.
4
+ export const CARD_BUSINESS_SEVERITY_BY_CODE: Record<string, string> = {
5
+ // CRITICAL — pérdida de datos, requiere acción inmediata
6
+ "DB_WRITE_ERROR": "CRITICAL",
7
+
8
+ // HIGH — errores técnicos inesperados
9
+ "SYSTEM_ERROR": "HIGH",
10
+ "TIME_OUT": "HIGH",
11
+ "CARD_PROCESSOR_ERROR": "HIGH",
12
+
13
+ // MEDIUM — errores de configuración o datos inválidos
14
+ "INVALID_TOKEN": "MEDIUM",
15
+ "PRODUCT_NOT_FOUND": "MEDIUM",
16
+
17
+ // LOW — errores de negocio esperados (útiles para soporte)
18
+ "INSUFFICIENT_FUNDS": "LOW",
19
+ "CARD_NOT_FOUND": "LOW",
20
+ "CARD_NOT_ACTIVE": "LOW",
21
+ "ACCOUNT_BLOCKED": "LOW",
22
+ "ACCOUNT_NOT_FOUND": "LOW",
23
+ "USER_NOT_ACTIVE": "LOW",
24
+ "INVALID_REQUEST": "LOW",
25
+ };