@chykalophia/clickup-mcp-server 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +467 -0
  3. package/bin/clickup-mcp-server-ai.js +9 -0
  4. package/bin/clickup-mcp-server-basic.js +9 -0
  5. package/bin/clickup-mcp-server-efficiency.js +9 -0
  6. package/bin/clickup-mcp-server-enhanced.js +9 -0
  7. package/build/app.d.ts +1 -0
  8. package/build/app.js +2 -0
  9. package/build/app.js.map +1 -0
  10. package/build/clickup-client/attachments-enhanced.d.ts +128 -0
  11. package/build/clickup-client/attachments-enhanced.js +212 -0
  12. package/build/clickup-client/attachments-enhanced.js.map +1 -0
  13. package/build/clickup-client/auth.d.ts +254 -0
  14. package/build/clickup-client/auth.js +105 -0
  15. package/build/clickup-client/auth.js.map +1 -0
  16. package/build/clickup-client/chat-enhanced.d.ts +141 -0
  17. package/build/clickup-client/chat-enhanced.js +196 -0
  18. package/build/clickup-client/chat-enhanced.js.map +1 -0
  19. package/build/clickup-client/checklists.d.ts +87 -0
  20. package/build/clickup-client/checklists.js +63 -0
  21. package/build/clickup-client/checklists.js.map +1 -0
  22. package/build/clickup-client/comments-enhanced.d.ts +176 -0
  23. package/build/clickup-client/comments-enhanced.js +230 -0
  24. package/build/clickup-client/comments-enhanced.js.map +1 -0
  25. package/build/clickup-client/comments.d.ts +173 -0
  26. package/build/clickup-client/comments.js +312 -0
  27. package/build/clickup-client/comments.js.map +1 -0
  28. package/build/clickup-client/custom-fields-enhanced.d.ts +286 -0
  29. package/build/clickup-client/custom-fields-enhanced.js +416 -0
  30. package/build/clickup-client/custom-fields-enhanced.js.map +1 -0
  31. package/build/clickup-client/dependencies-enhanced.d.ts +144 -0
  32. package/build/clickup-client/dependencies-enhanced.js +142 -0
  33. package/build/clickup-client/dependencies-enhanced.js.map +1 -0
  34. package/build/clickup-client/docs-enhanced.d.ts +176 -0
  35. package/build/clickup-client/docs-enhanced.js +374 -0
  36. package/build/clickup-client/docs-enhanced.js.map +1 -0
  37. package/build/clickup-client/docs.d.ts +84 -0
  38. package/build/clickup-client/docs.js +156 -0
  39. package/build/clickup-client/docs.js.map +1 -0
  40. package/build/clickup-client/folders.d.ts +62 -0
  41. package/build/clickup-client/folders.js +53 -0
  42. package/build/clickup-client/folders.js.map +1 -0
  43. package/build/clickup-client/goals-enhanced.d.ts +163 -0
  44. package/build/clickup-client/goals-enhanced.js +309 -0
  45. package/build/clickup-client/goals-enhanced.js.map +1 -0
  46. package/build/clickup-client/index.d.ts +16 -0
  47. package/build/clickup-client/index.js +61 -0
  48. package/build/clickup-client/index.js.map +1 -0
  49. package/build/clickup-client/lists.d.ts +105 -0
  50. package/build/clickup-client/lists.js +108 -0
  51. package/build/clickup-client/lists.js.map +1 -0
  52. package/build/clickup-client/secure-client.d.ts +88 -0
  53. package/build/clickup-client/secure-client.js +275 -0
  54. package/build/clickup-client/secure-client.js.map +1 -0
  55. package/build/clickup-client/spaces.d.ts +58 -0
  56. package/build/clickup-client/spaces.js +28 -0
  57. package/build/clickup-client/spaces.js.map +1 -0
  58. package/build/clickup-client/tasks.d.ts +161 -0
  59. package/build/clickup-client/tasks.js +99 -0
  60. package/build/clickup-client/tasks.js.map +1 -0
  61. package/build/clickup-client/time-tracking-enhanced.d.ts +153 -0
  62. package/build/clickup-client/time-tracking-enhanced.js +292 -0
  63. package/build/clickup-client/time-tracking-enhanced.js.map +1 -0
  64. package/build/clickup-client/views-enhanced.d.ts +149 -0
  65. package/build/clickup-client/views-enhanced.js +210 -0
  66. package/build/clickup-client/views-enhanced.js.map +1 -0
  67. package/build/clickup-client/webhooks-enhanced.d.ts +119 -0
  68. package/build/clickup-client/webhooks-enhanced.js +169 -0
  69. package/build/clickup-client/webhooks-enhanced.js.map +1 -0
  70. package/build/controllers/lists.controller.d.ts +1 -0
  71. package/build/controllers/lists.controller.js +2 -0
  72. package/build/controllers/lists.controller.js.map +1 -0
  73. package/build/index-efficiency-simple.d.ts +2 -0
  74. package/build/index-efficiency-simple.js +379 -0
  75. package/build/index-efficiency-simple.js.map +1 -0
  76. package/build/index-enhanced-efficiency.d.ts +2 -0
  77. package/build/index-enhanced-efficiency.js +275 -0
  78. package/build/index-enhanced-efficiency.js.map +1 -0
  79. package/build/index-enhanced.d.ts +2 -0
  80. package/build/index-enhanced.js +74 -0
  81. package/build/index-enhanced.js.map +1 -0
  82. package/build/index.d.ts +2 -0
  83. package/build/index.js +77 -0
  84. package/build/index.js.map +1 -0
  85. package/build/resources/checklist-resources.d.ts +2 -0
  86. package/build/resources/checklist-resources.js +102 -0
  87. package/build/resources/checklist-resources.js.map +1 -0
  88. package/build/resources/comment-resources.d.ts +2 -0
  89. package/build/resources/comment-resources.js +152 -0
  90. package/build/resources/comment-resources.js.map +1 -0
  91. package/build/resources/doc-resources.d.ts +2 -0
  92. package/build/resources/doc-resources.js +77 -0
  93. package/build/resources/doc-resources.js.map +1 -0
  94. package/build/resources/folder-resources.d.ts +2 -0
  95. package/build/resources/folder-resources.js +160 -0
  96. package/build/resources/folder-resources.js.map +1 -0
  97. package/build/resources/list-resources.d.ts +2 -0
  98. package/build/resources/list-resources.js +104 -0
  99. package/build/resources/list-resources.js.map +1 -0
  100. package/build/resources/space-resources.d.ts +2 -0
  101. package/build/resources/space-resources.js +104 -0
  102. package/build/resources/space-resources.js.map +1 -0
  103. package/build/resources/task-resources.d.ts +2 -0
  104. package/build/resources/task-resources.js +57 -0
  105. package/build/resources/task-resources.js.map +1 -0
  106. package/build/routes/lists.routes.d.ts +1 -0
  107. package/build/routes/lists.routes.js +2 -0
  108. package/build/routes/lists.routes.js.map +1 -0
  109. package/build/schemas/attachments-schemas.d.ts +201 -0
  110. package/build/schemas/attachments-schemas.js +250 -0
  111. package/build/schemas/attachments-schemas.js.map +1 -0
  112. package/build/schemas/chat-schemas.d.ts +478 -0
  113. package/build/schemas/chat-schemas.js +173 -0
  114. package/build/schemas/chat-schemas.js.map +1 -0
  115. package/build/schemas/custom-field-schemas.d.ts +1617 -0
  116. package/build/schemas/custom-field-schemas.js +384 -0
  117. package/build/schemas/custom-field-schemas.js.map +1 -0
  118. package/build/schemas/dependencies-schemas.d.ts +274 -0
  119. package/build/schemas/dependencies-schemas.js +176 -0
  120. package/build/schemas/dependencies-schemas.js.map +1 -0
  121. package/build/schemas/document-schemas.d.ts +433 -0
  122. package/build/schemas/document-schemas.js +168 -0
  123. package/build/schemas/document-schemas.js.map +1 -0
  124. package/build/schemas/goals-schemas.d.ts +961 -0
  125. package/build/schemas/goals-schemas.js +293 -0
  126. package/build/schemas/goals-schemas.js.map +1 -0
  127. package/build/schemas/time-tracking-schemas.d.ts +741 -0
  128. package/build/schemas/time-tracking-schemas.js +234 -0
  129. package/build/schemas/time-tracking-schemas.js.map +1 -0
  130. package/build/schemas/views-schemas.d.ts +1168 -0
  131. package/build/schemas/views-schemas.js +221 -0
  132. package/build/schemas/views-schemas.js.map +1 -0
  133. package/build/schemas/webhook-schemas.d.ts +1127 -0
  134. package/build/schemas/webhook-schemas.js +137 -0
  135. package/build/schemas/webhook-schemas.js.map +1 -0
  136. package/build/services/lists.service.d.ts +1 -0
  137. package/build/services/lists.service.js +2 -0
  138. package/build/services/lists.service.js.map +1 -0
  139. package/build/tools/attachments-tools-setup.d.ts +2 -0
  140. package/build/tools/attachments-tools-setup.js +387 -0
  141. package/build/tools/attachments-tools-setup.js.map +1 -0
  142. package/build/tools/chat-tools-enhanced.d.ts +5 -0
  143. package/build/tools/chat-tools-enhanced.js +396 -0
  144. package/build/tools/chat-tools-enhanced.js.map +1 -0
  145. package/build/tools/chat-tools.d.ts +2 -0
  146. package/build/tools/chat-tools.js +614 -0
  147. package/build/tools/chat-tools.js.map +1 -0
  148. package/build/tools/checklist-tools.d.ts +2 -0
  149. package/build/tools/checklist-tools.js +139 -0
  150. package/build/tools/checklist-tools.js.map +1 -0
  151. package/build/tools/comment-tools.d.ts +2 -0
  152. package/build/tools/comment-tools.js +295 -0
  153. package/build/tools/comment-tools.js.map +1 -0
  154. package/build/tools/custom-field-tools.d.ts +2 -0
  155. package/build/tools/custom-field-tools.js +578 -0
  156. package/build/tools/custom-field-tools.js.map +1 -0
  157. package/build/tools/dependencies-tools-setup.d.ts +2 -0
  158. package/build/tools/dependencies-tools-setup.js +319 -0
  159. package/build/tools/dependencies-tools-setup.js.map +1 -0
  160. package/build/tools/doc-tools-enhanced.d.ts +2 -0
  161. package/build/tools/doc-tools-enhanced.js +417 -0
  162. package/build/tools/doc-tools-enhanced.js.map +1 -0
  163. package/build/tools/doc-tools.d.ts +2 -0
  164. package/build/tools/doc-tools.js +109 -0
  165. package/build/tools/doc-tools.js.map +1 -0
  166. package/build/tools/goals-tools.d.ts +2 -0
  167. package/build/tools/goals-tools.js +422 -0
  168. package/build/tools/goals-tools.js.map +1 -0
  169. package/build/tools/helper-tools.d.ts +2 -0
  170. package/build/tools/helper-tools.js +363 -0
  171. package/build/tools/helper-tools.js.map +1 -0
  172. package/build/tools/space-tools.d.ts +2 -0
  173. package/build/tools/space-tools.js +45 -0
  174. package/build/tools/space-tools.js.map +1 -0
  175. package/build/tools/task-tools.d.ts +2 -0
  176. package/build/tools/task-tools.js +415 -0
  177. package/build/tools/task-tools.js.map +1 -0
  178. package/build/tools/time-tracking-tools.d.ts +2 -0
  179. package/build/tools/time-tracking-tools.js +329 -0
  180. package/build/tools/time-tracking-tools.js.map +1 -0
  181. package/build/tools/views-tools-setup.d.ts +2 -0
  182. package/build/tools/views-tools-setup.js +358 -0
  183. package/build/tools/views-tools-setup.js.map +1 -0
  184. package/build/tools/webhook-tools-setup.d.ts +2 -0
  185. package/build/tools/webhook-tools-setup.js +304 -0
  186. package/build/tools/webhook-tools-setup.js.map +1 -0
  187. package/build/tools/webhook-tools.d.ts +4 -0
  188. package/build/tools/webhook-tools.js +345 -0
  189. package/build/tools/webhook-tools.js.map +1 -0
  190. package/build/utils/clickup-comment-formatter.d.ts +124 -0
  191. package/build/utils/clickup-comment-formatter.js +504 -0
  192. package/build/utils/clickup-comment-formatter.js.map +1 -0
  193. package/build/utils/context-aware-suggestions.d.ts +45 -0
  194. package/build/utils/context-aware-suggestions.js +360 -0
  195. package/build/utils/context-aware-suggestions.js.map +1 -0
  196. package/build/utils/error-handling.d.ts +140 -0
  197. package/build/utils/error-handling.js +392 -0
  198. package/build/utils/error-handling.js.map +1 -0
  199. package/build/utils/markdown-styling.d.ts +40 -0
  200. package/build/utils/markdown-styling.js +344 -0
  201. package/build/utils/markdown-styling.js.map +1 -0
  202. package/build/utils/markdown.d.ts +54 -0
  203. package/build/utils/markdown.js +243 -0
  204. package/build/utils/markdown.js.map +1 -0
  205. package/build/utils/security.d.ts +79 -0
  206. package/build/utils/security.js +303 -0
  207. package/build/utils/security.js.map +1 -0
  208. package/build/utils/tool-efficiency.d.ts +59 -0
  209. package/build/utils/tool-efficiency.js +247 -0
  210. package/build/utils/tool-efficiency.js.map +1 -0
  211. package/package.json +130 -0
