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 ;
@@ -80,7 +73,7 @@ export interface UpdateUserRequest {
8073 confirmPassword : string ;
8174}
8275
83- // Project Types
76+ // ===== Project Types =====
8477export interface ShortProjectData {
8578 id : string ;
8679 name : string ;
@@ -123,7 +116,7 @@ export interface ProjectData {
123116 users : UserWithTasks [ ] ;
124117}
125118
126- // Task Types
119+ // ===== Task Types =====
127120export type TaskPriority = 'BLOCKER' | 'HIGH' | 'MEDIUM' | 'LOW' ;
128121export type TaskType = 'BUG' | 'TASK' | 'RESEARCH' | 'STORY' ;
129122
@@ -185,7 +178,7 @@ export interface TaskHistory {
185178 createdAt : string ;
186179}
187180
188- // Sprint Types
181+ // ===== Sprint Types =====
189182export interface SprintRequest {
190183 name : string ;
191184 startDate ?: string ;
@@ -202,7 +195,7 @@ export interface Sprint {
202195 defaultSprint : boolean ;
203196}
204197
205- // Status Types
198+ // ===== Status Types =====
206199export interface TaskStatusRequest {
207200 id ?: number ;
208201 priority : number ;
@@ -227,7 +220,7 @@ export interface UpdateRequestStatuses {
227220 statuses : TaskStatusRequest [ ] ;
228221}
229222
230- // Comment Types
223+ // ===== Comment Types =====
231224export interface CommentRequest {
232225 taskId : string ;
233226 projectId : string ;
@@ -250,7 +243,7 @@ export interface AllTasksCommentsResponse {
250243 updatedAt : string ;
251244}
252245
253- // Link Types
246+ // ===== Link Types =====
254247export interface LinkRequest {
255248 taskIdSource : string ;
256249 taskIdTarget : string ;
@@ -266,14 +259,18 @@ export interface LinkResponse {
266259 description : string ;
267260}
268261
269- // API Response wrapper
262+ // ===== Общие типы и утилиты =====
263+ export interface ErrorResponse {
264+ error : string ;
265+ message : string ;
266+ }
267+
270268export interface ApiResponse < T = Record < string , unknown > > {
271269 data ?: T ;
272270 error ?: string ;
273271 message ?: string ;
274272}
275273
276- // Common ID list type
277274export interface StringIds {
278275 ids : string [ ] ;
279276}
0 commit comments