runline 0.32.0 → 0.34.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 (521) hide show
  1. package/dist/auth/oauth2.d.ts +7 -1
  2. package/dist/auth/oauth2.js +10 -0
  3. package/dist/auth/token.d.ts +1 -0
  4. package/dist/auth/token.js +19 -1
  5. package/dist/auth/types.d.ts +22 -1
  6. package/dist/core/engine.d.ts +7 -0
  7. package/dist/core/engine.js +9 -0
  8. package/dist/credentials/policy.d.ts +53 -1
  9. package/dist/credentials/policy.js +146 -6
  10. package/dist/credentials/registry.d.ts +9 -0
  11. package/dist/credentials/registry.js +179 -22
  12. package/dist/credentials/transport.d.ts +48 -2
  13. package/dist/credentials/transport.js +248 -70
  14. package/dist/credentials/types.d.ts +167 -10
  15. package/dist/index.d.ts +5 -5
  16. package/dist/index.js +2 -2
  17. package/dist/plugin/api.d.ts +7 -0
  18. package/dist/plugin/api.js +7 -0
  19. package/dist/plugin/types.d.ts +12 -0
  20. package/dist/plugins/_shared/credentialAdapter.js +79 -15
  21. package/dist/plugins/_shared/credentials.js +389 -0
  22. package/dist/plugins/_shared/googleAuth.js +9 -40
  23. package/dist/plugins/_shared/googleCredentials.js +28 -7
  24. package/dist/plugins/_shared/microsoftAuth.js +13 -44
  25. package/dist/plugins/_shared/microsoftCredentials.js +30 -8
  26. package/dist/plugins/_shared/provider.js +2 -14
  27. package/dist/plugins/_shared/shiftCloud.js +22 -34
  28. package/dist/plugins/_shared/shiftCredentials.js +83 -0
  29. package/dist/plugins/_shared/shiftUpload.js +1 -1
  30. package/dist/plugins/actionNetwork/src/credentials.js +14 -0
  31. package/dist/plugins/actionNetwork/src/index.js +39 -50
  32. package/dist/plugins/activeCampaign/src/credentials.js +22 -0
  33. package/dist/plugins/activeCampaign/src/index.js +61 -132
  34. package/dist/plugins/adalo/src/credentials.js +16 -0
  35. package/dist/plugins/adalo/src/index.js +19 -43
  36. package/dist/plugins/affinity/src/credentials.js +19 -0
  37. package/dist/plugins/affinity/src/index.js +29 -54
  38. package/dist/plugins/agileCrm/src/credentials.js +16 -0
  39. package/dist/plugins/agileCrm/src/index.js +46 -112
  40. package/dist/plugins/airtable/src/credentials.js +19 -0
  41. package/dist/plugins/airtable/src/index.js +37 -50
  42. package/dist/plugins/airtop/src/credentials.js +20 -0
  43. package/dist/plugins/airtop/src/index.js +51 -75
  44. package/dist/plugins/apiTemplateIo/src/credentials.js +19 -0
  45. package/dist/plugins/apiTemplateIo/src/index.js +14 -31
  46. package/dist/plugins/asana/src/credentials.js +19 -0
  47. package/dist/plugins/asana/src/index.js +51 -72
  48. package/dist/plugins/autopilot/src/credentials.js +19 -0
  49. package/dist/plugins/autopilot/src/index.js +38 -45
  50. package/dist/plugins/bambooHr/src/credentials.js +16 -0
  51. package/dist/plugins/bambooHr/src/index.js +41 -67
  52. package/dist/plugins/bannerbear/src/credentials.js +19 -0
  53. package/dist/plugins/bannerbear/src/index.js +15 -27
  54. package/dist/plugins/baserow/src/credentials.js +17 -0
  55. package/dist/plugins/baserow/src/index.js +23 -49
  56. package/dist/plugins/beeminder/src/credentials.js +19 -0
  57. package/dist/plugins/beeminder/src/index.js +32 -54
  58. package/dist/plugins/bitly/src/credentials.js +19 -0
  59. package/dist/plugins/bitly/src/index.js +12 -26
  60. package/dist/plugins/bitwarden/src/credentials.js +62 -0
  61. package/dist/plugins/bitwarden/src/index.js +34 -80
  62. package/dist/plugins/box/src/credentials.js +19 -0
  63. package/dist/plugins/box/src/index.js +24 -49
  64. package/dist/plugins/brandfetch/src/credentials.js +13 -0
  65. package/dist/plugins/brandfetch/src/index.js +12 -17
  66. package/dist/plugins/brevo/src/credentials.js +19 -0
  67. package/dist/plugins/brevo/src/index.js +30 -51
  68. package/dist/plugins/bubble/src/credentials.js +28 -0
  69. package/dist/plugins/bubble/src/index.js +29 -65
  70. package/dist/plugins/chargebee/src/credentials.js +16 -0
  71. package/dist/plugins/chargebee/src/index.js +15 -45
  72. package/dist/plugins/circleci/src/credentials.js +19 -0
  73. package/dist/plugins/circleci/src/index.js +19 -39
  74. package/dist/plugins/ciscoWebex/src/credentials.js +19 -0
  75. package/dist/plugins/ciscoWebex/src/index.js +43 -61
  76. package/dist/plugins/clearbit/src/credentials.js +22 -0
  77. package/dist/plugins/clearbit/src/index.js +11 -21
  78. package/dist/plugins/clickup/src/credentials.js +19 -0
  79. package/dist/plugins/clickup/src/index.js +85 -117
  80. package/dist/plugins/clockify/src/credentials.js +19 -0
  81. package/dist/plugins/clockify/src/index.js +46 -61
  82. package/dist/plugins/cloudflare/src/credentials.js +19 -0
  83. package/dist/plugins/cloudflare/src/index.js +19 -34
  84. package/dist/plugins/cockpit/src/credentials.js +17 -0
  85. package/dist/plugins/cockpit/src/index.js +18 -31
  86. package/dist/plugins/coda/src/credentials.js +19 -0
  87. package/dist/plugins/coda/src/index.js +33 -50
  88. package/dist/plugins/coingecko/src/credentials.js +20 -0
  89. package/dist/plugins/coingecko/src/index.js +24 -34
  90. package/dist/plugins/contentful/src/credentials.js +26 -0
  91. package/dist/plugins/contentful/src/index.js +19 -40
  92. package/dist/plugins/convertkit/src/credentials.js +26 -0
  93. package/dist/plugins/convertkit/src/index.js +27 -45
  94. package/dist/plugins/copper/src/credentials.js +17 -0
  95. package/dist/plugins/copper/src/index.js +25 -47
  96. package/dist/plugins/cortex/src/credentials.js +28 -0
  97. package/dist/plugins/cortex/src/index.js +26 -49
  98. package/dist/plugins/currents/src/credentials.js +19 -0
  99. package/dist/plugins/currents/src/index.js +46 -59
  100. package/dist/plugins/customerIo/src/credentials.js +52 -0
  101. package/dist/plugins/customerIo/src/index.js +30 -58
  102. package/dist/plugins/databricks/src/credentials.js +13 -0
  103. package/dist/plugins/databricks/src/index.js +51 -103
  104. package/dist/plugins/deepl/src/credentials.js +19 -0
  105. package/dist/plugins/deepl/src/index.js +13 -39
  106. package/dist/plugins/demio/src/credentials.js +26 -0
  107. package/dist/plugins/demio/src/index.js +17 -41
  108. package/dist/plugins/dhl/src/credentials.js +13 -0
  109. package/dist/plugins/dhl/src/index.js +8 -19
  110. package/dist/plugins/discord/src/credentials.js +19 -0
  111. package/dist/plugins/discord/src/index.js +30 -58
  112. package/dist/plugins/discourse/src/credentials.js +18 -0
  113. package/dist/plugins/discourse/src/index.js +36 -53
  114. package/dist/plugins/disqus/src/credentials.js +13 -0
  115. package/dist/plugins/disqus/src/index.js +14 -32
  116. package/dist/plugins/drift/src/credentials.js +13 -0
  117. package/dist/plugins/drift/src/index.js +16 -26
  118. package/dist/plugins/dropbox/src/credentials.js +13 -0
  119. package/dist/plugins/dropbox/src/index.js +23 -30
  120. package/dist/plugins/dropcontact/src/credentials.js +13 -0
  121. package/dist/plugins/dropcontact/src/index.js +13 -18
  122. package/dist/plugins/egoi/src/credentials.js +19 -0
  123. package/dist/plugins/egoi/src/index.js +23 -38
  124. package/dist/plugins/elasticsearch/src/credentials.js +18 -0
  125. package/dist/plugins/elasticsearch/src/index.js +27 -48
  126. package/dist/plugins/elevenlabs/src/credentials.js +30 -0
  127. package/dist/plugins/elevenlabs/src/index.js +4 -1
  128. package/dist/plugins/elevenlabs/src/schemas.js +2 -1
  129. package/dist/plugins/elevenlabs/src/shared.js +74 -35
  130. package/dist/plugins/elevenlabs/src/workflows.js +2 -2
  131. package/dist/plugins/emelia/src/credentials.js +14 -0
  132. package/dist/plugins/emelia/src/index.js +19 -23
  133. package/dist/plugins/erpnext/src/credentials.js +27 -0
  134. package/dist/plugins/erpnext/src/index.js +21 -42
  135. package/dist/plugins/facebookGraph/src/credentials.js +20 -0
  136. package/dist/plugins/facebookGraph/src/index.js +39 -37
  137. package/dist/plugins/fal/src/credentials.js +14 -0
  138. package/dist/plugins/fal/src/index.js +4 -2
  139. package/dist/plugins/fal/src/shared.js +58 -63
  140. package/dist/plugins/freshdesk/src/credentials.js +20 -0
  141. package/dist/plugins/freshdesk/src/index.js +25 -46
  142. package/dist/plugins/freshservice/src/credentials.js +16 -0
  143. package/dist/plugins/freshservice/src/index.js +37 -58
  144. package/dist/plugins/freshworksCrm/src/credentials.js +16 -0
  145. package/dist/plugins/freshworksCrm/src/index.js +20 -39
  146. package/dist/plugins/getresponse/src/credentials.js +22 -0
  147. package/dist/plugins/getresponse/src/index.js +20 -32
  148. package/dist/plugins/gett/src/credentials.js +64 -0
  149. package/dist/plugins/gett/src/index.js +11 -6
  150. package/dist/plugins/gett/src/login.js +24 -0
  151. package/dist/plugins/gett/src/session.js +15 -38
  152. package/dist/plugins/gett/src/shared.js +41 -84
  153. package/dist/plugins/ghost/src/credentials.js +36 -0
  154. package/dist/plugins/ghost/src/index.js +18 -59
  155. package/dist/plugins/github/src/credentials.js +18 -0
  156. package/dist/plugins/github/src/index.js +55 -78
  157. package/dist/plugins/gitlab/src/credentials.js +24 -0
  158. package/dist/plugins/gitlab/src/index.js +29 -48
  159. package/dist/plugins/gmail/src/index.js +26 -24
  160. package/dist/plugins/gong/src/credentials.js +16 -0
  161. package/dist/plugins/gong/src/index.js +16 -32
  162. package/dist/plugins/googleAppsScript/src/index.js +108 -42
  163. package/dist/plugins/googleCalendar/src/index.js +15 -13
  164. package/dist/plugins/googleContacts/src/index.js +12 -9
  165. package/dist/plugins/googleDocs/src/index.js +2 -0
  166. package/dist/plugins/googleDocs/src/shared.js +2 -1
  167. package/dist/plugins/googleDrive/src/index.js +50 -53
  168. package/dist/plugins/googleImage/src/credentials.js +14 -0
  169. package/dist/plugins/googleImage/src/index.js +14 -25
  170. package/dist/plugins/googleSheets/src/index.js +26 -27
  171. package/dist/plugins/googleSlides/src/index.js +6 -4
  172. package/dist/plugins/googleTasks/src/index.js +13 -11
  173. package/dist/plugins/gotify/src/credentials.js +32 -0
  174. package/dist/plugins/gotify/src/index.js +14 -36
  175. package/dist/plugins/gotowebinar/src/credentials.js +13 -0
  176. package/dist/plugins/gotowebinar/src/index.js +52 -69
  177. package/dist/plugins/grafana/src/credentials.js +16 -0
  178. package/dist/plugins/grafana/src/index.js +34 -53
  179. package/dist/plugins/graphql/src/credentials.js +42 -0
  180. package/dist/plugins/graphql/src/index.js +21 -46
  181. package/dist/plugins/grist/src/credentials.js +30 -0
  182. package/dist/plugins/grist/src/index.js +14 -43
  183. package/dist/plugins/halopsa/src/credentials.js +56 -0
  184. package/dist/plugins/halopsa/src/index.js +20 -47
  185. package/dist/plugins/harvest/src/credentials.js +20 -0
  186. package/dist/plugins/harvest/src/index.js +24 -43
  187. package/dist/plugins/helpscout/src/credentials.js +13 -0
  188. package/dist/plugins/helpscout/src/index.js +26 -38
  189. package/dist/plugins/highlevel/src/credentials.js +19 -0
  190. package/dist/plugins/highlevel/src/index.js +34 -63
  191. package/dist/plugins/homeAssistant/src/credentials.js +27 -0
  192. package/dist/plugins/homeAssistant/src/index.js +34 -52
  193. package/dist/plugins/hubspot/src/credentials.js +16 -0
  194. package/dist/plugins/hubspot/src/index.js +29 -41
  195. package/dist/plugins/humanticAi/src/credentials.js +13 -0
  196. package/dist/plugins/humanticAi/src/index.js +15 -22
  197. package/dist/plugins/hunter/src/credentials.js +13 -0
  198. package/dist/plugins/hunter/src/index.js +18 -17
  199. package/dist/plugins/intercom/src/credentials.js +19 -0
  200. package/dist/plugins/intercom/src/index.js +25 -38
  201. package/dist/plugins/iterable/src/credentials.js +17 -0
  202. package/dist/plugins/iterable/src/index.js +26 -40
  203. package/dist/plugins/jenkins/src/credentials.js +16 -0
  204. package/dist/plugins/jenkins/src/index.js +22 -36
  205. package/dist/plugins/jira/src/credentials.js +16 -0
  206. package/dist/plugins/jira/src/index.js +35 -61
  207. package/dist/plugins/keap/src/credentials.js +19 -0
  208. package/dist/plugins/keap/src/index.js +43 -71
  209. package/dist/plugins/kobotoolbox/src/credentials.js +13 -0
  210. package/dist/plugins/kobotoolbox/src/index.js +46 -84
  211. package/dist/plugins/lemlist/src/credentials.js +19 -0
  212. package/dist/plugins/lemlist/src/index.js +35 -47
  213. package/dist/plugins/linear/src/attachments.js +7 -7
  214. package/dist/plugins/linear/src/comments.js +7 -7
  215. package/dist/plugins/linear/src/credentials.js +17 -0
  216. package/dist/plugins/linear/src/cycles.js +5 -5
  217. package/dist/plugins/linear/src/index.js +2 -0
  218. package/dist/plugins/linear/src/initiatives.js +6 -6
  219. package/dist/plugins/linear/src/issues.js +14 -14
  220. package/dist/plugins/linear/src/labels.js +6 -6
  221. package/dist/plugins/linear/src/organization.js +2 -2
  222. package/dist/plugins/linear/src/projects.js +12 -12
  223. package/dist/plugins/linear/src/shared.js +34 -32
  224. package/dist/plugins/linear/src/states.js +3 -3
  225. package/dist/plugins/linear/src/teams.js +4 -4
  226. package/dist/plugins/linear/src/users.js +3 -3
  227. package/dist/plugins/linear/src/views.js +5 -5
  228. package/dist/plugins/linear/src/webhooks.js +5 -5
  229. package/dist/plugins/lingvanex/src/credentials.js +13 -0
  230. package/dist/plugins/lingvanex/src/index.js +7 -9
  231. package/dist/plugins/linkedin/src/credentials.js +17 -0
  232. package/dist/plugins/linkedin/src/index.js +13 -17
  233. package/dist/plugins/lonescale/src/credentials.js +13 -0
  234. package/dist/plugins/lonescale/src/index.js +16 -26
  235. package/dist/plugins/magento/src/credentials.js +16 -0
  236. package/dist/plugins/magento/src/index.js +67 -84
  237. package/dist/plugins/mailcheck/src/credentials.js +17 -0
  238. package/dist/plugins/mailcheck/src/index.js +7 -9
  239. package/dist/plugins/mailchimp/src/credentials.js +32 -0
  240. package/dist/plugins/mailchimp/src/index.js +36 -44
  241. package/dist/plugins/mailerlite/src/credentials.js +13 -0
  242. package/dist/plugins/mailerlite/src/index.js +19 -32
  243. package/dist/plugins/mailgun/src/credentials.js +21 -0
  244. package/dist/plugins/mailgun/src/index.js +15 -21
  245. package/dist/plugins/mailjet/src/credentials.js +38 -0
  246. package/dist/plugins/mailjet/src/index.js +60 -115
  247. package/dist/plugins/mandrill/src/credentials.js +17 -0
  248. package/dist/plugins/mandrill/src/index.js +11 -12
  249. package/dist/plugins/marketstack/src/credentials.js +16 -0
  250. package/dist/plugins/marketstack/src/index.js +18 -28
  251. package/dist/plugins/matrix/src/credentials.js +19 -0
  252. package/dist/plugins/matrix/src/index.js +23 -52
  253. package/dist/plugins/mattermost/src/credentials.js +19 -0
  254. package/dist/plugins/mattermost/src/index.js +41 -73
  255. package/dist/plugins/mautic/src/credentials.js +16 -0
  256. package/dist/plugins/mautic/src/index.js +46 -62
  257. package/dist/plugins/medium/src/credentials.js +20 -0
  258. package/dist/plugins/medium/src/index.js +18 -23
  259. package/dist/plugins/messagebird/src/credentials.js +22 -0
  260. package/dist/plugins/messagebird/src/index.js +13 -18
  261. package/dist/plugins/metabase/src/credentials.js +19 -0
  262. package/dist/plugins/metabase/src/index.js +24 -40
  263. package/dist/plugins/microsoftCalendar/src/index.js +48 -12
  264. package/dist/plugins/microsoftFiles/src/index.js +90 -25
  265. package/dist/plugins/microsoftMail/src/index.js +62 -15
  266. package/dist/plugins/misp/src/credentials.js +16 -0
  267. package/dist/plugins/misp/src/index.js +60 -71
  268. package/dist/plugins/mocean/src/credentials.js +17 -0
  269. package/dist/plugins/mocean/src/index.js +11 -23
  270. package/dist/plugins/monday/src/credentials.js +14 -0
  271. package/dist/plugins/monday/src/index.js +31 -44
  272. package/dist/plugins/monicaCrm/src/credentials.js +19 -0
  273. package/dist/plugins/monicaCrm/src/index.js +25 -42
  274. package/dist/plugins/msg91/src/credentials.js +10 -0
  275. package/dist/plugins/msg91/src/index.js +15 -11
  276. package/dist/plugins/nasa/src/credentials.js +22 -0
  277. package/dist/plugins/nasa/src/index.js +24 -28
  278. package/dist/plugins/netlify/src/credentials.js +19 -0
  279. package/dist/plugins/netlify/src/index.js +27 -51
  280. package/dist/plugins/netscalerAdc/src/credentials.js +18 -0
  281. package/dist/plugins/netscalerAdc/src/index.js +16 -31
  282. package/dist/plugins/nextcloud/src/credentials.js +27 -0
  283. package/dist/plugins/nextcloud/src/index.js +55 -109
  284. package/dist/plugins/nocodb/src/credentials.js +16 -0
  285. package/dist/plugins/nocodb/src/index.js +19 -37
  286. package/dist/plugins/notion/src/credentials.js +21 -0
  287. package/dist/plugins/notion/src/index.js +25 -38
  288. package/dist/plugins/npm/src/credentials.js +19 -0
  289. package/dist/plugins/npm/src/index.js +22 -32
  290. package/dist/plugins/odoo/src/credentials.js +21 -0
  291. package/dist/plugins/odoo/src/index.js +53 -69
  292. package/dist/plugins/okta/src/credentials.js +23 -0
  293. package/dist/plugins/okta/src/index.js +30 -35
  294. package/dist/plugins/oneSimpleApi/src/credentials.js +16 -0
  295. package/dist/plugins/oneSimpleApi/src/index.js +19 -24
  296. package/dist/plugins/onfleet/src/credentials.js +23 -0
  297. package/dist/plugins/onfleet/src/index.js +42 -53
  298. package/dist/plugins/openai/src/credentials.js +13 -0
  299. package/dist/plugins/openai/src/index.js +15 -23
  300. package/dist/plugins/openweathermap/src/credentials.js +16 -0
  301. package/dist/plugins/openweathermap/src/index.js +22 -22
  302. package/dist/plugins/oura/src/credentials.js +19 -0
  303. package/dist/plugins/oura/src/index.js +13 -18
  304. package/dist/plugins/paddle/src/credentials.js +27 -0
  305. package/dist/plugins/paddle/src/index.js +20 -36
  306. package/dist/plugins/pagerduty/src/credentials.js +24 -0
  307. package/dist/plugins/pagerduty/src/index.js +30 -39
  308. package/dist/plugins/parallel/src/credentials.js +18 -0
  309. package/dist/plugins/parallel/src/index.js +16 -22
  310. package/dist/plugins/paypal/src/credentials.js +44 -0
  311. package/dist/plugins/paypal/src/index.js +14 -40
  312. package/dist/plugins/peekalink/src/credentials.js +16 -0
  313. package/dist/plugins/peekalink/src/index.js +10 -11
  314. package/dist/plugins/phantombuster/src/credentials.js +19 -0
  315. package/dist/plugins/phantombuster/src/index.js +19 -32
  316. package/dist/plugins/philipsHue/src/credentials.js +17 -0
  317. package/dist/plugins/philipsHue/src/index.js +15 -27
  318. package/dist/plugins/pipedrive/src/credentials.js +26 -0
  319. package/dist/plugins/pipedrive/src/index.js +43 -73
  320. package/dist/plugins/plaud/src/index.js +2 -1
  321. package/dist/plugins/plaud/src/shared.js +23 -19
  322. package/dist/plugins/plivo/src/credentials.js +20 -0
  323. package/dist/plugins/plivo/src/index.js +13 -19
  324. package/dist/plugins/posthog/src/credentials.js +18 -0
  325. package/dist/plugins/posthog/src/index.js +14 -20
  326. package/dist/plugins/profitwell/src/credentials.js +22 -0
  327. package/dist/plugins/profitwell/src/index.js +10 -17
  328. package/dist/plugins/pushbullet/src/credentials.js +19 -0
  329. package/dist/plugins/pushbullet/src/index.js +19 -27
  330. package/dist/plugins/pushcut/src/credentials.js +19 -0
  331. package/dist/plugins/pushcut/src/index.js +7 -8
  332. package/dist/plugins/pushover/src/credentials.js +14 -0
  333. package/dist/plugins/pushover/src/index.js +7 -12
  334. package/dist/plugins/quickbase/src/credentials.js +15 -0
  335. package/dist/plugins/quickbase/src/index.js +24 -34
  336. package/dist/plugins/quickbooks/src/credentials.js +22 -0
  337. package/dist/plugins/quickbooks/src/index.js +17 -46
  338. package/dist/plugins/raindrop/src/credentials.js +19 -0
  339. package/dist/plugins/raindrop/src/index.js +30 -32
  340. package/dist/plugins/recraft/src/credentials.js +13 -0
  341. package/dist/plugins/recraft/src/index.js +38 -27
  342. package/dist/plugins/reddit/src/credentials.js +26 -0
  343. package/dist/plugins/reddit/src/index.js +30 -34
  344. package/dist/plugins/replicate/src/credentials.js +23 -0
  345. package/dist/plugins/replicate/src/index.js +17 -27
  346. package/dist/plugins/rocketchat/src/credentials.js +17 -0
  347. package/dist/plugins/rocketchat/src/index.js +8 -19
  348. package/dist/plugins/rundeck/src/credentials.js +16 -0
  349. package/dist/plugins/rundeck/src/index.js +12 -28
  350. package/dist/plugins/salesforce/src/credentials.js +73 -0
  351. package/dist/plugins/salesforce/src/index.js +6 -0
  352. package/dist/plugins/salesforce/src/metadata.js +3 -16
  353. package/dist/plugins/salesforce/src/shared.js +25 -100
  354. package/dist/plugins/salesforce/src/sobjects.js +10 -9
  355. package/dist/plugins/salesmate/src/credentials.js +17 -0
  356. package/dist/plugins/salesmate/src/index.js +20 -37
  357. package/dist/plugins/securityScorecard/src/credentials.js +22 -0
  358. package/dist/plugins/securityScorecard/src/index.js +24 -37
  359. package/dist/plugins/segment/src/credentials.js +16 -0
  360. package/dist/plugins/segment/src/index.js +12 -16
  361. package/dist/plugins/sendgrid/src/credentials.js +13 -0
  362. package/dist/plugins/sendgrid/src/index.js +31 -35
  363. package/dist/plugins/sendy/src/credentials.js +18 -0
  364. package/dist/plugins/sendy/src/index.js +18 -24
  365. package/dist/plugins/sentry/src/credentials.js +16 -0
  366. package/dist/plugins/sentry/src/index.js +30 -98
  367. package/dist/plugins/servicenow/src/credentials.js +13 -0
  368. package/dist/plugins/servicenow/src/index.js +22 -41
  369. package/dist/plugins/shiftAtlas/src/graph.js +2 -2
  370. package/dist/plugins/shiftAtlas/src/index.js +2 -0
  371. package/dist/plugins/shiftAtlas/src/shared.js +3 -1
  372. package/dist/plugins/shiftBwm/src/collections.js +201 -0
  373. package/dist/plugins/shiftBwm/src/index.js +35 -0
  374. package/dist/plugins/shiftBwm/src/records.js +180 -0
  375. package/dist/plugins/shiftBwm/src/shared.js +168 -0
  376. package/dist/plugins/shiftBwm/src/vendor/client.js +227 -0
  377. package/dist/plugins/shiftBwm/src/vendor/contracts.js +59 -0
  378. package/dist/plugins/shiftBwm/src/vendor/models.js +525 -0
  379. package/dist/plugins/shiftCrm/src/access.js +2 -2
  380. package/dist/plugins/shiftCrm/src/accounts.js +3 -3
  381. package/dist/plugins/shiftCrm/src/activities.js +3 -3
  382. package/dist/plugins/shiftCrm/src/credentials.js +6 -0
  383. package/dist/plugins/shiftCrm/src/index.js +2 -0
  384. package/dist/plugins/shiftCrm/src/opportunities.js +3 -3
  385. package/dist/plugins/shiftCrm/src/people.js +3 -3
  386. package/dist/plugins/shiftCrm/src/records.js +2 -2
  387. package/dist/plugins/shiftCrm/src/shared.js +2 -1
  388. package/dist/plugins/shiftCrm/src/tasks.js +3 -3
  389. package/dist/plugins/shiftObjects/src/credentials.js +2 -0
  390. package/dist/plugins/shiftObjects/src/index.js +2 -0
  391. package/dist/plugins/shiftObjects/src/objects.js +3 -3
  392. package/dist/plugins/shiftOcr/src/credentials.js +8 -0
  393. package/dist/plugins/shiftOcr/src/index.js +5 -2
  394. package/dist/plugins/shiftPages/src/index.js +2 -0
  395. package/dist/plugins/shiftPages/src/pages.js +5 -3
  396. package/dist/plugins/shiftPages/src/shared.js +3 -1
  397. package/dist/plugins/shiftTranscription/src/index.js +2 -0
  398. package/dist/plugins/shiftTranscription/src/shared.js +11 -1
  399. package/dist/plugins/shiftTranscription/src/transcription.js +3 -2
  400. package/dist/plugins/shiftWork/src/index.js +2 -0
  401. package/dist/plugins/shiftWork/src/issue-views.js +5 -5
  402. package/dist/plugins/shiftWork/src/issues.js +11 -7
  403. package/dist/plugins/shiftWork/src/projects.js +3 -3
  404. package/dist/plugins/shiftWork/src/shared.js +3 -1
  405. package/dist/plugins/shopify/src/credentials.js +16 -0
  406. package/dist/plugins/shopify/src/index.js +32 -59
  407. package/dist/plugins/signl4/src/credentials.js +17 -0
  408. package/dist/plugins/signl4/src/index.js +28 -29
  409. package/dist/plugins/slack/src/credentials.js +19 -0
  410. package/dist/plugins/slack/src/index.js +51 -60
  411. package/dist/plugins/sms77/src/credentials.js +17 -0
  412. package/dist/plugins/sms77/src/index.js +11 -16
  413. package/dist/plugins/splunk/src/credentials.js +19 -0
  414. package/dist/plugins/splunk/src/index.js +32 -74
  415. package/dist/plugins/spotify/src/credentials.js +19 -0
  416. package/dist/plugins/spotify/src/index.js +40 -55
  417. package/dist/plugins/stackby/src/credentials.js +13 -0
  418. package/dist/plugins/stackby/src/index.js +14 -23
  419. package/dist/plugins/steel/src/auth.js +27 -0
  420. package/dist/plugins/steel/src/browser.js +4 -3
  421. package/dist/plugins/steel/src/captchas.js +4 -3
  422. package/dist/plugins/steel/src/extensions.js +3 -2
  423. package/dist/plugins/steel/src/files.js +9 -10
  424. package/dist/plugins/steel/src/index.js +2 -0
  425. package/dist/plugins/steel/src/page/tools.js +3 -3
  426. package/dist/plugins/steel/src/profiles.js +4 -3
  427. package/dist/plugins/steel/src/sessions.js +13 -13
  428. package/dist/plugins/steel/src/shared.js +21 -51
  429. package/dist/plugins/storyblok/src/credentials.js +37 -0
  430. package/dist/plugins/storyblok/src/index.js +22 -66
  431. package/dist/plugins/strapi/src/credentials.js +71 -0
  432. package/dist/plugins/strapi/src/index.js +36 -70
  433. package/dist/plugins/strava/src/credentials.js +19 -0
  434. package/dist/plugins/strava/src/index.js +16 -33
  435. package/dist/plugins/stripe/src/credentials.js +19 -0
  436. package/dist/plugins/stripe/src/index.js +44 -58
  437. package/dist/plugins/supabase/src/credentials.js +30 -0
  438. package/dist/plugins/supabase/src/index.js +18 -40
  439. package/dist/plugins/syncromsp/src/credentials.js +16 -0
  440. package/dist/plugins/syncromsp/src/index.js +37 -70
  441. package/dist/plugins/tapfiliate/src/credentials.js +13 -0
  442. package/dist/plugins/tapfiliate/src/index.js +21 -31
  443. package/dist/plugins/telegram/src/credentials.js +20 -0
  444. package/dist/plugins/telegram/src/index.js +31 -39
  445. package/dist/plugins/thehive/src/credentials.js +14 -0
  446. package/dist/plugins/thehive/src/index.js +33 -50
  447. package/dist/plugins/thehiveProject/src/credentials.js +16 -0
  448. package/dist/plugins/thehiveProject/src/index.js +53 -122
  449. package/dist/plugins/todoist/src/credentials.js +26 -0
  450. package/dist/plugins/todoist/src/index.js +49 -79
  451. package/dist/plugins/together/src/credentials.js +16 -0
  452. package/dist/plugins/together/src/index.js +30 -32
  453. package/dist/plugins/travisci/src/credentials.js +24 -0
  454. package/dist/plugins/travisci/src/index.js +16 -30
  455. package/dist/plugins/trello/src/credentials.js +29 -0
  456. package/dist/plugins/trello/src/index.js +49 -64
  457. package/dist/plugins/twake/src/credentials.js +16 -0
  458. package/dist/plugins/twake/src/index.js +8 -10
  459. package/dist/plugins/twilio/src/credentials.js +23 -0
  460. package/dist/plugins/twilio/src/index.js +12 -26
  461. package/dist/plugins/twist/src/credentials.js +13 -0
  462. package/dist/plugins/twist/src/index.js +32 -44
  463. package/dist/plugins/twitter/src/credentials.js +16 -0
  464. package/dist/plugins/twitter/src/index.js +25 -37
  465. package/dist/plugins/typesafe/src/credentials.js +28 -0
  466. package/dist/plugins/typesafe/src/index.js +3 -1
  467. package/dist/plugins/typesafe/src/shared.js +23 -35
  468. package/dist/plugins/unleashedSoftware/src/credentials.js +21 -0
  469. package/dist/plugins/unleashedSoftware/src/index.js +13 -37
  470. package/dist/plugins/uplead/src/credentials.js +16 -0
  471. package/dist/plugins/uplead/src/index.js +11 -16
  472. package/dist/plugins/uproc/src/credentials.js +14 -0
  473. package/dist/plugins/uproc/src/index.js +7 -10
  474. package/dist/plugins/uptimerobot/src/credentials.js +14 -0
  475. package/dist/plugins/uptimerobot/src/index.js +28 -39
  476. package/dist/plugins/urlscanio/src/credentials.js +13 -0
  477. package/dist/plugins/urlscanio/src/index.js +13 -22
  478. package/dist/plugins/vercel/src/credentials.js +19 -0
  479. package/dist/plugins/vercel/src/deployments.js +27 -11
  480. package/dist/plugins/vercel/src/env.js +31 -12
  481. package/dist/plugins/vercel/src/index.js +2 -0
  482. package/dist/plugins/vercel/src/projects.js +6 -3
  483. package/dist/plugins/vercel/src/shared.js +32 -37
  484. package/dist/plugins/vero/src/credentials.js +17 -0
  485. package/dist/plugins/vero/src/index.js +18 -21
  486. package/dist/plugins/vonage/src/credentials.js +17 -0
  487. package/dist/plugins/vonage/src/index.js +14 -18
  488. package/dist/plugins/wekan/src/credentials.js +16 -0
  489. package/dist/plugins/wekan/src/index.js +33 -46
  490. package/dist/plugins/wolt/src/account.js +6 -0
  491. package/dist/plugins/wolt/src/catalog.js +2 -2
  492. package/dist/plugins/wolt/src/credentials.js +64 -0
  493. package/dist/plugins/wolt/src/index.js +8 -3
  494. package/dist/plugins/wolt/src/orders.js +2 -2
  495. package/dist/plugins/wolt/src/public.js +91 -0
  496. package/dist/plugins/wolt/src/shared.js +49 -158
  497. package/dist/plugins/woocommerce/src/credentials.js +16 -0
  498. package/dist/plugins/woocommerce/src/index.js +19 -37
  499. package/dist/plugins/wordpress/src/credentials.js +16 -0
  500. package/dist/plugins/wordpress/src/index.js +23 -42
  501. package/dist/plugins/xai/src/credentials.js +13 -0
  502. package/dist/plugins/xai/src/index.js +31 -30
  503. package/dist/plugins/xero/src/credentials.js +17 -0
  504. package/dist/plugins/xero/src/index.js +19 -36
  505. package/dist/plugins/yourls/src/credentials.js +17 -0
  506. package/dist/plugins/yourls/src/index.js +13 -23
  507. package/dist/plugins/zammad/src/credentials.js +15 -0
  508. package/dist/plugins/zammad/src/index.js +27 -47
  509. package/dist/plugins/zendesk/src/credentials.js +26 -0
  510. package/dist/plugins/zendesk/src/index.js +29 -48
  511. package/dist/plugins/zoho/src/credentials.js +17 -0
  512. package/dist/plugins/zoho/src/index.js +18 -38
  513. package/dist/plugins/zoom/src/credentials.js +19 -0
  514. package/dist/plugins/zoom/src/index.js +15 -30
  515. package/dist/plugins/zulip/src/credentials.js +16 -0
  516. package/dist/plugins/zulip/src/index.js +36 -42
  517. package/dist/sdk.d.ts +8 -0
  518. package/dist/sdk.js +3 -0
  519. package/package.json +3 -2
  520. package/dist/plugins/_shared/authedFetch.js +0 -33
  521. package/dist/plugins/_shared/tokenRefresh.js +0 -41
