@pipedream/google_drive 4.0.1 → 5.0.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.
Files changed (71) 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/create-text-file/create-text-file.mjs +1 -1
  9. package/actions/delete-comment/delete-comment.mjs +1 -1
  10. package/actions/delete-file/delete-file.mjs +1 -1
  11. package/actions/delete-reply/delete-reply.mjs +1 -1
  12. package/actions/delete-shared-drive/delete-shared-drive.mjs +1 -1
  13. package/actions/download-file/download-file.mjs +1 -1
  14. package/actions/find-file/find-file.mjs +1 -1
  15. package/actions/find-folder/find-folder.mjs +1 -1
  16. package/actions/find-forms/find-forms.mjs +1 -1
  17. package/actions/find-spreadsheets/find-spreadsheets.mjs +1 -1
  18. package/actions/get-comment/get-comment.mjs +1 -1
  19. package/actions/get-current-user/get-current-user.mjs +1 -1
  20. package/actions/get-file/get-file.mjs +1 -1
  21. package/actions/get-file-by-id/get-file-by-id.mjs +1 -1
  22. package/actions/get-folder-id-for-path/get-folder-id-for-path.mjs +1 -1
  23. package/actions/get-reply/get-reply.mjs +1 -1
  24. package/actions/get-shared-drive/get-shared-drive.mjs +1 -1
  25. package/actions/get-user-details/get-user-details.mjs +1 -1
  26. package/actions/is-folder-ancestor/is-folder-ancestor.mjs +1 -1
  27. package/actions/list-access-proposals/list-access-proposals.mjs +1 -1
  28. package/actions/list-comments/list-comments.mjs +1 -1
  29. package/actions/list-files/list-files.mjs +1 -1
  30. package/actions/list-mime-type-options/list-mime-type-options.mjs +1 -1
  31. package/actions/list-permissions/list-permissions.mjs +1 -1
  32. package/actions/list-replies/list-replies.mjs +1 -1
  33. package/actions/list-shared-drives/list-shared-drives.mjs +1 -1
  34. package/actions/list-theme-id-options/list-theme-id-options.mjs +1 -1
  35. package/actions/move-file/move-file.mjs +19 -4
  36. package/actions/move-file-to-trash/move-file-to-trash.mjs +1 -1
  37. package/actions/remove-file-sharing-permission/remove-file-sharing-permission.mjs +1 -1
  38. package/actions/remove-sharing/remove-sharing.mjs +1 -1
  39. package/actions/reply-to-comment/reply-to-comment.mjs +1 -1
  40. package/actions/resolve-access-proposal/resolve-access-proposal.mjs +1 -1
  41. package/actions/resolve-comment/resolve-comment.mjs +1 -1
  42. package/actions/search-files/search-files.mjs +1 -1
  43. package/actions/search-shared-drives/search-shared-drives.mjs +1 -1
  44. package/actions/share-file/share-file.mjs +1 -1
  45. package/actions/trash-file/trash-file.mjs +1 -1
  46. package/actions/update-comment/update-comment.mjs +1 -1
  47. package/actions/update-file/update-file.mjs +1 -1
  48. package/actions/update-reply/update-reply.mjs +1 -1
  49. package/actions/update-shared-drive/update-shared-drive.mjs +1 -1
  50. package/actions/upload-file/upload-file.mjs +1 -1
  51. package/common/constants.mjs +22 -12
  52. package/google_drive.app.mjs +90 -11
  53. package/package.json +1 -1
  54. package/sources/changes-to-files-in-drive/changes-to-files-in-drive.mjs +9 -6
  55. package/sources/changes-to-specific-files/changes-to-specific-files.mjs +1 -1
  56. package/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs +9 -6
  57. package/sources/common-dedupe-changes.mjs +22 -11
  58. package/sources/common-webhook.mjs +104 -40
  59. package/sources/new-access-proposal/new-access-proposal.mjs +1 -1
  60. package/sources/new-files-instant/new-files-instant.mjs +4 -1
  61. package/sources/new-files-instant-polling/new-files-instant-polling.mjs +38 -47
  62. package/sources/new-files-shared-drive/new-files-shared-drive.mjs +2 -16
  63. package/sources/new-or-modified-comments/new-or-modified-comments.mjs +10 -7
  64. package/sources/new-or-modified-comments-polling/new-or-modified-comments-polling.mjs +1 -1
  65. package/sources/new-or-modified-files/new-or-modified-files.mjs +20 -1
  66. package/sources/new-or-modified-files-polling/new-or-modified-files-polling.mjs +37 -36
  67. package/sources/new-or-modified-folders/new-or-modified-folders.mjs +52 -50
  68. package/sources/new-or-modified-folders-polling/new-or-modified-folders-polling.mjs +55 -63
  69. package/sources/new-shared-drive/new-shared-drive.mjs +1 -1
  70. package/sources/new-spreadsheet/new-spreadsheet.mjs +1 -1
  71. package/sources/new-spreadsheet-polling/new-spreadsheet-polling.mjs +38 -47
