@fiado/type-kit 3.541.0 → 3.542.0

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.
@@ -0,0 +1,19 @@
1
+ import { CardAuditActorType } from "../enums/CardAuditActorType";
2
+ import { Status } from "../enums/Status";
3
+ /**
4
+ * Traza aditiva del último cambio de una tarjeta. Se guarda en `createdBy` (una sola vez, al
5
+ * crear la fila) y en `updatedBy` (se reescribe en cada cambio). El histórico completo vive en el
6
+ * datalake, no aquí. Las filas anteriores a este campo simplemente no lo traen.
7
+ */
8
+ export interface CardAuditInfo {
9
+ actorType: CardAuditActorType;
10
+ /** email (BACKOFFICE/AGENT), "<proveedor>:<event_type>" (WEBHOOK), componente (SYSTEM). Vacío para USER. */
11
+ actorId?: string;
12
+ /** Operación de negocio: CHANGE_STATUS, ACTIVATE, CREATE, REPLACE, SHIPPING_UPDATE, PIN_UPDATE, ... */
13
+ action: string;
14
+ /** Status anterior y nuevo, solo cuando la operación cambia el status. */
15
+ from?: Status;
16
+ to?: Status;
17
+ /** ISO 8601. */
18
+ at: string;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Quién originó el último cambio de una tarjeta (`createdBy` / `updatedBy`).
3
+ *
4
+ * - USER: el dueño desde la app; no lleva actorId porque el directoryId ya está en la fila.
5
+ * - BACKOFFICE / AGENT: persona con sesión W4; actorId = email del AuthContext.
6
+ * - WEBHOOK: evento del emisor (CP, Pomelo); actorId = "<proveedor>:<event_type>".
7
+ * - SYSTEM: proceso interno sin usuario (colas, cron, callbacks); actorId = componente.
8
+ */
9
+ export declare enum CardAuditActorType {
10
+ USER = "USER",
11
+ BACKOFFICE = "BACKOFFICE",
12
+ AGENT = "AGENT",
13
+ WEBHOOK = "WEBHOOK",
14
+ SYSTEM = "SYSTEM"
15
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardAuditActorType = void 0;
4
+ /**
5
+ * Quién originó el último cambio de una tarjeta (`createdBy` / `updatedBy`).
6
+ *
7
+ * - USER: el dueño desde la app; no lleva actorId porque el directoryId ya está en la fila.
8
+ * - BACKOFFICE / AGENT: persona con sesión W4; actorId = email del AuthContext.
9
+ * - WEBHOOK: evento del emisor (CP, Pomelo); actorId = "<proveedor>:<event_type>".
10
+ * - SYSTEM: proceso interno sin usuario (colas, cron, callbacks); actorId = componente.
11
+ */
12
+ var CardAuditActorType;
13
+ (function (CardAuditActorType) {
14
+ CardAuditActorType["USER"] = "USER";
15
+ CardAuditActorType["BACKOFFICE"] = "BACKOFFICE";
16
+ CardAuditActorType["AGENT"] = "AGENT";
17
+ CardAuditActorType["WEBHOOK"] = "WEBHOOK";
18
+ CardAuditActorType["SYSTEM"] = "SYSTEM";
19
+ })(CardAuditActorType || (exports.CardAuditActorType = CardAuditActorType = {}));
@@ -72,3 +72,5 @@ export * from './enums/CardReasonStatus';
72
72
  export * from './enums/KycReason';
73
73
  export * from './enums/PinChangedStatus';
74
74
  export * from './constants/LevelOneAutoIssuanceTags';
75
+ export * from './enums/CardAuditActorType';
76
+ export * from './dtos/CardAuditInfo';
package/bin/card/index.js CHANGED
@@ -91,3 +91,5 @@ __exportStar(require("./enums/CardReasonStatus"), exports);
91
91
  __exportStar(require("./enums/KycReason"), exports);
92
92
  __exportStar(require("./enums/PinChangedStatus"), exports);
93
93
  __exportStar(require("./constants/LevelOneAutoIssuanceTags"), exports);
94
+ __exportStar(require("./enums/CardAuditActorType"), exports);
95
+ __exportStar(require("./dtos/CardAuditInfo"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.541.0",
3
+ "version": "3.542.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,20 @@
1
+ import { CardAuditActorType } from "../enums/CardAuditActorType";
2
+ import { Status } from "../enums/Status";
3
+
4
+ /**
5
+ * Traza aditiva del último cambio de una tarjeta. Se guarda en `createdBy` (una sola vez, al
6
+ * crear la fila) y en `updatedBy` (se reescribe en cada cambio). El histórico completo vive en el
7
+ * datalake, no aquí. Las filas anteriores a este campo simplemente no lo traen.
8
+ */
9
+ export interface CardAuditInfo {
10
+ actorType: CardAuditActorType;
11
+ /** email (BACKOFFICE/AGENT), "<proveedor>:<event_type>" (WEBHOOK), componente (SYSTEM). Vacío para USER. */
12
+ actorId?: string;
13
+ /** Operación de negocio: CHANGE_STATUS, ACTIVATE, CREATE, REPLACE, SHIPPING_UPDATE, PIN_UPDATE, ... */
14
+ action: string;
15
+ /** Status anterior y nuevo, solo cuando la operación cambia el status. */
16
+ from?: Status;
17
+ to?: Status;
18
+ /** ISO 8601. */
19
+ at: string;
20
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Quién originó el último cambio de una tarjeta (`createdBy` / `updatedBy`).
3
+ *
4
+ * - USER: el dueño desde la app; no lleva actorId porque el directoryId ya está en la fila.
5
+ * - BACKOFFICE / AGENT: persona con sesión W4; actorId = email del AuthContext.
6
+ * - WEBHOOK: evento del emisor (CP, Pomelo); actorId = "<proveedor>:<event_type>".
7
+ * - SYSTEM: proceso interno sin usuario (colas, cron, callbacks); actorId = componente.
8
+ */
9
+ export enum CardAuditActorType {
10
+ USER = "USER",
11
+ BACKOFFICE = "BACKOFFICE",
12
+ AGENT = "AGENT",
13
+ WEBHOOK = "WEBHOOK",
14
+ SYSTEM = "SYSTEM"
15
+ }
package/src/card/index.ts CHANGED
@@ -78,3 +78,5 @@ export * from './enums/CardReasonStatus'
78
78
  export * from './enums/KycReason'
79
79
  export * from './enums/PinChangedStatus'
80
80
  export * from './constants/LevelOneAutoIssuanceTags';
81
+ export * from './enums/CardAuditActorType';
82
+ export * from './dtos/CardAuditInfo';