@@ -1,46 +1,25 @@
1
- const BASE_URL = "https://api.clickup.com/api/v2";
2
- async function apiRequest(token, method, endpoint, body, qs) {
3
- const url = new URL(`${BASE_URL}${endpoint}`);
4
- if (qs) {
5
- for (const [k, v] of Object.entries(qs)) {
6
- if (v !== undefined && v !== null) {
7
- if (Array.isArray(v)) {
8
- for (const item of v)
9
- url.searchParams.append(`${k}[]`, String(item));
10
- }
11
- else {
12
- url.searchParams.set(k, String(v));
13
- }
14
- }
15
- }
16
- }
17
- const opts = {
1
+ import { credentialJson, pathSegment } from "../../_shared/credentials.js";
2
+ import { clickupCredential } from "./credentials.js";
3
+ function apiRequest(ctx, method, endpoint, body, qs) {
4
+ // ClickUp's array parameters use the `key[]` convention.
5
+ const query = {};
6
+ for (const [k, v] of Object.entries(qs ?? {}))
7
+ query[Array.isArray(v) ? `${k}[]` : k] = v;
8
+ return credentialJson(ctx, clickupCredential, "clickup", {
9
+ target: "api",
10
+ path: endpoint,
18
11
  method,
19
- headers: { "Content-Type": "application/json", Authorization: token },
20
- };
21
- if (body &&
22
- Object.keys(body).length > 0 &&
23
- method !== "GET" &&
24
- method !== "DELETE") {
25
- opts.body = JSON.stringify(body);
26
- }
27
- const res = await fetch(url.toString(), opts);
28
- if (!res.ok) {
29
- const text = await res.text();
30
- throw new Error(`ClickUp API error ${res.status}: ${text}`);
31
- }
32
- if (res.status === 204)
33
- return { success: true };
34
- const ct = res.headers.get("content-type") ?? "";
35
- if (ct.includes("application/json"))
36
- return res.json();
37
- return { success: true };
12
+ query,
13
+ ...(body && Object.keys(body).length > 0 && method !== "GET"
14
+ ? { json: body }
15
+ : {}),
16
+ });
38
17
  }
39
- async function paginateAll(token, endpoint, property, qs, limit) {
18
+ async function paginateAll(ctx, endpoint, property, qs, limit) {
40
19
  const results = [];
41
20
  let page = 0;
42
21
  while (true) {
43
- const data = (await apiRequest(token, "GET", endpoint, undefined, {
22
+ const data = (await apiRequest(ctx, "GET", endpoint, undefined, {
44
23
  ...qs,
45
24
  page,
46
25
  }));
@@ -54,12 +33,10 @@ async function paginateAll(token, endpoint, property, qs, limit) {
54
33
  }
55
34
  return results;
56
35
  }
57
- function getToken(ctx) {
58
- return ctx.connection.config.accessToken;
59
- }
60
36
  export default function clickup(rl) {
61
37
  rl.setName("clickup");
62
38
  rl.setVersion("0.1.0");
39
+ rl.setCredential(clickupCredential);
63
40
  rl.setConnectionSchema({
64
41
  accessToken: {
65
42
  type: "string",
@@ -78,7 +55,7 @@ export default function clickup(rl) {
78
55
  },
79
56
  async execute(input, ctx) {
80
57
  const { taskId, name } = input;
81
- const data = (await apiRequest(getToken(ctx), "POST", `/task/${taskId}/checklist`, { name }));
58
+ const data = (await apiRequest(ctx, "POST", `task/${pathSegment(taskId)}/checklist`, { name }));
82
59
  return data.checklist;
83
60
  },
84
61
  });
@@ -96,7 +73,7 @@ export default function clickup(rl) {
96
73
  },
97
74
  async execute(input, ctx) {
98
75
  const { checklistId, ...body } = input;
99
- const data = (await apiRequest(getToken(ctx), "PUT", `/checklist/${checklistId}`, body));
76
+ const data = (await apiRequest(ctx, "PUT", `checklist/${pathSegment(checklistId)}`, body));
100
77
  return data.checklist;
101
78
  },
102
79
  });
@@ -112,7 +89,7 @@ export default function clickup(rl) {
112
89
  },
113
90
  async execute(input, ctx) {
114
91
  const { checklistId } = input;
115
- await apiRequest(getToken(ctx), "DELETE", `/checklist/${checklistId}`);
92
+ await apiRequest(ctx, "DELETE", `checklist/${pathSegment(checklistId)}`);
116
93
  return { success: true };
117
94
  },
118
95
  });
@@ -138,7 +115,7 @@ export default function clickup(rl) {
138
115
  const body = { name };
139
116
  if (assignee)
140
117
  body.assignee = assignee;
141
- const data = (await apiRequest(getToken(ctx), "POST", `/checklist/${checklistId}/checklist_item`, body));
118
+ const data = (await apiRequest(ctx, "POST", `checklist/${pathSegment(checklistId)}/checklist_item`, body));
142
119
  return data.checklist;
143
120
  },
144
121
  });
@@ -167,7 +144,7 @@ export default function clickup(rl) {
167
144
  },
168
145
  async execute(input, ctx) {
169
146
  const { checklistId, checklistItemId, ...body } = input;
170
- const data = (await apiRequest(getToken(ctx), "PUT", `/checklist/${checklistId}/checklist_item/${checklistItemId}`, body));
147
+ const data = (await apiRequest(ctx, "PUT", `checklist/${pathSegment(checklistId)}/checklist_item/${pathSegment(checklistItemId)}`, body));
171
148
  return data.checklist;
172
149
  },
173
150
  });
