@pipedream/slack 0.4.3 → 0.4.5

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 (45) hide show
  1. package/actions/add-star/add-star.mjs +1 -1
  2. package/actions/archive-channel/archive-channel.mjs +1 -1
  3. package/actions/complete-reminder/complete-reminder.mjs +1 -1
  4. package/actions/create-channel/create-channel.mjs +1 -1
  5. package/actions/create-reminder/create-reminder.mjs +1 -1
  6. package/actions/delete-file/delete-file.mjs +1 -1
  7. package/actions/delete-message/delete-message.mjs +1 -1
  8. package/actions/delete_reminder/delete-reminder.mjs +1 -1
  9. package/actions/find-message/find-message.mjs +1 -1
  10. package/actions/find-user-by-email/find-user-by-email.mjs +1 -1
  11. package/actions/get-channel/get-channel.mjs +1 -1
  12. package/actions/get-file/get-file.mjs +1 -1
  13. package/actions/get-reminder/get-reminder.mjs +1 -1
  14. package/actions/invite-user-to-channel/invite-user-to-channel.mjs +1 -1
  15. package/actions/join-channel/join-channel.mjs +1 -1
  16. package/actions/kick-user/kick-user.mjs +1 -1
  17. package/actions/leave-channel/leave-channel.mjs +1 -1
  18. package/actions/list-channels/list-channels.mjs +1 -1
  19. package/actions/list-files/list-files.mjs +1 -1
  20. package/actions/list-members-in-channel/list-members-in-channel.mjs +1 -1
  21. package/actions/list-reminders/list-reminders.mjs +1 -1
  22. package/actions/list-replies/list-replies.mjs +1 -1
  23. package/actions/list-users/list-users.mjs +1 -1
  24. package/actions/remove-star/remove-star.mjs +1 -1
  25. package/actions/{reply-to-a-message-thread/reply-to-a-message-thread.mjs → reply-to-a-message/reply-to-a-message.mjs} +1 -1
  26. package/actions/send-block-kit-message/send-block-kit-message.mjs +1 -1
  27. package/actions/send-custom-message/send-custom-message.mjs +1 -1
  28. package/actions/send-direct-message/send-direct-message.mjs +1 -1
  29. package/actions/send-group-message/send-group-message.mjs +1 -1
  30. package/actions/send-large-message/send-large-message.mjs +1 -1
  31. package/actions/send-message-private-channel/send-message-private-channel.mjs +1 -1
  32. package/actions/send-message-public-channel/send-message-public-channel.mjs +1 -1
  33. package/actions/{set-purpose-of-channel/set-purpose-of-channel.mjs → set-channel-purpose/set-channel-purpose.mjs} +1 -1
  34. package/actions/set-channel-topic/set-channel-topic.mjs +1 -1
  35. package/actions/unarchive-channel/unarchive-channel.mjs +1 -1
  36. package/actions/update-message/update-message.mjs +1 -1
  37. package/actions/update-profile/update-profile.mjs +1 -1
  38. package/actions/upload-file/upload-file.mjs +19 -11
  39. package/package.json +1 -1
  40. package/slack.app.mjs +2 -2
  41. package/sources/new-direct-message/new-direct-message.mjs +1 -1
  42. package/sources/new-mention/new-mention.mjs +1 -1
  43. package/sources/new-message-in-channels/new-message-in-channels.mjs +1 -1
  44. package/sources/new-reaction-added/new-reaction-added.mjs +1 -1
  45. package/sources/new-star-added/new-star-added.mjs +1 -1
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-add-star",
5
5
  name: "Add Star",
6
6
  description: "Add a star to an item on behalf of the authenticated user. [See docs here](https://api.slack.com/methods/stars.add)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-archive-channel",
5
5
  name: "Archive Channel",
6
6
  description: "Archive a channel. [See docs here](https://api.slack.com/methods/conversations.archive)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-complete-reminder",
5
5
  name: "Complete Reminder",
6
6
  description: "Complete a reminder. [See docs here](https://api.slack.com/methods/reminders.complete)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-create-channel",
5
5
  name: "Create a Channel",
6
6
  description: "Create a new channel. [See docs here](https://api.slack.com/methods/conversations.create)",
7
- version: "0.0.",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-create-reminder",
5
5
  name: "Create Reminder",
6
6
  description: "Create a reminder. [See docs here](https://api.slack.com/methods/reminders.add)",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-delete-file",
5
5
  name: "Delete File",
6
6
  description: "Delete a file. [See docs here](https://api.slack.com/methods/files.delete)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-delete-message",
5
5
  name: "Delete Message",
6
6
  description: "Delete a message. [See docs here](https://api.slack.com/methods/chat.delete)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-delete-reminder",
5
5
  name: "Delete Reminder",
6
6
  description: "Delete a reminder. [See docs here](https://api.slack.com/methods/reminders.delete)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-find-message",
