plane/web/types/modules.d.ts
Anmol Singh Bhatia aec50e2c48
[FED-1147] chore: module link mobx integration (#2990)
* chore: link type updated

* chore: mobx implementation for module link

* chore: update module mutation logic updated and toast alert added
2023-12-05 19:32:25 +05:30

79 lines
1.8 KiB
TypeScript

import type {
IUser,
IUserLite,
IIssue,
IProject,
IWorkspace,
IWorkspaceLite,
IProjectLite,
IIssueFilterOptions,
ILinkDetails,
} from "types";
export type TModuleStatus = "backlog" | "planned" | "in-progress" | "paused" | "completed" | "cancelled";
export interface IModule {
backlog_issues: number;
cancelled_issues: number;
completed_issues: number;
created_at: Date;
created_by: string;
description: string;
description_text: any;
description_html: any;
distribution: {
assignees: TAssigneesDistribution[];
completion_chart: TCompletionChartDistribution;
labels: TLabelsDistribution[];
};
id: string;
lead: string | null;
lead_detail: IUserLite | null;
link_module: ILinkDetails[];
links_list: ModuleLink[];
members: string[];
members_detail: IUserLite[];
is_favorite: boolean;
name: string;
project: string;
project_detail: IProjectLite;
sort_order: number;
start_date: string | null;
started_issues: number;
status: TModuleStatus;
target_date: string | null;
total_issues: number;
unstarted_issues: number;
updated_at: Date;
updated_by: string;
view_props: {
filters: IIssueFilterOptions;
};
workspace: string;
workspace_detail: IWorkspaceLite;
}
export interface ModuleIssueResponse {
created_at: Date;
created_by: string;
id: string;
issue: string;
issue_detail: IIssue;
module: string;
module_detail: IModule;
project: string;
updated_at: Date;
updated_by: string;
workspace: string;
sub_issues_count: number;
}
export type ModuleLink = {
title: string;
url: string;
};
export type SelectModuleType = (IModule & { actionType: "edit" | "delete" | "create-issue" }) | undefined;
export type SelectIssue = (IIssue & { actionType: "edit" | "delete" | "create" }) | undefined;