@activepieces/piece-google-drive 0.5.35 → 0.5.37
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 +5 -5
- package/src/lib/action/get-file-by-id.d.ts +1 -0
- package/src/lib/action/get-file-by-id.js +8 -3
- package/src/lib/action/get-file-by-id.js.map +1 -1
- package/src/lib/action/list-files.action.d.ts +1 -0
- package/src/lib/action/list-files.action.js +4 -0
- package/src/lib/action/list-files.action.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-google-drive",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.37",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@anthropic-ai/sdk": "0.
|
|
5
|
+
"@anthropic-ai/sdk": "0.33.1",
|
|
6
6
|
"@sinclair/typebox": "0.34.11",
|
|
7
7
|
"axios": "1.7.8",
|
|
8
8
|
"axios-retry": "4.4.1",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"replicate": "0.34.1",
|
|
18
18
|
"semver": "7.6.0",
|
|
19
19
|
"zod": "3.23.8",
|
|
20
|
-
"@activepieces/pieces-common": "0.
|
|
21
|
-
"@activepieces/pieces-framework": "0.7.
|
|
22
|
-
"@activepieces/shared": "0.10.
|
|
20
|
+
"@activepieces/pieces-common": "0.4.2",
|
|
21
|
+
"@activepieces/pieces-framework": "0.7.44",
|
|
22
|
+
"@activepieces/shared": "0.10.152",
|
|
23
23
|
"tslib": "1.14.1"
|
|
24
24
|
},
|
|
25
25
|
"overrides": {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const googleDriveGetResourceById: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
2
|
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
include_team_drives: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
3
4
|
}>;
|
|
@@ -6,6 +6,7 @@ const index_1 = require("../../index");
|
|
|
6
6
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
7
|
const googleapis_1 = require("googleapis");
|
|
8
8
|
const googleapis_common_1 = require("googleapis-common");
|
|
9
|
+
const common_1 = require("../common");
|
|
9
10
|
exports.googleDriveGetResourceById = (0, pieces_framework_1.createAction)({
|
|
10
11
|
auth: index_1.googleDriveAuth,
|
|
11
12
|
name: 'get-file-or-folder-by-id',
|
|
@@ -16,14 +17,18 @@ exports.googleDriveGetResourceById = (0, pieces_framework_1.createAction)({
|
|
|
16
17
|
displayName: 'File / Folder Id',
|
|
17
18
|
description: 'The Id of the file/folder to search for.',
|
|
18
19
|
required: true,
|
|
19
|
-
})
|
|
20
|
+
}),
|
|
21
|
+
include_team_drives: common_1.common.properties.include_team_drives,
|
|
20
22
|
},
|
|
21
23
|
run(context) {
|
|
22
24
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
25
|
const authClient = new googleapis_common_1.OAuth2Client();
|
|
24
26
|
authClient.setCredentials(context.auth);
|
|
25
27
|
const drive = googleapis_1.google.drive({ version: 'v3', auth: authClient });
|
|
26
|
-
const response = yield drive.files.get({
|
|
28
|
+
const response = yield drive.files.get({
|
|
29
|
+
fileId: context.propsValue.id,
|
|
30
|
+
supportsAllDrives: context.propsValue.include_team_drives,
|
|
31
|
+
});
|
|
27
32
|
if (response.data) {
|
|
28
33
|
return response.data;
|
|
29
34
|
}
|
|
@@ -32,6 +37,6 @@ exports.googleDriveGetResourceById = (0, pieces_framework_1.createAction)({
|
|
|
32
37
|
return null;
|
|
33
38
|
}
|
|
34
39
|
});
|
|
35
|
-
}
|
|
40
|
+
},
|
|
36
41
|
});
|
|
37
42
|
//# sourceMappingURL=get-file-by-id.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-file-by-id.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/get-file-by-id.ts"],"names":[],"mappings":";;;;AAAA,uCAA8C;AAC9C,qEAAwE;AACxE,2CAAoC;AACpC,yDAAiD;
|
|
1
|
+
{"version":3,"file":"get-file-by-id.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/get-file-by-id.ts"],"names":[],"mappings":";;;;AAAA,uCAA8C;AAC9C,qEAAwE;AACxE,2CAAoC;AACpC,yDAAiD;AACjD,sCAAmC;AAEtB,QAAA,0BAA0B,GAAG,IAAA,+BAAY,EAAC;IACrD,IAAI,EAAE,uBAAe;IACrB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,yCAAyC;IACtD,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,mBAAmB,EAAE,eAAM,CAAC,UAAU,CAAC,mBAAmB;KAC3D;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,UAAU,GAAG,IAAI,gCAAY,EAAE,CAAC;YACtC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACxC,MAAM,KAAK,GAAG,mBAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAChE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;gBACrC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE;gBAC7B,iBAAiB,EAAE,OAAO,CAAC,UAAU,CAAC,mBAAmB;aAC1D,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAClB,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC;gBACzE,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const googleDriveListFiles: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
2
|
folderId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
include_team_drives: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
3
4
|
includeTrashed: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
5
|
}>;
|
|
@@ -6,6 +6,7 @@ const pieces_common_1 = require("@activepieces/pieces-common");
|
|
|
6
6
|
const index_1 = require("../../index");
|
|
7
7
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
8
8
|
const querystring_1 = tslib_1.__importDefault(require("querystring"));
|
|
9
|
+
const common_1 = require("../common");
|
|
9
10
|
exports.googleDriveListFiles = (0, pieces_framework_1.createAction)({
|
|
10
11
|
auth: index_1.googleDriveAuth,
|
|
11
12
|
name: 'list-files',
|
|
@@ -17,6 +18,7 @@ exports.googleDriveListFiles = (0, pieces_framework_1.createAction)({
|
|
|
17
18
|
description: 'Folder ID coming from | New Folder -> id | (or any other source)',
|
|
18
19
|
required: true,
|
|
19
20
|
}),
|
|
21
|
+
include_team_drives: common_1.common.properties.include_team_drives,
|
|
20
22
|
includeTrashed: pieces_framework_1.Property.Checkbox({
|
|
21
23
|
displayName: 'Include Trashed',
|
|
22
24
|
description: 'Include new files that have been trashed.',
|
|
@@ -40,6 +42,8 @@ exports.googleDriveListFiles = (0, pieces_framework_1.createAction)({
|
|
|
40
42
|
const params = {
|
|
41
43
|
q: q,
|
|
42
44
|
fields: 'files(id,kind,mimeType,name,trashed)',
|
|
45
|
+
supportsAllDrives: 'true',
|
|
46
|
+
includeItemsFromAllDrives: context.propsValue.include_team_drives ? 'true' : 'false',
|
|
43
47
|
};
|
|
44
48
|
let response = yield pieces_common_1.httpClient.sendRequest({
|
|
45
49
|
method: pieces_common_1.HttpMethod.GET,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/list-files.action.ts"],"names":[],"mappings":";;;;AAAA,+DAAqE;AACrE,uCAA8C;AAC9C,qEAAwE;AACxE,sEAAsC;
|
|
1
|
+
{"version":3,"file":"list-files.action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/list-files.action.ts"],"names":[],"mappings":";;;;AAAA,+DAAqE;AACrE,uCAA8C;AAC9C,qEAAwE;AACxE,sEAAsC;AACtC,sCAAmC;AAEtB,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,uBAAe;IACrB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,IAAI;SACf,CAAC;QACE,mBAAmB,EAAE,eAAM,CAAC,UAAU,CAAC,mBAAmB;QAE9D,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG;gBACb,MAAM,EAAE,gBAAgB;gBACxB,kBAAkB,EAAE,KAAK;gBACzB,OAAO,EAAE,EAAe;aACzB,CAAA;YAED,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,cAAc,CAAC;YAEtD,2EAA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