@@ -188,7 +165,7 @@ export default function clickup(rl) {
188
165
  },
189
166
  async execute(input, ctx) {
190
167
  const { checklistId, checklistItemId } = input;
191
- await apiRequest(getToken(ctx), "DELETE", `/checklist/${checklistId}/checklist_item/${checklistItemId}`);
168
+ await apiRequest(ctx, "DELETE", `checklist/${pathSegment(checklistId)}/checklist_item/${pathSegment(checklistItemId)}`);
192
169
  return { success: true };
193
170
  },
194
171
  });
@@ -226,7 +203,7 @@ export default function clickup(rl) {
226
203
  body.assignee = assignee;
227
204
  if (notifyAll)
228
205
  body.notify_all = notifyAll;
229
- return apiRequest(getToken(ctx), "POST", `/${commentOn}/${id}/comment`, body);
206
+ return apiRequest(ctx, "POST", `${pathSegment(commentOn)}/${pathSegment(id)}/comment`, body);
230
207
  },
231
208
  });
232
209
  rl.registerAction("comment.list", {
@@ -243,7 +220,7 @@ export default function clickup(rl) {
243
220
  },
244
221
  async execute(input, ctx) {
245
222
  const { commentsOn, id, limit } = input;
246
- const data = (await apiRequest(getToken(ctx), "GET", `/${commentsOn}/${id}/comment`));
223
+ const data = (await apiRequest(ctx, "GET", `${pathSegment(commentsOn)}/${pathSegment(id)}/comment`));
247
224
  const comments = data.comments ?? [];
248
225
  if (limit)
249
226
  return comments.slice(0, limit);
@@ -268,7 +245,7 @@ export default function clickup(rl) {
268
245
  body.assignee = assignee;
269
246
  if (resolved !== undefined)
270
247
  body.resolved = resolved;
271
- await apiRequest(getToken(ctx), "PUT", `/comment/${commentId}`, body);
248
+ await apiRequest(ctx, "PUT", `comment/${pathSegment(commentId)}`, body);
272
249
  return { success: true };
273
250
  },
274
251
  });
@@ -280,7 +257,7 @@ export default function clickup(rl) {
280
257
  },
281
258
  async execute(input, ctx) {
282
259
  const { commentId } = input;
283
- await apiRequest(getToken(ctx), "DELETE", `/comment/${commentId}`);
260
+ await apiRequest(ctx, "DELETE", `comment/${pathSegment(commentId)}`);
284
261
  return { success: true };
285
262
  },
286
263
  });
