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
+ * Simple Response Factory
4
+ * Replaces 2,925-line AORP system with clean, direct response formatting
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.createSimpleResponse = createSimpleResponse;
8
+ exports.createAorpResponse = createSimpleResponse;
9
+ exports.formatResponseForMcp = formatResponseForMcp;
10
+ exports.formatAorpAsMarkdown = formatResponseForMcp;
11
+ exports.createTaskResponse = createTaskResponse;
12
+ exports.createStandardResponse = createTaskResponse;
13
+ exports.createTaskAorpResponse = createTaskResponse;
14
+ exports.createSimpleErrorResponse = createSimpleErrorResponse;
15
+ exports.createAorpErrorResponse = createSimpleErrorResponse;
16
+ exports.createAorpFromData = createAorpFromData;
17
+ const simple_response_1 = require("./simple-response");
18
+ /**
19
+ * Create a simple response (replaces createAorpResponse)
20
+ * Direct replacement for AORP factory functions
21
+ */
22
+ function createSimpleResponse(operation, message, data, options) {
23
+ const { success = true, metadata } = options || {};
24
+ if (success) {
25
+ return (0, simple_response_1.createSuccessResponse)(operation, message, data, {
26
+ timestamp: new Date().toISOString(),
27
+ success,
28
+ operation,
29
+ ...metadata,
30
+ });
31
+ }
32
+ else {
33
+ return (0, simple_response_1.createErrorResponse)(operation, message, 'OPERATION_FAILED', {
34
+ timestamp: new Date().toISOString(),
35
+ success: false,
36
+ operation,
37
+ ...metadata,
38
+ });
39
+ }
40
+ }
41
+ /**
42
+ * Format response for MCP (replaces AORP formatting)
43
+ */
44
+ function formatResponseForMcp(response) {
45
+ return response.content;
46
+ }
47
+ /**
48
+ * Create task response (replaces createTaskResponse)
49
+ * Now handles flexible data for backward compatibility
50
+ */
51
+ function createTaskResponse(operation, message, data, metadata, sessionId) {
52
+ // Handle both task data structure and arbitrary data objects
53
+ const responseData = data && typeof data === 'object' && 'tasks' in data ? data.tasks : data;
54
+ // Respect success flag from metadata, default to true
55
+ const successFlag = metadata?.success !== undefined ? metadata.success : true;
56
+ const responseMetadata = {
57
+ timestamp: new Date().toISOString(),
58
+ success: successFlag,
59
+ operation,
60
+ ...metadata,
61
+ };
62
+ if (sessionId !== undefined) {
63
+ responseMetadata.sessionId = sessionId;
64
+ }
65
+ // Use createErrorResponse for failed operations, createSuccessResponse for successful ones
66
+ if (successFlag) {
67
+ return (0, simple_response_1.createSuccessResponse)(operation, message, responseData, responseMetadata);
68
+ }
69
+ else {
70
+ return (0, simple_response_1.createErrorResponse)(operation, message, 'OPERATION_FAILED', responseMetadata);
71
+ }
72
+ }
73
+ /**
74
+ * Create error response (replaces createAorpErrorResponse)
75
+ */
76
+ function createSimpleErrorResponse(operation, message, errorCode = 'UNKNOWN_ERROR', metadata) {
77
+ return (0, simple_response_1.createErrorResponse)(operation, message, errorCode, metadata);
78
+ }
79
+ /**
80
+ * Create AORP response from data (compatibility function)
81
+ * Simple replacement for createAorpFromData
82
+ */
83
+ function createAorpFromData(operation, message, success = true, details) {
84
+ return createSimpleResponse(operation, details || message, undefined, { success });
85
+ }
86
+ //# sourceMappingURL=response-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-factory.js","sourceRoot":"","sources":["../../src/utils/response-factory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAoCH,oDA2BC;AAgEgC,kDAAkB;AA3DnD,oDAEC;AAsDgC,oDAAoB;AAhDrD,gDA8BC;AAe8B,oDAAsB;AACtB,oDAAsB;AAXrD,8DAOC;AAKqC,4DAAuB;AAa7D,gDAOC;AA7ID,uDAAoG;AA8BpG;;;GAGG;AACH,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G,QAAQ;KACZ,CAAC;IAEF,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,gBAAgB,CAAC,SAAS,GAAG,SAAS,CAAC;IACzC,CAAC;IAED,2FAA2F;IAC3F,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,IAAA,uCAAqB,EAAC,SAAS,EAAE,OAAO,EAAE,YAA4B,EAAE,gBAAgB,CAAC,CAAC;IACnG,CAAC;SAAM,CAAC;QACN,OAAO,IAAA,qCAAmB,EAAC,SAAS,EAAE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;IACvF,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,yBAAyB,CACvC,SAAiB,EACjB,OAAe,EACf,YAAoB,eAAe,EACnC,QAA2B;IAE3B,OAAO,IAAA,qCAAmB,EAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AACtE,CAAC;AAcD;;;GAGG;AACH,SAAgB,kBAAkB,CAChC,SAAiB,EACjB,OAAe,EACf,UAAmB,IAAI,EACvB,OAAgB;IAEhB,OAAO,oBAAoB,CAAC,SAAS,EAAE,OAAO,IAAI,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AACrF,CAAC"}
@@ -0,0 +1,160 @@
1
+ /**
2
+ * Production-Ready Retry with Opossum Circuit Breaker
3
+ * Replaces 374-line custom implementation with battle-tested patterns
4
+ */
5
+ import CircuitBreaker from 'opossum';
6
+ /**
7
+ * Simple circuit breaker registry for tracking and managing circuit breakers
8
+ */
9
+ declare class CircuitBreakerRegistry {
10
+ private breakers;
11
+ register(name: string, breaker: CircuitBreaker): void;
12
+ get(name: string): CircuitBreaker | undefined;
13
+ resetAll(): Promise<void>;
14
+ /**
15
+ * Shuts down and forgets every registered breaker, including its
16
+ * accumulated failure/success stats. `resetAll` only closes breakers that
17
+ * are currently open — it leaves their rolling stats intact, so a breaker
18
+ * that tripped once would still be closer to tripping again. Test suites
19
+ * that exercise `vikunjaRestRequest` (which registers a real, named
20
+ * breaker per endpoint group) need full isolation between test cases;
21
+ * this is that reset.
22
+ */
23
+ clear(): void;
24
+ getAllStats(): Record<string, unknown>;
25
+ getAllStatsSync(): Record<string, unknown>;
26
+ }
27
+ export declare const circuitBreakerRegistry: CircuitBreakerRegistry;
28
+ /**
29
+ * Interface for errors that have code properties (like Node.js system errors)
30
+ */
31
+ interface ErrorWithCode extends Error {
32
+ code?: string;
33
+ status?: number;
34
+ }
35
+ /**
36
+ * Simple retry configuration using opossum's built-in capabilities
37
+ */
38
+ export interface RetryOptions {
39
+ maxRetries?: number;
40
+ timeout?: number;
41
+ resetTimeout?: number;
42
+ errorThresholdPercentage?: number;
43
+ volumeThreshold?: number;
44
+ shouldRetry?: (error: Error | ErrorWithCode) => boolean;
45
+ initialDelay?: number;
46
+ backoffFactor?: number;
47
+ maxDelay?: number;
48
+ }
49
+ /**
50
+ * Simple circuit breaker factory using opossum directly.
51
+ *
52
+ * `operation` MUST be a stable function reference — not a closure captured
53
+ * per call-site invocation — because the registry caches the breaker (and
54
+ * therefore the action it was constructed with) by `name` and returns the
55
+ * cached instance on every subsequent call with that name, silently
56
+ * discarding whatever `operation` was passed that time. Passing a fresh
57
+ * closure each call under a shared/reused name was the exact bug fixed in
58
+ * the wave0 baseline (a later call's arguments got lost, and the FIRST
59
+ * closure ever registered under that name kept firing instead). Callers
60
+ * that need per-call arguments must give `operation` a signature that takes
61
+ * those arguments as parameters and pass them to `breaker.fire(...)` —
62
+ * never bake them into the closure.
63
+ */
64
+ export declare function createCircuitBreaker<TArgs extends unknown[], TR>(operation: (...args: TArgs) => Promise<TR>, name: string, options?: RetryOptions): CircuitBreaker<TArgs, TR>;
65
+ /**
66
+ * Execute operation with automatic retry and circuit breaking
67
+ */
68
+ export declare function withRetry<T>(operation: () => Promise<T>, options?: RetryOptions): Promise<T>;
69
+ /**
70
+ * Execute operation with named circuit breaker for stats
71
+ */
72
+ export declare function withNamedRetry<T>(operation: () => Promise<T>, name: string, options?: RetryOptions): Promise<T>;
73
+ /**
74
+ * Alias for withNamedRetry for backward compatibility
75
+ */
76
+ export declare const withCircuitBreaker: typeof withNamedRetry;
77
+ /**
78
+ * Get circuit breaker health stats
79
+ */
80
+ export declare function getHealthStats(breaker: CircuitBreaker): CircuitBreaker.Stats;
81
+ /**
82
+ * Check if error is retryable (basic implementation)
83
+ */
84
+ export declare function isRetryableError(error: unknown): error is ErrorWithCode;
85
+ /**
86
+ * Check if error is transient for circuit breaker purposes
87
+ */
88
+ export declare function isTransientError(error: unknown): error is ErrorWithCode;
89
+ /**
90
+ * Predefined retry configurations for different operation types
91
+ */
92
+ export declare const RETRY_CONFIG: {
93
+ readonly AUTH_ERRORS: {
94
+ readonly maxRetries: 3;
95
+ readonly initialDelay: 1000;
96
+ readonly maxDelay: 10000;
97
+ readonly backoffFactor: 2;
98
+ readonly enableCircuitBreaker: true;
99
+ readonly circuitBreakerName: "vikunja-auth-connect";
100
+ };
101
+ readonly NETWORK_ERRORS: {
102
+ readonly maxRetries: 5;
103
+ readonly initialDelay: 500;
104
+ readonly maxDelay: 30000;
105
+ readonly backoffFactor: 1.5;
106
+ readonly enableCircuitBreaker: true;
107
+ readonly circuitBreakerName: "vikunja-api-operations";
108
+ };
109
+ readonly TASK_OPERATIONS: {
110
+ readonly maxRetries: 3;
111
+ readonly initialDelay: 1000;
112
+ readonly maxDelay: 15000;
113
+ readonly backoffFactor: 2;
114
+ readonly enableCircuitBreaker: true;
115
+ readonly circuitBreakerName: "vikunja-task-create";
116
+ };
117
+ readonly BULK_OPERATIONS: {
118
+ readonly maxRetries: 2;
119
+ readonly initialDelay: 2000;
120
+ readonly maxDelay: 20000;
121
+ readonly backoffFactor: 1.5;
122
+ readonly enableCircuitBreaker: true;
123
+ readonly circuitBreakerName: "vikunja-bulk-operations";
124
+ };
125
+ };
126
+ /**
127
+ * Circuit breaker name constants for consistent naming across the application
128
+ */
129
+ export declare const CIRCUIT_BREAKER_NAMES: {
130
+ readonly AUTH_CONNECT: "vikunja-auth-connect";
131
+ readonly AUTH_REFRESH: "vikunja-auth-refresh";
132
+ readonly AUTH_STATUS: "vikunja-auth-status";
133
+ readonly API_OPERATIONS: "vikunja-api-operations";
134
+ readonly CLIENT_OPERATIONS: "vikunja-client-operations";
135
+ readonly FILTER_OPERATIONS: "vikunja-filter-operations";
136
+ readonly TASK_CREATE: "vikunja-task-create";
137
+ readonly TASK_UPDATE: "vikunja-task-update";
138
+ readonly TASK_DELETE: "vikunja-task-delete";
139
+ readonly TASK_GET: "vikunja-task-get";
140
+ readonly TASK_LIST: "vikunja-task-list";
141
+ readonly TASK_RELATIONS: "vikunja-task-relations";
142
+ readonly TASK_ASSIGNEES: "vikunja-task-assignees";
143
+ readonly TASK_LABELS: "vikunja-task-labels";
144
+ readonly PROJECT_CRUD: "vikunja-project-crud";
145
+ readonly PROJECT_HIERARCHY: "vikunja-project-hierarchy";
146
+ readonly PROJECT_SHARING: "vikunja-project-sharing";
147
+ readonly BULK_OPERATIONS: "vikunja-bulk-operations";
148
+ readonly BULK_IMPORT: "vikunja-bulk-import";
149
+ readonly BULK_EXPORT: "vikunja-bulk-export";
150
+ };
151
+ /**
152
+ * Execute task operations with task-specific circuit breaker
153
+ */
154
+ export declare function withTaskRetry<T>(operation: () => Promise<T>, operationType: 'create' | 'update' | 'delete' | 'get', options?: RetryOptions): Promise<T>;
155
+ /**
156
+ * Execute bulk operations with bulk-specific circuit breaker
157
+ */
158
+ export declare function withBulkRetry<T>(operation: () => Promise<T>, operationType: 'import' | 'export', options?: RetryOptions): Promise<T>;
159
+ export {};
160
+ //# sourceMappingURL=retry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,cAAc,MAAM,SAAS,CAAC;AAIrC;;GAEG;AACH,cAAM,sBAAsB;IAC1B,OAAO,CAAC,QAAQ,C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
+ /**
3
+ * Production-Ready Retry with Opossum Circuit Breaker
4
+ * Replaces 374-line custom implementation with battle-tested patterns
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.CIRCUIT_BREAKER_NAMES = exports.RETRY_CONFIG = exports.withCircuitBreaker = exports.circuitBreakerRegistry = void 0;
11
+ exports.createCircuitBreaker = createCircuitBreaker;
12
+ exports.withRetry = withRetry;
13
+ exports.withNamedRetry = withNamedRetry;
14
+ exports.getHealthStats = getHealthStats;
15
+ exports.isRetryableError = isRetryableError;
16
+ exports.isTransientError = isTransientError;
17
+ exports.withTaskRetry = withTaskRetry;
18
+ exports.withBulkRetry = withBulkRetry;
19
+ const opossum_1 = __importDefault(require("opossum"));
20
+ const logger_1 = require("./logger");
21
+ const auth_error_handler_1 = require("./auth-error-handler");
22
+ /**
23
+ * Simple circuit breaker registry for tracking and managing circuit breakers
24
+ */
25
+ class CircuitBreakerRegistry {
26
+ breakers = new Map();
27
+ register(name, breaker) {
28
+ this.breakers.set(name, breaker);
29
+ }
30
+ get(name) {
31
+ return this.breakers.get(name);
32
+ }
33
+ async resetAll() {
34
+ const promises = Array.from(this.breakers.values()).map(breaker => {
35
+ return new Promise((resolve) => {
36
+ if (breaker.opened) {
37
+ breaker.close();
38
+ }
39
+ resolve();
40
+ });
41
+ });
42
+ await Promise.all(promises);
43
+ }
44
+ /**
45
+ * Shuts down and forgets every registered breaker, including its
46
+ * accumulated failure/success stats. `resetAll` only closes breakers that
47
+ * are currently open — it leaves their rolling stats intact, so a breaker
48
+ * that tripped once would still be closer to tripping again. Test suites
49
+ * that exercise `vikunjaRestRequest` (which registers a real, named
50
+ * breaker per endpoint group) need full isolation between test cases;
51
+ * this is that reset.
52
+ */
53
+ clear() {
54
+ for (const breaker of this.breakers.values()) {
55
+ breaker.shutdown();
56
+ }
57
+ this.breakers.clear();
58
+ }
59
+ getAllStats() {
60
+ const stats = {};
61
+ for (const [name, breaker] of this.breakers.entries()) {
62
+ stats[name] = breaker.stats;
63
+ }
64
+ return stats;
65
+ }
66
+ getAllStatsSync() {
67
+ return this.getAllStats();
68
+ }
69
+ }
70
+ exports.circuitBreakerRegistry = new CircuitBreakerRegistry();
71
+ /**
72
+ * Resolves after `ms` milliseconds, via a `setTimeout` that is `.unref()`d
73
+ * (mirrors the pattern opossum itself uses for its own internal timers — see
74
+ * `node_modules/opossum/lib/circuit.js`/`status.js`). `withRetry`'s
75
+ * exponential backoff (below) is the only place this module schedules a
76
+ * real (non-breaker-owned) timer; without `.unref()` a pending backoff delay
77
+ * (up to `maxDelay`, 30s by default) counts as an active handle keeping the
78
+ * process — or a `jest --runInBand` run — alive even though nothing is
79
+ * actually waiting on it to fire. `.unref()` only affects whether the timer
80
+ * alone can keep the event loop alive; it still fires normally and this
81
+ * function still resolves at the same time either way.
82
+ */
83
+ function sleepUnref(ms) {
84
+ return new Promise((resolve) => {
85
+ const timer = setTimeout(resolve, ms);
86
+ // Guards environments where `setTimeout` doesn't return an unref-able
87
+ // handle (e.g. a DOM/browser global returning a plain number) — not
88
+ // expected here (`testEnvironment: 'node'`), but matches opossum's own
89
+ // defensive check rather than assuming Node's timer shape.
90
+ if (typeof timer.unref === 'function') {
91
+ timer.unref();
92
+ }
93
+ });
94
+ }
95
+ // Production-ready defaults
96
+ const DEFAULT_OPTIONS = {
97
+ maxRetries: 3,
98
+ timeout: 30000,
99
+ resetTimeout: 30000,
100
+ errorThresholdPercentage: 50,
101
+ volumeThreshold: 5,
102
+ initialDelay: 1000,
103
+ backoffFactor: 2,
104
+ maxDelay: 30000
105
+ };
106
+ /**
107
+ * Simple circuit breaker factory using opossum directly.
108
+ *
109
+ * `operation` MUST be a stable function reference — not a closure captured
110
+ * per call-site invocation — because the registry caches the breaker (and
111
+ * therefore the action it was constructed with) by `name` and returns the
112
+ * cached instance on every subsequent call with that name, silently
113
+ * discarding whatever `operation` was passed that time. Passing a fresh
114
+ * closure each call under a shared/reused name was the exact bug fixed in
115
+ * the wave0 baseline (a later call's arguments got lost, and the FIRST
116
+ * closure ever registered under that name kept firing instead). Callers
117
+ * that need per-call arguments must give `operation` a signature that takes
118
+ * those arguments as parameters and pass them to `breaker.fire(...)` —
119
+ * never bake them into the closure.
120
+ */
121
+ function createCircuitBreaker(operation, name, options = {}) {
122
+ // Check if a circuit breaker with this name already exists
123
+ const existingBreaker = exports.circuitBreakerRegistry.get(name);
124
+ if (existingBreaker) {
125
+ return existingBreaker;
126
+ }
127
+ const opts = { ...DEFAULT_OPTIONS, ...options };
128
+ const breaker = new opossum_1.default(operation, {
129
+ name,
130
+ timeout: opts.timeout,
131
+ resetTimeout: opts.resetTimeout,
132
+ errorThresholdPercentage: opts.errorThresholdPercentage,
133
+ volumeThreshold: opts.volumeThreshold
134
+ });
135
+ // Register with the global registry
136
+ exports.circuitBreakerRegistry.register(name, breaker);
137
+ // Essential logging only
138
+ breaker.on('open', () => logger_1.logger.warn(`Circuit breaker ${name} opened`));
139
+ breaker.on('close', () => logger_1.logger.info(`Circuit breaker ${name} closed`));
140
+ return breaker;
141
+ }
142
+ /**
143
+ * Execute operation with automatic retry and circuit breaking
144
+ */
145
+ async function withRetry(operation, options = {}) {
146
+ const opts = { ...DEFAULT_OPTIONS, ...options };
147
+ let lastError;
148
+ let delay = opts.initialDelay || 1000;
149
+ // `?? 3`, not `|| 3`: 0 is a meaningful, valid value ("don't retry at
150
+ // all") and must not be coerced to the default of 3 the way `||` would.
151
+ const maxRetries = opts.maxRetries ?? 3;
152
+ for (let attempt = 0; attempt <= maxRetries; attempt++) {
153
+ try {
154
+ // Execute the operation directly. Note: we intentionally do NOT wrap
155
+ // this in a name-cached circuit breaker here. The breaker registry
156
+ // caches breakers by name and opossum binds the action closure at
157
+ // construction time, so a shared 'anonymous' breaker would silently
158
+ // re-fire whichever operation first created it instead of this one.
159
+ // Callers that want circuit-breaker semantics should use
160
+ // withNamedRetry/withTaskRetry/withBulkRetry with a real, unique name.
161
+ return await operation();
162
+ }
163
+ catch (error) {
164
+ lastError = error;
165
+ // Check if we should retry this error
166
+ const shouldRetry = opts.shouldRetry
167
+ ? opts.shouldRetry(error)
168
+ : isRetryableError(error);
169
+ // If this is the last attempt or error is not retryable, throw
170
+ if (attempt === maxRetries || !shouldRetry) {
171
+ throw error;
172
+ }
173
+ // Log retry attempt
174
+ logger_1.logger.debug(`Retry attempt ${attempt + 1}/${maxRetries} after ${delay}ms`);
175
+ // Wait before retrying with exponential backoff
176
+ await sleepUnref(delay);
177
+ delay = Math.min(delay * (opts.backoffFactor || 2), opts.maxDelay || 30000);
178
+ }
179
+ }
180
+ throw lastError;
181
+ }
182
+ /**
183
+ * Execute operation with named circuit breaker for stats
184
+ */
185
+ async function withNamedRetry(operation, name, options = {}) {
186
+ const breaker = createCircuitBreaker(operation, name, options);
187
+ return breaker.fire();
188
+ }
189
+ /**
190
+ * Alias for withNamedRetry for backward compatibility
191
+ */
192
+ exports.withCircuitBreaker = withNamedRetry;
193
+ /**
194
+ * Get circuit breaker health stats
195
+ */
196
+ function getHealthStats(breaker) {
197
+ return breaker.stats;
198
+ }
199
+ /**
200
+ * Check if error is retryable (basic implementation)
201
+ */
202
+ function isRetryableError(error) {
203
+ if (error instanceof Error) {
204
+ // Authentication errors are retryable
205
+ if ((0, auth_error_handler_1.isAuthenticationError)(error)) {
206
+ return true;
207
+ }
208
+ const message = error.message.toLowerCase();
209
+ return message.includes('timeout') ||
210
+ message.includes('connection') ||
211
+ message.includes('network') ||
212
+ message.includes('rate limit') ||
213
+ error.code === 'ECONNRESET' ||
214
+ error.code === 'ETIMEDOUT';
215
+ }
216
+ return false;
217
+ }
218
+ /**
219
+ * Check if error is transient for circuit breaker purposes
220
+ */
221
+ function isTransientError(error) {
222
+ if (error instanceof Error) {
223
+ const message = error.message.toLowerCase();
224
+ return message.includes('timeout') ||
225
+ message.includes('timed out') ||
226
+ message.includes('connection') ||
227
+ message.includes('network') ||
228
+ message.includes('rate limit') ||
229
+ message.includes('socket') ||
230
+ message.includes('hang up') ||
231
+ message.includes('econnreset') ||
232
+ message.includes('etimedout') ||
233
+ message.includes('reset by peer') ||
234
+ message.includes('closed unexpectedly') ||
235
+ error.code === 'ECONNRESET' ||
236
+ error.code === 'ETIMEDOUT';
237
+ }
238
+ return false;
239
+ }
240
+ /**
241
+ * Predefined retry configurations for different operation types
242
+ */
243
+ exports.RETRY_CONFIG = {
244
+ AUTH_ERRORS: {
245
+ maxRetries: 3,
246
+ initialDelay: 1000,
247
+ maxDelay: 10000,
248
+ backoffFactor: 2,
249
+ enableCircuitBreaker: true,
250
+ circuitBreakerName: 'vikunja-auth-connect'
251
+ },
252
+ NETWORK_ERRORS: {
253
+ maxRetries: 5,
254
+ initialDelay: 500,
255
+ maxDelay: 30000,
256
+ backoffFactor: 1.5,
257
+ enableCircuitBreaker: true,
258
+ circuitBreakerName: 'vikunja-api-operations'
259
+ },
260
+ TASK_OPERATIONS: {
261
+ maxRetries: 3,
262
+ initialDelay: 1000,
263
+ maxDelay: 15000,
264
+ backoffFactor: 2,
265
+ enableCircuitBreaker: true,
266
+ circuitBreakerName: 'vikunja-task-create'
267
+ },
268
+ BULK_OPERATIONS: {
269
+ maxRetries: 2,
270
+ initialDelay: 2000,
271
+ maxDelay: 20000,
272
+ backoffFactor: 1.5,
273
+ enableCircuitBreaker: true,
274
+ circuitBreakerName: 'vikunja-bulk-operations'
275
+ }
276
+ };
277
+ /**
278
+ * Circuit breaker name constants for consistent naming across the application
279
+ */
280
+ exports.CIRCUIT_BREAKER_NAMES = {
281
+ AUTH_CONNECT: 'vikunja-auth-connect',
282
+ AUTH_REFRESH: 'vikunja-auth-refresh',
283
+ AUTH_STATUS: 'vikunja-auth-status',
284
+ API_OPERATIONS: 'vikunja-api-operations',
285
+ CLIENT_OPERATIONS: 'vikunja-client-operations',
286
+ FILTER_OPERATIONS: 'vikunja-filter-operations',
287
+ TASK_CREATE: 'vikunja-task-create',
288
+ TASK_UPDATE: 'vikunja-task-update',
289
+ TASK_DELETE: 'vikunja-task-delete',
290
+ TASK_GET: 'vikunja-task-get',
291
+ TASK_LIST: 'vikunja-task-list',
292
+ TASK_RELATIONS: 'vikunja-task-relations',
293
+ TASK_ASSIGNEES: 'vikunja-task-assignees',
294
+ TASK_LABELS: 'vikunja-task-labels',
295
+ PROJECT_CRUD: 'vikunja-project-crud',
296
+ PROJECT_HIERARCHY: 'vikunja-project-hierarchy',
297
+ PROJECT_SHARING: 'vikunja-project-sharing',
298
+ BULK_OPERATIONS: 'vikunja-bulk-operations',
299
+ BULK_IMPORT: 'vikunja-bulk-import',
300
+ BULK_EXPORT: 'vikunja-bulk-export'
301
+ };
302
+ /**
303
+ * Execute task operations with task-specific circuit breaker
304
+ */
305
+ async function withTaskRetry(operation, operationType, options = {}) {
306
+ const name = `vikunja-task-${operationType}`;
307
+ return withNamedRetry(operation, name, options);
308
+ }
309
+ /**
310
+ * Execute bulk operations with bulk-specific circuit breaker
311
+ */
312
+ async function withBulkRetry(operation, operationType, options = {}) {
313
+ const name = `vikunja-bulk-${operationType}`;
314
+ return withNamedRetry(operation, name, options);
315
+ }
316
+ //# sourceMappingURL=retry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AA0IH,oDA6BC;AAKD,8BA4CC;AAKD,wCAOC;AAUD,wCAEC;AAKD,4CAgBC;AAKD,4CAkBC;AAqED,sCAOC;AAKD,sCAOC;AAlXD,sDAAqC;AACrC,qCAAkC;AAClC,6DAA6D;AAE7D;;GAEG;AACH,MAAM,sBAAsB;IAClB,QAAQ,GAAG,IAAI,GAAG,EAA0B,CAAC;IAErD,QAAQ,CAAC,IAAY,EAAE,OAAuB;QAC5C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,GAAG,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,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Enhanced security utilities for comprehensive credential masking and sensitive data protection
3
+ * Prevents credential exposure in logs, monitoring systems, and error reports
4
+ *
5
+ * Security Features:
6
+ * - Comprehensive sensitive key detection with regex patterns
7
+ * - Case-insensitive matching with Unicode normalization
8
+ * - Credential format detection (JWT, API keys, database URIs, etc.)
9
+ * - Protection against encoding bypasses and Unicode attacks
10
+ * - Performance-optimized for large datasets
11
+ * - Integration with input sanitization layer for comprehensive protection
12
+ */
13
+ /**
14
+ * Enhanced credential masking that handles various formats
15
+ * Shows only the first 4 characters followed by ellipsis for long credentials
16
+ * Uses '[REDACTED]' for short credentials
17
+ *
18
+ * @param credential - The credential to mask (API token, password, etc.)
19
+ * @returns Masked credential string or empty string if input is invalid
20
+ */
21
+ export declare function maskCredential(credential: string | undefined | null): string;
22
+ /**
23
+ * Masks sensitive information in URLs for logging
24
+ * Enhanced detection of sensitive path components and query parameters
25
+ *
26
+ * @param url - The URL to mask
27
+ * @returns Masked URL string or original if not a valid URL
28
+ */
29
+ export declare function maskUrl(url: string | undefined | null): string;
30
+ /**
31
+ * Enhanced log data sanitization with comprehensive credential masking
32
+ * Recursively processes nested objects and arrays with advanced pattern detection
33
+ *
34
+ * @param data - The data object to sanitize
35
+ * @returns Sanitized data with masked sensitive fields
36
+ */
37
+ export declare function sanitizeLogData(data: unknown): unknown;
38
+ /**
39
+ * Creates a secure configuration object for logging
40
+ * Masks sensitive environment variables and configuration values
41
+ *
42
+ * @param config - Configuration object to sanitize
43
+ * @returns Sanitized configuration for safe logging
44
+ */
45
+ export declare function createSecureLogConfig(config: Record<string, unknown>): Record<string, unknown>;
46
+ /**
47
+ * Generates a safe connection status message with masked credentials
48
+ * Enhanced with comprehensive URL and token masking
49
+ *
50
+ * @param url - Connection URL
51
+ * @param token - API token or credential
52
+ * @param authType - Type of authentication being used
53
+ * @returns Safe status message for logging
54
+ */
55
+ export declare function createSecureConnectionMessage(url: string | undefined, token: string | undefined, authType?: string): string;
56
+ /**
57
+ * Performance utility to clear the normalized key cache
58
+ * Useful for testing or memory management in long-running processes
59
+ */
60
+ export declare function clearSecurityCache(): void;
61
+ /**
62
+ * Gets cache statistics for performance monitoring
63
+ *
64
+ * @returns Object containing cache size and performance metrics
65
+ */
66
+ export declare function getSecurityCacheStats(): {
67
+ size: number;
68
+ maxSize: number;
69
+ };
70
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/utils/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA8KH;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAgB5E;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAyC9D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAEtD;AAoFD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE9F;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CASR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAKzE"}