@activepieces/piece-google-drive 0.5.4 → 0.5.5
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/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-google-drive",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.26.8",
|
|
6
|
-
"axios": "^1.
|
|
6
|
+
"axios": "^1.6.0",
|
|
7
7
|
"dayjs": "1.11.9",
|
|
8
8
|
"form-data": "4.0.0",
|
|
9
9
|
"is-base64": "1.1.0",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"mime-types": "2.1.35",
|
|
12
12
|
"nanoid": "3.3.6",
|
|
13
13
|
"semver": "7.5.4",
|
|
14
|
-
"@activepieces/pieces-common": "0.2.
|
|
15
|
-
"@activepieces/pieces-framework": "0.
|
|
16
|
-
"@activepieces/shared": "0.
|
|
17
|
-
"tslib": "
|
|
14
|
+
"@activepieces/pieces-common": "0.2.5",
|
|
15
|
+
"@activepieces/pieces-framework": "0.7.4",
|
|
16
|
+
"@activepieces/shared": "0.10.44",
|
|
17
|
+
"tslib": "1.14.1"
|
|
18
18
|
},
|
|
19
19
|
"main": "./src/index.js",
|
|
20
20
|
"type": "commonjs"
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const upload_file_1 = require("./lib/action/upload-file");
|
|
|
8
8
|
const new_file_1 = require("./lib/triggers/new-file");
|
|
9
9
|
const new_folder_1 = require("./lib/triggers/new-folder");
|
|
10
10
|
const read_file_1 = require("./lib/action/read-file");
|
|
11
|
+
const list_files_action_1 = require("./lib/action/list-files.action");
|
|
11
12
|
exports.googleDriveAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
12
13
|
description: "",
|
|
13
14
|
authUrl: "https://accounts.google.com/o/oauth2/auth",
|
|
@@ -18,9 +19,9 @@ exports.googleDriveAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
|
18
19
|
exports.googleDrive = (0, pieces_framework_1.createPiece)({
|
|
19
20
|
minimumSupportedRelease: '0.5.0',
|
|
20
21
|
logoUrl: 'https://cdn.activepieces.com/pieces/google-drive.png',
|
|
21
|
-
actions: [create_new_folder_1.googleDriveCreateNewFolder, create_new_text_file_1.googleDriveCreateNewTextFile, upload_file_1.googleDriveUploadFile, read_file_1.readFile],
|
|
22
|
+
actions: [create_new_folder_1.googleDriveCreateNewFolder, create_new_text_file_1.googleDriveCreateNewTextFile, upload_file_1.googleDriveUploadFile, read_file_1.readFile, list_files_action_1.googleDriveListFiles],
|
|
22
23
|
displayName: "Google Drive",
|
|
23
|
-
authors: ['kanarelo', 'BastienMe', 'MoShizzle', 'Armangiau', 'vitalini'],
|
|
24
|
+
authors: ['kanarelo', 'BastienMe', 'MoShizzle', 'Armangiau', 'vitalini', 'pfernandez98'],
|
|
24
25
|
triggers: [new_file_1.newFile, new_folder_1.newFolder],
|
|
25
26
|
auth: exports.googleDriveAuth,
|
|
26
27
|
});
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/google-drive/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AAExE,sEAA4E;AAC5E,4EAAiF;AACjF,0DAAiE;AACjE,sDAAkD;AAClD,0DAAsD;AACtD,sDAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/google-drive/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AAExE,sEAA4E;AAC5E,4EAAiF;AACjF,0DAAiE;AACjE,sDAAkD;AAClD,0DAAsD;AACtD,sDAAkD;AAClD,sEAAsE;AAEzD,QAAA,eAAe,GAAG,4BAAS,CAAC,MAAM,CAAC;IAC5C,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,2CAA2C;IACpD,QAAQ,EAAE,qCAAqC;IAC/C,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,CAAC,uCAAuC,CAAC;CACnD,CAAC,CAAA;AAEW,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACtC,uBAAuB,EAAE,OAAO;IAC7B,OAAO,EAAE,sDAAsD;IAClE,OAAO,EAAE,CAAC,8CAA0B,EAAE,mDAA4B,EAAE,mCAAqB,EAAE,oBAAQ,EAAE,wCAAoB,CAAC;IAC1H,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC;IACxF,QAAQ,EAAE,CAAC,kBAAO,EAAE,sBAAS,CAAC;IAC3B,IAAI,EAAE,uBAAe;CACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const googleDriveListFiles: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<true, import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
folderId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.googleDriveListFiles = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
8
|
+
exports.googleDriveListFiles = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: index_1.googleDriveAuth,
|
|
10
|
+
name: 'list-files',
|
|
11
|
+
displayName: 'List files',
|
|
12
|
+
description: 'List files from a Google Drive folder',
|
|
13
|
+
props: {
|
|
14
|
+
folderId: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Folder ID',
|
|
16
|
+
description: 'Folder ID comming from | New Folder -> id | (or any other source)',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
run(context) {
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
23
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
24
|
+
url: `https://www.googleapis.com/drive/v3/files?q='${context.propsValue.folderId}'+in+parents`,
|
|
25
|
+
headers: {
|
|
26
|
+
Authorization: `Bearer ${context.auth.access_token}`,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
return response.body;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=list-files.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-files.action.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/google-drive/src/lib/action/list-files.action.ts"],"names":[],"mappings":";;;;AAAA,+DAAqE;AACrE,uCAA8C;AAC9C,qEAAwE;AAE3D,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,uBAAe;IACrB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACH,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,mEAAmE;YAChF,QAAQ,EAAE,IAAI;SACjB,CAAC;KACL;IACK,GAAG,CAAE,OAAO;;YACd,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,gDAAgD,OAAO,CAAC,UAAU,CAAC,QAAQ,cAAc;gBAC9F,OAAO,EAAE;oBACL,aAAa,EAAE,UAAU,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE;iBACvD;aACJ,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;KAAA;CACJ,CAAC,CAAC"}
|