2023-04-19 11:55:31 +00:00
|
|
|
import type {
|
|
|
|
IUser,
|
|
|
|
IIssue,
|
|
|
|
IProject,
|
|
|
|
IProjectLite,
|
|
|
|
IWorkspace,
|
|
|
|
IWorkspaceLite,
|
|
|
|
IIssueFilterOptions,
|
2023-05-17 07:28:01 +00:00
|
|
|
IUserLite,
|
2023-04-19 11:55:31 +00:00
|
|
|
} from "types";
|
2022-11-19 14:21:26 +00:00
|
|
|
|
|
|
|
export interface ICycle {
|
2023-03-22 12:40:38 +00:00
|
|
|
backlog_issues: number;
|
|
|
|
cancelled_issues: number;
|
|
|
|
completed_issues: number;
|
2022-11-19 14:21:26 +00:00
|
|
|
created_at: Date;
|
2023-03-22 12:40:38 +00:00
|
|
|
created_by: string;
|
2022-11-19 14:21:26 +00:00
|
|
|
description: string;
|
2023-06-20 11:02:02 +00:00
|
|
|
distribution: {
|
|
|
|
assignees: TAssigneesDistribution[];
|
|
|
|
completion_chart: TCompletionChartDistribution;
|
|
|
|
labels: TLabelsDistribution[];
|
|
|
|
};
|
2023-03-01 06:26:14 +00:00
|
|
|
end_date: string | null;
|
2023-03-22 12:40:38 +00:00
|
|
|
id: string;
|
2023-03-06 11:06:22 +00:00
|
|
|
is_favorite: boolean;
|
2023-03-22 12:40:38 +00:00
|
|
|
issue: string;
|
|
|
|
name: string;
|
|
|
|
owned_by: IUser;
|
2022-11-19 14:21:26 +00:00
|
|
|
project: string;
|
2023-03-29 09:08:30 +00:00
|
|
|
project_detail: IProjectLite;
|
2023-08-11 10:29:13 +00:00
|
|
|
sort_order: number;
|
2023-03-22 12:40:38 +00:00
|
|
|
start_date: string | null;
|
|
|
|
started_issues: number;
|
|
|
|
total_issues: number;
|
|
|
|
unstarted_issues: number;
|
|
|
|
updated_at: Date;
|
|
|
|
updated_by: string;
|
2023-05-17 07:28:01 +00:00
|
|
|
assignees: IUserLite[];
|
2023-04-19 11:55:31 +00:00
|
|
|
view_props: {
|
|
|
|
filters: IIssueFilterOptions;
|
|
|
|
};
|
2022-11-19 14:21:26 +00:00
|
|
|
workspace: string;
|
2023-03-29 09:08:30 +00:00
|
|
|
workspace_detail: IWorkspaceLite;
|
2022-11-19 14:21:26 +00:00
|
|
|
}
|
|
|
|
|
2023-06-20 11:02:02 +00:00
|
|
|
export type TAssigneesDistribution = {
|
|
|
|
assignee_id: string | null;
|
|
|
|
avatar: string | null;
|
|
|
|
completed_issues: number;
|
|
|
|
first_name: string | null;
|
|
|
|
last_name: string | null;
|
2023-08-08 07:31:43 +00:00
|
|
|
display_name: string | null;
|
2023-06-20 11:02:02 +00:00
|
|
|
pending_issues: number;
|
|
|
|
total_issues: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TCompletionChartDistribution = {
|
|
|
|
[key: string]: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TLabelsDistribution = {
|
|
|
|
color: string | null;
|
|
|
|
completed_issues: number;
|
|
|
|
label_id: string | null;
|
|
|
|
label_name: string | null;
|
|
|
|
pending_issues: number;
|
|
|
|
total_issues: number;
|
|
|
|
};
|
|
|
|
|
2022-12-06 14:38:28 +00:00
|
|
|
export interface CycleIssueResponse {
|
2022-11-19 14:21:26 +00:00
|
|
|
id: string;
|
2022-12-22 16:19:46 +00:00
|
|
|
issue_detail: IIssue;
|
2022-11-19 14:21:26 +00:00
|
|
|
created_at: Date;
|
|
|
|
updated_at: Date;
|
|
|
|
created_by: string;
|
|
|
|
updated_by: string;
|
|
|
|
project: string;
|
|
|
|
workspace: string;
|
|
|
|
issue: string;
|
|
|
|
cycle: string;
|
2023-01-26 18:12:20 +00:00
|
|
|
sub_issues_count: number;
|
2022-11-19 14:21:26 +00:00
|
|
|
}
|
|
|
|
|
2023-01-11 11:10:25 +00:00
|
|
|
export type SelectCycleType =
|
2022-11-19 14:21:26 +00:00
|
|
|
| (ICycle & { actionType: "edit" | "delete" | "create-issue" })
|
|
|
|
| undefined;
|
|
|
|
|
2023-01-26 18:12:20 +00:00
|
|
|
export type SelectIssue = (IIssue & { actionType: "edit" | "delete" | "create" }) | null;
|
2023-07-23 17:24:17 +00:00
|
|
|
|
|
|
|
export type CycleDateCheckData = {
|
|
|
|
start_date: string;
|
|
|
|
end_date: string;
|
|
|
|
cycle_id?: string;
|
|
|
|
};
|