hvp-shared 6.77.0 → 6.79.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,43 @@
1
+ /**
2
+ * Documentation Enums — document management system.
3
+ *
4
+ * Enums for the Documentation module (type, format, status).
5
+ * All enums follow the new standard: snake_case values + LABELS objects.
6
+ *
7
+ * @see .claude/rules/enums.md for conventions
8
+ */
9
+ /**
10
+ * Classifies the category of the document.
11
+ */
12
+ export declare enum DocumentationType {
13
+ guides = "guides",
14
+ admon = "admon",
15
+ guidances = "guidances",
16
+ formats = "formats",
17
+ support = "support",
18
+ controls = "controls",
19
+ veterinary = "veterinary"
20
+ }
21
+ export declare const DOCUMENTATION_TYPE_LABELS: Record<DocumentationType, string>;
22
+ /**
23
+ * File format of the document.
24
+ */
25
+ export declare enum DocumentationFormat {
26
+ video = "video",
27
+ spreadsheet = "spreadsheet",
28
+ pdf = "pdf",
29
+ text_document = "text_document",
30
+ other = "other"
31
+ }
32
+ export declare const DOCUMENTATION_FORMAT_LABELS: Record<DocumentationFormat, string>;
33
+ /**
34
+ * Currency status of the document content.
35
+ */
36
+ export declare enum DocumentationStatus {
37
+ updated = "updated",
38
+ semi_outdated = "semi_outdated",
39
+ outdated = "outdated",
40
+ not_valid = "not_valid",
41
+ not_applicable = "not_applicable"
42
+ }
43
+ export declare const DOCUMENTATION_STATUS_LABELS: Record<DocumentationStatus, string>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ /**
3
+ * Documentation Enums — document management system.
4
+ *
5
+ * Enums for the Documentation module (type, format, status).
6
+ * All enums follow the new standard: snake_case values + LABELS objects.
7
+ *
8
+ * @see .claude/rules/enums.md for conventions
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.DOCUMENTATION_STATUS_LABELS = exports.DocumentationStatus = exports.DOCUMENTATION_FORMAT_LABELS = exports.DocumentationFormat = exports.DOCUMENTATION_TYPE_LABELS = exports.DocumentationType = void 0;
12
+ // ─── Documentation Type ─────────────────────────────────────────────────────
13
+ /**
14
+ * Classifies the category of the document.
15
+ */
16
+ var DocumentationType;
17
+ (function (DocumentationType) {
18
+ DocumentationType["guides"] = "guides";
19
+ DocumentationType["admon"] = "admon";
20
+ DocumentationType["guidances"] = "guidances";
21
+ DocumentationType["formats"] = "formats";
22
+ DocumentationType["support"] = "support";
23
+ DocumentationType["controls"] = "controls";
24
+ DocumentationType["veterinary"] = "veterinary";
25
+ })(DocumentationType || (exports.DocumentationType = DocumentationType = {}));
26
+ exports.DOCUMENTATION_TYPE_LABELS = {
27
+ [DocumentationType.guides]: "Guías y protocolos",
28
+ [DocumentationType.admon]: "Administración",
29
+ [DocumentationType.guidances]: "Lineamientos",
30
+ [DocumentationType.formats]: "Formatos",
31
+ [DocumentationType.support]: "Apoyo",
32
+ [DocumentationType.controls]: "Controles",
33
+ [DocumentationType.veterinary]: "Veterinario",
34
+ };
35
+ // ─── Documentation Format ───────────────────────────────────────────────────
36
+ /**
37
+ * File format of the document.
38
+ */
39
+ var DocumentationFormat;
40
+ (function (DocumentationFormat) {
41
+ DocumentationFormat["video"] = "video";
42
+ DocumentationFormat["spreadsheet"] = "spreadsheet";
43
+ DocumentationFormat["pdf"] = "pdf";
44
+ DocumentationFormat["text_document"] = "text_document";
45
+ DocumentationFormat["other"] = "other";
46
+ })(DocumentationFormat || (exports.DocumentationFormat = DocumentationFormat = {}));
47
+ exports.DOCUMENTATION_FORMAT_LABELS = {
48
+ [DocumentationFormat.video]: "Video",
49
+ [DocumentationFormat.spreadsheet]: "Hoja de cálculo",
50
+ [DocumentationFormat.pdf]: "PDF",
51
+ [DocumentationFormat.text_document]: "Documento de texto",
52
+ [DocumentationFormat.other]: "Otro",
53
+ };
54
+ // ─── Documentation Status ───────────────────────────────────────────────────
55
+ /**
56
+ * Currency status of the document content.
57
+ */
58
+ var DocumentationStatus;
59
+ (function (DocumentationStatus) {
60
+ DocumentationStatus["updated"] = "updated";
61
+ DocumentationStatus["semi_outdated"] = "semi_outdated";
62
+ DocumentationStatus["outdated"] = "outdated";
63
+ DocumentationStatus["not_valid"] = "not_valid";
64
+ DocumentationStatus["not_applicable"] = "not_applicable";
65
+ })(DocumentationStatus || (exports.DocumentationStatus = DocumentationStatus = {}));
66
+ exports.DOCUMENTATION_STATUS_LABELS = {
67
+ [DocumentationStatus.updated]: "Actualizado",
68
+ [DocumentationStatus.semi_outdated]: "Semidesactualizado",
69
+ [DocumentationStatus.outdated]: "Desactualizado",
70
+ [DocumentationStatus.not_valid]: "No vigente",
71
+ [DocumentationStatus.not_applicable]: "No aplica",
72
+ };
@@ -22,3 +22,4 @@ export * from './time-off.constants';
22
22
  export * from './hris.constants';
