Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-add-emoji-reaction",
name: "Add Emoji Reaction",
description: "Add an emoji reaction to a message. [See the documentation](https://api.slack.com/methods/reactions.add)",
version: "0.0.15",
version: "0.0.16",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ export default {
key: "slack-approve-workflow",
name: "Approve Workflow",
description: "Suspend the workflow until approved by a Slack message. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/archive-channel/archive-channel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ export default {
key: "slack-archive-channel",
name: "Archive Channel",
description: "Archive a channel. [See the documentation](https://api.slack.com/methods/conversations.archive)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/create-channel/create-channel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-create-channel",
name: "Create a Channel",
description: "Create a new channel. [See the documentation](https://api.slack.com/methods/conversations.create)",
version: "0.0.24",
version: "0.0.25",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/create-reminder/create-reminder.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-create-reminder",
name: "Create Reminder",
description: "Create a reminder. [See the documentation](https://api.slack.com/methods/reminders.add)",
version: "0.0.24",
version: "0.0.25",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/delete-file/delete-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-delete-file",
name: "Delete File",
description: "Delete a file. [See the documentation](https://api.slack.com/methods/files.delete)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/delete-message/delete-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-delete-message",
name: "Delete Message",
description: "Delete a message. [See the documentation](https://api.slack.com/methods/chat.delete)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/find-message/find-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-find-message",
name: "Find Message",
description: "Find a Slack message. [See the documentation](https://api.slack.com/methods/search.messages)",
version: "0.0.25",
version: "0.0.26",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-find-user-by-email",
name: "Find User by Email",
description: "Find a user by matching against their email. [See the documentation](https://api.slack.com/methods/users.lookupByEmail)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
Comment on lines +8 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Annotations are semantically correct for this read-only action.

The annotation values accurately reflect the behavior of this action:

  • readOnlyHint: true is correct since the action only calls lookupUserByEmail
  • destructiveHint: false is appropriate as no data is modified or deleted
  • openWorldHint: true accurately indicates the external Slack API call

Please verify that type definitions or schema validation exist for the annotations field to ensure consistency across all actions where these annotations are being added.


🏁 Script executed:

#!/bin/bash
# Description: Search for type definitions or schemas for the annotations field

# Search for TypeScript definitions or JSDoc comments defining annotations structure
rg -n -C3 'annotations.*\{' --type=ts --type=js

# Search for schema validation or documentation of annotation fields
rg -n -C3 '(destructiveHint|openWorldHint|readOnlyHint)' --type=ts --type=js --type=md

# Look for the tool-annotations script mentioned in the AI summary
fd -t f 'AnnotationApplier|tool-annotations' --exec cat {}

Length of output: 6972


Define and enforce a schema for the annotations field
No type definitions or runtime validations exist for annotations (destructiveHint, openWorldHint, readOnlyHint). Add a shared interface or JSDoc typedef and integrate build-time or runtime validation to guarantee consistency across all actions.

🤖 Prompt for AI Agents
In components/slack/actions/find-user-by-email/find-user-by-email.mjs around
lines 8 to 12, the annotations object lacks type and runtime validation; add a
shared JSDoc typedef or TypeScript interface (e.g., ActionAnnotations with
destructiveHint/openWorldHint/readOnlyHint as booleans) in a common module and
update this file to import/use that type (or add matching JSDoc @typedef) and
enforce it at runtime by validating the annotations object (e.g., a small
validator that checks required keys and boolean values or use a shared
validation utility) and throw or log a clear error when validation fails so all
actions follow the same schema.

type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/get-file/get-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-get-file",
name: "Get File",
description: "Return information about a file. [See the documentation](https://api.slack.com/methods/files.info)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-invite-user-to-channel",
name: "Invite User to Channel",
description: "Invite a user to an existing channel. [See the documentation](https://api.slack.com/methods/conversations.invite)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/kick-user/kick-user.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ export default {
key: "slack-kick-user",
name: "Kick User",
description: "Remove a user from a conversation. [See the documentation](https://api.slack.com/methods/conversations.kick)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/list-channels/list-channels.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-list-channels",
name: "List Channels",
description: "Return a list of all channels in a workspace. [See the documentation](https://api.slack.com/methods/conversations.list)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/list-files/list-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-list-files",
name: "List Files",
description: "Return a list of files within a team. [See the documentation](https://api.slack.com/methods/files.list)",
version: "0.0.51",
version: "0.0.52",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-list-group-members",
name: "List Group Members",
description: "List all users in a User Group. [See the documentation](https://api.slack.com/methods/usergroups.users.list)",
version: "0.0.8",
version: "0.0.9",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-list-members-in-channel",
name: "List Members in Channel",
description: "Retrieve members of a channel. [See the documentation](https://api.slack.com/methods/conversations.members)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/list-replies/list-replies.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-list-replies",
name: "List Replies",
description: "Retrieve a thread of messages posted to a conversation. [See the documentation](https://api.slack.com/methods/conversations.replies)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/list-users/list-users.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-list-users",
name: "List Users",
description: "Return a list of all users in a workspace. [See the documentation](https://api.slack.com/methods/users.list)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
key: "slack-reply-to-a-message",
name: "Reply to a Message Thread",
description: "Send a message as a threaded reply. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
version: "0.1.28",
version: "0.1.29",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack: common.props.slack,
Expand All @@ -29,7 +34,7 @@
],
},
...common.props,
replyToThread: {

Check warning on line 37 in components/slack/actions/reply-to-a-message/reply-to-a-message.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop replyToThread must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 37 in components/slack/actions/reply-to-a-message/reply-to-a-message.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop replyToThread must have a label. See https://pipedream.com/docs/components/guidelines/#props
...common.props.replyToThread,
hidden: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export default {
key: "slack-send-block-kit-message",
name: "Build and Send a Block Kit Message",
description: "Configure custom blocks and send to a channel, group, or user. [See the documentation](https://api.slack.com/tools/block-kit-builder).",
version: "0.4.4",
version: "0.4.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ export default {
key: "slack-send-large-message",
name: "Send a Large Message (3000+ characters)",
description: "Send a large message (more than 3000 characters) to a channel, group or user. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export default {
key: "slack-send-message-advanced",
name: "Send Message (Advanced)",
description: "Customize advanced setttings and send a message to a channel, group or user. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
version: "0.0.6",
version: "0.0.7",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export default {
key: "slack-send-message-to-channel",
name: "Send Message to Channel",
description: "Send a message to a public or private channel. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export default {
key: "slack-send-message-to-user-or-group",
name: "Send Message to User or Group",
description: "Send a message to a user or group. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack: common.props.slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/send-message/send-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export default {
key: "slack-send-message",
name: "Send Message",
description: "Send a message to a user, group, private channel or public channel. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
version: "0.0.19",
version: "0.0.20",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-set-channel-description",
name: "Set Channel Description",
description: "Change the description or purpose of a channel. [See the documentation](https://api.slack.com/methods/conversations.setPurpose)",
version: "0.0.8",
version: "0.0.9",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-set-channel-topic",
name: "Set Channel Topic",
description: "Set the topic on a selected channel. [See the documentation](https://api.slack.com/methods/conversations.setTopic)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
7 changes: 6 additions & 1 deletion components/slack/actions/set-status/set-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default {
key: "slack-set-status",
name: "Set Status",
description: "Set the current status for a user. [See the documentation](https://api.slack.com/methods/users.profile.set)",
version: "0.0.8",
version: "0.0.9",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
slack,
Expand Down
Loading
Loading