@divyacon/piece-trello 0.0.0-stage → 0.1.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 (313) hide show
  1. package/LICENSE.MIT-AP +24 -0
  2. package/README.md +8 -2
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +153 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/actions/ai/add-checklist-item.d.ts +6 -0
  8. package/dist/lib/actions/ai/add-checklist-item.d.ts.map +1 -0
  9. package/dist/lib/actions/ai/add-checklist-item.js +64 -0
  10. package/dist/lib/actions/ai/add-checklist-item.js.map +1 -0
  11. package/dist/lib/actions/ai/add-checklist-to-card.d.ts +5 -0
  12. package/dist/lib/actions/ai/add-checklist-to-card.d.ts.map +1 -0
  13. package/dist/lib/actions/ai/add-checklist-to-card.js +57 -0
  14. package/dist/lib/actions/ai/add-checklist-to-card.js.map +1 -0
  15. package/dist/lib/actions/ai/add-comment-to-card.d.ts +5 -0
  16. package/dist/lib/actions/ai/add-comment-to-card.d.ts.map +1 -0
  17. package/dist/lib/actions/ai/add-comment-to-card.js +55 -0
  18. package/dist/lib/actions/ai/add-comment-to-card.js.map +1 -0
  19. package/dist/lib/actions/ai/add-label-to-card.d.ts +5 -0
  20. package/dist/lib/actions/ai/add-label-to-card.d.ts.map +1 -0
  21. package/dist/lib/actions/ai/add-label-to-card.js +56 -0
  22. package/dist/lib/actions/ai/add-label-to-card.js.map +1 -0
  23. package/dist/lib/actions/ai/add-member-to-card.d.ts +5 -0
  24. package/dist/lib/actions/ai/add-member-to-card.d.ts.map +1 -0
  25. package/dist/lib/actions/ai/add-member-to-card.js +56 -0
  26. package/dist/lib/actions/ai/add-member-to-card.js.map +1 -0
  27. package/dist/lib/actions/ai/add-reaction-to-comment.d.ts +5 -0
  28. package/dist/lib/actions/ai/add-reaction-to-comment.d.ts.map +1 -0
  29. package/dist/lib/actions/ai/add-reaction-to-comment.js +60 -0
  30. package/dist/lib/actions/ai/add-reaction-to-comment.js.map +1 -0
  31. package/dist/lib/actions/ai/ai-common.d.ts +18 -0
  32. package/dist/lib/actions/ai/ai-common.d.ts.map +1 -0
  33. package/dist/lib/actions/ai/ai-common.js +29 -0
  34. package/dist/lib/actions/ai/ai-common.js.map +1 -0
  35. package/dist/lib/actions/ai/archive-all-cards-in-list.d.ts +4 -0
  36. package/dist/lib/actions/ai/archive-all-cards-in-list.d.ts.map +1 -0
  37. package/dist/lib/actions/ai/archive-all-cards-in-list.js +47 -0
  38. package/dist/lib/actions/ai/archive-all-cards-in-list.js.map +1 -0
  39. package/dist/lib/actions/ai/archive-board.d.ts +5 -0
  40. package/dist/lib/actions/ai/archive-board.d.ts.map +1 -0
  41. package/dist/lib/actions/ai/archive-board.js +59 -0
  42. package/dist/lib/actions/ai/archive-board.js.map +1 -0
  43. package/dist/lib/actions/ai/archive-card.d.ts +5 -0
  44. package/dist/lib/actions/ai/archive-card.d.ts.map +1 -0
  45. package/dist/lib/actions/ai/archive-card.js +59 -0
  46. package/dist/lib/actions/ai/archive-card.js.map +1 -0
  47. package/dist/lib/actions/ai/archive-list.d.ts +5 -0
  48. package/dist/lib/actions/ai/archive-list.d.ts.map +1 -0
  49. package/dist/lib/actions/ai/archive-list.js +59 -0
  50. package/dist/lib/actions/ai/archive-list.js.map +1 -0
  51. package/dist/lib/actions/ai/create-board-label.d.ts +6 -0
  52. package/dist/lib/actions/ai/create-board-label.d.ts.map +1 -0
  53. package/dist/lib/actions/ai/create-board-label.js +67 -0
  54. package/dist/lib/actions/ai/create-board-label.js.map +1 -0
  55. package/dist/lib/actions/ai/create-board.d.ts +6 -0
  56. package/dist/lib/actions/ai/create-board.d.ts.map +1 -0
  57. package/dist/lib/actions/ai/create-board.js +64 -0
  58. package/dist/lib/actions/ai/create-board.js.map +1 -0
  59. package/dist/lib/actions/ai/create-card-ai.d.ts +8 -0
  60. package/dist/lib/actions/ai/create-card-ai.d.ts.map +1 -0
  61. package/dist/lib/actions/ai/create-card-ai.js +99 -0
  62. package/dist/lib/actions/ai/create-card-ai.js.map +1 -0
  63. package/dist/lib/actions/ai/create-list.d.ts +6 -0
  64. package/dist/lib/actions/ai/create-list.d.ts.map +1 -0
  65. package/dist/lib/actions/ai/create-list.js +70 -0
  66. package/dist/lib/actions/ai/create-list.js.map +1 -0
  67. package/dist/lib/actions/ai/delete-card-ai.d.ts +4 -0
  68. package/dist/lib/actions/ai/delete-card-ai.d.ts.map +1 -0
  69. package/dist/lib/actions/ai/delete-card-ai.js +63 -0
  70. package/dist/lib/actions/ai/delete-card-ai.js.map +1 -0
  71. package/dist/lib/actions/ai/delete-checklist-item.d.ts +5 -0
  72. package/dist/lib/actions/ai/delete-checklist-item.d.ts.map +1 -0
  73. package/dist/lib/actions/ai/delete-checklist-item.js +52 -0
  74. package/dist/lib/actions/ai/delete-checklist-item.js.map +1 -0
  75. package/dist/lib/actions/ai/delete-checklist.d.ts +4 -0
  76. package/dist/lib/actions/ai/delete-checklist.d.ts.map +1 -0
  77. package/dist/lib/actions/ai/delete-checklist.js +47 -0
  78. package/dist/lib/actions/ai/delete-checklist.js.map +1 -0
  79. package/dist/lib/actions/ai/delete-comment.d.ts +5 -0
  80. package/dist/lib/actions/ai/delete-comment.d.ts.map +1 -0
  81. package/dist/lib/actions/ai/delete-comment.js +52 -0
  82. package/dist/lib/actions/ai/delete-comment.js.map +1 -0
  83. package/dist/lib/actions/ai/get-board.d.ts +4 -0
  84. package/dist/lib/actions/ai/get-board.d.ts.map +1 -0
  85. package/dist/lib/actions/ai/get-board.js +49 -0
  86. package/dist/lib/actions/ai/get-board.js.map +1 -0
  87. package/dist/lib/actions/ai/get-card-ai.d.ts +4 -0
  88. package/dist/lib/actions/ai/get-card-ai.d.ts.map +1 -0
  89. package/dist/lib/actions/ai/get-card-ai.js +64 -0
  90. package/dist/lib/actions/ai/get-card-ai.js.map +1 -0
  91. package/dist/lib/actions/ai/get-list.d.ts +4 -0
  92. package/dist/lib/actions/ai/get-list.d.ts.map +1 -0
  93. package/dist/lib/actions/ai/get-list.js +49 -0
  94. package/dist/lib/actions/ai/get-list.js.map +1 -0
  95. package/dist/lib/actions/ai/get-member.d.ts +4 -0
  96. package/dist/lib/actions/ai/get-member.d.ts.map +1 -0
  97. package/dist/lib/actions/ai/get-member.js +49 -0
  98. package/dist/lib/actions/ai/get-member.js.map +1 -0
  99. package/dist/lib/actions/ai/get-my-member.d.ts +2 -0
  100. package/dist/lib/actions/ai/get-my-member.d.ts.map +1 -0
  101. package/dist/lib/actions/ai/get-my-member.js +43 -0
  102. package/dist/lib/actions/ai/get-my-member.js.map +1 -0
  103. package/dist/lib/actions/ai/list-board-labels.d.ts +5 -0
  104. package/dist/lib/actions/ai/list-board-labels.d.ts.map +1 -0
  105. package/dist/lib/actions/ai/list-board-labels.js +60 -0
  106. package/dist/lib/actions/ai/list-board-labels.js.map +1 -0
  107. package/dist/lib/actions/ai/list-board-members.d.ts +4 -0
  108. package/dist/lib/actions/ai/list-board-members.d.ts.map +1 -0
  109. package/dist/lib/actions/ai/list-board-members.js +51 -0
  110. package/dist/lib/actions/ai/list-board-members.js.map +1 -0
  111. package/dist/lib/actions/ai/list-boards.d.ts +5 -0
  112. package/dist/lib/actions/ai/list-boards.d.ts.map +1 -0
  113. package/dist/lib/actions/ai/list-boards.js +68 -0
  114. package/dist/lib/actions/ai/list-boards.js.map +1 -0
  115. package/dist/lib/actions/ai/list-card-attachments-ai.d.ts +4 -0
  116. package/dist/lib/actions/ai/list-card-attachments-ai.d.ts.map +1 -0
  117. package/dist/lib/actions/ai/list-card-attachments-ai.js +64 -0
  118. package/dist/lib/actions/ai/list-card-attachments-ai.js.map +1 -0
  119. package/dist/lib/actions/ai/list-card-checklists.d.ts +4 -0
  120. package/dist/lib/actions/ai/list-card-checklists.d.ts.map +1 -0
  121. package/dist/lib/actions/ai/list-card-checklists.js +51 -0
  122. package/dist/lib/actions/ai/list-card-checklists.js.map +1 -0
  123. package/dist/lib/actions/ai/list-card-comments.d.ts +5 -0
  124. package/dist/lib/actions/ai/list-card-comments.d.ts.map +1 -0
  125. package/dist/lib/actions/ai/list-card-comments.js +60 -0
  126. package/dist/lib/actions/ai/list-card-comments.js.map +1 -0
  127. package/dist/lib/actions/ai/list-card-members.d.ts +4 -0
  128. package/dist/lib/actions/ai/list-card-members.d.ts.map +1 -0
  129. package/dist/lib/actions/ai/list-card-members.js +51 -0
  130. package/dist/lib/actions/ai/list-card-members.js.map +1 -0
  131. package/dist/lib/actions/ai/list-cards-in-board.d.ts +5 -0
  132. package/dist/lib/actions/ai/list-cards-in-board.d.ts.map +1 -0
  133. package/dist/lib/actions/ai/list-cards-in-board.js +68 -0
  134. package/dist/lib/actions/ai/list-cards-in-board.js.map +1 -0
  135. package/dist/lib/actions/ai/list-cards-in-list.d.ts +5 -0
  136. package/dist/lib/actions/ai/list-cards-in-list.d.ts.map +1 -0
  137. package/dist/lib/actions/ai/list-cards-in-list.js +67 -0
  138. package/dist/lib/actions/ai/list-cards-in-list.js.map +1 -0
  139. package/dist/lib/actions/ai/list-lists.d.ts +5 -0
  140. package/dist/lib/actions/ai/list-lists.d.ts.map +1 -0
  141. package/dist/lib/actions/ai/list-lists.js +67 -0
  142. package/dist/lib/actions/ai/list-lists.js.map +1 -0
  143. package/dist/lib/actions/ai/list-organization-boards.d.ts +4 -0
  144. package/dist/lib/actions/ai/list-organization-boards.d.ts.map +1 -0
  145. package/dist/lib/actions/ai/list-organization-boards.js +51 -0
  146. package/dist/lib/actions/ai/list-organization-boards.js.map +1 -0
  147. package/dist/lib/actions/ai/move-all-cards-in-list.d.ts +6 -0
  148. package/dist/lib/actions/ai/move-all-cards-in-list.d.ts.map +1 -0
  149. package/dist/lib/actions/ai/move-all-cards-in-list.js +60 -0
  150. package/dist/lib/actions/ai/move-all-cards-in-list.js.map +1 -0
  151. package/dist/lib/actions/ai/move-card.d.ts +5 -0
  152. package/dist/lib/actions/ai/move-card.d.ts.map +1 -0
  153. package/dist/lib/actions/ai/move-card.js +56 -0
  154. package/dist/lib/actions/ai/move-card.js.map +1 -0
  155. package/dist/lib/actions/ai/remove-label-from-card.d.ts +5 -0
  156. package/dist/lib/actions/ai/remove-label-from-card.d.ts.map +1 -0
  157. package/dist/lib/actions/ai/remove-label-from-card.js +52 -0
  158. package/dist/lib/actions/ai/remove-label-from-card.js.map +1 -0
  159. package/dist/lib/actions/ai/remove-member-from-card.d.ts +5 -0
  160. package/dist/lib/actions/ai/remove-member-from-card.d.ts.map +1 -0
  161. package/dist/lib/actions/ai/remove-member-from-card.js +54 -0
  162. package/dist/lib/actions/ai/remove-member-from-card.js.map +1 -0
  163. package/dist/lib/actions/ai/rename-list.d.ts +5 -0
  164. package/dist/lib/actions/ai/rename-list.d.ts.map +1 -0
  165. package/dist/lib/actions/ai/rename-list.js +55 -0
  166. package/dist/lib/actions/ai/rename-list.js.map +1 -0
  167. package/dist/lib/actions/ai/search-cards.d.ts +7 -0
  168. package/dist/lib/actions/ai/search-cards.d.ts.map +1 -0
  169. package/dist/lib/actions/ai/search-cards.js +88 -0
  170. package/dist/lib/actions/ai/search-cards.js.map +1 -0
  171. package/dist/lib/actions/ai/search-members.d.ts +7 -0
  172. package/dist/lib/actions/ai/search-members.d.ts.map +1 -0
  173. package/dist/lib/actions/ai/search-members.js +75 -0
  174. package/dist/lib/actions/ai/search-members.js.map +1 -0
  175. package/dist/lib/actions/ai/set-checklist-item-state.d.ts +7 -0
  176. package/dist/lib/actions/ai/set-checklist-item-state.d.ts.map +1 -0
  177. package/dist/lib/actions/ai/set-checklist-item-state.js +71 -0
  178. package/dist/lib/actions/ai/set-checklist-item-state.js.map +1 -0
  179. package/dist/lib/actions/ai/update-board.d.ts +6 -0
  180. package/dist/lib/actions/ai/update-board.d.ts.map +1 -0
  181. package/dist/lib/actions/ai/update-board.js +64 -0
  182. package/dist/lib/actions/ai/update-board.js.map +1 -0
  183. package/dist/lib/actions/ai/update-card-ai.d.ts +11 -0
  184. package/dist/lib/actions/ai/update-card-ai.d.ts.map +1 -0
  185. package/dist/lib/actions/ai/update-card-ai.js +130 -0
  186. package/dist/lib/actions/ai/update-card-ai.js.map +1 -0
  187. package/dist/lib/actions/ai/update-comment.d.ts +6 -0
  188. package/dist/lib/actions/ai/update-comment.d.ts.map +1 -0
  189. package/dist/lib/actions/ai/update-comment.js +60 -0
  190. package/dist/lib/actions/ai/update-comment.js.map +1 -0
  191. package/dist/lib/actions/ai/update-label.d.ts +6 -0
  192. package/dist/lib/actions/ai/update-label.d.ts.map +1 -0
  193. package/dist/lib/actions/ai/update-label.js +65 -0
  194. package/dist/lib/actions/ai/update-label.js.map +1 -0
  195. package/dist/lib/actions/card/create-card.d.ts +9 -0
  196. package/dist/lib/actions/card/create-card.d.ts.map +1 -0
  197. package/dist/lib/actions/card/create-card.js +73 -0
  198. package/dist/lib/actions/card/create-card.js.map +1 -0
  199. package/dist/lib/actions/card/delete-card.d.ts +4 -0
  200. package/dist/lib/actions/card/delete-card.d.ts.map +1 -0
  201. package/dist/lib/actions/card/delete-card.js +44 -0
  202. package/dist/lib/actions/card/delete-card.js.map +1 -0
  203. package/dist/lib/actions/card/get-card.d.ts +4 -0
  204. package/dist/lib/actions/card/get-card.d.ts.map +1 -0
  205. package/dist/lib/actions/card/get-card.js +45 -0
  206. package/dist/lib/actions/card/get-card.js.map +1 -0
  207. package/dist/lib/actions/card/update-card.d.ts +12 -0
  208. package/dist/lib/actions/card/update-card.d.ts.map +1 -0
  209. package/dist/lib/actions/card/update-card.js +104 -0
  210. package/dist/lib/actions/card/update-card.js.map +1 -0
  211. package/dist/lib/actions/card-attachment/add-card-attachment.d.ts +8 -0
  212. package/dist/lib/actions/card-attachment/add-card-attachment.d.ts.map +1 -0
  213. package/dist/lib/actions/card-attachment/add-card-attachment.js +76 -0
  214. package/dist/lib/actions/card-attachment/add-card-attachment.js.map +1 -0
  215. package/dist/lib/actions/card-attachment/delete-card-attachment.d.ts +5 -0
  216. package/dist/lib/actions/card-attachment/delete-card-attachment.d.ts.map +1 -0
  217. package/dist/lib/actions/card-attachment/delete-card-attachment.js +49 -0
  218. package/dist/lib/actions/card-attachment/delete-card-attachment.js.map +1 -0
  219. package/dist/lib/actions/card-attachment/get-card-attachment.d.ts +5 -0
  220. package/dist/lib/actions/card-attachment/get-card-attachment.d.ts.map +1 -0
  221. package/dist/lib/actions/card-attachment/get-card-attachment.js +50 -0
  222. package/dist/lib/actions/card-attachment/get-card-attachment.js.map +1 -0
  223. package/dist/lib/actions/card-attachment/get-card-attachments.d.ts +4 -0
  224. package/dist/lib/actions/card-attachment/get-card-attachments.d.ts.map +1 -0
  225. package/dist/lib/actions/card-attachment/get-card-attachments.js +45 -0
  226. package/dist/lib/actions/card-attachment/get-card-attachments.js.map +1 -0
  227. package/dist/lib/common/index.d.ts +25 -0
  228. package/dist/lib/common/index.d.ts.map +1 -0
  229. package/dist/lib/common/index.js +292 -0
  230. package/dist/lib/common/index.js.map +1 -0
  231. package/dist/lib/common/props/card.d.ts +116 -0
  232. package/dist/lib/common/props/card.d.ts.map +1 -0
  233. package/dist/lib/common/props/card.js +3 -0
  234. package/dist/lib/common/props/card.js.map +1 -0
  235. package/dist/lib/output-schemas.d.ts +50 -0
  236. package/dist/lib/output-schemas.d.ts.map +1 -0
  237. package/dist/lib/output-schemas.js +316 -0
  238. package/dist/lib/output-schemas.js.map +1 -0
  239. package/dist/lib/triggers/cardMoved.d.ts +15 -0
  240. package/dist/lib/triggers/cardMoved.d.ts.map +1 -0
  241. package/dist/lib/triggers/cardMoved.js +152 -0
  242. package/dist/lib/triggers/cardMoved.js.map +1 -0
  243. package/dist/lib/triggers/deadline.d.ts +23 -0
  244. package/dist/lib/triggers/deadline.d.ts.map +1 -0
  245. package/dist/lib/triggers/deadline.js +94 -0
  246. package/dist/lib/triggers/deadline.js.map +1 -0
  247. package/dist/lib/triggers/newCard.d.ts +15 -0
  248. package/dist/lib/triggers/newCard.d.ts.map +1 -0
  249. package/dist/lib/triggers/newCard.js +151 -0
  250. package/dist/lib/triggers/newCard.js.map +1 -0
  251. package/package.json +45 -3
  252. package/src/index.ts +153 -0
  253. package/src/lib/actions/ai/add-checklist-item.ts +67 -0
  254. package/src/lib/actions/ai/add-checklist-to-card.ts +58 -0
  255. package/src/lib/actions/ai/add-comment-to-card.ts +55 -0
  256. package/src/lib/actions/ai/add-label-to-card.ts +57 -0
  257. package/src/lib/actions/ai/add-member-to-card.ts +57 -0
  258. package/src/lib/actions/ai/add-reaction-to-comment.ts +61 -0
  259. package/src/lib/actions/ai/ai-common.ts +40 -0
  260. package/src/lib/actions/ai/archive-all-cards-in-list.ts +47 -0
  261. package/src/lib/actions/ai/archive-board.ts +58 -0
  262. package/src/lib/actions/ai/archive-card.ts +58 -0
  263. package/src/lib/actions/ai/archive-list.ts +58 -0
  264. package/src/lib/actions/ai/create-board-label.ts +69 -0
  265. package/src/lib/actions/ai/create-board.ts +66 -0
  266. package/src/lib/actions/ai/create-card-ai.ts +103 -0
  267. package/src/lib/actions/ai/create-list.ts +71 -0
  268. package/src/lib/actions/ai/delete-card-ai.ts +64 -0
  269. package/src/lib/actions/ai/delete-checklist-item.ts +54 -0
  270. package/src/lib/actions/ai/delete-checklist.ts +48 -0
  271. package/src/lib/actions/ai/delete-comment.ts +52 -0
  272. package/src/lib/actions/ai/get-board.ts +49 -0
  273. package/src/lib/actions/ai/get-card-ai.ts +67 -0
  274. package/src/lib/actions/ai/get-list.ts +49 -0
  275. package/src/lib/actions/ai/get-member.ts +50 -0
  276. package/src/lib/actions/ai/get-my-member.ts +43 -0
  277. package/src/lib/actions/ai/list-board-labels.ts +62 -0
  278. package/src/lib/actions/ai/list-board-members.ts +52 -0
  279. package/src/lib/actions/ai/list-boards.ts +71 -0
  280. package/src/lib/actions/ai/list-card-attachments-ai.ts +66 -0
  281. package/src/lib/actions/ai/list-card-checklists.ts +52 -0
  282. package/src/lib/actions/ai/list-card-comments.ts +62 -0
  283. package/src/lib/actions/ai/list-card-members.ts +52 -0
  284. package/src/lib/actions/ai/list-cards-in-board.ts +70 -0
  285. package/src/lib/actions/ai/list-cards-in-list.ts +69 -0
  286. package/src/lib/actions/ai/list-lists.ts +69 -0
  287. package/src/lib/actions/ai/list-organization-boards.ts +53 -0
  288. package/src/lib/actions/ai/move-all-cards-in-list.ts +61 -0
  289. package/src/lib/actions/ai/move-card.ts +57 -0
  290. package/src/lib/actions/ai/remove-label-from-card.ts +53 -0
  291. package/src/lib/actions/ai/remove-member-from-card.ts +55 -0
  292. package/src/lib/actions/ai/rename-list.ts +55 -0
  293. package/src/lib/actions/ai/search-cards.ts +91 -0
  294. package/src/lib/actions/ai/search-members.ts +75 -0
  295. package/src/lib/actions/ai/set-checklist-item-state.ts +73 -0
  296. package/src/lib/actions/ai/update-board.ts +65 -0
  297. package/src/lib/actions/ai/update-card-ai.ts +136 -0
  298. package/src/lib/actions/ai/update-comment.ts +61 -0
  299. package/src/lib/actions/ai/update-label.ts +67 -0
  300. package/src/lib/actions/card/create-card.ts +73 -0
  301. package/src/lib/actions/card/delete-card.ts +44 -0
  302. package/src/lib/actions/card/get-card.ts +44 -0
  303. package/src/lib/actions/card/update-card.ts +113 -0
  304. package/src/lib/actions/card-attachment/add-card-attachment.ts +86 -0
  305. package/src/lib/actions/card-attachment/delete-card-attachment.ts +49 -0
  306. package/src/lib/actions/card-attachment/get-card-attachment.ts +51 -0
  307. package/src/lib/actions/card-attachment/get-card-attachments.ts +45 -0
  308. package/src/lib/common/index.ts +333 -0
  309. package/src/lib/common/props/card.ts +113 -0
  310. package/src/lib/output-schemas.ts +374 -0
  311. package/src/lib/triggers/cardMoved.ts +155 -0
  312. package/src/lib/triggers/deadline.ts +89 -0
  313. package/src/lib/triggers/newCard.ts +156 -0
