Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/box/actions/download-file/download-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
name: "Download File",
description: "Downloads a file from Box to your workflow's `/tmp` directory. [See the documentation](https://developer.box.com/reference/get-files-id-content/)",
key: "box-download-file",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
app,
Expand Down
48 changes: 48 additions & 0 deletions components/box/actions/get-comments/get-comments.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import app from "../../box.app.mjs";
import utils from "../../common/utils.mjs";

export default {
name: "Get Comments",
description: "Fetches comments for a file. [See the documentation](https://developer.box.com/reference/get-files-id-comments/).",
key: "box-get-comments",
version: "0.0.1",
type: "action",
props: {
app,
folderId: {
propDefinition: [
app,
"parentId",
],
label: "Parent Folder",
description: "Use this option to select your File ID from a dropdown list.",
},
fileId: {
propDefinition: [
app,
"fileId",
(c) => ({
folderId: c.folderId,
}),
],
label: "File ID",
description: "The file ID to get comments from. Use a custom expression to reference a file from your workflow or select it from the dropdown list.",
},
},
async run({ $ }) {
const results = [];
const resourcesStream = utils.getResourcesStream({
resourceFn: this.app.getComments,
resourceFnArgs: {
$,
fileId: this.fileId,
},
});
for await (const resource of resourcesStream) {
results.push(resource);
}
// eslint-disable-next-line multiline-ternary
$.export("$summary", results.length ? `Successfully fetched ${results.length} comment${results.length === 1 ? "" : "s"}.` : "No comments found.");
return results;
},
};
2 changes: 1 addition & 1 deletion components/box/actions/search-content/search-content.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
name: "Search Content",
description: "Searches for files, folders, web links, and shared files across the users content or across the entire enterprise. [See the documentation](https://developer.box.com/reference/get-search/).",
key: "box-search-content",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
app,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
name: "Upload File Version",
description: "Update a file's content. [See the documentation](https://developer.box.com/reference/post-files-id-content/).",
key: "box-upload-file-version",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
app,
Expand Down
2 changes: 1 addition & 1 deletion components/box/actions/upload-file/upload-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
name: "Upload a File",
description: "Uploads a small file to Box. [See the documentation](https://developer.box.com/reference/post-files-content/).",
key: "box-upload-file",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
app,
Expand Down
9 changes: 9 additions & 0 deletions components/box/box.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,14 @@ export default {
...args,
});
},
async getComments({
fileId, ...args
} = {}) {
return this._makeRequest({
method: "GET",
path: `/files/${fileId}/comments`,
...args,
});
},
},
};
2 changes: 1 addition & 1 deletion components/box/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/box",
"version": "0.2.0",
"version": "0.3.0",
"description": "Pipedream Box Components",
"main": "box.app.mjs",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion components/box/sources/new-event/new-event.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "box-new-event",
name: "New Event",
description: "Emit new event when an event with subscribed event source triggered on a target. [See the documentation](https://developer.box.com/reference/post-webhooks)",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
...common,
Expand Down
2 changes: 1 addition & 1 deletion components/box/sources/new-file/new-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "box-new-file",
name: "New File Event",
description: "Emit new event when a new file uploaded on a target. [See the documentation](https://developer.box.com/reference/post-webhooks)",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
...common,
Expand Down
2 changes: 1 addition & 1 deletion components/box/sources/new-folder/new-folder.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "box-new-folder",
name: "New Folder Event",
description: "Emit new event when a new folder created on a target. [See the documentation](https://developer.box.com/reference/post-webhooks)",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
...common,
Expand Down
Loading