@pipedream/google_drive 1.5.0 → 1.5.2

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.
Files changed (56) hide show
  1. package/actions/add-comment/add-comment.mjs +1 -1
  2. package/actions/add-file-sharing-preference/add-file-sharing-preference.mjs +1 -1
  3. package/actions/copy-file/copy-file.mjs +1 -1
  4. package/actions/create-file-from-template/create-file-from-template.mjs +1 -1
  5. package/actions/create-file-from-text/create-file-from-text.mjs +1 -1
  6. package/actions/create-folder/create-folder.mjs +1 -1
  7. package/actions/create-shared-drive/create-shared-drive.mjs +1 -1
  8. package/actions/delete-comment/delete-comment.mjs +1 -1
  9. package/actions/delete-file/delete-file.mjs +1 -1
  10. package/actions/delete-reply/delete-reply.mjs +1 -1
  11. package/actions/delete-shared-drive/delete-shared-drive.mjs +1 -1
  12. package/actions/download-file/download-file.mjs +1 -1
  13. package/actions/find-file/find-file.mjs +1 -1
  14. package/actions/find-folder/find-folder.mjs +1 -1
  15. package/actions/find-forms/find-forms.mjs +1 -1
  16. package/actions/find-spreadsheets/find-spreadsheets.mjs +1 -1
  17. package/actions/get-comment/get-comment.mjs +1 -1
  18. package/actions/get-current-user/get-current-user.mjs +1 -1
  19. package/actions/get-file-by-id/get-file-by-id.mjs +1 -1
  20. package/actions/get-folder-id-for-path/get-folder-id-for-path.mjs +1 -1
  21. package/actions/get-reply/get-reply.mjs +1 -1
  22. package/actions/get-shared-drive/get-shared-drive.mjs +1 -1
  23. package/actions/list-access-proposals/list-access-proposals.mjs +1 -1
  24. package/actions/list-comments/list-comments.mjs +1 -1
  25. package/actions/list-files/list-files.mjs +1 -1
  26. package/actions/list-replies/list-replies.mjs +1 -1
  27. package/actions/move-file/move-file.mjs +1 -1
  28. package/actions/move-file-to-trash/move-file-to-trash.mjs +1 -1
  29. package/actions/remove-file-sharing-permission/remove-file-sharing-permission.mjs +1 -1
  30. package/actions/reply-to-comment/reply-to-comment.mjs +1 -1
  31. package/actions/resolve-access-proposal/resolve-access-proposal.mjs +1 -1
  32. package/actions/resolve-comment/resolve-comment.mjs +1 -1
  33. package/actions/search-shared-drives/search-shared-drives.mjs +1 -1
  34. package/actions/update-comment/update-comment.mjs +1 -1
  35. package/actions/update-file/update-file.mjs +1 -1
  36. package/actions/update-reply/update-reply.mjs +1 -1
  37. package/actions/update-shared-drive/update-shared-drive.mjs +1 -1
  38. package/actions/upload-file/upload-file.mjs +2 -1
  39. package/google_drive.app.mjs +1 -0
  40. package/package.json +1 -1
  41. package/sources/changes-to-files-in-drive/changes-to-files-in-drive.mjs +1 -1
  42. package/sources/changes-to-specific-files/changes-to-specific-files.mjs +1 -1
  43. package/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs +1 -1
  44. package/sources/new-access-proposal/new-access-proposal.mjs +1 -1
  45. package/sources/new-files-instant/new-files-instant.mjs +34 -7
  46. package/sources/new-files-instant-polling/new-files-instant-polling.mjs +1 -1
  47. package/sources/new-files-shared-drive/new-files-shared-drive.mjs +8 -1
  48. package/sources/new-or-modified-comments/new-or-modified-comments.mjs +1 -1
  49. package/sources/new-or-modified-comments-polling/new-or-modified-comments-polling.mjs +1 -1
  50. package/sources/new-or-modified-files/new-or-modified-files.mjs +1 -1
  51. package/sources/new-or-modified-files-polling/new-or-modified-files-polling.mjs +1 -1
  52. package/sources/new-or-modified-folders/new-or-modified-folders.mjs +1 -1
  53. package/sources/new-or-modified-folders-polling/new-or-modified-folders-polling.mjs +1 -1
  54. package/sources/new-shared-drive/new-shared-drive.mjs +1 -1
  55. package/sources/new-spreadsheet/new-spreadsheet.mjs +1 -1
  56. package/sources/new-spreadsheet-polling/new-spreadsheet-polling.mjs +1 -1