@@ -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.14",
7
+ version: "0.1.15",
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.21",
23
+ version: "0.2.22",
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.29",
7
+ version: "0.1.30",
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.32",
12
+ version: "0.1.33",
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.22",
8
+ version: "0.2.23",
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.30",
16
+ version: "0.1.31",
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.30",
7
+ version: "0.1.31",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -12,7 +12,7 @@ export default {
12
12
  + " `mimeType = 'application/vnd.google-apps.folder'` to find the folder ID first."
13
13
  + " Supported content formats: plain text, Markdown, HTML, Rich Text, CSV."
14
14
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create)",
15
- version: "0.0.8",
15
+ version: "0.0.9",
16
16
  type: "action",
17
17
  ai: "optimized",
18
18
  annotations: {
@@ -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.18",
7
+ version: "0.0.19",
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.30",
8
+ version: "0.1.31",
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.15",
7
+ version: "0.0.16",
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.29",
7
+ version: "0.1.30",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -38,7 +38,7 @@ export default {
38
38
  + " Pass `mimeType` to force a specific format. Shortcuts are resolved to their target automatically."
39
39
  + " Folders, Forms, and My Maps cannot be downloaded via this action."
40
40
  + " [See the documentation](https://developers.google.com/drive/api/v3/manage-downloads)",
41
- version: "0.2.6",
41
+ version: "0.2.7",
42
42
  annotations: {
43
43
  destructiveHint: false,
44
44
  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. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
9
- version: "0.1.30",
9
+ version: "0.1.31",
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. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
10
- version: "0.1.30",
10
+ version: "0.1.31",
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. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
9
- version: "0.0.31",
9
+ version: "0.0.32",
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. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
9
- version: "0.1.30",
9
+ version: "0.1.31",
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.15",
7
+ version: "0.0.16",
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.16",
9
+ version: "0.0.17",
10
10
  type: "action",
11
11
  ai: "optimized",
12
12
  annotations: {
@@ -11,7 +11,7 @@ export default {
11
11
  + "\n\nCommon fields: `id`, `name`, `mimeType`, `size`, `parents`, `webViewLink`, `webContentLink`,"
12
12
  + " `createdTime`, `modifiedTime`, `owners`, `permissions`, `description`, `trashed`."
13
13
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/files/get)",
14
- version: "0.0.8",
14
+ version: "0.0.9",
15
15
  type: "action",
16
16
  ai: "optimized",
17
17
  annotations: {
@@ -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.26",
8
+ version: "0.0.27",
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.31",
15
+ version: "0.1.32",
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.15",
7
+ version: "0.0.16",
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.29",
7
+ version: "0.1.30",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -10,7 +10,7 @@ export default {
10
10
  + " When the user says 'my files' or 'my documents', call this first to get the owner email,"
11
11
  + " then pass it to **Search Files** with a query like `'user@example.com' in owners`."
12
12
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/about/get)",
13
- version: "0.0.8",
13
+ version: "0.0.9",
14
14
  type: "action",
15
15
  ai: "optimized",
16
16
  annotations: {
@@ -4,7 +4,7 @@ export default {
4
4
  key: "google_drive-is-folder-ancestor",
5
5
  name: "Is Folder Ancestor",
6
6
  description: "Check if a specific folder is anywhere in the parent hierarchy of a file or folder. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/files/get)",
7
- version: "0.0.10",
7
+ version: "0.0.11",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -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.22",
7
+ version: "0.0.23",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -8,7 +8,7 @@ export default {
8
8
  key: "google_drive-list-comments",
9
9
  name: "List Comments",
10
10
  description: "List the comments on a file, including each comment's author, plain text and HTML content, the file text it is anchored to, whether it is resolved, and its full reply thread. Use **Find File** first to resolve a file's name to its ID. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/list)",
11
- version: "0.1.5",
11
+ version: "0.1.6",
12
12
  annotations: {
13
13
  destructiveHint: false,
14
14
  openWorldHint: true,
@@ -9,7 +9,7 @@ export default {
9
9
  key: "google_drive-list-files",
10
10
  name: "List Files",
11
11
  description: "List files from a specific folder. Set `Max Results` to cap how many files are returned per run, then pass the returned `nextPageToken` back in as `Page Token` on the next run to page through a large folder in fixed-size batches. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/list) for more information",
12
- version: "1.0.6",
12
+ version: "1.0.7",
13
13
  annotations: {
14
14
  destructiveHint: false,
15
15
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "google_drive-list-mime-type-options",
5
5
  name: "List Mime Type Options",
6
6
  description: "Retrieves available options for the Mime Type field.",
7
- version: "0.0.9",
7
+ version: "0.0.10",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -10,7 +10,7 @@ export default {
10
10
  + " Use this tool when the user asks 'who has access to this file?' or needs to audit sharing."
11
11
  + " Pass permission IDs from this response to **Remove Sharing** to revoke access."
12
12
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/permissions/list)",
13
- version: "0.0.8",
13
+ version: "0.0.9",
14
14
  type: "action",
15
15
  ai: "optimized",
16
16
  annotations: {
@@ -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.15",
7
+ version: "0.0.16",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -10,7 +10,7 @@ export default {
10
10
  + " Pass a drive ID to **Search Files** `driveId` parameter to search within a specific shared drive."
11
11
  + " Optionally filter by name using the `query` parameter (e.g., `name contains 'Engineering'`)."
12
12
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/list)",
13
- version: "0.0.8",
13
+ version: "0.0.9",
14
14
  type: "action",
15
15
  ai: "optimized",
16
16
  annotations: {
@@ -4,7 +4,7 @@ export default {
4
4
  key: "google_drive-list-theme-id-options",
5
5
  name: "List Theme ID Options",
6
6
  description: "Retrieves available options for the Theme ID field.",
7
- version: "0.0.9",
7
+ version: "0.0.10",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -1,10 +1,11 @@
1
+ import { ConfigurationError } from "@pipedream/platform";
1
2
  import googleDrive from "../../google_drive.app.mjs";
2
3
 
3
4
  export default {
4
5
  key: "google_drive-move-file",
5
6
  name: "Move File",
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.29",
7
+ description: "Move a file from its current folder to another folder. If the file's current folder isn't accessible to the user (for example, it was shared from someone else's folder), the file is added to the destination folder instead when Drive allows it; otherwise the action returns an error, and a shortcut or copy should be used. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information",
8
+ version: "0.1.31",
8
9
  annotations: {
9
10
  destructiveHint: true,
10
11
  openWorldHint: true,
@@ -46,13 +47,27 @@ export default {
46
47
  async run({ $ }) {
47
48
  // Get file to get parents to remove
48
49
  const file = await this.googleDrive.getFile(this.fileId);
50
+ // Drive omits `parents` when the user can't see the file's current folder
51
+ // (typical for shared files). There is nothing to remove then, so the file
52
+ // can only be added to the destination, and only if Drive says that is
53
+ // allowed; otherwise it rejects the update (403 cannotAddParent).
54
+ const hasParents = Boolean(file.parents?.length);
55
+ if (!hasParents && !(file.capabilities?.canAddMyDriveParent && this.folderId)) {
56
+ throw new ConfigurationError(
57
+ `Cannot move "${file.name}": it isn't in a folder you can access (for example, it was shared with you from someone else's folder), so its current folder can't be replaced. Instead, create a shortcut to the file or make a copy of it in the destination folder.`,
58
+ );
59
+ }
49
60
  // Update file, removing old parents, adding new parent folder
50
61
  const resp = await this.googleDrive.updateFile(this.fileId, {
51
62
  fields: "*",
52
- removeParents: file.parents.join(","),
63
+ removeParents: hasParents
64
+ ? file.parents.join(",")
65
+ : undefined,
53
66
  addParents: this.folderId,
54
67
  });
55
- $.export("$summary", `Successfully moved the file, "${file.name}"`);
68
+ $.export("$summary", hasParents
69
+ ? `Successfully moved the file, "${file.name}"`
70
+ : `Added the file, "${file.name}", to the destination folder (it had no accessible parent folder to remove)`);
56
71
  return resp;
57
72
  },
58
73
  };
@@ -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.29",
8
+ version: "0.1.30",
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.13",
9
+ version: "0.0.14",
10
10
  annotations: {
11
11
  destructiveHint: true,
12
12
  openWorldHint: true,
@@ -10,7 +10,7 @@ export default {
10
10
  + " The owner permission cannot be removed."
11
11
  + " Use **Search Files** to find the file ID by name if needed."
12
12
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/permissions/delete)",
13
- version: "0.0.8",
13
+ version: "0.0.9",
14
14
  type: "action",
15
15
  ai: "optimized",
16
16
  annotations: {
@@ -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.18",
7
+ version: "0.0.19",
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.22",
8
+ version: "0.0.23",
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.18",
7
+ version: "0.0.19",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -36,7 +36,7 @@ export default {
36
36
  + " missing and paging will not recover them — narrow the search with `driveId`."
37
37
  + " Prefer narrowing the `query` over paging through many batches."
38
38
  + " [See the documentation](https://developers.google.com/drive/api/v3/search-files)",
39
- version: "1.0.3",
39
+ version: "1.0.4",
40
40
  type: "action",
41
41
  ai: "optimized",
42
42
  annotations: {
@@ -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.30",
7
+ version: "0.1.31",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -15,7 +15,7 @@ export default {
15
15
  + "\n\n**Roles:** `reader` (view only), `commenter` (can comment), `writer` (can edit)."
16
16
  + " Use **List Permissions** to see existing sharing on a file."
17
17
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/permissions/create)",
18
- version: "0.0.8",
18
+ version: "0.0.9",
19
19
  type: "action",
20
20
  ai: "optimized",
21
21
  annotations: {
@@ -10,7 +10,7 @@ export default {
10
10
  + " Use this instead of permanent deletion as the safer default."
11
11
  + " To find trashed files, use **Search Files** with `trashed = true`."
12
12
  + " [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update)",
13
- version: "0.0.8",
13
+ version: "0.0.9",
14
14
  type: "action",
15
15
  ai: "optimized",
16
16
  annotations: {
@@ -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.15",
7
+ version: "0.0.16",
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.21",
9
+ version: "2.0.22",
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.15",
7
+ version: "0.0.16",
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.29",
7
+ version: "0.1.30",
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.21",
16
+ version: "2.0.22",
17
17
  annotations: {
18
18
  destructiveHint: false,
19
19
  openWorldHint: true,
@@ -122,17 +122,10 @@ const LEGACY_MY_DRIVE_VALUE = "myDrive";
122
122
  */
123
123
  const WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS = 24 * 60 * 60 * 1000;
124
124
 
125
- /**
126
- * The default time interval between webhook subscription renewals. Since
127
- * subscriptions expire after 24 hours at most, we set this time to 95% of this
128
- * time window by default to make sure the event sources don't miss any events
129
- * due to an expired subscription not being renewed on time.
130
- *
131
- * More information can be found in the API docs:
132
- * https://developers.google.com/drive/api/v3/push#optional-properties
133
- */
134
- const WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS =
135
- (WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS * 0.95) / 1000;
125
+ // The timer also resumes capped backlogs, not just renewals
126
+ const WEBHOOK_TIMER_INTERVAL_SECONDS = 10 * 60;
127
+
128
+ const WEBHOOK_RENEWAL_WINDOW_MILLISECONDS = 60 * 60 * 1000;
136
129
 
137
130
  /**
138
131
  * The maximum number of path segments to include in an option label for a prop whose value is a
@@ -273,6 +266,16 @@ const RATE_LIMIT_ERROR_REASONS = [
273
266
 
274
267
  const CHANGED_FILE_FIELDS = "kind,id,name,mimeType,parents,createdTime,modifiedTime,trashed,version,size,md5Checksum,webViewLink,lastModifyingUser";
275
268
 
269
+ const CHANGE_FILTER_FILE_FIELDS = "id,name,mimeType,parents,createdTime,modifiedTime";
270
+
271
+ const MAX_CHANGES_PAGES_PER_RUN = 10;
272
+ const DEFAULT_MAX_EMITS_PER_RUN = 1000;
273
+ const MAX_EMITS_PER_RUN = 5000;
274
+
275
+ const MAX_FILE_INTERVAL_ENTRIES = 2000;
276
+
277
+ const MASS_CHANGE_MAX_AGE_MILLISECONDS = 60 * 60 * 1000;
278
+
276
279
  /** Google Workspace types that `stashFile` can export to PDF. */
277
280
  const PDF_EXPORTABLE_MIME_TYPES = [
278
281
  "application/vnd.google-apps.document",
@@ -294,7 +297,8 @@ export {
294
297
  MY_DRIVE_VALUE,
295
298
  LEGACY_MY_DRIVE_VALUE,
296
299
  WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS,
297
- WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS,
300
+ WEBHOOK_TIMER_INTERVAL_SECONDS,
301
+ WEBHOOK_RENEWAL_WINDOW_MILLISECONDS,
298
302
  MAX_FILE_OPTION_PATH_SEGMENTS,
299
303
  PAGINATION_TOKEN_FIELD,
300
304
  GOOGLE_DRIVE_MIME_TYPE_PREFIX,
@@ -328,5 +332,11 @@ export {
328
332
  RETRYABLE_STATUS_CODES,
329
333
  RATE_LIMIT_ERROR_REASONS,
330
334
  CHANGED_FILE_FIELDS,
335
+ CHANGE_FILTER_FILE_FIELDS,
336
+ MAX_CHANGES_PAGES_PER_RUN,
337
+ DEFAULT_MAX_EMITS_PER_RUN,
338
+ MAX_EMITS_PER_RUN,
339
+ MAX_FILE_INTERVAL_ENTRIES,
340
+ MASS_CHANGE_MAX_AGE_MILLISECONDS,
331
341
  PDF_EXPORTABLE_MIME_TYPES,
332
342
  };