vikunja-mcp-ng 0.4.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 (582) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -0
  3. package/dist/auth/AuthManager.d.ts +63 -0
  4. package/dist/auth/AuthManager.d.ts.map +1 -0
  5. package/dist/auth/AuthManager.js +137 -0
  6. package/dist/auth/AuthManager.js.map +1 -0
  7. package/dist/auth/index.d.ts +7 -0
  8. package/dist/auth/index.d.ts.map +1 -0
  9. package/dist/auth/index.js +14 -0
  10. package/dist/auth/index.js.map +1 -0
  11. package/dist/auth/permissions.d.ts +60 -0
  12. package/dist/auth/permissions.d.ts.map +1 -0
  13. package/dist/auth/permissions.js +173 -0
  14. package/dist/auth/permissions.js.map +1 -0
  15. package/dist/client/VikunjaClientFactory.d.ts +41 -0
  16. package/dist/client/VikunjaClientFactory.d.ts.map +1 -0
  17. package/dist/client/VikunjaClientFactory.js +58 -0
  18. package/dist/client/VikunjaClientFactory.js.map +1 -0
  19. package/dist/client.d.ts +70 -0
  20. package/dist/client.d.ts.map +1 -0
  21. package/dist/client.js +136 -0
  22. package/dist/client.js.map +1 -0
  23. package/dist/config/ConfigurationManager.d.ts +106 -0
  24. package/dist/config/ConfigurationManager.d.ts.map +1 -0
  25. package/dist/config/ConfigurationManager.js +509 -0
  26. package/dist/config/ConfigurationManager.js.map +1 -0
  27. package/dist/config/index.d.ts +9 -0
  28. package/dist/config/index.d.ts.map +1 -0
  29. package/dist/config/index.js +36 -0
  30. package/dist/config/index.js.map +1 -0
  31. package/dist/config/secrets.d.ts +33 -0
  32. package/dist/config/secrets.d.ts.map +1 -0
  33. package/dist/config/secrets.js +90 -0
  34. package/dist/config/secrets.js.map +1 -0
  35. package/dist/config/types.d.ts +1113 -0
  36. package/dist/config/types.d.ts.map +1 -0
  37. package/dist/config/types.js +189 -0
  38. package/dist/config/types.js.map +1 -0
  39. package/dist/formatters/BatchImportResponseFormatter.d.ts +89 -0
  40. package/dist/formatters/BatchImportResponseFormatter.d.ts.map +1 -0
  41. package/dist/formatters/BatchImportResponseFormatter.js +125 -0
  42. package/dist/formatters/BatchImportResponseFormatter.js.map +1 -0
  43. package/dist/index.d.ts +20 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +130 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/middleware/direct-middleware.d.ts +9 -0
  48. package/dist/middleware/direct-middleware.d.ts.map +1 -0
  49. package/dist/middleware/direct-middleware.js +49 -0
  50. package/dist/middleware/direct-middleware.js.map +1 -0
  51. package/dist/middleware/index.d.ts +8 -0
  52. package/dist/middleware/index.d.ts.map +1 -0
  53. package/dist/middleware/index.js +21 -0
  54. package/dist/middleware/index.js.map +1 -0
  55. package/dist/middleware/simplified-rate-limit.d.ts +147 -0
  56. package/dist/middleware/simplified-rate-limit.d.ts.map +1 -0
  57. package/dist/middleware/simplified-rate-limit.js +533 -0
  58. package/dist/middleware/simplified-rate-limit.js.map +1 -0
  59. package/dist/parsers/CSVParser.d.ts +36 -0
  60. package/dist/parsers/CSVParser.d.ts.map +1 -0
  61. package/dist/parsers/CSVParser.js +69 -0
  62. package/dist/parsers/CSVParser.js.map +1 -0
  63. package/dist/parsers/InputParserFactory.d.ts +17 -0
  64. package/dist/parsers/InputParserFactory.d.ts.map +1 -0
  65. package/dist/parsers/InputParserFactory.js +137 -0
  66. package/dist/parsers/InputParserFactory.js.map +1 -0
  67. package/dist/parsers/JSONParser.d.ts +74 -0
  68. package/dist/parsers/JSONParser.d.ts.map +1 -0
  69. package/dist/parsers/JSONParser.js +69 -0
  70. package/dist/parsers/JSONParser.js.map +1 -0
  71. package/dist/services/EntityResolver.d.ts +92 -0
  72. package/dist/services/EntityResolver.d.ts.map +1 -0
  73. package/dist/services/EntityResolver.js +201 -0
  74. package/dist/services/EntityResolver.js.map +1 -0
  75. package/dist/services/TaskCreationService.d.ts +99 -0
  76. package/dist/services/TaskCreationService.d.ts.map +1 -0
  77. package/dist/services/TaskCreationService.js +392 -0
  78. package/dist/services/TaskCreationService.js.map +1 -0
  79. package/dist/storage/SimpleFilterStorage.d.ts +103 -0
  80. package/dist/storage/SimpleFilterStorage.d.ts.map +1 -0
  81. package/dist/storage/SimpleFilterStorage.js +350 -0
  82. package/dist/storage/SimpleFilterStorage.js.map +1 -0
  83. package/dist/storage/filtering/FilterSerializer.d.ts +45 -0
  84. package/dist/storage/filtering/FilterSerializer.d.ts.map +1 -0
  85. package/dist/storage/filtering/FilterSerializer.js +171 -0
  86. package/dist/storage/filtering/FilterSerializer.js.map +1 -0
  87. package/dist/storage/filtering/FilterValidator.d.ts +59 -0
  88. package/dist/storage/filtering/FilterValidator.d.ts.map +1 -0
  89. package/dist/storage/filtering/FilterValidator.js +183 -0
  90. package/dist/storage/filtering/FilterValidator.js.map +1 -0
  91. package/dist/storage/index.d.ts +61 -0
  92. package/dist/storage/index.d.ts.map +1 -0
  93. package/dist/storage/index.js +125 -0
  94. package/dist/storage/index.js.map +1 -0
  95. package/dist/storage/templateFileStore.d.ts +62 -0
  96. package/dist/storage/templateFileStore.d.ts.map +1 -0
  97. package/dist/storage/templateFileStore.js +151 -0
  98. package/dist/storage/templateFileStore.js.map +1 -0
  99. package/dist/tools/admin.d.ts +51 -0
  100. package/dist/tools/admin.d.ts.map +1 -0
  101. package/dist/tools/admin.js +207 -0
  102. package/dist/tools/admin.js.map +1 -0
  103. package/dist/tools/auth.d.ts +9 -0
  104. package/dist/tools/auth.d.ts.map +1 -0
  105. package/dist/tools/auth.js +175 -0
  106. package/dist/tools/auth.js.map +1 -0
  107. package/dist/tools/batch-import.d.ts +5 -0
  108. package/dist/tools/batch-import.d.ts.map +1 -0
  109. package/dist/tools/batch-import.js +153 -0
  110. package/dist/tools/batch-import.js.map +1 -0
  111. package/dist/tools/caldav-tokens.d.ts +45 -0
  112. package/dist/tools/caldav-tokens.d.ts.map +1 -0
  113. package/dist/tools/caldav-tokens.js +93 -0
  114. package/dist/tools/caldav-tokens.js.map +1 -0
  115. package/dist/tools/export.d.ts +14 -0
  116. package/dist/tools/export.d.ts.map +1 -0
  117. package/dist/tools/export.js +252 -0
  118. package/dist/tools/export.js.map +1 -0
  119. package/dist/tools/filters.d.ts +50 -0
  120. package/dist/tools/filters.d.ts.map +1 -0
  121. package/dist/tools/filters.js +512 -0
  122. package/dist/tools/filters.js.map +1 -0
  123. package/dist/tools/index.d.ts +53 -0
  124. package/dist/tools/index.d.ts.map +1 -0
  125. package/dist/tools/index.js +217 -0
  126. package/dist/tools/index.js.map +1 -0
  127. package/dist/tools/labels.d.ts +22 -0
  128. package/dist/tools/labels.d.ts.map +1 -0
  129. package/dist/tools/labels.js +206 -0
  130. package/dist/tools/labels.js.map +1 -0
  131. package/dist/tools/notifications.d.ts +17 -0
  132. package/dist/tools/notifications.d.ts.map +1 -0
  133. package/dist/tools/notifications.js +171 -0
  134. package/dist/tools/notifications.js.map +1 -0
  135. package/dist/tools/projects/backgrounds.d.ts +80 -0
  136. package/dist/tools/projects/backgrounds.d.ts.map +1 -0
  137. package/dist/tools/projects/backgrounds.js +154 -0
  138. package/dist/tools/projects/backgrounds.js.map +1 -0
  139. package/dist/tools/projects/buckets.d.ts +147 -0
  140. package/dist/tools/projects/buckets.d.ts.map +1 -0
  141. package/dist/tools/projects/buckets.js +291 -0
  142. package/dist/tools/projects/buckets.js.map +1 -0
  143. package/dist/tools/projects/crud.d.ts +145 -0
  144. package/dist/tools/projects/crud.d.ts.map +1 -0
  145. package/dist/tools/projects/crud.js +425 -0
  146. package/dist/tools/projects/crud.js.map +1 -0
  147. package/dist/tools/projects/duplicate.d.ts +41 -0
  148. package/dist/tools/projects/duplicate.d.ts.map +1 -0
  149. package/dist/tools/projects/duplicate.js +49 -0
  150. package/dist/tools/projects/duplicate.js.map +1 -0
  151. package/dist/tools/projects/hierarchy.d.ts +77 -0
  152. package/dist/tools/projects/hierarchy.d.ts.map +1 -0
  153. package/dist/tools/projects/hierarchy.js +300 -0
  154. package/dist/tools/projects/hierarchy.js.map +1 -0
  155. package/dist/tools/projects/index.d.ts +34 -0
  156. package/dist/tools/projects/index.d.ts.map +1 -0
  157. package/dist/tools/projects/index.js +522 -0
  158. package/dist/tools/projects/index.js.map +1 -0
  159. package/dist/tools/projects/permission.d.ts +26 -0
  160. package/dist/tools/projects/permission.d.ts.map +1 -0
  161. package/dist/tools/projects/permission.js +53 -0
  162. package/dist/tools/projects/permission.js.map +1 -0
  163. package/dist/tools/projects/response-formatter.d.ts +54 -0
  164. package/dist/tools/projects/response-formatter.d.ts.map +1 -0
  165. package/dist/tools/projects/response-formatter.js +139 -0
  166. package/dist/tools/projects/response-formatter.js.map +1 -0
  167. package/dist/tools/projects/sharing-access.d.ts +165 -0
  168. package/dist/tools/projects/sharing-access.d.ts.map +1 -0
  169. package/dist/tools/projects/sharing-access.js +450 -0
  170. package/dist/tools/projects/sharing-access.js.map +1 -0
  171. package/dist/tools/projects/sharing.d.ts +105 -0
  172. package/dist/tools/projects/sharing.d.ts.map +1 -0
  173. package/dist/tools/projects/sharing.js +258 -0
  174. package/dist/tools/projects/sharing.js.map +1 -0
  175. package/dist/tools/projects/validation.d.ts +51 -0
  176. package/dist/tools/projects/validation.d.ts.map +1 -0
  177. package/dist/tools/projects/validation.js +160 -0
  178. package/dist/tools/projects/validation.js.map +1 -0
  179. package/dist/tools/projects/views.d.ts +161 -0
  180. package/dist/tools/projects/views.d.ts.map +1 -0
  181. package/dist/tools/projects/views.js +234 -0
  182. package/dist/tools/projects/views.js.map +1 -0
  183. package/dist/tools/projects.d.ts +20 -0
  184. package/dist/tools/projects.d.ts.map +1 -0
  185. package/dist/tools/projects.js +66 -0
  186. package/dist/tools/projects.js.map +1 -0
  187. package/dist/tools/reactions.d.ts +25 -0
  188. package/dist/tools/reactions.d.ts.map +1 -0
  189. package/dist/tools/reactions.js +108 -0
  190. package/dist/tools/reactions.js.map +1 -0
  191. package/dist/tools/subscriptions.d.ts +23 -0
  192. package/dist/tools/subscriptions.d.ts.map +1 -0
  193. package/dist/tools/subscriptions.js +111 -0
  194. package/dist/tools/subscriptions.js.map +1 -0
  195. package/dist/tools/task-assignees.d.ts +13 -0
  196. package/dist/tools/task-assignees.d.ts.map +1 -0
  197. package/dist/tools/task-assignees.js +74 -0
  198. package/dist/tools/task-assignees.js.map +1 -0
  199. package/dist/tools/task-bulk.d.ts +13 -0
  200. package/dist/tools/task-bulk.d.ts.map +1 -0
  201. package/dist/tools/task-bulk.js +117 -0
  202. package/dist/tools/task-bulk.js.map +1 -0
  203. package/dist/tools/task-comments.d.ts +12 -0
  204. package/dist/tools/task-comments.d.ts.map +1 -0
  205. package/dist/tools/task-comments.js +65 -0
  206. package/dist/tools/task-comments.js.map +1 -0
  207. package/dist/tools/task-crud.d.ts +13 -0
  208. package/dist/tools/task-crud.d.ts.map +1 -0
  209. package/dist/tools/task-crud.js +168 -0
  210. package/dist/tools/task-crud.js.map +1 -0
  211. package/dist/tools/task-labels.d.ts +13 -0
  212. package/dist/tools/task-labels.d.ts.map +1 -0
  213. package/dist/tools/task-labels.js +64 -0
  214. package/dist/tools/task-labels.js.map +1 -0
  215. package/dist/tools/task-relations.d.ts +13 -0
  216. package/dist/tools/task-relations.d.ts.map +1 -0
  217. package/dist/tools/task-relations.js +74 -0
  218. package/dist/tools/task-relations.js.map +1 -0
  219. package/dist/tools/task-reminders.d.ts +13 -0
  220. package/dist/tools/task-reminders.d.ts.map +1 -0
  221. package/dist/tools/task-reminders.js +69 -0
  222. package/dist/tools/task-reminders.js.map +1 -0
  223. package/dist/tools/tasks/assignees/AssigneeOperationsService.d.ts +63 -0
  224. package/dist/tools/tasks/assignees/AssigneeOperationsService.d.ts.map +1 -0
  225. package/dist/tools/tasks/assignees/AssigneeOperationsService.js +152 -0
  226. package/dist/tools/tasks/assignees/AssigneeOperationsService.js.map +1 -0
  227. package/dist/tools/tasks/assignees/AssigneeResponseFormatter.d.ts +28 -0
  228. package/dist/tools/tasks/assignees/AssigneeResponseFormatter.d.ts.map +1 -0
  229. package/dist/tools/tasks/assignees/AssigneeResponseFormatter.js +73 -0
  230. package/dist/tools/tasks/assignees/AssigneeResponseFormatter.js.map +1 -0
  231. package/dist/tools/tasks/assignees/AssigneeValidationService.d.ts +46 -0
  232. package/dist/tools/tasks/assignees/AssigneeValidationService.d.ts.map +1 -0
  233. package/dist/tools/tasks/assignees/AssigneeValidationService.js +70 -0
  234. package/dist/tools/tasks/assignees/AssigneeValidationService.js.map +1 -0
  235. package/dist/tools/tasks/assignees/index.d.ts +52 -0
  236. package/dist/tools/tasks/assignees/index.d.ts.map +1 -0
  237. package/dist/tools/tasks/assignees/index.js +103 -0
  238. package/dist/tools/tasks/assignees/index.js.map +1 -0
  239. package/dist/tools/tasks/attach.d.ts +39 -0
  240. package/dist/tools/tasks/attach.d.ts.map +1 -0
  241. package/dist/tools/tasks/attach.js +90 -0
  242. package/dist/tools/tasks/attach.js.map +1 -0
  243. package/dist/tools/tasks/attachments.d.ts +67 -0
  244. package/dist/tools/tasks/attachments.d.ts.map +1 -0
  245. package/dist/tools/tasks/attachments.js +153 -0
  246. package/dist/tools/tasks/attachments.js.map +1 -0
  247. package/dist/tools/tasks/buckets.d.ts +41 -0
  248. package/dist/tools/tasks/buckets.d.ts.map +1 -0
  249. package/dist/tools/tasks/buckets.js +75 -0
  250. package/dist/tools/tasks/buckets.js.map +1 -0
  251. package/dist/tools/tasks/bulk/BatchProcessorFactory.d.ts +30 -0
  252. package/dist/tools/tasks/bulk/BatchProcessorFactory.d.ts.map +1 -0
  253. package/dist/tools/tasks/bulk/BatchProcessorFactory.js +69 -0
  254. package/dist/tools/tasks/bulk/BatchProcessorFactory.js.map +1 -0
  255. package/dist/tools/tasks/bulk/BulkOperationErrorHandler.d.ts +50 -0
  256. package/dist/tools/tasks/bulk/BulkOperationErrorHandler.d.ts.map +1 -0
  257. package/dist/tools/tasks/bulk/BulkOperationErrorHandler.js +183 -0
  258. package/dist/tools/tasks/bulk/BulkOperationErrorHandler.js.map +1 -0
  259. package/dist/tools/tasks/bulk/BulkOperationProcessor.d.ts +101 -0
  260. package/dist/tools/tasks/bulk/BulkOperationProcessor.d.ts.map +1 -0
  261. package/dist/tools/tasks/bulk/BulkOperationProcessor.js +416 -0
  262. package/dist/tools/tasks/bulk/BulkOperationProcessor.js.map +1 -0
  263. package/dist/tools/tasks/bulk/BulkOperationTypes.d.ts +50 -0
  264. package/dist/tools/tasks/bulk/BulkOperationTypes.d.ts.map +1 -0
  265. package/dist/tools/tasks/bulk/BulkOperationTypes.js +6 -0
  266. package/dist/tools/tasks/bulk/BulkOperationTypes.js.map +1 -0
  267. package/dist/tools/tasks/bulk/BulkOperationValidator.d.ts +53 -0
  268. package/dist/tools/tasks/bulk/BulkOperationValidator.d.ts.map +1 -0
  269. package/dist/tools/tasks/bulk/BulkOperationValidator.js +216 -0
  270. package/dist/tools/tasks/bulk/BulkOperationValidator.js.map +1 -0
  271. package/dist/tools/tasks/bulk/index.d.ts +9 -0
  272. package/dist/tools/tasks/bulk/index.d.ts.map +1 -0
  273. package/dist/tools/tasks/bulk/index.js +15 -0
  274. package/dist/tools/tasks/bulk/index.js.map +1 -0
  275. package/dist/tools/tasks/bulk-operations-simplified.d.ts +62 -0
  276. package/dist/tools/tasks/bulk-operations-simplified.d.ts.map +1 -0
  277. package/dist/tools/tasks/bulk-operations-simplified.js +416 -0
  278. package/dist/tools/tasks/bulk-operations-simplified.js.map +1 -0
  279. package/dist/tools/tasks/bulk-operations.d.ts +8 -0
  280. package/dist/tools/tasks/bulk-operations.d.ts.map +1 -0
  281. package/dist/tools/tasks/bulk-operations.js +13 -0
  282. package/dist/tools/tasks/bulk-operations.js.map +1 -0
  283. package/dist/tools/tasks/by-index.d.ts +36 -0
  284. package/dist/tools/tasks/by-index.d.ts.map +1 -0
  285. package/dist/tools/tasks/by-index.js +52 -0
  286. package/dist/tools/tasks/by-index.js.map +1 -0
  287. package/dist/tools/tasks/comments/CommentOperationsService.d.ts +44 -0
  288. package/dist/tools/tasks/comments/CommentOperationsService.d.ts.map +1 -0
  289. package/dist/tools/tasks/comments/CommentOperationsService.js +86 -0
  290. package/dist/tools/tasks/comments/CommentOperationsService.js.map +1 -0
  291. package/dist/tools/tasks/comments/CommentResponseFormatter.d.ts +41 -0
  292. package/dist/tools/tasks/comments/CommentResponseFormatter.d.ts.map +1 -0
  293. package/dist/tools/tasks/comments/CommentResponseFormatter.js +114 -0
  294. package/dist/tools/tasks/comments/CommentResponseFormatter.js.map +1 -0
  295. package/dist/tools/tasks/comments/CommentValidationService.d.ts +62 -0
  296. package/dist/tools/tasks/comments/CommentValidationService.d.ts.map +1 -0
  297. package/dist/tools/tasks/comments/CommentValidationService.js +105 -0
  298. package/dist/tools/tasks/comments/CommentValidationService.js.map +1 -0
  299. package/dist/tools/tasks/comments/index.d.ts +66 -0
  300. package/dist/tools/tasks/comments/index.d.ts.map +1 -0
  301. package/dist/tools/tasks/comments/index.js +99 -0
  302. package/dist/tools/tasks/comments/index.js.map +1 -0
  303. package/dist/tools/tasks/constants.d.ts +19 -0
  304. package/dist/tools/tasks/constants.d.ts.map +1 -0
  305. package/dist/tools/tasks/constants.js +82 -0
  306. package/dist/tools/tasks/constants.js.map +1 -0
  307. package/dist/tools/tasks/crud/TaskCreationService.d.ts +29 -0
  308. package/dist/tools/tasks/crud/TaskCreationService.d.ts.map +1 -0
  309. package/dist/tools/tasks/crud/TaskCreationService.js +274 -0
  310. package/dist/tools/tasks/crud/TaskCreationService.js.map +1 -0
  311. package/dist/tools/tasks/crud/TaskDeletionService.d.ts +19 -0
  312. package/dist/tools/tasks/crud/TaskDeletionService.d.ts.map +1 -0
  313. package/dist/tools/tasks/crud/TaskDeletionService.js +96 -0
  314. package/dist/tools/tasks/crud/TaskDeletionService.js.map +1 -0
  315. package/dist/tools/tasks/crud/TaskReadService.d.ts +19 -0
  316. package/dist/tools/tasks/crud/TaskReadService.d.ts.map +1 -0
  317. package/dist/tools/tasks/crud/TaskReadService.js +66 -0
  318. package/dist/tools/tasks/crud/TaskReadService.js.map +1 -0
  319. package/dist/tools/tasks/crud/TaskResponseFormatter.d.ts +18 -0
  320. package/dist/tools/tasks/crud/TaskResponseFormatter.d.ts.map +1 -0
  321. package/dist/tools/tasks/crud/TaskResponseFormatter.js +248 -0
  322. package/dist/tools/tasks/crud/TaskResponseFormatter.js.map +1 -0
  323. package/dist/tools/tasks/crud/TaskUpdateService.d.ts +33 -0
  324. package/dist/tools/tasks/crud/TaskUpdateService.d.ts.map +1 -0
  325. package/dist/tools/tasks/crud/TaskUpdateService.js +294 -0
  326. package/dist/tools/tasks/crud/TaskUpdateService.js.map +1 -0
  327. package/dist/tools/tasks/crud/index.d.ts +17 -0
  328. package/dist/tools/tasks/crud/index.d.ts.map +1 -0
  329. package/dist/tools/tasks/crud/index.js +20 -0
  330. package/dist/tools/tasks/crud/index.js.map +1 -0
  331. package/dist/tools/tasks/duplicate.d.ts +28 -0
  332. package/dist/tools/tasks/duplicate.d.ts.map +1 -0
  333. package/dist/tools/tasks/duplicate.js +41 -0
  334. package/dist/tools/tasks/duplicate.js.map +1 -0
  335. package/dist/tools/tasks/filtering/FilterExecutor.d.ts +39 -0
  336. package/dist/tools/tasks/filtering/FilterExecutor.d.ts.map +1 -0
  337. package/dist/tools/tasks/filtering/FilterExecutor.js +214 -0
  338. package/dist/tools/tasks/filtering/FilterExecutor.js.map +1 -0
  339. package/dist/tools/tasks/filtering/FilterValidator.d.ts +59 -0
  340. package/dist/tools/tasks/filtering/FilterValidator.d.ts.map +1 -0
  341. package/dist/tools/tasks/filtering/FilterValidator.js +257 -0
  342. package/dist/tools/tasks/filtering/FilterValidator.js.map +1 -0
  343. package/dist/tools/tasks/filtering/TaskFilteringOrchestrator.d.ts +78 -0
  344. package/dist/tools/tasks/filtering/TaskFilteringOrchestrator.d.ts.map +1 -0
  345. package/dist/tools/tasks/filtering/TaskFilteringOrchestrator.js +195 -0
  346. package/dist/tools/tasks/filtering/TaskFilteringOrchestrator.js.map +1 -0
  347. package/dist/tools/tasks/filtering/evaluators.d.ts +41 -0
  348. package/dist/tools/tasks/filtering/evaluators.d.ts.map +1 -0
  349. package/dist/tools/tasks/filtering/evaluators.js +224 -0
  350. package/dist/tools/tasks/filtering/evaluators.js.map +1 -0
  351. package/dist/tools/tasks/filtering/index.d.ts +11 -0
  352. package/dist/tools/tasks/filtering/index.d.ts.map +1 -0
  353. package/dist/tools/tasks/filtering/index.js +26 -0
  354. package/dist/tools/tasks/filtering/index.js.map +1 -0
  355. package/dist/tools/tasks/index.d.ts +9 -0
  356. package/dist/tools/tasks/index.d.ts.map +1 -0
  357. package/dist/tools/tasks/index.js +337 -0
  358. package/dist/tools/tasks/index.js.map +1 -0
  359. package/dist/tools/tasks/labels.d.ts +49 -0
  360. package/dist/tools/tasks/labels.d.ts.map +1 -0
  361. package/dist/tools/tasks/labels.js +223 -0
  362. package/dist/tools/tasks/labels.js.map +1 -0
  363. package/dist/tools/tasks/mark-read.d.ts +27 -0
  364. package/dist/tools/tasks/mark-read.d.ts.map +1 -0
  365. package/dist/tools/tasks/mark-read.js +38 -0
  366. package/dist/tools/tasks/mark-read.js.map +1 -0
  367. package/dist/tools/tasks/position.d.ts +53 -0
  368. package/dist/tools/tasks/position.d.ts.map +1 -0
  369. package/dist/tools/tasks/position.js +83 -0
  370. package/dist/tools/tasks/position.js.map +1 -0
  371. package/dist/tools/tasks/reminders.d.ts +56 -0
  372. package/dist/tools/tasks/reminders.d.ts.map +1 -0
  373. package/dist/tools/tasks/reminders.js +213 -0
  374. package/dist/tools/tasks/reminders.js.map +1 -0
  375. package/dist/tools/tasks/subtasks.d.ts +85 -0
  376. package/dist/tools/tasks/subtasks.d.ts.map +1 -0
  377. package/dist/tools/tasks/subtasks.js +286 -0
  378. package/dist/tools/tasks/subtasks.js.map +1 -0
  379. package/dist/tools/tasks/types/filters.d.ts +136 -0
  380. package/dist/tools/tasks/types/filters.d.ts.map +1 -0
  381. package/dist/tools/tasks/types/filters.js +7 -0
  382. package/dist/tools/tasks/types/filters.js.map +1 -0
  383. package/dist/tools/tasks/validation.d.ts +47 -0
  384. package/dist/tools/tasks/validation.d.ts.map +1 -0
  385. package/dist/tools/tasks/validation.js +131 -0
  386. package/dist/tools/tasks/validation.js.map +1 -0
  387. package/dist/tools/tasks-relations.d.ts +25 -0
  388. package/dist/tools/tasks-relations.d.ts.map +1 -0
  389. package/dist/tools/tasks-relations.js +271 -0
  390. package/dist/tools/tasks-relations.js.map +1 -0
  391. package/dist/tools/tasks.d.ts +6 -0
  392. package/dist/tools/tasks.d.ts.map +1 -0
  393. package/dist/tools/tasks.js +10 -0
  394. package/dist/tools/tasks.js.map +1 -0
  395. package/dist/tools/teams.d.ts +9 -0
  396. package/dist/tools/teams.d.ts.map +1 -0
  397. package/dist/tools/teams.js +255 -0
  398. package/dist/tools/teams.js.map +1 -0
  399. package/dist/tools/templates.d.ts +9 -0
  400. package/dist/tools/templates.d.ts.map +1 -0
  401. package/dist/tools/templates.js +450 -0
  402. package/dist/tools/templates.js.map +1 -0
  403. package/dist/tools/tokens.d.ts +37 -0
  404. package/dist/tools/tokens.d.ts.map +1 -0
  405. package/dist/tools/tokens.js +122 -0
  406. package/dist/tools/tokens.js.map +1 -0
  407. package/dist/tools/user-deletion.d.ts +41 -0
  408. package/dist/tools/user-deletion.d.ts.map +1 -0
  409. package/dist/tools/user-deletion.js +126 -0
  410. package/dist/tools/user-deletion.js.map +1 -0
  411. package/dist/tools/users.d.ts +9 -0
  412. package/dist/tools/users.d.ts.map +1 -0
  413. package/dist/tools/users.js +418 -0
  414. package/dist/tools/users.js.map +1 -0
  415. package/dist/tools/webhooks.d.ts +31 -0
  416. package/dist/tools/webhooks.d.ts.map +1 -0
  417. package/dist/tools/webhooks.js +414 -0
  418. package/dist/tools/webhooks.js.map +1 -0
  419. package/dist/transforms/base.d.ts +204 -0
  420. package/dist/transforms/base.d.ts.map +1 -0
  421. package/dist/transforms/base.js +175 -0
  422. package/dist/transforms/base.js.map +1 -0
  423. package/dist/transforms/field-selector.d.ts +27 -0
  424. package/dist/transforms/field-selector.d.ts.map +1 -0
  425. package/dist/transforms/field-selector.js +91 -0
  426. package/dist/transforms/field-selector.js.map +1 -0
  427. package/dist/transforms/index.d.ts +15 -0
  428. package/dist/transforms/index.d.ts.map +1 -0
  429. package/dist/transforms/index.js +50 -0
  430. package/dist/transforms/index.js.map +1 -0
  431. package/dist/transforms/size-calculator.d.ts +131 -0
  432. package/dist/transforms/size-calculator.d.ts.map +1 -0
  433. package/dist/transforms/size-calculator.js +284 -0
  434. package/dist/transforms/size-calculator.js.map +1 -0
  435. package/dist/transforms/task.d.ts +207 -0
  436. package/dist/transforms/task.d.ts.map +1 -0
  437. package/dist/transforms/task.js +259 -0
  438. package/dist/transforms/task.js.map +1 -0
  439. package/dist/types/errors.d.ts +65 -0
  440. package/dist/types/errors.d.ts.map +1 -0
  441. package/dist/types/errors.js +44 -0
  442. package/dist/types/errors.js.map +1 -0
  443. package/dist/types/filters.d.ts +149 -0
  444. package/dist/types/filters.d.ts.map +1 -0
  445. package/dist/types/filters.js +26 -0
  446. package/dist/types/filters.js.map +1 -0
  447. package/dist/types/index.d.ts +147 -0
  448. package/dist/types/index.d.ts.map +1 -0
  449. package/dist/types/index.js +24 -0
  450. package/dist/types/index.js.map +1 -0
  451. package/dist/types/node-vikunja-extended.d.ts +36 -0
  452. package/dist/types/node-vikunja-extended.d.ts.map +1 -0
  453. package/dist/types/node-vikunja-extended.js +25 -0
  454. package/dist/types/node-vikunja-extended.js.map +1 -0
  455. package/dist/types/responses.d.ts +121 -0
  456. package/dist/types/responses.d.ts.map +1 -0
  457. package/dist/types/responses.js +26 -0
  458. package/dist/types/responses.js.map +1 -0
  459. package/dist/types/vikunja.d.ts +319 -0
  460. package/dist/types/vikunja.d.ts.map +1 -0
  461. package/dist/types/vikunja.js +7 -0
  462. package/dist/types/vikunja.js.map +1 -0
  463. package/dist/utils/auth-error-handler.d.ts +23 -0
  464. package/dist/utils/auth-error-handler.d.ts.map +1 -0
  465. package/dist/utils/auth-error-handler.js +162 -0
  466. package/dist/utils/auth-error-handler.js.map +1 -0
  467. package/dist/utils/composite-operation.d.ts +184 -0
  468. package/dist/utils/composite-operation.d.ts.map +1 -0
  469. package/dist/utils/composite-operation.js +293 -0
  470. package/dist/utils/composite-operation.js.map +1 -0
  471. package/dist/utils/error-handler.d.ts +39 -0
  472. package/dist/utils/error-handler.d.ts.map +1 -0
  473. package/dist/utils/error-handler.js +336 -0
  474. package/dist/utils/error-handler.js.map +1 -0
  475. package/dist/utils/filtering/ClientSideFilteringStrategy.d.ts +13 -0
  476. package/dist/utils/filtering/ClientSideFilteringStrategy.d.ts.map +1 -0
  477. package/dist/utils/filtering/ClientSideFilteringStrategy.js +129 -0
  478. package/dist/utils/filtering/ClientSideFilteringStrategy.js.map +1 -0
  479. package/dist/utils/filtering/FilteringContext.d.ts +40 -0
  480. package/dist/utils/filtering/FilteringContext.d.ts.map +1 -0
  481. package/dist/utils/filtering/FilteringContext.js +58 -0
  482. package/dist/utils/filtering/FilteringContext.js.map +1 -0
  483. package/dist/utils/filtering/HybridFilteringStrategy.d.ts +15 -0
  484. package/dist/utils/filtering/HybridFilteringStrategy.d.ts.map +1 -0
  485. package/dist/utils/filtering/HybridFilteringStrategy.js +55 -0
  486. package/dist/utils/filtering/HybridFilteringStrategy.js.map +1 -0
  487. package/dist/utils/filtering/RestCrossProjectFilteringStrategy.d.ts +42 -0
  488. package/dist/utils/filtering/RestCrossProjectFilteringStrategy.d.ts.map +1 -0
  489. package/dist/utils/filtering/RestCrossProjectFilteringStrategy.js +120 -0
  490. package/dist/utils/filtering/RestCrossProjectFilteringStrategy.js.map +1 -0
  491. package/dist/utils/filtering/ServerSideFilteringStrategy.d.ts +13 -0
  492. package/dist/utils/filtering/ServerSideFilteringStrategy.d.ts.map +1 -0
  493. package/dist/utils/filtering/ServerSideFilteringStrategy.js +88 -0
  494. package/dist/utils/filtering/ServerSideFilteringStrategy.js.map +1 -0
  495. package/dist/utils/filtering/TaskFilteringStrategy.d.ts +19 -0
  496. package/dist/utils/filtering/TaskFilteringStrategy.d.ts.map +1 -0
  497. package/dist/utils/filtering/TaskFilteringStrategy.js +10 -0
  498. package/dist/utils/filtering/TaskFilteringStrategy.js.map +1 -0
  499. package/dist/utils/filtering/index.d.ts +14 -0
  500. package/dist/utils/filtering/index.d.ts.map +1 -0
  501. package/dist/utils/filtering/index.js +22 -0
  502. package/dist/utils/filtering/index.js.map +1 -0
  503. package/dist/utils/filtering/types.d.ts +108 -0
  504. package/dist/utils/filtering/types.d.ts.map +1 -0
  505. package/dist/utils/filtering/types.js +6 -0
  506. package/dist/utils/filtering/types.js.map +1 -0
  507. package/dist/utils/filters.d.ts +70 -0
  508. package/dist/utils/filters.d.ts.map +1 -0
  509. package/dist/utils/filters.js +812 -0
  510. package/dist/utils/filters.js.map +1 -0
  511. package/dist/utils/http-error-detail.d.ts +28 -0
  512. package/dist/utils/http-error-detail.d.ts.map +1 -0
  513. package/dist/utils/http-error-detail.js +67 -0
  514. package/dist/utils/http-error-detail.js.map +1 -0
  515. package/dist/utils/label-bulk.d.ts +21 -0
  516. package/dist/utils/label-bulk.d.ts.map +1 -0
  517. package/dist/utils/label-bulk.js +51 -0
  518. package/dist/utils/label-bulk.js.map +1 -0
  519. package/dist/utils/logger.d.ts +20 -0
  520. package/dist/utils/logger.d.ts.map +1 -0
  521. package/dist/utils/logger.js +66 -0
  522. package/dist/utils/logger.js.map +1 -0
  523. package/dist/utils/memory.d.ts +73 -0
  524. package/dist/utils/memory.d.ts.map +1 -0
  525. package/dist/utils/memory.js +194 -0
  526. package/dist/utils/memory.js.map +1 -0
  527. package/dist/utils/performance/batch-processor.d.ts +77 -0
  528. package/dist/utils/performance/batch-processor.d.ts.map +1 -0
  529. package/dist/utils/performance/batch-processor.js +218 -0
  530. package/dist/utils/performance/batch-processor.js.map +1 -0
  531. package/dist/utils/performance/index.d.ts +42 -0
  532. package/dist/utils/performance/index.d.ts.map +1 -0
  533. package/dist/utils/performance/index.js +49 -0
  534. package/dist/utils/performance/index.js.map +1 -0
  535. package/dist/utils/performance/performance-monitor.d.ts +116 -0
  536. package/dist/utils/performance/performance-monitor.d.ts.map +1 -0
  537. package/dist/utils/performance/performance-monitor.js +307 -0
  538. package/dist/utils/performance/performance-monitor.js.map +1 -0
  539. package/dist/utils/read-only.d.ts +111 -0
  540. package/dist/utils/read-only.d.ts.map +1 -0
  541. package/dist/utils/read-only.js +503 -0
  542. package/dist/utils/read-only.js.map +1 -0
  543. package/dist/utils/response-factory.d.ts +81 -0
  544. package/dist/utils/response-factory.d.ts.map +1 -0
  545. package/dist/utils/response-factory.js +86 -0
  546. package/dist/utils/response-factory.js.map +1 -0
  547. package/dist/utils/retry.d.ts +160 -0
  548. package/dist/utils/retry.d.ts.map +1 -0
  549. package/dist/utils/retry.js +316 -0
  550. package/dist/utils/retry.js.map +1 -0
  551. package/dist/utils/security.d.ts +70 -0
  552. package/dist/utils/security.d.ts.map +1 -0
  553. package/dist/utils/security.js +358 -0
  554. package/dist/utils/security.js.map +1 -0
  555. package/dist/utils/simple-response.d.ts +75 -0
  556. package/dist/utils/simple-response.d.ts.map +1 -0
  557. package/dist/utils/simple-response.js +311 -0
  558. package/dist/utils/simple-response.js.map +1 -0
  559. package/dist/utils/storage-errors.d.ts +9 -0
  560. package/dist/utils/storage-errors.d.ts.map +1 -0
  561. package/dist/utils/storage-errors.js +20 -0
  562. package/dist/utils/storage-errors.js.map +1 -0
  563. package/dist/utils/task-rest-transport.d.ts +28 -0
  564. package/dist/utils/task-rest-transport.d.ts.map +1 -0
  565. package/dist/utils/task-rest-transport.js +33 -0
  566. package/dist/utils/task-rest-transport.js.map +1 -0
  567. package/dist/utils/unicode-fix.d.ts +19 -0
  568. package/dist/utils/unicode-fix.d.ts.map +1 -0
  569. package/dist/utils/unicode-fix.js +70 -0
  570. package/dist/utils/unicode-fix.js.map +1 -0
  571. package/dist/utils/validation.d.ts +75 -0
  572. package/dist/utils/validation.d.ts.map +1 -0
  573. package/dist/utils/validation.js +758 -0
  574. package/dist/utils/validation.js.map +1 -0
  575. package/dist/utils/vikunja-rest.d.ts +159 -0
  576. package/dist/utils/vikunja-rest.d.ts.map +1 -0
  577. package/dist/utils/vikunja-rest.js +378 -0
  578. package/dist/utils/vikunja-rest.js.map +1 -0
  579. package/docs/CONFIGURATION.md +957 -0
  580. package/docs/DOCKER-DESKTOP-MCP.md +207 -0
  581. package/docs/TOOLS.md +422 -0
  582. package/package.json +145 -0
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ /**
3
+ * Comment operations service
4
+ * Handles core business logic for task comment management
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.CommentOperationsService = void 0;
8
+ const vikunja_rest_1 = require("../../../utils/vikunja-rest");
9
+ /**
10
+ * Maps the REST response shape (`models.TaskComment`, no `task_id`) onto
11
+ * this codebase's local `TaskComment` type (which carries `task_id` for
12
+ * caller convenience). `task_id` is always known from the URL path the
13
+ * request was made against, so it's injected here rather than expected on
14
+ * the wire.
15
+ */
16
+ function toTaskComment(taskId, raw) {
17
+ const comment = {
18
+ task_id: taskId,
19
+ comment: raw.comment ?? '',
20
+ };
21
+ if (raw.id !== undefined)
22
+ comment.id = raw.id;
23
+ if (raw.author !== undefined) {
24
+ comment.author = raw.author;
25
+ }
26
+ if (raw.created !== undefined)
27
+ comment.created = raw.created;
28
+ if (raw.updated !== undefined)
29
+ comment.updated = raw.updated;
30
+ return comment;
31
+ }
32
+ /**
33
+ * Service for managing task comment operations
34
+ */
35
+ exports.CommentOperationsService = {
36
+ /**
37
+ * Create a new comment on a task via `PUT /tasks/{taskID}/comments`. The
38
+ * request body is `models.TaskComment`, which per the spec carries only
39
+ * `comment` as a writable field (`task_id` comes from the URL, not the
40
+ * body).
41
+ */
42
+ async createComment(authManager, taskId, commentText) {
43
+ const result = await (0, vikunja_rest_1.vikunjaRestRequest)(authManager, 'PUT', `/tasks/${taskId}/comments`, { comment: commentText });
44
+ return toTaskComment(taskId, result);
45
+ },
46
+ /**
47
+ * Fetch all comments for a task via `GET /tasks/{taskID}/comments`.
48
+ */
49
+ async fetchTaskComments(authManager, taskId) {
50
+ const result = await (0, vikunja_rest_1.vikunjaRestRequest)(authManager, 'GET', `/tasks/${taskId}/comments`);
51
+ return (Array.isArray(result) ? result : []).map((comment) => toTaskComment(taskId, comment));
52
+ },
53
+ /**
54
+ * Fetch a single comment on a task via
55
+ * `GET /tasks/{taskID}/comments/{commentID}`.
56
+ */
57
+ async getComment(authManager, taskId, commentId) {
58
+ const result = await (0, vikunja_rest_1.vikunjaRestRequest)(authManager, 'GET', `/tasks/${taskId}/comments/${commentId}`);
59
+ return toTaskComment(taskId, result);
60
+ },
61
+ /**
62
+ * Update an existing comment on a task via
63
+ * `POST /tasks/{taskID}/comments/{commentID}`. The spec omits an explicit
64
+ * body schema for this endpoint's parameters, but its behavior mirrors the
65
+ * create endpoint's `models.TaskComment` — only `comment` is sent.
66
+ */
67
+ async updateComment(authManager, taskId, commentId, commentText) {
68
+ const result = await (0, vikunja_rest_1.vikunjaRestRequest)(authManager, 'POST', `/tasks/${taskId}/comments/${commentId}`, { comment: commentText });
69
+ return toTaskComment(taskId, result);
70
+ },
71
+ /**
72
+ * Delete a comment from a task via
73
+ * `DELETE /tasks/{taskID}/comments/{commentID}`.
74
+ */
75
+ async deleteComment(authManager, taskId, commentId) {
76
+ const result = await (0, vikunja_rest_1.vikunjaRestRequest)(authManager, 'DELETE', `/tasks/${taskId}/comments/${commentId}`);
77
+ return result ?? { message: 'Successfully deleted.' };
78
+ },
79
+ /**
80
+ * Get comment count from comments array
81
+ */
82
+ getCommentCount(comments) {
83
+ return comments.length;
84
+ },
85
+ };
86
+ //# sourceMappingURL=CommentOperationsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentOperationsService.js","sourceRoot":"","sources":["../../../../src/tools/tasks/comments/CommentOperationsService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,8DAAiE;AAMjE;;;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OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChG,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU,CACd,WAAwB,EACxB,MAAc,EACd,SAAiB;QAEjB,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAkB,EACrC,WAAW,EACX,KAAK,EACL,UAAU,MAAM,aAAa,SAAS,EAAE,CACzC,CAAC;QACF,OAAO,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,WAAwB,EACxB,MAAc,EACd,SAAiB,EACjB,WAAmB;QAEnB,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAkB,EACrC,WAAW,EACX,MAAM,EACN,UAAU,MAAM,aAAa,SAAS,EAAE,EACxC,EAAE,OAAO,EAAE,WAAW,EAAE,CACzB,CAAC;QACF,OAAO,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,aAAa,CACjB,WAAwB,EACxB,MAAc,EACd,SAAiB;QAEjB,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAkB,EACrC,WAAW,EACX,QAAQ,EACR,UAAU,MAAM,aAAa,SAAS,EAAE,CACzC,CAAC;QACF,OAAO,MAAM,IAAI,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,QAAuB;QACrC,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;CACF,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Comment response formatter service
3
+ * Handles response formatting for comment operations
4
+ */
5
+ import type { StandardTaskResponse } from '../../../types';
6
+ import type { TaskComment } from '../../../types/vikunja';
7
+ /**
8
+ * Service for formatting comment operation responses
9
+ */
10
+ export declare const commentResponseFormatter: {
11
+ /**
12
+ * Format successful comment creation response
13
+ */
14
+ formatCreateCommentResponse(comment: TaskComment): StandardTaskResponse;
15
+ /**
16
+ * Format successful comment list response
17
+ */
18
+ formatListCommentsResponse(comments: TaskComment[]): StandardTaskResponse;
19
+ /**
20
+ * Format successful single-comment fetch response
21
+ */
22
+ formatGetCommentResponse(comment: TaskComment): StandardTaskResponse;
23
+ /**
24
+ * Format successful comment update response
25
+ */
26
+ formatUpdateCommentResponse(comment: TaskComment): StandardTaskResponse;
27
+ /**
28
+ * Format successful comment delete response
29
+ */
30
+ formatDeleteCommentResponse(taskId: number, commentId: number): StandardTaskResponse;
31
+ /**
32
+ * Format MCP response wrapper
33
+ */
34
+ formatMcpResponse(response: StandardTaskResponse): {
35
+ content: Array<{
36
+ type: "text";
37
+ text: string;
38
+ }>;
39
+ };
40
+ };
41
+ //# sourceMappingURL=CommentResponseFormatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentResponseFormatter.d.ts","sourceRoot":"","sources":["../../../../src/tools/tasks/comments/CommentResponseFormatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;GAEG;AACH,eAAO,MAAM,wBAAwB;IACnC;;OAEG;yCACkC,WAAW,GAAG,oBAAoB;IAYvE;;OAEG;yCACkC,WAAW,EAAE,GAAG,oBAAoB;IAazE;;OAEG;sCAC+B,WAAW,GAAG,oBAAoB;IAYpE;;OAEG;yCACkC,WAAW,GAAG,oBAAoB;IAavE;;OAEG;wCACiC,MAAM,aAAa,MAAM,GAAG,oBAAoB;IAWpF;;OAEG;gCACyB,oBAAoB,GAAG;QAAE,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;CA+BtG,CAAC"}
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ /**
3
+ * Comment response formatter service
4
+ * Handles response formatting for comment operations
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.commentResponseFormatter = void 0;
8
+ const types_1 = require("../../../types");
9
+ const response_factory_1 = require("../../../utils/response-factory");
10
+ /**
11
+ * Service for formatting comment operation responses
12
+ */
13
+ exports.commentResponseFormatter = {
14
+ /**
15
+ * Format successful comment creation response
16
+ */
17
+ formatCreateCommentResponse(comment) {
18
+ return {
19
+ success: true,
20
+ operation: 'comment',
21
+ message: 'Comment added successfully',
22
+ comment: comment,
23
+ metadata: {
24
+ timestamp: new Date().toISOString(),
25
+ },
26
+ };
27
+ },
28
+ /**
29
+ * Format successful comment list response
30
+ */
31
+ formatListCommentsResponse(comments) {
32
+ return {
33
+ success: true,
34
+ operation: 'list',
35
+ message: `Found ${comments.length} comments`,
36
+ comments: comments,
37
+ metadata: {
38
+ timestamp: new Date().toISOString(),
39
+ count: comments.length,
40
+ },
41
+ };
42
+ },
43
+ /**
44
+ * Format successful single-comment fetch response
45
+ */
46
+ formatGetCommentResponse(comment) {
47
+ return {
48
+ success: true,
49
+ operation: 'get',
50
+ message: 'Comment retrieved successfully',
51
+ comment: comment,
52
+ metadata: {
53
+ timestamp: new Date().toISOString(),
54
+ },
55
+ };
56
+ },
57
+ /**
58
+ * Format successful comment update response
59
+ */
60
+ formatUpdateCommentResponse(comment) {
61
+ return {
62
+ success: true,
63
+ operation: 'update',
64
+ message: 'Comment updated successfully',
65
+ comment: comment,
66
+ metadata: {
67
+ timestamp: new Date().toISOString(),
68
+ affectedFields: ['comment'],
69
+ },
70
+ };
71
+ },
72
+ /**
73
+ * Format successful comment delete response
74
+ */
75
+ formatDeleteCommentResponse(taskId, commentId) {
76
+ return {
77
+ success: true,
78
+ operation: 'delete',
79
+ message: `Comment ${commentId} deleted from task ${taskId}`,
80
+ metadata: {
81
+ timestamp: new Date().toISOString(),
82
+ },
83
+ };
84
+ },
85
+ /**
86
+ * Format MCP response wrapper
87
+ */
88
+ formatMcpResponse(response) {
89
+ // Handle metadata properly to avoid type issues
90
+ const safeMetadata = {
91
+ timestamp: response.metadata?.timestamp || new Date().toISOString(),
92
+ ...(response.metadata?.count !== undefined ? { count: response.metadata.count } : {}),
93
+ ...(response.metadata?.affectedFields ? { affectedFields: response.metadata.affectedFields } : {}),
94
+ // Convert previousState to proper Record<string, unknown> if it exists
95
+ ...(response.metadata?.previousState && typeof response.metadata.previousState === 'object' && response.metadata.previousState !== null
96
+ ? { previousState: response.metadata.previousState }
97
+ : {})
98
+ };
99
+ const aorpResponse = (0, types_1.createStandardResponse)(response.operation || 'unknown', response.message || 'Operation completed',
100
+ // StandardTaskResponse carries the generated `models.Task` (all fields
101
+ // spec-optional); the formatter's `ResponseData` wants the local `Task`.
102
+ // The formatter reads fields defensively, so narrow via the param type.
103
+ response, safeMetadata);
104
+ return {
105
+ content: [
106
+ {
107
+ type: 'text',
108
+ text: (0, response_factory_1.formatAorpAsMarkdown)(aorpResponse), // Format AORP response as markdown
109
+ },
110
+ ],
111
+ };
112
+ }
113
+ };
114
+ //# sourceMappingURL=CommentResponseFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentResponseFormatter.js","sourceRoot":"","sources":["../../../../src/tools/tasks/comments/CommentResponseFormatter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,0CAAwD;AACxD,sEAAuE;AAEvE;;GAEG;AACU,QAAA,wBAAwB,GAAG;IACtC;;OAEG;IACH,2BAA2B,CAAC,OAAoB;QAC9C,OAAO;YACL,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,4BAA4B;YACrC,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE;gBACR,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,0BAA0B,CAAC,QAAuB;QAChD,OAAO;YACL,OAAO,EA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,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrF,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClG,uEAAuE;YACvE,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,IAAI,OAAO,QAAQ,CAAC,QAAQ,CAAC,aAAa,KAAK,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,aAAa,KAAK,IAAI;gBACrI,CAAC,CAAC,EAAE,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAwC,EAAE;gBAC/E,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;QAEF,MAAM,YAAY,GAAG,IAAA,8BAAsB,EACzC,QAAQ,CAAC,SAAS,IAAI,SAAS,EAC/B,QAAQ,CAAC,OAAO,IAAI,qBAAqB;QACzC,uEAAuE;QACvE,yEAAyE;QACzE,wEAAwE;QACxE,QAAmE,EACnE,YAAY,CACb,CAAC;QAEF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAA,uCAAoB,EAAC,YAAY,CAAC,EAAE,mCAAmC;iBAC9E;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Comment validation service
3
+ * Handles input validation for comment operations
4
+ */
5
+ export interface CommentOperationInput {
6
+ id?: number | undefined;
7
+ comment?: string | undefined;
8
+ }
9
+ export interface CommentByIdInput {
10
+ id?: number | undefined;
11
+ commentId?: number | undefined;
12
+ }
13
+ export interface CommentUpdateInput extends CommentByIdInput {
14
+ comment?: string | undefined;
15
+ }
16
+ /**
17
+ * Service for validating comment operation inputs
18
+ */
19
+ export declare const commentValidationService: {
20
+ /**
21
+ * Validate input for comment operations (create or list)
22
+ */
23
+ validateCommentInput(args: CommentOperationInput): {
24
+ taskId: number;
25
+ commentText?: string;
26
+ };
27
+ /**
28
+ * Validate input specifically for listing comments
29
+ */
30
+ validateListInput(args: {
31
+ id?: number | undefined;
32
+ }): {
33
+ taskId: number;
34
+ };
35
+ /**
36
+ * Validate input for a single-comment read operation (taskId + commentId)
37
+ */
38
+ validateGetInput(args: CommentByIdInput): {
39
+ taskId: number;
40
+ commentId: number;
41
+ };
42
+ /**
43
+ * Validate input for an update operation (taskId + commentId + non-empty text)
44
+ */
45
+ validateUpdateInput(args: CommentUpdateInput): {
46
+ taskId: number;
47
+ commentId: number;
48
+ commentText: string;
49
+ };
50
+ /**
51
+ * Validate input for a delete operation (taskId + commentId)
52
+ */
53
+ validateDeleteInput(args: CommentByIdInput): {
54
+ taskId: number;
55
+ commentId: number;
56
+ };
57
+ /**
58
+ * Check if operation should create a comment or list comments
59
+ */
60
+ shouldCreateComment(commentText?: string): boolean;
61
+ };
62
+ //# sourceMappingURL=CommentValidationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentValidationService.d.ts","sourceRoot":"","sources":["../../../../src/tools/tasks/comments/CommentValidationService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,qBAAqB;IACpC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB;IACnC;;OAEG;+BACwB,qBAAqB,GAAG;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;IAkB3F;;OAEG;4BACqB;QAAE,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;IAcxE;;OAEG;2BACoB,gBAAgB,GAAG;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAuB/E;;OAEG;8BACuB,kBAAkB,GAAG;QAC7C,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;KACrB;IA+BD;;OAEG;8BACuB,gBAAgB,GAAG;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAuBlF;;OAEG;sCAC+B,MAAM,GAAG,OAAO;CAGnD,CAAC"}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ /**
3
+ * Comment validation service
4
+ * Handles input validation for comment operations
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.commentValidationService = void 0;
8
+ const types_1 = require("../../../types");
9
+ const validation_1 = require("../validation");
10
+ /**
11
+ * Service for validating comment operation inputs
12
+ */
13
+ exports.commentValidationService = {
14
+ /**
15
+ * Validate input for comment operations (create or list)
16
+ */
17
+ validateCommentInput(args) {
18
+ if (!args.id) {
19
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Task id is required for comment operation');
20
+ }
21
+ (0, validation_1.validateId)(args.id, 'id');
22
+ // Build return object, only including defined properties to satisfy exactOptionalPropertyTypes
23
+ const result = {
24
+ taskId: args.id,
25
+ };
26
+ if (args.comment !== undefined) {
27
+ result.commentText = args.comment;
28
+ }
29
+ return result;
30
+ },
31
+ /**
32
+ * Validate input specifically for listing comments
33
+ */
34
+ validateListInput(args) {
35
+ if (!args.id) {
36
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Task id is required for list-comments operation');
37
+ }
38
+ (0, validation_1.validateId)(args.id, 'id');
39
+ return {
40
+ taskId: args.id,
41
+ };
42
+ },
43
+ /**
44
+ * Validate input for a single-comment read operation (taskId + commentId)
45
+ */
46
+ validateGetInput(args) {
47
+ if (!args.id) {
48
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Task id is required for get-comment operation');
49
+ }
50
+ (0, validation_1.validateId)(args.id, 'id');
51
+ if (!args.commentId) {
52
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Comment id is required for get-comment operation');
53
+ }
54
+ (0, validation_1.validateId)(args.commentId, 'commentId');
55
+ return {
56
+ taskId: args.id,
57
+ commentId: args.commentId,
58
+ };
59
+ },
60
+ /**
61
+ * Validate input for an update operation (taskId + commentId + non-empty text)
62
+ */
63
+ validateUpdateInput(args) {
64
+ if (!args.id) {
65
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Task id is required for update-comment operation');
66
+ }
67
+ (0, validation_1.validateId)(args.id, 'id');
68
+ if (!args.commentId) {
69
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Comment id is required for update-comment operation');
70
+ }
71
+ (0, validation_1.validateId)(args.commentId, 'commentId');
72
+ if (args.comment === undefined || args.comment.trim() === '') {
73
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Comment text is required for update-comment operation');
74
+ }
75
+ return {
76
+ taskId: args.id,
77
+ commentId: args.commentId,
78
+ commentText: args.comment,
79
+ };
80
+ },
81
+ /**
82
+ * Validate input for a delete operation (taskId + commentId)
83
+ */
84
+ validateDeleteInput(args) {
85
+ if (!args.id) {
86
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Task id is required for delete-comment operation');
87
+ }
88
+ (0, validation_1.validateId)(args.id, 'id');
89
+ if (!args.commentId) {
90
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Comment id is required for delete-comment operation');
91
+ }
92
+ (0, validation_1.validateId)(args.commentId, 'commentId');
93
+ return {
94
+ taskId: args.id,
95
+ commentId: args.commentId,
96
+ };
97
+ },
98
+ /**
99
+ * Check if operation should create a comment or list comments
100
+ */
101
+ shouldCreateComment(commentText) {
102
+ return commentText !== undefined && commentText.trim() !== '';
103
+ }
104
+ };
105
+ //# sourceMappingURL=CommentValidationService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentValidationService.js","sourceRoot":"","sources":["../../../../src/tools/tasks/comments/CommentValidationService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,0CAAqD;AACrD,8CAA2C;AAgB3C;;GAEG;AACU,QAAA,wBAAwB,GAAG;IACtC;;OAEG;IACH,oBAAoB,CAAC,IAA2B;QAC9C,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,gBAAQ,CAAC,iBAAS,CAAC,gBAAgB,EAAE,2CAA2C,CAAC,CAAC;QAC9F,CAAC;QACD,IAAA,uBAAU,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAE1B,+FAA+F;QAC/F,MAAM,MAAM,GAA6C;YACvD,MAAM,EAAE,IAAI,CAAC,EAAE;SAChB,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;QACpC,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,IAAiC;QACjD,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,gBAAgB,EAC1B,iDAAiD,CAClD,CAAC;QACJ,CAAC;QACD,IAAA,uBAAU,EAAC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AE,CAAC;YAC7D,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,gBAAgB,EAC1B,uDAAuD,CACxD,CAAC;QACJ,CAAC;QAED,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,OAAO;SAC1B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,IAAsB;QACxC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,gBAAgB,EAC1B,kDAAkD,CACnD,CAAC;QACJ,CAAC;QACD,IAAA,uBAAU,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAE1B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,gBAAgB,EAC1B,qDAAqD,CACtD,CAAC;QACJ,CAAC;QACD,IAAA,uBAAU,EAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAExC,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,WAAoB;QACtC,OAAO,WAAW,KAAK,SAAS,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;IAChE,CAAC;CACF,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Comment operations for tasks
3
+ * Refactored to use modular service architecture
4
+ */
5
+ import type { AuthManager } from '../../../auth/AuthManager';
6
+ /**
7
+ * Add a comment to a task or list task comments
8
+ */
9
+ export declare function handleComment(args: {
10
+ id?: number | undefined;
11
+ comment?: string | undefined;
12
+ }, authManager: AuthManager): Promise<{
13
+ content: Array<{
14
+ type: 'text';
15
+ text: string;
16
+ }>;
17
+ }>;
18
+ /**
19
+ * List all comments for a task
20
+ */
21
+ export declare function listComments(args: {
22
+ id?: number | undefined;
23
+ }, authManager: AuthManager): Promise<{
24
+ content: Array<{
25
+ type: 'text';
26
+ text: string;
27
+ }>;
28
+ }>;
29
+ /**
30
+ * Fetch a single comment by id
31
+ */
32
+ export declare function getComment(args: {
33
+ id?: number | undefined;
34
+ commentId?: number | undefined;
35
+ }, authManager: AuthManager): Promise<{
36
+ content: Array<{
37
+ type: 'text';
38
+ text: string;
39
+ }>;
40
+ }>;
41
+ /**
42
+ * Update the text of an existing comment
43
+ */
44
+ export declare function updateComment(args: {
45
+ id?: number | undefined;
46
+ commentId?: number | undefined;
47
+ comment?: string | undefined;
48
+ }, authManager: AuthManager): Promise<{
49
+ content: Array<{
50
+ type: 'text';
51
+ text: string;
52
+ }>;
53
+ }>;
54
+ /**
55
+ * Remove a comment from a task
56
+ */
57
+ export declare function removeComment(args: {
58
+ id?: number | undefined;
59
+ commentId?: number | undefined;
60
+ }, authManager: AuthManager): Promise<{
61
+ content: Array<{
62
+ type: 'text';
63
+ text: string;
64
+ }>;
65
+ }>;
66
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/tasks/comments/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAK7D;;GAEG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE;IACJ,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,EACD,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA6B7D;AAED;;GAEG;AACH,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KAAE,CAAC,CAAA;CAAE,CAAC,CAc7D"}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ /**
3
+ * Comment operations for tasks
4
+ * Refactored to use modular service architecture
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.handleComment = handleComment;
8
+ exports.listComments = listComments;
9
+ exports.getComment = getComment;
10
+ exports.updateComment = updateComment;
11
+ exports.removeComment = removeComment;
12
+ const types_1 = require("../../../types");
13
+ const CommentOperationsService_1 = require("./CommentOperationsService");
14
+ const CommentValidationService_1 = require("./CommentValidationService");
15
+ const CommentResponseFormatter_1 = require("./CommentResponseFormatter");
16
+ /**
17
+ * Add a comment to a task or list task comments
18
+ */
19
+ async function handleComment(args, authManager) {
20
+ try {
21
+ const { taskId, commentText } = CommentValidationService_1.commentValidationService.validateCommentInput(args);
22
+ // If no comment text provided, list comments
23
+ if (!CommentValidationService_1.commentValidationService.shouldCreateComment(commentText)) {
24
+ const comments = await CommentOperationsService_1.CommentOperationsService.fetchTaskComments(authManager, taskId);
25
+ // Format and return response
26
+ const response = CommentResponseFormatter_1.commentResponseFormatter.formatListCommentsResponse(comments);
27
+ return CommentResponseFormatter_1.commentResponseFormatter.formatMcpResponse(response);
28
+ }
29
+ // Create a new comment
30
+ if (!commentText) {
31
+ throw new types_1.MCPError(types_1.ErrorCode.VALIDATION_ERROR, 'Comment text is required for comment creation');
32
+ }
33
+ const newComment = await CommentOperationsService_1.CommentOperationsService.createComment(authManager, taskId, commentText);
34
+ // Format and return response
35
+ const response = CommentResponseFormatter_1.commentResponseFormatter.formatCreateCommentResponse(newComment);
36
+ return CommentResponseFormatter_1.commentResponseFormatter.formatMcpResponse(response);
37
+ }
38
+ catch (error) {
39
+ throw new types_1.MCPError(types_1.ErrorCode.API_ERROR, `Failed to handle comment: ${error instanceof Error ? error.message : String(error)}`);
40
+ }
41
+ }
42
+ /**
43
+ * List all comments for a task
44
+ */
45
+ async function listComments(args, authManager) {
46
+ try {
47
+ const { taskId } = CommentValidationService_1.commentValidationService.validateListInput(args);
48
+ const comments = await CommentOperationsService_1.CommentOperationsService.fetchTaskComments(authManager, taskId);
49
+ // Format and return response
50
+ const response = CommentResponseFormatter_1.commentResponseFormatter.formatListCommentsResponse(comments);
51
+ return CommentResponseFormatter_1.commentResponseFormatter.formatMcpResponse(response);
52
+ }
53
+ catch (error) {
54
+ throw new types_1.MCPError(types_1.ErrorCode.API_ERROR, `Failed to list comments: ${error instanceof Error ? error.message : String(error)}`);
55
+ }
56
+ }
57
+ /**
58
+ * Fetch a single comment by id
59
+ */
60
+ async function getComment(args, authManager) {
61
+ try {
62
+ const { taskId, commentId } = CommentValidationService_1.commentValidationService.validateGetInput(args);
63
+ const comment = await CommentOperationsService_1.CommentOperationsService.getComment(authManager, taskId, commentId);
64
+ const response = CommentResponseFormatter_1.commentResponseFormatter.formatGetCommentResponse(comment);
65
+ return CommentResponseFormatter_1.commentResponseFormatter.formatMcpResponse(response);
66
+ }
67
+ catch (error) {
68
+ throw new types_1.MCPError(types_1.ErrorCode.API_ERROR, `Failed to get comment: ${error instanceof Error ? error.message : String(error)}`);
69
+ }
70
+ }
71
+ /**
72
+ * Update the text of an existing comment
73
+ */
74
+ async function updateComment(args, authManager) {
75
+ try {
76
+ const { taskId, commentId, commentText } = CommentValidationService_1.commentValidationService.validateUpdateInput(args);
77
+ const updated = await CommentOperationsService_1.CommentOperationsService.updateComment(authManager, taskId, commentId, commentText);
78
+ const response = CommentResponseFormatter_1.commentResponseFormatter.formatUpdateCommentResponse(updated);
79
+ return CommentResponseFormatter_1.commentResponseFormatter.formatMcpResponse(response);
80
+ }
81
+ catch (error) {
82
+ throw new types_1.MCPError(types_1.ErrorCode.API_ERROR, `Failed to update comment: ${error instanceof Error ? error.message : String(error)}`);
83
+ }
84
+ }
85
+ /**
86
+ * Remove a comment from a task
87
+ */
88
+ async function removeComment(args, authManager) {
89
+ try {
90
+ const { taskId, commentId } = CommentValidationService_1.commentValidationService.validateDeleteInput(args);
91
+ await CommentOperationsService_1.CommentOperationsService.deleteComment(authManager, taskId, commentId);
92
+ const response = CommentResponseFormatter_1.commentResponseFormatter.formatDeleteCommentResponse(taskId, commentId);
93
+ return CommentResponseFormatter_1.commentResponseFormatter.formatMcpResponse(response);
94
+ }
95
+ catch (error) {
96
+ throw new types_1.MCPError(types_1.ErrorCode.API_ERROR, `Failed to delete comment: ${error instanceof Error ? error.message : String(error)}`);
97
+ }
98
+ }
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/tasks/comments/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAWH,sCAmCC;AAKD,oCAqBC;AAKD,gCAoBC;AAKD,sCA0BC;AAKD,sCAoBC;AAvJD,0CAAqD;AAErD,yEAAsE;AACtE,yEAAsE;AACtE,yEAAsE;AAEtE;;GAEG;AACI,KAAK,UAAU,aAAa,CACjC,IAGC,EACD,WAAwB;IAExB,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,mDAAwB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAEpF,6CAA6C;QAC7C,IAAI,CAAC,mDAAwB,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/D,MAAM,QAAQ,GAAG,MAAM,mDAAwB,CAAC,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YAEvF,6BAA6B;YAC7B,MAAM,QAAQ,GAAG,mDAAwB,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC;YAC/E,OAAO,mDAAwB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC9D,CAAC;QAED,uBAAuB;QACvB,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,gBAAQ,CAAC,iBAAS,CAAC,gBAAgB,EAAE,+CAA+C,CAAC,CAAC;QAClG,CAAC;QACD,MAAM,UAAU,GAAG,MAAM,mDA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CACjC,IAGC,EACD,WAAwB;IAExB,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,mDAAwB,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAEjF,MAAM,mDAAwB,CAAC,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QAE7E,MAAM,QAAQ,GAAG,mDAAwB,CAAC,2BAA2B,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACzF,OAAO,mDAAwB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,SAAS,EACnB,6BAA6B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACtF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Constants for task operations
3
+ */
4
+ export declare const AUTH_ERROR_MESSAGES: {
5
+ ASSIGNEE_CREATE: string;
6
+ ASSIGNEE_UPDATE: string;
7
+ ASSIGNEE_ASSIGN: string;
8
+ ASSIGNEE_REMOVE: string;
9
+ ASSIGNEE_REMOVE_PARTIAL: string;
10
+ ASSIGNEE_BULK_UPDATE: string;
11
+ LABEL_CREATE: string;
12
+ LABEL_UPDATE: string;
13
+ };
14
+ export declare const BULK_OPERATION_BATCH_SIZE = 10;
15
+ export declare const MAX_BULK_OPERATION_TASKS = 100;
16
+ export declare const REPEAT_MODE_MAP: Record<string, number>;
17
+ export declare const VALID_SORT_FIELDS: readonly ["id", "title", "description", "done", "done_at", "due_date", "created_by_id", "project_id", "repeat_after", "priority", "start_date", "end_date", "hex_color", "percent_done", "uid", "created", "updated", "relevance"];
18
+ export declare const SORT_FIELD_ALIASES: Record<string, string>;
19
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/tasks/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,mBAAmB;;;;;;;;;CAyB/B,CAAC;AAGF,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAI5C,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIzC,CAAC;AAWX,eAAO,MAAM,iBAAiB,oOAmBpB,CAAC;AAQX,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAU5C,CAAC"}