@@ -0,0 +1,58 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ } from '@agnocon/pieces-common';
7
+ import { trelloCommon } from '../../common';
8
+ import { trelloAuth } from '../../..';
9
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
10
+ import { archiveCardActionOutputSchema } from '../../output-schemas';
11
+
12
+ export const archiveCard = createAction({
13
+ auth: trelloAuth,
14
+ name: 'archive_card',
15
+ displayName: 'Archive Card (Agent)',
16
+ description: 'Archive or unarchive a Trello card.',
17
+ audience: 'ai',
18
+ outputSchema: archiveCardActionOutputSchema,
19
+ aiMetadata: {
20
+ description:
21
+ 'Archives (closed=true) or unarchives (closed=false) a Trello card. Archiving is recoverable, so prefer this over Delete Card. Obtain card_id from Search Cards. Setting the same closed state again converges, so it is idempotent.',
22
+ idempotent: true,
23
+ },
24
+ props: {
25
+ card_id: Property.ShortText({
26
+ displayName: 'Card ID',
27
+ description: 'The ID of the card. Obtain it from Search Cards.',
28
+ required: true,
29
+ }),
30
+ archived: Property.Checkbox({
31
+ displayName: 'Archived',
32
+ description: 'True to archive the card, false to unarchive it.',
33
+ required: false,
34
+ defaultValue: true,
35
+ }),
36
+ },
37
+
38
+ async run(context) {
39
+ const archived = context.propsValue['archived'] ?? true;
40
+ try {
41
+ const request: HttpRequest = {
42
+ method: HttpMethod.PUT,
43
+ url: `${trelloCommon.baseUrl}cards/${context.propsValue['card_id']}/closed`,
44
+ headers: { Accept: 'application/json' },
45
+ queryParams: withAuthParams(context.auth, {
46
+ value: archived ? 'true' : 'false',
47
+ }),
48
+ };
49
+ const response = await httpClient.sendRequest(request);
50
+ return response.body;
51
+ } catch (error: any) {
52
+ rethrowTrelloError(
53
+ error,
54
+ 'Card not found. Verify the card_id (resolve it via Search Cards).'
55
+ );
56
+ }
57
+ },
58
+ });
@@ -0,0 +1,58 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ } from '@agnocon/pieces-common';
7
+ import { trelloCommon } from '../../common';
8
+ import { trelloAuth } from '../../..';
9
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
10
+ import { archiveListActionOutputSchema } from '../../output-schemas';
11
+
12
+ export const archiveList = createAction({
13
+ auth: trelloAuth,
14
+ name: 'archive_list',
15
+ displayName: 'Archive List (Agent)',
16
+ description: 'Archive or unarchive a Trello list.',
17
+ audience: 'ai',
18
+ outputSchema: archiveListActionOutputSchema,
19
+ aiMetadata: {
20
+ description:
21
+ 'Archives (closed=true) or unarchives (closed=false) a Trello list identified by list_id. Obtain list_id from List Lists. Setting the same closed state again converges, so it is idempotent.',
22
+ idempotent: true,
23
+ },
24
+ props: {
25
+ list_id: Property.ShortText({
26
+ displayName: 'List ID',
27
+ description: 'The ID of the list. Obtain it from List Lists.',
28
+ required: true,
29
+ }),
30
+ archived: Property.Checkbox({
31
+ displayName: 'Archived',
32
+ description: 'True to archive the list, false to unarchive it.',
33
+ required: false,
34
+ defaultValue: true,
35
+ }),
36
+ },
37
+
38
+ async run(context) {
39
+ const archived = context.propsValue['archived'] ?? true;
40
+ try {
41
+ const request: HttpRequest = {
42
+ method: HttpMethod.PUT,
43
+ url: `${trelloCommon.baseUrl}lists/${context.propsValue['list_id']}/closed`,
44
+ headers: { Accept: 'application/json' },
45
+ queryParams: withAuthParams(context.auth, {
46
+ value: archived ? 'true' : 'false',
47
+ }),
48
+ };
49
+ const response = await httpClient.sendRequest(request);
50
+ return response.body;
51
+ } catch (error: any) {
52
+ rethrowTrelloError(
53
+ error,
54
+ 'List not found. Verify the list_id (resolve it via List Lists).'
55
+ );
56
+ }
57
+ },
58
+ });
@@ -0,0 +1,69 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ QueryParams,
7
+ } from '@agnocon/pieces-common';
8
+ import { trelloCommon } from '../../common';
9
+ import { trelloAuth } from '../../..';
10
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
11
+ import { createBoardLabelActionOutputSchema } from '../../output-schemas';
12
+
13
+ export const createBoardLabel = createAction({
14
+ auth: trelloAuth,
15
+ name: 'create_board_label',
16
+ displayName: 'Create Board Label (Agent)',
17
+ description: 'Define a reusable label on a Trello board.',
18
+ audience: 'ai',
19
+ outputSchema: createBoardLabelActionOutputSchema,
20
+ aiMetadata: {
21
+ description:
22
+ 'Creates a reusable label (name + color) on a Trello board. Returns the new label id, which you can then attach to cards with Add Label To Card. Obtain board_id from List Boards. Each call creates a distinct label, so it is not idempotent.',
23
+ idempotent: false,
24
+ },
25
+ props: {
26
+ board_id: Property.ShortText({
27
+ displayName: 'Board ID',
28
+ description: 'The board to create the label on. Obtain it from List Boards.',
29
+ required: true,
30
+ }),
31
+ name: Property.ShortText({
32
+ displayName: 'Label Name',
33
+ required: false,
34
+ }),
35
+ color: Property.ShortText({
36
+ displayName: 'Color',
37
+ description:
38
+ 'Label color (e.g. green, yellow, orange, red, purple, blue, sky, lime, pink, black) or leave empty for no color.',
39
+ required: false,
40
+ }),
41
+ },
42
+
43
+ async run(context) {
44
+ const params: QueryParams = {
45
+ idBoard: context.propsValue['board_id'],
46
+ };
47
+ if (context.propsValue['name']) {
48
+ params['name'] = context.propsValue['name'] as string;
49
+ }
50
+ if (context.propsValue['color']) {
51
+ params['color'] = context.propsValue['color'] as string;
52
+ }
53
+ try {
54
+ const request: HttpRequest = {
55
+ method: HttpMethod.POST,
56
+ url: `${trelloCommon.baseUrl}labels`,
57
+ headers: { Accept: 'application/json' },
58
+ queryParams: withAuthParams(context.auth, params),
59
+ };
60
+ const response = await httpClient.sendRequest(request);
61
+ return response.body;
62
+ } catch (error: any) {
63
+ rethrowTrelloError(
64
+ error,
65
+ 'Board not found. Verify the board_id (resolve it via List Boards).'
66
+ );
67
+ }
68
+ },
69
+ });
@@ -0,0 +1,66 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ QueryParams,
7
+ } from '@agnocon/pieces-common';
8
+ import { trelloCommon } from '../../common';
9
+ import { trelloAuth } from '../../..';
10
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
11
+ import { createBoardActionOutputSchema } from '../../output-schemas';
12
+
13
+ export const createBoard = createAction({
14
+ auth: trelloAuth,
15
+ name: 'create_board',
16
+ displayName: 'Create Board (Agent)',
17
+ description: 'Create a new Trello board.',
18
+ audience: 'ai',
19
+ outputSchema: createBoardActionOutputSchema,
20
+ aiMetadata: {
21
+ description:
22
+ 'Creates a new Trello board with a name and optional description, optionally inside a workspace (organization). Returns the new board id. Obtain org_id (if used) from List Boards / Get My Member. Each call creates a distinct board, so it is not idempotent.',
23
+ idempotent: false,
24
+ },
25
+ props: {
26
+ name: Property.ShortText({
27
+ displayName: 'Board Name',
28
+ required: true,
29
+ }),
30
+ description: Property.LongText({
31
+ displayName: 'Description',
32
+ required: false,
33
+ }),
34
+ org_id: Property.ShortText({
35
+ displayName: 'Organization ID',
36
+ description:
37
+ 'The workspace (organization) id to create the board in (optional).',
38
+ required: false,
39
+ }),
40
+ },
41
+
42
+ async run(context) {
43
+ const params: QueryParams = { name: context.propsValue['name'] };
44
+ if (context.propsValue['description']) {
45
+ params['desc'] = context.propsValue['description'] as string;
46
+ }
47
+ if (context.propsValue['org_id']) {
48
+ params['idOrganization'] = context.propsValue['org_id'] as string;
49
+ }
50
+ try {
51
+ const request: HttpRequest = {
52
+ method: HttpMethod.POST,
53
+ url: `${trelloCommon.baseUrl}boards`,
54
+ headers: { Accept: 'application/json' },
55
+ queryParams: withAuthParams(context.auth, params),
56
+ };
57
+ const response = await httpClient.sendRequest(request);
58
+ return response.body;
59
+ } catch (error: any) {
60
+ rethrowTrelloError(
61
+ error,
62
+ 'Organization not found. Verify the org_id, or omit it to create a personal board.'
63
+ );
64
+ }
65
+ },
66
+ });
@@ -0,0 +1,103 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ } from '@agnocon/pieces-common';
7
+ import { trelloCommon } from '../../common';
8
+ import { TrelloCard } from '../../common/props/card';
9
+ import { trelloAuth } from '../../..';
10
+ import { createCardAiActionOutputSchema } from '../../output-schemas';
11
+
12
+ export const createCardAi = createAction({
13
+ auth: trelloAuth,
14
+ name: 'create_card_ai',
15
+ displayName: 'Create Card (Agent)',
16
+ description: 'Create a new card in a Trello list.',
17
+ audience: 'ai',
18
+ outputSchema: createCardAiActionOutputSchema,
19
+ aiMetadata: {
20
+ description:
21
+ 'Creates a new Trello card in a specific list, optionally with a description, position (top/bottom), and label ids. Requires the target list_id (resolve it via List Lists for a board, which you can find via List Boards). Each call creates a distinct card, so it is not idempotent.',
22
+ idempotent: false,
23
+ },
24
+ props: {
25
+ list_id: Property.ShortText({
26
+ displayName: 'List ID',
27
+ description:
28
+ 'The ID of the list to create the card in. Obtain it from List Lists (which takes a board_id from List Boards).',
29
+ required: true,
30
+ }),
31
+ name: Property.ShortText({
32
+ displayName: 'Card Name',
33
+ description: 'The name of the card to create.',
34
+ required: true,
35
+ }),
36
+ description: Property.LongText({
37
+ displayName: 'Card Description',
38
+ description: 'The description of the card to create.',
39
+ required: false,
40
+ }),
41
+ position: Property.StaticDropdown({
42
+ displayName: 'Position',
43
+ description: 'Place the card on top or bottom of the list.',
44
+ required: false,
45
+ options: {
46
+ options: [
47
+ { label: 'Top', value: 'top' },
48
+ { label: 'Bottom', value: 'bottom' },
49
+ ],
50
+ },
51
+ }),
52
+ labels: Property.Array({
53
+ displayName: 'Label IDs',
54
+ description:
55
+ 'Label ids to attach to the card. Obtain them from List Board Labels.',
56
+ required: false,
57
+ }),
58
+ },
59
+
60
+ async run(context) {
61
+ try {
62
+ const request: HttpRequest = {
63
+ method: HttpMethod.POST,
64
+ url:
65
+ `${trelloCommon.baseUrl}cards` +
66
+ `?idList=` +
67
+ context.propsValue['list_id'] +
68
+ `&key=` +
69
+ context.auth.username +
70
+ `&token=` +
71
+ context.auth.password,
72
+ headers: {
73
+ Accept: 'application/json',
74
+ },
75
+ body: {
76
+ name: context.propsValue['name'],
77
+ desc: context.propsValue['description'],
78
+ pos: context.propsValue['position'],
79
+ idLabels: context.propsValue['labels'] as string[] | undefined,
80
+ },
81
+ queryParams: {},
82
+ };
83
+ const response = await httpClient.sendRequest<TrelloCard>(request);
84
+ return response.body;
85
+ } catch (error: any) {
86
+ const status = error?.response?.status;
87
+ if (status === 401 || status === 403) {
88
+ throw new Error(
89
+ 'Permission denied creating the card. Check the connection token and that you can write to the list.'
90
+ );
91
+ }
92
+ if (status === 404) {
93
+ throw new Error(
94
+ 'List not found. Verify the list_id (resolve it via List Lists).'
95
+ );
96
+ }
97
+ if (status === 429) {
98
+ throw new Error('Trello rate limit exceeded. Retry after a short delay.');
99
+ }
100
+ throw error;
101
+ }
102
+ },
103
+ });
@@ -0,0 +1,71 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ QueryParams,
7
+ } from '@agnocon/pieces-common';
8
+ import { trelloCommon } from '../../common';
9
+ import { trelloAuth } from '../../..';
10
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
11
+ import { createListActionOutputSchema } from '../../output-schemas';
12
+
13
+ export const createList = createAction({
14
+ auth: trelloAuth,
15
+ name: 'create_list',
16
+ displayName: 'Create List (Agent)',
17
+ description: 'Create a list (column) on a Trello board.',
18
+ audience: 'ai',
19
+ outputSchema: createListActionOutputSchema,
20
+ aiMetadata: {
21
+ description:
22
+ 'Creates a new list (column) on a Trello board. Returns the new list id for use with card actions. Obtain board_id from List Boards. Each call creates a distinct list, so it is not idempotent.',
23
+ idempotent: false,
24
+ },
25
+ props: {
26
+ board_id: Property.ShortText({
27
+ displayName: 'Board ID',
28
+ description: 'The board to create the list on. Obtain it from List Boards.',
29
+ required: true,
30
+ }),
31
+ name: Property.ShortText({
32
+ displayName: 'List Name',
33
+ required: true,
34
+ }),
35
+ position: Property.StaticDropdown({
36
+ displayName: 'Position',
37
+ required: false,
38
+ options: {
39
+ options: [
40
+ { label: 'Top', value: 'top' },
41
+ { label: 'Bottom', value: 'bottom' },
42
+ ],
43
+ },
44
+ }),
45
+ },
46
+
47
+ async run(context) {
48
+ const params: QueryParams = {
49
+ name: context.propsValue['name'],
50
+ idBoard: context.propsValue['board_id'],
51
+ };
52
+ if (context.propsValue['position']) {
53
+ params['pos'] = context.propsValue['position'] as string;
54
+ }
55
+ try {
56
+ const request: HttpRequest = {
57
+ method: HttpMethod.POST,
58
+ url: `${trelloCommon.baseUrl}lists`,
59
+ headers: { Accept: 'application/json' },
60
+ queryParams: withAuthParams(context.auth, params),
61
+ };
62
+ const response = await httpClient.sendRequest(request);
63
+ return response.body;
64
+ } catch (error: any) {
65
+ rethrowTrelloError(
66
+ error,
67
+ 'Board not found. Verify the board_id (resolve it via List Boards).'
68
+ );
69
+ }
70
+ },
71
+ });
@@ -0,0 +1,64 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ } from '@agnocon/pieces-common';
7
+ import { trelloCommon } from '../../common';
8
+ import { trelloAuth } from '../../..';
9
+
10
+ export const deleteCardAi = createAction({
11
+ auth: trelloAuth,
12
+ name: 'delete_card_ai',
13
+ displayName: 'Delete Card (Agent)',
14
+ description: 'Permanently delete a Trello card by ID.',
15
+ audience: 'ai',
16
+ aiMetadata: {
17
+ description:
18
+ 'Permanently deletes a Trello card by its card_id. This is irreversible; prefer Archive Card (recoverable) unless the card must be erased entirely. Obtain card_id from Search Cards. Deleting the same id again returns an error once it no longer exists, so it is not idempotent.',
19
+ idempotent: false,
20
+ },
21
+ props: {
22
+ card_id: Property.ShortText({
23
+ displayName: 'Card ID',
24
+ description: 'The ID of the card to delete. Obtain it from Search Cards.',
25
+ required: true,
26
+ }),
27
+ },
28
+
29
+ async run(context) {
30
+ try {
31
+ const request: HttpRequest = {
32
+ method: HttpMethod.DELETE,
33
+ url:
34
+ `${trelloCommon.baseUrl}cards/${context.propsValue['card_id']}` +
35
+ `?key=` +
36
+ context.auth.username +
37
+ `&token=` +
38
+ context.auth.password,
39
+ headers: {
40
+ Accept: 'application/json',
41
+ },
42
+ queryParams: {},
43
+ };
44
+ const response = await httpClient.sendRequest(request);
45
+ return response.body;
46
+ } catch (error: any) {
47
+ const status = error?.response?.status;
48
+ if (status === 401 || status === 403) {
49
+ throw new Error(
50
+ 'Permission denied deleting the card. Check the connection token and your write access.'
51
+ );
52
+ }
53
+ if (status === 404) {
54
+ throw new Error(
55
+ 'Card not found (it may already be deleted). Verify the card_id.'
56
+ );
57
+ }
58
+ if (status === 429) {
59
+ throw new Error('Trello rate limit exceeded. Retry after a short delay.');
60
+ }
61
+ throw error;
62
+ }
63
+ },
64
+ });
@@ -0,0 +1,54 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ } from '@agnocon/pieces-common';
7
+ import { trelloCommon } from '../../common';
8
+ import { trelloAuth } from '../../..';
9
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
10
+
11
+ export const deleteChecklistItem = createAction({
12
+ auth: trelloAuth,
13
+ name: 'delete_checklist_item',
14
+ displayName: 'Delete Checklist Item (Agent)',
15
+ description: 'Remove one item from a checklist.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description:
19
+ 'Removes a single check item from a checklist. Both ids come from List Card Checklists: checklist_id (idChecklist) and checkitem_id (idCheckItem). Deleting the same item again returns an error once it no longer exists, so it is not idempotent.',
20
+ idempotent: false,
21
+ },
22
+ props: {
23
+ checklist_id: Property.ShortText({
24
+ displayName: 'Checklist ID',
25
+ description:
26
+ 'The checklist id (idChecklist). Obtain it from List Card Checklists.',
27
+ required: true,
28
+ }),
29
+ checkitem_id: Property.ShortText({
30
+ displayName: 'Check Item ID',
31
+ description:
32
+ 'The check item id (idCheckItem). Obtain it from List Card Checklists.',
33
+ required: true,
34
+ }),
35
+ },
36
+
37
+ async run(context) {
38
+ try {
39
+ const request: HttpRequest = {
40
+ method: HttpMethod.DELETE,
41
+ url: `${trelloCommon.baseUrl}checklists/${context.propsValue['checklist_id']}/checkItems/${context.propsValue['checkitem_id']}`,
42
+ headers: { Accept: 'application/json' },
43
+ queryParams: withAuthParams(context.auth),
44
+ };
45
+ const response = await httpClient.sendRequest(request);
46
+ return response.body;
47
+ } catch (error: any) {
48
+ rethrowTrelloError(
49
+ error,
50
+ 'Checklist or check item not found (it may already be deleted). Verify both ids via List Card Checklists.'
51
+ );
52
+ }
53
+ },
54
+ });
@@ -0,0 +1,48 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ } from '@agnocon/pieces-common';
7
+ import { trelloCommon } from '../../common';
8
+ import { trelloAuth } from '../../..';
9
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
10
+
11
+ export const deleteChecklist = createAction({
12
+ auth: trelloAuth,
13
+ name: 'delete_checklist',
14
+ displayName: 'Delete Checklist (Agent)',
15
+ description: 'Delete a whole checklist.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description:
19
+ 'Deletes an entire checklist (and all of its items) identified by checklist_id. Obtain checklist_id (idChecklist) from List Card Checklists. Deleting the same checklist again returns an error once it no longer exists, so it is not idempotent.',
20
+ idempotent: false,
21
+ },
22
+ props: {
23
+ checklist_id: Property.ShortText({
24
+ displayName: 'Checklist ID',
25
+ description:
26
+ 'The checklist id (idChecklist). Obtain it from List Card Checklists.',
27
+ required: true,
28
+ }),
29
+ },
30
+
31
+ async run(context) {
32
+ try {
33
+ const request: HttpRequest = {
34
+ method: HttpMethod.DELETE,
35
+ url: `${trelloCommon.baseUrl}checklists/${context.propsValue['checklist_id']}`,
36
+ headers: { Accept: 'application/json' },
37
+ queryParams: withAuthParams(context.auth),
38
+ };
39
+ const response = await httpClient.sendRequest(request);
40
+ return response.body;
41
+ } catch (error: any) {
42
+ rethrowTrelloError(
43
+ error,
44
+ 'Checklist not found (it may already be deleted). Verify the checklist_id.'
45
+ );
46
+ }
47
+ },
48
+ });
@@ -0,0 +1,52 @@
1
+ import { createAction, Property } from '@agnocon/pieces-framework';
2
+ import {
3
+ httpClient,
4
+ HttpRequest,
5
+ HttpMethod,
6
+ } from '@agnocon/pieces-common';
7
+ import { trelloCommon } from '../../common';
8
+ import { trelloAuth } from '../../..';
9
+ import { withAuthParams, rethrowTrelloError } from './ai-common';
10
+
11
+ export const deleteComment = createAction({
12
+ auth: trelloAuth,
13
+ name: 'delete_comment',
14
+ displayName: 'Delete Comment (Agent)',
15
+ description: 'Delete a comment from a Trello card.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description:
19
+ 'Deletes a comment on a Trello card, identified by card_id and comment_id (the action id). Obtain card_id from Search Cards and comment_id from List Card Comments. Deleting the same comment again returns an error once it no longer exists, so it is not idempotent.',
20
+ idempotent: false,
21
+ },
22
+ props: {
23
+ card_id: Property.ShortText({
24
+ displayName: 'Card ID',
25
+ description: 'The ID of the card. Obtain it from Search Cards.',
26
+ required: true,
27
+ }),
28
+ comment_id: Property.ShortText({
29
+ displayName: 'Comment ID',
30
+ description: 'The comment (action) id. Obtain it from List Card Comments.',
31
+ required: true,
32
+ }),
33
+ },
34
+
35
+ async run(context) {
36
+ try {
37
+ const request: HttpRequest = {
38
+ method: HttpMethod.DELETE,
39
+ url: `${trelloCommon.baseUrl}cards/${context.propsValue['card_id']}/actions/${context.propsValue['comment_id']}/comments`,
40
+ headers: { Accept: 'application/json' },
41
+ queryParams: withAuthParams(context.auth),
42
+ };
43
+ const response = await httpClient.sendRequest(request);
44
+ return response.body;
45
+ } catch (error: any) {
46
+ rethrowTrelloError(
47
+ error,
48
+ 'Card or comment not found (it may already be deleted). Verify the card_id and comment_id.'
49
+ );
50
+ }
51
+ },
52
+ });