Files
anti-hvost/src/pages/profile_tasks.dto.ts

88 lines
1.6 KiB
TypeScript

export interface ITask {
id: string;
name: string;
checked: boolean;
date: Date;
description: string;
tags: string[];
new?: boolean;
}
export interface ITaskForm extends Omit<ITask, "date"> {
date: string;
}
export interface IApiTask {
id: number;
title: string;
description: string;
isCompleted: boolean;
due_date: string;
subject: string;
task_type: string;
}
export interface IApiResponse {
profile: string;
tasks: IApiTask[];
subject_choices: Record<string, string>;
task_type_choices: Record<string, string>;
}
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: string;
taskType: string;
dateTime_due: string;
remind_before_days: number;
repeat_reminder: number;
reminder_time: 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;
};
};
}