@pipedream/google_drive 0.4.10 → 0.4.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.
@@ -7,8 +7,8 @@ const MODE_PDF = "Pdf";
7
7
  export default {
8
8
  key: "google_drive-create-file-from-template",
9
9
  name: "Create New File From Template",
10
- description: "Create a new google doc file from template. [See documentation](https://www.npmjs.com/package/google-docs-mustaches)",
11
- version: "0.0.2",
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.0.3",
12
12
  type: "action",
13
13
  props: {
14
14
  googleDrive,
@@ -18,7 +18,7 @@ export default {
18
18
  "fileId",
19
19
  ],
20
20
  description:
21
- "Id of the file you want to use as a template.",
21
+ "Select the document you'd like to use as the template, or use a custom expression to reference a document ID from a previous step.",
22
22
  },
23
23
  folderId: {
24
24
  propDefinition: [
@@ -26,7 +26,7 @@ export default {
26
26
  "folderId",
27
27
  ],
28
28
  description:
29
- "Folder id of the newly created google doc and pdf.",
29
+ "Select the folder of the newly created Google Doc and/or PDF, or use a custom expression to reference a folder ID from a previous step.",
30
30
  },
31
31
  name: {
32
32
  propDefinition: [
@@ -34,13 +34,13 @@ export default {
34
34
  "fileName",
35
35
  ],
36
36
  description:
37
- "Name of the file you want to create (eg. `myFile` will create a google doc called `myFile` and a pdf called `myFile.pdf`)",
37
+ "Name of the file you want to create (eg. `myFile` will create a Google Doc called `myFile` and a pdf called `myFile.pdf`)",
38
38
  optional: false,
39
39
  },
40
40
  mode: {
41
41
  type: "string[]",
42
42
  label: "Mode",
43
- description: "Select if you want to create the google doc, the pdf or both files.",
43
+ description: "Specify if you want to create a Google Doc, PDF or both.",
44
44
  options: [
45
45
  MODE_GOOGLE_DOC,
46
46
  MODE_PDF,
@@ -48,8 +48,8 @@ export default {
48
48
  },
49
49
  replaceValues: {
50
50
  type: "object",
51
- label: "Replace values",
52
- description: "Substrings to replace in the document. (eg. `{{ key }}` in the document will be replace by the value.",
51
+ label: "Replace text placeholders",
52
+ description: "Replace text placeholders in the document. Use the format {{xyz}} in the document but exclude the curly braces in the key. (eg. `{{myPlaceholder}}` in the document will be replaced by the value of the key `myPlaceholder` in the action.",
53
53
  optional: true,
54
54
  },
55
55
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/google_drive",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "Pipedream Google_drive Components",
5
5
  "main": "google_drive.app.mjs",
6
6
  "keywords": [
@@ -19,9 +19,8 @@ export default {
19
19
  ...common,
20
20
  key: "google_drive-new-or-modified-files",
21
21
  name: "New or Modified Files",
22
- description:
23
- "Emits a new event any time any file in your linked Google Drive is added, modified, or deleted",
24
- version: "0.0.20",
22
+ description: "Emit new event any time any file in your linked Google Drive is added, modified, or deleted",
23
+ version: "0.0.21",
25
24
  type: "source",
26
25
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
27
26
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -50,8 +49,11 @@ export default {
50
49
  },
51
50
  async processChanges(changedFiles, headers) {
52
51
  for (const file of changedFiles) {
52
+ const metadata = await this.googleDrive.getFileMetadata(`${headers["x-goog-resource-uri"]}&fields=*`);
53
+
53
54
  const eventToEmit = {
54
55
  file,
56
+ ...metadata,
55
57
  change: {
56
58
  state: headers["x-goog-resource-state"],
57
59
  resourceURI: headers["x-goog-resource-uri"],
@@ -19,9 +19,8 @@ export default {
19
19
  ...common,
20
20
  key: "google_drive-new-or-modified-folders",
21
21
  name: "New or Modified Folders",
22
- description:
23
- "Emits a new event any time any folder in your linked Google Drive is added, modified, or deleted",
24
- version: "0.0.9",
22
+ description: "Emit new event any time any folder in your linked Google Drive is added, modified, or deleted",
23
+ version: "0.0.10",
25
24
  type: "source",
26
25
  // Dedupe events based on the "x-goog-message-number" header for the target channel:
27
26
  // https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -68,8 +67,11 @@ export default {
68
67
  const modifiedTime = Date.parse(fileInfo.modifiedTime);
69
68
  if (lastModifiedTimeForFile == modifiedTime) continue;
70
69
 
70
+ const metadata = await this.googleDrive.getFileMetadata(`${headers["x-goog-resource-uri"]}&fields=*`);
71
+
71
72
  const eventToEmit = {
72
73
  file,
74
+ ...metadata,
73
75
  change: {
74
76
  state: headers["x-goog-resource-state"],
75
77
  resourceURI: headers["x-goog-resource-uri"],