@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
@@ -1,32 +0,0 @@
1
- import common from "../common/send-message.mjs";
2
-
3
- export default {
4
- ...common,
5
- key: "slack-send-group-message",
6
- name: "Send Group Message",
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.20",
9
- type: "action",
10
- props: {
11
- slack: common.props.slack,
12
- conversation: {
13
- propDefinition: [
14
- common.props.slack,
15
- "group",
16
- ],
17
- },
18
- text: {
19
- propDefinition: [
20
- common.props.slack,
21
- "text",
22
- ],
23
- },
24
- mrkdwn: {
25
- propDefinition: [
26
- common.props.slack,
27
- "mrkdwn",
28
- ],
29
- },
30
- ...common.props,
31
- },
32
- };
@@ -1,38 +0,0 @@
1
- import constants from "../../common/constants.mjs";
2
- import common from "../common/send-message.mjs";
3
-
4
- export default {
5
- ...common,
6
- key: "slack-send-message-public-channel",
7
- name: "Send Message to a Public Channel",
8
- 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",
9
- version: "0.2.19",
10
- type: "action",
11
- props: {
12
- slack: common.props.slack,
13
- conversation: {
14
- propDefinition: [
15
- common.props.slack,
16
- "channelId",
17
- () => ({
18
- types: [
19
- constants.CHANNEL_TYPE.PUBLIC,
20
- ],
21
- }),
22
- ],
23
- },
24
- text: {
25
- propDefinition: [
26
- common.props.slack,
27
- "text",
28
- ],
29
- },
30
- mrkdwn: {
31
- propDefinition: [
32
- common.props.slack,
33
- "mrkdwn",
34
- ],
35
- },
36
- ...common.props,
37
- },
38
- };
@@ -1,30 +0,0 @@
1
- import slack from "../../slack.app.mjs";
2
-
3
- export default {
4
- key: "slack-set-channel-purpose",
5
- name: "Set Channel Purpose",
6
- description: "Change the purpose of a channel. [See docs here](https://api.slack.com/methods/conversations.setPurpose)",
7
- version: "0.0.16",
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
- return await this.slack.sdk().conversations.setPurpose({
26
- channel: this.conversation,
27
- purpose: this.purpose,
28
- });
29
- },
30
- };
@@ -1,23 +0,0 @@
1
- import slack from "../../slack.app.mjs";
2
-
3
- export default {
4
- key: "slack-unarchive-channel",
5
- name: "Unarchive Channel",
6
- description: "Unarchive a channel. [See docs here](https://api.slack.com/methods/conversations.unarchive)",
7
- version: "0.0.15",
8
- type: "action",
9
- props: {
10
- slack,
11
- conversation: {
12
- propDefinition: [
13
- slack,
14
- "conversation",
15
- ],
16
- },
17
- },
18
- async run() {
19
- return await this.slack.sdk().conversations.unarchive({
20
- channel: this.conversation,
21
- });
22
- },
23
- };
@@ -1,45 +0,0 @@
1
- import slack from "../../slack.app.mjs";
2
-
3
- export default {
4
- key: "slack-update-user-groups-users",
5
- name: "Update User Groups Users",
6
- description: "Update the list of users for a User Group. [See docs here](https://api.slack.com/methods/usergroups.users.update)",
7
- version: "0.0.8",
8
- type: "action",
9
- props: {
10
- slack,
11
- userGroup: {
12
- propDefinition: [
13
- slack,
14
- "userGroup",
15
- ],
16
- },
17
- users: {
18
- propDefinition: [
19
- slack,
20
- "users",
21
- ],
22
- description: "A list of encoded user IDs that represent the entire list of users for the User Group.",
23
- },
24
- team: {
25
- propDefinition: [
26
- slack,
27
- "team",
28
- ],
29
- optional: true,
30
- description: "Encoded team id where the user group exists, required if org token is used.",
31
- },
32
- },
33
- async run() {
34
- const {
35
- userGroup,
36
- users,
37
- team,
38
- } = this;
39
- return await this.slack.sdk().usergroups.users.update({
40
- usergroup: userGroup,
41
- users: users,
42
- team_id: team,
43
- });
44
- },
45
- };
@@ -1,45 +0,0 @@
1
- import common from "../common/base.mjs";
2
- import constants from "../common/constants.mjs";
3
-
4
- export default {
5
- ...common,
6
- key: "slack-new-star-added",
7
- name: "New Star Added (Instant)",
8
- version: "0.0.19",
9
- description: "Emit new event when a star is added to an item",
10
- type: "source",
11
- dedupe: "unique",
12
- props: {
13
- ...common.props,
14
- // eslint-disable-next-line pipedream/props-description,pipedream/props-label
15
- slackApphook: {
16
- type: "$.interface.apphook",
17
- appProp: "slack",
18
- async eventNames() {
19
- return [
20
- "star_added",
21
- ];
22
- },
23
- },
24
- eventTypes: {
25
- type: "string[]",
26
- label: "Event Types",
27
- description: "The types of event to emit. If not specified, all events will be emitted.",
28
- options: constants.eventsOptions,
29
- optional: true,
30
- },
31
- },
32
- methods: {
33
- ...common.methods,
34
- getSummary({ item: { type } }) {
35
- return `New star added - ${constants.events[type] ?? type}`;
36
- },
37
- async processEvent(event) {
38
- if (this.eventTypes == null
39
- || this.eventTypes.length === 0
40
- || this.eventTypes.includes(event.item.type)) {
41
- return event;
42
- }
43
- },
44
- },
45
- };