@pipedream/slack 0.3.2 → 0.4.1

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 (50) hide show
  1. package/actions/add-star/add-star.mjs +43 -0
  2. package/actions/archive-channel/archive-channel.mjs +23 -0
  3. package/actions/common/send-message.mjs +170 -0
  4. package/actions/complete-reminder/complete-reminder.mjs +23 -0
  5. package/actions/create-channel/create-channel.mjs +30 -0
  6. package/actions/create-reminder/create-reminder.mjs +47 -0
  7. package/actions/delete-file/delete-file.mjs +23 -0
  8. package/actions/delete-message/delete-message.mjs +38 -0
  9. package/actions/delete_reminder/delete-reminder.mjs +23 -0
  10. package/actions/find-message/find-message.mjs +38 -0
  11. package/actions/find-user-by-email/find-user-by-email.mjs +23 -0
  12. package/actions/get-channel/get-channel.mjs +23 -0
  13. package/actions/get-file/get-file.mjs +30 -0
  14. package/actions/get-reminder/get-reminder.mjs +23 -0
  15. package/actions/invite-user-to-channel/invite-user-to-channel.mjs +31 -0
  16. package/actions/join-channel/join-channel.mjs +23 -0
  17. package/actions/kick-user/kick-user.mjs +30 -0
  18. package/actions/leave-channel/leave-channel.mjs +23 -0
  19. package/actions/list-channels/list-channels.mjs +15 -0
  20. package/actions/list-files/list-files.mjs +47 -0
  21. package/actions/list-members-in-channel/list-members-in-channel.mjs +23 -0
  22. package/actions/list-reminders/list-reminders.mjs +24 -0
  23. package/actions/list-replies/list-replies.mjs +30 -0
  24. package/actions/list-users/list-users.mjs +22 -0
  25. package/actions/remove-star/remove-star.mjs +40 -0
  26. package/actions/reply-to-a-message-thread/reply-to-a-message-thread.mjs +41 -0
  27. package/actions/send-block-kit-message/send-block-kit-message.mjs +33 -0
  28. package/actions/send-custom-message/send-custom-message.mjs +79 -0
  29. package/actions/send-direct-message/send-direct-message.mjs +52 -0
  30. package/actions/send-group-message/send-group-message.mjs +52 -0
  31. package/actions/send-large-message/send-large-message.mjs +91 -0
  32. package/actions/send-message-private-channel/send-message-private-channel.mjs +52 -0
  33. package/actions/send-message-public-channel/send-message-public-channel.mjs +52 -0
  34. package/actions/set-channel-topic/set-channel-topic.mjs +30 -0
  35. package/actions/set-purpose-of-channel/set-purpose-of-channel.mjs +30 -0
  36. package/actions/unarchive-channel/unarchive-channel.mjs +23 -0
  37. package/actions/update-message/update-message.mjs +52 -0
  38. package/actions/update-profile/update-profile.mjs +30 -0
  39. package/actions/upload-file/upload-file.mjs +38 -0
  40. package/package.json +19 -16
  41. package/slack.app.mjs +544 -0
  42. package/sources/common/base.mjs +97 -0
  43. package/sources/common/constants.mjs +30 -0
  44. package/sources/new-direct-message/new-direct-message.mjs +51 -0
  45. package/sources/new-mention/new-mention.mjs +95 -0
  46. package/sources/new-message-in-channels/new-message-in-channels.mjs +84 -0
  47. package/sources/new-reaction-added/new-reaction-added.mjs +65 -0
  48. package/sources/new-star-added/new-star-added.mjs +46 -0
  49. package/slack.app.js +0 -48
  50. package/sources/new-message-in-channels/new-message-in-channels.js +0 -151
