Skip to content

Commit b3cf0aa

Browse files
committed
remove dead code, narrow exports, fix shell completions for all commands and flags
1 parent ece7205 commit b3cf0aa

File tree

14 files changed

+167
-146
lines changed

14 files changed

+167
-146
lines changed

src/api.ts

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export interface CreateTaskOptions {
7474
custom_item_id?: number
7575
}
7676

77-
export interface Team {
77+
interface Team {
7878
id: string
7979
name: string
8080
}
@@ -84,7 +84,7 @@ export interface Space {
8484
name: string
8585
}
8686

87-
export interface SpaceStatus {
87+
interface SpaceStatus {
8888
status: string
8989
color: string
9090
}
@@ -98,18 +98,18 @@ export interface List {
9898
name: string
9999
}
100100

101-
export interface Folder {
101+
interface Folder {
102102
id: string
103103
name: string
104104
}
105105

106-
export interface View {
106+
interface View {
107107
id: string
108108
name: string
109109
type: string
110110
}
111111

112-
export interface Comment {
112+
interface Comment {
113113
id: string
114114
comment_text: string
115115
user: { username: string }
@@ -236,31 +236,17 @@ export class ClickUpClient {
236236
})
237237
}
238238

239-
async getMyTasksFromList(listId: string): Promise<Task[]> {
240-
const me = await this.getMe()
241-
return this.getTasksFromList(listId, { 'assignees[]': String(me.id) })
242-
}
243-
244239
async getTask(taskId: string): Promise<Task> {
245240
return this.request<Task>(`/task/${taskId}?include_markdown_description=true`)
246241
}
247242

248-
async updateTaskMarkdown(taskId: string, markdown: string): Promise<Task> {
249-
return this.updateTask(taskId, { markdown_content: markdown })
250-
}
251-
252243
async createTask(listId: string, options: CreateTaskOptions): Promise<Task> {
253244
return this.request<Task>(`/list/${listId}/task`, {
254245
method: 'POST',
255246
body: JSON.stringify(options),
256247
})
257248
}
258249

259-
async getAssignedListIds(teamId: string): Promise<Set<string>> {
260-
const tasks = await this.getMyTasks(teamId)
261-
return new Set(tasks.map(t => t.list.id))
262-
}
263-
264250
async getTeams(): Promise<Team[]> {
265251
const data = await this.request<{ teams: Team[] }>('/team')
266252
return data.teams ?? []

src/commands/activity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { formatTaskDetail } from '../interactive.js'
77
import { isTTY, shouldOutputJson } from '../output.js'
88
import { formatTaskDetailMarkdown, formatCommentsMarkdown } from '../markdown.js'
99

10-
export interface ActivityResult {
10+
interface ActivityResult {
1111
task: Task
1212
comments: CommentSummary[]
1313
}

src/commands/assign.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Task } from '../api.js'
33
import type { Config } from '../config.js'
44
import { parseAssigneeId } from './update.js'
55

6-
export interface AssignOptions {
6+
interface AssignOptions {
77
to?: string
88
remove?: string
99
json?: boolean

src/commands/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ClickUpClient } from '../api.js'
22
import type { Config } from '../config.js'
33

4-
export interface AuthResult {
4+
interface AuthResult {
55
authenticated: boolean
66
user?: { id: number; username: string }
77
error?: string

0 commit comments

Comments
 (0)