@sebastienheyd/clickup-mcp 1.6.1

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 (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +303 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +184 -0
  6. package/dist/clickup-text.d.ts +83 -0
  7. package/dist/clickup-text.d.ts.map +1 -0
  8. package/dist/clickup-text.js +563 -0
  9. package/dist/index.d.ts +5 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +133 -0
  12. package/dist/resources/space-resources.d.ts +6 -0
  13. package/dist/resources/space-resources.d.ts.map +1 -0
  14. package/dist/resources/space-resources.js +95 -0
  15. package/dist/shared/config.d.ts +11 -0
  16. package/dist/shared/config.d.ts.map +1 -0
  17. package/dist/shared/config.js +61 -0
  18. package/dist/shared/data-uri.d.ts +14 -0
  19. package/dist/shared/data-uri.d.ts.map +1 -0
  20. package/dist/shared/data-uri.js +34 -0
  21. package/dist/shared/image-processing.d.ts +13 -0
  22. package/dist/shared/image-processing.d.ts.map +1 -0
  23. package/dist/shared/image-processing.js +199 -0
  24. package/dist/shared/types.d.ts +21 -0
  25. package/dist/shared/types.d.ts.map +1 -0
  26. package/dist/shared/types.js +2 -0
  27. package/dist/shared/utils.d.ts +95 -0
  28. package/dist/shared/utils.d.ts.map +1 -0
  29. package/dist/shared/utils.js +630 -0
  30. package/dist/test-utils.d.ts +23 -0
  31. package/dist/test-utils.d.ts.map +1 -0
  32. package/dist/test-utils.js +44 -0
  33. package/dist/tools/doc-tools.d.ts +4 -0
  34. package/dist/tools/doc-tools.d.ts.map +1 -0
  35. package/dist/tools/doc-tools.js +436 -0
  36. package/dist/tools/list-tools.d.ts +4 -0
  37. package/dist/tools/list-tools.d.ts.map +1 -0
  38. package/dist/tools/list-tools.js +175 -0
  39. package/dist/tools/search-tools.d.ts +3 -0
  40. package/dist/tools/search-tools.d.ts.map +1 -0
  41. package/dist/tools/search-tools.js +188 -0
  42. package/dist/tools/space-tools.d.ts +3 -0
  43. package/dist/tools/space-tools.d.ts.map +1 -0
  44. package/dist/tools/space-tools.js +144 -0
  45. package/dist/tools/task-tools.d.ts +8 -0
  46. package/dist/tools/task-tools.d.ts.map +1 -0
  47. package/dist/tools/task-tools.js +325 -0
  48. package/dist/tools/task-write-tools.d.ts +3 -0
  49. package/dist/tools/task-write-tools.d.ts.map +1 -0
  50. package/dist/tools/task-write-tools.js +575 -0
  51. package/dist/tools/time-tools.d.ts +4 -0
  52. package/dist/tools/time-tools.d.ts.map +1 -0
  53. package/dist/tools/time-tools.js +338 -0
  54. package/package.json +72 -0
@@ -0,0 +1,95 @@
1
+ import Fuse from 'fuse.js';
2
+ /**
3
+ * Checks if a string looks like a valid ClickUp task ID
4
+ * Valid task IDs are 6-9 characters long and contain only alphanumeric characters
5
+ */
6
+ export declare function isTaskId(str: string): boolean;
7
+ /**
8
+ * Checks if a string looks like a ClickUp custom task ID (e.g. "SOI-4422", "PQP-123")
9
+ */
10
+ export declare function isCustomTaskId(str: string): boolean;
11
+ /**
12
+ * Resolves a custom task ID to an internal task ID via the ClickUp API
13
+ */
14
+ export declare function resolveCustomTaskId(customId: string): Promise<string>;
15
+ /**
16
+ * Resolves a task ID (internal or custom) to an internal task ID.
17
+ * If the ID is already an internal ID, returns it as-is.
18
+ * If the ID is a custom ID (e.g. "SOI-4422"), resolves it via the API.
19
+ */
20
+ export declare function resolveTaskId(id: string): Promise<string>;
21
+ /**
22
+ * Get current authenticated user information from ClickUp API
23
+ * Caches the promise to prevent race conditions on concurrent calls
24
+ */
25
+ export declare function getCurrentUser(): Promise<any>;
26
+ export { downloadImages } from "./image-processing";
27
+ /**
28
+ * Function to get folder details, using a cache to avoid redundant fetches.
29
+ * Fetches both the folder metadata and its lists (via the dedicated /list endpoint)
30
+ * to ensure lists are always available regardless of what GET /folder/{id} returns.
31
+ */
32
+ export declare function getFolderDetails(folderId: string): Promise<any>;
33
+ /**
34
+ * Format folder content as tree structure
35
+ */
36
+ export declare function formatFolderTree(folder: any): string;
37
+ /**
38
+ * Function to get space details, using a cache to avoid redundant fetches
39
+ */
40
+ export declare function getSpaceDetails(spaceId: string): Promise<any>;
41
+ /**
42
+ * Get or create a task search index with specified filters
43
+ * Caches promises to prevent race conditions on concurrent calls
44
+ */
45
+ export declare function getTaskSearchIndex(space_ids?: string[], list_ids?: string[], assignees?: string[]): Promise<Fuse<any> | null>;
46
+ /**
47
+ * Generate a ClickUp task URL from a task ID
48
+ */
49
+ export declare function generateTaskUrl(taskId: string): string;
50
+ /**
51
+ * Generate a ClickUp list URL from a list ID
52
+ */
53
+ export declare function generateListUrl(listId: string): string;
54
+ /**
55
+ * Generate a ClickUp space URL from a space ID
56
+ */
57
+ export declare function generateSpaceUrl(spaceId: string): string;
58
+ /**
59
+ * Generate a ClickUp folder URL from a folder ID
60
+ */
61
+ export declare function generateFolderUrl(folderId: string): string;
62
+ /**
63
+ * Generate a ClickUp document URL from a document ID and optional page ID
64
+ */
65
+ export declare function generateDocumentUrl(docId: string, pageId?: string): string;
66
+ /**
67
+ * Format space content as tree structure
68
+ * Shared function used by both searchSpaces tool and space resources
69
+ */
70
+ export declare function formatSpaceTree(space: any, lists: any[], folders: any[], documents: any[]): string;
71
+ /**
72
+ * Get or refresh the space search index
73
+ * Caches promise to prevent race conditions on concurrent calls
74
+ */
75
+ export declare function getSpaceSearchIndex(): Promise<Fuse<any> | null>;
76
+ /**
77
+ * Get lists, folders, and documents for a specific space with caching
78
+ */
79
+ export declare function getSpaceContent(spaceId: string): Promise<{
80
+ lists: any[];
81
+ folders: any[];
82
+ documents: any[];
83
+ }>;
84
+ /**
85
+ * Gets all team members from ClickUp API with caching
86
+ */
87
+ export declare function getAllTeamMembers(): Promise<string[]>;
88
+ /**
89
+ * Performs multi-term search with aggressive boosting for items matching multiple terms
90
+ * @param searchIndex Fuse search index to search within
91
+ * @param terms Array of search terms
92
+ * @returns Array of items sorted by relevance (multi-term matches ranked higher)
93
+ */
94
+ export declare function performMultiTermSearch<T>(searchIndex: Fuse<T>, terms: string[]): Promise<T[]>;
95
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,SAAS,CAAC;AAI3B;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG7C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB3E;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ/D;AAKD;;;GAGG;AACH,wBAAsB,cAAc,iBA6BnC;AAGD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA8C/D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CA+CpD;AAID;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA0B7D;AAKD;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,SAAS,CAAC,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CA+B3B;AAkED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MA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