@activepieces/piece-google-drive 0.5.28 → 0.5.29

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.28",
3
+ "version": "0.5.29",
4
4
  "dependencies": {
5
- "@sinclair/typebox": "0.31.28",
6
- "axios": "1.6.7",
5
+ "@sinclair/typebox": "0.32.35",
6
+ "axios": "1.7.4",
7
7
  "dayjs": "1.11.9",
8
8
  "form-data": "4.0.0",
9
9
  "googleapis": "129.0.0",
@@ -14,7 +14,7 @@
14
14
  "semver": "7.6.0",
15
15
  "@activepieces/pieces-common": "0.2.15",
16
16
  "@activepieces/pieces-framework": "0.7.33",
17
- "@activepieces/shared": "0.10.115",
17
+ "@activepieces/shared": "0.10.116",
18
18
  "tslib": "1.14.1"
19
19
  },
20
20
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -20,6 +20,8 @@ const new_file_1 = require("./lib/triggers/new-file");
20
20
  const new_folder_1 = require("./lib/triggers/new-folder");
21
21
  const set_public_access_1 = require("./lib/action/set-public-access");
22
22
  const move_file_1 = require("./lib/action/move-file");
23
+ const delete_file_1 = require("./lib/action/delete-file");
24
+ const send_to_trash_1 = require("./lib/action/send-to-trash");
23
25
  exports.googleDriveAuth = pieces_framework_1.PieceAuth.OAuth2({
24
26
  description: '',
25
27
  authUrl: 'https://accounts.google.com/o/oauth2/auth',
@@ -61,6 +63,8 @@ exports.googleDrive = (0, pieces_framework_1.createPiece)({
61
63
  delete_permission_action_1.deletePermission,
62
64
  set_public_access_1.setPublicAccess,
63
65
  move_file_1.moveFileAction,
66
+ delete_file_1.googleDriveDeleteFile,
67
+ send_to_trash_1.googleDriveTrashFile,
64
68
  (0, pieces_common_1.createCustomApiCallAction)({
65
69
  baseUrl: () => 'https://www.googleapis.com/drive/v3',
66
70
  auth: exports.googleDriveAuth,
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/google-drive/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AAExC,+DAAwE;AACxE,iDAAqD;AACrD,8EAAmE;AACnE,sEAA4E;AAC5E,4EAAiF;AACjF,oFAAyE;AACzE,8EAAyE;AACzE,gEAAyE;AACzE,sEAAsE;AACtE,sDAAkD;AAClD,kFAAqE;AACrE,4FAAoF;AACpF,0DAAiE;AACjE,sDAAkD;AAClD,0DAAsD;AACtD,sEAAiE;AACjE,sDAAwD;AAE3C,QAAA,eAAe,GAAG,4BAAS,CAAC,MAAM,CAAC;IAC9C,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,2CAA2C;IACpD,QAAQ,EAAE,qCAAqC;IAC/C,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,CAAC,uCAAuC,CAAC;CACjD,CAAC,CAAC;AAEU,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,sDAAsD;IAC/D,UAAU,EAAE,CAAC,sBAAa,CAAC,iBAAiB,CAAC;IAC7C,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,+BAA+B;IAC5C,OAAO,EAAE;QACP,WAAW;QACX,YAAY;QACZ,UAAU;QACV,cAAc;QACd,UAAU;QACV,YAAY;QACZ,YAAY;QACZ,WAAW;QACX,sBAAsB;QACtB,eAAe;QACf,UAAU;KACX;IACD,QAAQ,EAAE,CAAC,kBAAO,EAAE,sBAAS,CAAC;IAC9B,OAAO,EAAE;QACP,8CAA0B;QAC1B,mDAA4B;QAC5B,mCAAqB;QACrB,oBAAQ;QACR,2CAA0B;QAC1B,wCAAoB;QACpB,sDAAuB;QACvB,2CAAmB;QACnB,uCAAa;QACb,qCAAa;QACb,2CAAgB;QAChB,mCAAe;QACf,0BAAc;QACd,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,qCAAqC;YACpD,IAAI,EAAE,uBAAe;YACrB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;iBACtE,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,IAAI,EAAE,uBAAe;CACtB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/google-drive/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AAExC,+DAAwE;AACxE,iDAAqD;AACrD,8EAAmE;AACnE,sEAA4E;AAC5E,4EAAiF;AACjF,oFAAyE;AACzE,8EAAyE;AACzE,gEAAyE;AACzE,sEAAsE;AACtE,sDAAkD;AAClD,kFAAqE;AACrE,4FAAoF;AACpF,0DAAiE;AACjE,sDAAkD;AAClD,0DAAsD;AACtD,sEAAiE;AACjE,sDAAwD;AACxD,0DAAiE;AACjE,8DAAkE;AAErD,QAAA,eAAe,GAAG,4BAAS,CAAC,MAAM,CAAC;IAC9C,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,2CAA2C;IACpD,QAAQ,EAAE,qCAAqC;IAC/C,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,CAAC,uCAAuC,CAAC;CACjD,CAAC,CAAC;AAEU,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,sDAAsD;IAC/D,UAAU,EAAE,CAAC,sBAAa,CAAC,iBAAiB,CAAC;IAC7C,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,+BAA+B;IAC5C,OAAO,EAAE;QACP,WAAW;QACX,YAAY;QACZ,UAAU;QACV,cAAc;QACd,UAAU;QACV,YAAY;QACZ,YAAY;QACZ,WAAW;QACX,sBAAsB;QACtB,eAAe;QACf,UAAU;KACX;IACD,QAAQ,EAAE,CAAC,kBAAO,EAAE,sBAAS,CAAC;IAC9B,OAAO,EAAE;QACP,8CAA0B;QAC1B,mDAA4B;QAC5B,mCAAqB;QACrB,oBAAQ;QACR,2CAA0B;QAC1B,wCAAoB;QACpB,sDAAuB;QACvB,2CAAmB;QACnB,uCAAa;QACb,qCAAa;QACb,2CAAgB;QAChB,mCAAe;QACf,0BAAc;QACd,mCAAqB;QACrB,oCAAoB;QACpB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,qCAAqC;YACpD,IAAI,EAAE,uBAAe;YACrB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;iBACtE,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,IAAI,EAAE,uBAAe;CACtB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const googleDriveDeleteFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ fileId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ include_team_drives: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
+ }>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.googleDriveDeleteFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const __1 = require("../../");
7
+ const common_1 = require("../common");
8
+ const googleapis_1 = require("googleapis");
9
+ const googleapis_common_1 = require("googleapis-common");
10
+ exports.googleDriveDeleteFile = (0, pieces_framework_1.createAction)({
11
+ auth: __1.googleDriveAuth,
12
+ name: 'delete_gdrive_file',
13
+ description: 'Delete permanently a file from your Google Drive',
14
+ displayName: 'Delete file',
15
+ props: {
16
+ fileId: pieces_framework_1.Property.ShortText({
17
+ displayName: 'File ID',
18
+ description: 'The ID of the file to delete',
19
+ required: true,
20
+ }),
21
+ include_team_drives: common_1.common.properties.include_team_drives,
22
+ },
23
+ run(context) {
24
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
+ const authClient = new googleapis_common_1.OAuth2Client();
26
+ authClient.setCredentials(context.auth);
27
+ const drive = googleapis_1.google.drive({ version: 'v3', auth: authClient });
28
+ const response = yield drive.files.delete({
29
+ fileId: context.propsValue.fileId,
30
+ supportsAllDrives: context.propsValue.include_team_drives,
31
+ });
32
+ return response.data;
33
+ });
34
+ },
35
+ });
36
+ //# sourceMappingURL=delete-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-file.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/delete-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,8BAAyC;AACzC,sCAAmC;AACnC,2CAAoC;AACpC,yDAAiD;AAEpC,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,kDAAkD;IAC/D,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,8BAA8B;YAC3C,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;YAExC,MAAM,KAAK,GAAG,mBAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAEhE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;gBACxC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBACjC,iBAAiB,EAAE,OAAO,CAAC,UAAU,CAAC,mBAAmB;aAC1D,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const googleDriveTrashFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ fileId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ include_team_drives: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
+ }>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.googleDriveTrashFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const __1 = require("../../");
7
+ const common_1 = require("../common");
8
+ const googleapis_1 = require("googleapis");
9
+ const googleapis_common_1 = require("googleapis-common");
10
+ exports.googleDriveTrashFile = (0, pieces_framework_1.createAction)({
11
+ auth: __1.googleDriveAuth,
12
+ name: 'trash_gdrive_file',
13
+ description: 'Move a file to the trash in your Google Drive',
14
+ displayName: 'Trash file',
15
+ props: {
16
+ fileId: pieces_framework_1.Property.ShortText({
17
+ displayName: 'File ID',
18
+ description: 'The ID of the file to trash',
19
+ required: true,
20
+ }),
21
+ include_team_drives: common_1.common.properties.include_team_drives,
22
+ },
23
+ run(context) {
24
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
+ const authClient = new googleapis_common_1.OAuth2Client();
26
+ authClient.setCredentials(context.auth);
27
+ const drive = googleapis_1.google.drive({ version: 'v3', auth: authClient });
28
+ const body_value = {
29
+ trashed: true,
30
+ };
31
+ const response = yield drive.files.update({
32
+ fileId: context.propsValue.fileId,
33
+ supportsAllDrives: context.propsValue.include_team_drives,
34
+ requestBody: body_value,
35
+ });
36
+ return response.data;
37
+ });
38
+ },
39
+ });
40
+ //# sourceMappingURL=send-to-trash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-to-trash.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/google-drive/src/lib/action/send-to-trash.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,8BAAyC;AACzC,sCAAmC;AACnC,2CAAoC;AACpC,yDAAiD;AAEpC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,+CAA+C;IAC5D,WAAW,EAAE,YAAY;IACzB,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,6BAA6B;YAC1C,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;YAExC,MAAM,KAAK,GAAG,mBAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAChE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,IAAI;aACd,CAAC;YACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;gBACxC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBACjC,iBAAiB,EAAE,OAAO,CAAC,UAAU,CAAC,mBAAmB;gBACzD,WAAW,EAAE,UAAU;aACxB,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}