@pipedream/google_drive 1.0.5 → 1.0.6

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 (42) hide show
  1. package/actions/add-comment/add-comment.mjs +43 -0
  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 +2 -2
  5. package/actions/create-file-from-text/create-file-from-text.mjs +2 -2
  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 +47 -0
  9. package/actions/delete-file/delete-file.mjs +1 -1
  10. package/actions/delete-shared-drive/delete-shared-drive.mjs +1 -1
  11. package/actions/download-file/download-file.mjs +1 -1
  12. package/actions/find-file/find-file.mjs +1 -1
  13. package/actions/find-folder/find-folder.mjs +1 -1
  14. package/actions/find-forms/find-forms.mjs +1 -1
  15. package/actions/find-spreadsheets/find-spreadsheets.mjs +1 -1
  16. package/actions/get-file-by-id/get-file-by-id.mjs +1 -1
  17. package/actions/get-folder-id-for-path/get-folder-id-for-path.mjs +1 -1
  18. package/actions/get-shared-drive/get-shared-drive.mjs +1 -1
  19. package/actions/list-access-proposals/list-access-proposals.mjs +1 -1
  20. package/actions/list-comments/list-comments.mjs +38 -0
  21. package/actions/list-files/list-files.mjs +1 -1
  22. package/actions/move-file/move-file.mjs +1 -1
  23. package/actions/move-file-to-trash/move-file-to-trash.mjs +1 -1
  24. package/actions/reply-to-comment/reply-to-comment.mjs +56 -0
  25. package/actions/resolve-access-proposal/resolve-access-proposal.mjs +1 -1
  26. package/actions/resolve-comment/resolve-comment.mjs +51 -0
  27. package/actions/search-shared-drives/search-shared-drives.mjs +1 -1
  28. package/actions/update-file/update-file.mjs +1 -1
  29. package/actions/update-shared-drive/update-shared-drive.mjs +1 -1
  30. package/actions/upload-file/upload-file.mjs +1 -1
  31. package/google_drive.app.mjs +87 -9
  32. package/package.json +1 -1
  33. package/sources/changes-to-specific-files/changes-to-specific-files.mjs +1 -1
  34. package/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs +1 -1
  35. package/sources/new-access-proposal/new-access-proposal.mjs +1 -1
  36. package/sources/new-files-instant/new-files-instant.mjs +1 -1
  37. package/sources/new-files-shared-drive/new-files-shared-drive.mjs +1 -1
  38. package/sources/new-or-modified-comments/new-or-modified-comments.mjs +1 -1
  39. package/sources/new-or-modified-files/new-or-modified-files.mjs +1 -1
  40. package/sources/new-or-modified-folders/new-or-modified-folders.mjs +1 -1
  41. package/sources/new-shared-drive/new-shared-drive.mjs +1 -1
  42. package/sources/new-spreadsheet/new-spreadsheet.mjs +1 -1
@@ -0,0 +1,43 @@
1
+ import googleDrive from "../../google_drive.app.mjs";
2
+
3
+ export default {
4
+ key: "google_drive-add-comment",
5
+ name: "Add Comment",
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.0.1",
8
+ type: "action",
9
+ props: {
10
+ googleDrive,
11
+ drive: {
12
+ propDefinition: [
13
+ googleDrive,
14
+ "watchedDrive",
15
+ ],
16
+ optional: false,
17
+ },
18
+ fileId: {
19
+ propDefinition: [
20
+ googleDrive,
21
+ "fileId",
22
+ (c) => ({
23
+ drive: c.drive,
24
+ }),
25
+ ],
26
+ description: "The file to add a comment to.",
27
+ },
28
+ content: {
29
+ type: "string",
30
+ label: "Comment Content",
31
+ description: "The text content of the comment to add",
32
+ },
33
+ },
34
+ async run({ $ }) {
35
+ const response = await this.googleDrive.createComment(
36
+ this.content,
37
+ this.fileId,
38
+ );
39
+
40
+ $.export("$summary", `Successfully added comment with ID ${response.data.id}`);
41
+ return response.data;
42
+ },
43
+ };
@@ -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.4",
23
+ version: "0.2.5",
24
24
  type: "action",