@@ -294,7 +271,7 @@ export default function clickup(rl) {
294
271
  },
295
272
  async execute(input, ctx) {
296
273
  const { spaceId, name } = input;
297
- return apiRequest(getToken(ctx), "POST", `/space/${spaceId}/folder`, {
274
+ return apiRequest(ctx, "POST", `space/${pathSegment(spaceId)}/folder`, {
298
275
  name,
299
276
  });
300
277
  },
@@ -306,7 +283,7 @@ export default function clickup(rl) {
306
283
  folderId: { type: "string", required: true, description: "Folder ID" },
307
284
  },
308
285
  async execute(input, ctx) {
309
- return apiRequest(getToken(ctx), "GET", `/folder/${input.folderId}`);
286
+ return apiRequest(ctx, "GET", `folder/${pathSegment(input.folderId)}`);
310
287
  },
311
288
  });
312
289
  rl.registerAction("folder.list", {
@@ -326,7 +303,7 @@ export default function clickup(rl) {
326
303
  const qs = {};
327
304
  if (archived)
328
305
  qs.archived = archived;
329
- const data = (await apiRequest(getToken(ctx), "GET", `/space/${spaceId}/folder`, undefined, qs));
306
+ const data = (await apiRequest(ctx, "GET", `space/${pathSegment(spaceId)}/folder`, undefined, qs));
330
307
  const folders = data.folders ?? [];
331
308
  if (limit)
332
309
  return folders.slice(0, limit);
@@ -342,7 +319,7 @@ export default function clickup(rl) {
342
319
  },
343
320
  async execute(input, ctx) {
344
321
  const { folderId, ...body } = input;
345
- return apiRequest(getToken(ctx), "PUT", `/folder/${folderId}`, body);
322
+ return apiRequest(ctx, "PUT", `folder/${pathSegment(folderId)}`, body);
346
323
  },
347
324
  });
348
325
  rl.registerAction("folder.delete", {
@@ -352,7 +329,7 @@ export default function clickup(rl) {
352
329
  folderId: { type: "string", required: true, description: "Folder ID" },
353
330
  },
354
331
  async execute(input, ctx) {
355
- await apiRequest(getToken(ctx), "DELETE", `/folder/${input.folderId}`);
332
+ await apiRequest(ctx, "DELETE", `folder/${pathSegment(input.folderId)}`);
356
333
  return { success: true };
357
334
  },
358
335
  });
@@ -398,7 +375,7 @@ export default function clickup(rl) {
398
375
  body.owners = owners;
399
376
  if (multipleOwners !== undefined)
400
377
  body.multiple_owners = multipleOwners;
401
- const data = (await apiRequest(getToken(ctx), "POST", `/team/${teamId}/goal`, body));
378
+ const data = (await apiRequest(ctx, "POST", `team/${pathSegment(teamId)}/goal`, body));
402
379
  return data.goal;
403
380
  },
404
381
  });
