@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,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveGetReply = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-get-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.driveGetReply = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_get_reply',
14
+ displayName: 'Get Reply',
15
+ description: 'Fetch a single reply on a Drive comment by ID.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Fetches a single reply by ID, including its author, content, and action. Use when you already have a replyId (resolve it via drive_list_replies) and need that one reply\'s details. Read-only.',
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveGetReplyOutputSchema,
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 fetch. 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
+ // The Drive replies endpoints require a fields parameter or the API returns 400.
46
+ const response = yield drive.replies.get({
47
+ fileId: file_id,
48
+ commentId: comment_id,
49
+ replyId: reply_id,
50
+ fields: '*',
51
+ });
52
+ return response.data;
53
+ }
54
+ catch (error) {
55
+ if (error.code === 404) {
56
+ throw new Error(`File, comment, or reply not found (file ID: ${file_id}, comment ID: ${comment_id}, reply ID: ${reply_id}). Resolve the reply ID via drive_list_replies.`);
57
+ }
58
+ if (error.code === 403) {
59
+ throw new Error(`Permission denied fetching reply ${reply_id} on file ${file_id}. You may lack access to this file.`);
60
+ }
61
+ throw error;
62
+ }
63
+ });
64
+ },
65
+ });
66
+ //# sourceMappingURL=drive-get-reply.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-reply.js","sourceRoot":"","sources":["../../../src/lib/action/drive-get-reply.ts"],"names":[],"mappings":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oBACrB,OAAO,EAAE,QAAQ;oBACjB,MAAM,EAAE,GAAG;iBACZ,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,+CAA+C,OAAO,iBAAiB,UAAU,eAAe,QAAQ,iDAAiD,CAC1J,CAAC;gBACJ,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,oCAAoC,QAAQ,YAAY,OAAO,qCAAqC,CACrG,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const driveGetSharedDrive: 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-get-shared-drive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-shared-drive.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-get-shared-drive.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;EA8C9B,CAAC"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveGetSharedDrive = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-get-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.driveGetSharedDrive = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_get_shared_drive',
14
+ displayName: 'Get Shared Drive',
15
+ description: 'Fetch metadata for one shared drive by ID.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Fetches metadata and capabilities for one shared drive by ID (resolve the ID via drive_list_shared_drives). Use to inspect a shared drive\'s settings before modifying it. Read-only.',
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveGetSharedDriveOutputSchema,
22
+ props: {
23
+ drive_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'Shared Drive ID',
25
+ description: 'The ID of the shared drive. 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
+ const response = yield drive.drives.get({
36
+ driveId: drive_id,
37
+ });
38
+ return response.data;
39
+ }
40
+ catch (error) {
41
+ if (error.code === 404) {
42
+ throw new Error(`Shared drive not found (ID: ${drive_id}). Resolve a valid ID via drive_list_shared_drives.`);
43
+ }
44
+ if (error.code === 403) {
45
+ throw new Error(`Permission denied accessing shared drive ${drive_id}. You may not be a member of this drive.`);
46
+ }
47
+ throw error;
48
+ }
49
+ });
50
+ },
51
+ });
52
+ //# sourceMappingURL=drive-get-shared-drive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-get-shared-drive.js","sourceRoot":"","sources":["../../../src/lib/action/drive-get-shared-drive.ts"],"names":[],"mappings":";;;;A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CAA4C,QAAQ,0CAA0C,CAC/F,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const driveListComments: 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-list-comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-comments.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-list-comments.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB;;;;;EAuD5B,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveListComments = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-list-comments.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.driveListComments = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_list_comments',
14
+ displayName: 'List Comments',
15
+ description: 'List the comments on a Drive file.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Lists the comments on a file with each comment\'s id, author, content, and resolved state. Use to read discussion on a file or to resolve a commentId before replying (drive_create_reply) or listing its replies (drive_list_replies). Read-only.',
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveListCommentsOutputSchema,
22
+ props: {
23
+ file_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'File ID',
25
+ description: 'The ID of the file whose comments to list. Resolve it via drive_search_files or drive_get_file.',
26
+ required: true,
27
+ }),
28
+ },
29
+ run(context) {
30
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
+ var _a;
32
+ const { file_id } = context.propsValue;
33
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
34
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
35
+ try {
36
+ // The Drive comments endpoints require a fields parameter or the API returns 400.
37
+ const response = yield drive.comments.list({
38
+ fileId: file_id,
39
+ fields: '*',
40
+ includeDeleted: false,
41
+ });
42
+ const comments = (_a = response.data.comments) !== null && _a !== void 0 ? _a : [];
43
+ return {
44
+ comments,
45
+ count: comments.length,
46
+ };
47
+ }
48
+ catch (error) {
49
+ if (error.code === 404) {
50
+ throw new Error(`File not found (ID: ${file_id}). Resolve a valid ID via drive_search_files or drive_get_file.`);
51
+ }
52
+ if (error.code === 403) {
53
+ throw new Error(`Permission denied listing comments for file ${file_id}. You may lack access to this file.`);
54
+ }
55
+ throw error;
56
+ }
57
+ });
58
+ },
59
+ });
60
+ //# sourceMappingURL=drive-list-comments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-comments.js","sourceRoot":"","sources":["../../../src/lib/action/drive-list-comments.ts"],"names":[],"mappings":";;;;AAAA,iHAAiH;AACjH,qEAAqE;AACrE,gEAAmE;AACnE,kCAA8D;AAC9D,6CAAyD;AACzD,sDAAkE;AAErD,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,oCAAoC;IACjD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,oPAAoP;QACtP,UAAU,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
+ export declare const driveListFiles: 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
+ folder_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ include_trashed: import("@agnocon/pieces-framework").CheckboxProperty<false>;
7
+ depth_level: import("@agnocon/pieces-framework").NumberProperty<false>;
8
+ download_files: import("@agnocon/pieces-framework").CheckboxProperty<false>;
9
+ include_team_drives: import("@agnocon/pieces-framework").CheckboxProperty<false>;
10
+ }>;
11
+ //# sourceMappingURL=drive-list-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-files.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-list-files.ts"],"names":[],"mappings":"AA+GA,eAAO,MAAM,cAAc;;;;;;;;;EAgIzB,CAAC"}
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveListFiles = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-list-files.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_common_1 = require("@agnocon/pieces-common");
8
+ const auth_1 = require("../auth");
9
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
10
+ const querystring_1 = tslib_1.__importDefault(require("querystring"));
11
+ const get_file_content_1 = require("../common/get-file-content");
12
+ const output_schemas_1 = require("../output-schemas");
13
+ function getFilesRecursively(auth_2, folderId_1, maxLevel_1, includeTrashed_1, includeTeamDrives_1) {
14
+ return tslib_1.__awaiter(this, arguments, void 0, function* (auth, folderId, maxLevel, includeTrashed, includeTeamDrives, currentLevel = 0) {
15
+ const files = [];
16
+ if (currentLevel > maxLevel) {
17
+ return files;
18
+ }
19
+ const accessToken = yield (0, auth_1.getAccessToken)(auth);
20
+ let q = `'${folderId}' in parents`;
21
+ if (!includeTrashed) {
22
+ q += ' and trashed=false';
23
+ }
24
+ const params = {
25
+ q: q,
26
+ fields: 'nextPageToken,files(id,kind,mimeType,name,trashed,parents)',
27
+ supportsAllDrives: 'true',
28
+ includeItemsFromAllDrives: includeTeamDrives ? 'true' : 'false',
29
+ corpora: includeTeamDrives ? 'allDrives' : 'user',
30
+ pageSize: '1000',
31
+ };
32
+ let response = yield pieces_common_1.httpClient.sendRequest({
33
+ method: pieces_common_1.HttpMethod.GET,
34
+ url: `https://www.googleapis.com/drive/v3/files?${querystring_1.default.stringify(params)}`,
35
+ headers: {
36
+ Authorization: `Bearer ${accessToken}`,
37
+ },
38
+ });
39
+ // Add files from current level
40
+ for (const file of response.body.files) {
41
+ files.push({
42
+ file,
43
+ level: currentLevel,
44
+ parentFolder: folderId,
45
+ });
46
+ }
47
+ // Handle pagination for current level
48
+ while (response.body.nextPageToken) {
49
+ params.pageToken = response.body.nextPageToken;
50
+ response = yield pieces_common_1.httpClient.sendRequest({
51
+ method: pieces_common_1.HttpMethod.GET,
52
+ url: `https://www.googleapis.com/drive/v3/files?${querystring_1.default.stringify(params)}`,
53
+ headers: {
54
+ Authorization: `Bearer ${accessToken}`,
55
+ },
56
+ });
57
+ for (const file of response.body.files) {
58
+ files.push({
59
+ file,
60
+ level: currentLevel,
61
+ parentFolder: folderId,
62
+ });
63
+ }
64
+ }
65
+ // If we haven't reached max level, recursively get files from subfolders
66
+ if (currentLevel + 1 < maxLevel) {
67
+ const subfolders = files.filter((f) => f.file.mimeType === 'application/vnd.google-apps.folder');
68
+ for (const subfolder of subfolders) {
69
+ const subfolderFiles = yield getFilesRecursively(auth, subfolder.file.id, maxLevel, includeTrashed, includeTeamDrives, currentLevel + 1);
70
+ files.push(...subfolderFiles);
71
+ }
72
+ }
73
+ return files;
74
+ });
75
+ }
76
+ exports.driveListFiles = (0, pieces_framework_1.createAction)({
77
+ auth: auth_1.googleDriveAuth,
78
+ name: 'drive_list_files',
79
+ displayName: 'List Folder Contents',
80
+ description: 'List files from a Google Drive folder',
81
+ audience: 'ai',
82
+ aiMetadata: {
83
+ description: 'Lists files and subfolders inside a given folder ID, optionally recursing to a chosen depth and downloading each file\'s content. Use to enumerate the contents of a known folder; to find a file by name across Drive use `drive_search_files`. Read-only. Requires the folder ID, not a name.',
84
+ idempotent: true,
85
+ },
86
+ outputSchema: output_schemas_1.driveListFilesOutputSchema,
87
+ props: {
88
+ folder_id: pieces_framework_1.Property.ShortText({
89
+ displayName: 'Folder ID',
90
+ description: 'The ID of the folder to list. Resolve it via `drive_search_files` (or any other source).',
91
+ required: true,
92
+ }),
93
+ include_trashed: pieces_framework_1.Property.Checkbox({
94
+ displayName: 'Include Trashed',
95
+ description: 'Include new files that have been trashed.',
96
+ required: false,
97
+ defaultValue: false,
98
+ }),
99
+ depth_level: pieces_framework_1.Property.Number({
100
+ displayName: 'Depth Level',
101
+ description: 'How many levels deep to search for files. 1 = current folder only, 2 = current + next level, etc.',
102
+ required: false,
103
+ defaultValue: 1,
104
+ }),
105
+ download_files: pieces_framework_1.Property.Checkbox({
106
+ displayName: 'Download Files',
107
+ description: 'Download all file contents in a list',
108
+ required: false,
109
+ defaultValue: false,
110
+ }),
111
+ include_team_drives: pieces_framework_1.Property.Checkbox({
112
+ displayName: 'Include Team Drives',
113
+ description: 'Determines if folders from Team Drives should be included in the results.',
114
+ defaultValue: false,
115
+ required: false,
116
+ }),
117
+ },
118
+ run(context) {
119
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
120
+ var _a, _b;
121
+ const result = {
122
+ type: 'drive#fileList',
123
+ incompleteSearch: false,
124
+ files: [],
125
+ };
126
+ const depthLevel = context.propsValue.depth_level || 1;
127
+ // Get files recursively based on depth level
128
+ const filesWithLevel = yield getFilesRecursively(context.auth, context.propsValue.folder_id, depthLevel, (_a = context.propsValue.include_trashed) !== null && _a !== void 0 ? _a : false, (_b = context.propsValue.include_team_drives) !== null && _b !== void 0 ? _b : false);
129
+ // Extract just the file objects for backward compatibility
130
+ result.files = filesWithLevel.map((f) => f.file);
131
+ // If downloadFiles is enabled, download each file and add URLs to array
132
+ if (context.propsValue.download_files) {
133
+ const downloadedFiles = [];
134
+ const extensionMap = {
135
+ 'application/pdf': '.pdf',
136
+ 'image/jpeg': '.jpg',
137
+ 'image/png': '.png',
138
+ 'image/tiff': '.tiff',
139
+ 'text/plain': '.txt',
140
+ 'text/csv': '.csv',
141
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',
142
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': '.xlsx',
143
+ };
144
+ for (const fileWithLevel of filesWithLevel) {
145
+ const file = fileWithLevel.file;
146
+ // Skip folders when downloading
147
+ if (file.mimeType === 'application/vnd.google-apps.folder') {
148
+ continue;
149
+ }
150
+ let safeName = file.name;
151
+ const correctExtension = extensionMap[file.mimeType];
152
+ if (correctExtension &&
153
+ !safeName.toLowerCase().endsWith(correctExtension)) {
154
+ // Check for the .jpeg edge case before appending .jpg
155
+ if (!(file.mimeType === 'image/jpeg' &&
156
+ safeName.toLowerCase().endsWith('.jpeg'))) {
157
+ safeName = safeName + correctExtension;
158
+ }
159
+ }
160
+ try {
161
+ const fileUrl = yield (0, get_file_content_1.downloadFileFromDrive)(context.auth, context.files, file.id, safeName);
162
+ downloadedFiles.push(fileUrl);
163
+ }
164
+ catch (error) {
165
+ console.warn(`Failed to download file ${file.name}: ${error instanceof Error ? error.message : 'Download failed'}`);
166
+ }
167
+ }
168
+ result.downloadedFiles = downloadedFiles;
169
+ }
170
+ return result;
171
+ });
172
+ },
173
+ });
174
+ //# sourceMappingURL=drive-list-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-files.js","sourceRoot":"","sources":["../../../src/lib/action/drive-list-files.ts"],"names":[],"mappings":";;;;AAAA,8GAA8G;AAC9G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E,CAAC,QAAQ,CAAC,OAAO,CAAC,CACzC,EACD,CAAC;4BACD,QAAQ,GAAG,QAAQ,GAAG,gBAAgB,CAAC;wBACzC,CAAC;oBACH,CAAC;oBAED,IAAI,CAAC;wBACH,MAAM,OAAO,GAAG,MAAM,IAAA,wCAAqB,EACzC,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,KAAK,EACb,IAAI,CAAC,EAAE,EACP,QAAQ,CACT,CAAC;wBACF,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChC,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACf,OAAO,CAAC,IAAI,CACV,2BAA2B,IAAI,CAAC,IAAI,KAClC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,iBAC3C,EAAE,CACH,CAAC;oBACJ,CAAC;gBACH,CAAC;gBACD,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;YAC3C,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const driveListPermissions: 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-list-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-permissions.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-list-permissions.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB;;;;;EAsD/B,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveListPermissions = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-list-permissions.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.driveListPermissions = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_list_permissions',
14
+ displayName: 'List Permissions',
15
+ description: 'List every permission on a Drive file or folder.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Lists every permission (who has access and at what role) on a file or folder, with each permission\'s id, type, role, and email/domain. Use to audit sharing before granting or revoking; it is the resolver for the permissionId other sharing atomics need. Read-only.',
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveListPermissionsOutputSchema,
22
+ props: {
23
+ file_id: pieces_framework_1.Property.ShortText({
24
+ displayName: 'File or Folder ID',
25
+ description: 'The ID of the file or folder whose permissions to list. Resolve it via drive_search_files or drive_get_file.',
26
+ required: true,
27
+ }),
28
+ },
29
+ run(context) {
30
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
+ var _a;
32
+ const { file_id } = context.propsValue;
33
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
34
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
35
+ try {
36
+ const response = yield drive.permissions.list({
37
+ fileId: file_id,
38
+ fields: 'permissions(id,type,role,emailAddress,domain)',
39
+ supportsAllDrives: true,
40
+ });
41
+ const permissions = (_a = response.data.permissions) !== null && _a !== void 0 ? _a : [];
42
+ return {
43
+ permissions,
44
+ count: permissions.length,
45
+ };
46
+ }
47
+ catch (error) {
48
+ if (error.code === 404) {
49
+ throw new Error(`File or folder not found (ID: ${file_id}). Resolve a valid ID via drive_search_files or drive_get_file.`);
50
+ }
51
+ if (error.code === 403) {
52
+ throw new Error(`Permission denied listing permissions for file ${file_id}. You may lack access to this resource.`);
53
+ }
54
+ throw error;
55
+ }
56
+ });
57
+ },
58
+ });
59
+ //# sourceMappingURL=drive-list-permissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-permissions.js","sourceRoot":"","sources":["../../../src/lib/action/drive-list-permissions.ts"],"names":[],"mappings":";;;;AAAA,oHAAoH;AACpH,qEAAqE;AACrE,gEAAmE;AACnE,kCAA8D;AAC9D,6CAAyD;AACzD,sDAAqE;AAExD,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,kDAAkD;IAC/D,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,0QAA0Q;QAC5Q,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,iDAAgC;IAC9C,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,mBAAmB;YAChC,WAAW,EACT,8GAA8G;YAChH,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEvC,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,QAAQ,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC;oBAC5C,MAAM,EAAE,OAAO;oBACf,MAAM,EAAE,+CAA+C;oBACvD,iBAAiB,EAAE,IAAI;iBACxB,CAAC,CAAC;gBAEH,MAAM,WAAW,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,mCAAI,EAAE,CAAC;gBAEpD,OAAO;oBACL,WAAW;oBACX,KAAK,EAAE,WAAW,CAAC,MAAM;iBAC1B,CAAC;YACJ,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,iCAAiC,OAAO,iEAAiE,CAC1G,CAAC;gBACJ,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,kDAAkD,OAAO,yCAAyC,CACnG,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const driveListReplies: 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
+ }>;
8
+ //# sourceMappingURL=drive-list-replies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-replies.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-list-replies.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;EA4D3B,CAAC"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.driveListReplies = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/google-drive/src/lib/action/drive-list-replies.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.driveListReplies = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.googleDriveAuth,
13
+ name: 'drive_list_replies',
14
+ displayName: 'List Replies',
15
+ description: 'List the replies under a Drive comment.',
16
+ audience: 'ai',
17
+ aiMetadata: {
18
+ description: 'Lists the replies under a given comment with each reply\'s id, author, content, and action. Use to read a comment thread or to resolve a replyId before fetching (drive_get_reply), editing (drive_update_reply), or deleting (drive_delete_reply) a reply. Read-only.',
19
+ idempotent: true,
20
+ },
21
+ outputSchema: output_schemas_1.driveListRepliesOutputSchema,
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 comment whose replies to list. Resolve it via drive_list_comments.',
31
+ required: true,
32
+ }),
33
+ },
34
+ run(context) {
35
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
36
+ var _a;
37
+ const { file_id, comment_id } = context.propsValue;
38
+ const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
39
+ const drive = (0, drive_1.drive)({ version: 'v3', auth: authClient });
40
+ try {
41
+ // The Drive replies endpoints require a fields parameter or the API returns 400.
42
+ const response = yield drive.replies.list({
43
+ fileId: file_id,
44
+ commentId: comment_id,
45
+ fields: '*',
46
+ });
47
+ const replies = (_a = response.data.replies) !== null && _a !== void 0 ? _a : [];
48
+ return {
49
+ replies,
50
+ count: replies.length,
51
+ };
52
+ }
53
+ catch (error) {
54
+ if (error.code === 404) {
55
+ throw new Error(`File or comment not found (file ID: ${file_id}, comment ID: ${comment_id}). Resolve the comment ID via drive_list_comments.`);
56
+ }
57
+ if (error.code === 403) {
58
+ throw new Error(`Permission denied listing replies for comment ${comment_id} on file ${file_id}. You may lack access to this file.`);
59
+ }
60
+ throw error;
61
+ }
62
+ });
63
+ },
64
+ });
65
+ //# sourceMappingURL=drive-list-replies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-replies.js","sourceRoot":"","sources":["../../../src/lib/action/drive-list-replies.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,yCAAyC;IACtD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,wQAAwQ;QAC1Q,UAAU,EAAE,IAAI;KACjB;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,kFAAkF;YAC/F,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEnD,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,iFAAiF;gBACjF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;oBACxC,MAAM,EAAE,OAAO;oBACf,SAAS,EAAE,UAAU;oBACrB,MAAM,EAAE,GAAG;iBACZ,CAAC,CAAC;gBAEH,MAAM,OAAO,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,mCAAI,EAAE,CAAC;gBAE5C,OAAO;oBACL,OAAO;oBACP,KAAK,EAAE,OAAO,CAAC,MAAM;iBACtB,CAAC;YACJ,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,uCAAuC,OAAO,iBAAiB,UAAU,oDAAoD,CAC9H,CAAC;gBACJ,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CACb,iDAAiD,UAAU,YAAY,OAAO,qCAAqC,CACpH,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const driveListSharedDrives: 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
+ query: import("@agnocon/pieces-framework").ShortTextProperty<false>;
6
+ page_size: import("@agnocon/pieces-framework").NumberProperty<false>;
7
+ }>;
8
+ //# sourceMappingURL=drive-list-shared-drives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive-list-shared-drives.d.ts","sourceRoot":"","sources":["../../../src/lib/action/drive-list-shared-drives.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB;;;;;;EAqDhC,CAAC"}