@@ -0,0 +1,230 @@
1
+ // import { processClickUpResponse } from '../utils/markdown.js';
2
+ import { prepareCommentForClickUp, clickUpCommentToMarkdown } from '../utils/clickup-comment-formatter.js';
3
+ /**
4
+ * Process comment response to add markdown representation
5
+ * SIMPLIFIED VERSION to avoid duplication issues
6
+ */
7
+ function processCommentResponse(comment) {
8
+ // Skip the cleanClickUpCommentResponse and processClickUpResponse chain
9
+ // that was causing duplication - just return the comment as-is with minimal processing
10
+ const processed = { ...comment };
11
+ // Only add markdown conversion if we have structured comment data
12
+ if (processed.comment && Array.isArray(processed.comment)) {
13
+ try {
14
+ processed.comment_markdown = clickUpCommentToMarkdown({ comment: processed.comment });
15
+ }
16
+ catch (error) {
17
+ console.warn('Failed to convert ClickUp comment to markdown:', error);
18
+ // Fallback to comment_text if available
19
+ processed.comment_markdown = processed.comment_text || '';
20
+ }
21
+ }
22
+ return processed;
23
+ }
24
+ /**
25
+ * Prepare comment parameters for ClickUp API using structured comment format
26
+ * This uses ClickUp's structured comment array format for proper markdown rendering
27
+ */
28
+ /*
29
+ function prepareCommentParams(params: any): any {
30
+ if (params.comment_text) {
31
+ // Use the structured comment format instead of plain comment_text
32
+ const structuredComment = prepareCommentForClickUp(params.comment_text);
33
+
34
+ return {
35
+ notify_all: params.notify_all || false,
36
+ assignee: params.assignee,
37
+ resolved: params.resolved,
38
+ ...structuredComment // This includes the 'comment' array
39
+ };
40
+ }
41
+
42
+ return params;
43
+ }
44
+ */
45
+ export class CommentsEnhancedClient {
46
+ constructor(client) {
47
+ this.client = client;
48
+ }
49
+ /**
50
+ * Get comments for a specific task
51
+ * @param taskId The ID of the task to get comments for
52
+ * @param params Optional parameters for pagination
53
+ * @returns A list of comments with processed content and markdown representation
54
+ */
55
+ async getTaskComments(taskId, params) {
56
+ const result = await this.client.get(`/task/${taskId}/comment`, params);
57
+ // Process each comment's content
58
+ if (result.comments && Array.isArray(result.comments)) {
59
+ result.comments = result.comments.map((comment) => processCommentResponse(comment));
60
+ }
61
+ return result;
62
+ }
63
+ /**
64
+ * Create a new comment on a task
65
+ * @param taskId The ID of the task to comment on
66
+ * @param params The comment parameters (supports markdown in comment_text)
67
+ * @returns The created comment with processed content
68
+ */
69
+ /**
70
+ * RAW API TEST - Bypass all processing and send exactly like ClickUp's official example
71
+ */
72
+ async createTaskCommentRaw(taskId, commentText) {
73
+ // Exact match to ClickUp's official Node.js example
74
+ const payload = {
75
+ notify_all: false,
76
+ comment_text: commentText
77
+ };
78
+ console.log('=== RAW API TEST ===');
79
+ console.log('URL:', `/task/${taskId}/comment`);
80
+ console.log('Payload:', JSON.stringify(payload, null, 2));
81
+ console.log('===================');
82
+ // Send raw request without any processing
83
+ const result = await this.client.post(`/task/${taskId}/comment`, payload);
84
+ console.log('=== RAW API RESPONSE ===');
85
+ console.log('Response:', JSON.stringify(result, null, 2));
86
+ console.log('========================');
87
+ // Return raw response without any processing
88
+ return result;
89
+ }
90
+ async createTaskComment(taskId, params) {
91
+ // Convert comment_text to structured array format
92
+ const structuredComment = prepareCommentForClickUp(params.comment_text);
93
+ const payload = {
94
+ notify_all: params.notify_all || false,
95
+ assignee: params.assignee,
96
+ ...structuredComment // This adds the 'comment' array, NOT comment_text
97
+ };
98
+ // DEBUG: Log exactly what we're sending to ClickUp API
99
+ console.log('=== DEBUG: Sending to ClickUp API ===');
100
+ console.log('URL:', `/task/${taskId}/comment`);
101
+ console.log('Payload:', JSON.stringify(payload, null, 2));
102
+ console.log('=====================================');
103
+ const result = await this.client.post(`/task/${taskId}/comment`, payload);
104
+ // DEBUG: Log what ClickUp returns
105
+ console.log('=== DEBUG: ClickUp API Response ===');
106
+ console.log('Raw Response:', JSON.stringify(result, null, 2));
107
+ console.log('===================================');
108
+ return processCommentResponse(result);
109
+ }
110
+ /**
111
+ * Get comments for a chat view
112
+ * @param viewId The ID of the chat view to get comments for
113
+ * @param params Optional parameters for pagination
114
+ * @returns A list of comments with processed content and markdown representation
115
+ */
116
+ async getChatViewComments(viewId, params) {
117
+ const result = await this.client.get(`/view/${viewId}/comment`, params);
118
+ // Process each comment's content
119
+ if (result.comments && Array.isArray(result.comments)) {
120
+ result.comments = result.comments.map((comment) => processCommentResponse(comment));
121
+ }
122
+ return result;
123
+ }
124
+ /**
125
+ * Create a new comment on a chat view
126
+ * @param viewId The ID of the chat view to comment on
127
+ * @param params The comment parameters (supports markdown in comment_text)
128
+ * @returns The created comment with processed content
129
+ */
130
+ async createChatViewComment(viewId, params) {
131
+ // Convert comment_text to structured array format
132
+ const structuredComment = prepareCommentForClickUp(params.comment_text);
133
+ const payload = {
134
+ notify_all: params.notify_all || false,
135
+ ...structuredComment // This adds the 'comment' array, NOT comment_text
136
+ };
137
+ const result = await this.client.post(`/view/${viewId}/comment`, payload);
138
+ return processCommentResponse(result);
139
+ }
140
+ /**
141
+ * Get comments for a list
142
+ * @param listId The ID of the list to get comments for
143
+ * @param params Optional parameters for pagination
144
+ * @returns A list of comments with processed content and markdown representation
145
+ */
146
+ async getListComments(listId, params) {
147
+ const result = await this.client.get(`/list/${listId}/comment`, params);
148
+ // Process each comment's content
149
+ if (result.comments && Array.isArray(result.comments)) {
150
+ result.comments = result.comments.map((comment) => processCommentResponse(comment));
151
+ }
152
+ return result;
153
+ }
154
+ /**
155
+ * Create a new comment on a list
156
+ * @param listId The ID of the list to comment on
157
+ * @param params The comment parameters (supports markdown in comment_text)
158
+ * @returns The created comment with processed content
159
+ */
160
+ async createListComment(listId, params) {
161
+ // Convert comment_text to structured array format
162
+ const structuredComment = prepareCommentForClickUp(params.comment_text);
163
+ const payload = {
164
+ notify_all: params.notify_all || false,
165
+ assignee: params.assignee,
166
+ ...structuredComment // This adds the 'comment' array, NOT comment_text
167
+ };
168
+ const result = await this.client.post(`/list/${listId}/comment`, payload);
169
+ return processCommentResponse(result);
170
+ }
171
+ /**
172
+ * Update an existing comment
173
+ * @param commentId The ID of the comment to update
174
+ * @param params The comment parameters to update (supports markdown in comment_text)
175
+ * @returns The updated comment with processed content
176
+ */
177
+ async updateComment(commentId, params) {
178
+ // Convert comment_text to structured array format
179
+ const structuredComment = prepareCommentForClickUp(params.comment_text);
180
+ const payload = {
181
+ assignee: params.assignee,
182
+ resolved: params.resolved,
183
+ ...structuredComment // This adds the 'comment' array, NOT comment_text
184
+ };
185
+ const result = await this.client.put(`/comment/${commentId}`, payload);
186
+ return processCommentResponse(result);
187
+ }
188
+ /**
189
+ * Delete a comment
190
+ * @param commentId The ID of the comment to delete
191
+ * @returns Success message
192
+ */
193
+ async deleteComment(commentId) {
194
+ return this.client.delete(`/comment/${commentId}`);
195
+ }
196
+ /**
197
+ * Get threaded comments for a parent comment
198
+ * @param commentId The ID of the parent comment
199
+ * @param params Optional parameters for pagination
200
+ * @returns A list of threaded comments with processed content and markdown representation
201
+ */
202
+ async getThreadedComments(commentId, params) {
203
+ const result = await this.client.get(`/comment/${commentId}/reply`, params);
204
+ // Process each comment's content
205
+ if (result.comments && Array.isArray(result.comments)) {
206
+ result.comments = result.comments.map((comment) => processCommentResponse(comment));
207
+ }
208
+ return result;
209
+ }
210
+ /**
211
+ * Create a new threaded comment on a parent comment
212
+ * @param commentId The ID of the parent comment
213
+ * @param params The comment parameters (supports markdown in comment_text)
214
+ * @returns The created threaded comment with processed content
215
+ */
216
+ async createThreadedComment(commentId, params) {
217
+ // Convert comment_text to structured array format
218
+ const structuredComment = prepareCommentForClickUp(params.comment_text);
219
+ const payload = {
220
+ notify_all: params.notify_all || false,
221
+ ...structuredComment // This adds the 'comment' array, NOT comment_text
222
+ };
223
+ const result = await this.client.post(`/comment/${commentId}/reply`, payload);
224
+ return processCommentResponse(result);
225
+ }
226
+ }
227
+ export const createCommentsEnhancedClient = (client) => {
228
+ return new CommentsEnhancedClient(client);
229
+ };
230
+ //# sourceMappingURL=comments-enhanced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comments-enhanced.js","sourceRoot":"","sources":["../../src/clickup-client/comments-enhanced.ts"],"names":[],"mappings":"AACA,iEAAiE;AACjE,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAyD,MAAM,uCAAuC,CAAC;AA8FlK;;;GAGG;AACH,SAAS,sBAAsB,CAAC,OAAY;IAC1C,wEAAwE;IACxE,uFAAuF;IAEvF,MAAM,SAAS,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IAEjC,kEAAkE;IAClE,IAAI,SAAS,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC;YACH,SAAS,CAAC,gBAAgB,GAAG,wBAAwB,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;QACxF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAC;YACtE,wCAAwC;YACxC,SAAS,CAAC,gBAAgB,GAAG,SAAS,CAAC,YAAY,IAAI,EAAE,CAAC;QAC5D,CAAC;IACH,CAAC;IA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SAAS,EAAE,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CAAC,SAAiB,EAAE,MAAkC;QAC7E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,SAAS,QAAQ,EAAE,MAAM,CAAC,CAAC;QAE5E,iCAAiC;QACjC,IAAI,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtD,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAY,EAAE,EAAE,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3F,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,qBAAqB,CAAC,SAAiB,EAAE,MAAmC;QAChF,kDAAkD;QAClD,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG;YACd,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK;YACtC,GAAG,iBAAiB,CAAC,kDAAkD;SACxE,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,SAAS,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9E,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,MAAqB,EAA0B,EAAE;IAC5F,OAAO,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC5C,CAAC,CAAC"}
@@ -0,0 +1,173 @@
1
+ import { ClickUpClient } from './index.js';
2
+ import { ClickUpCommentBlock } from '../utils/clickup-comment-formatter.js';
3
+ export interface Comment {
4
+ id: string;
5
+ comment: ClickUpCommentBlock[];
6
+ comment_text: string;
7
+ comment_markdown?: string;
8
+ user: {
9
+ id: number;
10
+ username: string;
11
+ email: string;
12
+ color: string;
13
+ profilePicture?: string;
14
+ };
15
+ resolved: boolean;
16
+ assignee?: {
17
+ id: number;
18
+ username: string;
19
+ email: string;
20
+ color: string;
21
+ profilePicture?: string;
22
+ };
23
+ assigned_by?: {
24
+ id: number;
25
+ username: string;
26
+ email: string;
27
+ color: string;
28
+ profilePicture?: string;
29
+ };
30
+ reactions?: {
31
+ [key: string]: {
32
+ count: number;
33
+ users: Array<{
34
+ id: number;
35
+ username: string;
36
+ email: string;
37
+ }>;
38
+ };
39
+ };
40
+ date: string;
41
+ start_date?: string;
42
+ due_date?: string;
43
+ parent?: string;
44
+ replies_count?: number;
45
+ }
46
+ export interface GetTaskCommentsParams {
47
+ start?: number;
48
+ start_id?: string;
49
+ }
50
+ export interface CreateTaskCommentParams {
51
+ comment_text?: string;
52
+ assignee?: number;
53
+ notify_all?: boolean;
54
+ }
55
+ export interface GetChatViewCommentsParams {
56
+ start?: number;
57
+ start_id?: string;
58
+ }
59
+ export interface CreateChatViewCommentParams {
60
+ comment_text?: string;
61
+ notify_all?: boolean;
62
+ }
63
+ export interface GetListCommentsParams {
64
+ start?: number;
65
+ start_id?: string;
66
+ }
67
+ export interface CreateListCommentParams {
68
+ comment_text?: string;
69
+ assignee?: number;
70
+ notify_all?: boolean;
71
+ }
72
+ export interface UpdateCommentParams {
73
+ comment_text?: string;
74
+ assignee?: number;
75
+ resolved?: boolean;
76
+ }
77
+ export interface GetThreadedCommentsParams {
78
+ start?: number;
79
+ start_id?: string;
80
+ }
81
+ export interface CreateThreadedCommentParams {
82
+ comment_text?: string;
83
+ notify_all?: boolean;
84
+ }
85
+ export declare class CommentsClient {
86
+ private client;
87
+ constructor(client: ClickUpClient);
88
+ /**
89
+ * Get comments for a specific task
90
+ * @param taskId The ID of the task to get comments for
91
+ * @param params Optional parameters for pagination
92
+ * @returns A list of comments with processed content
93
+ */
94
+ getTaskComments(taskId: string, params?: GetTaskCommentsParams): Promise<{
95
+ comments: Comment[];
96
+ }>;
97
+ /**
98
+ * Clean up ClickUp comment response by removing duplicate text blocks
99
+ * ClickUp automatically appends original text as final block - we remove it
100
+ */
101
+ private cleanupCommentResponse;
102
+ /**
103
+ * Create a new comment on a task
104
+ * @param taskId The ID of the task to comment on
105
+ * @param params The comment parameters (supports markdown in comment_text)
106
+ * @returns The created comment with processed content
107
+ */
108
+ createTaskComment(taskId: string, params: CreateTaskCommentParams): Promise<Comment>;
109
+ /**
110
+ * Get comments for a chat view
111
+ * @param viewId The ID of the chat view to get comments for
112
+ * @param params Optional parameters for pagination
113
+ * @returns A list of comments with processed content
114
+ */
115
+ getChatViewComments(viewId: string, params?: GetChatViewCommentsParams): Promise<{
116
+ comments: Comment[];
117
+ }>;
118
+ /**
119
+ * Create a new comment on a chat view
120
+ * @param viewId The ID of the chat view to comment on
121
+ * @param params The comment parameters (supports markdown in comment_text)
122
+ * @returns The created comment with processed content
123
+ */
124
+ createChatViewComment(viewId: string, params: CreateChatViewCommentParams): Promise<Comment>;
125
+ /**
126
+ * Get comments for a list
127
+ * @param listId The ID of the list to get comments for
128
+ * @param params Optional parameters for pagination
129
+ * @returns A list of comments with processed content
130
+ */
131
+ getListComments(listId: string, params?: GetListCommentsParams): Promise<{
132
+ comments: Comment[];
133
+ }>;
134
+ /**
135
+ * Create a new comment on a list
136
+ * @param listId The ID of the list to comment on
137
+ * @param params The comment parameters (supports markdown in comment_text)
138
+ * @returns The created comment with processed content
139
+ */
140
+ createListComment(listId: string, params: CreateListCommentParams): Promise<Comment>;
141
+ /**
142
+ * Update an existing comment
143
+ * @param commentId The ID of the comment to update
144
+ * @param params The comment parameters to update (supports markdown in comment_text)
145
+ * @returns The updated comment with processed content
146
+ */
147
+ updateComment(commentId: string, params: UpdateCommentParams): Promise<Comment>;
148
+ /**
149
+ * Delete a comment
150
+ * @param commentId The ID of the comment to delete
151
+ * @returns Success message
152
+ */
153
+ deleteComment(commentId: string): Promise<{
154
+ success: boolean;
155
+ }>;
156
+ /**
157
+ * Get threaded comments for a parent comment
158
+ * @param commentId The ID of the parent comment
159
+ * @param params Optional parameters for pagination
160
+ * @returns A list of threaded comments with processed content
161
+ */
162
+ getThreadedComments(commentId: string, params?: GetThreadedCommentsParams): Promise<{
163
+ comments: Comment[];
164
+ }>;
165
+ /**
166
+ * Create a new threaded comment on a parent comment
167
+ * @param commentId The ID of the parent comment
168
+ * @param params The comment parameters (supports markdown in comment_text)
169
+ * @returns The created threaded comment with processed content
170
+ */
171
+ createThreadedComment(commentId: string, params: CreateThreadedCommentParams): Promise<Comment>;
172
+ }
173
+ export declare const createCommentsClient: (client: ClickUpClient) => CommentsClient;