runline 0.2.1 → 0.2.2

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 (189) hide show
  1. package/dist/plugins/actionNetwork/src/index.js +118 -25
  2. package/dist/plugins/activeCampaign/src/index.js +184 -38
  3. package/dist/plugins/adalo/src/index.js +40 -8
  4. package/dist/plugins/affinity/src/index.js +100 -20
  5. package/dist/plugins/agileCrm/src/index.js +115 -27
  6. package/dist/plugins/airtable/src/index.js +94 -19
  7. package/dist/plugins/airtop/src/index.js +266 -62
  8. package/dist/plugins/apiTemplateIo/src/index.js +25 -5
  9. package/dist/plugins/asana/src/index.js +195 -41
  10. package/dist/plugins/autopilot/src/index.js +39 -8
  11. package/dist/plugins/bambooHr/src/index.js +109 -22
  12. package/dist/plugins/bannerbear/src/index.js +36 -8
  13. package/dist/plugins/baserow/src/index.js +35 -7
  14. package/dist/plugins/beeminder/src/index.js +198 -40
  15. package/dist/plugins/bitly/src/index.js +46 -10
  16. package/dist/plugins/bitwarden/src/index.js +167 -36
  17. package/dist/plugins/box/src/index.js +172 -37
  18. package/dist/plugins/brandfetch/src/index.js +5 -1
  19. package/dist/plugins/brevo/src/index.js +136 -29
  20. package/dist/plugins/bubble/src/index.js +76 -17
  21. package/dist/plugins/chargebee/src/index.js +35 -7
  22. package/dist/plugins/circleci/src/index.js +50 -10
  23. package/dist/plugins/ciscoWebex/src/index.js +131 -27
  24. package/dist/plugins/clearbit/src/index.js +76 -17
  25. package/dist/plugins/clickup/src/index.js +500 -107
  26. package/dist/plugins/clockify/src/index.js +229 -47
  27. package/dist/plugins/cloudflare/src/index.js +28 -6
  28. package/dist/plugins/cockpit/src/index.js +54 -12
  29. package/dist/plugins/coda/src/index.js +81 -19
  30. package/dist/plugins/coingecko/src/index.js +157 -33
  31. package/dist/plugins/contentful/src/index.js +85 -17
  32. package/dist/plugins/convertkit/src/index.js +74 -18
  33. package/dist/plugins/copper/src/index.js +59 -11
  34. package/dist/plugins/cortex/src/index.js +55 -13
  35. package/dist/plugins/currents/src/index.js +310 -71
  36. package/dist/plugins/customerIo/src/index.js +112 -23
  37. package/dist/plugins/databricks/src/index.js +549 -115
  38. package/dist/plugins/deepl/src/index.js +26 -6
  39. package/dist/plugins/demio/src/index.js +56 -11
  40. package/dist/plugins/dhl/src/index.js +16 -3
  41. package/dist/plugins/discord/src/index.js +141 -31
  42. package/dist/plugins/discourse/src/index.js +136 -31
  43. package/dist/plugins/disqus/src/index.js +96 -20
  44. package/dist/plugins/docker/src/index.js +20 -4
  45. package/dist/plugins/drift/src/index.js +19 -5
  46. package/dist/plugins/dropbox/src/index.js +139 -30
  47. package/dist/plugins/dropcontact/src/index.js +21 -4
  48. package/dist/plugins/egoi/src/index.js +61 -15
  49. package/dist/plugins/elasticsearch/src/index.js +59 -13
  50. package/dist/plugins/emelia/src/index.js +95 -19
  51. package/dist/plugins/erpnext/src/index.js +74 -15
  52. package/dist/plugins/facebookGraph/src/index.js +52 -11
  53. package/dist/plugins/freshdesk/src/index.js +220 -48
  54. package/dist/plugins/freshservice/src/index.js +39 -9
  55. package/dist/plugins/freshworksCrm/src/index.js +58 -12
  56. package/dist/plugins/getresponse/src/index.js +87 -18
  57. package/dist/plugins/ghost/src/index.js +114 -26
  58. package/dist/plugins/github/src/index.js +483 -109
  59. package/dist/plugins/gitlab/src/index.js +193 -45
  60. package/dist/plugins/gong/src/index.js +68 -14
  61. package/dist/plugins/gotify/src/index.js +43 -9
  62. package/dist/plugins/gotowebinar/src/index.js +233 -47
  63. package/dist/plugins/grafana/src/index.js +92 -21
  64. package/dist/plugins/graphql/src/index.js +38 -8
  65. package/dist/plugins/grist/src/index.js +52 -10
  66. package/dist/plugins/hackernews/src/index.js +32 -6
  67. package/dist/plugins/halopsa/src/index.js +131 -26
  68. package/dist/plugins/harvest/src/index.js +182 -42
  69. package/dist/plugins/helpscout/src/index.js +153 -31
  70. package/dist/plugins/highlevel/src/index.js +291 -58
  71. package/dist/plugins/homeAssistant/src/index.js +124 -26
  72. package/dist/plugins/hubspot/src/index.js +163 -29
  73. package/dist/plugins/humanticAi/src/index.js +54 -5
  74. package/dist/plugins/hunter/src/index.js +21 -4
  75. package/dist/plugins/intercom/src/index.js +95 -20
  76. package/dist/plugins/iterable/src/index.js +96 -20
  77. package/dist/plugins/jenkins/src/index.js +75 -17
  78. package/dist/plugins/jira/src/index.js +193 -43
  79. package/dist/plugins/keap/src/index.js +222 -56
  80. package/dist/plugins/kobotoolbox/src/index.js +113 -25
  81. package/dist/plugins/lemlist/src/index.js +79 -18
  82. package/dist/plugins/linear/src/index.js +86 -19
  83. package/dist/plugins/lingvanex/src/index.js +38 -8
  84. package/dist/plugins/linkedin/src/index.js +37 -8
  85. package/dist/plugins/lonescale/src/index.js +41 -9
  86. package/dist/plugins/magento/src/index.js +98 -27
  87. package/dist/plugins/mailcheck/src/index.js +11 -2
  88. package/dist/plugins/mailchimp/src/index.js +193 -42
  89. package/dist/plugins/mailerlite/src/index.js +61 -12
  90. package/dist/plugins/mailgun/src/index.js +39 -7
  91. package/dist/plugins/mailjet/src/index.js +141 -30
  92. package/dist/plugins/mandrill/src/index.js +67 -14
  93. package/dist/plugins/marketstack/src/index.js +56 -10
  94. package/dist/plugins/matrix/src/index.js +97 -20
  95. package/dist/plugins/mattermost/src/index.js +124 -26
  96. package/dist/plugins/mautic/src/index.js +129 -26
  97. package/dist/plugins/medium/src/index.js +64 -13
  98. package/dist/plugins/messagebird/src/index.js +80 -15
  99. package/dist/plugins/metabase/src/index.js +57 -12
  100. package/dist/plugins/misp/src/index.js +135 -33
  101. package/dist/plugins/mocean/src/index.js +33 -7
  102. package/dist/plugins/monday/src/index.js +97 -23
  103. package/dist/plugins/monicaCrm/src/index.js +112 -23
  104. package/dist/plugins/msg91/src/index.js +11 -2
  105. package/dist/plugins/nasa/src/index.js +108 -21
  106. package/dist/plugins/netlify/src/index.js +28 -6
  107. package/dist/plugins/netscalerAdc/src/index.js +144 -29
  108. package/dist/plugins/nextcloud/src/index.js +103 -20
  109. package/dist/plugins/nocodb/src/index.js +57 -11
  110. package/dist/plugins/notion/src/index.js +148 -37
  111. package/dist/plugins/npm/src/index.js +59 -12
  112. package/dist/plugins/odoo/src/index.js +102 -20
  113. package/dist/plugins/okta/src/index.js +50 -10
  114. package/dist/plugins/oneSimpleApi/src/index.js +84 -17
  115. package/dist/plugins/onfleet/src/index.js +139 -32
  116. package/dist/plugins/openThesaurus/src/index.js +46 -9
  117. package/dist/plugins/openweathermap/src/index.js +31 -6
  118. package/dist/plugins/oura/src/index.js +36 -7
  119. package/dist/plugins/paddle/src/index.js +80 -17
  120. package/dist/plugins/pagerduty/src/index.js +53 -12
  121. package/dist/plugins/paypal/src/index.js +51 -11
  122. package/dist/plugins/peekalink/src/index.js +12 -3
  123. package/dist/plugins/phantombuster/src/index.js +39 -8
  124. package/dist/plugins/philipsHue/src/index.js +64 -13
  125. package/dist/plugins/pipedrive/src/index.js +167 -45
  126. package/dist/plugins/plivo/src/index.js +43 -8
  127. package/dist/plugins/postbin/src/index.js +9 -2
  128. package/dist/plugins/posthog/src/index.js +50 -13
  129. package/dist/plugins/profitwell/src/index.js +24 -5
  130. package/dist/plugins/pushbullet/src/index.js +45 -9
  131. package/dist/plugins/pushcut/src/index.js +31 -6
  132. package/dist/plugins/pushover/src/index.js +51 -10
  133. package/dist/plugins/quickbase/src/index.js +66 -13
  134. package/dist/plugins/quickbooks/src/index.js +86 -19
  135. package/dist/plugins/quickchart/src/index.js +35 -7
  136. package/dist/plugins/raindrop/src/index.js +54 -13
  137. package/dist/plugins/reddit/src/index.js +73 -18
  138. package/dist/plugins/rocketchat/src/index.js +47 -9
  139. package/dist/plugins/rundeck/src/index.js +26 -5
  140. package/dist/plugins/salesforce/src/index.js +161 -31
  141. package/dist/plugins/salesmate/src/index.js +75 -16
  142. package/dist/plugins/securityScorecard/src/index.js +73 -15
  143. package/dist/plugins/segment/src/index.js +21 -4
  144. package/dist/plugins/sendgrid/src/index.js +102 -24
  145. package/dist/plugins/sendy/src/index.js +54 -11
  146. package/dist/plugins/sentry/src/index.js +174 -34
  147. package/dist/plugins/servicenow/src/index.js +120 -27
  148. package/dist/plugins/shopify/src/index.js +53 -12
  149. package/dist/plugins/signl4/src/index.js +16 -3
  150. package/dist/plugins/slack/src/index.js +407 -105
  151. package/dist/plugins/sms77/src/index.js +26 -5
  152. package/dist/plugins/splunk/src/index.js +186 -45
  153. package/dist/plugins/spotify/src/index.js +265 -66
  154. package/dist/plugins/stackby/src/index.js +18 -6
  155. package/dist/plugins/storyblok/src/index.js +57 -11
  156. package/dist/plugins/strapi/src/index.js +63 -12
  157. package/dist/plugins/strava/src/index.js +58 -13
  158. package/dist/plugins/stripe/src/index.js +143 -30
  159. package/dist/plugins/supabase/src/index.js +49 -10
  160. package/dist/plugins/syncromsp/src/index.js +245 -67
  161. package/dist/plugins/tapfiliate/src/index.js +57 -14
  162. package/dist/plugins/telegram/src/index.js +202 -39
  163. package/dist/plugins/thehive/src/index.js +271 -66
  164. package/dist/plugins/thehiveProject/src/index.js +457 -89
  165. package/dist/plugins/todoist/src/index.js +326 -77
  166. package/dist/plugins/travisci/src/index.js +35 -8
  167. package/dist/plugins/trello/src/index.js +204 -46
  168. package/dist/plugins/twake/src/index.js +10 -2
  169. package/dist/plugins/twilio/src/index.js +56 -11
  170. package/dist/plugins/twist/src/index.js +241 -48
  171. package/dist/plugins/twitter/src/index.js +128 -30
  172. package/dist/plugins/unleashedSoftware/src/index.js +30 -6
  173. package/dist/plugins/uplead/src/index.js +9 -2
  174. package/dist/plugins/uproc/src/index.js +31 -6
  175. package/dist/plugins/uptimerobot/src/index.js +119 -25
  176. package/dist/plugins/urlscanio/src/index.js +25 -6
  177. package/dist/plugins/vero/src/index.js +68 -13
  178. package/dist/plugins/vonage/src/index.js +32 -6
  179. package/dist/plugins/wekan/src/index.js +297 -52
  180. package/dist/plugins/woocommerce/src/index.js +57 -12
  181. package/dist/plugins/wordpress/src/index.js +94 -18
  182. package/dist/plugins/xero/src/index.js +79 -13
  183. package/dist/plugins/yourls/src/index.js +33 -6
  184. package/dist/plugins/zammad/src/index.js +139 -36
  185. package/dist/plugins/zendesk/src/index.js +201 -48
  186. package/dist/plugins/zoho/src/index.js +88 -21
  187. package/dist/plugins/zoom/src/index.js +41 -7
  188. package/dist/plugins/zulip/src/index.js +101 -20
  189. package/package.json +1 -1
