@pipedream/slack 0.5.2 → 0.6.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 (64) hide show
  1. package/actions/add-emoji-reaction/add-emoji-reaction.mjs +11 -8
  2. package/actions/archive-channel/archive-channel.mjs +14 -4
  3. package/actions/common/build-blocks.mjs +5 -4
  4. package/actions/common/send-message.mjs +1 -23
  5. package/actions/create-channel/create-channel.mjs +10 -5
  6. package/actions/create-reminder/create-reminder.mjs +8 -8
  7. package/actions/delete-file/delete-file.mjs +6 -4
  8. package/actions/delete-message/delete-message.mjs +10 -5
  9. package/actions/find-message/find-message.mjs +21 -13
  10. package/actions/find-user-by-email/find-user-by-email.mjs +8 -4
  11. package/actions/get-file/get-file.mjs +6 -11
  12. package/actions/invite-user-to-channel/invite-user-to-channel.mjs +6 -4
  13. package/actions/kick-user/kick-user.mjs +17 -4
  14. package/actions/list-channels/list-channels.mjs +8 -4
  15. package/actions/list-files/list-files.mjs +21 -13
  16. package/actions/{list-user-groups-users/list-user-groups-users.mjs → list-group-members/list-group-members.mjs} +12 -6
  17. package/actions/list-members-in-channel/list-members-in-channel.mjs +22 -4
  18. package/actions/list-replies/list-replies.mjs +12 -5
  19. package/actions/list-users/list-users.mjs +8 -4
  20. package/actions/reply-to-a-message/reply-to-a-message.mjs +10 -10
  21. package/actions/send-custom-message/send-custom-message.mjs +27 -8
  22. package/actions/send-large-message/send-large-message.mjs +8 -4
  23. package/actions/{send-message-private-channel/send-message-private-channel.mjs → send-message/send-message.mjs} +13 -7
  24. package/actions/set-channel-description/set-channel-description.mjs +32 -0
  25. package/actions/set-channel-topic/set-channel-topic.mjs +6 -4
  26. package/actions/set-status/set-status.mjs +44 -0
  27. package/actions/update-group-members/update-group-members.mjs +67 -0
  28. package/actions/update-message/update-message.mjs +10 -5
  29. package/actions/update-profile/update-profile.mjs +70 -13
  30. package/actions/upload-file/upload-file.mjs +6 -4
  31. package/actions/verify-slack-signature/verify-slack-signature.mjs +2 -2
  32. package/package.json +3 -2
  33. package/slack.app.mjs +72 -71
  34. package/sources/common/base.mjs +9 -0
  35. package/sources/new-channel-created/new-channel-created.mjs +1 -1
  36. package/sources/new-direct-message/new-direct-message.mjs +3 -1
  37. package/sources/new-direct-message/test-event.mjs +28 -0
  38. package/sources/new-interaction-event-received/README.md +13 -13
  39. package/sources/new-interaction-event-received/new-interaction-event-received.mjs +7 -8
  40. package/sources/new-interaction-event-received/test-event.mjs +86 -0
  41. package/sources/{new-mention/new-mention.mjs → new-keyword-mention/new-keyword-mention.mjs} +8 -30
  42. package/sources/new-keyword-mention/test-event.mjs +28 -0
  43. package/sources/new-message-in-channels/new-message-in-channels.mjs +1 -1
  44. package/sources/new-reaction-added/new-reaction-added.mjs +4 -1
  45. package/sources/new-reaction-added/test-event.mjs +193 -0
  46. package/sources/new-user-mention/new-user-mention.mjs +117 -0
  47. package/sources/new-user-mention/test-event.mjs +28 -0
  48. package/actions/add-star/add-star.mjs +0 -43
  49. package/actions/complete-reminder/complete-reminder.mjs +0 -23
  50. package/actions/delete-reminder/delete-reminder.mjs +0 -23
  51. package/actions/get-channel/get-channel.mjs +0 -23
  52. package/actions/get-reminder/get-reminder.mjs +0 -23
  53. package/actions/join-channel/join-channel.mjs +0 -23
  54. package/actions/leave-channel/leave-channel.mjs +0 -23
  55. package/actions/list-reminders/list-reminders.mjs +0 -24
  56. package/actions/remove-star/remove-star.mjs +0 -40
  57. package/actions/send-block-kit-message/send-block-kit-message.mjs +0 -43
  58. package/actions/send-direct-message/send-direct-message.mjs +0 -32
  59. package/actions/send-group-message/send-group-message.mjs +0 -32
  60. package/actions/send-message-public-channel/send-message-public-channel.mjs +0 -38
  61. package/actions/set-channel-purpose/set-channel-purpose.mjs +0 -30
  62. package/actions/unarchive-channel/unarchive-channel.mjs +0 -23
  63. package/actions/update-user-groups-users/update-user-groups-users.mjs +0 -45
  64. package/sources/new-star-added/new-star-added.mjs +0 -45
