@cobre-npm/library-portal-core 0.38.0 → 0.40.1

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/README.md CHANGED
@@ -45,7 +45,7 @@ import { getCountries } from "@cobre-npm/library-portal-core/countries"
45
45
  | `@cobre-npm/library-portal-core/transactions` | Transaction types + interfaces |
46
46
  | `@cobre-npm/library-portal-core/canonicalTransactions` | Canonical transaction/money-movement detail interfaces |
47
47
  | `@cobre-npm/library-portal-core/search` | Search / aggregation interfaces |
48
- | `@cobre-npm/library-portal-core/trustedSessions` | Trusted session (OTP elevation window) interfaces |
48
+ | `@cobre-npm/library-portal-core/trustedSessions` | Trusted session (OTP elevation window) interfaces + constants |
49
49
  | `@cobre-npm/library-portal-core/lang` | Supported locales (`Locale`, defaults) |
50
50
  | `@cobre-npm/library-portal-core` (root) | ⚠️ **Legacy / deprecated** — see [below](#legacy-code--and-its-deprecation) |
51
51
 
@@ -61,9 +61,15 @@ src/<domain>/
61
61
  catalog.ts # source of truth: object keyed by code + derived types
62
62
  utils/<x>.utils.ts # the domain's public API (functions)
63
63
  locales/{en,es-mex}.json # translations (only when the label is i18n)
64
+ constants/<domain>.constants.ts # plain exported constants (only when the domain has any)
64
65
  index.ts # barrel: exposes ONLY the public API
65
66
  ```
66
67
 
68
+ A domain that only needs standalone constants (no catalog, no i18n) still gets its own `constants/`
69
+ subfolder — e.g. `trustedSessions/constants/trustedSessions.constants.ts` exports
70
+ `TRUSTED_SESSION_TTL_SECONDS`. Same rule as everything else here: the file name screams the domain,
71
+ never `constants.ts` alone, and the barrel re-exports it (`export * from "./constants/<domain>.constants"`).
72
+
67
73
  When a domain groups several catalogs, each one lives in its **subfolder** (e.g. `accounts/providers/` and
68
74
  `accounts/types/`), and the entity interfaces in `<domain>/interfaces/`.
69
75
 
@@ -413,6 +419,10 @@ import type { TrustedSessionStatus } from "@cobre-npm/library-portal-core/truste
413
419
  `TrustedSessionStatus` is the contract of `/trusted-sessions`: the OTP elevation window that lets a
414
420
  caller stop attaching an `otp_token` per request while the window is active.
415
421
 
422
+ `trustedSessions` also exports a plain constant, `TRUSTED_SESSION_TTL_SECONDS`, from
423
+ `constants/trustedSessions.constants.ts` — the pattern for a domain that needs standalone constants
424
+ (no catalog, no i18n): a `constants/<domain>.constants.ts` file, re-exported from the barrel.
425
+
416
426
  ### `canonicalTransactions`
417
427
 
418
428
  Interfaces only (pure types). This is the single source of truth for the canonical money-movement /
@@ -23,6 +23,10 @@ export declare const ACCOUNT_STATUSES: {
23
23
  readonly code: "closed";
24
24
  readonly type: "neutral";
25
25
  };
26
+ readonly processing: {
27
+ readonly code: "processing";
28
+ readonly type: "info";
29
+ };
26
30
  };
27
31
  export type AccountStatus = keyof typeof ACCOUNT_STATUSES;
28
32
  export type AccountStatusRecord = (typeof ACCOUNT_STATUSES)[AccountStatus];
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/accounts/status/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAOnB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,gBAAgB,CAAA;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,aAAa,CAAC,CAAA"}
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/accounts/status/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,gBAAgB,CAAA;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,aAAa,CAAC,CAAA"}
@@ -7,6 +7,7 @@ exports.ACCOUNT_STATUSES = {
7
7
  disconnected: { code: "disconnected", type: "error" },
8
8
  creating: { code: "creating", type: "info" },
9
9
  failed: { code: "failed", type: "error" },
10
- closed: { code: "closed", type: "neutral" }
10
+ closed: { code: "closed", type: "neutral" },
11
+ processing: { code: "processing", type: "info" }
11
12
  };
12
13
  //# sourceMappingURL=catalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/accounts/status/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;IACjD,UAAU,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;IAChD,YAAY,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE;IACrD,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IACzC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;CACnC,CAAA"}
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/accounts/status/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;IACjD,UAAU,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;IAChD,YAAY,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE;IACrD,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IACzC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,UAAU,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;CACxC,CAAA"}
@@ -5,6 +5,7 @@
5
5
  "disconnected": "Disconnected",
6
6
  "creating": "Creating account",
7
7
  "failed": "Connection error",
8
- "closed": "Inactive"
8
+ "closed": "Inactive",
9
+ "processing": "Processing"
9
10
  }
10
11
  }
@@ -5,6 +5,7 @@
5
5
  "disconnected": "Desconectada",
6
6
  "creating": "Creando la cuenta",
7
7
  "failed": "Error de conexión",
8
- "closed": "Inactiva"
8
+ "closed": "Inactiva",
9
+ "processing": "Procesando"
9
10
  }
10
11
  }
@@ -0,0 +1,3 @@
1
+ /** Trusted window duration (1h, product decision) */
2
+ export declare const TRUSTED_SESSION_TTL_SECONDS = 3600;
3
+ //# sourceMappingURL=trustedSessions.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedSessions.constants.d.ts","sourceRoot":"","sources":["../../../src/trustedSessions/constants/trustedSessions.constants.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,eAAO,MAAM,2BAA2B,OAAO,CAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TRUSTED_SESSION_TTL_SECONDS = void 0;
4
+ /** Trusted window duration (1h, product decision) */
5
+ exports.TRUSTED_SESSION_TTL_SECONDS = 3600;
6
+ //# sourceMappingURL=trustedSessions.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedSessions.constants.js","sourceRoot":"","sources":["../../../src/trustedSessions/constants/trustedSessions.constants.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACxC,QAAA,2BAA2B,GAAG,IAAI,CAAA"}
@@ -1,2 +1,3 @@
1
1
  export * from "./interfaces/response.interface";
2
+ export * from "./constants/trustedSessions.constants";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/trustedSessions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/trustedSessions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uCAAuC,CAAA"}
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./interfaces/response.interface"), exports);
18
+ __exportStar(require("./constants/trustedSessions.constants"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/trustedSessions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/trustedSessions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAA+C;AAC/C,wEAAqD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/library-portal-core",
3
- "version": "0.38.0",
3
+ "version": "0.40.1",
4
4
  "description": "Shared configurations and resources for Portal MFEs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -80,4 +80,4 @@
80
80
  "vitest": "^4.1.5",
81
81
  "vue-eslint-parser": "^9.0.0"
82
82
  }
83
- }
83
+ }