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/zoho_workdrive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/zoho_workdrive",
"version": "0.2.5",
"version": "0.2.6",
"description": "Pipedream Zoho WorkDrive Components",
"main": "zoho_workdrive.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
import {
ConfigurationError,
DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
} from "@pipedream/platform";
import app from "../../zoho_workdrive.app.mjs";
import { Readable } from "stream";
import { fileTypeFromBuffer } from "file-type";
Expand All @@ -7,7 +10,7 @@ import sampleEmit from "./test-event.mjs";
export default {
key: "zoho_workdrive-new-file-in-folder",
name: "New File In Folder",
version: "0.1.0",
version: "0.2.0",
description: "Emit new event when a new file is created in a specific folder.",
type: "source",
dedupe: "unique",
Expand Down Expand Up @@ -46,7 +49,14 @@ export default {
}),
],
label: "Folder Id",
description: "The unique ID of the folder.",
description: "Select the unique ID of the folder.",
optional: true,
},
typedFolderId: {
type: "string",
label: "Typed Folder Id",
description: "Type in the unique ID of the folder. Use this if you hit rate limits on the `Folder Id` prop.",
optional: true,
},
includeLink: {
label: "Include Link",
Expand Down Expand Up @@ -88,16 +98,21 @@ export default {
const {
app,
folderId,
typedFolderId,
} = this;

if (!folderId && !typedFolderId) {
throw new ConfigurationError("Please select a Folder Id or type in a Typed Folder Id.");
}

const lastDate = this._getLastDate();
let maxDate = lastDate;
const items = app.paginate({
fn: app.listFiles,
maxResults,
filter: "allfiles",
sort: "created_time",
folderId,
folderId: folderId || typedFolderId,
});

let responseArray = [];
Expand Down
22 changes: 18 additions & 4 deletions components/zoho_workdrive/sources/new-folder/new-folder.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
import app from "../../zoho_workdrive.app.mjs";
import {
ConfigurationError,
DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
} from "@pipedream/platform";import app from "../../zoho_workdrive.app.mjs";
import sampleEmit from "./test-event.mjs";

export default {
key: "zoho_workdrive-new-folder",
name: "New Folder",
version: "0.0.4",
version: "0.1.0",
description: "Emit new event when a new folder is created in a specific folder.",
type: "source",
dedupe: "unique",
Expand Down Expand Up @@ -45,6 +47,13 @@ export default {
],
label: "Folder Id",
description: "The unique ID of the folder.",
optional: true,
},
typedFolderId: {
type: "string",
label: "Typed Folder Id",
description: "Type in the unique ID of the folder. Use this if you hit rate limits on the `Folder Id` prop.",
optional: true,
},
},
methods: {
Expand All @@ -58,16 +67,21 @@ export default {
const {
app,
folderId,
typedFolderId,
} = this;

if (!folderId && !typedFolderId) {
throw new ConfigurationError("Please select a Folder Id or type in a Typed Folder Id.");
}

const lastDate = this._getLastDate();
let maxDate = lastDate;
const items = app.paginate({
fn: app.listFiles,
maxResults,
filter: "folder",
sort: "created_time",
folderId,
folderId: folderId || typedFolderId,
});

let responseArray = [];
Expand Down
Loading