@pipedream/google_drive 1.5.4 → 1.6.1
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.
- package/actions/add-comment/add-comment.mjs +1 -1
- package/actions/add-file-sharing-preference/add-file-sharing-preference.mjs +1 -1
- package/actions/copy-file/copy-file.mjs +1 -1
- package/actions/create-file-from-template/create-file-from-template.mjs +1 -1
- package/actions/create-file-from-text/create-file-from-text.mjs +1 -1
- package/actions/create-folder/create-folder.mjs +1 -1
- package/actions/create-shared-drive/create-shared-drive.mjs +1 -1
- package/actions/delete-comment/delete-comment.mjs +1 -1
- package/actions/delete-file/delete-file.mjs +1 -1
- package/actions/delete-reply/delete-reply.mjs +1 -1
- package/actions/delete-shared-drive/delete-shared-drive.mjs +1 -1
- package/actions/download-file/download-file.mjs +1 -1
- package/actions/find-file/find-file.mjs +1 -1
- package/actions/find-folder/find-folder.mjs +1 -1
- package/actions/find-forms/find-forms.mjs +1 -1
- package/actions/find-spreadsheets/find-spreadsheets.mjs +1 -1
- package/actions/get-comment/get-comment.mjs +1 -1
- package/actions/get-current-user/get-current-user.mjs +1 -1
- package/actions/get-file-by-id/get-file-by-id.mjs +1 -1
- package/actions/get-folder-id-for-path/get-folder-id-for-path.mjs +1 -1
- package/actions/get-reply/get-reply.mjs +1 -1
- package/actions/get-shared-drive/get-shared-drive.mjs +1 -1
- package/actions/list-access-proposals/list-access-proposals.mjs +1 -1
- package/actions/list-comments/list-comments.mjs +1 -1
- package/actions/list-files/list-files.mjs +1 -1
- package/actions/list-replies/list-replies.mjs +1 -1
- package/actions/move-file/move-file.mjs +1 -1
- package/actions/move-file-to-trash/move-file-to-trash.mjs +1 -1
- package/actions/remove-file-sharing-permission/remove-file-sharing-permission.mjs +1 -1
- package/actions/reply-to-comment/reply-to-comment.mjs +1 -1
- package/actions/resolve-access-proposal/resolve-access-proposal.mjs +1 -1
- package/actions/resolve-comment/resolve-comment.mjs +1 -1
- package/actions/search-shared-drives/search-shared-drives.mjs +1 -1
- package/actions/update-comment/update-comment.mjs +1 -1
- package/actions/update-file/update-file.mjs +1 -1
- package/actions/update-reply/update-reply.mjs +1 -1
- package/actions/update-shared-drive/update-shared-drive.mjs +1 -1
- package/actions/upload-file/upload-file.mjs +1 -1
- package/google_drive.app.mjs +4 -2
- package/package.json +2 -1
- package/sources/changes-to-files-in-drive/changes-to-files-in-drive.mjs +3 -2
- package/sources/changes-to-specific-files/changes-to-specific-files.mjs +1 -1
- package/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs +3 -2
- package/sources/common-webhook.mjs +9 -1
- package/sources/new-access-proposal/new-access-proposal.mjs +1 -1
- package/sources/new-files-instant/new-files-instant.mjs +1 -1
- package/sources/new-files-instant-polling/new-files-instant-polling.mjs +10 -2
- package/sources/new-files-shared-drive/new-files-shared-drive.mjs +10 -2
- package/sources/new-or-modified-comments/new-or-modified-comments.mjs +3 -2
- package/sources/new-or-modified-comments-polling/new-or-modified-comments-polling.mjs +3 -2
- package/sources/new-or-modified-files/new-or-modified-files.mjs +3 -2
- package/sources/new-or-modified-files-polling/new-or-modified-files-polling.mjs +12 -3
- package/sources/new-or-modified-folders/new-or-modified-folders.mjs +3 -2
- package/sources/new-or-modified-folders-polling/new-or-modified-folders-polling.mjs +31 -12
- package/sources/new-shared-drive/new-shared-drive.mjs +1 -1
- package/sources/new-spreadsheet/new-spreadsheet.mjs +1 -1
- package/sources/new-spreadsheet-polling/new-spreadsheet-polling.mjs +10 -2
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-add-comment",
|
|
5
5
|
name: "Add Comment",
|
|
6
6
|
description: "Add an unanchored comment to a Google Doc (general feedback, no text highlighting). [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/create)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.4",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
name: "Share File or Folder",
|
|
21
21
|
description:
|
|
22
22
|
"Add a [sharing permission](https://support.google.com/drive/answer/7166529) to the sharing preferences of a file or folder and provide a sharing URL. [See the documentation](https://developers.google.com/drive/api/v3/reference/permissions/create)",
|
|
23
|
-
version: "0.2.
|
|
23
|
+
version: "0.2.12",
|
|
24
24
|
annotations: {
|
|
25
25
|
destructiveHint: false,
|
|
26
26
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-copy-file",
|
|
5
5
|
name: "Copy File",
|
|
6
6
|
description: "Create a copy of the specified file. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/copy) for more information",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.19",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
key: "google_drive-create-file-from-template",
|
|
10
10
|
name: "Create New File From Template",
|
|
11
11
|
description: "Create a new Google Docs file from a template. Optionally include placeholders in the template document that will get replaced from this action. [See documentation](https://www.npmjs.com/package/google-docs-mustaches)",
|
|
12
|
-
version: "0.1.
|
|
12
|
+
version: "0.1.22",
|
|
13
13
|
annotations: {
|
|
14
14
|
destructiveHint: true,
|
|
15
15
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_drive-create-file-from-text",
|
|
6
6
|
name: "Create New File From Text",
|
|
7
7
|
description: "Create a new file from plain text. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.12",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
key: "google_drive-create-folder",
|
|
14
14
|
name: "Create Folder",
|
|
15
15
|
description: "Create a new empty folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information",
|
|
16
|
-
version: "0.1.
|
|
16
|
+
version: "0.1.20",
|
|
17
17
|
annotations: {
|
|
18
18
|
destructiveHint: false,
|
|
19
19
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-create-shared-drive",
|
|
5
5
|
name: "Create Shared Drive",
|
|
6
6
|
description: "Create a new shared drive. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/create) for more information",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.20",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-delete-comment",
|
|
5
5
|
name: "Delete Comment",
|
|
6
6
|
description: "Delete a specific comment (Requires ownership or permissions). [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/delete)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Delete File",
|
|
6
6
|
description:
|
|
7
7
|
"Permanently delete a file or folder without moving it to the trash. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/delete) for more information",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.20",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: true,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-delete-reply",
|
|
5
5
|
name: "Delete Reply",
|
|
6
6
|
description: "Delete a reply on a specific comment. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/replies/delete) for more information",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-delete-shared-drive",
|
|
5
5
|
name: "Delete Shared Drive",
|
|
6
6
|
description: "Delete a shared drive without any content. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/delete) for more information",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.19",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
key: "google_drive-download-file",
|
|
19
19
|
name: "Download File",
|
|
20
20
|
description: "Download a file. [See the documentation](https://developers.google.com/drive/api/v3/manage-downloads) for more information",
|
|
21
|
-
version: "0.1.
|
|
21
|
+
version: "0.1.22",
|
|
22
22
|
annotations: {
|
|
23
23
|
destructiveHint: false,
|
|
24
24
|
openWorldHint: true,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_drive-find-file",
|
|
7
7
|
name: "Find File",
|
|
8
8
|
description: "Search for a specific file by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.19",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
key: "google_drive-find-folder",
|
|
8
8
|
name: "Find Folder",
|
|
9
9
|
description: "Search for a specific folder by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.19",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
13
13
|
openWorldHint: true,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_drive-find-forms",
|
|
7
7
|
name: "Find Forms",
|
|
8
8
|
description: "List Google Form documents or search for a Form by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.20",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_drive-find-spreadsheets",
|
|
7
7
|
name: "Find Spreadsheets",
|
|
8
8
|
description: "Search for a specific spreadsheet by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.19",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-get-comment",
|
|
5
5
|
name: "Get Comment By ID",
|
|
6
6
|
description: "Get comment by ID on a specific file. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/get) for more information",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_drive-get-current-user",
|
|
7
7
|
name: "Get Current User",
|
|
8
8
|
description: "Retrieve Google Drive account metadata for the authenticated user via `about.get`, including display name, email, permission ID, and storage quota. Useful when flows or agents need to confirm the active Google identity or understand available storage. [See the documentation](https://developers.google.com/drive/api/v3/reference/about/get).",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.6",
|
|
10
10
|
type: "action",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_drive-get-file-by-id",
|
|
6
6
|
name: "Get File By ID",
|
|
7
7
|
description: "Get info on a specific file. [See the documentation](https://developers.google.com/drive/api/reference/rest/v3/files/get) for more information",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.16",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
key: "google_drive-get-folder-id-for-path",
|
|
13
13
|
name: "Get Folder ID for a Path",
|
|
14
14
|
description: "Retrieve a folderId for a path. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
15
|
-
version: "0.1.
|
|
15
|
+
version: "0.1.21",
|
|
16
16
|
annotations: {
|
|
17
17
|
destructiveHint: false,
|
|
18
18
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-get-reply",
|
|
5
5
|
name: "Get Reply By ID",
|
|
6
6
|
description: "Get reply by ID on a specific comment. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/replies/get) for more information",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-get-shared-drive",
|
|
5
5
|
name: "Get Shared Drive",
|
|
6
6
|
description: "Get metadata for one or all shared drives. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/get) for more information",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.19",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-list-access-proposals",
|
|
5
5
|
name: "List Access Proposals",
|
|
6
6
|
description: "List access proposals for a file or folder. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/accessproposals/list)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-list-comments",
|
|
5
5
|
name: "List Comments",
|
|
6
6
|
description: "List all comments on a file. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/list)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_drive-list-files",
|
|
6
6
|
name: "List Files",
|
|
7
7
|
description: "List files from a specific folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/list) for more information",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-list-replies",
|
|
5
5
|
name: "List Replies",
|
|
6
6
|
description: "List replies to a specific comment. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/replies/list) for more information",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-move-file",
|
|
5
5
|
name: "Move File",
|
|
6
6
|
description: "Move a file from one folder to another. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.19",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_drive-move-file-to-trash",
|
|
6
6
|
name: "Move File to Trash",
|
|
7
7
|
description: "Move a file or folder to trash. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.19",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: true,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "Remove File Sharing Permission",
|
|
7
7
|
description:
|
|
8
8
|
"Remove a [sharing permission](https://support.google.com/drive/answer/7166529) from the sharing preferences of a file or folder. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/permissions/delete)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.4",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: true,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-reply-to-comment",
|
|
5
5
|
name: "Reply to Comment",
|
|
6
6
|
description: "Add a reply to an existing comment. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/replies/create)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_drive-resolve-access-proposal",
|
|
6
6
|
name: "Resolve Access Proposals",
|
|
7
7
|
description: "Accept or deny a request for access to a file or folder in Google Drive. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/accessproposals/resolve)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.12",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-resolve-comment",
|
|
5
5
|
name: "Resolve Comment",
|
|
6
6
|
description: "Mark a comment as resolved. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/update)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-search-shared-drives",
|
|
5
5
|
name: "Search for Shared Drives",
|
|
6
6
|
description: "Search for shared drives with query options. [See the documentation](https://developers.google.com/drive/api/v3/search-shareddrives) for more information",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.20",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-update-comment",
|
|
5
5
|
name: "Update Comment",
|
|
6
6
|
description: "Update the content of a specific comment. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/update) for more information",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_drive-update-file",
|
|
7
7
|
name: "Update File",
|
|
8
8
|
description: "Update a file's metadata and/or content. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information",
|
|
9
|
-
version: "2.0.
|
|
9
|
+
version: "2.0.11",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: true,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-update-reply",
|
|
5
5
|
name: "Update Reply",
|
|
6
6
|
description: "Update a reply on a specific comment. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/replies/update) for more information",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_drive-update-shared-drive",
|
|
5
5
|
name: "Update Shared Drive",
|
|
6
6
|
description: "Update an existing shared drive. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/update) for more information",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.19",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
key: "google_drive-upload-file",
|
|
14
14
|
name: "Upload File",
|
|
15
15
|
description: "Upload a file to Google Drive. [See the documentation](https://developers.google.com/drive/api/v3/manage-uploads) for more information",
|
|
16
|
-
version: "2.0.
|
|
16
|
+
version: "2.0.12",
|
|
17
17
|
annotations: {
|
|
18
18
|
destructiveHint: false,
|
|
19
19
|
openWorldHint: true,
|
package/google_drive.app.mjs
CHANGED
|
@@ -428,14 +428,16 @@ export default {
|
|
|
428
428
|
* returned by this same method.
|
|
429
429
|
* @param {string} [driveId] - the shared drive from which changes are
|
|
430
430
|
* returned
|
|
431
|
+
* @param {number} [pageSize=1000] - the maximum number of changes to return
|
|
432
|
+
* per page
|
|
431
433
|
* @yields
|
|
432
434
|
* @type {ChangesPage}
|
|
433
435
|
*/
|
|
434
|
-
async *listChanges(pageToken, driveId) {
|
|
436
|
+
async *listChanges(pageToken, driveId, pageSize = 1000) {
|
|
435
437
|
const drive = this.drive();
|
|
436
438
|
let changeRequest = {
|
|
437
439
|
pageToken,
|
|
438
|
-
pageSize
|
|
440
|
+
pageSize,
|
|
439
441
|
};
|
|
440
442
|
|
|
441
443
|
// As with many of the methods for Google Drive, we must
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/google_drive",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Pipedream Google_drive Components",
|
|
5
5
|
"main": "google_drive.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"google-docs-mustaches": "^1.2.2",
|
|
17
17
|
"got": "13.0.0",
|
|
18
18
|
"lodash": "^4.17.23",
|
|
19
|
+
"md5": "^2.3.0",
|
|
19
20
|
"mime-db": "^1.51.0",
|
|
20
21
|
"uuid": "^8.3.2"
|
|
21
22
|
},
|
|
@@ -7,13 +7,14 @@ import {
|
|
|
7
7
|
} from "../../common/constants.mjs";
|
|
8
8
|
import commonDedupeChanges from "../common-dedupe-changes.mjs";
|
|
9
9
|
import { stashFile } from "../../common/utils.mjs";
|
|
10
|
+
import md5 from "md5";
|
|
10
11
|
|
|
11
12
|
export default {
|
|
12
13
|
...common,
|
|
13
14
|
key: "google_drive-changes-to-files-in-drive",
|
|
14
15
|
name: "Changes to Files in Drive",
|
|
15
16
|
description: "Emit new event when a change is made to one of the specified files. [See the documentation](https://developers.google.com/drive/api/v3/reference/changes/watch)",
|
|
16
|
-
version: "0.0.
|
|
17
|
+
version: "0.0.7",
|
|
17
18
|
type: "source",
|
|
18
19
|
dedupe: "unique",
|
|
19
20
|
props: {
|
|
@@ -94,7 +95,7 @@ export default {
|
|
|
94
95
|
: fileName || "Untitled";
|
|
95
96
|
|
|
96
97
|
return {
|
|
97
|
-
id: `${fileId}-${ts}
|
|
98
|
+
id: md5(`${fileId}-${ts}`),
|
|
98
99
|
summary,
|
|
99
100
|
ts,
|
|
100
101
|
};
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
key: "google_drive-changes-to-specific-files",
|
|
17
17
|
name: "Changes to Specific Files",
|
|
18
18
|
description: "Watches for changes to specific files, emitting an event when a change is made to one of those files. To watch for changes to [shared drive](https://support.google.com/a/users/answer/9310351) files, use the **Changes to Specific Files (Shared Drive)** source instead.",
|
|
19
|
-
version: "0.3.
|
|
19
|
+
version: "0.3.6",
|
|
20
20
|
type: "source",
|
|
21
21
|
// Dedupe events based on the "x-goog-message-number" header for the target channel:
|
|
22
22
|
// https://developers.google.com/drive/api/v3/push#making-watch-requests
|
package/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "../../common/constants.mjs";
|
|
18
18
|
import commonDedupeChanges from "../common-dedupe-changes.mjs";
|
|
19
19
|
import { stashFile } from "../../common/utils.mjs";
|
|
20
|
+
import md5 from "md5";
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* This source uses the Google Drive API's
|
|
@@ -28,7 +29,7 @@ export default {
|
|
|
28
29
|
key: "google_drive-changes-to-specific-files-shared-drive",
|
|
29
30
|
name: "Changes to Specific Files (Shared Drive)",
|
|
30
31
|
description: "Watches for changes to specific files in a shared drive, emitting an event when a change is made to one of those files",
|
|
31
|
-
version: "0.3.
|
|
32
|
+
version: "0.3.7",
|
|
32
33
|
type: "source",
|
|
33
34
|
// Dedupe events based on the "x-goog-message-number" header for the target channel:
|
|
34
35
|
// https://developers.google.com/drive/api/v3/push#making-watch-requests
|
|
@@ -99,7 +100,7 @@ export default {
|
|
|
99
100
|
: fileName || "Untitled";
|
|
100
101
|
|
|
101
102
|
return {
|
|
102
|
-
id: `${fileId}-${ts}
|
|
103
|
+
id: md5(`${fileId}-${ts}`),
|
|
103
104
|
summary,
|
|
104
105
|
ts,
|
|
105
106
|
};
|
|
@@ -32,6 +32,13 @@ export default {
|
|
|
32
32
|
},
|
|
33
33
|
hidden: true,
|
|
34
34
|
},
|
|
35
|
+
changesPageSize: {
|
|
36
|
+
type: "integer",
|
|
37
|
+
label: "Changes Page Size",
|
|
38
|
+
description: "Maximum number of changes to fetch per API call. Lower values reduce the risk of execution timeouts on active drives.",
|
|
39
|
+
default: 1000,
|
|
40
|
+
optional: true,
|
|
41
|
+
},
|
|
35
42
|
},
|
|
36
43
|
hooks: {
|
|
37
44
|
async activate() {
|
|
@@ -194,7 +201,8 @@ export default {
|
|
|
194
201
|
}
|
|
195
202
|
|
|
196
203
|
const driveId = this.getDriveId();
|
|
197
|
-
const changedFilesStream =
|
|
204
|
+
const changedFilesStream =
|
|
205
|
+
this.googleDrive.listChanges(pageToken, driveId, this.changesPageSize);
|
|
198
206
|
for await (const changedFilesPage of changedFilesStream) {
|
|
199
207
|
const {
|
|
200
208
|
changedFiles,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_drive-new-access-proposal",
|
|
7
7
|
name: "New Access Proposal",
|
|
8
8
|
description: "Emit new event when a new access proposal is requested in Google Drive",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
key: "google_drive-new-files-instant",
|
|
12
12
|
name: "New Files (Instant)",
|
|
13
13
|
description: "Emit new event when a new file is added in your linked Google Drive",
|
|
14
|
-
version: "0.2.
|
|
14
|
+
version: "0.2.7",
|
|
15
15
|
type: "source",
|
|
16
16
|
dedupe: "unique",
|
|
17
17
|
props: {
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
key: "google_drive-new-files-instant-polling",
|
|
9
9
|
name: "New Files (Polling)",
|
|
10
10
|
description: "Emit new event when a new file is added in your linked Google Drive",
|
|
11
|
-
version: "0.0.
|
|
11
|
+
version: "0.0.5",
|
|
12
12
|
type: "source",
|
|
13
13
|
dedupe: "unique",
|
|
14
14
|
props: {
|
|
@@ -45,6 +45,13 @@ export default {
|
|
|
45
45
|
optional: true,
|
|
46
46
|
default: [],
|
|
47
47
|
},
|
|
48
|
+
changesPageSize: {
|
|
49
|
+
type: "integer",
|
|
50
|
+
label: "Changes Page Size",
|
|
51
|
+
description: "Maximum number of changes to fetch per API call. Lower values reduce the risk of execution timeouts on active drives.",
|
|
52
|
+
default: 1000,
|
|
53
|
+
optional: true,
|
|
54
|
+
},
|
|
48
55
|
},
|
|
49
56
|
hooks: {
|
|
50
57
|
async deploy() {
|
|
@@ -140,7 +147,8 @@ export default {
|
|
|
140
147
|
const pageToken = this._getPageToken();
|
|
141
148
|
const driveId = this.getDriveId();
|
|
142
149
|
|
|
143
|
-
const changedFilesStream =
|
|
150
|
+
const changedFilesStream =
|
|
151
|
+
this.googleDrive.listChanges(pageToken, driveId, this.changesPageSize);
|
|
144
152
|
|
|
145
153
|
for await (const changedFilesPage of changedFilesStream) {
|
|
146
154
|
console.log("Changed files page:", changedFilesPage);
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
key: "google_drive-new-files-shared-drive",
|
|
8
8
|
name: "New Files (Shared Drive)",
|
|
9
9
|
description: "Emit new event when a new file is added in your shared Google Drive",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.7",
|
|
11
11
|
type: "source",
|
|
12
12
|
dedupe: "unique",
|
|
13
13
|
props: {
|
|
@@ -49,6 +49,13 @@ export default {
|
|
|
49
49
|
accessMode: "write",
|
|
50
50
|
optional: true,
|
|
51
51
|
},
|
|
52
|
+
changesPageSize: {
|
|
53
|
+
type: "integer",
|
|
54
|
+
label: "Changes Page Size",
|
|
55
|
+
description: "Maximum number of changes to fetch per API call. Lower values reduce the risk of execution timeouts on active drives.",
|
|
56
|
+
default: 1000,
|
|
57
|
+
optional: true,
|
|
58
|
+
},
|
|
52
59
|
},
|
|
53
60
|
hooks: {
|
|
54
61
|
async deploy() {
|
|
@@ -66,7 +73,8 @@ export default {
|
|
|
66
73
|
const pageToken = this._getPageToken();
|
|
67
74
|
|
|
68
75
|
const driveId = this.getDriveId();
|
|
69
|
-
const changedFilesStream =
|
|
76
|
+
const changedFilesStream =
|
|
77
|
+
this.googleDrive.listChanges(pageToken, driveId, this.changesPageSize);
|
|
70
78
|
for await (const changedFilesPage of changedFilesStream) {
|
|
71
79
|
const { nextPageToken } = changedFilesPage;
|
|
72
80
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { GOOGLE_DRIVE_NOTIFICATION_CHANGE } from "../../common/constants.mjs";
|
|
12
12
|
import common from "../common-webhook.mjs";
|
|
13
|
+
import md5 from "md5";
|
|
13
14
|
|
|
14
15
|
export default {
|
|
15
16
|
...common,
|
|
@@ -17,7 +18,7 @@ export default {
|
|
|
17
18
|
name: "New or Modified Comments (Instant)",
|
|
18
19
|
description:
|
|
19
20
|
"Emit new event when a comment is created or modified in the selected file",
|
|
20
|
-
version: "1.0.
|
|
21
|
+
version: "1.0.16",
|
|
21
22
|
type: "source",
|
|
22
23
|
// Dedupe events based on the "x-goog-message-number" header for the target channel:
|
|
23
24
|
// https://developers.google.com/drive/api/v3/push#making-watch-requests
|
|
@@ -81,7 +82,7 @@ export default {
|
|
|
81
82
|
const eventId = headers && headers["x-goog-message-number"];
|
|
82
83
|
|
|
83
84
|
return {
|
|
84
|
-
id: `${commentId}-${eventId || ts}
|
|
85
|
+
id: md5(`${commentId}-${eventId || ts}`),
|
|
85
86
|
summary,
|
|
86
87
|
ts,
|
|
87
88
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
2
|
import googleDrive from "../../google_drive.app.mjs";
|
|
3
3
|
import sampleEmit from "./test-event.mjs";
|
|
4
|
+
import md5 from "md5";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
key: "google_drive-new-or-modified-comments-polling",
|
|
7
8
|
name: "New or Modified Comments (Polling)",
|
|
8
9
|
description: "Emit new event when a comment is created or modified in the selected file",
|
|
9
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.6",
|
|
10
11
|
type: "source",
|
|
11
12
|
dedupe: "unique",
|
|
12
13
|
props: {
|
|
@@ -75,7 +76,7 @@ export default {
|
|
|
75
76
|
const ts = Date.parse(tsString);
|
|
76
77
|
|
|
77
78
|
return {
|
|
78
|
-
id: `${commentId}-${ts}
|
|
79
|
+
id: md5(`${commentId}-${ts}`),
|
|
79
80
|
summary,
|
|
80
81
|
ts,
|
|
81
82
|
};
|
|
@@ -17,6 +17,7 @@ import commonDedupeChanges from "../common-dedupe-changes.mjs";
|
|
|
17
17
|
import common from "../common-webhook.mjs";
|
|
18
18
|
import { stashFile } from "../../common/utils.mjs";
|
|
19
19
|
import sampleEmit from "./test-event.mjs";
|
|
20
|
+
import md5 from "md5";
|
|
20
21
|
|
|
21
22
|
const { googleDrive } = common.props;
|
|
22
23
|
|
|
@@ -25,7 +26,7 @@ export default {
|
|
|
25
26
|
key: "google_drive-new-or-modified-files",
|
|
26
27
|
name: "New or Modified Files (Instant)",
|
|
27
28
|
description: "Emit new event when a file in the selected Drive is created, modified or trashed.",
|
|
28
|
-
version: "0.4.
|
|
29
|
+
version: "0.4.7",
|
|
29
30
|
type: "source",
|
|
30
31
|
// Dedupe events based on the "x-goog-message-number" header for the target channel:
|
|
31
32
|
// https://developers.google.com/drive/api/v3/push#making-watch-requests
|
|
@@ -122,7 +123,7 @@ export default {
|
|
|
122
123
|
const eventId = headers && headers["x-goog-message-number"];
|
|
123
124
|
|
|
124
125
|
return {
|
|
125
|
-
id: `${fileId}-${eventId || ts}
|
|
126
|
+
id: md5(`${fileId}-${eventId || ts}`),
|
|
126
127
|
summary,
|
|
127
128
|
ts,
|
|
128
129
|
};
|
|
@@ -3,12 +3,13 @@ import googleDrive from "../../google_drive.app.mjs";
|
|
|
3
3
|
import { getListFilesOpts } from "../../common/utils.mjs";
|
|
4
4
|
import sampleEmit from "./test-event.mjs";
|
|
5
5
|
import { GOOGLE_DRIVE_FOLDER_MIME_TYPE } from "../../common/constants.mjs";
|
|
6
|
+
import md5 from "md5";
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
key: "google_drive-new-or-modified-files-polling",
|
|
9
10
|
name: "New or Modified Files (Polling)",
|
|
10
11
|
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)",
|
|
11
|
-
version: "0.0.
|
|
12
|
+
version: "0.0.7",
|
|
12
13
|
type: "source",
|
|
13
14
|
dedupe: "unique",
|
|
14
15
|
props: {
|
|
@@ -65,6 +66,13 @@ export default {
|
|
|
65
66
|
default: false,
|
|
66
67
|
optional: true,
|
|
67
68
|
},
|
|
69
|
+
changesPageSize: {
|
|
70
|
+
type: "integer",
|
|
71
|
+
label: "Changes Page Size",
|
|
72
|
+
description: "Maximum number of changes to fetch per API call. Lower values reduce the risk of execution timeouts on active drives.",
|
|
73
|
+
default: 1000,
|
|
74
|
+
optional: true,
|
|
75
|
+
},
|
|
68
76
|
},
|
|
69
77
|
hooks: {
|
|
70
78
|
async deploy() {
|
|
@@ -159,7 +167,7 @@ export default {
|
|
|
159
167
|
const ts = Date.parse(tsString);
|
|
160
168
|
|
|
161
169
|
return {
|
|
162
|
-
id: `${fileId}-${ts}
|
|
170
|
+
id: md5(`${fileId}-${ts}`),
|
|
163
171
|
summary,
|
|
164
172
|
ts,
|
|
165
173
|
};
|
|
@@ -177,7 +185,8 @@ export default {
|
|
|
177
185
|
const pageToken = this._getPageToken();
|
|
178
186
|
const driveId = this.getDriveId();
|
|
179
187
|
|
|
180
|
-
const changedFilesStream =
|
|
188
|
+
const changedFilesStream =
|
|
189
|
+
this.googleDrive.listChanges(pageToken, driveId, this.changesPageSize);
|
|
181
190
|
|
|
182
191
|
for await (const changedFilesPage of changedFilesStream) {
|
|
183
192
|
console.log("Changed files page:", changedFilesPage);
|
|
@@ -14,13 +14,14 @@ import {
|
|
|
14
14
|
GOOGLE_DRIVE_NOTIFICATION_UPDATE,
|
|
15
15
|
} from "../../common/constants.mjs";
|
|
16
16
|
import common from "../common-webhook.mjs";
|
|
17
|
+
import md5 from "md5";
|
|
17
18
|
|
|
18
19
|
export default {
|
|
19
20
|
...common,
|
|
20
21
|
key: "google_drive-new-or-modified-folders",
|
|
21
22
|
name: "New or Modified Folders (Instant)",
|
|
22
23
|
description: "Emit new event when a folder is created or modified in the selected Drive",
|
|
23
|
-
version: "0.2.
|
|
24
|
+
version: "0.2.10",
|
|
24
25
|
type: "source",
|
|
25
26
|
// Dedupe events based on the "x-goog-message-number" header for the target channel:
|
|
26
27
|
// https://developers.google.com/drive/api/v3/push#making-watch-requests
|
|
@@ -102,7 +103,7 @@ export default {
|
|
|
102
103
|
name: summary,
|
|
103
104
|
} = data;
|
|
104
105
|
return {
|
|
105
|
-
id: `${fileId}-${ts}
|
|
106
|
+
id: md5(`${fileId}-${ts}`),
|
|
106
107
|
summary,
|
|
107
108
|
ts,
|
|
108
109
|
};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
2
|
import googleDrive from "../../google_drive.app.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
getListFilesOpts,
|
|
5
|
+
isMyDrive,
|
|
6
|
+
} from "../../common/utils.mjs";
|
|
4
7
|
import { GOOGLE_DRIVE_FOLDER_MIME_TYPE } from "../../common/constants.mjs";
|
|
5
8
|
import sampleEmit from "./test-event.mjs";
|
|
9
|
+
import md5 from "md5";
|
|
6
10
|
|
|
7
11
|
export default {
|
|
8
12
|
key: "google_drive-new-or-modified-folders-polling",
|
|
9
13
|
name: "New or Modified Folders (Polling)",
|
|
10
14
|
description: "Emit new event when a folder is created or modified in the selected Drive",
|
|
11
|
-
version: "0.0.
|
|
15
|
+
version: "0.0.6",
|
|
12
16
|
type: "source",
|
|
13
17
|
dedupe: "unique",
|
|
14
18
|
props: {
|
|
@@ -46,6 +50,13 @@ export default {
|
|
|
46
50
|
description: "Whether to include subfolders of the parent folder in the changes.",
|
|
47
51
|
optional: true,
|
|
48
52
|
},
|
|
53
|
+
changesPageSize: {
|
|
54
|
+
type: "integer",
|
|
55
|
+
label: "Changes Page Size",
|
|
56
|
+
description: "Maximum number of changes to fetch per API call. Lower values reduce the risk of execution timeouts on active drives.",
|
|
57
|
+
default: 1000,
|
|
58
|
+
optional: true,
|
|
59
|
+
},
|
|
49
60
|
},
|
|
50
61
|
hooks: {
|
|
51
62
|
async deploy() {
|
|
@@ -69,8 +80,10 @@ export default {
|
|
|
69
80
|
|
|
70
81
|
const { files } = await this.googleDrive.listFilesInPage(null, args);
|
|
71
82
|
|
|
83
|
+
const rootId = await this.getRootId();
|
|
84
|
+
|
|
72
85
|
for (const file of files) {
|
|
73
|
-
if (await this.shouldProcess(file)) {
|
|
86
|
+
if (await this.shouldProcess(file, rootId)) {
|
|
74
87
|
await this.emitFolder(file);
|
|
75
88
|
}
|
|
76
89
|
}
|
|
@@ -121,7 +134,15 @@ export default {
|
|
|
121
134
|
|
|
122
135
|
return allParents;
|
|
123
136
|
},
|
|
124
|
-
async
|
|
137
|
+
async getRootId() {
|
|
138
|
+
const root = await this.googleDrive.getFile(
|
|
139
|
+
isMyDrive(this.drive)
|
|
140
|
+
? "root"
|
|
141
|
+
: this.drive,
|
|
142
|
+
);
|
|
143
|
+
return root.id;
|
|
144
|
+
},
|
|
145
|
+
async shouldProcess(file, rootId) {
|
|
125
146
|
// Skip if not a folder
|
|
126
147
|
if (file.mimeType !== GOOGLE_DRIVE_FOLDER_MIME_TYPE) {
|
|
127
148
|
return false;
|
|
@@ -132,10 +153,6 @@ export default {
|
|
|
132
153
|
return true;
|
|
133
154
|
}
|
|
134
155
|
|
|
135
|
-
const root = await this.googleDrive.getFile(this.drive === "My Drive"
|
|
136
|
-
? "root"
|
|
137
|
-
: this.drive);
|
|
138
|
-
|
|
139
156
|
const allParents = [];
|
|
140
157
|
if (this.includeSubfolders) {
|
|
141
158
|
allParents.push(...(await this.getAllParents(file.id)));
|
|
@@ -143,7 +160,7 @@ export default {
|
|
|
143
160
|
allParents.push(file.parents[0]);
|
|
144
161
|
}
|
|
145
162
|
|
|
146
|
-
return allParents.includes(this.folderId ||
|
|
163
|
+
return allParents.includes(this.folderId || rootId);
|
|
147
164
|
},
|
|
148
165
|
generateMeta(file) {
|
|
149
166
|
const {
|
|
@@ -154,7 +171,7 @@ export default {
|
|
|
154
171
|
const ts = Date.parse(tsString);
|
|
155
172
|
|
|
156
173
|
return {
|
|
157
|
-
id: `${fileId}-${ts}
|
|
174
|
+
id: md5(`${fileId}-${ts}`),
|
|
158
175
|
summary,
|
|
159
176
|
ts,
|
|
160
177
|
};
|
|
@@ -169,8 +186,10 @@ export default {
|
|
|
169
186
|
|
|
170
187
|
const pageToken = this._getPageToken();
|
|
171
188
|
const driveId = this.getDriveId();
|
|
189
|
+
const rootId = await this.getRootId();
|
|
172
190
|
|
|
173
|
-
const changedFilesStream =
|
|
191
|
+
const changedFilesStream =
|
|
192
|
+
this.googleDrive.listChanges(pageToken, driveId, this.changesPageSize);
|
|
174
193
|
|
|
175
194
|
for await (const changedFilesPage of changedFilesStream) {
|
|
176
195
|
console.log("Changed files page:", changedFilesPage);
|
|
@@ -203,7 +222,7 @@ export default {
|
|
|
203
222
|
continue;
|
|
204
223
|
}
|
|
205
224
|
|
|
206
|
-
if (!await this.shouldProcess(fullFile)) {
|
|
225
|
+
if (!await this.shouldProcess(fullFile, rootId)) {
|
|
207
226
|
console.log(`Skipping folder ${fullFile.name || fullFile.id}`);
|
|
208
227
|
continue;
|
|
209
228
|
}
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
type: "source",
|
|
7
7
|
name: "New Spreadsheet (Instant)",
|
|
8
8
|
description: "Emit new event when a new spreadsheet is created in a drive.",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.21",
|
|
10
10
|
props: {
|
|
11
11
|
googleDrive: newFilesInstant.props.googleDrive,
|
|
12
12
|
db: newFilesInstant.props.db,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
key: "google_drive-new-spreadsheet-polling",
|
|
9
9
|
name: "New Spreadsheet (Polling)",
|
|
10
10
|
description: "Emit new event when a new spreadsheet is created in a drive.",
|
|
11
|
-
version: "0.0.
|
|
11
|
+
version: "0.0.5",
|
|
12
12
|
type: "source",
|
|
13
13
|
dedupe: "unique",
|
|
14
14
|
props: {
|
|
@@ -44,6 +44,13 @@ export default {
|
|
|
44
44
|
description: "The specific folder(s) to watch for new spreadsheets. Leave blank to watch all folders in the Drive.",
|
|
45
45
|
optional: true,
|
|
46
46
|
},
|
|
47
|
+
changesPageSize: {
|
|
48
|
+
type: "integer",
|
|
49
|
+
label: "Changes Page Size",
|
|
50
|
+
description: "Maximum number of changes to fetch per API call. Lower values reduce the risk of execution timeouts on active drives.",
|
|
51
|
+
default: 1000,
|
|
52
|
+
optional: true,
|
|
53
|
+
},
|
|
47
54
|
},
|
|
48
55
|
hooks: {
|
|
49
56
|
async deploy() {
|
|
@@ -138,7 +145,8 @@ export default {
|
|
|
138
145
|
const pageToken = this._getPageToken();
|
|
139
146
|
const driveId = this.getDriveId();
|
|
140
147
|
|
|
141
|
-
const changedFilesStream =
|
|
148
|
+
const changedFilesStream =
|
|
149
|
+
this.googleDrive.listChanges(pageToken, driveId, this.changesPageSize);
|
|
142
150
|
|
|
143
151
|
for await (const changedFilesPage of changedFilesStream) {
|
|
144
152
|
console.log("Changed files page:", changedFilesPage);
|