5
5
  name: "Find Message",
6
6
  description: "Find a Slack message. [See docs here](https://api.slack.com/methods/search.messages)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-find-user-by-email",
5
5
  name: "Find User by Email",
6
6
  description: "Find a user by matching against their email. [See docs here](https://api.slack.com/methods/users.lookupByEmail)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-get-channel",
5
5
  name: "Get Channel",
6
6
  description: "Return information about a workspace channel. [See docs here](https://api.slack.com/methods/conversations.info)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-get-file",
5
5
  name: "Get File",
6
6
  description: "Return information about a file. [See docs here](https://api.slack.com/methods/files.info)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-get-reminder",
5
5
  name: "Get Reminder",
6
6
  description: "Return information about a reminder. [See docs here](https://api.slack.com/methods/reminders.info)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-invite-user-to-channel",
5
5
  name: "Invite User to Channel",
6
6
  description: "Invite a user to an existing channel. [See docs here](https://api.slack.com/methods/conversations.invite)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-join-channel",
5
5
  name: "Join Channel",
6
6
  description: "Join an existing channel. [See docs here](https://api.slack.com/methods/conversations.join)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-kick-user",
5
5
  name: "Kick User",
6
6
  description: "Remove a user from a conversation. [See docs here](https://api.slack.com/methods/conversations.kick)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-leave-channel",
5
5
  name: "Leave Channel",
6
6
  description: "Leave an existing channel. [See docs here](https://api.slack.com/methods/conversations.leave)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-channels",
5
5
  name: "List Channels",
6
6
  description: "Return a list of all channels in a workspace. [See docs here](https://api.slack.com/methods/conversations.list)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-files",
5
5
  name: "List Files",
6
6
  description: "Return a list of files within a team. [See docs here](https://api.slack.com/methods/files.list)",
7
- version: "0.0.34",
7
+ version: "0.0.35",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-members-in-channel",
5
5
  name: "List Members in Channel",
6
6
  description: "Retrieve members of a channel. [See docs here](https://api.slack.com/methods/conversations.members)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-reminders",
5
5
  name: "List Reminders",
6
6
  description: "List all reminders for a given user. [See docs here](https://api.slack.com/methods/reminders.list)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-replies",
5
5
  name: "List Replies",
6
6
  description: "Retrieve a thread of messages posted to a conversation. [See docs here](https://api.slack.com/methods/conversations.replies)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-users",
5
5
  name: "List Users",
6
6
  description: "Return a list of all users in a workspace. [See docs here](https://api.slack.com/methods/users.list)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-remove-star",
5
5
  name: "Remove Star",
6
6
  description: "Remove a star from an item on behalf of the authenticated user. [See docs here](https://api.slack.com/methods/stars.remove)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -6,7 +6,7 @@ export default {
6
6
  key: "slack-reply-to-a-message",
7
7
  name: "Reply to a Message Thread",
8
8
  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",
9
- version: "0.1.7",
9
+ version: "0.1.10",
10
10
  type: "action",
