hvp-shared 3.3.1 → 3.3.2

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/dist/types.d.ts CHANGED
@@ -3,4 +3,6 @@
3
3
  * Used by both backend and frontend for type consistency
4
4
  */
5
5
  export * from './types/api-response.types';
6
+ export * from './types/error-codes.types';
6
7
  export * from './types/company-settings.types';
8
+ export * from './types/collaborator-fiscal.types';
package/dist/types.js CHANGED
@@ -23,6 +23,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
23
23
  // ============================================================================
24
24
  __exportStar(require("./types/api-response.types"), exports);
25
25
  // ============================================================================
26
+ // Error Codes - Domain-specific error codes
27
+ // ============================================================================
28
+ __exportStar(require("./types/error-codes.types"), exports);
29
+ // ============================================================================
26
30
  // Domain Types - Business entities and DTOs
27
31
  // ============================================================================
28
32
  __exportStar(require("./types/company-settings.types"), exports);
33
+ __exportStar(require("./types/collaborator-fiscal.types"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
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",
@@ -1,106 +0,0 @@
1
- import { WebAppRole } from '../constants/web-app-roles';
2
- import { AddressValidationProps } from '../validation/address.validation';
3
- /**
4
- * Public Collaborator Response
5
- *
6
- * Minimal data for public endpoints (no authentication required).
7
- * Used for: Public website, service listings, team pages.
8
- *
9
- * @example GET /api/collaborators/public
10
- */
11
- export interface PublicCollaboratorResponse {
12
- id: string;
13
- col_code: string;
14
- first_name: string;
15
- last_name: string;
16
- photoURL?: string;
17
- role: WebAppRole;
18
- isActive: boolean;
19
- }
20
- /**
21
- * Collaborator View Response
22
- *
23
- * Extended data for authenticated collaborators viewing other collaborators.
24
- * Excludes sensitive information (fiscal data, salary, banking).
25
- *
26
- * Used for: Collaborators viewing team members, scheduling, contact info.
27
- *
28
- * @example GET /api/collaborators/:id (authenticated collaborator)
29
- */
30
- export interface CollaboratorViewResponse {
31
- id: string;
32
- col_code: string;
33
- first_name: string;
34
- last_name: string;
35
- email?: string;
36
- phone?: string;
37
- photoURL?: string;
38
- birthDate?: Date;
39
- role: WebAppRole;
40
- isActive: boolean;
41
- isDisplayedWeb: boolean;
42
- isRegistered: boolean;
43
- job?: string;
44
- branch?: string;
45
- hireDate?: Date;
46
- address?: AddressValidationProps;
47
- facebook?: string;
48
- instagram?: string;
49
- createdAt?: Date;
50
- updatedAt?: Date;
51
- }
52
- /**
53
- * Admin Collaborator Response
54
- *
55
- * Complete data including all sensitive information.
56
- * Only for admin users.
57
- *
58
- * Used for: Admin dashboard, payroll management, HR operations, CFDI generation.
59
- *
60
- * @example GET /api/collaborators/:id (admin authenticated)
61
- */
62
- export interface AdminCollaboratorResponse {
63
- id: string;
64
- col_code: string;
65
- first_name: string;
66
- last_name: string;
67
- second_last_name?: string;
68
- email?: string;
69
- phone?: string;
70
- photoURL?: string;
71
- birthDate?: Date;
72
- role: WebAppRole;
73
- isActive: boolean;
74
- isDisplayedWeb: boolean;
75
- isRegistered: boolean;
76
- registeredDate?: Date;
77
- job?: string;
78
- branch?: string;
79
- hireDate?: Date;
80
- endDate?: Date;
81
- address?: AddressValidationProps;
82
- facebook?: string;
83
- instagram?: string;
84
- rfcCode?: string;
85
- curp?: string;
86
- imssNumber?: string;
87
- useFiscalAddressSameAsMain: boolean;
88
- fiscalAddress?: AddressValidationProps;
89
- taxZipCode?: string;
90
- contractType?: string;
91
- regimeType?: string;
92
- fiscalRegime?: string;
93
- bank?: string;
94
- bankAccount?: string;
95
- baseSalary?: number;
96
- dailySalary?: number;
97
- accessCode?: string;
98
- createdBy?: string;
99
- updatedBy?: string;
100
- createdAt?: Date;
101
- updatedAt?: Date;
102
- }
103
- /**
104
- * Union type for all collaborator response types
105
- */
106
- export type CollaboratorResponse = PublicCollaboratorResponse | CollaboratorViewResponse | AdminCollaboratorResponse;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });