@pipedream/slack_v2 0.6.0 → 0.7.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 (62) hide show
  1. package/actions/add-emoji-reaction/add-emoji-reaction.mjs +1 -1
  2. package/actions/add-reaction/add-reaction.mjs +1 -1
  3. package/actions/archive-channel/archive-channel.mjs +1 -1
  4. package/actions/browse-files/browse-files.mjs +1 -1
  5. package/actions/create-channel/create-channel.mjs +1 -1
  6. package/actions/create-reminder/create-reminder.mjs +1 -1
  7. package/actions/delete-file/delete-file.mjs +1 -1
  8. package/actions/delete-message/delete-message.mjs +48 -6
  9. package/actions/edit-message/edit-message.mjs +1 -1
  10. package/actions/find-message/find-message.mjs +1 -1
  11. package/actions/find-user-by-email/find-user-by-email.mjs +1 -1
  12. package/actions/find-user-by-id/find-user-by-id.mjs +1 -1
  13. package/actions/get-channel-details/get-channel-details.mjs +6 -3
  14. package/actions/get-channel-history/get-channel-history.mjs +15 -2
  15. package/actions/get-current-user/get-current-user.mjs +2 -2
  16. package/actions/get-file/get-file.mjs +1 -1
  17. package/actions/get-thread-replies/get-thread-replies.mjs +17 -2
  18. package/actions/get-user-details/get-user-details.mjs +8 -4
  19. package/actions/invite-user-to-channel/invite-user-to-channel.mjs +72 -14
  20. package/actions/kick-user/kick-user.mjs +1 -1
  21. package/actions/list-channels/list-channels.mjs +54 -6
  22. package/actions/list-emojis/list-emojis.mjs +1 -1
  23. package/actions/list-files/list-files.mjs +1 -1
  24. package/actions/list-group-members/list-group-members.mjs +1 -1
  25. package/actions/list-icon-emoji-options/list-icon-emoji-options.mjs +1 -1
  26. package/actions/list-members-in-channel/list-members-in-channel.mjs +9 -5
  27. package/actions/list-messages/list-messages.mjs +1 -1
  28. package/actions/list-reminder-options/list-reminder-options.mjs +1 -1
  29. package/actions/list-replies/list-replies.mjs +1 -1
  30. package/actions/list-user-group-options/list-user-group-options.mjs +1 -1
  31. package/actions/list-users/list-users.mjs +1 -1
  32. package/actions/post-message/post-message.mjs +1 -1
  33. package/actions/reply-to-a-message/reply-to-a-message.mjs +1 -1
  34. package/actions/search/search.mjs +1 -1
  35. package/actions/send-block-kit-message/send-block-kit-message.mjs +1 -1
  36. package/actions/send-large-message/send-large-message.mjs +1 -1
  37. package/actions/send-message/send-message.mjs +1 -1
  38. package/actions/send-message-advanced/send-message-advanced.mjs +1 -1
  39. package/actions/send-message-to-channel/send-message-to-channel.mjs +1 -1
  40. package/actions/send-message-to-user-or-group/send-message-to-user-or-group.mjs +1 -1
  41. package/actions/set-channel-description/set-channel-description.mjs +1 -1
  42. package/actions/set-channel-topic/set-channel-topic.mjs +7 -4
  43. package/actions/set-status/set-status.mjs +1 -1
  44. package/actions/update-group-members/update-group-members.mjs +1 -1
  45. package/actions/update-message/update-message.mjs +1 -1
  46. package/actions/update-profile/update-profile.mjs +1 -1
  47. package/actions/upload-file/upload-file.mjs +1 -1
  48. package/actions/verify-slack-signature/verify-slack-signature.mjs +1 -1
  49. package/common/constants.mjs +5 -0
  50. package/common/utils.mjs +69 -0
  51. package/package.json +1 -1
  52. package/slack_v2.app.mjs +165 -24
  53. package/sources/new-channel-created/new-channel-created.mjs +1 -1
  54. package/sources/new-interaction-event-received/new-interaction-event-received.mjs +1 -1
  55. package/sources/new-keyword-mention/new-keyword-mention.mjs +1 -1
  56. package/sources/new-message-in-channels/new-message-in-channels.mjs +1 -1
  57. package/sources/new-private-channel-created/new-private-channel-created.mjs +1 -1
  58. package/sources/new-reaction-added/new-reaction-added.mjs +1 -1
  59. package/sources/new-saved-message/new-saved-message.mjs +1 -1
  60. package/sources/new-user-added/new-user-added.mjs +1 -1
  61. package/sources/new-user-mention/new-user-mention.mjs +1 -1
  62. package/actions/approve-workflow/approve-workflow.mjs +0 -92
@@ -3,7 +3,7 @@ import sampleEmit from "./test-event.mjs";
3
3
 
