mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
17f83d6458
* dev: change layout * chore: replace workspace slug and project id with anchor * chore: migration fixes * chore: update filtering logic * chore: endpoint changes * chore: update endpoint * chore: changed url pratterns * chore: use client side for layout and page * chore: issue vote changes * chore: project deploy board response change * refactor: publish project store and components * fix: update layout options after fetching settings * chore: remove unnecessary types * style: peek overview * refactor: components folder structure * fix: redirect from old path * chore: make the whole issue block clickable * chore: removed the migration file * chore: add server side redirection for old routes * chore: is enabled key change * chore: update types * chore: removed the migration file --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
173 lines
3.3 KiB
TypeScript
173 lines
3.3 KiB
TypeScript
import { IStateLite, IWorkspaceLite, TIssuePriorities, TStateGroups } from "@plane/types";
|
|
|
|
export type TIssueLayout = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt";
|
|
export type TIssueLayoutOptions = {
|
|
[key in TIssueLayout]: boolean;
|
|
};
|
|
|
|
export type TIssueFilterPriorityObject = {
|
|
key: TIssuePriorities;
|
|
title: string;
|
|
className: string;
|
|
icon: string;
|
|
};
|
|
|
|
export type TIssueFilterKeys = "priority" | "state" | "labels";
|
|
|
|
export type TDisplayFilters = {
|
|
layout: TIssueLayout;
|
|
};
|
|
|
|
export type TFilters = {
|
|
state: TStateGroups[];
|
|
priority: TIssuePriorities[];
|
|
labels: string[];
|
|
};
|
|
|
|
export type TIssueFilters = {
|
|
display_filters: TDisplayFilters;
|
|
filters: TFilters;
|
|
};
|
|
|
|
export type TIssueQueryFilters = Partial<TFilters>;
|
|
|
|
export type TIssueQueryFiltersParams = Partial<Record<keyof TFilters, string>>;
|
|
|
|
export type TIssuesResponse = {
|
|
states: IStateLite[];
|
|
labels: IIssueLabel[];
|
|
issues: IIssue[];
|
|
};
|
|
|
|
export interface IIssue {
|
|
id: string;
|
|
comments: Comment[];
|
|
description_html: string;
|
|
label_details: any;
|
|
name: string;
|
|
priority: TIssuePriorityKey | null;
|
|
project: string;
|
|
project_detail: any;
|
|
reactions: IIssueReaction[];
|
|
sequence_id: number;
|
|
start_date: any;
|
|
state: string;
|
|
state_detail: {
|
|
id: string;
|
|
name: string;
|
|
group: TIssueGroupKey;
|
|
color: string;
|
|
};
|
|
target_date: any;
|
|
votes: IVote[];
|
|
}
|
|
|
|
export type IPeekMode = "side" | "modal" | "full";
|
|
|
|
export interface IIssueLabel {
|
|
id: string;
|
|
name: string;
|
|
color: string;
|
|
parent: string | null;
|
|
}
|
|
|
|
export interface IVote {
|
|
issue: string;
|
|
vote: -1 | 1;
|
|
workspace: string;
|
|
project: string;
|
|
actor: string;
|
|
actor_detail: ActorDetail;
|
|
}
|
|
|
|
export interface Comment {
|
|
actor_detail: ActorDetail;
|
|
access: string;
|
|
actor: string;
|
|
attachments: any[];
|
|
comment_html: string;
|
|
comment_reactions: {
|
|
actor_detail: ActorDetail;
|
|
comment: string;
|
|
id: string;
|
|
reaction: string;
|
|
}[];
|
|
comment_stripped: string;
|
|
created_at: Date;
|
|
created_by: string;
|
|
id: string;
|
|
is_member: boolean;
|
|
issue: string;
|
|
issue_detail: IssueDetail;
|
|
project: string;
|
|
project_detail: ProjectDetail;
|
|
updated_at: Date;
|
|
updated_by: string;
|
|
workspace: string;
|
|
workspace_detail: IWorkspaceLite;
|
|
}
|
|
|
|
export interface IIssueReaction {
|
|
actor_detail: ActorDetail;
|
|
id: string;
|
|
issue: string;
|
|
reaction: string;
|
|
}
|
|
|
|
export interface ActorDetail {
|
|
avatar?: string;
|
|
display_name?: string;
|
|
first_name?: string;
|
|
id?: string;
|
|
is_bot?: boolean;
|
|
last_name?: string;
|
|
}
|
|
|
|
export interface IssueDetail {
|
|
id: string;
|
|
name: string;
|
|
description: Description;
|
|
description_html: string;
|
|
priority: string;
|
|
start_date: null;
|
|
target_date: null;
|
|
sequence_id: number;
|
|
sort_order: number;
|
|
}
|
|
|
|
export interface Description {
|
|
type: string;
|
|
content: DescriptionContent[];
|
|
}
|
|
|
|
export interface DescriptionContent {
|
|
type: string;
|
|
attrs?: Attrs;
|
|
content: ContentContent[];
|
|
}
|
|
|
|
export interface Attrs {
|
|
level: number;
|
|
}
|
|
|
|
export interface ContentContent {
|
|
text: string;
|
|
type: string;
|
|
}
|
|
|
|
export interface ProjectDetail {
|
|
id: string;
|
|
identifier: string;
|
|
name: string;
|
|
cover_image: string;
|
|
icon_prop: null;
|
|
emoji: string;
|
|
description: string;
|
|
}
|
|
|
|
export interface IIssueFilterOptions {
|
|
state?: string[] | null;
|
|
labels?: string[] | null;
|
|
priority?: string[] | null;
|
|
}
|