@@ -3,8 +3,8 @@ import slack from "../../slack.app.mjs";
3
3
  export default {
4
4
  key: "slack-list-replies",
5
5
  name: "List Replies",
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.15",
6
+ description: "Retrieve a thread of messages posted to a conversation. [See the documentation](https://api.slack.com/methods/conversations.replies)",
7
+ version: "0.0.16",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -17,14 +17,21 @@ export default {
17
17
  timestamp: {
18
18
  propDefinition: [
19
19
  slack,
20
- "timestamp",
20
+ "messageTs",
21
+ (c) => ({
22
+ channel: c.conversation,
23
+ }),
21
24
  ],
22
25
  },
23
26
  },
24
- async run() {
25
- return await this.slack.sdk().conversations.replies({
27
+ async run({ $ }) {
28
+ const response = await this.slack.sdk().conversations.replies({
26
29
  channel: this.conversation,
27
30
  ts: this.timestamp,
28
31
  });
32
+ $.export("$summary", `Successfully retrieved ${response.messages.length} reply message${response.messages.length === 1
33
+ ? ""
34
+ : "s"}`);
35
+ return response;
29
36
  },
30
37
  };
@@ -3,8 +3,8 @@ import slack from "../../slack.app.mjs";
3
3
  export default {
4
4
  key: "slack-list-users",
5
5
  name: "List Users",
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.15",
6
+ description: "Return a list of all users in a workspace. [See the documentation](https://api.slack.com/methods/users.list)",
7
+ version: "0.0.16",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -16,9 +16,13 @@ export default {
16
16
  optional: true,
17
17
  },
18
18
  },
19
- async run() {
20
- return this.slack.usersList({
19
+ async run({ $ }) {
20
+ const response = await this.slack.usersList({
21
21
  team_id: this.teamId,
22
22
  });
23
+ $.export("$summary", `Successfully retrieved ${response.members.length} user${response.members.length === 1
24
+ ? ""
25
+ : "s"}`);
26
+ return response;
23
27
  },
24
28
  };
@@ -6,36 +6,36 @@ 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.20",
9
+ version: "0.1.21",
10
10
  type: "action",
11
11
  props: {
12
12
  slack: common.props.slack,
13
- thread_ts: {
13
+ conversation: {
14
14
  propDefinition: [
15
15
  slack,
16
- "thread_ts",
16
+ "conversation",
17
17
  ],
18
- optional: false,
19
18
  },
20
- reply_broadcast: {
19
+ thread_ts: {
21
20
  propDefinition: [
22
21
  slack,
23
- "reply_broadcast",
22
+ "messageTs",
23
+ (c) => ({
24
+ channel: c.conversation,
25
+ }),
24
26
  ],
25
27
  },
26
- conversation: {
28
+ reply_broadcast: {
27
29
  propDefinition: [
28
30
  slack,
29
- "conversation",
31
+ "reply_broadcast",
30
32
  ],
31
- optional: false,
32
33
  },
33
34
  text: {
34
35
  propDefinition: [
35
36
  slack,
36
37
  "text",
37
38
  ],
38
- optional: false,
39
39
  },
40
40
  mrkdwn: {
41
41
  propDefinition: [
@@ -1,11 +1,13 @@
1
1
  import common from "../common/send-message.mjs";
2
+ import buildBlocks from "../common/build-blocks.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
6
+ ...buildBlocks,
5
7
  key: "slack-send-custom-message",
6
8
  name: "Send a Custom Message",
7
9
  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.19",
10
+ version: "0.2.20",
9
11
  type: "action",
10
12
  props: {
11
13
  slack: common.props.slack,
@@ -20,6 +22,7 @@ export default {
20
22
  common.props.slack,
21
23
  "text",
22
24
  ],
25
+ description: "If you're using `blocks`, this is used as a fallback string to display in notifications. If you aren't, this is the main body text of the message. It can be formatted as plain text, or with mrkdwn.",
23
26
  },
24
27
  mrkdwn: {
25
28
  propDefinition: [
@@ -39,12 +42,6 @@ export default {
39
42
  "parse",
40
43
  ],
41
44
  },
42
- blocks: {
43
- propDefinition: [
44
- common.props.slack,
45
- "blocks",
46
- ],
47
- },
48
45
  link_names: {
49
46
  propDefinition: [
50
47
  common.props.slack,
@@ -60,9 +57,31 @@ export default {
60
57
  thread_ts: {
61
58
  propDefinition: [
62
59
  common.props.slack,
63
- "thread_ts",
60
+ "messageTs",
61
+ (c) => ({
62
+ channel: c.conversation,
63
+ }),
64
64
  ],
65
+ description: "Provide another message's `ts` value to make this message a reply (e.g., if triggering on new Slack messages, enter `{{event.ts}}`). Avoid using a reply's `ts` value; use its parent instead.",
66
+ optional: true,
65
67
  },
66
68
  ...common.props,
69
+ ...buildBlocks.props,
70
+ },
71
+ methods: {
72
+ ...common.methods,
73
+ ...buildBlocks.methods,
74
+ async getGeneratedBlocks() {
75
+ return await buildBlocks.run.call(this); // call buildBlocks.run with the current context
76
+ },
77
+ },
78
+ async run({ $ }) {
79
+ if (this.passArrayOrConfigure) {
80
+ this.blocks = await this.getGeneratedBlocks(); // set the blocks prop for common.run to use
81
+ }
82
+ const resp = await common.run.call(this, {
83
+ $,
84
+ }); // call common.run with the current context
85
+ return resp;
67
86
  },
68
87
  };
@@ -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.15",
8
+ version: "0.0.16",
9
9
  type: "action",
10
10
  props: {
11
11
  slack: common.props.slack,
@@ -29,7 +29,7 @@ export default {
29
29
  },
30
30
  ...common.props,
31
31
  },
32
- async run() {
32
+ async run({ $ }) {
33
33
  if (this.include_sent_via_pipedream_flag) {
34
34
  const sentViaPipedreamText = this._makeSentViaPipedreamBlock();
35
35
  this.text += `\n\n\n${sentViaPipedreamText.elements[0].text}`;
@@ -61,11 +61,15 @@ export default {
61
61
  metadata: this.metadata || null,
62
62
  };
63
63
 
64
+ let response;
64
65
  if (this.post_at) {
65
66
  obj.post_at = this.post_at;
66
- return this.slack.sdk().chat.scheduleMessage(obj);
67
+ response = await this.slack.sdk().chat.scheduleMessage(obj);
67
68
  }
68
69
 
69
- return this.slack.sdk().chat.postMessage(obj);
70
+ response = await this.slack.sdk().chat.postMessage(obj);
71
+
72
+ $.export("$summary", "Successfully sent a message to channel ID " + this.conversation);
73
+ return response;
70
74
  },
71
75
  };
@@ -1,22 +1,28 @@
1
- import constants from "../../common/constants.mjs";
2
1
  import common from "../common/send-message.mjs";
2
+ import constants from "../../common/constants.mjs";
3
3
 
4
4
  export default {
5
5
  ...common,
6
- key: "slack-send-message-private-channel",
7
- name: "Send Message to a Private Channel",
8
- 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",
9
- version: "0.2.20",
6
+ key: "slack-send-message",
7
+ name: "Send Message",
8
+ description: "Send a message to a user, group, private channel or public channel. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
9
+ version: "0.0.1",
10
10
  type: "action",
11
11
  props: {
12
12
  slack: common.props.slack,
13
+ channelType: {
14
+ type: "string",
15
+ label: "Channel Type",
16
+ description: "The type of channel to send to. User/Direct Message (im), Group (mpim), Private Channel or Public Channel",
17
+ options: Object.values(constants.CHANNEL_TYPE),
18
+ },
13
19
  conversation: {
14
20
  propDefinition: [
15
21
  common.props.slack,
16
22
  "channelId",
17
- () => ({
23
+ (c) => ({
18
24
  types: [
19
- constants.CHANNEL_TYPE.PRIVATE,
25
+ c.channelType,
20
26
  ],
21
27
  }),
22
28
  ],
@@ -0,0 +1,32 @@
1
+ import slack from "../../slack.app.mjs";
2
+
3
+ export default {
4
+ key: "slack-set-channel-description",
5
+ name: "Set Channel Description",
6
+ description: "Change the description or purpose of a channel. [See the documentation](https://api.slack.com/methods/conversations.setPurpose)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ props: {
10
+ slack,
11
+ conversation: {
12
+ propDefinition: [
13
+ slack,
14
+ "conversation",
15
+ ],
16
+ },
17
+ purpose: {
18
+ propDefinition: [
19
+ slack,
20
+ "purpose",
21
+ ],
22
+ },
23
+ },
24
+ async run({ $ }) {
25
+ const response = await this.slack.sdk().conversations.setPurpose({
26
+ channel: this.conversation,
27
+ purpose: this.purpose,
28
+ });
29
+ $.export("$summary", `Successfully set description for channel with ID ${this.conversation}`);
30
+ return response;
31
+ },
32
+ };
@@ -3,8 +3,8 @@ import slack from "../../slack.app.mjs";
3
3
  export default {
4
4
  key: "slack-set-channel-topic",
5
5
  name: "Set Channel Topic",
6
- description: "Set the topic on a selected channel. [See docs here](https://api.slack.com/methods/conversations.setTopic)",
7
- version: "0.0.15",
6
+ description: "Set the topic on a selected channel. [See the documentation](https://api.slack.com/methods/conversations.setTopic)",
7
+ version: "0.0.16",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -21,10 +21,12 @@ export default {
21
21
  ],
22
22
  },
23
23
  },
24
- async run() {
25
- return await this.slack.sdk().conversations.setTopic({
24
+ async run({ $ }) {
25
+ const response = await this.slack.sdk().conversations.setTopic({
26
26
  channel: this.conversation,
27
27
  topic: this.topic,
28
28
  });
29
+ $.export("$summary", `Successfully set topic for channel with ID ${this.conversation}`);
30
+ return response;
29
31
  },
30
32
  };
@@ -0,0 +1,44 @@
1
+ import slack from "../../slack.app.mjs";
2
+
3
+ export default {
4
+ key: "slack-set-status",
5
+ name: "Set Status",
6
+ description: "Set the current status for a user. [See the documentation](https://api.slack.com/methods/users.profile.set)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ props: {
10
+ slack,
11
+ statusText: {
12
+ type: "string",
13
+ label: "Status Text",
14
+ description: "The displayed text",
15
+ },
16
+ statusEmoji: {
17
+ propDefinition: [
18
+ slack,
19
+ "icon_emoji",
20
+ ],
21
+ label: "Status Emoji",
22
+ description: "The emoji to display with the status",
23
+ optional: true,
24
+ },
25
+ statusExpiration: {
26
+ type: "string",
27
+ label: "Status Expiration",
28
+ description: "The datetime of when the status will expire in ISO 8601 format. (Example: `2014-01-01T00:00:00Z`)",
29
+ optional: true,
30
+ },
31
+ },
32
+ async run({ $ }) {
33
+ const response = await this.slack.sdk().users.profile.set({
34
+ profile: {
35
+ status_text: this.statusText,
36
+ status_emoji: this.statusEmoji && `:${this.statusEmoji}:`,
37
+ status_expiration: this.statusExpiration
38
+ && Math.floor(new Date(this.statusExpiration).getTime() / 1000),
39
+ },
40
+ });
41
+ $.export("$summary", "Successfully updated status.");
42
+ return response;
43
+ },
44
+ };
@@ -0,0 +1,67 @@
1
+ import slack from "../../slack.app.mjs";
2
+
3
+ export default {
4
+ key: "slack-update-group-members",
5
+ name: "Update Groups Members",
6
+ description: "Update the list of users for a User Group. [See the documentation](https://api.slack.com/methods/usergroups.users.update)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ props: {
10
+ slack,
11
+ userGroup: {
12
+ propDefinition: [
13
+ slack,
14
+ "userGroup",
15
+ ],
16
+ },
17
+ usersToAdd: {
18
+ propDefinition: [
19
+ slack,
20
+ "user",
21
+ ],
22
+ type: "string[]",
23
+ label: "Users to Add",
24
+ description: "A list of encoded user IDs that represent the users to add to the group.",
25
+ optional: true,
26
+ },
27
+ usersToRemove: {
28
+ propDefinition: [
29
+ slack,
30
+ "user",
31
+ ],
32
+ type: "string[]",
33
+ label: "Users to Remove",
34
+ description: "A list of encoded user IDs that represent the users to remove from the group.",
35
+ optional: true,
36
+ },
37
+ team: {
38
+ propDefinition: [
39
+ slack,
40
+ "team",
41
+ ],
42
+ optional: true,
43
+ description: "Encoded team id where the user group exists, required if org token is used.",
44
+ },
45
+ },
46
+ async run({ $ }) {
47
+ const {
48
+ userGroup,
49
+ usersToAdd,
50
+ usersToRemove,
51
+ team,
52
+ } = this;
53
+ let { users } = await this.slack.sdk().usergroups.users.list({
54
+ usergroup: userGroup,
55
+ team_id: team,
56
+ });
57
+ users = users.filter((user) => !usersToRemove.includes(user));
58
+ users.push(...usersToAdd);
59
+ const response = await this.slack.sdk().usergroups.users.update({
60
+ usergroup: userGroup,
61
+ users,
62
+ team_id: team,
63
+ });
64
+ $.export("$summary", `Successfully updated members of group with ID ${this.userGroup}`);
65
+ return response;
66
+ },
67
+ };
@@ -3,8 +3,8 @@ import slack from "../../slack.app.mjs";
3
3
  export default {
4
4
  key: "slack-update-message",
5
5
  name: "Update Message",
6
- description: "Update a message. [See docs here](https://api.slack.com/methods/chat.update)",
7
- version: "0.1.15",
6
+ description: "Update a message. [See the documentation](https://api.slack.com/methods/chat.update)",
7
+ version: "0.1.16",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -17,7 +17,10 @@ export default {
17
17
  timestamp: {
18
18
  propDefinition: [
19
19
  slack,
20
- "timestamp",
20
+ "messageTs",
21
+ (c) => ({
22
+ channel: c.conversation,
23
+ }),
21
24
  ],
22
25
  },
23
26
  text: {
@@ -40,13 +43,15 @@ export default {
40
43
  ],
41
44
  },
42
45
  },
43
- async run() {
44
- return await this.slack.sdk().chat.update({
46
+ async run({ $ }) {
47
+ const response = await this.slack.sdk().chat.update({
45
48
  ts: this.timestamp,
46
49
  text: this.text,
47
50
  channel: this.conversation,
48
51
  as_user: this.as_user,
49
52
  attachments: this.attachments,
50
53
  });
54
+ $.export("$summary", "Successfully updated message");
55
+ return response;
51
56
  },
52
57
  };
@@ -1,30 +1,87 @@
1
1
  import slack from "../../slack.app.mjs";
2
+ import { ConfigurationError } from "@pipedream/platform";
2
3
 
3
4
  export default {
4
5
  key: "slack-update-profile",
5
6
  name: "Update Profile",
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.15",
7
+ description: "Update basic profile field such as name or title. [See the documentation](https://api.slack.com/methods/users.profile.set)",
8
+ version: "0.0.16",
8
9
  type: "action",
9
10
  props: {
10
11
  slack,
11
- name: {
12
- propDefinition: [
13
- slack,
14
- "name",
15
- ],
12
+ displayName: {
13
+ type: "string",
14
+ label: "Display Name",
15
+ description: "The display name the user has chosen to identify themselves by in their workspace profile",
16
+ optional: true,
17
+ },
18
+ firstName: {
19
+ type: "string",
20
+ label: "First Name",
21
+ description: "The user's first name",
22
+ optional: true,
23
+ },
24
+ lastName: {
25
+ type: "string",
26
+ label: "Last Name",
27
+ description: "The user's last name",
28
+ optional: true,
29
+ },
30
+ phone: {
31
+ type: "string",
32
+ label: "Phone",
33
+ description: "The user's phone number, in any format",
34
+ optional: true,
35
+ },
36
+ pronouns: {
37
+ type: "string",
38
+ label: "Pronouns",
39
+ description: "The user's pronouns",
40
+ optional: true,
41
+ },
42
+ title: {
43
+ type: "string",
44
+ label: "Title",
45
+ description: "The user's title",
46
+ optional: true,
47
+ },
48
+ email: {
49
+ type: "string",
50
+ label: "Email",
51
+ description: "The user's email address. You cannot update your own email using this method. This field can only be changed by admins for users on paid teams.",
52
+ optional: true,
16
53
  },
17
- value: {
54
+ user: {
18
55
  propDefinition: [
19
56
  slack,
20
- "value",
57
+ "user",
21
58
  ],
59
+ description: "ID of user to change. This argument may only be specified by admins on paid teams.",
60
+ optional: true,
22
61
  },
23
62
  },
24
- async run() {
25
- return await this.slack.sdk().users.profile.set({
26
- name: this.name,
27
- value: this.value,
63
+ async run({ $ }) {
64
+ if (!this.displayName
65
+ && !this.firstName
66
+ && !this.lastName
67
+ && !this.phone
68
+ && !this.pronouns
69
+ && !this.title
70
+ ) {
71
+ throw new ConfigurationError("Please provide at least one value to update");
72
+ }
73
+ const response = await this.slack.sdk().users.profile.set({
74
+ profile: {
75
+ display_name: this.displayName,
76
+ first_name: this.firstName,
77
+ last_name: this.lastName,
78
+ phone: this.phone,
79
+ pronouns: this.pronouns,
80
+ title: this.title,
81
+ },
82
+ user: this.user,
28
83
  });
84
+ $.export("$summary", "Successfully updated profile");
85
+ return response;
29
86
  },
30
87
  };
@@ -5,8 +5,8 @@ import slack from "../../slack.app.mjs";
5
5
  export default {
6
6
  key: "slack-upload-file",
7
7
  name: "Upload File",
8
- description: "Upload a file. [See docs here](https://api.slack.com/methods/files.upload)",
9
- version: "0.0.18",
8
+ description: "Upload a file. [See the documentation](https://api.slack.com/methods/files.upload)",
9
+ version: "0.0.19",
10
10
  type: "action",
11
11
  props: {
12
12
  slack,
@@ -32,15 +32,17 @@ export default {
32
32
  optional: true,
33
33
  },
34
34
  },
35
- async run() {
35
+ async run({ $ }) {
36
36
  if (!fs.existsSync(this.content)) {
37
37
  throw new ConfigurationError(`\`${this.content}\` not found, is needed a valid \`/tmp\` path`);
38
38
  }
39
39
 
40
- return await this.slack.sdk().files.upload({
40
+ const response = await this.slack.sdk().files.upload({
41
41
  file: fs.createReadStream(this.content),
42
42
  channels: this.conversation,
43
43
  initial_comment: this.initialComment,
44
44
  });
45
+ $.export("$summary", "Successfully uploaded file");
46
+ return response;
45
47
  },
46
48
  };
@@ -4,8 +4,8 @@ import slack from "../../slack.app.mjs";
4
4
  export default {
5
5
  key: "slack-verify-slack-signature",
6
6
  name: "Verify Slack Signature",
7
- description: "Verifying requests from Slack, slack signs its requests using a secret that's unique to your app. [See docs here](https://api.slack.com/authentication/verifying-requests-from-slack)",
8
- version: "0.0.8",
7
+ description: "Verifying requests from Slack, slack signs its requests using a secret that's unique to your app. [See the documentation](https://api.slack.com/authentication/verifying-requests-from-slack)",
8
+ version: "0.0.9",
9
9
  type: "action",
10
10
  props: {
11
11
  slack,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/slack",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "Pipedream Slack Components",
5
5
  "main": "slack.app.mjs",
6
6
  "keywords": [
@@ -14,6 +14,7 @@
14
14
  "access": "public"
15
15
  },
16
16
  "dependencies": {
17
- "@slack/web-api": "^5.15.0"
17
+ "@pipedream/platform": "^2.0.0",
18
+ "@slack/web-api": "^7.0.4"
18
19
  }
19
20
  }