@@ -409,7 +386,7 @@ export default function clickup(rl) {
409
386
  goalId: { type: "string", required: true, description: "Goal ID" },
410
387
  },
411
388
  async execute(input, ctx) {
412
- const data = (await apiRequest(getToken(ctx), "GET", `/goal/${input.goalId}`));
389
+ const data = (await apiRequest(ctx, "GET", `goal/${pathSegment(input.goalId)}`));
413
390
  return data.goal;
414
391
  },
415
392
  });
@@ -422,7 +399,7 @@ export default function clickup(rl) {
422
399
  },
423
400
  async execute(input, ctx) {
424
401
  const { teamId, limit } = input;
425
- const data = (await apiRequest(getToken(ctx), "GET", `/team/${teamId}/goal`));
402
+ const data = (await apiRequest(ctx, "GET", `team/${pathSegment(teamId)}/goal`));
426
403
  const goals = data.goals ?? [];
427
404
  if (limit)
428
405
  return goals.slice(0, limit);
@@ -456,14 +433,13 @@ export default function clickup(rl) {
456
433
  async execute(input, ctx) {
457
434
  const { goalId, dueDate, addOwners, removeOwners, ...rest } = input;
458
435
  const body = { ...rest };
459
- delete body.goalId;
460
436
  if (dueDate)
461
437
  body.due_date = new Date(dueDate).getTime();
462
438
  if (addOwners)
463
439
  body.add_owners = addOwners;
464
440
  if (removeOwners)
465
441
  body.rem_owners = removeOwners;
466
- const data = (await apiRequest(getToken(ctx), "PUT", `/goal/${goalId}`, body));
442
+ const data = (await apiRequest(ctx, "PUT", `goal/${pathSegment(goalId)}`, body));
467
443
  return data.goal;
468
444
  },
469
445
  });
