@pipedream/slack_v2 1.5.0 → 2.1.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.
|
@@ -11,14 +11,15 @@ export default {
|
|
|
11
11
|
+ " large enough to be truncated. Omit `fields` when you need the complete channel objects."
|
|
12
12
|
+ " Use `namePrefix` to filter results to channels whose names start with a given string"
|
|
13
13
|
+ " (e.g. `dev-`) without a client-side filter loop."
|
|
14
|
-
+ "
|
|
15
|
-
+ " on a large workspace this shrinks the result from thousands of channels
|
|
16
|
-
+ " handful that matter, and it is usually what you want when acting on the user's
|
|
14
|
+
+ " By default (`memberOnly: true`) only channels the authenticated user is a member of"
|
|
15
|
+
+ " are returned — on a large workspace this shrinks the result from thousands of channels"
|
|
16
|
+
+ " to the handful that matter, and it is usually what you want when acting on the user's"
|
|
17
|
+
+ " behalf. Set `memberOnly: false` to list every channel in the workspace."
|
|
17
18
|
+ " Returns `has_more: true` and `next_cursor` when more channels exist than were"
|
|
18
19
|
+ " fetched — when you see that, raise `numPages` (or pass `cursor`) before answering"
|
|
19
20
|
+ " any 'how many' or 'list every' question, otherwise your answer is silently incomplete."
|
|
20
21
|
+ " [See the documentation](https://api.slack.com/methods/conversations.list)",
|
|
21
|
-
version: "0.
|
|
22
|
+
version: "1.0.0",
|
|
22
23
|
annotations: {
|
|
23
24
|
destructiveHint: false,
|
|
24
25
|
openWorldHint: true,
|
|
@@ -46,15 +47,15 @@ export default {
|
|
|
46
47
|
value: "public_channel,private_channel",
|
|
47
48
|
},
|
|
48
49
|
],
|
|
49
|
-
default: "public_channel",
|
|
50
|
+
default: "public_channel,private_channel",
|
|
50
51
|
optional: true,
|
|
51
52
|
},
|
|
52
53
|
memberOnly: {
|
|
53
54
|
type: "boolean",
|
|
54
55
|
label: "Member Channels Only",
|
|
55
|
-
description: "Return only channels the authenticated user is a member of (uses `users.conversations` instead of `conversations.list`).
|
|
56
|
+
description: "Return only channels the authenticated user is a member of (uses `users.conversations` instead of `conversations.list`). Defaults to `true`: the full channel list can run to thousands of entries, while the user's own channels are usually a small fraction of that. Set to `false` to list every channel in the workspace. `Channel Types`, `Fields`, `Name Prefix`, and pagination all still apply. Example: `true`.",
|
|
56
57
|
optional: true,
|
|
57
|
-
default:
|
|
58
|
+
default: true,
|
|
58
59
|
},
|
|
59
60
|
fields: {
|
|
60
61
|
type: "string[]",
|
|
@@ -7,8 +7,11 @@ import slack from "../../slack_v2.app.mjs";
|
|
|
7
7
|
export default {
|
|
8
8
|
key: "slack_v2-upload-file",
|
|
9
9
|
name: "Upload File",
|
|
10
|
-
description: "Upload a file.
|
|
11
|
-
|
|
10
|
+
description: "Upload a file (document, image, audio, etc.) to a Slack channel, group, or direct message, optionally with a comment."
|
|
11
|
+
+ " Use **Send Message** instead for text-only messages with no attachment."
|
|
12
|
+
+ " `Content` can be a path to a file in `/tmp` or a URL; if the URL is a signed/presigned link whose path ends in an opaque ID or token rather than the real file name (e.g. a Google Cloud Storage or S3 URL with a `?X-Goog-Signature=...` query string), Slack can't infer the file type from it and will show the upload as an unreadable binary — set `File Name` explicitly in that case."
|
|
13
|
+
+ " [See the documentation](https://api.slack.com/messaging/files#uploading_files)",
|
|
14
|
+
version: "0.2.0",
|
|
12
15
|
annotations: {
|
|
13
16
|
destructiveHint: false,
|
|
14
17
|
openWorldHint: true,
|
|
@@ -29,9 +32,16 @@ export default {
|
|
|
29
32
|
slack,
|
|
30
33
|
"content",
|
|
31
34
|
],
|
|
35
|
+
description: "The file to upload. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.txt`). If the URL is a signed/presigned link (e.g. from Google Cloud Storage or S3), also set `File Name` — see this action's description for why.",
|
|
36
|
+
},
|
|
37
|
+
filename: {
|
|
38
|
+
type: "string",
|
|
39
|
+
label: "File Name",
|
|
40
|
+
description: "The name to give the uploaded file, including its extension (e.g. `myFile.pdf`). Defaults to the source file's name. Set this when `Content` is a signed/presigned URL whose path doesn't end in the real file name — otherwise Slack stores the file under whatever opaque ID or token is in the URL and can't tell its type.",
|
|
41
|
+
optional: true,
|
|
32
42
|
},
|
|
33
43
|
initialComment: {
|
|
34
|
-
description: "
|
|
44
|
+
description: "Message text to post alongside the file, introducing or describing it (e.g. `Weekly sales report attached.`).",
|
|
35
45
|
propDefinition: [
|
|
36
46
|
slack,
|
|
37
47
|
"initial_comment",
|
|
@@ -54,7 +64,7 @@ export default {
|
|
|
54
64
|
stream, metadata,
|
|
55
65
|
} = await getFileStreamAndMetadata(this.content);
|
|
56
66
|
|
|
57
|
-
const filename = this.
|
|
67
|
+
const filename = this.filename || metadata.name;
|
|
58
68
|
|
|
59
69
|
// Get an upload URL from Slack
|
|
60
70
|
const getUploadUrlResponse = await this.slack.getUploadUrl({
|
|
@@ -103,7 +113,7 @@ export default {
|
|
|
103
113
|
throw new Error(`Error completing upload: ${JSON.stringify(completeUploadResponse)}`);
|
|
104
114
|
}
|
|
105
115
|
|
|
106
|
-
$.export("$summary",
|
|
116
|
+
$.export("$summary", `Successfully uploaded "${filename}" to ${this.conversation}`);
|
|
107
117
|
return completeUploadResponse;
|
|
108
118
|
},
|
|
109
119
|
};
|