@divyacon/piece-google-drive 0.0.0-stage → 0.1.0

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.
Files changed (293) hide show
  1. package/LICENSE.MIT-AP +24 -0
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +155 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/action/add-permission.action.d.ts +11 -0
  7. package/dist/lib/action/add-permission.action.d.ts.map +1 -0
  8. package/dist/lib/action/add-permission.action.js +83 -0
  9. package/dist/lib/action/add-permission.action.js.map +1 -0
  10. package/dist/lib/action/create-new-folder.d.ts +12 -0
  11. package/dist/lib/action/create-new-folder.d.ts.map +1 -0
  12. package/dist/lib/action/create-new-folder.js +43 -0
  13. package/dist/lib/action/create-new-folder.js.map +1 -0
  14. package/dist/lib/action/create-new-text-file.d.ts +14 -0
  15. package/dist/lib/action/create-new-text-file.d.ts.map +1 -0
  16. package/dist/lib/action/create-new-text-file.js +81 -0
  17. package/dist/lib/action/create-new-text-file.js.map +1 -0
  18. package/dist/lib/action/delete-file.d.ts +8 -0
  19. package/dist/lib/action/delete-file.d.ts.map +1 -0
  20. package/dist/lib/action/delete-file.js +38 -0
  21. package/dist/lib/action/delete-file.js.map +1 -0
  22. package/dist/lib/action/delete-permission.action.d.ts +9 -0
  23. package/dist/lib/action/delete-permission.action.d.ts.map +1 -0
  24. package/dist/lib/action/delete-permission.action.js +84 -0
  25. package/dist/lib/action/delete-permission.action.js.map +1 -0
  26. package/dist/lib/action/drive-copy-file.d.ts +10 -0
  27. package/dist/lib/action/drive-copy-file.d.ts.map +1 -0
  28. package/dist/lib/action/drive-copy-file.js +84 -0
  29. package/dist/lib/action/drive-copy-file.js.map +1 -0
  30. package/dist/lib/action/drive-create-comment.d.ts +8 -0
  31. package/dist/lib/action/drive-create-comment.d.ts.map +1 -0
  32. package/dist/lib/action/drive-create-comment.js +60 -0
  33. package/dist/lib/action/drive-create-comment.js.map +1 -0
  34. package/dist/lib/action/drive-create-file-from-text.d.ts +10 -0
  35. package/dist/lib/action/drive-create-file-from-text.d.ts.map +1 -0
  36. package/dist/lib/action/drive-create-file-from-text.js +91 -0
  37. package/dist/lib/action/drive-create-file-from-text.js.map +1 -0
  38. package/dist/lib/action/drive-create-folder.d.ts +8 -0
  39. package/dist/lib/action/drive-create-folder.d.ts.map +1 -0
  40. package/dist/lib/action/drive-create-folder.js +48 -0
  41. package/dist/lib/action/drive-create-folder.js.map +1 -0
  42. package/dist/lib/action/drive-create-reply.d.ts +10 -0
  43. package/dist/lib/action/drive-create-reply.d.ts.map +1 -0
  44. package/dist/lib/action/drive-create-reply.js +81 -0
  45. package/dist/lib/action/drive-create-reply.js.map +1 -0
  46. package/dist/lib/action/drive-create-shared-drive.d.ts +7 -0
  47. package/dist/lib/action/drive-create-shared-drive.d.ts.map +1 -0
  48. package/dist/lib/action/drive-create-shared-drive.js +53 -0
  49. package/dist/lib/action/drive-create-shared-drive.js.map +1 -0
  50. package/dist/lib/action/drive-delete-file.d.ts +7 -0
  51. package/dist/lib/action/drive-delete-file.d.ts.map +1 -0
  52. package/dist/lib/action/drive-delete-file.js +39 -0
  53. package/dist/lib/action/drive-delete-file.js.map +1 -0
  54. package/dist/lib/action/drive-delete-reply.d.ts +9 -0
  55. package/dist/lib/action/drive-delete-reply.d.ts.map +1 -0
  56. package/dist/lib/action/drive-delete-reply.js +64 -0
  57. package/dist/lib/action/drive-delete-reply.js.map +1 -0
  58. package/dist/lib/action/drive-delete-shared-drive.d.ts +7 -0
  59. package/dist/lib/action/drive-delete-shared-drive.d.ts.map +1 -0
  60. package/dist/lib/action/drive-delete-shared-drive.js +55 -0
  61. package/dist/lib/action/drive-delete-shared-drive.js.map +1 -0
  62. package/dist/lib/action/drive-download-file.d.ts +8 -0
  63. package/dist/lib/action/drive-download-file.d.ts.map +1 -0
  64. package/dist/lib/action/drive-download-file.js +37 -0
  65. package/dist/lib/action/drive-download-file.js.map +1 -0
  66. package/dist/lib/action/drive-empty-trash.d.ts +7 -0
  67. package/dist/lib/action/drive-empty-trash.d.ts.map +1 -0
  68. package/dist/lib/action/drive-empty-trash.js +47 -0
  69. package/dist/lib/action/drive-empty-trash.js.map +1 -0
  70. package/dist/lib/action/drive-export-workspace-file.d.ts +8 -0
  71. package/dist/lib/action/drive-export-workspace-file.d.ts.map +1 -0
  72. package/dist/lib/action/drive-export-workspace-file.js +116 -0
  73. package/dist/lib/action/drive-export-workspace-file.js.map +1 -0
  74. package/dist/lib/action/drive-get-about.d.ts +5 -0
  75. package/dist/lib/action/drive-get-about.d.ts.map +1 -0
  76. package/dist/lib/action/drive-get-about.js +43 -0
  77. package/dist/lib/action/drive-get-about.js.map +1 -0
  78. package/dist/lib/action/drive-get-file.d.ts +7 -0
  79. package/dist/lib/action/drive-get-file.d.ts.map +1 -0
  80. package/dist/lib/action/drive-get-file.js +46 -0
  81. package/dist/lib/action/drive-get-file.js.map +1 -0
  82. package/dist/lib/action/drive-get-reply.d.ts +9 -0
  83. package/dist/lib/action/drive-get-reply.d.ts.map +1 -0
  84. package/dist/lib/action/drive-get-reply.js +66 -0
  85. package/dist/lib/action/drive-get-reply.js.map +1 -0
  86. package/dist/lib/action/drive-get-shared-drive.d.ts +7 -0
  87. package/dist/lib/action/drive-get-shared-drive.d.ts.map +1 -0
  88. package/dist/lib/action/drive-get-shared-drive.js +52 -0
  89. package/dist/lib/action/drive-get-shared-drive.js.map +1 -0
  90. package/dist/lib/action/drive-list-comments.d.ts +7 -0
  91. package/dist/lib/action/drive-list-comments.d.ts.map +1 -0
  92. package/dist/lib/action/drive-list-comments.js +60 -0
  93. package/dist/lib/action/drive-list-comments.js.map +1 -0
  94. package/dist/lib/action/drive-list-files.d.ts +11 -0
  95. package/dist/lib/action/drive-list-files.d.ts.map +1 -0
  96. package/dist/lib/action/drive-list-files.js +174 -0
  97. package/dist/lib/action/drive-list-files.js.map +1 -0
  98. package/dist/lib/action/drive-list-permissions.d.ts +7 -0
  99. package/dist/lib/action/drive-list-permissions.d.ts.map +1 -0
  100. package/dist/lib/action/drive-list-permissions.js +59 -0
  101. package/dist/lib/action/drive-list-permissions.js.map +1 -0
  102. package/dist/lib/action/drive-list-replies.d.ts +8 -0
  103. package/dist/lib/action/drive-list-replies.d.ts.map +1 -0
  104. package/dist/lib/action/drive-list-replies.js +65 -0
  105. package/dist/lib/action/drive-list-replies.js.map +1 -0
  106. package/dist/lib/action/drive-list-shared-drives.d.ts +8 -0
  107. package/dist/lib/action/drive-list-shared-drives.d.ts.map +1 -0
  108. package/dist/lib/action/drive-list-shared-drives.js +60 -0
  109. package/dist/lib/action/drive-list-shared-drives.js.map +1 -0
  110. package/dist/lib/action/drive-move-file.d.ts +8 -0
  111. package/dist/lib/action/drive-move-file.d.ts.map +1 -0
  112. package/dist/lib/action/drive-move-file.js +57 -0
  113. package/dist/lib/action/drive-move-file.js.map +1 -0
  114. package/dist/lib/action/drive-remove-permission.d.ts +9 -0
  115. package/dist/lib/action/drive-remove-permission.d.ts.map +1 -0
  116. package/dist/lib/action/drive-remove-permission.js +75 -0
  117. package/dist/lib/action/drive-remove-permission.js.map +1 -0
  118. package/dist/lib/action/drive-replace-file-content.d.ts +9 -0
  119. package/dist/lib/action/drive-replace-file-content.d.ts.map +1 -0
  120. package/dist/lib/action/drive-replace-file-content.js +67 -0
  121. package/dist/lib/action/drive-replace-file-content.js.map +1 -0
  122. package/dist/lib/action/drive-save-file-as-pdf.d.ts +9 -0
  123. package/dist/lib/action/drive-save-file-as-pdf.d.ts.map +1 -0
  124. package/dist/lib/action/drive-save-file-as-pdf.js +73 -0
  125. package/dist/lib/action/drive-save-file-as-pdf.js.map +1 -0
  126. package/dist/lib/action/drive-search-files.d.ts +12 -0
  127. package/dist/lib/action/drive-search-files.d.ts.map +1 -0
  128. package/dist/lib/action/drive-search-files.js +130 -0
  129. package/dist/lib/action/drive-search-files.js.map +1 -0
  130. package/dist/lib/action/drive-set-public-access.d.ts +8 -0
  131. package/dist/lib/action/drive-set-public-access.d.ts.map +1 -0
  132. package/dist/lib/action/drive-set-public-access.js +71 -0
  133. package/dist/lib/action/drive-set-public-access.js.map +1 -0
  134. package/dist/lib/action/drive-share-file.d.ts +10 -0
  135. package/dist/lib/action/drive-share-file.d.ts.map +1 -0
  136. package/dist/lib/action/drive-share-file.js +69 -0
  137. package/dist/lib/action/drive-share-file.js.map +1 -0
  138. package/dist/lib/action/drive-trash-file.d.ts +7 -0
  139. package/dist/lib/action/drive-trash-file.d.ts.map +1 -0
  140. package/dist/lib/action/drive-trash-file.js +45 -0
  141. package/dist/lib/action/drive-trash-file.js.map +1 -0
  142. package/dist/lib/action/drive-untrash-file.d.ts +7 -0
  143. package/dist/lib/action/drive-untrash-file.d.ts.map +1 -0
  144. package/dist/lib/action/drive-untrash-file.js +54 -0
  145. package/dist/lib/action/drive-untrash-file.js.map +1 -0
  146. package/dist/lib/action/drive-update-file-metadata.d.ts +10 -0
  147. package/dist/lib/action/drive-update-file-metadata.d.ts.map +1 -0
  148. package/dist/lib/action/drive-update-file-metadata.js +79 -0
  149. package/dist/lib/action/drive-update-file-metadata.js.map +1 -0
  150. package/dist/lib/action/drive-update-permission.d.ts +9 -0
  151. package/dist/lib/action/drive-update-permission.d.ts.map +1 -0
  152. package/dist/lib/action/drive-update-permission.js +93 -0
  153. package/dist/lib/action/drive-update-permission.js.map +1 -0
  154. package/dist/lib/action/drive-update-reply.d.ts +10 -0
  155. package/dist/lib/action/drive-update-reply.d.ts.map +1 -0
  156. package/dist/lib/action/drive-update-reply.js +72 -0
  157. package/dist/lib/action/drive-update-reply.js.map +1 -0
  158. package/dist/lib/action/drive-update-shared-drive.d.ts +8 -0
  159. package/dist/lib/action/drive-update-shared-drive.d.ts.map +1 -0
  160. package/dist/lib/action/drive-update-shared-drive.js +62 -0
  161. package/dist/lib/action/drive-update-shared-drive.js.map +1 -0
  162. package/dist/lib/action/drive-upload-file.d.ts +9 -0
  163. package/dist/lib/action/drive-upload-file.d.ts.map +1 -0
  164. package/dist/lib/action/drive-upload-file.js +71 -0
  165. package/dist/lib/action/drive-upload-file.js.map +1 -0
  166. package/dist/lib/action/drive-upload-from-url.d.ts +10 -0
  167. package/dist/lib/action/drive-upload-from-url.d.ts.map +1 -0
  168. package/dist/lib/action/drive-upload-from-url.js +90 -0
  169. package/dist/lib/action/drive-upload-from-url.js.map +1 -0
  170. package/dist/lib/action/duplicate-file.action.d.ts +11 -0
  171. package/dist/lib/action/duplicate-file.action.d.ts.map +1 -0
  172. package/dist/lib/action/duplicate-file.action.js +83 -0
  173. package/dist/lib/action/duplicate-file.action.js.map +1 -0
  174. package/dist/lib/action/get-file-by-id.d.ts +8 -0
  175. package/dist/lib/action/get-file-by-id.d.ts.map +1 -0
  176. package/dist/lib/action/get-file-by-id.js +45 -0
  177. package/dist/lib/action/get-file-by-id.js.map +1 -0
  178. package/dist/lib/action/list-files.action.d.ts +11 -0
  179. package/dist/lib/action/list-files.action.d.ts.map +1 -0
  180. package/dist/lib/action/list-files.action.js +165 -0
  181. package/dist/lib/action/list-files.action.js.map +1 -0
  182. package/dist/lib/action/move-file.d.ts +12 -0
  183. package/dist/lib/action/move-file.d.ts.map +1 -0
  184. package/dist/lib/action/move-file.js +52 -0
  185. package/dist/lib/action/move-file.js.map +1 -0
  186. package/dist/lib/action/read-file.d.ts +8 -0
  187. package/dist/lib/action/read-file.d.ts.map +1 -0
  188. package/dist/lib/action/read-file.js +34 -0
  189. package/dist/lib/action/read-file.js.map +1 -0
  190. package/dist/lib/action/save-file-as-pdf.action.d.ts +10 -0
  191. package/dist/lib/action/save-file-as-pdf.action.d.ts.map +1 -0
  192. package/dist/lib/action/save-file-as-pdf.action.js +72 -0
  193. package/dist/lib/action/save-file-as-pdf.action.js.map +1 -0
  194. package/dist/lib/action/search-folder-or-file.action.d.ts +15 -0
  195. package/dist/lib/action/search-folder-or-file.action.d.ts.map +1 -0
  196. package/dist/lib/action/search-folder-or-file.action.js +119 -0
  197. package/dist/lib/action/search-folder-or-file.action.js.map +1 -0
  198. package/dist/lib/action/send-to-trash.d.ts +8 -0
  199. package/dist/lib/action/send-to-trash.d.ts.map +1 -0
  200. package/dist/lib/action/send-to-trash.js +44 -0
  201. package/dist/lib/action/send-to-trash.js.map +1 -0
  202. package/dist/lib/action/set-public-access.d.ts +8 -0
  203. package/dist/lib/action/set-public-access.d.ts.map +1 -0
  204. package/dist/lib/action/set-public-access.js +66 -0
  205. package/dist/lib/action/set-public-access.js.map +1 -0
  206. package/dist/lib/action/upload-file.d.ts +13 -0
  207. package/dist/lib/action/upload-file.d.ts.map +1 -0
  208. package/dist/lib/action/upload-file.js +58 -0
  209. package/dist/lib/action/upload-file.js.map +1 -0
  210. package/dist/lib/auth.d.ts +11 -0
  211. package/dist/lib/auth.d.ts.map +1 -0
  212. package/dist/lib/auth.js +87 -0
  213. package/dist/lib/auth.js.map +1 -0
  214. package/dist/lib/common/get-file-content.d.ts +4 -0
  215. package/dist/lib/common/get-file-content.d.ts.map +1 -0
  216. package/dist/lib/common/get-file-content.js +69 -0
  217. package/dist/lib/common/get-file-content.js.map +1 -0
  218. package/dist/lib/common/index.d.ts +23 -0
  219. package/dist/lib/common/index.d.ts.map +1 -0
  220. package/dist/lib/common/index.js +152 -0
  221. package/dist/lib/common/index.js.map +1 -0
  222. package/dist/lib/output-schemas.d.ts +53 -0
  223. package/dist/lib/output-schemas.d.ts.map +1 -0
  224. package/dist/lib/output-schemas.js +2022 -0
  225. package/dist/lib/output-schemas.js.map +1 -0
  226. package/dist/lib/triggers/new-file.d.ts +43 -0
  227. package/dist/lib/triggers/new-file.d.ts.map +1 -0
  228. package/dist/lib/triggers/new-file.js +107 -0
  229. package/dist/lib/triggers/new-file.js.map +1 -0
  230. package/dist/lib/triggers/new-folder.d.ts +39 -0
  231. package/dist/lib/triggers/new-folder.d.ts.map +1 -0
  232. package/dist/lib/triggers/new-folder.js +71 -0
  233. package/dist/lib/triggers/new-folder.js.map +1 -0
  234. package/package.json +49 -3
  235. package/src/index.ts +149 -0
  236. package/src/lib/action/add-permission.action.ts +82 -0
  237. package/src/lib/action/create-new-folder.ts +42 -0
  238. package/src/lib/action/create-new-text-file.ts +80 -0
  239. package/src/lib/action/delete-file.ts +33 -0
  240. package/src/lib/action/delete-permission.action.ts +84 -0
  241. package/src/lib/action/drive-copy-file.ts +86 -0
  242. package/src/lib/action/drive-create-comment.ts +61 -0
  243. package/src/lib/action/drive-create-file-from-text.ts +99 -0
  244. package/src/lib/action/drive-create-folder.ts +49 -0
  245. package/src/lib/action/drive-create-reply.ts +84 -0
  246. package/src/lib/action/drive-create-shared-drive.ts +52 -0
  247. package/src/lib/action/drive-delete-file.ts +36 -0
  248. package/src/lib/action/drive-delete-reply.ts +65 -0
  249. package/src/lib/action/drive-delete-shared-drive.ts +57 -0
  250. package/src/lib/action/drive-download-file.ts +38 -0
  251. package/src/lib/action/drive-empty-trash.ts +47 -0
  252. package/src/lib/action/drive-export-workspace-file.ts +129 -0
  253. package/src/lib/action/drive-get-about.ts +40 -0
  254. package/src/lib/action/drive-get-file.ts +40 -0
  255. package/src/lib/action/drive-get-reply.ts +67 -0
  256. package/src/lib/action/drive-get-shared-drive.ts +52 -0
  257. package/src/lib/action/drive-list-comments.ts +61 -0
  258. package/src/lib/action/drive-list-files.ts +238 -0
  259. package/src/lib/action/drive-list-permissions.ts +60 -0
  260. package/src/lib/action/drive-list-replies.ts +66 -0
  261. package/src/lib/action/drive-list-shared-drives.ts +59 -0
  262. package/src/lib/action/drive-move-file.ts +56 -0
  263. package/src/lib/action/drive-remove-permission.ts +75 -0
  264. package/src/lib/action/drive-replace-file-content.ts +71 -0
  265. package/src/lib/action/drive-save-file-as-pdf.ts +80 -0
  266. package/src/lib/action/drive-search-files.ts +127 -0
  267. package/src/lib/action/drive-set-public-access.ts +75 -0
  268. package/src/lib/action/drive-share-file.ts +69 -0
  269. package/src/lib/action/drive-trash-file.ts +41 -0
  270. package/src/lib/action/drive-untrash-file.ts +54 -0
  271. package/src/lib/action/drive-update-file-metadata.ts +82 -0
  272. package/src/lib/action/drive-update-permission.ts +100 -0
  273. package/src/lib/action/drive-update-reply.ts +73 -0
  274. package/src/lib/action/drive-update-shared-drive.ts +63 -0
  275. package/src/lib/action/drive-upload-file.ts +80 -0
  276. package/src/lib/action/drive-upload-from-url.ts +107 -0
  277. package/src/lib/action/duplicate-file.action.ts +82 -0
  278. package/src/lib/action/get-file-by-id.ts +37 -0
  279. package/src/lib/action/list-files.action.ts +214 -0
  280. package/src/lib/action/move-file.ts +48 -0
  281. package/src/lib/action/read-file.ts +28 -0
  282. package/src/lib/action/save-file-as-pdf.action.ts +76 -0
  283. package/src/lib/action/search-folder-or-file.action.ts +112 -0
  284. package/src/lib/action/send-to-trash.ts +38 -0
  285. package/src/lib/action/set-public-access.ts +68 -0
  286. package/src/lib/action/upload-file.ts +55 -0
  287. package/src/lib/auth.ts +79 -0
  288. package/src/lib/common/get-file-content.ts +109 -0
  289. package/src/lib/common/index.ts +182 -0
  290. package/src/lib/output-schemas.ts +2070 -0
  291. package/src/lib/triggers/new-file.ts +119 -0
  292. package/src/lib/triggers/new-folder.ts +78 -0
  293. package/README.md +0 -3