@@ -474,7 +450,7 @@ export default function clickup(rl) {
474
450
  goalId: { type: "string", required: true, description: "Goal ID" },
475
451
  },
476
452
  async execute(input, ctx) {
477
- await apiRequest(getToken(ctx), "DELETE", `/goal/${input.goalId}`);
453
+ await apiRequest(ctx, "DELETE", `goal/${pathSegment(input.goalId)}`);
478
454
  return { success: true };
479
455
  },
480
456
  });
@@ -516,7 +492,6 @@ export default function clickup(rl) {
516
492
  async execute(input, ctx) {
517
493
  const { goalId, stepsStart, stepsEnd, taskIds, listIds, ...rest } = input;
518
494
  const body = { ...rest };
519
- delete body.goalId;
520
495
  if (stepsStart !== undefined)
521
496
  body.steps_start = stepsStart;
522
497
  if (stepsEnd !== undefined)
@@ -525,7 +500,7 @@ export default function clickup(rl) {
525
500
  body.task_ids = taskIds;
526
501
  if (listIds)
527
502
  body.list_ids = listIds;
528
- const data = (await apiRequest(getToken(ctx), "POST", `/goal/${goalId}/key_result`, body));
503
+ const data = (await apiRequest(ctx, "POST", `goal/${pathSegment(goalId)}/key_result`, body));
529
504
  return data.key_result;
530
505
  },
531
506
  });
@@ -556,14 +531,13 @@ export default function clickup(rl) {
556
531
  async execute(input, ctx) {
557
532
  const { keyResultId, stepsCurrent, stepsStart, stepsEnd, ...rest } = input;
558
533
  const body = { ...rest };
559
- delete body.keyResultId;
560
534
  if (stepsCurrent !== undefined)
561
535
  body.steps_current = stepsCurrent;
562
536
  if (stepsStart !== undefined)
563
537
  body.steps_start = stepsStart;
564
538
  if (stepsEnd !== undefined)
565
539
  body.steps_end = stepsEnd;
566
- const data = (await apiRequest(getToken(ctx), "PUT", `/key_result/${keyResultId}`, body));
540
+ const data = (await apiRequest(ctx, "PUT", `key_result/${pathSegment(keyResultId)}`, body));
567
541
  return data.key_result;
568
542
  },
569
543
  });
@@ -578,7 +552,7 @@ export default function clickup(rl) {
578
552
  },
579
553
  },
580
554
  async execute(input, ctx) {
581
- await apiRequest(getToken(ctx), "DELETE", `/key_result/${input.keyResultId}`);
555
+ await apiRequest(ctx, "DELETE", `key_result/${pathSegment(input.keyResultId)}`);
582
556
  return { success: true };
583
557
  },
584
558
  });
@@ -614,7 +588,7 @@ export default function clickup(rl) {
614
588
  body.can_see_time_spend = canSeeTimeSpend;
615
589
  if (canSeeTimeEstimated !== undefined)
616
590
  body.can_see_time_estimated = canSeeTimeEstimated;
617
- const data = (await apiRequest(getToken(ctx), "POST", `/team/${teamId}/guest`, body));
591
+ const data = (await apiRequest(ctx, "POST", `team/${pathSegment(teamId)}/guest`, body));
618
592
  return data.team;
619
593
  },
620
594
  });
@@ -627,7 +601,7 @@ export default function clickup(rl) {
627
601
  },
628
602
  async execute(input, ctx) {
629
603
  const { teamId, guestId } = input;
630
- const data = (await apiRequest(getToken(ctx), "GET", `/team/${teamId}/guest/${guestId}`));
604
+ const data = (await apiRequest(ctx, "GET", `team/${pathSegment(teamId)}/guest/${pathSegment(guestId)}`));
631
605
  return data.team;
632
606
  },
633
607
  });
@@ -656,7 +630,7 @@ export default function clickup(rl) {
656
630
  },
657
631
  async execute(input, ctx) {
658
632
  const { teamId, guestId, ...body } = input;
659
- const data = (await apiRequest(getToken(ctx), "PUT", `/team/${teamId}/guest/${guestId}`, body));
633
+ const data = (await apiRequest(ctx, "PUT", `team/${pathSegment(teamId)}/guest/${pathSegment(guestId)}`, body));
660
634
  return data.team;
661
635
  },
662
636
  });
@@ -669,7 +643,7 @@ export default function clickup(rl) {
669
643
  },
670
644
  async execute(input, ctx) {
671
645
  const { teamId, guestId } = input;
672
- await apiRequest(getToken(ctx), "DELETE", `/team/${teamId}/guest/${guestId}`);
646
+ await apiRequest(ctx, "DELETE", `team/${pathSegment(teamId)}/guest/${pathSegment(guestId)}`);
673
647
  return { success: true };
674
648
  },
675
649
  });
@@ -736,7 +710,6 @@ export default function clickup(rl) {
736
710
  async execute(input, ctx) {
737
711
  const { listId, dueDate, startDate, timeEstimate, markdownContent, parentId, customFields, ...rest } = input;
738
712
  const body = { ...rest };
739
- delete body.listId;
740
713
  if (dueDate)
741
714
  body.due_date = new Date(dueDate).getTime();
742
715
  if (startDate)
@@ -751,7 +724,7 @@ export default function clickup(rl) {
751
724
  body.parent = parentId;
752
725
  if (customFields)
753
726
  body.custom_fields = customFields;
754
- return apiRequest(getToken(ctx), "POST", `/list/${listId}/task`, body);
727
+ return apiRequest(ctx, "POST", `list/${pathSegment(listId)}/task`, body);
755
728
  },
756
729
  });
757
730
  rl.registerAction("task.get", {
@@ -770,7 +743,7 @@ export default function clickup(rl) {
770
743
  const qs = {};
771
744
  if (includeSubtasks)
772
745
  qs.include_subtasks = true;
773
- return apiRequest(getToken(ctx), "GET", `/task/${taskId}`, undefined, qs);
746
+ return apiRequest(ctx, "GET", `task/${pathSegment(taskId)}`, undefined, qs);
774
747
  },
775
748
  });
