google-mcp-suite 1.5.0 → 1.7.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.
- package/README.md +14 -9
- package/dist/docs/entities/ParagraphStyle.d.ts +33 -0
- package/dist/docs/entities/ParagraphStyle.d.ts.map +1 -0
- package/dist/docs/entities/ParagraphStyle.js +37 -0
- package/dist/docs/entities/ParagraphStyle.js.map +1 -0
- package/dist/docs/entities/TextStyle.d.ts +29 -0
- package/dist/docs/entities/TextStyle.d.ts.map +1 -0
- package/dist/docs/entities/TextStyle.js +32 -0
- package/dist/docs/entities/TextStyle.js.map +1 -0
- package/dist/docs/instructions.d.ts.map +1 -1
- package/dist/docs/instructions.js +4 -0
- package/dist/docs/instructions.js.map +1 -1
- package/dist/docs/lib/batch.d.ts +1 -1
- package/dist/docs/lib/batch.js +1 -1
- package/dist/docs/lib/batch.js.map +1 -1
- package/dist/docs/methods/create_paragraph_bullets/handler.d.ts +5 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.js +8 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/index.d.ts +35 -0
- package/dist/docs/methods/create_paragraph_bullets/index.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/index.js +23 -0
- package/dist/docs/methods/create_paragraph_bullets/index.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts +32 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.js +30 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.d.ts +5 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.js +8 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.d.ts +18 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.js +23 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.d.ts +15 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.js +11 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.js.map +1 -0
- package/dist/docs/methods/registry.d.ts +96 -3
- package/dist/docs/methods/registry.d.ts.map +1 -1
- package/dist/docs/methods/registry.js +12 -3
- package/dist/docs/methods/registry.js.map +1 -1
- package/dist/docs/methods/update_paragraph_style/handler.d.ts +5 -0
- package/dist/docs/methods/update_paragraph_style/handler.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/handler.js +16 -0
- package/dist/docs/methods/update_paragraph_style/handler.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/index.d.ts +37 -0
- package/dist/docs/methods/update_paragraph_style/index.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/index.js +22 -0
- package/dist/docs/methods/update_paragraph_style/index.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/schema.d.ts +35 -0
- package/dist/docs/methods/update_paragraph_style/schema.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/schema.js +15 -0
- package/dist/docs/methods/update_paragraph_style/schema.js.map +1 -0
- package/dist/docs/methods/update_text_style/handler.d.ts +5 -0
- package/dist/docs/methods/update_text_style/handler.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/handler.js +26 -0
- package/dist/docs/methods/update_text_style/handler.js.map +1 -0
- package/dist/docs/methods/update_text_style/index.d.ts +32 -0
- package/dist/docs/methods/update_text_style/index.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/index.js +21 -0
- package/dist/docs/methods/update_text_style/index.js.map +1 -0
- package/dist/docs/methods/update_text_style/schema.d.ts +31 -0
- package/dist/docs/methods/update_text_style/schema.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/schema.js +15 -0
- package/dist/docs/methods/update_text_style/schema.js.map +1 -0
- package/dist/doctor/services.d.ts.map +1 -1
- package/dist/doctor/services.js +13 -1
- package/dist/doctor/services.js.map +1 -1
- package/dist/drive/capabilities.d.ts +3 -0
- package/dist/drive/capabilities.d.ts.map +1 -0
- package/dist/drive/capabilities.js +21 -0
- package/dist/drive/capabilities.js.map +1 -0
- package/dist/drive/entities/About.d.ts +26 -0
- package/dist/drive/entities/About.d.ts.map +1 -0
- package/dist/drive/entities/About.js +31 -0
- package/dist/drive/entities/About.js.map +1 -0
- package/dist/drive/entities/Comment.d.ts +48 -0
- package/dist/drive/entities/Comment.d.ts.map +1 -0
- package/dist/drive/entities/Comment.js +53 -0
- package/dist/drive/entities/Comment.js.map +1 -0
- package/dist/drive/entities/File.d.ts +42 -0
- package/dist/drive/entities/File.d.ts.map +1 -0
- package/dist/drive/entities/File.js +75 -0
- package/dist/drive/entities/File.js.map +1 -0
- package/dist/drive/entities/Permission.d.ts +33 -0
- package/dist/drive/entities/Permission.d.ts.map +1 -0
- package/dist/drive/entities/Permission.js +32 -0
- package/dist/drive/entities/Permission.js.map +1 -0
- package/dist/drive/entities/Reply.d.ts +27 -0
- package/dist/drive/entities/Reply.d.ts.map +1 -0
- package/dist/drive/entities/Reply.js +39 -0
- package/dist/drive/entities/Reply.js.map +1 -0
- package/dist/drive/entities/Revision.d.ts +30 -0
- package/dist/drive/entities/Revision.d.ts.map +1 -0
- package/dist/drive/entities/Revision.js +62 -0
- package/dist/drive/entities/Revision.js.map +1 -0
- package/dist/drive/entities/SharedDrive.d.ts +28 -0
- package/dist/drive/entities/SharedDrive.d.ts.map +1 -0
- package/dist/drive/entities/SharedDrive.js +65 -0
- package/dist/drive/entities/SharedDrive.js.map +1 -0
- package/dist/drive/entities/User.d.ts +16 -0
- package/dist/drive/entities/User.d.ts.map +1 -0
- package/dist/drive/entities/User.js +25 -0
- package/dist/drive/entities/User.js.map +1 -0
- package/dist/drive/index.d.ts +3 -0
- package/dist/drive/index.d.ts.map +1 -0
- package/dist/drive/index.js +23 -0
- package/dist/drive/index.js.map +1 -0
- package/dist/drive/instructions.d.ts +2 -0
- package/dist/drive/instructions.d.ts.map +1 -0
- package/dist/drive/instructions.js +24 -0
- package/dist/drive/instructions.js.map +1 -0
- package/dist/drive/lib/comment.d.ts +15 -0
- package/dist/drive/lib/comment.d.ts.map +1 -0
- package/dist/drive/lib/comment.js +52 -0
- package/dist/drive/lib/comment.js.map +1 -0
- package/dist/drive/lib/content.d.ts +20 -0
- package/dist/drive/lib/content.d.ts.map +1 -0
- package/dist/drive/lib/content.js +41 -0
- package/dist/drive/lib/content.js.map +1 -0
- package/dist/drive/lib/file.d.ts +25 -0
- package/dist/drive/lib/file.d.ts.map +1 -0
- package/dist/drive/lib/file.js +62 -0
- package/dist/drive/lib/file.js.map +1 -0
- package/dist/drive/lib/query.d.ts +30 -0
- package/dist/drive/lib/query.d.ts.map +1 -0
- package/dist/drive/lib/query.js +104 -0
- package/dist/drive/lib/query.js.map +1 -0
- package/dist/drive/lib/revision.d.ts +7 -0
- package/dist/drive/lib/revision.d.ts.map +1 -0
- package/dist/drive/lib/revision.js +23 -0
- package/dist/drive/lib/revision.js.map +1 -0
- package/dist/drive/lib/shared-drive.d.ts +7 -0
- package/dist/drive/lib/shared-drive.d.ts.map +1 -0
- package/dist/drive/lib/shared-drive.js +26 -0
- package/dist/drive/lib/shared-drive.js.map +1 -0
- package/dist/drive/methods/create_comment/handler.d.ts +5 -0
- package/dist/drive/methods/create_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/create_comment/handler.js +11 -0
- package/dist/drive/methods/create_comment/handler.js.map +1 -0
- package/dist/drive/methods/create_comment/index.d.ts +43 -0
- package/dist/drive/methods/create_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/create_comment/index.js +16 -0
- package/dist/drive/methods/create_comment/index.js.map +1 -0
- package/dist/drive/methods/create_comment/schema.d.ts +47 -0
- package/dist/drive/methods/create_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/create_comment/schema.js +14 -0
- package/dist/drive/methods/create_comment/schema.js.map +1 -0
- package/dist/drive/methods/create_reply/handler.d.ts +5 -0
- package/dist/drive/methods/create_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/create_reply/handler.js +15 -0
- package/dist/drive/methods/create_reply/handler.js.map +1 -0
- package/dist/drive/methods/create_reply/index.d.ts +27 -0
- package/dist/drive/methods/create_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/create_reply/index.js +17 -0
- package/dist/drive/methods/create_reply/index.js.map +1 -0
- package/dist/drive/methods/create_reply/schema.d.ts +31 -0
- package/dist/drive/methods/create_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/create_reply/schema.js +18 -0
- package/dist/drive/methods/create_reply/schema.js.map +1 -0
- package/dist/drive/methods/create_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/create_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/create_shared_drive/handler.js +11 -0
- package/dist/drive/methods/create_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/create_shared_drive/index.d.ts +20 -0
- package/dist/drive/methods/create_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/create_shared_drive/index.js +16 -0
- package/dist/drive/methods/create_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/create_shared_drive/schema.d.ts +24 -0
- package/dist/drive/methods/create_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/create_shared_drive/schema.js +15 -0
- package/dist/drive/methods/create_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/delete_comment/handler.d.ts +5 -0
- package/dist/drive/methods/delete_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_comment/handler.js +5 -0
- package/dist/drive/methods/delete_comment/handler.js.map +1 -0
- package/dist/drive/methods/delete_comment/index.d.ts +8 -0
- package/dist/drive/methods/delete_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_comment/index.js +16 -0
- package/dist/drive/methods/delete_comment/index.js.map +1 -0
- package/dist/drive/methods/delete_comment/schema.d.ts +13 -0
- package/dist/drive/methods/delete_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_comment/schema.js +13 -0
- package/dist/drive/methods/delete_comment/schema.js.map +1 -0
- package/dist/drive/methods/delete_file/handler.d.ts +5 -0
- package/dist/drive/methods/delete_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_file/handler.js +5 -0
- package/dist/drive/methods/delete_file/handler.js.map +1 -0
- package/dist/drive/methods/delete_file/index.d.ts +6 -0
- package/dist/drive/methods/delete_file/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_file/index.js +19 -0
- package/dist/drive/methods/delete_file/index.js.map +1 -0
- package/dist/drive/methods/delete_file/schema.d.ts +11 -0
- package/dist/drive/methods/delete_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_file/schema.js +11 -0
- package/dist/drive/methods/delete_file/schema.js.map +1 -0
- package/dist/drive/methods/delete_reply/handler.d.ts +5 -0
- package/dist/drive/methods/delete_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_reply/handler.js +9 -0
- package/dist/drive/methods/delete_reply/handler.js.map +1 -0
- package/dist/drive/methods/delete_reply/index.d.ts +10 -0
- package/dist/drive/methods/delete_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_reply/index.js +16 -0
- package/dist/drive/methods/delete_reply/index.js.map +1 -0
- package/dist/drive/methods/delete_reply/schema.d.ts +15 -0
- package/dist/drive/methods/delete_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_reply/schema.js +15 -0
- package/dist/drive/methods/delete_reply/schema.js.map +1 -0
- package/dist/drive/methods/delete_revision/handler.d.ts +5 -0
- package/dist/drive/methods/delete_revision/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_revision/handler.js +5 -0
- package/dist/drive/methods/delete_revision/handler.js.map +1 -0
- package/dist/drive/methods/delete_revision/index.d.ts +8 -0
- package/dist/drive/methods/delete_revision/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_revision/index.js +18 -0
- package/dist/drive/methods/delete_revision/index.js.map +1 -0
- package/dist/drive/methods/delete_revision/schema.d.ts +13 -0
- package/dist/drive/methods/delete_revision/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_revision/schema.js +13 -0
- package/dist/drive/methods/delete_revision/schema.js.map +1 -0
- package/dist/drive/methods/delete_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/delete_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_shared_drive/handler.js +10 -0
- package/dist/drive/methods/delete_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/delete_shared_drive/index.d.ts +8 -0
- package/dist/drive/methods/delete_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_shared_drive/index.js +17 -0
- package/dist/drive/methods/delete_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/delete_shared_drive/schema.d.ts +13 -0
- package/dist/drive/methods/delete_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_shared_drive/schema.js +22 -0
- package/dist/drive/methods/delete_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/empty_trash/handler.d.ts +5 -0
- package/dist/drive/methods/empty_trash/handler.d.ts.map +1 -0
- package/dist/drive/methods/empty_trash/handler.js +6 -0
- package/dist/drive/methods/empty_trash/handler.js.map +1 -0
- package/dist/drive/methods/empty_trash/index.d.ts +6 -0
- package/dist/drive/methods/empty_trash/index.d.ts.map +1 -0
- package/dist/drive/methods/empty_trash/index.js +17 -0
- package/dist/drive/methods/empty_trash/index.js.map +1 -0
- package/dist/drive/methods/empty_trash/schema.d.ts +11 -0
- package/dist/drive/methods/empty_trash/schema.d.ts.map +1 -0
- package/dist/drive/methods/empty_trash/schema.js +14 -0
- package/dist/drive/methods/empty_trash/schema.js.map +1 -0
- package/dist/drive/methods/get_about/handler.d.ts +5 -0
- package/dist/drive/methods/get_about/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_about/handler.js +30 -0
- package/dist/drive/methods/get_about/handler.js.map +1 -0
- package/dist/drive/methods/get_about/index.d.ts +17 -0
- package/dist/drive/methods/get_about/index.d.ts.map +1 -0
- package/dist/drive/methods/get_about/index.js +17 -0
- package/dist/drive/methods/get_about/index.js.map +1 -0
- package/dist/drive/methods/get_about/schema.d.ts +21 -0
- package/dist/drive/methods/get_about/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_about/schema.js +7 -0
- package/dist/drive/methods/get_about/schema.js.map +1 -0
- package/dist/drive/methods/get_comment/handler.d.ts +5 -0
- package/dist/drive/methods/get_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_comment/handler.js +12 -0
- package/dist/drive/methods/get_comment/handler.js.map +1 -0
- package/dist/drive/methods/get_comment/index.d.ts +43 -0
- package/dist/drive/methods/get_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/get_comment/index.js +16 -0
- package/dist/drive/methods/get_comment/index.js.map +1 -0
- package/dist/drive/methods/get_comment/schema.d.ts +47 -0
- package/dist/drive/methods/get_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_comment/schema.js +14 -0
- package/dist/drive/methods/get_comment/schema.js.map +1 -0
- package/dist/drive/methods/get_reply/handler.d.ts +5 -0
- package/dist/drive/methods/get_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_reply/handler.js +13 -0
- package/dist/drive/methods/get_reply/handler.js.map +1 -0
- package/dist/drive/methods/get_reply/index.d.ts +24 -0
- package/dist/drive/methods/get_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/get_reply/index.js +16 -0
- package/dist/drive/methods/get_reply/index.js.map +1 -0
- package/dist/drive/methods/get_reply/schema.d.ts +28 -0
- package/dist/drive/methods/get_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_reply/schema.js +15 -0
- package/dist/drive/methods/get_reply/schema.js.map +1 -0
- package/dist/drive/methods/get_revision/handler.d.ts +5 -0
- package/dist/drive/methods/get_revision/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_revision/handler.js +10 -0
- package/dist/drive/methods/get_revision/handler.js.map +1 -0
- package/dist/drive/methods/get_revision/index.d.ts +23 -0
- package/dist/drive/methods/get_revision/index.d.ts.map +1 -0
- package/dist/drive/methods/get_revision/index.js +16 -0
- package/dist/drive/methods/get_revision/index.js.map +1 -0
- package/dist/drive/methods/get_revision/schema.d.ts +27 -0
- package/dist/drive/methods/get_revision/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_revision/schema.js +10 -0
- package/dist/drive/methods/get_revision/schema.js.map +1 -0
- package/dist/drive/methods/get_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/get_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_shared_drive/handler.js +11 -0
- package/dist/drive/methods/get_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/get_shared_drive/index.d.ts +20 -0
- package/dist/drive/methods/get_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/get_shared_drive/index.js +16 -0
- package/dist/drive/methods/get_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/get_shared_drive/schema.d.ts +24 -0
- package/dist/drive/methods/get_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_shared_drive/schema.js +15 -0
- package/dist/drive/methods/get_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/hide_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/hide_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/hide_shared_drive/handler.js +9 -0
- package/dist/drive/methods/hide_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/hide_shared_drive/index.d.ts +19 -0
- package/dist/drive/methods/hide_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/hide_shared_drive/index.js +16 -0
- package/dist/drive/methods/hide_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/hide_shared_drive/schema.d.ts +23 -0
- package/dist/drive/methods/hide_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/hide_shared_drive/schema.js +9 -0
- package/dist/drive/methods/hide_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/list_comments/handler.d.ts +5 -0
- package/dist/drive/methods/list_comments/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_comments/handler.js +17 -0
- package/dist/drive/methods/list_comments/handler.js.map +1 -0
- package/dist/drive/methods/list_comments/index.d.ts +48 -0
- package/dist/drive/methods/list_comments/index.d.ts.map +1 -0
- package/dist/drive/methods/list_comments/index.js +16 -0
- package/dist/drive/methods/list_comments/index.js.map +1 -0
- package/dist/drive/methods/list_comments/schema.d.ts +52 -0
- package/dist/drive/methods/list_comments/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_comments/schema.js +34 -0
- package/dist/drive/methods/list_comments/schema.js.map +1 -0
- package/dist/drive/methods/list_replies/handler.d.ts +5 -0
- package/dist/drive/methods/list_replies/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_replies/handler.js +17 -0
- package/dist/drive/methods/list_replies/handler.js.map +1 -0
- package/dist/drive/methods/list_replies/index.d.ts +28 -0
- package/dist/drive/methods/list_replies/index.d.ts.map +1 -0
- package/dist/drive/methods/list_replies/index.js +16 -0
- package/dist/drive/methods/list_replies/index.js.map +1 -0
- package/dist/drive/methods/list_replies/schema.d.ts +32 -0
- package/dist/drive/methods/list_replies/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_replies/schema.js +31 -0
- package/dist/drive/methods/list_replies/schema.js.map +1 -0
- package/dist/drive/methods/list_revisions/handler.d.ts +5 -0
- package/dist/drive/methods/list_revisions/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_revisions/handler.js +15 -0
- package/dist/drive/methods/list_revisions/handler.js.map +1 -0
- package/dist/drive/methods/list_revisions/index.d.ts +27 -0
- package/dist/drive/methods/list_revisions/index.d.ts.map +1 -0
- package/dist/drive/methods/list_revisions/index.js +17 -0
- package/dist/drive/methods/list_revisions/index.js.map +1 -0
- package/dist/drive/methods/list_revisions/schema.d.ts +31 -0
- package/dist/drive/methods/list_revisions/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_revisions/schema.js +30 -0
- package/dist/drive/methods/list_revisions/schema.js.map +1 -0
- package/dist/drive/methods/list_shared_drives/handler.d.ts +5 -0
- package/dist/drive/methods/list_shared_drives/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_shared_drives/handler.js +16 -0
- package/dist/drive/methods/list_shared_drives/handler.js.map +1 -0
- package/dist/drive/methods/list_shared_drives/index.d.ts +25 -0
- package/dist/drive/methods/list_shared_drives/index.d.ts.map +1 -0
- package/dist/drive/methods/list_shared_drives/index.js +16 -0
- package/dist/drive/methods/list_shared_drives/index.js.map +1 -0
- package/dist/drive/methods/list_shared_drives/schema.d.ts +29 -0
- package/dist/drive/methods/list_shared_drives/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_shared_drives/schema.js +27 -0
- package/dist/drive/methods/list_shared_drives/schema.js.map +1 -0
- package/dist/drive/methods/registry.d.ts +619 -0
- package/dist/drive/methods/registry.d.ts.map +1 -0
- package/dist/drive/methods/registry.js +69 -0
- package/dist/drive/methods/registry.js.map +1 -0
- package/dist/drive/methods/trash_file/handler.d.ts +5 -0
- package/dist/drive/methods/trash_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/trash_file/handler.js +11 -0
- package/dist/drive/methods/trash_file/handler.js.map +1 -0
- package/dist/drive/methods/trash_file/index.d.ts +25 -0
- package/dist/drive/methods/trash_file/index.d.ts.map +1 -0
- package/dist/drive/methods/trash_file/index.js +18 -0
- package/dist/drive/methods/trash_file/index.js.map +1 -0
- package/dist/drive/methods/trash_file/schema.d.ts +29 -0
- package/dist/drive/methods/trash_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/trash_file/schema.js +9 -0
- package/dist/drive/methods/trash_file/schema.js.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/unhide_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/handler.js +9 -0
- package/dist/drive/methods/unhide_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/index.d.ts +19 -0
- package/dist/drive/methods/unhide_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/index.js +16 -0
- package/dist/drive/methods/unhide_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/schema.d.ts +23 -0
- package/dist/drive/methods/unhide_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/schema.js +9 -0
- package/dist/drive/methods/unhide_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/untrash_file/handler.d.ts +5 -0
- package/dist/drive/methods/untrash_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/untrash_file/handler.js +11 -0
- package/dist/drive/methods/untrash_file/handler.js.map +1 -0
- package/dist/drive/methods/untrash_file/index.d.ts +25 -0
- package/dist/drive/methods/untrash_file/index.d.ts.map +1 -0
- package/dist/drive/methods/untrash_file/index.js +17 -0
- package/dist/drive/methods/untrash_file/index.js.map +1 -0
- package/dist/drive/methods/untrash_file/schema.d.ts +29 -0
- package/dist/drive/methods/untrash_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/untrash_file/schema.js +9 -0
- package/dist/drive/methods/untrash_file/schema.js.map +1 -0
- package/dist/drive/methods/update_comment/handler.d.ts +5 -0
- package/dist/drive/methods/update_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_comment/handler.js +11 -0
- package/dist/drive/methods/update_comment/handler.js.map +1 -0
- package/dist/drive/methods/update_comment/index.d.ts +43 -0
- package/dist/drive/methods/update_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/update_comment/index.js +16 -0
- package/dist/drive/methods/update_comment/index.js.map +1 -0
- package/dist/drive/methods/update_comment/schema.d.ts +47 -0
- package/dist/drive/methods/update_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_comment/schema.js +11 -0
- package/dist/drive/methods/update_comment/schema.js.map +1 -0
- package/dist/drive/methods/update_file/handler.d.ts +5 -0
- package/dist/drive/methods/update_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_file/handler.js +21 -0
- package/dist/drive/methods/update_file/handler.js.map +1 -0
- package/dist/drive/methods/update_file/index.d.ts +33 -0
- package/dist/drive/methods/update_file/index.d.ts.map +1 -0
- package/dist/drive/methods/update_file/index.js +19 -0
- package/dist/drive/methods/update_file/index.js.map +1 -0
- package/dist/drive/methods/update_file/schema.d.ts +37 -0
- package/dist/drive/methods/update_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_file/schema.js +35 -0
- package/dist/drive/methods/update_file/schema.js.map +1 -0
- package/dist/drive/methods/update_reply/handler.d.ts +5 -0
- package/dist/drive/methods/update_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_reply/handler.js +12 -0
- package/dist/drive/methods/update_reply/handler.js.map +1 -0
- package/dist/drive/methods/update_reply/index.d.ts +24 -0
- package/dist/drive/methods/update_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/update_reply/index.js +16 -0
- package/dist/drive/methods/update_reply/index.js.map +1 -0
- package/dist/drive/methods/update_reply/schema.d.ts +28 -0
- package/dist/drive/methods/update_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_reply/schema.js +12 -0
- package/dist/drive/methods/update_reply/schema.js.map +1 -0
- package/dist/drive/methods/update_revision/handler.d.ts +5 -0
- package/dist/drive/methods/update_revision/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_revision/handler.js +17 -0
- package/dist/drive/methods/update_revision/handler.js.map +1 -0
- package/dist/drive/methods/update_revision/index.d.ts +27 -0
- package/dist/drive/methods/update_revision/index.d.ts.map +1 -0
- package/dist/drive/methods/update_revision/index.js +17 -0
- package/dist/drive/methods/update_revision/index.js.map +1 -0
- package/dist/drive/methods/update_revision/schema.d.ts +31 -0
- package/dist/drive/methods/update_revision/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_revision/schema.js +29 -0
- package/dist/drive/methods/update_revision/schema.js.map +1 -0
- package/dist/drive/methods/update_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/update_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_shared_drive/handler.js +17 -0
- package/dist/drive/methods/update_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/update_shared_drive/index.d.ts +30 -0
- package/dist/drive/methods/update_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/update_shared_drive/index.js +17 -0
- package/dist/drive/methods/update_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/update_shared_drive/schema.d.ts +34 -0
- package/dist/drive/methods/update_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_shared_drive/schema.js +53 -0
- package/dist/drive/methods/update_shared_drive/schema.js.map +1 -0
- package/dist/drive/operation.d.ts +12 -0
- package/dist/drive/operation.d.ts.map +1 -0
- package/dist/drive/operation.js +10 -0
- package/dist/drive/operation.js.map +1 -0
- package/dist/drive/tools/copy_file/handler.d.ts +5 -0
- package/dist/drive/tools/copy_file/handler.d.ts.map +1 -0
- package/dist/drive/tools/copy_file/handler.js +15 -0
- package/dist/drive/tools/copy_file/handler.js.map +1 -0
- package/dist/drive/tools/copy_file/index.d.ts +27 -0
- package/dist/drive/tools/copy_file/index.d.ts.map +1 -0
- package/dist/drive/tools/copy_file/index.js +18 -0
- package/dist/drive/tools/copy_file/index.js.map +1 -0
- package/dist/drive/tools/copy_file/schema.d.ts +31 -0
- package/dist/drive/tools/copy_file/schema.d.ts.map +1 -0
- package/dist/drive/tools/copy_file/schema.js +18 -0
- package/dist/drive/tools/copy_file/schema.js.map +1 -0
- package/dist/drive/tools/create_file/handler.d.ts +5 -0
- package/dist/drive/tools/create_file/handler.d.ts.map +1 -0
- package/dist/drive/tools/create_file/handler.js +42 -0
- package/dist/drive/tools/create_file/handler.js.map +1 -0
- package/dist/drive/tools/create_file/index.d.ts +30 -0
- package/dist/drive/tools/create_file/index.d.ts.map +1 -0
- package/dist/drive/tools/create_file/index.js +19 -0
- package/dist/drive/tools/create_file/index.js.map +1 -0
- package/dist/drive/tools/create_file/schema.d.ts +34 -0
- package/dist/drive/tools/create_file/schema.d.ts.map +1 -0
- package/dist/drive/tools/create_file/schema.js +29 -0
- package/dist/drive/tools/create_file/schema.js.map +1 -0
- package/dist/drive/tools/download_file_content/handler.d.ts +5 -0
- package/dist/drive/tools/download_file_content/handler.d.ts.map +1 -0
- package/dist/drive/tools/download_file_content/handler.js +33 -0
- package/dist/drive/tools/download_file_content/handler.js.map +1 -0
- package/dist/drive/tools/download_file_content/index.d.ts +10 -0
- package/dist/drive/tools/download_file_content/index.d.ts.map +1 -0
- package/dist/drive/tools/download_file_content/index.js +19 -0
- package/dist/drive/tools/download_file_content/index.js.map +1 -0
- package/dist/drive/tools/download_file_content/schema.d.ts +14 -0
- package/dist/drive/tools/download_file_content/schema.d.ts.map +1 -0
- package/dist/drive/tools/download_file_content/schema.js +18 -0
- package/dist/drive/tools/download_file_content/schema.js.map +1 -0
- package/dist/drive/tools/get_file_metadata/handler.d.ts +5 -0
- package/dist/drive/tools/get_file_metadata/handler.d.ts.map +1 -0
- package/dist/drive/tools/get_file_metadata/handler.js +10 -0
- package/dist/drive/tools/get_file_metadata/handler.js.map +1 -0
- package/dist/drive/tools/get_file_metadata/index.d.ts +26 -0
- package/dist/drive/tools/get_file_metadata/index.d.ts.map +1 -0
- package/dist/drive/tools/get_file_metadata/index.js +17 -0
- package/dist/drive/tools/get_file_metadata/index.js.map +1 -0
- package/dist/drive/tools/get_file_metadata/schema.d.ts +30 -0
- package/dist/drive/tools/get_file_metadata/schema.d.ts.map +1 -0
- package/dist/drive/tools/get_file_metadata/schema.js +15 -0
- package/dist/drive/tools/get_file_metadata/schema.js.map +1 -0
- package/dist/drive/tools/get_file_permissions/handler.d.ts +5 -0
- package/dist/drive/tools/get_file_permissions/handler.d.ts.map +1 -0
- package/dist/drive/tools/get_file_permissions/handler.js +20 -0
- package/dist/drive/tools/get_file_permissions/handler.js.map +1 -0
- package/dist/drive/tools/get_file_permissions/index.d.ts +27 -0
- package/dist/drive/tools/get_file_permissions/index.d.ts.map +1 -0
- package/dist/drive/tools/get_file_permissions/index.js +16 -0
- package/dist/drive/tools/get_file_permissions/index.js.map +1 -0
- package/dist/drive/tools/get_file_permissions/schema.d.ts +31 -0
- package/dist/drive/tools/get_file_permissions/schema.d.ts.map +1 -0
- package/dist/drive/tools/get_file_permissions/schema.js +11 -0
- package/dist/drive/tools/get_file_permissions/schema.js.map +1 -0
- package/dist/drive/tools/list_recent_files/handler.d.ts +5 -0
- package/dist/drive/tools/list_recent_files/handler.d.ts.map +1 -0
- package/dist/drive/tools/list_recent_files/handler.js +23 -0
- package/dist/drive/tools/list_recent_files/handler.js.map +1 -0
- package/dist/drive/tools/list_recent_files/index.d.ts +35 -0
- package/dist/drive/tools/list_recent_files/index.d.ts.map +1 -0
- package/dist/drive/tools/list_recent_files/index.js +16 -0
- package/dist/drive/tools/list_recent_files/index.js.map +1 -0
- package/dist/drive/tools/list_recent_files/schema.d.ts +39 -0
- package/dist/drive/tools/list_recent_files/schema.d.ts.map +1 -0
- package/dist/drive/tools/list_recent_files/schema.js +29 -0
- package/dist/drive/tools/list_recent_files/schema.js.map +1 -0
- package/dist/drive/tools/read_file_content/handler.d.ts +5 -0
- package/dist/drive/tools/read_file_content/handler.d.ts.map +1 -0
- package/dist/drive/tools/read_file_content/handler.js +24 -0
- package/dist/drive/tools/read_file_content/handler.js.map +1 -0
- package/dist/drive/tools/read_file_content/index.d.ts +6 -0
- package/dist/drive/tools/read_file_content/index.d.ts.map +1 -0
- package/dist/drive/tools/read_file_content/index.js +19 -0
- package/dist/drive/tools/read_file_content/index.js.map +1 -0
- package/dist/drive/tools/read_file_content/schema.d.ts +10 -0
- package/dist/drive/tools/read_file_content/schema.d.ts.map +1 -0
- package/dist/drive/tools/read_file_content/schema.js +10 -0
- package/dist/drive/tools/read_file_content/schema.js.map +1 -0
- package/dist/drive/tools/registry.d.ts +193 -0
- package/dist/drive/tools/registry.d.ts.map +1 -0
- package/dist/drive/tools/registry.js +24 -0
- package/dist/drive/tools/registry.js.map +1 -0
- package/dist/drive/tools/search_files/handler.d.ts +5 -0
- package/dist/drive/tools/search_files/handler.d.ts.map +1 -0
- package/dist/drive/tools/search_files/handler.js +18 -0
- package/dist/drive/tools/search_files/handler.js.map +1 -0
- package/dist/drive/tools/search_files/index.d.ts +31 -0
- package/dist/drive/tools/search_files/index.d.ts.map +1 -0
- package/dist/drive/tools/search_files/index.js +17 -0
- package/dist/drive/tools/search_files/index.js.map +1 -0
- package/dist/drive/tools/search_files/schema.d.ts +35 -0
- package/dist/drive/tools/search_files/schema.d.ts.map +1 -0
- package/dist/drive/tools/search_files/schema.js +27 -0
- package/dist/drive/tools/search_files/schema.js.map +1 -0
- package/dist/{sheets/lib → lib}/enums.d.ts +1 -1
- package/dist/lib/enums.d.ts.map +1 -0
- package/dist/{sheets/lib → lib}/enums.js +1 -1
- package/dist/lib/enums.js.map +1 -0
- package/dist/sheets/lib/filters.d.ts.map +1 -1
- package/dist/sheets/lib/filters.js +1 -1
- package/dist/sheets/lib/filters.js.map +1 -1
- package/dist/sheets/lib/metadata.d.ts.map +1 -1
- package/dist/sheets/lib/metadata.js +1 -1
- package/dist/sheets/lib/metadata.js.map +1 -1
- package/dist/sheets/lib/spreadsheet.d.ts.map +1 -1
- package/dist/sheets/lib/spreadsheet.js +1 -1
- package/dist/sheets/lib/spreadsheet.js.map +1 -1
- package/dist/sheets/lib/values.d.ts.map +1 -1
- package/dist/sheets/lib/values.js +1 -1
- package/dist/sheets/lib/values.js.map +1 -1
- package/package.json +9 -3
- package/dist/sheets/lib/enums.d.ts.map +0 -1
- package/dist/sheets/lib/enums.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const update_shared_drive: import("../../../lib/operation.js").Operation<import("@googleapis/drive").drive_v3.Drive, import("zod").ZodObject<{
|
|
2
|
+
driveId: import("zod").ZodString;
|
|
3
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4
|
+
colorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5
|
+
themeId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
+
restrictions: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
7
|
+
adminManagedRestrictions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
8
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
9
|
+
domainUsersOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
10
|
+
driveMembersOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
11
|
+
sharingFoldersRequiresOrganizerPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
12
|
+
}, import("zod/v4/core").$strip>>;
|
|
13
|
+
useDomainAdminAccess: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
14
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
15
|
+
id: import("zod").ZodString;
|
|
16
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
colorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
+
themeId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
backgroundImageLink: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
hidden: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
22
|
+
restrictions: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
23
|
+
adminManagedRestrictions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
24
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
25
|
+
domainUsersOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
26
|
+
driveMembersOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
27
|
+
sharingFoldersRequiresOrganizerPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
28
|
+
}, import("zod/v4/core").$strip>>;
|
|
29
|
+
}, import("zod/v4/core").$strip>>;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/drive/methods/update_shared_drive/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAa9B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { driveOperation } from '../../operation.js';
|
|
2
|
+
import { handler } from './handler.js';
|
|
3
|
+
import { schema } from './schema.js';
|
|
4
|
+
export const update_shared_drive = driveOperation({
|
|
5
|
+
description: "Update a shared drive's metadata with patch semantics: rename, retheme or recolor, or " +
|
|
6
|
+
'set its restrictions.',
|
|
7
|
+
annotations: {
|
|
8
|
+
readOnlyHint: false,
|
|
9
|
+
destructiveHint: false,
|
|
10
|
+
idempotentHint: true,
|
|
11
|
+
openWorldHint: false,
|
|
12
|
+
},
|
|
13
|
+
source: 'https://developers.google.com/workspace/drive/api/reference/rest/v3/drives/update',
|
|
14
|
+
schema,
|
|
15
|
+
handler,
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/drive/methods/update_shared_drive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAC;IAChD,WAAW,EACT,wFAAwF;QACxF,uBAAuB;IACzB,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE,mFAAmF;IAC3F,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { driveOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\nexport const update_shared_drive = driveOperation({\n description:\n \"Update a shared drive's metadata with patch semantics: rename, retheme or recolor, or \" +\n 'set its restrictions.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n source: 'https://developers.google.com/workspace/drive/api/reference/rest/v3/drives/update',\n schema,\n handler,\n});\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
input: z.ZodObject<{
|
|
4
|
+
driveId: z.ZodString;
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
colorRgb: z.ZodOptional<z.ZodString>;
|
|
7
|
+
themeId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
restrictions: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
adminManagedRestrictions: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
copyRequiresWriterPermission: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
domainUsersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
driveMembersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
sharingFoldersRequiresOrganizerPermission: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
useDomainAdminAccess: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
output: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
name: z.ZodOptional<z.ZodString>;
|
|
20
|
+
colorRgb: z.ZodOptional<z.ZodString>;
|
|
21
|
+
themeId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
backgroundImageLink: z.ZodOptional<z.ZodString>;
|
|
23
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
24
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
restrictions: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
adminManagedRestrictions: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
copyRequiresWriterPermission: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
domainUsersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
driveMembersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
sharingFoldersRequiresOrganizerPermission: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/drive/methods/update_shared_drive/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DlB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SharedDrive } from '../../entities/SharedDrive.js';
|
|
3
|
+
export const schema = {
|
|
4
|
+
input: z.object({
|
|
5
|
+
driveId: z.string().describe('The ID of the shared drive.'),
|
|
6
|
+
name: z.string().optional().describe('The name to set on this shared drive.'),
|
|
7
|
+
colorRgb: z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe('The color of this shared drive as an RGB hex string. It can only be set on a ' +
|
|
11
|
+
'request that does not set themeId.'),
|
|
12
|
+
themeId: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('The ID of the theme from which the background image and color will be set. The set ' +
|
|
16
|
+
'of possible driveThemes can be retrieved from a get_about response.'),
|
|
17
|
+
restrictions: z
|
|
18
|
+
.object({
|
|
19
|
+
adminManagedRestrictions: z
|
|
20
|
+
.boolean()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Whether administrative privileges are required to modify restrictions.'),
|
|
23
|
+
copyRequiresWriterPermission: z
|
|
24
|
+
.boolean()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('Whether the options to copy, print, or download files inside this shared drive ' +
|
|
27
|
+
'should be disabled for readers and commenters.'),
|
|
28
|
+
domainUsersOnly: z
|
|
29
|
+
.boolean()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe('Whether access to this shared drive and items inside it is restricted to users ' +
|
|
32
|
+
'of the domain to which this shared drive belongs.'),
|
|
33
|
+
driveMembersOnly: z
|
|
34
|
+
.boolean()
|
|
35
|
+
.optional()
|
|
36
|
+
.describe('Whether access to items inside this shared drive is restricted to its members.'),
|
|
37
|
+
sharingFoldersRequiresOrganizerPermission: z
|
|
38
|
+
.boolean()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('If true, only users with the organizer role can share folders.'),
|
|
41
|
+
})
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Restrictions to set on this shared drive.'),
|
|
44
|
+
useDomainAdminAccess: z
|
|
45
|
+
.boolean()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe('Issue the request as a domain administrator; if set to true, then the requester ' +
|
|
48
|
+
'will be granted access if they are an administrator of the domain to which the ' +
|
|
49
|
+
'shared drive belongs.'),
|
|
50
|
+
}),
|
|
51
|
+
output: SharedDrive,
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/drive/methods/update_shared_drive/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;QAC7E,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,+EAA+E;YAC7E,oCAAoC,CACvC;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,qFAAqF;YACnF,qEAAqE,CACxE;QACH,YAAY,EAAE,CAAC;aACZ,MAAM,CAAC;YACN,wBAAwB,EAAE,CAAC;iBACxB,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,CAAC,wEAAwE,CAAC;YACrF,4BAA4B,EAAE,CAAC;iBAC5B,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,CACP,iFAAiF;gBAC/E,gDAAgD,CACnD;YACH,eAAe,EAAE,CAAC;iBACf,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,CACP,iFAAiF;gBAC/E,mDAAmD,CACtD;YACH,gBAAgB,EAAE,CAAC;iBAChB,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,CACP,gFAAgF,CACjF;YACH,yCAAyC,EAAE,CAAC;iBACzC,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,CAAC,gEAAgE,CAAC;SAC9E,CAAC;aACD,QAAQ,EAAE;aACV,QAAQ,CAAC,2CAA2C,CAAC;QACxD,oBAAoB,EAAE,CAAC;aACpB,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,kFAAkF;YAChF,iFAAiF;YACjF,uBAAuB,CAC1B;KACJ,CAAC;IACF,MAAM,EAAE,WAAW;CACpB,CAAC","sourcesContent":["import { z } from 'zod';\nimport { SharedDrive } from '../../entities/SharedDrive.js';\n\nexport const schema = {\n input: z.object({\n driveId: z.string().describe('The ID of the shared drive.'),\n name: z.string().optional().describe('The name to set on this shared drive.'),\n colorRgb: z\n .string()\n .optional()\n .describe(\n 'The color of this shared drive as an RGB hex string. It can only be set on a ' +\n 'request that does not set themeId.',\n ),\n themeId: z\n .string()\n .optional()\n .describe(\n 'The ID of the theme from which the background image and color will be set. The set ' +\n 'of possible driveThemes can be retrieved from a get_about response.',\n ),\n restrictions: z\n .object({\n adminManagedRestrictions: z\n .boolean()\n .optional()\n .describe('Whether administrative privileges are required to modify restrictions.'),\n copyRequiresWriterPermission: z\n .boolean()\n .optional()\n .describe(\n 'Whether the options to copy, print, or download files inside this shared drive ' +\n 'should be disabled for readers and commenters.',\n ),\n domainUsersOnly: z\n .boolean()\n .optional()\n .describe(\n 'Whether access to this shared drive and items inside it is restricted to users ' +\n 'of the domain to which this shared drive belongs.',\n ),\n driveMembersOnly: z\n .boolean()\n .optional()\n .describe(\n 'Whether access to items inside this shared drive is restricted to its members.',\n ),\n sharingFoldersRequiresOrganizerPermission: z\n .boolean()\n .optional()\n .describe('If true, only users with the organizer role can share folders.'),\n })\n .optional()\n .describe('Restrictions to set on this shared drive.'),\n useDomainAdminAccess: z\n .boolean()\n .optional()\n .describe(\n 'Issue the request as a domain administrator; if set to true, then the requester ' +\n 'will be granted access if they are an administrator of the domain to which the ' +\n 'shared drive belongs.',\n ),\n }),\n output: SharedDrive,\n};\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { drive_v3 } from '@googleapis/drive';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import { type Operation } from '../lib/operation.js';
|
|
4
|
+
/**
|
|
5
|
+
* `operation()` bound to the Drive client. Every drive op's `index.ts` uses
|
|
6
|
+
* this instead of the raw `operation()` so the handler's client is always
|
|
7
|
+
* `drive_v3.Drive`: a handler that drops or mistypes its client annotation
|
|
8
|
+
* fails here (the client can no longer silently infer `unknown` and slip into
|
|
9
|
+
* the registry) rather than surfacing as a confusing `unknown` deep in the body.
|
|
10
|
+
*/
|
|
11
|
+
export declare const driveOperation: <In extends z.ZodObject, Out extends z.ZodObject>(def: Operation<drive_v3.Drive, In, Out>) => Operation<drive_v3.Drive, In, Out>;
|
|
12
|
+
//# sourceMappingURL=operation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/drive/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,qBAAqB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,EAAE,SAAS,CAAC,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC,CAAC,SAAS,EAC5E,KAAK,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,GAAG,CAAC,KACtC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,GAAG,CAAmB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { operation } from '../lib/operation.js';
|
|
2
|
+
/**
|
|
3
|
+
* `operation()` bound to the Drive client. Every drive op's `index.ts` uses
|
|
4
|
+
* this instead of the raw `operation()` so the handler's client is always
|
|
5
|
+
* `drive_v3.Drive`: a handler that drops or mistypes its client annotation
|
|
6
|
+
* fails here (the client can no longer silently infer `unknown` and slip into
|
|
7
|
+
* the registry) rather than surfacing as a confusing `unknown` deep in the body.
|
|
8
|
+
*/
|
|
9
|
+
export const driveOperation = (def) => operation(def);
|
|
10
|
+
//# sourceMappingURL=operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../src/drive/operation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,GAAuC,EACH,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC","sourcesContent":["import type { drive_v3 } from '@googleapis/drive';\nimport type { z } from 'zod';\nimport { type Operation, operation } from '../lib/operation.js';\n\n/**\n * `operation()` bound to the Drive client. Every drive op's `index.ts` uses\n * this instead of the raw `operation()` so the handler's client is always\n * `drive_v3.Drive`: a handler that drops or mistypes its client annotation\n * fails here (the client can no longer silently infer `unknown` and slip into\n * the registry) rather than surfacing as a confusing `unknown` deep in the body.\n */\nexport const driveOperation = <In extends z.ZodObject, Out extends z.ZodObject>(\n def: Operation<drive_v3.Drive, In, Out>,\n): Operation<drive_v3.Drive, In, Out> => operation(def);\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { drive_v3 } from '@googleapis/drive';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { schema } from './schema.js';
|
|
4
|
+
export declare function handler(drive: drive_v3.Drive, args: z.infer<typeof schema.input>): Promise<z.infer<typeof schema.output>>;
|
|
5
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/copy_file/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAsB,OAAO,CAC3B,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAaxC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { forGoogle } from '../../../lib/google.js';
|
|
2
|
+
import { projectFile, TOOL_FILE_FIELDS } from '../../lib/file.js';
|
|
3
|
+
export async function handler(drive, args) {
|
|
4
|
+
const { data } = await drive.files.copy(forGoogle({
|
|
5
|
+
fileId: args.fileId,
|
|
6
|
+
requestBody: forGoogle({
|
|
7
|
+
name: args.title,
|
|
8
|
+
parents: args.parentId ? [args.parentId] : undefined,
|
|
9
|
+
}),
|
|
10
|
+
fields: TOOL_FILE_FIELDS,
|
|
11
|
+
supportsAllDrives: true,
|
|
12
|
+
}));
|
|
13
|
+
return projectFile(data);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/drive/tools/copy_file/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGlE,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,KAAqB,EACrB,IAAkC;IAElC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,CACrC,SAAS,CAAC;QACR,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,WAAW,EAAE,SAAS,CAAC;YACrB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;SACrD,CAAC;QACF,MAAM,EAAE,gBAAgB;QACxB,iBAAiB,EAAE,IAAI;KACxB,CAAC,CACH,CAAC;IACF,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import type { drive_v3 } from '@googleapis/drive';\nimport type { z } from 'zod';\nimport { forGoogle } from '../../../lib/google.js';\nimport { projectFile, TOOL_FILE_FIELDS } from '../../lib/file.js';\nimport type { schema } from './schema.js';\n\nexport async function handler(\n drive: drive_v3.Drive,\n args: z.infer<typeof schema.input>,\n): Promise<z.infer<typeof schema.output>> {\n const { data } = await drive.files.copy(\n forGoogle({\n fileId: args.fileId,\n requestBody: forGoogle({\n name: args.title,\n parents: args.parentId ? [args.parentId] : undefined,\n }),\n fields: TOOL_FILE_FIELDS,\n supportsAllDrives: true,\n }),\n );\n return projectFile(data);\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const copy_file: import("../../../lib/operation.js").Operation<import("@googleapis/drive").drive_v3.Drive, import("zod").ZodObject<{
|
|
2
|
+
fileId: import("zod").ZodString;
|
|
3
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
6
|
+
id: import("zod").ZodString;
|
|
7
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
21
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
22
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
23
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
25
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
26
|
+
}, import("zod/v4/core").$strip>>;
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/copy_file/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;iCAcpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { driveOperation } from '../../operation.js';
|
|
2
|
+
import { handler } from './handler.js';
|
|
3
|
+
import { schema } from './schema.js';
|
|
4
|
+
export const copy_file = driveOperation({
|
|
5
|
+
description: 'Copy an existing file in Drive, optionally with a new title and parent folder. With no ' +
|
|
6
|
+
"title the copy is named 'Copy of [original title]'; with no parent it lands beside the " +
|
|
7
|
+
"original, or in the user's root folder if write access is unavailable.",
|
|
8
|
+
annotations: {
|
|
9
|
+
readOnlyHint: false,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
14
|
+
source: 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/copy_file',
|
|
15
|
+
schema,
|
|
16
|
+
handler,
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/drive/tools/copy_file/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,SAAS,GAAG,cAAc,CAAC;IACtC,WAAW,EACT,yFAAyF;QACzF,yFAAyF;QACzF,wEAAwE;IAC1E,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,IAAI;KACpB;IACD,MAAM,EAAE,sFAAsF;IAC9F,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { driveOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\nexport const copy_file = driveOperation({\n description:\n 'Copy an existing file in Drive, optionally with a new title and parent folder. With no ' +\n \"title the copy is named 'Copy of [original title]'; with no parent it lands beside the \" +\n \"original, or in the user's root folder if write access is unavailable.\",\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n },\n source: 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/copy_file',\n schema,\n handler,\n});\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
input: z.ZodObject<{
|
|
4
|
+
fileId: z.ZodString;
|
|
5
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
output: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
title: z.ZodOptional<z.ZodString>;
|
|
11
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
13
|
+
fileSize: z.ZodOptional<z.ZodString>;
|
|
14
|
+
description: z.ZodOptional<z.ZodString>;
|
|
15
|
+
fileExtension: z.ZodOptional<z.ZodString>;
|
|
16
|
+
contentSnippet: z.ZodOptional<z.ZodString>;
|
|
17
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
18
|
+
sharedWithMeTime: z.ZodOptional<z.ZodString>;
|
|
19
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
20
|
+
modifiedTime: z.ZodOptional<z.ZodString>;
|
|
21
|
+
viewedByMeTime: z.ZodOptional<z.ZodString>;
|
|
22
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
23
|
+
canAddChildren: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
trashed: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
folderColorRgb: z.ZodOptional<z.ZodString>;
|
|
27
|
+
copyRequiresWriterPermission: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
writersCanShare: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/copy_file/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBlB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { File } from '../../entities/File.js';
|
|
3
|
+
export const schema = {
|
|
4
|
+
input: z.object({
|
|
5
|
+
fileId: z.string().describe('The ID of the file to copy.'),
|
|
6
|
+
title: z
|
|
7
|
+
.string()
|
|
8
|
+
.optional()
|
|
9
|
+
.describe("The title of the newly created file. If empty, the title will be 'Copy of [original file title]'."),
|
|
10
|
+
parentId: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe('The parent id of the newly created file. If empty, the file will be created with the ' +
|
|
14
|
+
'same parent as the original file.'),
|
|
15
|
+
}),
|
|
16
|
+
output: File,
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/drive/tools/copy_file/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QAC1D,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,mGAAmG,CACpG;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,uFAAuF;YACrF,mCAAmC,CACtC;KACJ,CAAC;IACF,MAAM,EAAE,IAAI;CACb,CAAC","sourcesContent":["import { z } from 'zod';\nimport { File } from '../../entities/File.js';\n\nexport const schema = {\n input: z.object({\n fileId: z.string().describe('The ID of the file to copy.'),\n title: z\n .string()\n .optional()\n .describe(\n \"The title of the newly created file. If empty, the title will be 'Copy of [original file title]'.\",\n ),\n parentId: z\n .string()\n .optional()\n .describe(\n 'The parent id of the newly created file. If empty, the file will be created with the ' +\n 'same parent as the original file.',\n ),\n }),\n output: File,\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { drive_v3 } from '@googleapis/drive';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { schema } from './schema.js';
|
|
4
|
+
export declare function handler(drive: drive_v3.Drive, args: z.infer<typeof schema.input>): Promise<z.infer<typeof schema.output>>;
|
|
5
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/create_file/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQ1C,wBAAsB,OAAO,CAC3B,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAwCxC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Readable } from 'node:stream';
|
|
2
|
+
import { forGoogle } from '../../../lib/google.js';
|
|
3
|
+
import { projectFile, TOOL_FILE_FIELDS } from '../../lib/file.js';
|
|
4
|
+
/** The documented auto-conversions from uploaded content types to Google editor types. */
|
|
5
|
+
const CONVERSIONS = {
|
|
6
|
+
'text/plain': 'application/vnd.google-apps.document',
|
|
7
|
+
'text/csv': 'application/vnd.google-apps.spreadsheet',
|
|
8
|
+
};
|
|
9
|
+
export async function handler(drive, args) {
|
|
10
|
+
if (args.textContent !== undefined && args.base64Content !== undefined) {
|
|
11
|
+
throw new Error('textContent and base64Content cannot both be set.');
|
|
12
|
+
}
|
|
13
|
+
const hasContent = args.textContent !== undefined || args.base64Content !== undefined;
|
|
14
|
+
if (hasContent && !args.contentMimeType) {
|
|
15
|
+
throw new Error('contentMimeType is required when providing content.');
|
|
16
|
+
}
|
|
17
|
+
// Converting an upload means creating the file as the Google editor type
|
|
18
|
+
// while the media carries the uploaded content type.
|
|
19
|
+
const converted = hasContent && !args.disableConversionToGoogleType && args.contentMimeType
|
|
20
|
+
? CONVERSIONS[args.contentMimeType]
|
|
21
|
+
: undefined;
|
|
22
|
+
const requestBody = forGoogle({
|
|
23
|
+
name: args.title,
|
|
24
|
+
parents: args.parentId ? [args.parentId] : undefined,
|
|
25
|
+
mimeType: converted ?? (hasContent ? undefined : args.contentMimeType),
|
|
26
|
+
});
|
|
27
|
+
const { data } = await drive.files.create(forGoogle({
|
|
28
|
+
requestBody,
|
|
29
|
+
media: hasContent && args.contentMimeType
|
|
30
|
+
? {
|
|
31
|
+
mimeType: args.contentMimeType,
|
|
32
|
+
body: args.textContent !== undefined
|
|
33
|
+
? args.textContent
|
|
34
|
+
: Readable.from(Buffer.from(args.base64Content ?? '', 'base64')),
|
|
35
|
+
}
|
|
36
|
+
: undefined,
|
|
37
|
+
fields: TOOL_FILE_FIELDS,
|
|
38
|
+
supportsAllDrives: true,
|
|
39
|
+
}));
|
|
40
|
+
return projectFile(data);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/drive/tools/create_file/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGlE,0FAA0F;AAC1F,MAAM,WAAW,GAA2B;IAC1C,YAAY,EAAE,sCAAsC;IACpD,UAAU,EAAE,yCAAyC;CACtD,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,KAAqB,EACrB,IAAkC;IAElC,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,CAAC;IACtF,IAAI,UAAU,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,yEAAyE;IACzE,qDAAqD;IACrD,MAAM,SAAS,GACb,UAAU,IAAI,CAAC,IAAI,CAAC,6BAA6B,IAAI,IAAI,CAAC,eAAe;QACvE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC;QACnC,CAAC,CAAC,SAAS,CAAC;IAEhB,MAAM,WAAW,GAAG,SAAS,CAAC;QAC5B,IAAI,EAAE,IAAI,CAAC,KAAK;QAChB,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;QACpD,QAAQ,EAAE,SAAS,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC;KACvE,CAAC,CAAC;IAEH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CACvC,SAAS,CAAC;QACR,WAAW;QACX,KAAK,EACH,UAAU,IAAI,IAAI,CAAC,eAAe;YAChC,CAAC,CAAC;gBACE,QAAQ,EAAE,IAAI,CAAC,eAAe;gBAC9B,IAAI,EACF,IAAI,CAAC,WAAW,KAAK,SAAS;oBAC5B,CAAC,CAAC,IAAI,CAAC,WAAW;oBAClB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;aACrE;YACH,CAAC,CAAC,SAAS;QACf,MAAM,EAAE,gBAAgB;QACxB,iBAAiB,EAAE,IAAI;KACxB,CAAC,CACH,CAAC;IACF,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import { Readable } from 'node:stream';\nimport type { drive_v3 } from '@googleapis/drive';\nimport type { z } from 'zod';\nimport { forGoogle } from '../../../lib/google.js';\nimport { projectFile, TOOL_FILE_FIELDS } from '../../lib/file.js';\nimport type { schema } from './schema.js';\n\n/** The documented auto-conversions from uploaded content types to Google editor types. */\nconst CONVERSIONS: Record<string, string> = {\n 'text/plain': 'application/vnd.google-apps.document',\n 'text/csv': 'application/vnd.google-apps.spreadsheet',\n};\n\nexport async function handler(\n drive: drive_v3.Drive,\n args: z.infer<typeof schema.input>,\n): Promise<z.infer<typeof schema.output>> {\n if (args.textContent !== undefined && args.base64Content !== undefined) {\n throw new Error('textContent and base64Content cannot both be set.');\n }\n const hasContent = args.textContent !== undefined || args.base64Content !== undefined;\n if (hasContent && !args.contentMimeType) {\n throw new Error('contentMimeType is required when providing content.');\n }\n\n // Converting an upload means creating the file as the Google editor type\n // while the media carries the uploaded content type.\n const converted =\n hasContent && !args.disableConversionToGoogleType && args.contentMimeType\n ? CONVERSIONS[args.contentMimeType]\n : undefined;\n\n const requestBody = forGoogle({\n name: args.title,\n parents: args.parentId ? [args.parentId] : undefined,\n mimeType: converted ?? (hasContent ? undefined : args.contentMimeType),\n });\n\n const { data } = await drive.files.create(\n forGoogle({\n requestBody,\n media:\n hasContent && args.contentMimeType\n ? {\n mimeType: args.contentMimeType,\n body:\n args.textContent !== undefined\n ? args.textContent\n : Readable.from(Buffer.from(args.base64Content ?? '', 'base64')),\n }\n : undefined,\n fields: TOOL_FILE_FIELDS,\n supportsAllDrives: true,\n }),\n );\n return projectFile(data);\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const create_file: import("../../../lib/operation.js").Operation<import("@googleapis/drive").drive_v3.Drive, import("zod").ZodObject<{
|
|
2
|
+
title: import("zod").ZodString;
|
|
3
|
+
contentMimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4
|
+
textContent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5
|
+
base64Content: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
+
disableConversionToGoogleType: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
8
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
9
|
+
id: import("zod").ZodString;
|
|
10
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
24
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
25
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
26
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
28
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
29
|
+
}, import("zod/v4/core").$strip>>;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/create_file/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAetB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { driveOperation } from '../../operation.js';
|
|
2
|
+
import { handler } from './handler.js';
|
|
3
|
+
import { schema } from './schema.js';
|
|
4
|
+
export const create_file = driveOperation({
|
|
5
|
+
description: 'Create or upload a file to Drive. Supply text content as UTF-8 or base64-encode ' +
|
|
6
|
+
'non-UTF8 data; text/plain converts to Google Docs and text/csv to Google Sheets unless ' +
|
|
7
|
+
'disableConversionToGoogleType is set, and Google-native types (Docs, Sheets, Slides) ' +
|
|
8
|
+
'can be created without content.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
idempotentHint: false,
|
|
13
|
+
openWorldHint: true,
|
|
14
|
+
},
|
|
15
|
+
source: 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/create_file',
|
|
16
|
+
schema,
|
|
17
|
+
handler,
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/drive/tools/create_file/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC;IACxC,WAAW,EACT,kFAAkF;QAClF,yFAAyF;QACzF,uFAAuF;QACvF,iCAAiC;IACnC,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,IAAI;KACpB;IACD,MAAM,EAAE,wFAAwF;IAChG,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { driveOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\nexport const create_file = driveOperation({\n description:\n 'Create or upload a file to Drive. Supply text content as UTF-8 or base64-encode ' +\n 'non-UTF8 data; text/plain converts to Google Docs and text/csv to Google Sheets unless ' +\n 'disableConversionToGoogleType is set, and Google-native types (Docs, Sheets, Slides) ' +\n 'can be created without content.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n },\n source: 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/create_file',\n schema,\n handler,\n});\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
input: z.ZodObject<{
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
contentMimeType: z.ZodOptional<z.ZodString>;
|
|
6
|
+
textContent: z.ZodOptional<z.ZodString>;
|
|
7
|
+
base64Content: z.ZodOptional<z.ZodString>;
|
|
8
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
disableConversionToGoogleType: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
output: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
title: z.ZodOptional<z.ZodString>;
|
|
14
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
16
|
+
fileSize: z.ZodOptional<z.ZodString>;
|
|
17
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18
|
+
fileExtension: z.ZodOptional<z.ZodString>;
|
|
19
|
+
contentSnippet: z.ZodOptional<z.ZodString>;
|
|
20
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
21
|
+
sharedWithMeTime: z.ZodOptional<z.ZodString>;
|
|
22
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
23
|
+
modifiedTime: z.ZodOptional<z.ZodString>;
|
|
24
|
+
viewedByMeTime: z.ZodOptional<z.ZodString>;
|
|
25
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
26
|
+
canAddChildren: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
trashed: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
folderColorRgb: z.ZodOptional<z.ZodString>;
|
|
30
|
+
copyRequiresWriterPermission: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
writersCanShare: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/create_file/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { File } from '../../entities/File.js';
|
|
3
|
+
export const schema = {
|
|
4
|
+
input: z.object({
|
|
5
|
+
title: z.string().describe('The title of the file.'),
|
|
6
|
+
contentMimeType: z
|
|
7
|
+
.string()
|
|
8
|
+
.optional()
|
|
9
|
+
.describe('MIME type of the content being uploaded; required when providing content. ' +
|
|
10
|
+
'Google-native types (e.g. application/vnd.google-apps.document) can be created ' +
|
|
11
|
+
'without content.'),
|
|
12
|
+
textContent: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('UTF-8 text content to upload; cannot be set with base64Content.'),
|
|
16
|
+
base64Content: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Base64-encoded content for non-UTF8 data; cannot be set with textContent.'),
|
|
20
|
+
parentId: z.string().optional().describe('Parent folder ID for the file.'),
|
|
21
|
+
disableConversionToGoogleType: z
|
|
22
|
+
.boolean()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('Set true to retain the content MIME type instead of converting to a Google format ' +
|
|
25
|
+
'(text/plain converts to Google Docs, text/csv to Google Sheets).'),
|
|
26
|
+
}),
|
|
27
|
+
output: File,
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/drive/tools/create_file/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACpD,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,4EAA4E;YAC1E,iFAAiF;YACjF,kBAAkB,CACrB;QACH,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,iEAAiE,CAAC;QAC9E,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,2EAA2E,CAAC;QACxF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QAC1E,6BAA6B,EAAE,CAAC;aAC7B,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,oFAAoF;YAClF,kEAAkE,CACrE;KACJ,CAAC;IACF,MAAM,EAAE,IAAI;CACb,CAAC","sourcesContent":["import { z } from 'zod';\nimport { File } from '../../entities/File.js';\n\nexport const schema = {\n input: z.object({\n title: z.string().describe('The title of the file.'),\n contentMimeType: z\n .string()\n .optional()\n .describe(\n 'MIME type of the content being uploaded; required when providing content. ' +\n 'Google-native types (e.g. application/vnd.google-apps.document) can be created ' +\n 'without content.',\n ),\n textContent: z\n .string()\n .optional()\n .describe('UTF-8 text content to upload; cannot be set with base64Content.'),\n base64Content: z\n .string()\n .optional()\n .describe('Base64-encoded content for non-UTF8 data; cannot be set with textContent.'),\n parentId: z.string().optional().describe('Parent folder ID for the file.'),\n disableConversionToGoogleType: z\n .boolean()\n .optional()\n .describe(\n 'Set true to retain the content MIME type instead of converting to a Google format ' +\n '(text/plain converts to Google Docs, text/csv to Google Sheets).',\n ),\n }),\n output: File,\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { drive_v3 } from '@googleapis/drive';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { schema } from './schema.js';
|
|
4
|
+
export declare function handler(drive: drive_v3.Drive, args: z.infer<typeof schema.input>): Promise<z.infer<typeof schema.output>>;
|
|
5
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/download_file_content/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAsB,OAAO,CAC3B,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAuCxC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isGoogleNative, MAX_DOWNLOAD_BYTES } from '../../lib/content.js';
|
|
2
|
+
export async function handler(drive, args) {
|
|
3
|
+
const { data: meta } = await drive.files.get({
|
|
4
|
+
fileId: args.fileId,
|
|
5
|
+
fields: 'id,name,mimeType,size',
|
|
6
|
+
supportsAllDrives: true,
|
|
7
|
+
});
|
|
8
|
+
const mimeType = meta.mimeType ?? '';
|
|
9
|
+
let bytes;
|
|
10
|
+
let contentMime = mimeType;
|
|
11
|
+
if (isGoogleNative(mimeType)) {
|
|
12
|
+
contentMime = args.exportMimeType ?? 'text/plain';
|
|
13
|
+
const res = await drive.files.export({ fileId: args.fileId, mimeType: contentMime }, { responseType: 'arraybuffer' });
|
|
14
|
+
bytes = Buffer.from(res.data);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const size = Number(meta.size ?? 0);
|
|
18
|
+
if (size > MAX_DOWNLOAD_BYTES) {
|
|
19
|
+
throw new Error(`File is ${size} bytes; this server caps base64 downloads at ${MAX_DOWNLOAD_BYTES} bytes ` +
|
|
20
|
+
'(25 MiB). Larger transfers are deferred to ' +
|
|
21
|
+
'https://github.com/simiancraft/google-mcp-suite/issues/38.');
|
|
22
|
+
}
|
|
23
|
+
const res = await drive.files.get({ fileId: args.fileId, alt: 'media', supportsAllDrives: true }, { responseType: 'arraybuffer' });
|
|
24
|
+
bytes = Buffer.from(res.data);
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
id: meta.id ?? args.fileId,
|
|
28
|
+
title: meta.name ?? undefined,
|
|
29
|
+
mimeType: contentMime || undefined,
|
|
30
|
+
content: bytes.toString('base64'),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/drive/tools/download_file_content/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1E,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,KAAqB,EACrB,IAAkC;IAElC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;QAC3C,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE,uBAAuB;QAC/B,iBAAiB,EAAE,IAAI;KACxB,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IAErC,IAAI,KAAa,CAAC;IAClB,IAAI,WAAW,GAAG,QAAQ,CAAC;IAC3B,IAAI,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,WAAW,GAAG,IAAI,CAAC,cAAc,IAAI,YAAY,CAAC;QAClD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CAClC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,EAC9C,EAAE,YAAY,EAAE,aAAa,EAAE,CAChC,CAAC;QACF,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAmB,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QACpC,IAAI,IAAI,GAAG,kBAAkB,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CACb,WAAW,IAAI,gDAAgD,kBAAkB,SAAS;gBACxF,6CAA6C;gBAC7C,4DAA4D,CAC/D,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAC/B,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,EAC9D,EAAE,YAAY,EAAE,aAAa,EAAE,CAChC,CAAC;QACF,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAmB,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,MAAM;QAC1B,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS;QAC7B,QAAQ,EAAE,WAAW,IAAI,SAAS;QAClC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;KAClC,CAAC;AACJ,CAAC","sourcesContent":["import type { drive_v3 } from '@googleapis/drive';\nimport type { z } from 'zod';\nimport { isGoogleNative, MAX_DOWNLOAD_BYTES } from '../../lib/content.js';\nimport type { schema } from './schema.js';\n\nexport async function handler(\n drive: drive_v3.Drive,\n args: z.infer<typeof schema.input>,\n): Promise<z.infer<typeof schema.output>> {\n const { data: meta } = await drive.files.get({\n fileId: args.fileId,\n fields: 'id,name,mimeType,size',\n supportsAllDrives: true,\n });\n const mimeType = meta.mimeType ?? '';\n\n let bytes: Buffer;\n let contentMime = mimeType;\n if (isGoogleNative(mimeType)) {\n contentMime = args.exportMimeType ?? 'text/plain';\n const res = await drive.files.export(\n { fileId: args.fileId, mimeType: contentMime },\n { responseType: 'arraybuffer' },\n );\n bytes = Buffer.from(res.data as ArrayBuffer);\n } else {\n const size = Number(meta.size ?? 0);\n if (size > MAX_DOWNLOAD_BYTES) {\n throw new Error(\n `File is ${size} bytes; this server caps base64 downloads at ${MAX_DOWNLOAD_BYTES} bytes ` +\n '(25 MiB). Larger transfers are deferred to ' +\n 'https://github.com/simiancraft/google-mcp-suite/issues/38.',\n );\n }\n const res = await drive.files.get(\n { fileId: args.fileId, alt: 'media', supportsAllDrives: true },\n { responseType: 'arraybuffer' },\n );\n bytes = Buffer.from(res.data as ArrayBuffer);\n }\n\n return {\n id: meta.id ?? args.fileId,\n title: meta.name ?? undefined,\n mimeType: contentMime || undefined,\n content: bytes.toString('base64'),\n };\n}\n"]}
|