25
25
  props: {
26
26
  googleDrive,
@@ -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.11",
7
+ version: "0.1.12",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -1,5 +1,5 @@
1
- import googleDrive from "../../google_drive.app.mjs";
2
1
  import Mustaches from "google-docs-mustaches";
2
+ import googleDrive from "../../google_drive.app.mjs";
3
3
 
4
4
  const MODE_GOOGLE_DOC = "Google Doc";
5
5
  const MODE_PDF = "Pdf";
@@ -8,7 +8,7 @@ export default {
8
8
  key: "google_drive-create-file-from-template",
9
9
  name: "Create New File From Template",
10
10
  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)",
11
- version: "0.1.11",
11
+ version: "0.1.12",
12
12
  type: "action",
13
13
  props: {
14
14
  googleDrive,
@@ -1,11 +1,11 @@
1
- import googleDrive from "../../google_drive.app.mjs";
2
1
  import { Readable } from "stream";
2
+ import googleDrive from "../../google_drive.app.mjs";
3
3
 
4
4
  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.4",
8
+ version: "0.2.5",
9
9
  type: "action",
10
10
  props: {
11
11
  googleDrive,
@@ -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.12",
16
+ version: "0.1.13",
17
17
  type: "action",
18
18
  props: {
19
19
  googleDrive,
@@ -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.12",
7
+ version: "0.1.13",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -0,0 +1,47 @@
1
+ import googleDrive from "../../google_drive.app.mjs";
2
+
3
+ export default {
4
+ key: "google_drive-delete-comment",
5
+ name: "Delete Comment",
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.1",
8
+ type: "action",
9
+ props: {
10
+ googleDrive,
11
+ drive: {
12
+ propDefinition: [
13
+ googleDrive,
14
+ "watchedDrive",
15
+ ],
16
+ optional: false,
17
+ },
18
+ fileId: {
19
+ propDefinition: [
20
+ googleDrive,
21
+ "fileId",
22
+ (c) => ({
23
+ drive: c.drive,
24
+ }),
25
+ ],
26
+ description: "The file containing the comment to delete.",
27
+ },
28
+ commentId: {
29
+ propDefinition: [
30
+ googleDrive,
31
+ "commentId",
32
+ (c) => ({
33
+ fileId: c.fileId,
34
+ }),
35
+ ],
36
+ },
37
+ },
38
+ async run({ $ }) {
39
+ const response = await this.googleDrive.deleteComment(
40
+ this.commentId,
41
+ this.fileId,
42
+ );
43
+
44
+ $.export("$summary", `Successfully deleted comment ${this.commentId} from file ${this.fileId}`);
45
+ return response.data;
46
+ },
47
+ };
@@ -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.12",
8
+ version: "0.1.13",
9
9
  type: "action",
10
10
  props: {
11
11
  googleDrive,
@@ -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.11",
7
+ version: "0.1.12",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -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.14",
21
+ version: "0.1.15",
22
22
  type: "action",
23
23
  props: {
24
24
  googleDrive,
@@ -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.11",
9
+ version: "0.1.12",
10
10
  type: "action",
11
11
  props: {
12
12
  googleDrive,
@@ -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.11",
10
+ version: "0.1.12",
11
11
  type: "action",
12
12
  props: {
13
13
  googleDrive,
@@ -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.12",
9
+ version: "0.0.13",
10
10
  type: "action",
11
11
  props: {
12
12
  googleDrive,
@@ -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.11",
9
+ version: "0.1.12",
10
10
  type: "action",
11
11
  props: {
12
12
  googleDrive,
@@ -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",
8
+ version: "0.0.9",
9
9
  type: "action",
10
10
  props: {
11
11
  googleDrive,
@@ -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.13",
15
+ version: "0.1.14",
16
16
  type: "action",
17
17
  props: {
18
18
  googleDrive,
@@ -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.11",
7
+ version: "0.1.12",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -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.4",
7
+ version: "0.0.5",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -0,0 +1,38 @@
1
+ import googleDrive from "../../google_drive.app.mjs";
2
+
3
+ export default {
4
+ key: "google_drive-list-comments",
5
+ name: "List Comments",
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.1",
8
+ type: "action",
9
+ props: {
10
+ googleDrive,
11
+ drive: {
12
+ propDefinition: [
13
+ googleDrive,
14
+ "watchedDrive",
15
+ ],
16
+ optional: false,
17
+ },
18
+ fileId: {
19
+ propDefinition: [
20
+ googleDrive,
21
+ "fileId",
22
+ (c) => ({
23
+ drive: c.drive,
24
+ }),
25
+ ],
26
+ description: "The file to list comments for.",
27
+ },
28
+ },
29
+ async run({ $ }) {
30
+ const response = await this.googleDrive.listSyncComments(
31
+ this.driveId,
32
+ this.fileId,
33
+ );
34
+
35
+ $.export("$summary", `Successfully found ${response.data.comments.length} comment(s) for file ${this.fileId}`);
36
+ return response.data.comments;
37
+ },
38
+ };
@@ -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.15",
8
+ version: "0.1.16",
9
9
  type: "action",
10
10
  props: {
11
11
  googleDrive,
@@ -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.11",
7
+ version: "0.1.12",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -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.11",
8
+ version: "0.1.12",
9
9
  type: "action",
10
10
  props: {
11
11
  googleDrive,
@@ -0,0 +1,56 @@
1
+ import googleDrive from "../../google_drive.app.mjs";
2
+
3
+ export default {
4
+ key: "google_drive-reply-to-comment",
5
+ name: "Reply to Comment",
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.1",
8
+ type: "action",
9
+ props: {
10
+ googleDrive,
11
+ drive: {
12
+ propDefinition: [
13
+ googleDrive,
14
+ "watchedDrive",
15
+ ],
16
+ optional: false,
17
+ },
18
+ fileId: {
19
+ propDefinition: [
20
+ googleDrive,
21
+ "fileId",
22
+ (c) => ({
23
+ drive: c.drive,
24
+ }),
25
+ ],
26
+ description: "The file containing the comment to reply to.",
27
+ },
28
+ commentId: {
29
+ propDefinition: [
30
+ googleDrive,
31
+ "commentId",
32
+ (c) => ({
33
+ fileId: c.fileId,
34
+ }),
35
+ ],
36
+ description: "The ID of the comment to reply to.",
37
+ },
38
+ content: {
39
+ type: "string",
40
+ label: "Reply Content",
41
+ description: "The text content of the reply to add",
42
+ },
43
+ },
44
+ async run({ $ }) {
45
+ const response = await this.googleDrive.createCommentReply(
46
+ this.fileId,
47
+ this.commentId,
48
+ {
49
+ content: this.content,
50
+ },
51
+ );
52
+
53
+ $.export("$summary", `Successfully added reply to comment ${this.commentId}`);
54
+ return response.data;
55
+ },
56
+ };
@@ -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.4",
8
+ version: "0.0.5",
9
9
  type: "action",
10
10
  props: {
11
11
  googleDrive,
@@ -0,0 +1,51 @@
1
+ import googleDrive from "../../google_drive.app.mjs";
2
+
3
+ export default {
4
+ key: "google_drive-resolve-comment",
5
+ name: "Resolve Comment",
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.1",
8
+ type: "action",
9
+ props: {
10
+ googleDrive,
11
+ drive: {
12
+ propDefinition: [
13
+ googleDrive,
14
+ "watchedDrive",
15
+ ],
16
+ optional: false,
17
+ },
18
+ fileId: {
19
+ propDefinition: [
20
+ googleDrive,
21
+ "fileId",
22
+ (c) => ({
23
+ drive: c.drive,
24
+ }),
25
+ ],
26
+ description: "The file containing the comment to resolve.",
27
+ },
28
+ commentId: {
29
+ propDefinition: [
30
+ googleDrive,
31
+ "commentId",
32
+ (c) => ({
33
+ fileId: c.fileId,
34
+ }),
35
+ ],
36
+ description: "The ID of the comment to resolve.",
37
+ },
38
+ },
39
+ async run({ $ }) {
40
+ const response = await this.googleDrive.createCommentReply(
41
+ this.fileId,
42
+ this.commentId,
43
+ {
44
+ action: "resolve",
45
+ },
46
+ );
47
+
48
+ $.export("$summary", `Successfully resolved comment ${this.commentId}.`);
49
+ return response.data;
50
+ },
51
+ };
@@ -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.12",
7
+ version: "0.1.13",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -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.3",
9
+ version: "2.0.4",
10
10
  type: "action",
11
11
  props: {
12
12
  googleDrive,
@@ -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.11",
7
+ version: "0.1.12",
8
8
  type: "action",
9
9
  props: {
10
10
  googleDrive,
@@ -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.4",
16
+ version: "2.0.5",
17
17
  type: "action",
18
18
  props: {
19
19
  googleDrive,
@@ -1,28 +1,28 @@
1
- import { axios } from "@pipedream/platform";
2
1
  import drive from "@googleapis/drive";
2
+ import { axios } from "@pipedream/platform";
3
+ import mimeDb from "mime-db";
3
4
  import { v4 as uuid } from "uuid";
4
5
  import isoLanguages from "./actions/language-codes.mjs";
5
- import mimeDb from "mime-db";
6
6
  const mimeTypes = Object.keys(mimeDb);
7
7
 
8
+ import googleMimeTypes from "./actions/google-mime-types.mjs";
8
9
  import {
9
- GOOGLE_DRIVE_UPDATE_TYPES,
10
- MY_DRIVE_VALUE,
11
- WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS,
12
10
  GOOGLE_DRIVE_FOLDER_MIME_TYPE,
13
11
  GOOGLE_DRIVE_GRANTEE_TYPES,
14
- GOOGLE_DRIVE_UPLOAD_TYPE_OPTIONS,
15
12
  GOOGLE_DRIVE_UPDATE_TYPE_OPTIONS,
13
+ GOOGLE_DRIVE_UPDATE_TYPES,
14
+ GOOGLE_DRIVE_UPLOAD_TYPE_OPTIONS,
15
+ MY_DRIVE_VALUE,
16
+ WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS,
16
17
  } from "./common/constants.mjs";
17
- import googleMimeTypes from "./actions/google-mime-types.mjs";
18
18
 
19
19
  import {
20
- isMyDrive,
21
20
  getDriveId,
21
+ getFilePaths,
22
22
  getListFilesOpts,
23
+ isMyDrive,
23
24
  omitEmptyStringValues,
24
25
  toSingleLineString,
25
- getFilePaths,
26
26
  } from "./common/utils.mjs";
27
27
 
28
28
  export default {
@@ -273,6 +273,39 @@ export default {
273
273
  };
274
274
  },
275
275
  },
276
+ commentId: {
277
+ type: "string",
278
+ label: "Comment ID",
279
+ description: "The ID of the comment to delete.",
280
+ async options({
281
+ fileId, prevContext, driveId,
282
+ }) {
283
+ const { pageToken } = prevContext;
284
+ const {
285
+ data: {
286
+ comments, nextPageToken,
287
+ },
288
+ } = await this.listSyncComments(
289
+ driveId,
290
+ fileId,
291
+ {
292
+ pageToken,
293
+ },
294
+ );
295
+
296
+ return {
297
+ options: comments?.map(({
298
+ id, content,
299
+ }) => ({
300
+ label: content,
301
+ value: id,
302
+ })) || [],
303
+ context: {
304
+ pageToken: nextPageToken,
305
+ },
306
+ };
307
+ },
308
+ },
276
309
  },
277
310
  methods: {
278
311
  // Static methods
@@ -689,6 +722,51 @@ export default {
689
722
  opts.pageToken = nextPageToken;
690
723
  }
691
724
  },
725
+ listSyncComments(driveId, fileId, args = {}) {
726
+ const drive = this.drive();
727
+ return drive.comments.list({
728
+ driveId,
729
+ fileId,
730
+ fields: "*",
731
+ ...args,
732
+ });
733
+ },
734
+ createComment(content, fileId) {
735
+ const drive = this.drive();
736
+ return drive.comments.create({
737
+ fileId,
738
+ requestBody: {
739
+ content,
740
+ },
741
+ fields: "*",
742
+ });
743
+ },
744
+ deleteComment(commentId, fileId) {
745
+ const drive = this.drive();
746
+ return drive.comments.delete({
747
+ fileId,
748
+ commentId,
749
+ fields: "*",
750
+ });
751
+ },
752
+ createCommentReply(fileId, commentId, requestBody) {
753
+ const drive = this.drive();
754
+ return drive.replies.create({
755
+ fileId,
756
+ commentId,
757
+ requestBody,
758
+ fields: "*",
759
+ });
760
+ },
761
+ updateComment(commentId, fileId, data) {
762
+ const drive = this.drive();
763
+ return drive.comments.update({
764
+ fileId,
765
+ commentId,
766
+ requestBody: data,
767
+ fields: "*",
768
+ });
769
+ },
692
770
  _makeWatchRequestBody(id, address) {
693
771
  const expiration =
694
772
  Date.now() + WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/google_drive",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Pipedream Google_drive Components",
5
5
  "main": "google_drive.app.mjs",
6
6
  "keywords": [
@@ -15,7 +15,7 @@ export default {
15
15
  key: "google_drive-changes-to-specific-files",
16
16
  name: "Changes to Specific Files",
17
17
  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.",
18
- version: "0.2.8",
18
+ version: "0.2.9",
19
19
  type: "source",
20
20
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
21
21
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -27,7 +27,7 @@ export default {
27
27
  key: "google_drive-changes-to-specific-files-shared-drive",
28
28
  name: "Changes to Specific Files (Shared Drive)",
29
29
  description: "Watches for changes to specific files in a shared drive, emitting an event when a change is made to one of those files",
30
- version: "0.2.8",
30
+ version: "0.2.9",
31
31
  type: "source",
32
32
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
33
33
  // 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.4",
9
+ version: "0.0.5",
10
10
  type: "source",
11
11
  dedupe: "unique",
12
12
  props: {
@@ -10,7 +10,7 @@ export default {
10
10
  key: "google_drive-new-files-instant",
11
11
  name: "New Files (Instant)",
12
12
  description: "Emit new event when a new file is added in your linked Google Drive",
13
- version: "0.1.16",
13
+ version: "0.1.17",
14
14
  type: "source",
15
15
  dedupe: "unique",
16
16
  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.0.5",
10
+ version: "0.0.6",
11
11
  type: "source",
12
12
  dedupe: "unique",
13
13
  props: {
@@ -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.7",
20
+ version: "1.0.8",
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
@@ -24,7 +24,7 @@ export default {
24
24
  key: "google_drive-new-or-modified-files",
25
25
  name: "New or Modified Files (Instant)",
26
26
  description: "Emit new event when a file in the selected Drive is created, modified or trashed.",
27
- version: "0.3.8",
27
+ version: "0.3.9",
28
28
  type: "source",
29
29
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
30
30
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -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.0",
23
+ version: "0.2.1",
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
@@ -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.11",
8
+ version: "0.1.12",
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.13",
9
+ version: "0.1.14",
10
10
  props: {
11
11
  googleDrive: newFilesInstant.props.googleDrive,
12
12
  db: newFilesInstant.props.db,