23
23
  export * from './payroll-features.constants';
24
24
  export * from './inventory-session.enums';
25
+ export * from './documentation.enums';
@@ -38,3 +38,4 @@ __exportStar(require("./time-off.constants"), exports);
38
38
  __exportStar(require("./hris.constants"), exports);
39
39
  __exportStar(require("./payroll-features.constants"), exports);
40
40
  __exportStar(require("./inventory-session.enums"), exports);
41
+ __exportStar(require("./documentation.enums"), exports);
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { InventorySessionStatus } from '../../constants/inventory-session.enums';
7
7
  import { Warehouse } from '../../types/qvet.types';
8
- import { InventorySessionItem } from './types';
8
+ import { InventorySessionItem, SessionActivity } from './types';
9
9
  /**
10
10
  * Summary of an inventory session for list views.
11
11
  *
@@ -43,6 +43,7 @@ export interface InventorySessionSummaryResponse {
43
43
  export interface InventorySessionDetailResponse extends InventorySessionSummaryResponse {
44
44
  createdById: string;
45
45
  items: InventorySessionItem[];
46
+ activityLog: SessionActivity[];
46
47
  }
47
48
  /**
48
49
  * Response after uploading a count Excel.
@@ -4,7 +4,7 @@
4
4
  * Shared type definitions for inventory session items.
5
5
  * Used by both requests and responses.
6
6
  */
7
- import { InventoryItemStatus, ManagerDecision, CollaboratorAction } from '../../constants/inventory-session.enums';
7
+ import { InventoryItemStatus, InventorySessionStatus, ManagerDecision, CollaboratorAction } from '../../constants/inventory-session.enums';
8
8
  /**
9
9
  * Item data within an inventory session.
10
10
  *
@@ -49,3 +49,39 @@ export interface InventorySessionItem {
49
49
  /** Name of the reviewer */
50
50
  reviewedByName?: string;
51
51
  }
52
+ export type SessionActivityAction = 'created' | 'uploaded' | 'reviewed' | 'downloaded' | 'refreshed' | 'exported' | 'bulk_loss';
53
+ export declare const SESSION_ACTIVITY_LABELS: Record<SessionActivityAction, string>;
54
+ /** Snapshot of session counts at a point in time */
55
+ export interface SessionActivitySnapshot {
56
+ pending: number;
57
+ resolved: number;
58
+ needsAttention: number;
59
+ inProgress: number;
60
+ sessionStatus: InventorySessionStatus;
61
+ }
62
+ /** Action-specific metrics */
63
+ export interface SessionActivityMetrics {
64
+ itemsUpdated?: number;
65
+ itemsNotFound?: number;
66
+ itemsSkipped?: number;
67
+ countChanges?: number;
68
+ confirmations?: number;
69
+ managerDecisions?: number;
70
+ autoAdjusted?: number;
71
+ resetToPending?: number;
72
+ itemsInSheet?: number;
73
+ filter?: 'pending' | 'all';
74
+ expirationsPropagated?: number;
75
+ totalLossMXN?: number;
76
+ totalSurplusMXN?: number;
77
+ }
78
+ /** Single entry in the session activity log */
79
+ export interface SessionActivity {
80
+ action: SessionActivityAction;
81
+ userName: string;
82
+ colCode: string;
83
+ timestamp: string;
84
+ snapshot: SessionActivitySnapshot;
85
+ metrics: SessionActivityMetrics;
86
+ details?: string;
87
+ }
@@ -6,3 +6,13 @@
6
6
  * Used by both requests and responses.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.SESSION_ACTIVITY_LABELS = void 0;
10
+ exports.SESSION_ACTIVITY_LABELS = {
11
+ created: 'Sesión creada',
12
+ uploaded: 'Conteo subido',
13
+ reviewed: 'Revisión aplicada',
14
+ downloaded: 'Hoja descargada',
15
+ refreshed: 'Stock actualizado',
16
+ exported: 'Hoja final exportada',
17
+ bulk_loss: 'Pérdidas aceptadas',
18
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "6.77.0",
3
+ "version": "6.79.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",