1- // WorkTech API Types based on OpenAPI Schema
2-
3- export interface ErrorResponse {
4- error : string ;
5- message : string ;
6- }
7-
8- // Auth Types
1+ // ===== Auth Types =====
92export interface LoginRequest {
103 email : string ;
114 password : string ;
@@ -32,7 +25,7 @@ export interface TokenRefreshRequest {
3225 refreshToken : string ;
3326}
3427
35- // User Types
28+ // ===== User Types =====
3629export interface UserShortData {
3730 id : string ;
3831 email : string ;
@@ -47,13 +40,26 @@ export interface RoleDataDto {
4740 roleName : string ;
4841}
4942
50- export interface UserData extends UserShortData {
43+ export interface PermissionProject {
44+ projectId : string ;
45+ projectName : string ;
46+ owner : boolean ;
47+ extendedPermission : boolean ;
48+ }
49+
50+ export interface UserData {
5151 userId : string ;
52+ lastProjectId : string | null ;
53+ lastName : string ;
54+ firstName : string ;
5255 middleName ?: string ;
56+ email : string ;
5357 phone ?: string ;
5458 birthDate ?: string ;
5559 active : boolean ;
60+ gender ?: string ;
5661 roles : RoleDataDto [ ] ;
62+ permissionProjects : PermissionProject [ ] ;
5763}
5864
5965export interface UpdateUserRequest {
@@ -67,7 +73,7 @@ export interface UpdateUserRequest {
6773 confirmPassword : string ;
6874}
6975
70- // Project Types
76+ // ===== Project Types =====
7177export interface ShortProjectData {
7278 id : string ;
7379 name : string ;
@@ -110,7 +116,7 @@ export interface ProjectData {
110116 users : UserWithTasks [ ] ;
111117}
112118
113- // Task Types
119+ // ===== Task Types =====
114120export type TaskPriority = 'BLOCKER' | 'HIGH' | 'MEDIUM' | 'LOW' ;
115121export type TaskType = 'BUG' | 'TASK' | 'RESEARCH' | 'STORY' ;
116122
@@ -172,7 +178,7 @@ export interface TaskHistory {
172178 createdAt : string ;
173179}
174180
175- // Sprint Types
181+ // ===== Sprint Types =====
176182export interface SprintRequest {
177183 name : string ;
178184 startDate ?: string ;
@@ -189,7 +195,7 @@ export interface Sprint {
189195 defaultSprint : boolean ;
190196}
191197
192- // Status Types
198+ // ===== Status Types =====
193199export interface TaskStatusRequest {
194200 id ?: number ;
195201 priority : number ;
@@ -214,7 +220,7 @@ export interface UpdateRequestStatuses {
214220 statuses : TaskStatusRequest [ ] ;
215221}
216222
217- // Comment Types
223+ // ===== Comment Types =====
218224export interface CommentRequest {
219225 taskId : string ;
220226 projectId : string ;
@@ -237,7 +243,7 @@ export interface AllTasksCommentsResponse {
237243 updatedAt : string ;
238244}
239245
240- // Link Types
246+ // ===== Link Types =====
241247export interface LinkRequest {
242248 taskIdSource : string ;
243249 taskIdTarget : string ;
@@ -253,14 +259,18 @@ export interface LinkResponse {
253259 description : string ;
254260}
255261
256- // API Response wrapper
262+ // ===== Общие типы и утилиты =====
263+ export interface ErrorResponse {
264+ error : string ;
265+ message : string ;
266+ }
267+
257268export interface ApiResponse < T = Record < string , unknown > > {
258269 data ?: T ;
259270 error ?: string ;
260271 message ?: string ;
261272}
262273
263- // Common ID list type
264274export interface StringIds {
265275 ids : string [ ] ;
266276}
0 commit comments