Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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/google_drive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/google_drive",
"version": "1.3.0",
"version": "1.3.1",
"description": "Pipedream Google_drive Components",
"main": "google_drive.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "google_drive-new-or-modified-files-polling",
name: "New or Modified Files (Polling)",
description: "Emit new event when a file in the selected Drive is created, modified or trashed. [See the documentation](https://developers.google.com/drive/api/v3/reference/changes/list)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
props: {
Expand All @@ -29,39 +29,34 @@ export default {
optional: false,
},
files: {
propDefinition: [
googleDrive,
"fileId",
({ drive }) => ({
drive,
}),
],
type: "string[]",
label: "Files",
description: "The specific file(s) you want to watch for changes. Leave blank to watch all files in the Drive. Note that events will only be emitted for files directly in these folders (not in their subfolders, unless also selected here)",
description: "The specific file(s) to watch for changes. Leave blank to watch all files in the Drive. Note that events will only be emitted for files directly in these folders (not in their subfolders, unless also selected here)",
optional: true,
default: [],
options({ prevContext }) {
const { nextPageToken } = prevContext;
return this.googleDrive.listFilesOptions(nextPageToken, this.getListFilesOpts());
},
},
folders: {
propDefinition: [
googleDrive,
"folderId",
({ drive }) => ({
drive,
baseOpts: {
q: `mimeType = '${GOOGLE_DRIVE_FOLDER_MIME_TYPE}' and trashed = false`,
},
}),
],
type: "string[]",
label: "Folders",
description: "The specific folder(s) to watch for changes. Leave blank to watch all folders in the Drive.",
optional: true,
default: [],
options({ prevContext }) {
const { nextPageToken } = prevContext;
const baseOpts = {
q: "mimeType = 'application/vnd.google-apps.folder' and trashed = false",
};
const isMyDrive = this.googleDrive.isMyDrive(this.drive);
const opts = isMyDrive
? baseOpts
: {
...baseOpts,
corpora: "drive",
driveId: this.getDriveId(),
includeItemsFromAllDrives: true,
supportsAllDrives: true,
};
return this.googleDrive.listFilesOptions(nextPageToken, opts);
},
},
newFilesOnly: {
type: "boolean",
Expand Down
2 changes: 1 addition & 1 deletion components/google_sheets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/google_sheets",
"version": "0.11.0",
"version": "0.12.0",
"description": "Pipedream Google_sheets Components",
"main": "google_sheets.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import googleSheets from "../../google_sheets.app.mjs";
import common from "../common/new-worksheet.mjs";
import base from "../common/http-based/base.mjs";
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "google_sheets-new-worksheet-polling",
name: "New Worksheet (Polling)",
description: "Emit new event each time a new worksheet is created in a spreadsheet.",
version: "0.0.1",
dedupe: "unique",
type: "source",
hooks: {
...common.hooks,
},
props: {
googleSheets,
db: "$.service.db",
timer: {
type: "$.interface.timer",
static: {
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
},
},
watchedDrive: {
propDefinition: [
googleSheets,
"watchedDrive",
],
},
sheetID: {
propDefinition: [
googleSheets,
"sheetID",
(c) => ({
driveId: googleSheets.methods.getDriveId(c.watchedDrive),
}),
],
},
},
methods: {
...base.methods,
...common.methods,
},
async run() {
await this.processSpreadsheet({
spreadsheetId: this.sheetID,
});
},
sampleEmit,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
"properties": {
"sheetId": 0,
"title": "Sheet1",
"index": 0,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1007,
"columnCount": 28
}
}
}
Loading