@@ -0,0 +1,30 @@
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.5",
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
+ };
@@ -0,0 +1,23 @@
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.5",
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
+ };
@@ -0,0 +1,52 @@
1
+ import slack from "../../slack.app.mjs";
2
+
3
+ export default {
4
+ key: "slack-update-message",
5
+ name: "Update Message",
6
+ description: "Update a message. [See docs here](https://api.slack.com/methods/chat.update)",
7
+ version: "0.1.5",
8
+ type: "action",
9
+ props: {
10
+ slack,
11
+ conversation: {
12
+ propDefinition: [
13
+ slack,
14
+ "conversation",
15
+ ],
16
+ },
17
+ timestamp: {
18
+ propDefinition: [
19
+ slack,
20
+ "timestamp",
21
+ ],
22
+ },
23
+ text: {
24
+ propDefinition: [
25
+ slack,
26
+ "text",
27
+ ],
28
+ },
29
+ as_user: {
30
+ propDefinition: [
31
+ slack,
32
+ "as_user",
33
+ ],
34
+ description: "Pass true to update the message as the authed user. Bot users in this context are considered authed users.",
35
+ },
36
+ attachments: {
37
+ propDefinition: [
38
+ slack,
39
+ "attachments",
40
+ ],
41
+ },
42
+ },
43
+ async run() {
44
+ return await this.slack.sdk().chat.update({
45
+ ts: this.timestamp,
46
+ text: this.text,
47
+ channel: this.conversation,
48
+ as_user: this.as_user,
49
+ attachments: this.attachments,
50
+ });
51
+ },
52
+ };
@@ -0,0 +1,30 @@
1
+ import slack from "../../slack.app.mjs";
2
+
3
+ export default {
4
+ key: "slack-update-profile",
5
+ 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.5",
8
+ type: "action",
9
+ props: {
10
+ slack,
11
+ name: {
12
+ propDefinition: [
13
+ slack,
14
+ "name",
15
+ ],
16
+ },
17
+ value: {
18
+ propDefinition: [
19
+ slack,
20
+ "value",
21
+ ],
22
+ },
23
+ },
24
+ async run() {
25
+ return await this.slack.sdk().users.profile.set({
26
+ name: this.name,
27
+ value: this.value,
28
+ });
29
+ },
30
+ };
@@ -0,0 +1,38 @@
1
+ import slack from "../../slack.app.mjs";
2
+
3
+ export default {
4
+ key: "slack-upload-file",
5
+ name: "Upload File",
6
+ description: "Upload a file. [See docs here](https://api.slack.com/methods/files.upload)",
7
+ version: "0.0.5",
8
+ type: "action",
9
+ props: {
10
+ slack,
11
+ content: {
12
+ propDefinition: [
13
+ slack,
14
+ "content",
15
+ ],
16
+ },
17
+ initial_comment: {
18
+ propDefinition: [
19
+ slack,
20
+ "initial_comment",
21
+ ],
22
+ optional: true,
23
+ },
24
+ conversation: {
25
+ propDefinition: [
26
+ slack,
27
+ "conversation",
28
+ ],
29
+ },
30
+ },
31
+ async run() {
32
+ return await this.slack.sdk().files.upload({
33
+ content: this.content,
34
+ channel: this.conversation,
35
+ initial_comment: this.initial_comment,
36
+ });
37
+ },
38
+ };
package/package.json CHANGED
@@ -1,17 +1,20 @@
1
1
  {
2
- "name": "@pipedream/slack",
3
- "version": "0.3.2",
4
- "description": "Pipedream Slack Components",
5
- "main": "slack.app.js",
6
- "keywords": [
7
- "pipedream",
8
- "slack"
9
- ],
10
- "homepage": "https://pipedream.com/apps/slack",
11
- "author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
12
- "license": "MIT",
13
- "gitHead": "bf0e1cb3ad6da248c6125f9b512c59bfe35bf1fa",
14
- "publishConfig": {
15
- "access": "public"
16
- }
17
- }
2
+ "name": "@pipedream/slack",
3
+ "version": "0.4.1",
4
+ "description": "Pipedream Slack Components",
5
+ "main": "slack.app.mjs",
6
+ "keywords": [
7
+ "pipedream",
8
+ "slack"
9
+ ],
10
+ "homepage": "https://pipedream.com/apps/slack",
11
+ "author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
12
+ "license": "MIT",
13
+ "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535",
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "dependencies": {
18
+ "@slack/web-api": "^5.15.0"
19
+ }
20
+ }