776
749
  rl.registerAction("task.list", {
@@ -832,7 +805,7 @@ export default function clickup(rl) {
832
805
  qs.assignees = filters.assignees;
833
806
  if (filters.tags)
834
807
  qs.tags = filters.tags;
835
- return paginateAll(getToken(ctx), `/list/${listId}/task`, "tasks", qs, limit);
808
+ return paginateAll(ctx, `list/${pathSegment(listId)}/task`, "tasks", qs, limit);
836
809
  },
837
810
  });
838
811
  rl.registerAction("task.update", {
@@ -865,7 +838,6 @@ export default function clickup(rl) {
865
838
  async execute(input, ctx) {
866
839
  const { taskId, dueDate, startDate, timeEstimate, addAssignees, removeAssignees, ...rest } = input;
867
840
  const body = { ...rest };
868
- delete body.taskId;
869
841
  if (dueDate)
870
842
  body.due_date = new Date(dueDate).getTime();
871
843
  if (startDate)
@@ -873,7 +845,7 @@ export default function clickup(rl) {
873
845
  if (timeEstimate)
874
846
  body.time_estimate = timeEstimate * 60000;
875
847
  body.assignees = { add: addAssignees ?? [], rem: removeAssignees ?? [] };
876
- return apiRequest(getToken(ctx), "PUT", `/task/${taskId}`, body);
848
+ return apiRequest(ctx, "PUT", `task/${pathSegment(taskId)}`, body);
877
849
  },
878
850
  });
879
851
  rl.registerAction("task.delete", {
@@ -883,7 +855,7 @@ export default function clickup(rl) {
883
855
  taskId: { type: "string", required: true, description: "Task ID" },
884
856
  },
885
857
  async execute(input, ctx) {
886
- await apiRequest(getToken(ctx), "DELETE", `/task/${input.taskId}`);
858
+ await apiRequest(ctx, "DELETE", `task/${pathSegment(input.taskId)}`);
887
859
  return { success: true };
888
860
  },
889
861
  });
@@ -896,7 +868,7 @@ export default function clickup(rl) {
896
868
  },
897
869
  async execute(input, ctx) {
898
870
  const { taskId, limit } = input;
899
- const data = (await apiRequest(getToken(ctx), "GET", `/task/${taskId}/member`));
871
+ const data = (await apiRequest(ctx, "GET", `task/${pathSegment(taskId)}/member`));
900
872
  const members = data.members ?? [];
901
873
  if (limit)
902
874
  return members.slice(0, limit);
@@ -921,7 +893,7 @@ export default function clickup(rl) {
921
893
  },
922
894
  async execute(input, ctx) {
923
895
  const { taskId, fieldId, value } = input;
924
- return apiRequest(getToken(ctx), "POST", `/task/${taskId}/field/${fieldId}`, { value });
896
+ return apiRequest(ctx, "POST", `task/${pathSegment(taskId)}/field/${pathSegment(fieldId)}`, { value });
925
897
  },
926
898
  });
927
899
  // ── Task Tag ────────────────────────────────────────
@@ -934,7 +906,7 @@ export default function clickup(rl) {
934
906
  },
935
907
  async execute(input, ctx) {
936
908
  const { taskId, tagName } = input;
937
- await apiRequest(getToken(ctx), "POST", `/task/${taskId}/tag/${tagName}`);
909
+ await apiRequest(ctx, "POST", `task/${pathSegment(taskId)}/tag/${pathSegment(tagName)}`);
938
910
  return { success: true };
939
911
  },
940
912
  });
@@ -947,7 +919,7 @@ export default function clickup(rl) {
947
919
  },
948
920
  async execute(input, ctx) {
949
921
  const { taskId, tagName } = input;
950
- await apiRequest(getToken(ctx), "DELETE", `/task/${taskId}/tag/${tagName}`);
922
+ await apiRequest(ctx, "DELETE", `task/${pathSegment(taskId)}/tag/${pathSegment(tagName)}`);
951
923
  return { success: true };
952
924
  },
953
925
  });
@@ -961,7 +933,7 @@ export default function clickup(rl) {
961
933
  },
962
934
  async execute(input, ctx) {
963
935
  const { taskId, listId } = input;
964
- await apiRequest(getToken(ctx), "POST", `/list/${listId}/task/${taskId}`);
936
+ await apiRequest(ctx, "POST", `list/${pathSegment(listId)}/task/${pathSegment(taskId)}`);
965
937
  return { success: true };
966
938
  },
967
939
  });
@@ -974,7 +946,7 @@ export default function clickup(rl) {
974
946
  },
975
947
  async execute(input, ctx) {
976
948
  const { taskId, listId } = input;
977
- await apiRequest(getToken(ctx), "DELETE", `/list/${listId}/task/${taskId}`);
949
+ await apiRequest(ctx, "DELETE", `list/${pathSegment(listId)}/task/${pathSegment(taskId)}`);
978
950
  return { success: true };
979
951
  },
980
952
  });
@@ -992,7 +964,7 @@ export default function clickup(rl) {
992
964
  },
