dev: hello world
This commit is contained in:
commit
6037fed3f4
145 changed files with 16848 additions and 0 deletions
15
types/index.d.ts
vendored
Normal file
15
types/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export * from "./users";
|
||||
export * from "./workspace";
|
||||
export * from "./sprints";
|
||||
export * from "./projects";
|
||||
export * from "./state";
|
||||
export * from "./invitation";
|
||||
export * from "./issues";
|
||||
|
||||
export type NestedKeyOf<ObjectType extends object> = {
|
||||
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object
|
||||
? ObjectType[Key] extends { pop: any; push: any }
|
||||
? `${Key}`
|
||||
: `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`
|
||||
: `${Key}`;
|
||||
}[keyof ObjectType & (string | number)];
|
||||
16
types/invitation.d.ts
vendored
Normal file
16
types/invitation.d.ts
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { IWorkspace } from "./";
|
||||
|
||||
export interface IWorkspaceInvitation {
|
||||
id: string;
|
||||
workspace: IWorkspace;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
email: string;
|
||||
accepted: boolean;
|
||||
token: string;
|
||||
message: string;
|
||||
responded_at: Date;
|
||||
role: number;
|
||||
created_by: null;
|
||||
updated_by: null;
|
||||
}
|
||||
125
types/issues.d.ts
vendored
Normal file
125
types/issues.d.ts
vendored
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
import type { IState, IUser, IProject } from "./";
|
||||
|
||||
export interface IssueResponse {
|
||||
next_cursor: string;
|
||||
prev_cursor: string;
|
||||
next_page_results: boolean;
|
||||
prev_page_results: boolean;
|
||||
count: number;
|
||||
total_pages: number;
|
||||
extra_stats: null;
|
||||
results: IIssue[];
|
||||
}
|
||||
|
||||
export interface IIssue {
|
||||
id: string;
|
||||
state_detail: IState;
|
||||
label_details: any[];
|
||||
assignee_details: IUser[];
|
||||
assignees_list: string[];
|
||||
blocked_by_issue_details: any[];
|
||||
blocked_issues: BlockeIssue[];
|
||||
blocker_issues: BlockeIssue[];
|
||||
blockers_list: string[];
|
||||
blocked_list: string[];
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
name: string;
|
||||
description: string;
|
||||
priority: string | null;
|
||||
start_date: null;
|
||||
target_date: string | null;
|
||||
sequence_id: number;
|
||||
attachments: any[];
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
project: string;
|
||||
project_detail: IProject;
|
||||
workspace: string;
|
||||
parent: string | null;
|
||||
parent_detail: IProject | null;
|
||||
state: string;
|
||||
assignees: any[] | null;
|
||||
labels: any[];
|
||||
labels_list: string[];
|
||||
blockers: any[];
|
||||
blocked_issue_details: any[];
|
||||
sprints: string | null;
|
||||
}
|
||||
|
||||
export interface BlockeIssue {
|
||||
id: string;
|
||||
blocked_issue_detail?: BlockeIssueDetail;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
project: string;
|
||||
workspace: string;
|
||||
block: string;
|
||||
blocked_by: string;
|
||||
blocker_issue_detail?: BlockeIssueDetail;
|
||||
}
|
||||
|
||||
export interface BlockeIssueDetail {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
priority: null;
|
||||
start_date: null;
|
||||
target_date: null;
|
||||
}
|
||||
|
||||
export interface IIssueComment {
|
||||
id: string;
|
||||
actor: string;
|
||||
actor_detail: IUser;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
comment: string;
|
||||
attachments: any[];
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
project: string;
|
||||
workspace: string;
|
||||
issue: string;
|
||||
}
|
||||
export type IssuePriorities = {
|
||||
id: string;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
uuid: string;
|
||||
properties: Properties;
|
||||
created_by: number;
|
||||
updated_by: number;
|
||||
user: string;
|
||||
};
|
||||
|
||||
export type Properties = {
|
||||
key: boolean;
|
||||
name: boolean;
|
||||
parent: boolean;
|
||||
project: boolean;
|
||||
state: boolean;
|
||||
assignee: boolean;
|
||||
description: boolean;
|
||||
priority: boolean;
|
||||
start_date: boolean;
|
||||
target_date: boolean;
|
||||
sequence_id: boolean;
|
||||
attachments: boolean;
|
||||
children: boolean;
|
||||
cycle: boolean;
|
||||
};
|
||||
|
||||
export interface IIssueLabels {
|
||||
id: string;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
name: string;
|
||||
description: string;
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
project: string;
|
||||
workspace: string;
|
||||
}
|
||||
17
types/projects.d.ts
vendored
Normal file
17
types/projects.d.ts
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import type { IWorkspace } from "./";
|
||||
|
||||
export interface IProject {
|
||||
id: string;
|
||||
workspace: IWorkspace | string;
|
||||
default_assignee: IUser | string | null;
|
||||
project_lead: IUser | string | null;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
name: string;
|
||||
description: string;
|
||||
network: number;
|
||||
identifier: string;
|
||||
slug: string;
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
}
|
||||
50
types/sprints.d.ts
vendored
Normal file
50
types/sprints.d.ts
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import type { IUser, IIssue } from "./";
|
||||
|
||||
export interface ICycle {
|
||||
id: string;
|
||||
owned_by: IUser;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
name: string;
|
||||
description: string;
|
||||
start_date: Date | null;
|
||||
end_date: Date | null;
|
||||
status: string;
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
project: string;
|
||||
workspace: string;
|
||||
issue: string;
|
||||
}
|
||||
|
||||
export interface SprintIssueResponse {
|
||||
id: string;
|
||||
issue_details: IIssue;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
project: string;
|
||||
workspace: string;
|
||||
issue: string;
|
||||
cycle: string;
|
||||
}
|
||||
|
||||
export type SprintViewProps = {
|
||||
sprint: ICycle;
|
||||
selectSprint: React.Dispatch<React.SetStateAction<SelectSprintType>>;
|
||||
projectId: string;
|
||||
workspaceSlug: string;
|
||||
openIssueModal: (
|
||||
sprintId: string,
|
||||
issue?: IIssue,
|
||||
actionType?: "create" | "edit" | "delete"
|
||||
) => void;
|
||||
addIssueToSprint: (sprintId: string, issueId: string) => void;
|
||||
};
|
||||
|
||||
export type SelectSprintType =
|
||||
| (ICycle & { actionType: "edit" | "delete" | "create-issue" })
|
||||
| undefined;
|
||||
|
||||
export type SelectIssue = (IIssue & { actionType: "edit" | "delete" | "create" }) | undefined;
|
||||
14
types/state.d.ts
vendored
Normal file
14
types/state.d.ts
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
export interface IState {
|
||||
readonly id: string;
|
||||
readonly created_at: Date;
|
||||
readonly updated_at: Date;
|
||||
name: string;
|
||||
description: string;
|
||||
color: string;
|
||||
readonly slug: string;
|
||||
readonly created_by: string;
|
||||
readonly updated_by: string;
|
||||
project: string;
|
||||
workspace: string;
|
||||
sequence: number;
|
||||
}
|
||||
18
types/users.d.ts
vendored
Normal file
18
types/users.d.ts
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
export interface IUser {
|
||||
id: readonly string;
|
||||
last_login: readonly Date;
|
||||
avatar: string;
|
||||
username: string;
|
||||
mobile_number: string;
|
||||
email: string;
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
date_joined: readonly Date;
|
||||
created_at: readonly Date;
|
||||
updated_at: readonly Date;
|
||||
last_location: readonly string;
|
||||
created_location: readonly string;
|
||||
is_email_verified: boolean;
|
||||
token: string;
|
||||
[...rest: string]: any;
|
||||
}
|
||||
38
types/workspace.d.ts
vendored
Normal file
38
types/workspace.d.ts
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import type { IUser } from "./";
|
||||
|
||||
export interface IWorkspace {
|
||||
readonly id: string;
|
||||
readonly owner: IUser;
|
||||
readonly created_at: Date;
|
||||
readonly updated_at: Date;
|
||||
name: string;
|
||||
logo: null;
|
||||
readonly slug: string;
|
||||
readonly created_by: string;
|
||||
readonly updated_by: string;
|
||||
company_size: number;
|
||||
}
|
||||
|
||||
export interface WorkspaceMember {
|
||||
readonly id: string;
|
||||
email: string;
|
||||
message: string;
|
||||
role: 5 | 10 | 15 | 20;
|
||||
member: IUser;
|
||||
workspace: IWorkspace | string;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
created_by: string;
|
||||
updated_by: string;
|
||||
}
|
||||
|
||||
export interface ProjectMember {
|
||||
readonly id: string;
|
||||
readonly project: string;
|
||||
email: string;
|
||||
message: string;
|
||||
role: 5 | 10 | 15 | 20;
|
||||
member: string;
|
||||
member_id: string;
|
||||
user_id: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue