Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
feat(apis): interfaces Clickup
Browse files Browse the repository at this point in the history
  • Loading branch information
kbastamow committed Aug 8, 2023
1 parent c1e6504 commit 6fbc760
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/apis/clickup/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import { createApi } from "../_create-api/mod.ts";
import { auth } from "../_create-api/auth/mod.ts";
export type {
List,
Lists,
QueryAddTask,
QueryLists,
QueryTasks,
QueryUpdateTask,
Task,
Tasks,
} from "./types.ts";

export interface ClickupOptions {
personalApiKey: string;
Expand Down
158 changes: 158 additions & 0 deletions lib/apis/clickup/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
export interface List {
id: string;
name: string;
orderindex: number;
content: string;
status: {
status: string;
color: string;
hide_label: boolean;
};
priority: {
priority: string;
color: string;
};
assignee: any;
due_date: string;
due_date_time: boolean;
start_date: any;
start_date_time: any;
folder: {
id: string;
name: string;
hidden: boolean;
access: boolean;
};
space: {
id: string;
name: string;
access: boolean;
};
inbound_address: string;
archived: boolean;
override_statuses: boolean;
statuses: Array<{
status: string;
orderindex: number;
color: string;
type: string;
}>;
permission_level: string;
}

export interface Lists {
lists: Array<List>;
}

export interface QueryLists {
archived?: boolean;
}

export interface Task {
id: string;
custom_id: string;
name: string;
text_content: string;
description: string;
status: {
status: string;
color: string;
orderindex: number;
type: string;
};
orderindex: string;
date_created: string;
date_updated: string;
date_closed: string;
creator: {
id: number;
username: string;
color: string;
profilePicture: string;
};
assignees: Array<string>;
checklists: Array<string>;
tags: Array<string>;
parent: string;
priority: string;
due_date: string;
start_date: string;
time_estimate: string;
time_spent: string;
custom_fields: Array<{}>;
list: {
id: string;
};
folder: {
id: string;
};
space: {
id: string;
};
url: string;
}

export interface Tasks {
tasks: Array<Task>;
}

export interface QueryTasks {
archived?: false;
page?: number;
order_by?: string;
reverse?: true;
subtasks?: true;
statuses?: Array<string>;
include_closed?: true;
assignees?: Array<string>;
tags?: Array<string>;
due_date_gt?: number;
due_date_lt?: number;
date_created_gt?: number;
date_created_lt?: number;
date_updated_gt?: number;
date_updated_lt?: number;
date_done_gt?: number;
date_done_lt?: number;
custom_fields?: Array<string>;
}

export interface QueryAddTask {
name: string;
description?: string;
assignees?: Array<number>;
tags?: Array<string>;
status?: string;
priority?: number;
due_date?: number;
due_date_time?: boolean;
time_estimate?: number;
start_date?: number;
start_date_time?: boolean;
notify_all?: boolean;
parent?: any;
links_to?: any;
check_required_custom_fields?: boolean;
custom_fields?: Array<{
id: string;
value: string;
}>;
}

export interface QueryUpdateTask {
name?: string;
description?: string;
status?: string;
priority?: number;
due_date?: number;
due_date_time?: boolean;
parent?: string;
time_estimate?: number;
start_date?: number;
start_date_time?: boolean;
assignees?: {
add: Array<any>;
rem: Array<any>;
};
archived?: boolean;
}

0 comments on commit 6fbc760

Please sign in to comment.