@@ -6,7 +6,13 @@ async function api(token, method, endpoint, body, qs) {
6
6
  url.searchParams.set(k, String(v));
7
7
  }
8
8
  }
9
- const init = { method, headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json; charset=utf-8" } };
9
+ const init = {
10
+ method,
11
+ headers: {
12
+ Authorization: `Bearer ${token}`,
13
+ "Content-Type": "application/json; charset=utf-8",
14
+ },
15
+ };
10
16
  if (body && Object.keys(body).length > 0)
11
17
  init.body = JSON.stringify(body);
12
18
  const res = await fetch(url.toString(), init);
@@ -20,11 +26,26 @@ async function api(token, method, endpoint, body, qs) {
20
26
  export default function slack(rl) {
21
27
  rl.setName("slack");
22
28
  rl.setVersion("0.1.0");
23
- rl.setConnectionSchema({ accessToken: { type: "string", required: true, description: "Slack Bot/User token", env: "SLACK_ACCESS_TOKEN" } });
29
+ rl.setConnectionSchema({
30
+ accessToken: {
31
+ type: "string",
32
+ required: true,
33
+ description: "Slack Bot/User token",
34
+ env: "SLACK_ACCESS_TOKEN",
35
+ },
36
+ });
24
37
  const t = (ctx) => ctx.connection.config.accessToken;
25
38
  // ── Message ─────────────────────────────────────────
26
- rl.registerAction("message.post", { description: "Post a message to a channel or user",
27
- inputSchema: { channel: { type: "string", required: true }, text: { type: "string", required: false }, blocks: { type: "object", required: false }, threadTs: { type: "string", required: false }, replyBroadcast: { type: "boolean", required: false }, unfurlLinks: { type: "boolean", required: false } },
39
+ rl.registerAction("message.post", {
40
+ description: "Post a message to a channel or user",
41
+ inputSchema: {
42
+ channel: { type: "string", required: true },
43
+ text: { type: "string", required: false },
44
+ blocks: { type: "object", required: false },
45
+ threadTs: { type: "string", required: false },
46
+ replyBroadcast: { type: "boolean", required: false },
47
+ unfurlLinks: { type: "boolean", required: false },
48
+ },
28
49
  async execute(input, ctx) {
29
50
  const p = input;
30
51
  const body = { channel: p.channel };
@@ -39,18 +60,55 @@ export default function slack(rl) {
39
60
  if (p.unfurlLinks !== undefined)
40
61
  body.unfurl_links = p.unfurlLinks;
41
62
  return api(t(ctx), "POST", "/chat.postMessage", body);
42
- } });
43
- rl.registerAction("message.update", { description: "Update a message",
44
- inputSchema: { channel: { type: "string", required: true }, ts: { type: "string", required: true }, text: { type: "string", required: false }, blocks: { type: "object", required: false } },
45
- async execute(input, ctx) { return api(t(ctx), "POST", "/chat.update", input); } });
46
- rl.registerAction("message.delete", { description: "Delete a message",
47
- inputSchema: { channel: { type: "string", required: true }, ts: { type: "string", required: true } },
48
- async execute(input, ctx) { return api(t(ctx), "POST", "/chat.delete", input); } });
49
- rl.registerAction("message.getPermalink", { description: "Get a message permalink",
50
- inputSchema: { channel: { type: "string", required: true }, messageTs: { type: "string", required: true } },
51
- async execute(input, ctx) { const p = input; return api(t(ctx), "GET", "/chat.getPermalink", undefined, { channel: p.channel, message_ts: p.messageTs }); } });
52
- rl.registerAction("message.search", { description: "Search messages",
53
- inputSchema: { query: { type: "string", required: true }, sort: { type: "string", required: false, description: "score or timestamp" }, limit: { type: "number", required: false } },
63
+ },
64
+ });
65
+ rl.registerAction("message.update", {
66
+ description: "Update a message",
67
+ inputSchema: {
68
+ channel: { type: "string", required: true },
69
+ ts: { type: "string", required: true },
70
+ text: { type: "string", required: false },
71
+ blocks: { type: "object", required: false },
72
+ },
73
+ async execute(input, ctx) {
74
+ return api(t(ctx), "POST", "/chat.update", input);
75
+ },
76
+ });
77
+ rl.registerAction("message.delete", {
78
+ description: "Delete a message",
79
+ inputSchema: {
80
+ channel: { type: "string", required: true },
81
+ ts: { type: "string", required: true },
82
+ },
83
+ async execute(input, ctx) {
84
+ return api(t(ctx), "POST", "/chat.delete", input);
85
+ },
86
+ });
87
+ rl.registerAction("message.getPermalink", {
88
+ description: "Get a message permalink",
89
+ inputSchema: {
90
+ channel: { type: "string", required: true },
91
+ messageTs: { type: "string", required: true },
92
+ },
93
+ async execute(input, ctx) {
94
+ const p = input;
95
+ return api(t(ctx), "GET", "/chat.getPermalink", undefined, {
96
+ channel: p.channel,
97
+ message_ts: p.messageTs,
98
+ });
99
+ },
100
+ });
101
+ rl.registerAction("message.search", {
102
+ description: "Search messages",
103
+ inputSchema: {
104
+ query: { type: "string", required: true },
105
+ sort: {
106
+ type: "string",
107
+ required: false,
108
+ description: "score or timestamp",
109
+ },
110
+ limit: { type: "number", required: false },
111
+ },
54
112
  async execute(input, ctx) {
55
113
  const p = input;
56
114
  const qs = { query: p.query };
@@ -60,32 +118,64 @@ export default function slack(rl) {
60
118
  qs.count = p.limit;
61
119
  const data = (await api(t(ctx), "POST", "/search.messages", undefined, qs));
62
120
  return data.messages?.matches;
63
- } });
121
+ },
122
+ });
64
123
  // ── Channel ─────────────────────────────────────────
65
- rl.registerAction("channel.create", { description: "Create a channel",
66
- inputSchema: { name: { type: "string", required: true }, isPrivate: { type: "boolean", required: false } },
124
+ rl.registerAction("channel.create", {
125
+ description: "Create a channel",
126
+ inputSchema: {
127
+ name: { type: "string", required: true },
128
+ isPrivate: { type: "boolean", required: false },
129
+ },
67
130
  async execute(input, ctx) {
68
131
  const p = input;
69
- const data = (await api(t(ctx), "POST", "/conversations.create", { name: p.name, is_private: p.isPrivate ?? false }));
132
+ const data = (await api(t(ctx), "POST", "/conversations.create", {
133
+ name: p.name,
134
+ is_private: p.isPrivate ?? false,
135
+ }));
70
136
  return data.channel;
71
- } });
72
- rl.registerAction("channel.get", { description: "Get channel info",
137
+ },
138
+ });
139
+ rl.registerAction("channel.get", {
140
+ description: "Get channel info",
73
141
  inputSchema: { channel: { type: "string", required: true } },
74
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/conversations.info", undefined, { channel: input.channel })); return data.channel; } });
75
- rl.registerAction("channel.list", { description: "List channels",
76
- inputSchema: { limit: { type: "number", required: false }, types: { type: "string", required: false, description: "Comma-separated: public_channel,private_channel" }, excludeArchived: { type: "boolean", required: false } },
142
+ async execute(input, ctx) {
143
+ const data = (await api(t(ctx), "POST", "/conversations.info", undefined, { channel: input.channel }));
144
+ return data.channel;
145
+ },
146
+ });
147
+ rl.registerAction("channel.list", {
148
+ description: "List channels",
149
+ inputSchema: {
150
+ limit: { type: "number", required: false },
151
+ types: {
152
+ type: "string",
153
+ required: false,
154
+ description: "Comma-separated: public_channel,private_channel",
155
+ },
156
+ excludeArchived: { type: "boolean", required: false },
157
+ },
77
158
  async execute(input, ctx) {
78
159
  const p = (input ?? {});
79
- const qs = { types: p.types ?? "public_channel,private_channel" };
160
+ const qs = {
161
+ types: p.types ?? "public_channel,private_channel",
162
+ };
80
163
  if (p.limit)
81
164
  qs.limit = p.limit;
82
165
  if (p.excludeArchived)
83
166
  qs.exclude_archived = true;
84
167
  const data = (await api(t(ctx), "GET", "/conversations.list", undefined, qs));
85
168
  return data.channels;
86
- } });
87
- rl.registerAction("channel.history", { description: "Get channel message history",
88
- inputSchema: { channel: { type: "string", required: true }, limit: { type: "number", required: false }, oldest: { type: "string", required: false, description: "ISO datetime" }, latest: { type: "string", required: false } },
169
+ },
170
+ });
171
+ rl.registerAction("channel.history", {
172
+ description: "Get channel message history",
173
+ inputSchema: {
174
+ channel: { type: "string", required: true },
175
+ limit: { type: "number", required: false },
176
+ oldest: { type: "string", required: false, description: "ISO datetime" },
177
+ latest: { type: "string", required: false },
178
+ },
89
179
  async execute(input, ctx) {
90
180
  const p = input;
91
181
  const qs = { channel: p.channel };
@@ -97,9 +187,15 @@ export default function slack(rl) {
97
187
  qs.latest = new Date(p.latest).getTime() / 1000;
98
188
  const data = (await api(t(ctx), "GET", "/conversations.history", undefined, qs));
99
189
  return data.messages;
100
- } });
101
- rl.registerAction("channel.replies", { description: "Get thread replies",
102
- inputSchema: { channel: { type: "string", required: true }, ts: { type: "string", required: true }, limit: { type: "number", required: false } },
190
+ },
191
+ });
192
+ rl.registerAction("channel.replies", {
193
+ description: "Get thread replies",
194
+ inputSchema: {
195
+ channel: { type: "string", required: true },
196
+ ts: { type: "string", required: true },
197
+ limit: { type: "number", required: false },
198
+ },
103
199
  async execute(input, ctx) {
104
200
  const p = input;
105
201
  const qs = { channel: p.channel, ts: p.ts };
@@ -107,59 +203,172 @@ export default function slack(rl) {
107
203
  qs.limit = p.limit;
108
204
  const data = (await api(t(ctx), "GET", "/conversations.replies", undefined, qs));
109
205
  return data.messages;
110
- } });
111
- rl.registerAction("channel.invite", { description: "Invite users to a channel",
112
- inputSchema: { channel: { type: "string", required: true }, users: { type: "string", required: true, description: "Comma-separated user IDs" } },
113
- async execute(input, ctx) { const p = input; const data = (await api(t(ctx), "POST", "/conversations.invite", { channel: p.channel, users: p.users })); return data.channel; } });
114
- rl.registerAction("channel.kick", { description: "Remove a user from a channel",
115
- inputSchema: { channel: { type: "string", required: true }, user: { type: "string", required: true } },
116
- async execute(input, ctx) { return api(t(ctx), "POST", "/conversations.kick", input); } });
117
- rl.registerAction("channel.join", { description: "Join a channel",
206
+ },
207
+ });
208
+ rl.registerAction("channel.invite", {
209
+ description: "Invite users to a channel",
210
+ inputSchema: {
211
+ channel: { type: "string", required: true },
212
+ users: {
213
+ type: "string",
214
+ required: true,
215
+ description: "Comma-separated user IDs",
216
+ },
217
+ },
218
+ async execute(input, ctx) {
219
+ const p = input;
220
+ const data = (await api(t(ctx), "POST", "/conversations.invite", {
221
+ channel: p.channel,
222
+ users: p.users,
223
+ }));
224
+ return data.channel;
225
+ },
226
+ });
227
+ rl.registerAction("channel.kick", {
228
+ description: "Remove a user from a channel",
229
+ inputSchema: {
230
+ channel: { type: "string", required: true },
231
+ user: { type: "string", required: true },
232
+ },
233
+ async execute(input, ctx) {
234
+ return api(t(ctx), "POST", "/conversations.kick", input);
235
+ },
236
+ });
237
+ rl.registerAction("channel.join", {
238
+ description: "Join a channel",
118
239
  inputSchema: { channel: { type: "string", required: true } },
119
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/conversations.join", { channel: input.channel })); return data.channel; } });
120
- rl.registerAction("channel.leave", { description: "Leave a channel",
240
+ async execute(input, ctx) {
241
+ const data = (await api(t(ctx), "POST", "/conversations.join", {
242
+ channel: input.channel,
243
+ }));
244
+ return data.channel;
245
+ },
246
+ });
247
+ rl.registerAction("channel.leave", {
248
+ description: "Leave a channel",
121
249
  inputSchema: { channel: { type: "string", required: true } },
122
- async execute(input, ctx) { return api(t(ctx), "POST", "/conversations.leave", { channel: input.channel }); } });
123
- rl.registerAction("channel.archive", { description: "Archive a channel",
250
+ async execute(input, ctx) {
251
+ return api(t(ctx), "POST", "/conversations.leave", {
252
+ channel: input.channel,
253
+ });
254
+ },
255
+ });
256
+ rl.registerAction("channel.archive", {
257
+ description: "Archive a channel",
124
258
  inputSchema: { channel: { type: "string", required: true } },
125
- async execute(input, ctx) { return api(t(ctx), "POST", "/conversations.archive", { channel: input.channel }); } });
126
- rl.registerAction("channel.unarchive", { description: "Unarchive a channel",
259
+ async execute(input, ctx) {
260
+ return api(t(ctx), "POST", "/conversations.archive", {
261
+ channel: input.channel,
262
+ });
263
+ },
264
+ });
265
+ rl.registerAction("channel.unarchive", {
266
+ description: "Unarchive a channel",
127
267
  inputSchema: { channel: { type: "string", required: true } },
128
- async execute(input, ctx) { return api(t(ctx), "POST", "/conversations.unarchive", { channel: input.channel }); } });
129
- rl.registerAction("channel.rename", { description: "Rename a channel",
130
- inputSchema: { channel: { type: "string", required: true }, name: { type: "string", required: true } },
131
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/conversations.rename", input)); return data.channel; } });
132
- rl.registerAction("channel.setTopic", { description: "Set channel topic",
133
- inputSchema: { channel: { type: "string", required: true }, topic: { type: "string", required: true } },
134
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/conversations.setTopic", input)); return data.channel; } });
135
- rl.registerAction("channel.setPurpose", { description: "Set channel purpose",
136
- inputSchema: { channel: { type: "string", required: true }, purpose: { type: "string", required: true } },
137
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/conversations.setPurpose", input)); return data.channel; } });
138
- rl.registerAction("channel.members", { description: "List channel members",
139
- inputSchema: { channel: { type: "string", required: true }, limit: { type: "number", required: false } },
268
+ async execute(input, ctx) {
269
+ return api(t(ctx), "POST", "/conversations.unarchive", {
270
+ channel: input.channel,
271
+ });
272
+ },
273
+ });
274
+ rl.registerAction("channel.rename", {
275
+ description: "Rename a channel",
276
+ inputSchema: {
277
+ channel: { type: "string", required: true },
278
+ name: { type: "string", required: true },
279
+ },
280
+ async execute(input, ctx) {
281
+ const data = (await api(t(ctx), "POST", "/conversations.rename", input));
282
+ return data.channel;
283
+ },
284
+ });
285
+ rl.registerAction("channel.setTopic", {
286
+ description: "Set channel topic",
287
+ inputSchema: {
288
+ channel: { type: "string", required: true },
289
+ topic: { type: "string", required: true },
290
+ },
291
+ async execute(input, ctx) {
292
+ const data = (await api(t(ctx), "POST", "/conversations.setTopic", input));
293
+ return data.channel;
294
+ },
295
+ });
296
+ rl.registerAction("channel.setPurpose", {
297
+ description: "Set channel purpose",
298
+ inputSchema: {
299
+ channel: { type: "string", required: true },
300
+ purpose: { type: "string", required: true },
301
+ },
302
+ async execute(input, ctx) {
303
+ const data = (await api(t(ctx), "POST", "/conversations.setPurpose", input));
304
+ return data.channel;
305
+ },
306
+ });
307
+ rl.registerAction("channel.members", {
308
+ description: "List channel members",
309
+ inputSchema: {
310
+ channel: { type: "string", required: true },
311
+ limit: { type: "number", required: false },
312
+ },
140
313
  async execute(input, ctx) {
141
314
  const p = input;
142
315
  const qs = { channel: p.channel };
143
316
  if (p.limit)
144
317
  qs.limit = p.limit;
145
318
  const data = (await api(t(ctx), "GET", "/conversations.members", undefined, qs));
146
- return data.members.map(m => ({ member: m }));
147
- } });
319
+ return data.members.map((m) => ({ member: m }));
320
+ },
321
+ });
148
322
  // ── Reaction ────────────────────────────────────────
149
- rl.registerAction("reaction.add", { description: "Add a reaction to a message",
150
- inputSchema: { channel: { type: "string", required: true }, timestamp: { type: "string", required: true }, name: { type: "string", required: true, description: "Emoji name without colons" } },
151
- async execute(input, ctx) { return api(t(ctx), "POST", "/reactions.add", input); } });
152
- rl.registerAction("reaction.remove", { description: "Remove a reaction",
153
- inputSchema: { channel: { type: "string", required: true }, timestamp: { type: "string", required: true }, name: { type: "string", required: true } },
154
- async execute(input, ctx) { return api(t(ctx), "POST", "/reactions.remove", input); } });
155
- rl.registerAction("reaction.get", { description: "Get reactions for a message",
156
- inputSchema: { channel: { type: "string", required: true }, timestamp: { type: "string", required: true } },
157
- async execute(input, ctx) { return api(t(ctx), "GET", "/reactions.get", undefined, input); } });
323
+ rl.registerAction("reaction.add", {
324
+ description: "Add a reaction to a message",
325
+ inputSchema: {
326
+ channel: { type: "string", required: true },
327
+ timestamp: { type: "string", required: true },
328
+ name: {
329
+ type: "string",
330
+ required: true,
331
+ description: "Emoji name without colons",
332
+ },
333
+ },
334
+ async execute(input, ctx) {
335
+ return api(t(ctx), "POST", "/reactions.add", input);
336
+ },
337
+ });
338
+ rl.registerAction("reaction.remove", {
339
+ description: "Remove a reaction",
340
+ inputSchema: {
341
+ channel: { type: "string", required: true },
342
+ timestamp: { type: "string", required: true },
343
+ name: { type: "string", required: true },
344
+ },
345
+ async execute(input, ctx) {
346
+ return api(t(ctx), "POST", "/reactions.remove", input);
347
+ },
348
+ });
349
+ rl.registerAction("reaction.get", {
350
+ description: "Get reactions for a message",
351
+ inputSchema: {
352
+ channel: { type: "string", required: true },
353
+ timestamp: { type: "string", required: true },
354
+ },
355
+ async execute(input, ctx) {
356
+ return api(t(ctx), "GET", "/reactions.get", undefined, input);
357
+ },
358
+ });
158
359
  // ── User ────────────────────────────────────────────
159
- rl.registerAction("user.info", { description: "Get user info",
360
+ rl.registerAction("user.info", {
361
+ description: "Get user info",
160
362
  inputSchema: { user: { type: "string", required: true } },
161
- async execute(input, ctx) { const data = (await api(t(ctx), "GET", "/users.info", undefined, { user: input.user })); return data.user; } });
162
- rl.registerAction("user.list", { description: "List all users",
363
+ async execute(input, ctx) {
364
+ const data = (await api(t(ctx), "GET", "/users.info", undefined, {
365
+ user: input.user,
366
+ }));
367
+ return data.user;
368
+ },
369
+ });
370
+ rl.registerAction("user.list", {
371
+ description: "List all users",
163
372
  inputSchema: { limit: { type: "number", required: false } },
164
373
  async execute(input, ctx) {
165
374
  const qs = {};
@@ -167,21 +376,58 @@ export default function slack(rl) {
167
376
  qs.limit = input.limit;
168
377
  const data = (await api(t(ctx), "GET", "/users.list", undefined, qs));
169
378
  return data.members;
170
- } });
171
- rl.registerAction("user.getPresence", { description: "Get a user's presence",
379
+ },
380
+ });
381
+ rl.registerAction("user.getPresence", {
382
+ description: "Get a user's presence",
172
383
  inputSchema: { user: { type: "string", required: true } },
173
- async execute(input, ctx) { return api(t(ctx), "GET", "/users.getPresence", undefined, { user: input.user }); } });
174
- rl.registerAction("user.getProfile", { description: "Get a user's profile",
384
+ async execute(input, ctx) {
385
+ return api(t(ctx), "GET", "/users.getPresence", undefined, {
386
+ user: input.user,
387
+ });
388
+ },
389
+ });
390
+ rl.registerAction("user.getProfile", {
391
+ description: "Get a user's profile",
175
392
  inputSchema: { user: { type: "string", required: true } },
176
- async execute(input, ctx) { const data = (await api(t(ctx), "GET", "/users.profile.get", undefined, { user: input.user })); return data.profile; } });
177
- rl.registerAction("user.updateProfile", { description: "Update the authenticated user's profile",
178
- inputSchema: { profile: { type: "object", required: true, description: "Profile fields to set" } },
179
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/users.profile.set", { profile: input.profile })); return data.profile; } });
393
+ async execute(input, ctx) {
394
+ const data = (await api(t(ctx), "GET", "/users.profile.get", undefined, {
395
+ user: input.user,
396
+ }));
397
+ return data.profile;
398
+ },
399
+ });
400
+ rl.registerAction("user.updateProfile", {
401
+ description: "Update the authenticated user's profile",
402
+ inputSchema: {
403
+ profile: {
404
+ type: "object",
405
+ required: true,
406
+ description: "Profile fields to set",
407
+ },
408
+ },
409
+ async execute(input, ctx) {
410
+ const data = (await api(t(ctx), "POST", "/users.profile.set", {
411
+ profile: input.profile,
412
+ }));
413
+ return data.profile;
414
+ },
415
+ });
180
416
  // ── User Group ──────────────────────────────────────
181
- rl.registerAction("userGroup.create", { description: "Create a user group",
182
- inputSchema: { name: { type: "string", required: true }, handle: { type: "string", required: false }, description: { type: "string", required: false } },
183
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/usergroups.create", input)); return data.usergroup; } });
184
- rl.registerAction("userGroup.list", { description: "List user groups",
417
+ rl.registerAction("userGroup.create", {
418
+ description: "Create a user group",
419
+ inputSchema: {
420
+ name: { type: "string", required: true },
421
+ handle: { type: "string", required: false },
422
+ description: { type: "string", required: false },
423
+ },
424
+ async execute(input, ctx) {
425
+ const data = (await api(t(ctx), "POST", "/usergroups.create", input));
426
+ return data.usergroup;
427
+ },
428
+ });
429
+ rl.registerAction("userGroup.list", {
430
+ description: "List user groups",
185
431
  inputSchema: { includeUsers: { type: "boolean", required: false } },
186
432
  async execute(input, ctx) {
187
433
  const qs = {};
@@ -189,22 +435,59 @@ export default function slack(rl) {
189
435
  qs.include_users = true;
190
436
  const data = (await api(t(ctx), "GET", "/usergroups.list", undefined, qs));
191
437
  return data.usergroups;
192
- } });
193
- rl.registerAction("userGroup.update", { description: "Update a user group",
194
- inputSchema: { usergroup: { type: "string", required: true }, name: { type: "string", required: false }, handle: { type: "string", required: false }, description: { type: "string", required: false } },
195
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/usergroups.update", input)); return data.usergroup; } });
196
- rl.registerAction("userGroup.enable", { description: "Enable a user group",
438
+ },
439
+ });
440
+ rl.registerAction("userGroup.update", {
441
+ description: "Update a user group",
442
+ inputSchema: {
443
+ usergroup: { type: "string", required: true },
444
+ name: { type: "string", required: false },
445
+ handle: { type: "string", required: false },
446
+ description: { type: "string", required: false },
447
+ },
448
+ async execute(input, ctx) {
449
+ const data = (await api(t(ctx), "POST", "/usergroups.update", input));
450
+ return data.usergroup;
451
+ },
452
+ });
453
+ rl.registerAction("userGroup.enable", {
454
+ description: "Enable a user group",
197
455
  inputSchema: { usergroup: { type: "string", required: true } },
198
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/usergroups.enable", { usergroup: input.usergroup })); return data.usergroup; } });
199
- rl.registerAction("userGroup.disable", { description: "Disable a user group",
456
+ async execute(input, ctx) {
457
+ const data = (await api(t(ctx), "POST", "/usergroups.enable", {
458
+ usergroup: input.usergroup,
459
+ }));
460
+ return data.usergroup;
461
+ },
462
+ });
463
+ rl.registerAction("userGroup.disable", {
464
+ description: "Disable a user group",
200
465
  inputSchema: { usergroup: { type: "string", required: true } },
201
- async execute(input, ctx) { const data = (await api(t(ctx), "POST", "/usergroups.disable", { usergroup: input.usergroup })); return data.usergroup; } });
466
+ async execute(input, ctx) {
467
+ const data = (await api(t(ctx), "POST", "/usergroups.disable", {
468
+ usergroup: input.usergroup,
469
+ }));
470
+ return data.usergroup;
471
+ },
472
+ });
202
473
  // ── File ────────────────────────────────────────────
203
- rl.registerAction("file.get", { description: "Get file info",
474
+ rl.registerAction("file.get", {
475
+ description: "Get file info",
204
476
  inputSchema: { file: { type: "string", required: true } },
205
- async execute(input, ctx) { const data = (await api(t(ctx), "GET", "/files.info", undefined, { file: input.file })); return data.file; } });
206
- rl.registerAction("file.list", { description: "List files",
207
- inputSchema: { channel: { type: "string", required: false }, limit: { type: "number", required: false }, types: { type: "string", required: false } },
477
+ async execute(input, ctx) {
478
+ const data = (await api(t(ctx), "GET", "/files.info", undefined, {
479
+ file: input.file,
480
+ }));
481
+ return data.file;
482
+ },
483
+ });
484
+ rl.registerAction("file.list", {
485
+ description: "List files",
486
+ inputSchema: {
487
+ channel: { type: "string", required: false },
488
+ limit: { type: "number", required: false },
489
+ types: { type: "string", required: false },
490
+ },
208
491
  async execute(input, ctx) {
209
492
  const p = (input ?? {});
210
493
  const qs = {};
@@ -216,15 +499,33 @@ export default function slack(rl) {
216
499
  qs.types = p.types;
217
500
  const data = (await api(t(ctx), "GET", "/files.list", undefined, qs));
218
501
  return data.files;
219
- } });
502
+ },
503
+ });
220
504
  // ── Star ────────────────────────────────────────────
221
- rl.registerAction("star.add", { description: "Star an item",
222
- inputSchema: { channel: { type: "string", required: false }, timestamp: { type: "string", required: false }, file: { type: "string", required: false } },
223
- async execute(input, ctx) { return api(t(ctx), "POST", "/stars.add", input); } });
224
- rl.registerAction("star.remove", { description: "Unstar an item",
225
- inputSchema: { channel: { type: "string", required: false }, timestamp: { type: "string", required: false }, file: { type: "string", required: false } },
226
- async execute(input, ctx) { return api(t(ctx), "POST", "/stars.remove", input); } });
227
- rl.registerAction("star.list", { description: "List starred items",
505
+ rl.registerAction("star.add", {
506
+ description: "Star an item",
507
+ inputSchema: {
508
+ channel: { type: "string", required: false },
509
+ timestamp: { type: "string", required: false },
510
+ file: { type: "string", required: false },
511
+ },
512
+ async execute(input, ctx) {
513
+ return api(t(ctx), "POST", "/stars.add", input);
514
+ },
515
+ });
516
+ rl.registerAction("star.remove", {
517
+ description: "Unstar an item",
518
+ inputSchema: {
519
+ channel: { type: "string", required: false },
520
+ timestamp: { type: "string", required: false },
521
+ file: { type: "string", required: false },
522
+ },
523
+ async execute(input, ctx) {
524
+ return api(t(ctx), "POST", "/stars.remove", input);
525
+ },
526
+ });
527
+ rl.registerAction("star.list", {
528
+ description: "List starred items",
228
529
  inputSchema: { limit: { type: "number", required: false } },
229
530
  async execute(input, ctx) {
230
531
  const qs = {};
@@ -232,5 +533,6 @@ export default function slack(rl) {
232
533
  qs.limit = input.limit;
233
534
  const data = (await api(t(ctx), "GET", "/stars.list", undefined, qs));
234
535
  return data.items;
235
- } });
536
+ },
537
+ });
236
538
  }