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,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A shared drive: a Drive space owned by an organization rather than an
|
|
4
|
+
* individual, whose top-level folder shares the drive's ID. The REST resource
|
|
5
|
+
* is named `drives`; the wing says "shared drive" (Google's prose noun) so a
|
|
6
|
+
* wire name like delete_shared_drive cannot be misread as something
|
|
7
|
+
* account-wide.
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/drive/api/guides/manage-shareddrives
|
|
10
|
+
*/
|
|
11
|
+
export declare const SharedDrive: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
name: z.ZodOptional<z.ZodString>;
|
|
14
|
+
colorRgb: z.ZodOptional<z.ZodString>;
|
|
15
|
+
themeId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
backgroundImageLink: z.ZodOptional<z.ZodString>;
|
|
17
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
18
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
restrictions: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
adminManagedRestrictions: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
copyRequiresWriterPermission: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
domainUsersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
driveMembersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
sharingFoldersRequiresOrganizerPermission: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type SharedDrive = z.infer<typeof SharedDrive>;
|
|
28
|
+
//# sourceMappingURL=SharedDrive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedDrive.d.ts","sourceRoot":"","sources":["../../../src/drive/entities/SharedDrive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;iBAmEtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A shared drive: a Drive space owned by an organization rather than an
|
|
4
|
+
* individual, whose top-level folder shares the drive's ID. The REST resource
|
|
5
|
+
* is named `drives`; the wing says "shared drive" (Google's prose noun) so a
|
|
6
|
+
* wire name like delete_shared_drive cannot be misread as something
|
|
7
|
+
* account-wide.
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/drive/api/guides/manage-shareddrives
|
|
10
|
+
*/
|
|
11
|
+
export const SharedDrive = z.object({
|
|
12
|
+
id: z
|
|
13
|
+
.string()
|
|
14
|
+
.describe('Output only. The ID of this shared drive which is also the ID of the top level ' +
|
|
15
|
+
'folder of this shared drive.'),
|
|
16
|
+
name: z.string().optional().describe('The name of this shared drive.'),
|
|
17
|
+
colorRgb: z
|
|
18
|
+
.string()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('The color of this shared drive as an RGB hex string. It can only be set on a ' +
|
|
21
|
+
'drives.update request that does not set themeId.'),
|
|
22
|
+
themeId: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('The ID of the theme from which the background image and color will be set. The set ' +
|
|
26
|
+
'of possible driveThemes can be retrieved from a get_about response.'),
|
|
27
|
+
backgroundImageLink: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Output only. A short-lived link to this shared drive's background image."),
|
|
31
|
+
createdTime: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('The time at which the shared drive was created (RFC 3339 date-time).'),
|
|
35
|
+
hidden: z.boolean().optional().describe('Whether the shared drive is hidden from default view.'),
|
|
36
|
+
restrictions: z
|
|
37
|
+
.object({
|
|
38
|
+
adminManagedRestrictions: z
|
|
39
|
+
.boolean()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe('Whether administrative privileges on this shared drive are required to modify restrictions.'),
|
|
42
|
+
copyRequiresWriterPermission: z
|
|
43
|
+
.boolean()
|
|
44
|
+
.optional()
|
|
45
|
+
.describe('Whether the options to copy, print, or download files inside this shared drive ' +
|
|
46
|
+
'should be disabled for readers and commenters.'),
|
|
47
|
+
domainUsersOnly: z
|
|
48
|
+
.boolean()
|
|
49
|
+
.optional()
|
|
50
|
+
.describe('Whether access to this shared drive and items inside it is restricted to users ' +
|
|
51
|
+
'of the domain to which this shared drive belongs.'),
|
|
52
|
+
driveMembersOnly: z
|
|
53
|
+
.boolean()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe('Whether access to items inside this shared drive is restricted to its members.'),
|
|
56
|
+
sharingFoldersRequiresOrganizerPermission: z
|
|
57
|
+
.boolean()
|
|
58
|
+
.optional()
|
|
59
|
+
.describe('If true, only users with the organizer role can share folders. If false, users ' +
|
|
60
|
+
'with either the organizer role or the file organizer role can share folders.'),
|
|
61
|
+
})
|
|
62
|
+
.optional()
|
|
63
|
+
.describe('A set of restrictions that apply to this shared drive or items inside it.'),
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=SharedDrive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedDrive.js","sourceRoot":"","sources":["../../../src/drive/entities/SharedDrive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,CACP,iFAAiF;QAC/E,8BAA8B,CACjC;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACtE,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,+EAA+E;QAC7E,kDAAkD,CACrD;IACH,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,qFAAqF;QACnF,qEAAqE,CACxE;IACH,mBAAmB,EAAE,CAAC;SACnB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,0EAA0E,CAAC;IACvF,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,sEAAsE,CAAC;IACnF,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IAChG,YAAY,EAAE,CAAC;SACZ,MAAM,CAAC;QACN,wBAAwB,EAAE,CAAC;aACxB,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,6FAA6F,CAC9F;QACH,4BAA4B,EAAE,CAAC;aAC5B,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,iFAAiF;YAC/E,gDAAgD,CACnD;QACH,eAAe,EAAE,CAAC;aACf,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,iFAAiF;YAC/E,mDAAmD,CACtD;QACH,gBAAgB,EAAE,CAAC;aAChB,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CAAC,gFAAgF,CAAC;QAC7F,yCAAyC,EAAE,CAAC;aACzC,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,iFAAiF;YAC/E,8EAA8E,CACjF;KACJ,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,2EAA2E,CAAC;CACzF,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * A shared drive: a Drive space owned by an organization rather than an\n * individual, whose top-level folder shares the drive's ID. The REST resource\n * is named `drives`; the wing says \"shared drive\" (Google's prose noun) so a\n * wire name like delete_shared_drive cannot be misread as something\n * account-wide.\n *\n * @see https://developers.google.com/workspace/drive/api/guides/manage-shareddrives\n */\nexport const SharedDrive = z.object({\n id: z\n .string()\n .describe(\n 'Output only. The ID of this shared drive which is also the ID of the top level ' +\n 'folder of this shared drive.',\n ),\n name: z.string().optional().describe('The name of 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 'drives.update 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 backgroundImageLink: z\n .string()\n .optional()\n .describe(\"Output only. A short-lived link to this shared drive's background image.\"),\n createdTime: z\n .string()\n .optional()\n .describe('The time at which the shared drive was created (RFC 3339 date-time).'),\n hidden: z.boolean().optional().describe('Whether the shared drive is hidden from default view.'),\n restrictions: z\n .object({\n adminManagedRestrictions: z\n .boolean()\n .optional()\n .describe(\n 'Whether administrative privileges on this shared drive are required to modify restrictions.',\n ),\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('Whether access to items inside this shared drive is restricted to its members.'),\n sharingFoldersRequiresOrganizerPermission: z\n .boolean()\n .optional()\n .describe(\n 'If true, only users with the organizer role can share folders. If false, users ' +\n 'with either the organizer role or the file organizer role can share folders.',\n ),\n })\n .optional()\n .describe('A set of restrictions that apply to this shared drive or items inside it.'),\n});\n\nexport type SharedDrive = z.infer<typeof SharedDrive>;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A Drive user as surfaced on comments, replies, and revisions (the author
|
|
4
|
+
* and last-modifying-user fields). Drive does not populate the author's email
|
|
5
|
+
* address on comments and replies.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/drive/api/reference/rest/v3/User
|
|
8
|
+
*/
|
|
9
|
+
export declare const User: z.ZodObject<{
|
|
10
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
11
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
12
|
+
me: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
photoLink: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type User = z.infer<typeof User>;
|
|
16
|
+
//# sourceMappingURL=User.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/drive/entities/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,IAAI;;;;;iBAiBf,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A Drive user as surfaced on comments, replies, and revisions (the author
|
|
4
|
+
* and last-modifying-user fields). Drive does not populate the author's email
|
|
5
|
+
* address on comments and replies.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/drive/api/reference/rest/v3/User
|
|
8
|
+
*/
|
|
9
|
+
export const User = z.object({
|
|
10
|
+
displayName: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe('Output only. A plain text displayable name for this user.'),
|
|
14
|
+
emailAddress: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Output only. The email address of the user. This may not be present in certain ' +
|
|
18
|
+
'contexts if the user has not made their email address visible to the requester.'),
|
|
19
|
+
me: z.boolean().optional().describe('Output only. Whether this user is the requesting user.'),
|
|
20
|
+
photoLink: z
|
|
21
|
+
.string()
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("Output only. A link to the user's profile photo, if available."),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=User.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/drive/entities/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2DAA2D,CAAC;IACxE,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,iFAAiF;QAC/E,iFAAiF,CACpF;IACH,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IAC7F,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;CAC9E,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * A Drive user as surfaced on comments, replies, and revisions (the author\n * and last-modifying-user fields). Drive does not populate the author's email\n * address on comments and replies.\n *\n * @see https://developers.google.com/workspace/drive/api/reference/rest/v3/User\n */\nexport const User = z.object({\n displayName: z\n .string()\n .optional()\n .describe('Output only. A plain text displayable name for this user.'),\n emailAddress: z\n .string()\n .optional()\n .describe(\n 'Output only. The email address of the user. This may not be present in certain ' +\n 'contexts if the user has not made their email address visible to the requester.',\n ),\n me: z.boolean().optional().describe('Output only. Whether this user is the requesting user.'),\n photoLink: z\n .string()\n .optional()\n .describe(\"Output only. A link to the user's profile photo, if available.\"),\n});\n\nexport type User = z.infer<typeof User>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drive/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { drive } from '@googleapis/drive';
|
|
3
|
+
import { authorizedClient, runAuthFlow } from '../auth/oauth.js';
|
|
4
|
+
import { mergeOperations } from '../lib/operation.js';
|
|
5
|
+
import { server } from '../lib/server.js';
|
|
6
|
+
import { instructions } from './instructions.js';
|
|
7
|
+
import { methods } from './methods/registry.js';
|
|
8
|
+
import { tools } from './tools/registry.js';
|
|
9
|
+
// Cloning this for a new service? Add that service's OAuth scopes to `SCOPES` in
|
|
10
|
+
// src/auth/config.ts BEFORE the first auth. The scope union is front-loaded so each
|
|
11
|
+
// account consents once, and Google only re-issues a refresh token on a fresh grant;
|
|
12
|
+
// adding a scope later forces re-consent of every account. Nothing in this file
|
|
13
|
+
// references scopes, which is exactly why it is easy to miss.
|
|
14
|
+
await server({
|
|
15
|
+
name: 'drive',
|
|
16
|
+
title: 'Google Drive (google-mcp-suite)',
|
|
17
|
+
description: 'Per-account Google Drive MCP server: files, comments, revisions, and shared drives.',
|
|
18
|
+
instructions,
|
|
19
|
+
operations: mergeOperations(tools, methods),
|
|
20
|
+
client: async (account) => drive({ version: 'v3', auth: await authorizedClient(account) }),
|
|
21
|
+
runAuth: runAuthFlow,
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drive/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,iFAAiF;AACjF,oFAAoF;AACpF,qFAAqF;AACrF,gFAAgF;AAChF,8DAA8D;AAC9D,MAAM,MAAM,CAAC;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,qFAAqF;IACvF,YAAY;IACZ,UAAU,EAAE,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC;IAC3C,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1F,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { drive } from '@googleapis/drive';\nimport { authorizedClient, runAuthFlow } from '../auth/oauth.js';\nimport { mergeOperations } from '../lib/operation.js';\nimport { server } from '../lib/server.js';\nimport { instructions } from './instructions.js';\nimport { methods } from './methods/registry.js';\nimport { tools } from './tools/registry.js';\n\n// Cloning this for a new service? Add that service's OAuth scopes to `SCOPES` in\n// src/auth/config.ts BEFORE the first auth. The scope union is front-loaded so each\n// account consents once, and Google only re-issues a refresh token on a fresh grant;\n// adding a scope later forces re-consent of every account. Nothing in this file\n// references scopes, which is exactly why it is easy to miss.\nawait server({\n name: 'drive',\n title: 'Google Drive (google-mcp-suite)',\n description:\n 'Per-account Google Drive MCP server: files, comments, revisions, and shared drives.',\n instructions,\n operations: mergeOperations(tools, methods),\n client: async (account) => drive({ version: 'v3', auth: await authorizedClient(account) }),\n runAuth: runAuthFlow,\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/drive/instructions.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,QAgB+B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Served in the MCP initialize result; see `ServerOptions.instructions` in
|
|
3
|
+
* src/lib/server.ts. A standalone module so tests can pin the content without
|
|
4
|
+
* booting the server (index.ts's import side effect is `await server()`).
|
|
5
|
+
*/
|
|
6
|
+
import { SOURCE_META_KEY } from '../lib/operation.js';
|
|
7
|
+
import { identityInstructions } from '../lib/server.js';
|
|
8
|
+
export const instructions = identityInstructions('Google account') +
|
|
9
|
+
"Operation vocabulary transcribes Google's documentation: tools keep the " +
|
|
10
|
+
"MCP toolset's parameter names (title, parentId, pageSize), methods keep " +
|
|
11
|
+
"REST's (fileId, addParents, driveId), and every tools/list entry links " +
|
|
12
|
+
`its source reference page under _meta['${SOURCE_META_KEY}'] and carries ` +
|
|
13
|
+
'the four MCP behavior hints. Heed the hints: delete_file and empty_trash ' +
|
|
14
|
+
'bypass the trash and are unrecoverable; trash_file and untrash_file are ' +
|
|
15
|
+
'the reversible pair, and Drive purges trashed files after about 30 days. ' +
|
|
16
|
+
'search_files speaks its own documented query terms (title, parentId, ' +
|
|
17
|
+
'owner), which this server translates to REST v3 syntax. read_file_content ' +
|
|
18
|
+
'serves text representations (Docs, Sheets, and Slides exports, and ' +
|
|
19
|
+
'text-like blobs); download_file_content returns base64 and refuses blobs ' +
|
|
20
|
+
'over 25 MiB. create_file converts text/plain to Google Docs and text/csv ' +
|
|
21
|
+
'to Google Sheets unless disableConversionToGoogleType is set. Shared ' +
|
|
22
|
+
'drives have their own methods (list_shared_drives through ' +
|
|
23
|
+
'delete_shared_drive), distinct from file operations.';
|
|
24
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/drive/instructions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,CAAC,MAAM,YAAY,GACvB,oBAAoB,CAAC,gBAAgB,CAAC;IACtC,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;IACzE,0CAA0C,eAAe,iBAAiB;IAC1E,2EAA2E;IAC3E,0EAA0E;IAC1E,2EAA2E;IAC3E,uEAAuE;IACvE,4EAA4E;IAC5E,qEAAqE;IACrE,2EAA2E;IAC3E,2EAA2E;IAC3E,uEAAuE;IACvE,4DAA4D;IAC5D,sDAAsD,CAAC","sourcesContent":["/**\n * Served in the MCP initialize result; see `ServerOptions.instructions` in\n * src/lib/server.ts. A standalone module so tests can pin the content without\n * booting the server (index.ts's import side effect is `await server()`).\n */\nimport { SOURCE_META_KEY } from '../lib/operation.js';\nimport { identityInstructions } from '../lib/server.js';\n\nexport const instructions =\n identityInstructions('Google account') +\n \"Operation vocabulary transcribes Google's documentation: tools keep the \" +\n \"MCP toolset's parameter names (title, parentId, pageSize), methods keep \" +\n \"REST's (fileId, addParents, driveId), and every tools/list entry links \" +\n `its source reference page under _meta['${SOURCE_META_KEY}'] and carries ` +\n 'the four MCP behavior hints. Heed the hints: delete_file and empty_trash ' +\n 'bypass the trash and are unrecoverable; trash_file and untrash_file are ' +\n 'the reversible pair, and Drive purges trashed files after about 30 days. ' +\n 'search_files speaks its own documented query terms (title, parentId, ' +\n 'owner), which this server translates to REST v3 syntax. read_file_content ' +\n 'serves text representations (Docs, Sheets, and Slides exports, and ' +\n 'text-like blobs); download_file_content returns base64 and refuses blobs ' +\n 'over 25 MiB. create_file converts text/plain to Google Docs and text/csv ' +\n 'to Google Sheets unless disableConversionToGoogleType is set. Shared ' +\n 'drives have their own methods (list_shared_drives through ' +\n 'delete_shared_drive), distinct from file operations.';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { drive_v3 } from '@googleapis/drive';
|
|
2
|
+
import type { Comment } from '../entities/Comment.js';
|
|
3
|
+
import type { Reply } from '../entities/Reply.js';
|
|
4
|
+
import type { User } from '../entities/User.js';
|
|
5
|
+
/** The `fields` selection backing the Reply projection. */
|
|
6
|
+
export declare const REPLY_FIELDS = "id,content,htmlContent,author(displayName,emailAddress,me,photoLink),createdTime,modifiedTime,deleted,action";
|
|
7
|
+
/** The `fields` selection backing the Comment projection (replies included). */
|
|
8
|
+
export declare const COMMENT_FIELDS: string;
|
|
9
|
+
/** Project a REST user onto the User shape, cleaning nulls to undefined. */
|
|
10
|
+
export declare function projectUser(data: drive_v3.Schema$User): User;
|
|
11
|
+
/** Project a REST reply onto the Reply shape; unknown actions drop rather than masquerade. */
|
|
12
|
+
export declare function projectReply(data: drive_v3.Schema$Reply): Reply;
|
|
13
|
+
/** Project a REST comment onto the Comment shape, replies included. */
|
|
14
|
+
export declare function projectComment(data: drive_v3.Schema$Comment): Comment;
|
|
15
|
+
//# sourceMappingURL=comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/drive/lib/comment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAKhD,2DAA2D;AAC3D,eAAO,MAAM,YAAY,iHAA0F,CAAC;AAEpH,gFAAgF;AAChF,eAAO,MAAM,cAAc,QAE0C,CAAC;AAEtE,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI,CAO5D;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,YAAY,GAAG,KAAK,CAW/D;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,GAAG,OAAO,CAmBrE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { narrow } from '../../lib/enums.js';
|
|
2
|
+
/** The `fields` selection backing the User projection on authors. */
|
|
3
|
+
const USER_FIELDS = 'displayName,emailAddress,me,photoLink';
|
|
4
|
+
/** The `fields` selection backing the Reply projection. */
|
|
5
|
+
export const REPLY_FIELDS = `id,content,htmlContent,author(${USER_FIELDS}),createdTime,modifiedTime,deleted,action`;
|
|
6
|
+
/** The `fields` selection backing the Comment projection (replies included). */
|
|
7
|
+
export const COMMENT_FIELDS = `id,content,htmlContent,author(${USER_FIELDS}),createdTime,modifiedTime,resolved,deleted,` +
|
|
8
|
+
`anchor,quotedFileContent(mimeType,value),replies(${REPLY_FIELDS})`;
|
|
9
|
+
/** Project a REST user onto the User shape, cleaning nulls to undefined. */
|
|
10
|
+
export function projectUser(data) {
|
|
11
|
+
return {
|
|
12
|
+
displayName: data.displayName ?? undefined,
|
|
13
|
+
emailAddress: data.emailAddress ?? undefined,
|
|
14
|
+
me: data.me ?? undefined,
|
|
15
|
+
photoLink: data.photoLink ?? undefined,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Project a REST reply onto the Reply shape; unknown actions drop rather than masquerade. */
|
|
19
|
+
export function projectReply(data) {
|
|
20
|
+
return {
|
|
21
|
+
id: data.id ?? '',
|
|
22
|
+
content: data.content ?? undefined,
|
|
23
|
+
htmlContent: data.htmlContent ?? undefined,
|
|
24
|
+
author: data.author ? projectUser(data.author) : undefined,
|
|
25
|
+
createdTime: data.createdTime ?? undefined,
|
|
26
|
+
modifiedTime: data.modifiedTime ?? undefined,
|
|
27
|
+
deleted: data.deleted ?? undefined,
|
|
28
|
+
action: narrow(data.action, ['resolve', 'reopen']),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** Project a REST comment onto the Comment shape, replies included. */
|
|
32
|
+
export function projectComment(data) {
|
|
33
|
+
return {
|
|
34
|
+
id: data.id ?? '',
|
|
35
|
+
content: data.content ?? undefined,
|
|
36
|
+
htmlContent: data.htmlContent ?? undefined,
|
|
37
|
+
author: data.author ? projectUser(data.author) : undefined,
|
|
38
|
+
createdTime: data.createdTime ?? undefined,
|
|
39
|
+
modifiedTime: data.modifiedTime ?? undefined,
|
|
40
|
+
resolved: data.resolved ?? undefined,
|
|
41
|
+
deleted: data.deleted ?? undefined,
|
|
42
|
+
anchor: data.anchor ?? undefined,
|
|
43
|
+
quotedFileContent: data.quotedFileContent
|
|
44
|
+
? {
|
|
45
|
+
mimeType: data.quotedFileContent.mimeType ?? undefined,
|
|
46
|
+
value: data.quotedFileContent.value ?? undefined,
|
|
47
|
+
}
|
|
48
|
+
: undefined,
|
|
49
|
+
replies: data.replies ? data.replies.map(projectReply) : undefined,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/drive/lib/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK5C,qEAAqE;AACrE,MAAM,WAAW,GAAG,uCAAuC,CAAC;AAE5D,2DAA2D;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAG,iCAAiC,WAAW,2CAA2C,CAAC;AAEpH,gFAAgF;AAChF,MAAM,CAAC,MAAM,cAAc,GACzB,iCAAiC,WAAW,8CAA8C;IAC1F,oDAAoD,YAAY,GAAG,CAAC;AAEtE,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,IAA0B;IACpD,OAAO;QACL,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;QAC5C,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,SAAS;QACxB,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,SAAS;KACvC,CAAC;AACJ,CAAC;AAED,8FAA8F;AAC9F,MAAM,UAAU,YAAY,CAAC,IAA2B;IACtD,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1D,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;QAC5C,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;KACnD,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,cAAc,CAAC,IAA6B;IAC1D,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1D,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;QAC5C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,SAAS;QACpC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,SAAS;QAChC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACvC,CAAC,CAAC;gBACE,QAAQ,EAAE,IAAI,CAAC,iBAAiB,CAAC,QAAQ,IAAI,SAAS;gBACtD,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK,IAAI,SAAS;aACjD;YACH,CAAC,CAAC,SAAS;QACb,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS;KACnE,CAAC;AACJ,CAAC","sourcesContent":["import type { drive_v3 } from '@googleapis/drive';\nimport { narrow } from '../../lib/enums.js';\nimport type { Comment } from '../entities/Comment.js';\nimport type { Reply } from '../entities/Reply.js';\nimport type { User } from '../entities/User.js';\n\n/** The `fields` selection backing the User projection on authors. */\nconst USER_FIELDS = 'displayName,emailAddress,me,photoLink';\n\n/** The `fields` selection backing the Reply projection. */\nexport const REPLY_FIELDS = `id,content,htmlContent,author(${USER_FIELDS}),createdTime,modifiedTime,deleted,action`;\n\n/** The `fields` selection backing the Comment projection (replies included). */\nexport const COMMENT_FIELDS =\n `id,content,htmlContent,author(${USER_FIELDS}),createdTime,modifiedTime,resolved,deleted,` +\n `anchor,quotedFileContent(mimeType,value),replies(${REPLY_FIELDS})`;\n\n/** Project a REST user onto the User shape, cleaning nulls to undefined. */\nexport function projectUser(data: drive_v3.Schema$User): User {\n return {\n displayName: data.displayName ?? undefined,\n emailAddress: data.emailAddress ?? undefined,\n me: data.me ?? undefined,\n photoLink: data.photoLink ?? undefined,\n };\n}\n\n/** Project a REST reply onto the Reply shape; unknown actions drop rather than masquerade. */\nexport function projectReply(data: drive_v3.Schema$Reply): Reply {\n return {\n id: data.id ?? '',\n content: data.content ?? undefined,\n htmlContent: data.htmlContent ?? undefined,\n author: data.author ? projectUser(data.author) : undefined,\n createdTime: data.createdTime ?? undefined,\n modifiedTime: data.modifiedTime ?? undefined,\n deleted: data.deleted ?? undefined,\n action: narrow(data.action, ['resolve', 'reopen']),\n };\n}\n\n/** Project a REST comment onto the Comment shape, replies included. */\nexport function projectComment(data: drive_v3.Schema$Comment): Comment {\n return {\n id: data.id ?? '',\n content: data.content ?? undefined,\n htmlContent: data.htmlContent ?? undefined,\n author: data.author ? projectUser(data.author) : undefined,\n createdTime: data.createdTime ?? undefined,\n modifiedTime: data.modifiedTime ?? undefined,\n resolved: data.resolved ?? undefined,\n deleted: data.deleted ?? undefined,\n anchor: data.anchor ?? undefined,\n quotedFileContent: data.quotedFileContent\n ? {\n mimeType: data.quotedFileContent.mimeType ?? undefined,\n value: data.quotedFileContent.value ?? undefined,\n }\n : undefined,\n replies: data.replies ? data.replies.map(projectReply) : undefined,\n };\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The content boundary for the two content tools (see the COVERAGE.md
|
|
3
|
+
* divergence notes): Google-native files cross it through `files.export`,
|
|
4
|
+
* blobs through `files.get alt=media`, and everything is JSON on the wire,
|
|
5
|
+
* so bytes travel base64 and oversized transfers are refused rather than
|
|
6
|
+
* degraded (EXTENDING.md, "Output crosses the wire as JSON").
|
|
7
|
+
*/
|
|
8
|
+
/** Whether the type is a Google Workspace native type (exported, never downloaded). */
|
|
9
|
+
export declare function isGoogleNative(mimeType: string): boolean;
|
|
10
|
+
/** The text-representation export MIME for a native type, if it has one. */
|
|
11
|
+
export declare function textExportMime(mimeType: string): string | undefined;
|
|
12
|
+
/** Whether a blob type is text enough for `read_file_content` to return as UTF-8. */
|
|
13
|
+
export declare function isTextLike(mimeType: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The decoded-size ceiling for `download_file_content` blob downloads: 25 MiB,
|
|
16
|
+
* the suite's de facto base64-in-JSON boundary (Gmail's attachment maximum).
|
|
17
|
+
* Larger transfers are deferred to the media issue (#38).
|
|
18
|
+
*/
|
|
19
|
+
export declare const MAX_DOWNLOAD_BYTES: number;
|
|
20
|
+
//# sourceMappingURL=content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/drive/lib/content.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEnE;AAED,qFAAqF;AACrF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CASpD;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAmB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The content boundary for the two content tools (see the COVERAGE.md
|
|
3
|
+
* divergence notes): Google-native files cross it through `files.export`,
|
|
4
|
+
* blobs through `files.get alt=media`, and everything is JSON on the wire,
|
|
5
|
+
* so bytes travel base64 and oversized transfers are refused rather than
|
|
6
|
+
* degraded (EXTENDING.md, "Output crosses the wire as JSON").
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Google Workspace editor types and the export MIME backing their
|
|
10
|
+
* "natural language representation" (`read_file_content`); other native types
|
|
11
|
+
* (forms, sites, maps, shortcuts) have no text export and are refused.
|
|
12
|
+
*/
|
|
13
|
+
const TEXT_EXPORTS = {
|
|
14
|
+
'application/vnd.google-apps.document': 'text/plain',
|
|
15
|
+
'application/vnd.google-apps.spreadsheet': 'text/csv',
|
|
16
|
+
'application/vnd.google-apps.presentation': 'text/plain',
|
|
17
|
+
};
|
|
18
|
+
/** Whether the type is a Google Workspace native type (exported, never downloaded). */
|
|
19
|
+
export function isGoogleNative(mimeType) {
|
|
20
|
+
return mimeType.startsWith('application/vnd.google-apps.');
|
|
21
|
+
}
|
|
22
|
+
/** The text-representation export MIME for a native type, if it has one. */
|
|
23
|
+
export function textExportMime(mimeType) {
|
|
24
|
+
return TEXT_EXPORTS[mimeType];
|
|
25
|
+
}
|
|
26
|
+
/** Whether a blob type is text enough for `read_file_content` to return as UTF-8. */
|
|
27
|
+
export function isTextLike(mimeType) {
|
|
28
|
+
return (mimeType.startsWith('text/') ||
|
|
29
|
+
mimeType === 'application/json' ||
|
|
30
|
+
mimeType === 'application/xml' ||
|
|
31
|
+
mimeType === 'image/svg+xml' ||
|
|
32
|
+
mimeType.endsWith('+json') ||
|
|
33
|
+
mimeType.endsWith('+xml'));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The decoded-size ceiling for `download_file_content` blob downloads: 25 MiB,
|
|
37
|
+
* the suite's de facto base64-in-JSON boundary (Gmail's attachment maximum).
|
|
38
|
+
* Larger transfers are deferred to the media issue (#38).
|
|
39
|
+
*/
|
|
40
|
+
export const MAX_DOWNLOAD_BYTES = 25 * 1024 * 1024;
|
|
41
|
+
//# sourceMappingURL=content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/drive/lib/content.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,YAAY,GAA2B;IAC3C,sCAAsC,EAAE,YAAY;IACpD,yCAAyC,EAAE,UAAU;IACrD,0CAA0C,EAAE,YAAY;CACzD,CAAC;AAEF,uFAAuF;AACvF,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,OAAO,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;AAC7D,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,CACL,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;QAC5B,QAAQ,KAAK,kBAAkB;QAC/B,QAAQ,KAAK,iBAAiB;QAC9B,QAAQ,KAAK,eAAe;QAC5B,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC1B,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC1B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC","sourcesContent":["/**\n * The content boundary for the two content tools (see the COVERAGE.md\n * divergence notes): Google-native files cross it through `files.export`,\n * blobs through `files.get alt=media`, and everything is JSON on the wire,\n * so bytes travel base64 and oversized transfers are refused rather than\n * degraded (EXTENDING.md, \"Output crosses the wire as JSON\").\n */\n\n/**\n * Google Workspace editor types and the export MIME backing their\n * \"natural language representation\" (`read_file_content`); other native types\n * (forms, sites, maps, shortcuts) have no text export and are refused.\n */\nconst TEXT_EXPORTS: Record<string, string> = {\n 'application/vnd.google-apps.document': 'text/plain',\n 'application/vnd.google-apps.spreadsheet': 'text/csv',\n 'application/vnd.google-apps.presentation': 'text/plain',\n};\n\n/** Whether the type is a Google Workspace native type (exported, never downloaded). */\nexport function isGoogleNative(mimeType: string): boolean {\n return mimeType.startsWith('application/vnd.google-apps.');\n}\n\n/** The text-representation export MIME for a native type, if it has one. */\nexport function textExportMime(mimeType: string): string | undefined {\n return TEXT_EXPORTS[mimeType];\n}\n\n/** Whether a blob type is text enough for `read_file_content` to return as UTF-8. */\nexport function isTextLike(mimeType: string): boolean {\n return (\n mimeType.startsWith('text/') ||\n mimeType === 'application/json' ||\n mimeType === 'application/xml' ||\n mimeType === 'image/svg+xml' ||\n mimeType.endsWith('+json') ||\n mimeType.endsWith('+xml')\n );\n}\n\n/**\n * The decoded-size ceiling for `download_file_content` blob downloads: 25 MiB,\n * the suite's de facto base64-in-JSON boundary (Gmail's attachment maximum).\n * Larger transfers are deferred to the media issue (#38).\n */\nexport const MAX_DOWNLOAD_BYTES = 25 * 1024 * 1024;\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { drive_v3 } from '@googleapis/drive';
|
|
2
|
+
import type { File } from '../entities/File.js';
|
|
3
|
+
import type { Permission } from '../entities/Permission.js';
|
|
4
|
+
/**
|
|
5
|
+
* The REST `fields` selection backing the MCP toolset's `File` projection:
|
|
6
|
+
* exactly what `projectFile` consumes for the toolset-published fields, so
|
|
7
|
+
* tool outputs stay verbatim to the MCP pages.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TOOL_FILE_FIELDS: string;
|
|
10
|
+
/**
|
|
11
|
+
* The methods' superset: the toolset fields plus the REST-vocabulary flags the
|
|
12
|
+
* file methods write, so a write's effect is visible in its own output.
|
|
13
|
+
*/
|
|
14
|
+
export declare const METHOD_FILE_FIELDS = "id,name,parents,mimeType,size,description,fileExtension,webViewLink,sharedWithMeTime,createdTime,modifiedTime,viewedByMeTime,owners(emailAddress),capabilities(canAddChildren),starred,trashed,folderColorRgb,copyRequiresWriterPermission,writersCanShare";
|
|
15
|
+
/**
|
|
16
|
+
* Project a REST file resource onto the File shape: `name` → `title`,
|
|
17
|
+
* `parents[0]` → `parentId`, `owners[0].emailAddress` → `owner`,
|
|
18
|
+
* `webViewLink` → `viewUrl`, `size` → `fileSize`,
|
|
19
|
+
* `capabilities.canAddChildren` → `canAddChildren`; nulls clean to undefined.
|
|
20
|
+
* `contentSnippet` is never populated: the REST API serves no snippet.
|
|
21
|
+
*/
|
|
22
|
+
export declare function projectFile(data: drive_v3.Schema$File): File;
|
|
23
|
+
/** Project a REST permission onto the Permission shape; unknown enum values drop rather than masquerade. */
|
|
24
|
+
export declare function projectPermission(data: drive_v3.Schema$Permission): Permission;
|
|
25
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/drive/lib/file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAGG,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,+PAAoG,CAAC;AAEpI;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI,CAsB5D;AAED,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,iBAAiB,GAAG,UAAU,CAe9E"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { narrow } from '../../lib/enums.js';
|
|
2
|
+
/**
|
|
3
|
+
* The REST `fields` selection backing the MCP toolset's `File` projection:
|
|
4
|
+
* exactly what `projectFile` consumes for the toolset-published fields, so
|
|
5
|
+
* tool outputs stay verbatim to the MCP pages.
|
|
6
|
+
*/
|
|
7
|
+
export const TOOL_FILE_FIELDS = 'id,name,parents,mimeType,size,description,fileExtension,webViewLink,' +
|
|
8
|
+
'sharedWithMeTime,createdTime,modifiedTime,viewedByMeTime,owners(emailAddress),' +
|
|
9
|
+
'capabilities(canAddChildren)';
|
|
10
|
+
/**
|
|
11
|
+
* The methods' superset: the toolset fields plus the REST-vocabulary flags the
|
|
12
|
+
* file methods write, so a write's effect is visible in its own output.
|
|
13
|
+
*/
|
|
14
|
+
export const METHOD_FILE_FIELDS = `${TOOL_FILE_FIELDS},starred,trashed,folderColorRgb,copyRequiresWriterPermission,writersCanShare`;
|
|
15
|
+
/**
|
|
16
|
+
* Project a REST file resource onto the File shape: `name` → `title`,
|
|
17
|
+
* `parents[0]` → `parentId`, `owners[0].emailAddress` → `owner`,
|
|
18
|
+
* `webViewLink` → `viewUrl`, `size` → `fileSize`,
|
|
19
|
+
* `capabilities.canAddChildren` → `canAddChildren`; nulls clean to undefined.
|
|
20
|
+
* `contentSnippet` is never populated: the REST API serves no snippet.
|
|
21
|
+
*/
|
|
22
|
+
export function projectFile(data) {
|
|
23
|
+
return {
|
|
24
|
+
id: data.id ?? '',
|
|
25
|
+
title: data.name ?? undefined,
|
|
26
|
+
parentId: data.parents?.[0] ?? undefined,
|
|
27
|
+
mimeType: data.mimeType ?? undefined,
|
|
28
|
+
fileSize: data.size ?? undefined,
|
|
29
|
+
description: data.description ?? undefined,
|
|
30
|
+
fileExtension: data.fileExtension ?? undefined,
|
|
31
|
+
viewUrl: data.webViewLink ?? undefined,
|
|
32
|
+
sharedWithMeTime: data.sharedWithMeTime ?? undefined,
|
|
33
|
+
createdTime: data.createdTime ?? undefined,
|
|
34
|
+
modifiedTime: data.modifiedTime ?? undefined,
|
|
35
|
+
viewedByMeTime: data.viewedByMeTime ?? undefined,
|
|
36
|
+
owner: data.owners?.[0]?.emailAddress ?? undefined,
|
|
37
|
+
canAddChildren: data.capabilities?.canAddChildren ?? undefined,
|
|
38
|
+
starred: data.starred ?? undefined,
|
|
39
|
+
trashed: data.trashed ?? undefined,
|
|
40
|
+
folderColorRgb: data.folderColorRgb ?? undefined,
|
|
41
|
+
copyRequiresWriterPermission: data.copyRequiresWriterPermission ?? undefined,
|
|
42
|
+
writersCanShare: data.writersCanShare ?? undefined,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** Project a REST permission onto the Permission shape; unknown enum values drop rather than masquerade. */
|
|
46
|
+
export function projectPermission(data) {
|
|
47
|
+
return {
|
|
48
|
+
role: narrow(data.role, [
|
|
49
|
+
'owner',
|
|
50
|
+
'organizer',
|
|
51
|
+
'fileOrganizer',
|
|
52
|
+
'writer',
|
|
53
|
+
'commenter',
|
|
54
|
+
'reader',
|
|
55
|
+
]),
|
|
56
|
+
displayName: data.displayName ?? undefined,
|
|
57
|
+
type: narrow(data.type, ['user', 'group', 'domain', 'anyone']),
|
|
58
|
+
emailAddress: data.emailAddress ?? undefined,
|
|
59
|
+
view: narrow(data.view, ['published', 'metadata']),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../../src/drive/lib/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,sEAAsE;IACtE,gFAAgF;IAChF,8BAA8B,CAAC;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,gBAAgB,8EAA8E,CAAC;AAEpI;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,IAA0B;IACpD,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;QACjB,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS;QAC7B,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,SAAS;QACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,SAAS;QACpC,QAAQ,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS;QAChC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,SAAS;QAC9C,OAAO,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QACtC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,IAAI,SAAS;QACpD,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;QAC5C,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,SAAS;QAChD,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,IAAI,SAAS;QAClD,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,IAAI,SAAS;QAC9D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,SAAS;QAChD,4BAA4B,EAAE,IAAI,CAAC,4BAA4B,IAAI,SAAS;QAC5E,eAAe,EAAE,IAAI,CAAC,eAAe,IAAI,SAAS;KACnD,CAAC;AACJ,CAAC;AAED,4GAA4G;AAC5G,MAAM,UAAU,iBAAiB,CAAC,IAAgC;IAChE,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;YACtB,OAAO;YACP,WAAW;YACX,eAAe;YACf,QAAQ;YACR,WAAW;YACX,QAAQ;SACT,CAAC;QACF,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC9D,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;QAC5C,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;KACnD,CAAC;AACJ,CAAC","sourcesContent":["import type { drive_v3 } from '@googleapis/drive';\nimport { narrow } from '../../lib/enums.js';\nimport type { File } from '../entities/File.js';\nimport type { Permission } from '../entities/Permission.js';\n\n/**\n * The REST `fields` selection backing the MCP toolset's `File` projection:\n * exactly what `projectFile` consumes for the toolset-published fields, so\n * tool outputs stay verbatim to the MCP pages.\n */\nexport const TOOL_FILE_FIELDS =\n 'id,name,parents,mimeType,size,description,fileExtension,webViewLink,' +\n 'sharedWithMeTime,createdTime,modifiedTime,viewedByMeTime,owners(emailAddress),' +\n 'capabilities(canAddChildren)';\n\n/**\n * The methods' superset: the toolset fields plus the REST-vocabulary flags the\n * file methods write, so a write's effect is visible in its own output.\n */\nexport const METHOD_FILE_FIELDS = `${TOOL_FILE_FIELDS},starred,trashed,folderColorRgb,copyRequiresWriterPermission,writersCanShare`;\n\n/**\n * Project a REST file resource onto the File shape: `name` → `title`,\n * `parents[0]` → `parentId`, `owners[0].emailAddress` → `owner`,\n * `webViewLink` → `viewUrl`, `size` → `fileSize`,\n * `capabilities.canAddChildren` → `canAddChildren`; nulls clean to undefined.\n * `contentSnippet` is never populated: the REST API serves no snippet.\n */\nexport function projectFile(data: drive_v3.Schema$File): File {\n return {\n id: data.id ?? '',\n title: data.name ?? undefined,\n parentId: data.parents?.[0] ?? undefined,\n mimeType: data.mimeType ?? undefined,\n fileSize: data.size ?? undefined,\n description: data.description ?? undefined,\n fileExtension: data.fileExtension ?? undefined,\n viewUrl: data.webViewLink ?? undefined,\n sharedWithMeTime: data.sharedWithMeTime ?? undefined,\n createdTime: data.createdTime ?? undefined,\n modifiedTime: data.modifiedTime ?? undefined,\n viewedByMeTime: data.viewedByMeTime ?? undefined,\n owner: data.owners?.[0]?.emailAddress ?? undefined,\n canAddChildren: data.capabilities?.canAddChildren ?? undefined,\n starred: data.starred ?? undefined,\n trashed: data.trashed ?? undefined,\n folderColorRgb: data.folderColorRgb ?? undefined,\n copyRequiresWriterPermission: data.copyRequiresWriterPermission ?? undefined,\n writersCanShare: data.writersCanShare ?? undefined,\n };\n}\n\n/** Project a REST permission onto the Permission shape; unknown enum values drop rather than masquerade. */\nexport function projectPermission(data: drive_v3.Schema$Permission): Permission {\n return {\n role: narrow(data.role, [\n 'owner',\n 'organizer',\n 'fileOrganizer',\n 'writer',\n 'commenter',\n 'reader',\n ]),\n displayName: data.displayName ?? undefined,\n type: narrow(data.type, ['user', 'group', 'domain', 'anyone']),\n emailAddress: data.emailAddress ?? undefined,\n view: narrow(data.view, ['published', 'metadata']),\n };\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate the MCP toolset's documented search-query vocabulary into Drive
|
|
3
|
+
* REST v3 `q` syntax.
|
|
4
|
+
*
|
|
5
|
+
* The `search_files` page documents `query_term operator values` clauses with
|
|
6
|
+
* three terms v3 spells differently: `title` is v3's `name`, and the
|
|
7
|
+
* equality-shaped `parentId = 'x'` / `owner = 'me'` are v3's containment
|
|
8
|
+
* clauses `'x' in parents` / `'me' in owners` (their `!=` forms negate with
|
|
9
|
+
* `not`). Everything else the page documents (`fullText`, `mimeType`, the
|
|
10
|
+
* timestamp terms, `sharedWithMe`, `and`/`or`/`not`, parentheses) is already
|
|
11
|
+
* v3 vocabulary and passes through, as does anything undocumented (v3 rejects
|
|
12
|
+
* what it rejects; inventing repairs would mask the error).
|
|
13
|
+
*
|
|
14
|
+
* Quoted string values are never rewritten: the input is tokenized before any
|
|
15
|
+
* mapping, so a value like `'my title = x'` survives verbatim, including
|
|
16
|
+
* `\'` escapes.
|
|
17
|
+
*
|
|
18
|
+
* @see https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/search_files
|
|
19
|
+
* @see https://developers.google.com/workspace/drive/api/guides/search-files
|
|
20
|
+
*/
|
|
21
|
+
type Token = {
|
|
22
|
+
kind: 'value' | 'word' | 'op' | 'paren';
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
25
|
+
/** Split a query into quoted values, words, comparison operators, and parentheses. */
|
|
26
|
+
export declare function tokenize(query: string): Token[];
|
|
27
|
+
/** Translate a documented MCP query into v3 `q` syntax (see module doc). */
|
|
28
|
+
export declare function translateQuery(query: string): string;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/drive/lib/query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAIF,sFAAsF;AACtF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,CA2C/C;AAQD,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA+BpD"}
|