@pipedream/google_drive 0.6.11 → 0.6.12

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/README.md CHANGED
@@ -9,7 +9,7 @@ Using the Google Drive API, you can build applications that:
9
9
  - Track changes to files
10
10
  - And much more!
11
11
 
12
- ## Troubleshooting
12
+ # Troubleshooting
13
13
 
14
14
  **Error: "Google cannot give this app access to your account data because Advanced Protection is turned on for your Google Account"**
15
15
 
@@ -10,8 +10,8 @@ export default {
10
10
  key: "google_drive-add-file-sharing-preference",
11
11
  name: "Add File Sharing Preference",
12
12
  description:
13
- "Add a [sharing](https://support.google.com/drive/answer/7166529) permission to the sharing preferences of a file and provide a sharing URL. [See the docs](https://developers.google.com/drive/api/v3/reference/permissions/create) for more information",
14
- version: "0.1.1",
13
+ "Add a [sharing](https://support.google.com/drive/answer/7166529) permission to the sharing preferences of a file or folder and provide a sharing URL. [See the docs](https://developers.google.com/drive/api/v3/reference/permissions/create) for more information",
14
+ version: "0.1.2",
15
15
  type: "action",
16
16
  props: {
17
17
  googleDrive,
@@ -22,16 +22,16 @@ export default {
22
22
  ],
23
23
  optional: true,
24
24
  },
25
- fileId: {
25
+ fileOrFolderId: {
26
26
  propDefinition: [
27
27
  googleDrive,
28
- "fileId",
28
+ "fileOrFolderId",
29
29
  (c) => ({
30
30
  drive: c.drive,
31
31
  }),
32
32
  ],
33
33
  optional: false,
34
- description: "The file to share",
34
+ description: "The file or folder to share",
35
35
  },
36
36
  role: {
37
37
  propDefinition: [
@@ -60,14 +60,14 @@ export default {
60
60
  },
61
61
  async run({ $ }) {
62
62
  const {
63
- fileId,
63
+ fileOrFolderId,
64
64
  role,
65
65
  type,
66
66
  domain,
67
67
  emailAddress,
68
68
  } = this;
69
69
  // Create the permission for the file
70
- await this.googleDrive.createPermission(fileId, {
70
+ await this.googleDrive.createPermission(fileOrFolderId, {
71
71
  role,
72
72
  type,
73
73
  domain,
@@ -75,7 +75,7 @@ export default {
75
75
  });
76
76
 
77
77
  // Get the file to get the `webViewLink` sharing URL
78
- const resp = await this.googleDrive.getFile(this.fileId);
78
+ const resp = await this.googleDrive.getFile(this.fileOrFolderId);
79
79
  const webViewLink = resp.webViewLink;
80
80
  $.export("$summary", `Successfully added a sharing permission to the file, "${resp.name}"`);
81
81
  return webViewLink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/google_drive",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "description": "Pipedream Google_drive Components",
5
5
  "main": "google_drive.app.mjs",
6
6
  "keywords": [