hvp-shared 3.3.0 → 3.3.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.
|
@@ -0,0 +1,106 @@
|
|
|
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;
|