993
965
  async execute(input, ctx) {
994
966
  const { taskId, dependsOnTaskId } = input;
995
- await apiRequest(getToken(ctx), "POST", `/task/${taskId}/dependency`, {
967
+ await apiRequest(ctx, "POST", `task/${pathSegment(taskId)}/dependency`, {
996
968
  depends_on: dependsOnTaskId,
997
969
  });
998
970
  return { success: true };
@@ -1011,7 +983,7 @@ export default function clickup(rl) {
1011
983
  },
1012
984
  async execute(input, ctx) {
1013
985
  const { taskId, dependsOnTaskId } = input;
1014
- await apiRequest(getToken(ctx), "DELETE", `/task/${taskId}/dependency`, undefined, { depends_on: dependsOnTaskId });
986
+ await apiRequest(ctx, "DELETE", `task/${pathSegment(taskId)}/dependency`, undefined, { depends_on: dependsOnTaskId });
1015
987
  return { success: true };
1016
988
  },
1017
989
  });
@@ -1035,7 +1007,7 @@ export default function clickup(rl) {
1035
1007
  },
1036
1008
  async execute(input, ctx) {
1037
1009
  const { spaceId, name, foregroundColor, backgroundColor } = input;
1038
- await apiRequest(getToken(ctx), "POST", `/space/${spaceId}/tag`, {
1010
+ await apiRequest(ctx, "POST", `space/${pathSegment(spaceId)}/tag`, {
1039
1011
  tag: { name, tag_fg: foregroundColor, tag_bg: backgroundColor },
1040
1012
  });
1041
1013
  return { success: true };
@@ -1050,7 +1022,7 @@ export default function clickup(rl) {
1050
1022
  },
1051
1023
  async execute(input, ctx) {
1052
1024
  const { spaceId, limit } = input;
1053
- const data = (await apiRequest(getToken(ctx), "GET", `/space/${spaceId}/tag`));
1025
+ const data = (await apiRequest(ctx, "GET", `space/${pathSegment(spaceId)}/tag`));
1054
1026
  const tags = data.tags ?? [];
1055
1027
  if (limit)
1056
1028
  return tags.slice(0, limit);
@@ -1081,7 +1053,7 @@ export default function clickup(rl) {
1081
1053
  },
1082
1054
  async execute(input, ctx) {
1083
1055
  const { spaceId, tagName, newName, foregroundColor, backgroundColor } = input;
1084
- await apiRequest(getToken(ctx), "PUT", `/space/${spaceId}/tag/${tagName}`, {
1056
+ await apiRequest(ctx, "PUT", `space/${pathSegment(spaceId)}/tag/${pathSegment(tagName)}`, {
1085
1057
  tag: {
1086
1058
  name: newName,
1087
1059
  tag_fg: foregroundColor,
@@ -1100,7 +1072,7 @@ export default function clickup(rl) {
1100
1072
  },
1101
1073
  async execute(input, ctx) {
1102
1074
  const { spaceId, tagName } = input;
1103
- await apiRequest(getToken(ctx), "DELETE", `/space/${spaceId}/tag/${tagName}`);
1075
+ await apiRequest(ctx, "DELETE", `space/${pathSegment(spaceId)}/tag/${pathSegment(tagName)}`);
1104
1076
  return { success: true };
1105
1077
  },
1106
1078
  });
@@ -1133,14 +1105,12 @@ export default function clickup(rl) {
1133
1105
  async execute(input, ctx) {
1134
1106
  const { name, spaceId, folderId, dueDate, ...rest } = input;
1135
1107
  const body = { name, ...rest };
1136
- delete body.spaceId;
1137
- delete body.folderId;
1138
1108
  if (dueDate)
1139
1109
  body.due_date = new Date(dueDate).getTime();
1140
1110
  const endpoint = folderId
1141
- ? `/folder/${folderId}/list`
1142
- : `/space/${spaceId}/list`;
1143
- return apiRequest(getToken(ctx), "POST", endpoint, body);
1111
+ ? `folder/${pathSegment(folderId)}/list`
1112
+ : `space/${pathSegment(spaceId)}/list`;
1113
+ return apiRequest(ctx, "POST", endpoint, body);
1144
1114
  },
1145
1115
  });
1146
1116
  rl.registerAction("list.get", {
@@ -1150,7 +1120,7 @@ export default function clickup(rl) {
1150
1120
  listId: { type: "string", required: true, description: "List ID" },
1151
1121
  },
1152
1122
  async execute(input, ctx) {
1153
- return apiRequest(getToken(ctx), "GET", `/list/${input.listId}`);
1123
+ return apiRequest(ctx, "GET", `list/${pathSegment(input.listId)}`);
1154
1124
  },
1155
1125
  });
1156
1126
  rl.registerAction("list.list", {
@@ -1176,9 +1146,9 @@ export default function clickup(rl) {
1176
1146
  if (archived)
1177
1147
  qs.archived = archived;
1178
1148
  const endpoint = folderId
1179
- ? `/folder/${folderId}/list`
1180
- : `/space/${spaceId}/list`;
1181
- const data = (await apiRequest(getToken(ctx), "GET", endpoint, undefined, qs));
1149
+ ? `folder/${pathSegment(folderId)}/list`
1150
+ : `space/${pathSegment(spaceId)}/list`;
1151
+ const data = (await apiRequest(ctx, "GET", endpoint, undefined, qs));
1182
1152
  const lists = data.lists ?? [];
1183
1153
  if (limit)
1184
1154
  return lists.slice(0, limit);
@@ -1204,10 +1174,9 @@ export default function clickup(rl) {
1204
1174
  async execute(input, ctx) {
1205
1175
  const { listId, dueDate, ...rest } = input;
1206
1176
  const body = { ...rest };
1207
- delete body.listId;
1208
1177
  if (dueDate)
1209
1178
  body.due_date = new Date(dueDate).getTime();
1210
- return apiRequest(getToken(ctx), "PUT", `/list/${listId}`, body);
1179
+ return apiRequest(ctx, "PUT", `list/${pathSegment(listId)}`, body);
1211
1180
  },
1212
1181
  });
1213
1182
  rl.registerAction("list.delete", {
@@ -1217,7 +1186,7 @@ export default function clickup(rl) {
1217
1186
  listId: { type: "string", required: true, description: "List ID" },
1218
1187
  },
1219
1188
  async execute(input, ctx) {
1220
- await apiRequest(getToken(ctx), "DELETE", `/list/${input.listId}`);
1189
+ await apiRequest(ctx, "DELETE", `list/${pathSegment(input.listId)}`);
1221
1190
  return { success: true };
1222
1191
  },
1223
1192
  });
@@ -1230,7 +1199,7 @@ export default function clickup(rl) {
1230
1199
  },
1231
1200
  async execute(input, ctx) {
1232
1201
  const { listId, limit } = input;
1233
- const data = (await apiRequest(getToken(ctx), "GET", `/list/${listId}/member`));
1202
+ const data = (await apiRequest(ctx, "GET", `list/${pathSegment(listId)}/member`));
1234
1203
  const members = data.members ?? [];
1235
1204
  if (limit)
1236
1205
  return members.slice(0, limit);
@@ -1244,7 +1213,7 @@ export default function clickup(rl) {
1244
1213
  listId: { type: "string", required: true, description: "List ID" },
1245
1214
  },
1246
1215
  async execute(input, ctx) {
1247
- const data = (await apiRequest(getToken(ctx), "GET", `/list/${input.listId}/field`));
1216
+ const data = (await apiRequest(ctx, "GET", `list/${pathSegment(input.listId)}/field`));
1248
1217
  return data.fields;
1249
1218
  },
1250
1219
  });
@@ -1280,8 +1249,7 @@ export default function clickup(rl) {
1280
1249
  duration: duration * 60000,
1281
1250
  ...rest,
1282
1251
  };
1283
- delete body.teamId;
1284
- const data = (await apiRequest(getToken(ctx), "POST", `/team/${teamId}/time_entries`, body));
1252
+ const data = (await apiRequest(ctx, "POST", `team/${pathSegment(teamId)}/time_entries`, body));
1285
1253
  return data.data;
1286
1254
  },
1287
1255
  });
@@ -1299,9 +1267,9 @@ export default function clickup(rl) {
1299
1267
  async execute(input, ctx) {
1300
1268
  const { teamId, timeEntryId } = input;
1301
1269
  const endpoint = timeEntryId
1302
- ? `/team/${teamId}/time_entries/${timeEntryId}`
1303
- : `/team/${teamId}/time_entries/current`;
1304
- const data = (await apiRequest(getToken(ctx), "GET", endpoint));
1270
+ ? `team/${pathSegment(teamId)}/time_entries/${pathSegment(timeEntryId)}`
1271
+ : `team/${pathSegment(teamId)}/time_entries/current`;
1272
+ const data = (await apiRequest(ctx, "GET", endpoint));
1305
1273
  return data.data;
1306
1274
  },
1307
1275
  });
@@ -1337,7 +1305,7 @@ export default function clickup(rl) {
1337
1305
  qs.end_date = new Date(endDate).getTime();
1338
1306
  if (assignee)
1339
1307
  qs.assignee = assignee;
1340
- const data = (await apiRequest(getToken(ctx), "GET", `/team/${teamId}/time_entries`, undefined, qs));
1308
+ const data = (await apiRequest(ctx, "GET", `team/${pathSegment(teamId)}/time_entries`, undefined, qs));
1341
1309
  const entries = data.data ?? [];
1342
1310
  if (limit)
1343
1311
  return entries.slice(0, limit);
@@ -1374,7 +1342,7 @@ export default function clickup(rl) {
1374
1342
  body.start = new Date(start).getTime();
1375
1343
  if (duration)
1376
1344
  body.duration = duration * 60000;
1377
- const data = (await apiRequest(getToken(ctx), "PUT", `/team/${teamId}/time_entries/${timeEntryId}`, body));
1345
+ const data = (await apiRequest(ctx, "PUT", `team/${pathSegment(teamId)}/time_entries/${pathSegment(timeEntryId)}`, body));
1378
1346
  return data.data;
1379
1347
  },
1380
1348
  });
@@ -1394,7 +1362,7 @@ export default function clickup(rl) {
1394
1362
  async execute(input, ctx) {
1395
1363
  const { teamId, taskId, ...rest } = input;
1396
1364
  const body = { tid: taskId, ...rest };
1397
- const data = (await apiRequest(getToken(ctx), "POST", `/team/${teamId}/time_entries/start`, body));
1365
+ const data = (await apiRequest(ctx, "POST", `team/${pathSegment(teamId)}/time_entries/start`, body));
1398
1366
  return data.data;
1399
1367
  },
1400
1368
  });
@@ -1406,7 +1374,7 @@ export default function clickup(rl) {
1406
1374
  },
1407
1375
  async execute(input, ctx) {
1408
1376
  const { teamId } = input;
1409
- const data = (await apiRequest(getToken(ctx), "POST", `/team/${teamId}/time_entries/stop`));
1377
+ const data = (await apiRequest(ctx, "POST", `team/${pathSegment(teamId)}/time_entries/stop`));
1410
1378
  return data.data;
1411
1379
  },
1412
1380
  });
@@ -1423,7 +1391,7 @@ export default function clickup(rl) {
1423
1391
  },
1424
1392
  async execute(input, ctx) {
1425
1393
  const { teamId, timeEntryId } = input;
1426
- const data = (await apiRequest(getToken(ctx), "DELETE", `/team/${teamId}/time_entries/${timeEntryId}`));
1394
+ const data = (await apiRequest(ctx, "DELETE", `team/${pathSegment(teamId)}/time_entries/${pathSegment(timeEntryId)}`));
1427
1395
  return data.data;
1428
1396
  },
1429
1397
  });
@@ -1446,7 +1414,7 @@ export default function clickup(rl) {
1446
1414
  },
1447
1415
  async execute(input, ctx) {
1448
1416
  const { teamId, timeEntryIds, tags } = input;
1449
- await apiRequest(getToken(ctx), "POST", `/team/${teamId}/time_entries/tags`, {
1417
+ await apiRequest(ctx, "POST", `team/${pathSegment(teamId)}/time_entries/tags`, {
1450
1418
  time_entry_ids: timeEntryIds,
1451
1419
  tags,
1452
1420
  });
@@ -1462,7 +1430,7 @@ export default function clickup(rl) {
1462
1430
  },
1463
1431
  async execute(input, ctx) {
1464
1432
  const { teamId, limit } = input;
1465
- const data = (await apiRequest(getToken(ctx), "GET", `/team/${teamId}/time_entries/tags`));
1433
+ const data = (await apiRequest(ctx, "GET", `team/${pathSegment(teamId)}/time_entries/tags`));
1466
1434
  const tags = data.data ?? [];
1467
1435
  if (limit)
1468
1436
  return tags.slice(0, limit);
@@ -1487,7 +1455,7 @@ export default function clickup(rl) {
1487
1455
  },
1488
1456
  async execute(input, ctx) {
1489
1457
  const { teamId, timeEntryIds, tagNames } = input;
1490
- await apiRequest(getToken(ctx), "DELETE", `/team/${teamId}/time_entries/tags`, {
1458
+ await apiRequest(ctx, "DELETE", `team/${pathSegment(teamId)}/time_entries/tags`, {
1491
1459
  time_entry_ids: timeEntryIds,
1492
1460
  tags: tagNames,
1493
1461
  });