@@ -0,0 +1,7 @@
1
+ export declare const driveDeleteFile: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ file_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ }>;
7
+ //# sourceMappingURL=drive-delete-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-delete-file.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-delete-file.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;EA+B1B,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveDeleteFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-delete-file.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const drive_1 = require("@googleapis/drive");
10
+ exports.driveDeleteFile = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.googleDriveAuth,
12
+ name: 'drive_delete_file',
13
+ displayName: 'Delete File Permanently',
14
+ description: 'Permanently delete a Drive file by ID, bypassing the trash.',
15
+ audience: 'ai',
16
+ aiMetadata: {
17
+ description: 'Permanently deletes a file by ID, bypassing the trash — unrecoverable. Use only when permanent removal is intended; for reversible deletion prefer drive_trash_file. A repeat call fails because the file no longer exists.',
18
+ idempotent: false,
19
+ },
20
+ props: {
21
+ file_id: pieces_framework_1.Property.ShortText({
22
+ displayName: 'File ID',
23
+ description: 'The ID of the file to permanently delete. Resolve it via drive_search_files or drive_get_file.',
24
+ required: true,
25
+ }),
26
+ },
27
+ run(context) {
28
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
30
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
31
+ const response = yield drive.files.delete({
32
+ fileId: context.propsValue.file_id,
33
+ supportsAllDrives: true,
34
+ });
35
+ return response.data;
36
+ });
37
+ },
38
+ });
39
+ //# sourceMappingURL=drive-delete-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-delete-file.js","sourceRoot":"","sources":["../../../src/lib/action/drive-delete-file.ts"],"names":[],"mappings":";;;;AAAA,+GAA+G;AAC/G,qEAAqE;AACrE,gEAAmE;AACnE,kCAA8D;AAC9D,6CAAyD;AAE5C,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,6DAA6D;IAC1E,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,6NAA6N;QAC/N,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EACT,gGAAgG;YAClG,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1D,MAAM,KAAK,GAAG,IAAA,aAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE/D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;gBACxC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;gBAClC,iBAAiB,EAAE,IAAI;aACxB,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const driveDeleteReply: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ file_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ comment_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
7
+ reply_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
8
+ }>;
9
+ //# sourceMappingURL=drive-delete-reply.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-delete-reply.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-delete-reply.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;EA2D3B,CAAC"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveDeleteReply = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-delete-reply.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const drive_1 = require("@googleapis/drive");
10
+ const output_schemas_1 = require("../output-schemas");
11
+ exports.driveDeleteReply = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_delete_reply',
14
+ displayName: 'Delete Reply',
15
+ description: 'Permanently delete a reply on a Drive comment by ID.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Permanently deletes a reply by ID (resolve via drive_list_replies). Use to remove a reply you control; to edit it instead use drive_update_reply. A repeat call fails because the reply is already gone, so it is not safe to retry blindly.',
19
+ idempotent: false,
20
+ },
21
+ outputSchema: output_schemas_1.driveDeleteReplyOutputSchema,
22
+ props: {
23
+ file_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'File ID',
25
+ description: 'The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.',
26
+ required: true,
27
+ }),
28
+ comment_id: pieces_framework_1.Property.ShortText({
29
+ displayName: 'Comment ID',
30
+ description: 'The ID of the parent comment. Resolve it via drive_list_comments.',
31
+ required: true,
32
+ }),
33
+ reply_id: pieces_framework_1.Property.ShortText({
34
+ displayName: 'Reply ID',
35
+ description: 'The ID of the reply to delete. Resolve it via drive_list_replies.',
36
+ required: true,
37
+ }),
38
+ },
39
+ run(context) {
40
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+ const { file_id, comment_id, reply_id } = context.propsValue;
42
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
43
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
44
+ try {
45
+ yield drive.replies.delete({
46
+ fileId: file_id,
47
+ commentId: comment_id,
48
+ replyId: reply_id,
49
+ });
50
+ return { success: true, reply_id };
51
+ }
52
+ catch (error) {
53
+ if (error.code === 404) {
54
+ throw new Error(`File, comment, or reply not found (file ID: ${file_id}, comment ID: ${comment_id}, reply ID: ${reply_id}). It may already be deleted. Resolve the reply ID via drive_list_replies.`);
55
+ }
56
+ if (error.code === 403) {
57
+ throw new Error(`Permission denied deleting reply ${reply_id} on file ${file_id}. You can only delete your own replies.`);
58
+ }
59
+ throw error;
60
+ }
61
+ });
62
+ },
63
+ });
64
+ //# sourceMappingURL=drive-delete-reply.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-delete-reply.js","sourceRoot":"","sources":["../../../src/lib/action/drive-delete-reply.ts"],"names":[],"mappings":";;;;AAAA,gHAAgH;AAChH,qEAAqE;AACrE,gEAAmE;AACnE,kCAA8D;AAC9D,6CAAyD;AACzD,sDAAiE;AAEpD,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,sDAAsD;IACnE,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,8OAA8O;QAChP,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,6CAA4B;IAC1C,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EACT,iGAAiG;YACnG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,mEAAmE;YAChF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,mEAAmE;YAChF,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE7D,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1D,MAAM,KAAK,GAAG,IAAA,aAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE/D,IAAI,CAAC;gBACH,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;oBACzB,MAAM,EAAE,OAAO;oBACf,SAAS,EAAE,UAAU;oBACrB,OAAO,EAAE,QAAQ;iBAClB,CAAC,CAAC;gBAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YACrC,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,+CAA+C,OAAO,iBAAiB,UAAU,eAAe,QAAQ,4EAA4E,CACrL,CAAC;gBACJ,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,oCAAoC,QAAQ,YAAY,OAAO,yCAAyC,CACzG,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const driveDeleteSharedDrive: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ drive_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ }>;
7
+ //# sourceMappingURL=drive-delete-shared-drive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-delete-shared-drive.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-delete-shared-drive.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;;EAmDjC,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveDeleteSharedDrive = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-delete-shared-drive.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const drive_1 = require("@googleapis/drive");
10
+ const output_schemas_1 = require("../output-schemas");
11
+ exports.driveDeleteSharedDrive = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_delete_shared_drive',
14
+ displayName: 'Delete Shared Drive',
15
+ description: 'Permanently delete a shared drive by ID.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Permanently deletes a shared drive by ID (it must already be empty). Irreversible. Use only to remove a no-longer-needed shared drive. A repeat call fails because the drive no longer exists.',
19
+ idempotent: false,
20
+ },
21
+ outputSchema: output_schemas_1.driveDeleteSharedDriveOutputSchema,
22
+ props: {
23
+ drive_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'Shared Drive ID',
25
+ description: 'The ID of the shared drive to delete. Resolve it via drive_list_shared_drives.',
26
+ required: true,
27
+ }),
28
+ },
29
+ run(context) {
30
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
+ const { drive_id } = context.propsValue;
32
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
33
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
34
+ try {
35
+ yield drive.drives.delete({
36
+ driveId: drive_id,
37
+ });
38
+ return { deleted: true, driveId: drive_id };
39
+ }
40
+ catch (error) {
41
+ if (error.code === 404) {
42
+ throw new Error(`Shared drive not found (ID: ${drive_id}). It may have already been deleted. Resolve a valid ID via drive_list_shared_drives.`);
43
+ }
44
+ if (error.code === 400) {
45
+ throw new Error(`Cannot delete shared drive ${drive_id}: it must be empty before deletion. Remove or trash all of its files first.`);
46
+ }
47
+ if (error.code === 403) {
48
+ throw new Error(`Permission denied deleting shared drive ${drive_id}. You must be an organizer of this drive.`);
49
+ }
50
+ throw error;
51
+ }
52
+ });
53
+ },
54
+ });
55
+ //# sourceMappingURL=drive-delete-shared-drive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-delete-shared-drive.js","sourceRoot":"","sources":["../../../src/lib/action/drive-delete-shared-drive.ts"],"names":[],"mappings":";;;;AAAA,uHAAuH;AACvH,qEAAqE;AACrE,gEAAmE;AACnE,kCAA8D;AAC9D,6CAAyD;AACzD,sDAAuE;AAE1D,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,0CAA0C;IACvD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,gMAAgM;QAClM,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,mDAAkC;IAChD,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,gFAAgF;YAC7F,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAExC,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1D,MAAM,KAAK,GAAG,IAAA,aAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE/D,IAAI,CAAC;gBACH,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;oBACxB,OAAO,EAAE,QAAQ;iBAClB,CAAC,CAAC;gBAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;YAC9C,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,+BAA+B,QAAQ,uFAAuF,CAC/H,CAAC;gBACJ,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,8BAA8B,QAAQ,6EAA6E,CACpH,CAAC;gBACJ,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,2CAA2C,QAAQ,2CAA2C,CAC/F,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const driveDownloadFile: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ file_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ destination_file_name: import("@agnocon/pieces-framework").ShortTextProperty<false>;
7
+ }>;
8
+ //# sourceMappingURL=drive-download-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-download-file.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-download-file.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB;;;;;;EAgC5B,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveDownloadFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-download-file.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const auth_1 = require("../auth");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const get_file_content_1 = require("../common/get-file-content");
10
+ const output_schemas_1 = require("../output-schemas");
11
+ exports.driveDownloadFile = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_download_file',
14
+ displayName: 'Download File Content',
15
+ description: 'Read a selected file from google drive file',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: "Downloads a Drive file's bytes by ID and returns a file reference; native Google files (Docs/Sheets/Slides) are auto-exported to their default Office format. Use to retrieve content of a file you have the ID for (obtain it from `drive_search_files` or `drive_get_file`). Read-only.",
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveDownloadFileOutputSchema,
22
+ props: {
23
+ file_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'File ID',
25
+ description: 'The ID of the file to download. Resolve it via `drive_search_files` or `drive_get_file`.',
26
+ required: true,
27
+ }),
28
+ destination_file_name: pieces_framework_1.Property.ShortText({
29
+ displayName: 'Destination File name',
30
+ required: false,
31
+ }),
32
+ },
33
+ run: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, files }) {
34
+ return (0, get_file_content_1.downloadFileFromDrive)(auth, files, propsValue.file_id, propsValue.destination_file_name);
35
+ }),
36
+ });
37
+ //# sourceMappingURL=drive-download-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-download-file.js","sourceRoot":"","sources":["../../../src/lib/action/drive-download-file.ts"],"names":[],"mappings":";;;;AAAA,iHAAiH;AACjH,qEAAqE;AACrE,kCAA0C;AAC1C,gEAAmE;AACnE,iEAAmE;AACnE,sDAAkE;AAErD,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,2RAA2R;QAC7R,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,8CAA6B;IAC3C,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EACT,0FAA0F;YAC5F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,qBAAqB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxC,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACD,GAAG,EAAE,KAAoC,EAAE,oDAA/B,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;QACrC,OAAO,IAAA,wCAAqB,EAC1B,IAAI,EACJ,KAAK,EACL,UAAU,CAAC,OAAO,EAClB,UAAU,CAAC,qBAAqB,CACjC,CAAC;IACJ,CAAC,CAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const driveEmptyTrash: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ drive_id: import("@agnocon/pieces-framework").ShortTextProperty<false>;
6
+ }>;
7
+ //# sourceMappingURL=drive-empty-trash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-empty-trash.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-empty-trash.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe;;;;;EAyC1B,CAAC"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveEmptyTrash = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-empty-trash.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const drive_1 = require("@googleapis/drive");
10
+ const output_schemas_1 = require("../output-schemas");
11
+ exports.driveEmptyTrash = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_empty_trash',
14
+ displayName: 'Empty Trash',
15
+ description: 'Permanently delete ALL files in the trash (irreversible, account-wide).',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'DESTRUCTIVE: permanently deletes EVERY file currently in the trash — this is an irreversible, account-wide purge (not a single file), or scoped to one shared drive if `drive_id` is given. The entire trash is emptied, so any file the user trashed is gone for good. Use only as a deliberate cleanup step; to remove a single file reversibly use `drive_trash_file`, and to permanently remove one specific file use `drive_delete_file`. Not safe to retry casually — it purges whatever is in the trash at call time.',
19
+ idempotent: false,
20
+ },
21
+ outputSchema: output_schemas_1.driveEmptyTrashOutputSchema,
22
+ props: {
23
+ drive_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'Shared Drive ID',
25
+ description: 'Optional. Restrict the purge to a single shared drive\'s trash (resolve via drive_list_shared_drives). Leave empty to empty the entire My Drive trash for the connected account.',
26
+ required: false,
27
+ }),
28
+ },
29
+ run(context) {
30
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
+ const { drive_id } = context.propsValue;
32
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
33
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
34
+ try {
35
+ yield drive.files.emptyTrash(Object.assign({}, (drive_id ? { driveId: drive_id } : {})));
36
+ return { success: true, driveId: drive_id !== null && drive_id !== void 0 ? drive_id : null };
37
+ }
38
+ catch (error) {
39
+ if (error.code === 403) {
40
+ throw new Error('Permission denied emptying the trash. You may lack permission to empty this trash.');
41
+ }
42
+ throw error;
43
+ }
44
+ });
45
+ },
46
+ });
47
+ //# sourceMappingURL=drive-empty-trash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-empty-trash.js","sourceRoot":"","sources":["../../../src/lib/action/drive-empty-trash.ts"],"names":[],"mappings":";;;;AAAA,+GAA+G;AAC/G,qEAAqE;AACrE,gEAAmE;AACnE,kCAA8D;AAC9D,6CAAyD;AACzD,sDAAgE;AAEnD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,yEAAyE;IACtF,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,8fAA8f;QAChgB,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,4CAA2B;IACzC,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EACT,kLAAkL;YACpL,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAExC,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,KAAK,GAAG,IAAA,aAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE/D,IAAI,CAAC;gBACH,MAAM,KAAK,CAAC,KAAK,CAAC,UAAU,mBACvB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC1C,CAAC;gBAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,EAAE,CAAC;YACtD,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,oFAAoF,CACrF,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const driveExportWorkspaceFile: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ file_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ mime_type: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
7
+ }>;
8
+ //# sourceMappingURL=drive-export-workspace-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-export-workspace-file.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-export-workspace-file.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,wBAAwB;;;;;;EA0HnC,CAAC"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveExportWorkspaceFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-export-workspace-file.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const drive_1 = require("@googleapis/drive");
10
+ const mime_types_1 = require("mime-types");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.driveExportWorkspaceFile = (0, pieces_framework_1.createAction)({
13
+ auth: auth_1.googleDriveAuth,
14
+ name: 'drive_export_workspace_file',
15
+ displayName: 'Export Google Doc/Sheet/Slides',
16
+ description: 'Export a native Google Workspace file (Doc/Sheet/Slides) to a chosen format.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: 'Exports a native Google Workspace file (Doc/Sheet/Slides) to a caller-chosen format and returns the bytes. Use when you need a specific format such as PDF, HTML, CSV, or Markdown; for the default rendition or for ordinary binary files use `drive_download_file`. The chosen format must match the source type (Doc formats for a Doc, Sheet formats for a Sheet, etc.). Read-only. Export size is capped at ~10 MB by Drive.',
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.driveExportWorkspaceFileOutputSchema,
23
+ props: {
24
+ file_id: pieces_framework_1.Property.ShortText({
25
+ displayName: 'File ID',
26
+ description: 'The ID of the native Google Workspace file to export. Resolve it via `drive_search_files` or `drive_get_file`.',
27
+ required: true,
28
+ }),
29
+ mime_type: pieces_framework_1.Property.StaticDropdown({
30
+ displayName: 'Export Format',
31
+ description: 'The target format. It must match the source type: Doc formats for a Google Doc, Sheet formats for a Google Sheet, Slides formats for Google Slides. An incompatible pairing returns an error.',
32
+ required: true,
33
+ options: {
34
+ options: [
35
+ // Google Docs
36
+ {
37
+ label: 'Word (DOCX) — Docs',
38
+ value: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
39
+ },
40
+ { label: 'PDF — Docs/Sheets/Slides', value: 'application/pdf' },
41
+ { label: 'HTML — Docs', value: 'text/html' },
42
+ { label: 'Plain Text (TXT) — Docs', value: 'text/plain' },
43
+ { label: 'Rich Text (RTF) — Docs', value: 'application/rtf' },
44
+ {
45
+ label: 'OpenDocument Text (ODT) — Docs',
46
+ value: 'application/vnd.oasis.opendocument.text',
47
+ },
48
+ { label: 'EPUB — Docs', value: 'application/epub+zip' },
49
+ { label: 'Markdown (MD) — Docs', value: 'text/markdown' },
50
+ // Google Sheets
51
+ {
52
+ label: 'Excel (XLSX) — Sheets',
53
+ value: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
54
+ },
55
+ { label: 'CSV — Sheets', value: 'text/csv' },
56
+ { label: 'TSV — Sheets', value: 'text/tab-separated-values' },
57
+ {
58
+ label: 'OpenDocument Spreadsheet (ODS) — Sheets',
59
+ value: 'application/vnd.oasis.opendocument.spreadsheet',
60
+ },
61
+ // Google Slides
62
+ {
63
+ label: 'PowerPoint (PPTX) — Slides',
64
+ value: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
65
+ },
66
+ {
67
+ label: 'OpenDocument Presentation (ODP) — Slides',
68
+ value: 'application/vnd.oasis.opendocument.presentation',
69
+ },
70
+ { label: 'PNG — Slides', value: 'image/png' },
71
+ { label: 'SVG — Slides', value: 'image/svg+xml' },
72
+ ],
73
+ },
74
+ }),
75
+ },
76
+ run(context) {
77
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
78
+ var _a, _b, _c, _d, _e, _f, _g, _h;
79
+ const { file_id, mime_type } = context.propsValue;
80
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
81
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
82
+ try {
83
+ const result = yield drive.files.export({
84
+ fileId: file_id,
85
+ mimeType: mime_type,
86
+ }, {
87
+ responseType: 'arraybuffer',
88
+ });
89
+ const extensionResult = (0, mime_types_1.extension)(mime_type);
90
+ const fileExtension = extensionResult ? '.' + extensionResult : '';
91
+ return context.files.write({
92
+ fileName: file_id + fileExtension,
93
+ data: Buffer.from(result.data),
94
+ });
95
+ }
96
+ catch (error) {
97
+ // exportSizeLimitExceeded is a 403 but distinct from a permission denial.
98
+ const reason = (_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.errors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.reason) !== null && _c !== void 0 ? _c : (_h = (_g = (_f = (_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.errors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.reason;
99
+ if (reason === 'exportSizeLimitExceeded') {
100
+ throw new Error(`Export failed: the file exceeds Drive's ~10 MB export size limit (file ID: ${file_id}). Use drive_download_file to fetch the source directly instead.`);
101
+ }
102
+ if (error.code === 403) {
103
+ throw new Error(`Permission denied exporting file ${file_id}. You may lack access to this file.`);
104
+ }
105
+ if (error.code === 400) {
106
+ throw new Error(`Invalid export for file ${file_id}: the chosen format does not match the source type, or this is not a native Google Workspace file. Use drive_download_file for ordinary binary files.`);
107
+ }
108
+ if (error.code === 404) {
109
+ throw new Error(`File not found (ID: ${file_id}). Resolve a valid ID via drive_search_files or drive_get_file.`);
110
+ }
111
+ throw error;
112
+ }
113
+ });
114
+ },
115
+ });
116
+ //# sourceMappingURL=drive-export-workspace-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-export-workspace-file.js","sourceRoot":"","sources":["../../../src/lib/action/drive-export-workspace-file.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ export declare const driveGetAbout: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {}>;
5
+ //# sourceMappingURL=drive-get-about.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-about.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-get-about.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;UAkCxB,CAAC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveGetAbout = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-get-about.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const drive_1 = require("@googleapis/drive");
10
+ const output_schemas_1 = require("../output-schemas");
11
+ exports.driveGetAbout = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_get_about',
14
+ displayName: 'Get Account & Storage Info',
15
+ description: 'Get the authenticated Drive account, storage quota, and supported formats.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Returns the authenticated user\'s Drive info: account identity, storage quota and usage, and supported import/export formats. Use to check available space before a large upload, confirm which account is connected, or look up valid export MIME types. Read-only.',
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveGetAboutOutputSchema,
22
+ props: {},
23
+ run(context) {
24
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
26
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
27
+ try {
28
+ // about.get requires a fields parameter or the API returns 400.
29
+ const response = yield drive.about.get({
30
+ fields: 'user,storageQuota,maxImportSizes,exportFormats',
31
+ });
32
+ return response.data;
33
+ }
34
+ catch (error) {
35
+ if (error.code === 403) {
36
+ throw new Error('Permission denied fetching Drive account info. The connection may lack the required Drive scope.');
37
+ }
38
+ throw error;
39
+ }
40
+ });
41
+ },
42
+ });
43
+ //# sourceMappingURL=drive-get-about.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-about.js","sourceRoot":"","sources":["../../../src/lib/action/drive-get-about.ts"],"names":[],"mappings":";;;;AAAA,6GAA6G;AAC7G,qEAAqE;AACrE,gEAAyD;AACzD,kCAA8D;AAC9D,6CAAyD;AACzD,sDAA8D;AAEjD,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,4BAA4B;IACzC,WAAW,EAAE,4EAA4E;IACzF,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,sQAAsQ;QACxQ,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,0CAAyB;IACvC,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,OAAO;;YACf,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1D,MAAM,KAAK,GAAG,IAAA,aAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAE/D,IAAI,CAAC;gBACH,gEAAgE;gBAChE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;oBACrC,MAAM,EAAE,gDAAgD;iBACzD,CAAC,CAAC;gBAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,kGAAkG,CACnG,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const driveGetFile: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ file_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ }>;
7
+ //# sourceMappingURL=drive-get-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-file.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-get-file.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY;;;;;EAkCvB,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveGetFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-get-file.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const auth_1 = require("../auth");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const drive_1 = require("@googleapis/drive");
10
+ const output_schemas_1 = require("../output-schemas");
11
+ exports.driveGetFile = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_get_file',
14
+ displayName: 'Get File or Folder',
15
+ description: 'Get a file folder for files/sub-folders',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Fetches metadata for a single file or folder by its exact ID (name, MIME type, parents, owners, links). Use when you already have an ID (e.g. from a trigger or `drive_search_files`) and need its details, including its parent folder IDs. Read-only and safe to retry.',
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveGetFileOutputSchema,
22
+ props: {
23
+ file_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'File / Folder ID',
25
+ description: 'The ID of the file/folder to fetch. Resolve it via `drive_search_files` or `drive_list_files`.',
26
+ required: true,
27
+ }),
28
+ },
29
+ run(context) {
30
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
32
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
33
+ const response = yield drive.files.get({
34
+ fileId: context.propsValue.file_id,
35
+ supportsAllDrives: true,
36
+ });
37
+ if (response.data) {
38
+ return response.data;
39
+ }
40
+ else {
41
+ return null;
42
+ }
43
+ });
44
+ },
45
+ });
46
+ //# sourceMappingURL=drive-get-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-file.js","sourceRoot":"","sources":["../../../src/lib/action/drive-get-file.ts"],"names":[],"mappings":";;;;AAAA,4GAA4G;AAC5G,qEAAqE;AACrE,kCAA8D;AAC9D,gEAAmE;AACnE,6CAAyD;AACzD,sDAA6D;AAEhD,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,yCAAyC;IACtD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,2QAA2Q;QAC7Q,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,yCAAwB;IACtC,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EACT,gGAAgG;YAClG,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,KAAK,GAAG,IAAA,aAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;gBACrC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;gBAClC,iBAAiB,EAAE,IAAI;aACxB,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAClB,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const driveGetReply: import("@agnocon/pieces-framework").IAction<(import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props> | import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ serviceAccount: import("@agnocon/pieces-framework").LongTextProperty<true>;
3
+ userEmail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ }>)[], {
5
+ file_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ comment_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
7
+ reply_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
8
+ }>;
9
+ //# sourceMappingURL=drive-get-reply.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-reply.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-get-reply.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;;;;EA6DxB,CAAC"}