11
11
  props: {
12
12
  ...common.props,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-send-block-kit-message",
6
6
  name: "Send Message Using Block Kit",
7
7
  description: "Send a message using Slack's Block Kit UI framework 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",
8
- version: "0.2.8",
8
+ version: "0.2.9",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-send-custom-message",
6
6
  name: "Send a Custom Message",
7
7
  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",
8
- version: "0.2.8",
8
+ version: "0.2.9",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-send-direct-message",
6
6
  name: "Send a Direct Message",
7
7
  description: "Send a direct message to a single user. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
8
- version: "0.2.9",
8
+ version: "0.2.10",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-send-group-message",
6
6
  name: "Send Group Message",
7
7
  description: "Send a direct message to a group of users. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
8
- version: "0.2.8",
8
+ version: "0.2.10",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-send-large-message",
6
6
  name: "Send a Large Message (3000+ characters)",
7
7
  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",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-send-message-private-channel",
6
6
  name: "Send Message to a Private Channel",
7
7
  description: "Send a message to a private channel and customize the name and avatar of the bot that posts the message. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
8
- version: "0.2.9",
8
+ version: "0.2.10",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-send-message-public-channel",
6
6
  name: "Send Message to a Public Channel",
7
7
  description: "Send a message to a public channel and customize the name and avatar of the bot that posts the message. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
8
- version: "0.2.8",
8
+ version: "0.2.9",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-set-channel-purpose",
5
5
  name: "Set Channel Purpose",
6
6
  description: "Change the purpose of a channel. [See docs here](https://api.slack.com/methods/conversations.setPurpose)",
7
- version: "0.0.6",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-set-channel-topic",
5
5
  name: "Set Channel Topic",
6
6
  description: "Set the topic on a selected channel. [See docs here](https://api.slack.com/methods/conversations.setTopic)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-unarchive-channel",
5
5
  name: "Unarchive Channel",
6
6
  description: "Unarchive a channel. [See docs here](https://api.slack.com/methods/conversations.unarchive)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-update-message",
5
5
  name: "Update Message",
6
6
  description: "Update a message. [See docs here](https://api.slack.com/methods/chat.update)",
7
- version: "0.1.6",
7
+ version: "0.1.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-update-profile",
5
5
  name: "Update Profile",
6
6
  description: "Update basic profile field such as name or title. [See docs here](https://api.slack.com/methods/users.profile.set)",
7
- version: "0.0.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -1,38 +1,46 @@
1
+ import { ConfigurationError } from "@pipedream/platform";
1
2
  import slack from "../../slack.app.mjs";
3
+ import fs from "fs";
2
4
 
3
5
  export default {
4
6
  key: "slack-upload-file",
5
7
  name: "Upload File",
6
8
  description: "Upload a file. [See docs here](https://api.slack.com/methods/files.upload)",
7
- version: "0.0.6",
9
+ version: "0.0.10",
8
10
  type: "action",
9
11
  props: {
10
12
  slack,
11
- content: {
13
+ conversation: {
12
14
  propDefinition: [
13
15
  slack,
14
- "content",
16
+ "conversation",
15
17
  ],
16
18
  },
17
- initial_comment: {
19
+ content: {
18
20
  propDefinition: [
19
21
  slack,
20
- "initial_comment",
22
+ "content",
21
23
  ],
22
- optional: true,
23
24
  },
24
- conversation: {
25
+ initialComment: {
26
+ label: "Report Name",
27
+ description: "Will be added as an initial comment before the image",
25
28
  propDefinition: [
26
29
  slack,
27
- "conversation",
30
+ "initial_comment",
28
31
  ],
32
+ optional: true,
29
33
  },
30
34
  },
31
35
  async run() {
36
+ if (!fs.existsSync(this.content)) {
37
+ throw new ConfigurationError(`\`${this.content}\` not found, is needed a valid \`/tmp\` path`);
38
+ }
39
+
32
40
  return await this.slack.sdk().files.upload({
33
- content: this.content,
34
- channel: this.conversation,
35
- initial_comment: this.initial_comment,
41
+ file: fs.createReadStream(this.content),
42
+ channels: this.conversation,
43
+ initial_comment: this.initialComment,
36
44
  });
37
45
  },
38
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/slack",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Pipedream Slack Components",
5
5
  "main": "slack.app.mjs",
6
6
  "keywords": [
package/slack.app.mjs CHANGED
@@ -308,9 +308,9 @@ export default {
308
308
  optional: true,
309
309
  },
310
310
  content: {
311
- label: "Content",
311
+ label: "File Path",
312
+ description: "Full path to the file in `/tmp/` directory. E.g. `/tmp/cute_cat.jpg`",
312
313
  type: "string",
313
- description: "File contents via a POST variable.",
314
314
  },
315
315
  link_names: {
316
316
  type: "string",
@@ -4,7 +4,7 @@ export default {
4
4
  ...common,
5
5
  key: "slack-new-direct-message",
6
6
  name: "New Direct Message (Instant)",
7
- version: "1.0.2",
7
+ version: "1.0.3",
8
8
  description: "Emit new event when a message was posted in a direct message channel",
9
9
  type: "source",
10
10
  dedupe: "unique",
@@ -4,7 +4,7 @@ export default {
4
4
  ...common,
5
5
  key: "slack-new-mention",
6
6
  name: "New Mention (Instant)",
7
- version: "1.0.2",
7
+ version: "1.0.3",
8
8
  description: "Emit new event when a username or specific keyword is mentioned in a channel",
9
9
  type: "source",
10
10
  dedupe: "unique",
@@ -4,7 +4,7 @@ export default {
4
4
  ...common,
5
5
  key: "slack-new-message-in-channels",
6
6
  name: "New Message In Channels (Instant)",
7
- version: "1.0.2",
7
+ version: "1.0.3",
8
8
  description: "Emit new event when a new message is posted to one or more channels",
9
9
  type: "source",
10
10
  dedupe: "unique",
@@ -4,7 +4,7 @@ export default {
4
4
  ...common,
5
5
  key: "slack-new-reaction-added",
6
6
  name: "New Reaction Added (Instant)",
7
- version: "1.1.3",
7
+ version: "1.1.4",
8
8
  description: "Emit new event when a member has added an emoji reaction to an item",
9
9
  type: "source",
10
10
  dedupe: "unique",
@@ -8,7 +8,7 @@ export default {
8
8
  ...common,
9
9
  key: "slack-new-star-added",
10
10
  name: "New Star Added (Instant)",
11
- version: "0.0.5",
11
+ version: "0.0.6",
12
12
  description: "Emit new event when a star is added to an item",
13
13
  type: "source",
14
14
  dedupe: "unique",