Files
anti-hvost/src/pages/profile_tasks.dto.ts
2025-05-11 22:53:52 +03:00

100 lines
1.8 KiB
TypeScript

export interface IAPITag {
name: string;
id: number;
}
export interface ITask {
id: string;
name: string;
checked: boolean;
priority: number;
date: Date;
description: string;
subject: IAPITag;
taskType: IAPITag;
}
export interface ITaskView extends Omit<ITask, "taskType"> {
task_type: IAPITag;
}
export interface ITaskForm extends Omit<ITask, "date"> {
date: string;
}
export interface IApiTask {
id: number;
title: string;
description: string;
priority: number;
isCompleted: boolean;
due_date: string;
subject: IAPITag;
taskType: IAPITag;
}
export interface IApiResponse {
profile: string;
tasks: IApiTask[];
}
export interface ICreateTaskResponse {
success: boolean;
message: string;
profile: string;
task: {
id: number;
title: string;
description: string;
subject: string;
taskType: string;
dateTime_due: string;
isCompleted: boolean;
reminder?: {
remind_before_days: number;
repeat_interval: number;
reminder_time: string;
};
};
}
export interface ITaskDetails {
profile: string;
title: string;
description: string;
subject: IAPITag;
task_type: IAPITag;
priority: number;
dateTime_due: string;
}
export interface IDeleteTaskResponse {
success: boolean;
message: string;
}
export interface IEditTaskResponse {
success: boolean;
message: string;
profile: string;
task: {
id: number;
title: string;
description: string;
subject: string;
taskType: string;
dateTime_due: string;
isCompleted: boolean;
reminder?: {
remind_before_days: number;
repeat_interval: number;
reminder_time: string;
};
};
}
export interface IViewTagsResponse {
profile: string;
subjects: IAPITag[];
taskTypes: IAPITag[];
}