@@ -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.1",
7
+ version: "0.1.2",
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.9",
23
+ version: "0.2.10",
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.16",
7
+ version: "0.1.17",
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.19",
12
+ version: "0.1.20",
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.9",
8
+ version: "0.2.10",
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.17",
16
+ version: "0.1.18",
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.17",
7
+ version: "0.1.18",
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.5",
7
+ version: "0.0.6",
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.17",
8
+ version: "0.1.18",
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.2",
7
+ version: "0.0.3",
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.16",
7
+ version: "0.1.17",
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.19",
21
+ version: "0.1.20",
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.16",
9
+ version: "0.1.17",
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.16",
10
+ version: "0.1.17",
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.17",
9
+ version: "0.0.18",
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.16",
9
+ version: "0.1.17",
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.2",
7
+ version: "0.0.3",
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.3",
9
+ version: "0.0.4",
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.13",
8
+ version: "0.0.14",
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.18",
15
+ version: "0.1.19",
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.2",
7
+ version: "0.0.3",
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.16",
7
+ version: "0.1.17",
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.9",
7
+ version: "0.0.10",
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.5",
7
+ version: "0.0.6",
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.1.20",
8
+ version: "0.1.21",
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.2",
7
+ version: "0.0.3",
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.16",
7
+ version: "0.1.17",
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.16",
8
+ version: "0.1.17",
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.1",
9
+ version: "0.0.2",
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.5",
7
+ version: "0.0.6",
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.9",
8
+ version: "0.0.10",
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.5",
7
+ version: "0.0.6",
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.17",
7
+ version: "0.1.18",
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.2",
7
+ version: "0.0.3",
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.8",
9
+ version: "2.0.9",
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.2",
7
+ version: "0.0.3",
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.16",
7
+ version: "0.1.17",
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.9",
16
+ version: "2.0.10",
17
17
  annotations: {
18
18
  destructiveHint: false,
19
19
  openWorldHint: true,
@@ -45,6 +45,7 @@ export default {
45
45
  type: "string",
46
46
  label: "File Path or URL",
47
47
  description: "Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.pdf).",
48
+ format: "file-ref",
48
49
  },
49
50
  name: {
50
51
  propDefinition: [
@@ -161,6 +161,7 @@ export default {
161
161
  type: "string",
162
162
  label: "File Path or URL",
163
163
  description: "The file content to upload. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.txt`)",
164
+ format: "file-ref",
164
165
  },
165
166
  fileName: {
166
167
  type: "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/google_drive",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Pipedream Google_drive Components",
5
5
  "main": "google_drive.app.mjs",
6
6
  "keywords": [
@@ -13,7 +13,7 @@ export default {
13
13
  key: "google_drive-changes-to-files-in-drive",
14
14
  name: "Changes to Files in Drive",
15
15
  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.3",
16
+ version: "0.0.4",
17
17
  type: "source",
18
18
  dedupe: "unique",
19
19
  props: {
@@ -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.3",
19
+ version: "0.3.4",
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
@@ -28,7 +28,7 @@ export default {
28
28
  key: "google_drive-changes-to-specific-files-shared-drive",
29
29
  name: "Changes to Specific Files (Shared Drive)",
30
30
  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.3",
31
+ version: "0.3.4",
32
32
  type: "source",
33
33
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
34
34
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -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.8",
9
+ version: "0.0.9",
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.3",
14
+ version: "0.2.5",
15
15
  type: "source",
16
16
  dedupe: "unique",
17
17
  props: {
@@ -54,6 +54,13 @@ export default {
54
54
  default: false,
55
55
  optional: true,
56
56
  },
57
+ includeSubfolders: {
58
+ type: "boolean",
59
+ label: "Include Subfolders",
60
+ description: "Whether to watch for new files in subfolders of the parent folder",
61
+ default: false,
62
+ optional: true,
63
+ },
57
64
  dir: {
58
65
  type: "dir",
59
66
  accessMode: "write",
@@ -91,12 +98,32 @@ export default {
91
98
  _setLastFileCreatedTime(lastFileCreatedTime) {
92
99
  this.db.set("lastFileCreatedTime", lastFileCreatedTime);
93
100
  },
94
- shouldProcess(file) {
101
+ async hasAncestor(file, targetFolderIds) {
102
+ const MAX_DEPTH = 50;
103
+ let currentId = file.parents?.[0];
104
+ if (!currentId) return false;
105
+
106
+ for (let i = 0; i < MAX_DEPTH; i++) {
107
+ if (targetFolderIds.includes(currentId)) return true;
108
+
109
+ const data = await this.googleDrive.getFile(currentId, {
110
+ fields: "parents",
111
+ });
112
+
113
+ if (!data.parents?.length) return false;
114
+ currentId = data.parents[0];
115
+ }
116
+ return false;
117
+ },
118
+ async shouldProcess(file) {
95
119
  const watchedFolders = new Set(this.folders);
96
- return (
97
- watchedFolders.size == 0 ||
98
- (file.parents && file.parents.some((p) => watchedFolders.has(p)))
99
- );
120
+ if (watchedFolders.size == 0 || !file.parents) {
121
+ return true;
122
+ }
123
+ if (this.includeSubfolders) {
124
+ return await this.hasAncestor(file, Array.from(watchedFolders));
125
+ }
126
+ return file.parents.some((p) => watchedFolders.has(p));
100
127
  },
101
128
  getUpdateTypes() {
102
129
  return [
@@ -106,7 +133,7 @@ export default {
106
133
  },
107
134
  async emitFiles(files) {
108
135
  for (const file of files) {
109
- if (!this.shouldProcess(file)) {
136
+ if (!(await this.shouldProcess(file))) {
110
137
  continue;
111
138
  }
112
139
  if (this.includeLink) {
@@ -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.2",
11
+ version: "0.0.3",
12
12
  type: "source",
13
13
  dedupe: "unique",
14
14
  props: {
@@ -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.3",
10
+ version: "0.1.5",
11
11
  type: "source",
12
12
  dedupe: "unique",
13
13
  props: {
@@ -37,6 +37,13 @@ export default {
37
37
  default: false,
38
38
  optional: true,
39
39
  },
40
+ includeSubfolders: {
41
+ type: "boolean",
42
+ label: "Enable Subfolders",
43
+ description: "Whether to watch for new files in subfolders of the parent folder",
44
+ default: false,
45
+ optional: true,
46
+ },
40
47
  dir: {
41
48
  type: "dir",
42
49
  accessMode: "write",
@@ -17,7 +17,7 @@ export default {
17
17
  name: "New or Modified Comments (Instant)",
18
18
  description:
19
19
  "Emit new event when a comment is created or modified in the selected file",
20
- version: "1.0.12",
20
+ version: "1.0.13",
21
21
  type: "source",
22
22
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
23
23
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -6,7 +6,7 @@ export default {
6
6
  key: "google_drive-new-or-modified-comments-polling",
7
7
  name: "New or Modified Comments (Polling)",
8
8
  description: "Emit new event when a comment is created or modified in the selected file",
9
- version: "0.0.2",
9
+ version: "0.0.3",
10
10
  type: "source",
11
11
  dedupe: "unique",
12
12
  props: {
@@ -25,7 +25,7 @@ export default {
25
25
  key: "google_drive-new-or-modified-files",
26
26
  name: "New or Modified Files (Instant)",
27
27
  description: "Emit new event when a file in the selected Drive is created, modified or trashed.",
28
- version: "0.4.3",
28
+ version: "0.4.4",
29
29
  type: "source",
30
30
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
31
31
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -8,7 +8,7 @@ export default {
8
8
  key: "google_drive-new-or-modified-files-polling",
9
9
  name: "New or Modified Files (Polling)",
10
10
  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.3",
11
+ version: "0.0.4",
12
12
  type: "source",
13
13
  dedupe: "unique",
14
14
  props: {
@@ -20,7 +20,7 @@ export default {
20
20
  key: "google_drive-new-or-modified-folders",
21
21
  name: "New or Modified Folders (Instant)",
22
22
  description: "Emit new event when a folder is created or modified in the selected Drive",
23
- version: "0.2.5",
23
+ version: "0.2.6",
24
24
  type: "source",
25
25
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
26
26
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -8,7 +8,7 @@ export default {
8
8
  key: "google_drive-new-or-modified-folders-polling",
9
9
  name: "New or Modified Folders (Polling)",
10
10
  description: "Emit new event when a folder is created or modified in the selected Drive",
11
- version: "0.0.2",
11
+ version: "0.0.3",
12
12
  type: "source",
13
13
  dedupe: "unique",
14
14
  props: {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "google_drive-new-shared-drive",
6
6
  name: "New Shared Drive",
7
7
  description: "Emits a new event any time a shared drive is created.",
8
- version: "0.1.15",
8
+ version: "0.1.16",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -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.18",
9
+ version: "0.1.19",
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.2",
11
+ version: "0.0.3",
12
12
  type: "source",
13
13
  dedupe: "unique",
14
14
  props: {