4
4
  export default {
5
5
  name: "New Interaction Events (Instant)",
6
- version: "0.0.24",
6
+ version: "0.0.26",
7
7
  key: "slack_v2-new-interaction-event-received",
8
8
  description: "Emit new events on new Slack [interactivity events](https://api.slack.com/interactivity) sourced from [Block Kit interactive elements](https://api.slack.com/interactivity/components), [Slash commands](https://api.slack.com/interactivity/slash-commands), or [Shortcuts](https://api.slack.com/interactivity/shortcuts).",
9
9
  type: "source",
@@ -7,7 +7,7 @@ export default {
7
7
  ...common,
8
8
  key: "slack_v2-new-keyword-mention",
9
9
  name: "New Keyword Mention (Instant)",
10
- version: "0.1.3",
10
+ version: "0.1.5",
11
11
  description: "Emit new event when a specific keyword is mentioned in a channel",
12
12
  type: "source",
13
13
  dedupe: "unique",
@@ -7,7 +7,7 @@ export default {
7
7
  ...common,
8
8
  key: "slack_v2-new-message-in-channels",
9
9
  name: "New Message In Channels (Instant)",
10
- version: "1.1.3",
10
+ version: "1.1.5",
11
11
  description: "Emit new event when a new message is posted to one or more channels",
12
12
  type: "source",
13
13
  dedupe: "unique",
@@ -4,7 +4,7 @@ export default {
4
4
  ...common,
5
5
  key: "slack_v2-new-private-channel-created",
6
6
  name: "New Private Channel Created",
7
- version: "0.0.4",
7
+ version: "0.0.5",
8
8
  description: "Emit new event when a new private channel is created. [See the documentation](https://api.slack.com/methods/conversations.list)",
9
9
  type: "source",
10
10
  dedupe: "unique",
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack_v2-new-reaction-added",
7
7
  name: "New Reaction Added (Instant)",
8
- version: "1.2.3",
8
+ version: "1.2.5",
9
9
  description: "Emit new event when a member has added an emoji reaction to a message",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack_v2-new-saved-message",
7
7
  name: "New Saved Message (Instant)",
8
- version: "0.0.10",
8
+ version: "0.0.11",
9
9
  description: "Emit new event when a message is saved. Note: The endpoint is marked as deprecated, and Slack might shut this off at some point down the line.",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack_v2-new-user-added",
7
7
  name: "New User Added (Instant)",
8
- version: "0.0.8",
8
+ version: "0.0.9",
9
9
  description: "Emit new event when a new member joins a workspace.",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -7,7 +7,7 @@ export default {
7
7
  ...common,
8
8
  key: "slack_v2-new-user-mention",
9
9
  name: "New User Mention (Instant)",
10
- version: "0.1.3",
10
+ version: "0.1.5",
11
11
  description: "Emit new event when a username or specific keyword is mentioned in a channel",
12
12
  type: "source",
13
13
  dedupe: "unique",
@@ -1,92 +0,0 @@
1
- import slack from "../../slack_v2.app.mjs";
2
- import constants from "../../common/constants.mjs";
3
-
4
- export default {
5
- key: "slack_v2-approve-workflow",
6
- name: "Approve Workflow",
7
- description: "Suspend the workflow until approved by a Slack message. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)",
8
- version: "0.0.9",
9
- annotations: {
10
- destructiveHint: false,
11
- openWorldHint: true,
12
- readOnlyHint: false,
13
- },
14
- type: "action",
15
- props: {
16
- slack,
17
- channelType: {
18
- type: "string",
19
- label: "Channel Type",
20
- description: "The type of channel to send to. User/Direct Message (im), Group (mpim), Private Channel or Public Channel",
21
- async options() {
22
- return constants.CHANNEL_TYPE_OPTIONS;
23
- },
24
- },
25
- conversation: {
26
- propDefinition: [
27
- slack,
28
- "conversation",
29
- (c) => ({
30
- types: c.channelType === "Channels"
31
- ? [
32
- constants.CHANNEL_TYPE.PUBLIC,
33
- constants.CHANNEL_TYPE.PRIVATE,
34
- ]
35
- : [
36
- c.channelType,
37
- ],
38
- }),
39
- ],
40
- },
41
- message: {
42
- type: "string",
43
- label: "Message",
44
- description: "Text to include with the Approve and Cancel Buttons",
45
- },
46
- },
47
- async run({ $ }) {
48
- const {
49
- resume_url, cancel_url,
50
- } = $.flow.suspend();
51
-
52
- const response = await this.slack.postChatMessage({
53
- text: "Click here to approve or cancel workflow",
54
- blocks: [
55
- {
56
- type: "section",
57
- text: {
58
- type: "mrkdwn",
59
- text: this.message,
60
- },
61
- },
62
- {
63
- type: "actions",
64
- elements: [
65
- {
66
- type: "button",
67
- text: {
68
- type: "plain_text",
69
- text: "Approve",
70
- },
71
- style: "primary",
72
- url: resume_url,
73
- },
74
- {
75
- type: "button",
76
- text: {
77
- type: "plain_text",
78
- text: "Cancel",
79
- },
80
- style: "danger",
81
- url: cancel_url,
82
- },
83
- ],
84
- },
85
- ],
86
- channel: this.conversation,
87
- });
88
-
89
- $.export("$summary", "Successfully sent message");
90
- return response;
91
- },
92
- };