google-mcp-suite 1.6.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 +12 -7
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/drive/tools/read_file_content/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGlF,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,aAAa;QACrB,iBAAiB,EAAE,IAAI;KACxB,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IAErC,IAAI,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,MAAM,UAAU,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACb,GAAG,QAAQ,gFAAgF,CAC5F,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CAClC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,EAC7C,EAAE,YAAY,EAAE,aAAa,EAAE,CAChC,CAAC;QACF,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAmB,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IAChF,CAAC;IAED,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,GAAG,QAAQ,IAAI,mBAAmB,8CAA8C;YAC9E,6CAA6C,CAChD,CAAC;IACJ,CAAC;IACD,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;IACF,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAmB,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;AAChF,CAAC","sourcesContent":["import type { drive_v3 } from '@googleapis/drive';\nimport type { z } from 'zod';\nimport { isGoogleNative, isTextLike, textExportMime } 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,mimeType',\n supportsAllDrives: true,\n });\n const mimeType = meta.mimeType ?? '';\n\n if (isGoogleNative(mimeType)) {\n const exportMime = textExportMime(mimeType);\n if (!exportMime) {\n throw new Error(\n `${mimeType} has no text representation; use download_file_content with an exportMimeType.`,\n );\n }\n const res = await drive.files.export(\n { fileId: args.fileId, mimeType: exportMime },\n { responseType: 'arraybuffer' },\n );\n return { fileContent: Buffer.from(res.data as ArrayBuffer).toString('utf8') };\n }\n\n if (!isTextLike(mimeType)) {\n throw new Error(\n `${mimeType || 'unknown mime type'} is not a text type this server can render; ` +\n 'use download_file_content for base64 bytes.',\n );\n }\n const res = await drive.files.get(\n { fileId: args.fileId, alt: 'media', supportsAllDrives: true },\n { responseType: 'arraybuffer' },\n );\n return { fileContent: Buffer.from(res.data as ArrayBuffer).toString('utf8') };\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const read_file_content: import("../../../lib/operation.js").Operation<import("@googleapis/drive").drive_v3.Drive, import("zod").ZodObject<{
|
|
2
|
+
fileId: import("zod").ZodString;
|
|
3
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
4
|
+
fileContent: import("zod").ZodString;
|
|
5
|
+
}, import("zod/v4/core").$strip>>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/read_file_content/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;iCAgB5B,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 read_file_content = driveOperation({
|
|
5
|
+
description: 'Fetch a natural language representation of a Drive file: Google Docs, Sheets, and ' +
|
|
6
|
+
'Slides export as text, and text-like files (text, JSON, XML, SVG) return as UTF-8. ' +
|
|
7
|
+
'Other types need download_file_content. If a file is not found, use search_files ' +
|
|
8
|
+
'to locate it by keywords.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: true,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
idempotentHint: true,
|
|
13
|
+
openWorldHint: false,
|
|
14
|
+
},
|
|
15
|
+
source: 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/read_file_content',
|
|
16
|
+
schema,
|
|
17
|
+
handler,
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/drive/tools/read_file_content/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,iBAAiB,GAAG,cAAc,CAAC;IAC9C,WAAW,EACT,oFAAoF;QACpF,qFAAqF;QACrF,mFAAmF;QACnF,2BAA2B;IAC7B,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EACJ,8FAA8F;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 read_file_content = driveOperation({\n description:\n 'Fetch a natural language representation of a Drive file: Google Docs, Sheets, and ' +\n 'Slides export as text, and text-like files (text, JSON, XML, SVG) return as UTF-8. ' +\n 'Other types need download_file_content. If a file is not found, use search_files ' +\n 'to locate it by keywords.',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n source:\n 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/read_file_content',\n schema,\n handler,\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/read_file_content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM;;;;;;;CAOlB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const schema = {
|
|
3
|
+
input: z.object({
|
|
4
|
+
fileId: z.string().describe('The ID of the file to retrieve.'),
|
|
5
|
+
}),
|
|
6
|
+
output: z.object({
|
|
7
|
+
fileContent: z.string().describe('Drive file content returned in text format.'),
|
|
8
|
+
}),
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/drive/tools/read_file_content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;KAC/D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;KAChF,CAAC;CACH,CAAC","sourcesContent":["import { z } from 'zod';\n\nexport const schema = {\n input: z.object({\n fileId: z.string().describe('The ID of the file to retrieve.'),\n }),\n output: z.object({\n fileContent: z.string().describe('Drive file content returned in text format.'),\n }),\n};\n"]}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import type { drive_v3 } from '@googleapis/drive';
|
|
2
|
+
/**
|
|
3
|
+
* The tool registry: keys are the wire tool names, mirroring Google's Drive
|
|
4
|
+
* MCP toolset reference. Each tool is imported from its folder and spread in
|
|
5
|
+
* here; the server lists and dispatches this.
|
|
6
|
+
*/
|
|
7
|
+
export declare const tools: {
|
|
8
|
+
search_files: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
9
|
+
query: import("zod").ZodString;
|
|
10
|
+
pageToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
pageSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
12
|
+
excludeContentSnippets: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
13
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
14
|
+
files: import("zod").ZodArray<import("zod").ZodObject<{
|
|
15
|
+
id: import("zod").ZodString;
|
|
16
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
26
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
30
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
31
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
32
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
34
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
35
|
+
}, import("zod/v4/core").$strip>>;
|
|
36
|
+
nextPageToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
37
|
+
}, import("zod/v4/core").$strip>>;
|
|
38
|
+
list_recent_files: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
39
|
+
orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
40
|
+
lastModified: "lastModified";
|
|
41
|
+
recency: "recency";
|
|
42
|
+
lastModifiedByMe: "lastModifiedByMe";
|
|
43
|
+
}>>;
|
|
44
|
+
pageToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
45
|
+
pageSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
46
|
+
excludeContentSnippets: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
47
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
48
|
+
files: import("zod").ZodArray<import("zod").ZodObject<{
|
|
49
|
+
id: import("zod").ZodString;
|
|
50
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
53
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
54
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
60
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
61
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
64
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
65
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
66
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
67
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
68
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
69
|
+
}, import("zod/v4/core").$strip>>;
|
|
70
|
+
nextPageToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
}, import("zod/v4/core").$strip>>;
|
|
72
|
+
get_file_metadata: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
73
|
+
fileId: import("zod").ZodString;
|
|
74
|
+
excludeContentSnippets: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
75
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
76
|
+
id: import("zod").ZodString;
|
|
77
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
79
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
80
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
82
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
83
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
84
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
85
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
86
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
87
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
88
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
89
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
90
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
91
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
92
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
93
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
94
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
95
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
96
|
+
}, import("zod/v4/core").$strip>>;
|
|
97
|
+
get_file_permissions: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
98
|
+
fileId: import("zod").ZodString;
|
|
99
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
100
|
+
permissions: import("zod").ZodArray<import("zod").ZodObject<{
|
|
101
|
+
role: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
102
|
+
organizer: "organizer";
|
|
103
|
+
owner: "owner";
|
|
104
|
+
fileOrganizer: "fileOrganizer";
|
|
105
|
+
writer: "writer";
|
|
106
|
+
commenter: "commenter";
|
|
107
|
+
reader: "reader";
|
|
108
|
+
}>>;
|
|
109
|
+
displayName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
110
|
+
type: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
111
|
+
domain: "domain";
|
|
112
|
+
user: "user";
|
|
113
|
+
group: "group";
|
|
114
|
+
anyone: "anyone";
|
|
115
|
+
}>>;
|
|
116
|
+
emailAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
117
|
+
view: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
118
|
+
metadata: "metadata";
|
|
119
|
+
published: "published";
|
|
120
|
+
}>>;
|
|
121
|
+
}, import("zod/v4/core").$strip>>;
|
|
122
|
+
}, import("zod/v4/core").$strip>>;
|
|
123
|
+
read_file_content: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
124
|
+
fileId: import("zod").ZodString;
|
|
125
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
126
|
+
fileContent: import("zod").ZodString;
|
|
127
|
+
}, import("zod/v4/core").$strip>>;
|
|
128
|
+
download_file_content: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
129
|
+
fileId: import("zod").ZodString;
|
|
130
|
+
exportMimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
132
|
+
id: import("zod").ZodString;
|
|
133
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
135
|
+
content: import("zod").ZodString;
|
|
136
|
+
}, import("zod/v4/core").$strip>>;
|
|
137
|
+
create_file: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
138
|
+
title: import("zod").ZodString;
|
|
139
|
+
contentMimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
140
|
+
textContent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
141
|
+
base64Content: import("zod").ZodOptional<import("zod").ZodString>;
|
|
142
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
143
|
+
disableConversionToGoogleType: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
144
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
145
|
+
id: import("zod").ZodString;
|
|
146
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
147
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
148
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
150
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
151
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
152
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
153
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
154
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
155
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
156
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
157
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
158
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
159
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
160
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
161
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
162
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
163
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
164
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
165
|
+
}, import("zod/v4/core").$strip>>;
|
|
166
|
+
copy_file: import("../../lib/operation.js").Operation<drive_v3.Drive, import("zod").ZodObject<{
|
|
167
|
+
fileId: import("zod").ZodString;
|
|
168
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
169
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
170
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
171
|
+
id: import("zod").ZodString;
|
|
172
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
173
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
174
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
175
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
176
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
177
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
178
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
179
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
180
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
181
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
182
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
183
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
184
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
186
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
187
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
188
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
189
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
190
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
191
|
+
}, import("zod/v4/core").$strip>>;
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/drive/tools/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAWlD;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASsC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { copy_file } from './copy_file/index.js';
|
|
2
|
+
import { create_file } from './create_file/index.js';
|
|
3
|
+
import { download_file_content } from './download_file_content/index.js';
|
|
4
|
+
import { get_file_metadata } from './get_file_metadata/index.js';
|
|
5
|
+
import { get_file_permissions } from './get_file_permissions/index.js';
|
|
6
|
+
import { list_recent_files } from './list_recent_files/index.js';
|
|
7
|
+
import { read_file_content } from './read_file_content/index.js';
|
|
8
|
+
import { search_files } from './search_files/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* The tool registry: keys are the wire tool names, mirroring Google's Drive
|
|
11
|
+
* MCP toolset reference. Each tool is imported from its folder and spread in
|
|
12
|
+
* here; the server lists and dispatches this.
|
|
13
|
+
*/
|
|
14
|
+
export const tools = {
|
|
15
|
+
search_files,
|
|
16
|
+
list_recent_files,
|
|
17
|
+
get_file_metadata,
|
|
18
|
+
get_file_permissions,
|
|
19
|
+
read_file_content,
|
|
20
|
+
download_file_content,
|
|
21
|
+
create_file,
|
|
22
|
+
copy_file,
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/drive/tools/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,oBAAoB;IACpB,iBAAiB;IACjB,qBAAqB;IACrB,WAAW;IACX,SAAS;CAC6C,CAAC","sourcesContent":["import type { drive_v3 } from '@googleapis/drive';\nimport type { AnyOperation } from '../../lib/operation.js';\nimport { copy_file } from './copy_file/index.js';\nimport { create_file } from './create_file/index.js';\nimport { download_file_content } from './download_file_content/index.js';\nimport { get_file_metadata } from './get_file_metadata/index.js';\nimport { get_file_permissions } from './get_file_permissions/index.js';\nimport { list_recent_files } from './list_recent_files/index.js';\nimport { read_file_content } from './read_file_content/index.js';\nimport { search_files } from './search_files/index.js';\n\n/**\n * The tool registry: keys are the wire tool names, mirroring Google's Drive\n * MCP toolset reference. Each tool is imported from its folder and spread in\n * here; the server lists and dispatches this.\n */\nexport const tools = {\n search_files,\n list_recent_files,\n get_file_metadata,\n get_file_permissions,\n read_file_content,\n download_file_content,\n create_file,\n copy_file,\n} satisfies Record<string, AnyOperation<drive_v3.Drive>>;\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/search_files/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B,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,CAexC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { forGoogle } from '../../../lib/google.js';
|
|
2
|
+
import { projectFile, TOOL_FILE_FIELDS } from '../../lib/file.js';
|
|
3
|
+
import { translateQuery } from '../../lib/query.js';
|
|
4
|
+
export async function handler(drive, args) {
|
|
5
|
+
const { data } = await drive.files.list(forGoogle({
|
|
6
|
+
q: translateQuery(args.query),
|
|
7
|
+
pageSize: args.pageSize,
|
|
8
|
+
pageToken: args.pageToken,
|
|
9
|
+
fields: `nextPageToken,files(${TOOL_FILE_FIELDS})`,
|
|
10
|
+
supportsAllDrives: true,
|
|
11
|
+
includeItemsFromAllDrives: true,
|
|
12
|
+
}));
|
|
13
|
+
return {
|
|
14
|
+
files: (data.files ?? []).map(projectFile),
|
|
15
|
+
nextPageToken: data.nextPageToken ?? undefined,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/drive/tools/search_files/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,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,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,MAAM,EAAE,uBAAuB,gBAAgB,GAAG;QAClD,iBAAiB,EAAE,IAAI;QACvB,yBAAyB,EAAE,IAAI;KAChC,CAAC,CACH,CAAC;IACF,OAAO;QACL,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC;QAC1C,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,SAAS;KAC/C,CAAC;AACJ,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 { translateQuery } from '../../lib/query.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.list(\n forGoogle({\n q: translateQuery(args.query),\n pageSize: args.pageSize,\n pageToken: args.pageToken,\n fields: `nextPageToken,files(${TOOL_FILE_FIELDS})`,\n supportsAllDrives: true,\n includeItemsFromAllDrives: true,\n }),\n );\n return {\n files: (data.files ?? []).map(projectFile),\n nextPageToken: data.nextPageToken ?? undefined,\n };\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const search_files: import("../../../lib/operation.js").Operation<import("@googleapis/drive").drive_v3.Drive, import("zod").ZodObject<{
|
|
2
|
+
query: import("zod").ZodString;
|
|
3
|
+
pageToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4
|
+
pageSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
5
|
+
excludeContentSnippets: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
6
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
7
|
+
files: import("zod").ZodArray<import("zod").ZodObject<{
|
|
8
|
+
id: import("zod").ZodString;
|
|
9
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
|
+
fileSize: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
fileExtension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
+
contentSnippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
+
viewUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
sharedWithMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
+
createdTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
modifiedTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
viewedByMeTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
+
canAddChildren: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
23
|
+
starred: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
24
|
+
trashed: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
25
|
+
folderColorRgb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
26
|
+
copyRequiresWriterPermission: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
27
|
+
writersCanShare: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
28
|
+
}, import("zod/v4/core").$strip>>;
|
|
29
|
+
nextPageToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
}, import("zod/v4/core").$strip>>;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/search_files/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAavB,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 search_files = driveOperation({
|
|
5
|
+
description: 'Search for Drive files with a structured query (`query_term operator values` clauses ' +
|
|
6
|
+
'combined with and, or, not, and parentheses).',
|
|
7
|
+
annotations: {
|
|
8
|
+
readOnlyHint: true,
|
|
9
|
+
destructiveHint: false,
|
|
10
|
+
idempotentHint: true,
|
|
11
|
+
openWorldHint: false,
|
|
12
|
+
},
|
|
13
|
+
source: 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/search_files',
|
|
14
|
+
schema,
|
|
15
|
+
handler,
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/drive/tools/search_files/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,YAAY,GAAG,cAAc,CAAC;IACzC,WAAW,EACT,uFAAuF;QACvF,+CAA+C;IACjD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE,yFAAyF;IACjG,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 search_files = driveOperation({\n description:\n 'Search for Drive files with a structured query (`query_term operator values` clauses ' +\n 'combined with and, or, not, and parentheses).',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n source: 'https://developers.google.com/workspace/drive/api/reference/mcp/tools_list/search_files',\n schema,\n handler,\n});\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
input: z.ZodObject<{
|
|
4
|
+
query: z.ZodString;
|
|
5
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
6
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
excludeContentSnippets: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
output: z.ZodObject<{
|
|
10
|
+
files: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
title: z.ZodOptional<z.ZodString>;
|
|
13
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
15
|
+
fileSize: z.ZodOptional<z.ZodString>;
|
|
16
|
+
description: z.ZodOptional<z.ZodString>;
|
|
17
|
+
fileExtension: z.ZodOptional<z.ZodString>;
|
|
18
|
+
contentSnippet: z.ZodOptional<z.ZodString>;
|
|
19
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
20
|
+
sharedWithMeTime: z.ZodOptional<z.ZodString>;
|
|
21
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
22
|
+
modifiedTime: z.ZodOptional<z.ZodString>;
|
|
23
|
+
viewedByMeTime: z.ZodOptional<z.ZodString>;
|
|
24
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
25
|
+
canAddChildren: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
trashed: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
folderColorRgb: z.ZodOptional<z.ZodString>;
|
|
29
|
+
copyRequiresWriterPermission: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
writersCanShare: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/drive/tools/search_files/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BlB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { File } from '../../entities/File.js';
|
|
3
|
+
export const schema = {
|
|
4
|
+
input: z.object({
|
|
5
|
+
query: z
|
|
6
|
+
.string()
|
|
7
|
+
.describe('The search query, as `query_term operator values` clauses combined with and, or, ' +
|
|
8
|
+
"not, and parentheses; string values take single quotes with embedded quotes escaped as \\'. " +
|
|
9
|
+
'Supported terms: title (contains, =, !=), fullText (contains), mimeType (contains, =, !=), ' +
|
|
10
|
+
'modifiedTime, viewedByMeTime, createdTime (<=, <, =, !=, >, >=; RFC 3339 UTC), ' +
|
|
11
|
+
"parentId (=, !=; use 'root' for My Drive), owner (=, !=; use 'me' for the requesting user), " +
|
|
12
|
+
'sharedWithMe (=, !=; true or false).'),
|
|
13
|
+
pageToken: z.string().optional().describe('The page token to use for pagination.'),
|
|
14
|
+
pageSize: z.number().int().optional().describe('The maximum number of files to return.'),
|
|
15
|
+
excludeContentSnippets: z
|
|
16
|
+
.boolean()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('If true, the content snippet will be excluded from the response. Accepted for contract ' +
|
|
19
|
+
'fidelity; this server never produces snippets (the REST API serves none), so there is ' +
|
|
20
|
+
'nothing to exclude either way.'),
|
|
21
|
+
}),
|
|
22
|
+
output: z.object({
|
|
23
|
+
files: z.array(File).describe('The list of files.'),
|
|
24
|
+
nextPageToken: z.string().optional().describe('The next page token.'),
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/drive/tools/search_files/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;aACL,MAAM,EAAE;aACR,QAAQ,CACP,mFAAmF;YACjF,8FAA8F;YAC9F,6FAA6F;YAC7F,iFAAiF;YACjF,8FAA8F;YAC9F,sCAAsC,CACzC;QACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;QAClF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;QACxF,sBAAsB,EAAE,CAAC;aACtB,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,yFAAyF;YACvF,wFAAwF;YACxF,gCAAgC,CACnC;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACnD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KACtE,CAAC;CACH,CAAC","sourcesContent":["import { z } from 'zod';\nimport { File } from '../../entities/File.js';\n\nexport const schema = {\n input: z.object({\n query: z\n .string()\n .describe(\n 'The search query, as `query_term operator values` clauses combined with and, or, ' +\n \"not, and parentheses; string values take single quotes with embedded quotes escaped as \\\\'. \" +\n 'Supported terms: title (contains, =, !=), fullText (contains), mimeType (contains, =, !=), ' +\n 'modifiedTime, viewedByMeTime, createdTime (<=, <, =, !=, >, >=; RFC 3339 UTC), ' +\n \"parentId (=, !=; use 'root' for My Drive), owner (=, !=; use 'me' for the requesting user), \" +\n 'sharedWithMe (=, !=; true or false).',\n ),\n pageToken: z.string().optional().describe('The page token to use for pagination.'),\n pageSize: z.number().int().optional().describe('The maximum number of files to return.'),\n excludeContentSnippets: z\n .boolean()\n .optional()\n .describe(\n 'If true, the content snippet will be excluded from the response. Accepted for contract ' +\n 'fidelity; this server never produces snippets (the REST API serves none), so there is ' +\n 'nothing to exclude either way.',\n ),\n }),\n output: z.object({\n files: z.array(File).describe('The list of files.'),\n nextPageToken: z.string().optional().describe('The next page token.'),\n }),\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Narrow a REST string onto an entity enum: the projection-side policy for
|
|
3
|
-
* Google's output enums
|
|
3
|
+
* Google's output enums (EXTENDING.md, "Enum policy"). Unknown and `*_UNSPECIFIED` values drop
|
|
4
4
|
* to `undefined` (the field goes absent) rather than passing through untyped
|
|
5
5
|
* or being coerced to a wrong-but-valid value.
|
|
6
6
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/lib/enums.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EACrC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,EAAE,SAAS,CAAC,EAAE,GACpB,CAAC,GAAG,SAAS,CAEf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Narrow a REST string onto an entity enum: the projection-side policy for
|
|
3
|
-
* Google's output enums
|
|
3
|
+
* Google's output enums (EXTENDING.md, "Enum policy"). Unknown and `*_UNSPECIFIED` values drop
|
|
4
4
|
* to `undefined` (the field goes absent) rather than passing through untyped
|
|
5
5
|
* or being coerced to a wrong-but-valid value.
|
|
6
6
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/lib/enums.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CACpB,KAAgC,EAChC,OAAqB;IAErB,OAAO,KAAK,IAAI,IAAI,IAAK,OAA6B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAW,CAAC,CAAC,CAAC,SAAS,CAAC;AACpG,CAAC","sourcesContent":["/**\n * Narrow a REST string onto an entity enum: the projection-side policy for\n * Google's output enums (EXTENDING.md, \"Enum policy\"). Unknown and `*_UNSPECIFIED` values drop\n * to `undefined` (the field goes absent) rather than passing through untyped\n * or being coerced to a wrong-but-valid value.\n */\nexport function narrow<T extends string>(\n value: string | null | undefined,\n allowed: readonly T[],\n): T | undefined {\n return value != null && (allowed as readonly string[]).includes(value) ? (value as T) : undefined;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../src/sheets/lib/filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../src/sheets/lib/filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAa1F,qGAAqG;AACrG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC,iBAAiB,CAkBlF;AAED,sFAAsF;AACtF,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,SAAS,CAAC,gCAAgC,GAC/C,yBAAyB,CAc3B;AAsBD,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,iBAAiB,GAAG,UAAU,CAgB/E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { narrow } from '../../lib/enums.js';
|
|
1
2
|
import { forGoogle } from '../../lib/google.js';
|
|
2
|
-
import { narrow } from './enums.js';
|
|
3
3
|
/**
|
|
4
4
|
* Data filters cross the boundary in both directions: requests carry them in
|
|
5
5
|
* (where every nesting level needs its `undefined` keys stripped for Google's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../src/sheets/lib/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../src/sheets/lib/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD;;;;;;GAMG;AAEH,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAU,CAAC;AAE1E,qGAAqG;AACrG,MAAM,UAAU,kBAAkB,CAAC,MAAkB;IACnD,OAAO,SAAS,CAAC;QACf,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;QACrE,uBAAuB,EAAE,MAAM,CAAC,uBAAuB;YACrD,CAAC,CAAC,SAAS,CAAC;gBACR,GAAG,MAAM,CAAC,uBAAuB;gBACjC,gBAAgB,EAAE,MAAM,CAAC,uBAAuB,CAAC,gBAAgB;oBAC/D,CAAC,CAAC,SAAS,CAAC;wBACR,GAAG,MAAM,CAAC,uBAAuB,CAAC,gBAAgB;wBAClD,cAAc,EAAE,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,cAAc;4BAC5E,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,cAAc,CAAC;4BAC3E,CAAC,CAAC,SAAS;qBACd,CAAC;oBACJ,CAAC,CAAC,SAAS;aACd,CAAC;YACJ,CAAC,CAAC,SAAS;KACd,CAAC,CAAC;AACL,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,gCAAgC,CAC9C,IAAgD;IAEhD,OAAO;QACL,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC;QACvD,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,cAAc,EAAE,IAAI,CAAC,cAAc;YACjC,CAAC,CAAC;gBACE,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,SAAS;gBACjD,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBACrE,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,UAAU,IAAI,SAAS;gBACvD,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,IAAI,SAAS;aACpD;YACH,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,SAAS,8BAA8B,CACrC,IAA8C;IAE9C,OAAO;QACL,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC;QACvD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACrC,CAAC,CAAC,gCAAgC,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACzD,CAAC,CAAC,SAAS;QACb,wBAAwB,EAAE,MAAM,CAAC,IAAI,CAAC,wBAAwB,EAAE;YAC9D,gBAAgB;YAChB,uBAAuB;SACxB,CAAC;QACF,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,SAAS;QACxC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,SAAS;QAC9C,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,iBAAiB,CAAC,IAAiC;IACjE,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;QAClC,SAAS,EAAE,IAAI,CAAC,SAAS;YACvB,CAAC,CAAC;gBACE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,SAAS;gBAC5C,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,IAAI,SAAS;gBACxD,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,IAAI,SAAS;gBACpD,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,IAAI,SAAS;gBAC9D,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,IAAI,SAAS;aAC3D;YACH,CAAC,CAAC,SAAS;QACb,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;YACnD,CAAC,CAAC,8BAA8B,CAAC,IAAI,CAAC,uBAAuB,CAAC;YAC9D,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["import type { sheets_v4 } from '@googleapis/sheets';\nimport { narrow } from '../../lib/enums.js';\nimport { forGoogle } from '../../lib/google.js';\nimport type { DataFilter } from '../entities/DataFilter.js';\nimport type { DeveloperMetadataLocation } from '../entities/DeveloperMetadataLocation.js';\nimport type { DeveloperMetadataLookup } from '../entities/DeveloperMetadataLookup.js';\n\n/**\n * Data filters cross the boundary in both directions: requests carry them in\n * (where every nesting level needs its `undefined` keys stripped for Google's\n * types), and responses echo them back (where nulls clean to undefined and\n * enums narrow). These converters are that boundary, used by every\n * `*_by_data_filter` operation and the developer metadata search.\n */\n\nconst LOCATION_TYPES = ['ROW', 'COLUMN', 'SHEET', 'SPREADSHEET'] as const;\n\n/** Convert an entity data filter into the REST request shape, stripping undefined at every level. */\nexport function toGoogleDataFilter(filter: DataFilter): sheets_v4.Schema$DataFilter {\n return forGoogle({\n a1Range: filter.a1Range,\n gridRange: filter.gridRange ? forGoogle(filter.gridRange) : undefined,\n developerMetadataLookup: filter.developerMetadataLookup\n ? forGoogle({\n ...filter.developerMetadataLookup,\n metadataLocation: filter.developerMetadataLookup.metadataLocation\n ? forGoogle({\n ...filter.developerMetadataLookup.metadataLocation,\n dimensionRange: filter.developerMetadataLookup.metadataLocation.dimensionRange\n ? forGoogle(filter.developerMetadataLookup.metadataLocation.dimensionRange)\n : undefined,\n })\n : undefined,\n })\n : undefined,\n });\n}\n\n/** Project a REST developer metadata location, cleaning nulls and narrowing enums. */\nexport function projectDeveloperMetadataLocation(\n data: sheets_v4.Schema$DeveloperMetadataLocation,\n): DeveloperMetadataLocation {\n return {\n locationType: narrow(data.locationType, LOCATION_TYPES),\n spreadsheet: data.spreadsheet ?? undefined,\n sheetId: data.sheetId ?? undefined,\n dimensionRange: data.dimensionRange\n ? {\n sheetId: data.dimensionRange.sheetId ?? undefined,\n dimension: narrow(data.dimensionRange.dimension, ['ROWS', 'COLUMNS']),\n startIndex: data.dimensionRange.startIndex ?? undefined,\n endIndex: data.dimensionRange.endIndex ?? undefined,\n }\n : undefined,\n };\n}\n\n/** Project a REST developer metadata lookup, cleaning nulls and narrowing enums. */\nfunction projectDeveloperMetadataLookup(\n data: sheets_v4.Schema$DeveloperMetadataLookup,\n): DeveloperMetadataLookup {\n return {\n locationType: narrow(data.locationType, LOCATION_TYPES),\n metadataLocation: data.metadataLocation\n ? projectDeveloperMetadataLocation(data.metadataLocation)\n : undefined,\n locationMatchingStrategy: narrow(data.locationMatchingStrategy, [\n 'EXACT_LOCATION',\n 'INTERSECTING_LOCATION',\n ]),\n metadataId: data.metadataId ?? undefined,\n metadataKey: data.metadataKey ?? undefined,\n metadataValue: data.metadataValue ?? undefined,\n visibility: narrow(data.visibility, ['DOCUMENT', 'PROJECT']),\n };\n}\n\n/** Project a REST data filter (as echoed in responses), cleaning nulls to undefined. */\nexport function projectDataFilter(data: sheets_v4.Schema$DataFilter): DataFilter {\n return {\n a1Range: data.a1Range ?? undefined,\n gridRange: data.gridRange\n ? {\n sheetId: data.gridRange.sheetId ?? undefined,\n startRowIndex: data.gridRange.startRowIndex ?? undefined,\n endRowIndex: data.gridRange.endRowIndex ?? undefined,\n startColumnIndex: data.gridRange.startColumnIndex ?? undefined,\n endColumnIndex: data.gridRange.endColumnIndex ?? undefined,\n }\n : undefined,\n developerMetadataLookup: data.developerMetadataLookup\n ? projectDeveloperMetadataLookup(data.developerMetadataLookup)\n : undefined,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/sheets/lib/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/sheets/lib/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,qGAAqG;AACrG,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,SAAS,CAAC,wBAAwB,GACvC,iBAAiB,CAQnB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { narrow } from '
|
|
1
|
+
import { narrow } from '../../lib/enums.js';
|
|
2
2
|
import { projectDeveloperMetadataLocation } from './filters.js';
|
|
3
3
|
/** Project REST developer metadata onto the DeveloperMetadata shape, cleaning nulls to undefined. */
|
|
4
4
|
export function projectDeveloperMetadata(data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/sheets/lib/metadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/sheets/lib/metadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,cAAc,CAAC;AAEhE,qGAAqG;AACrG,MAAM,UAAU,wBAAwB,CACtC,IAAwC;IAExC,OAAO;QACL,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,CAAC;QAChC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;QAC1C,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,SAAS;QAC9C,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,gCAAgC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;QACrF,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["import type { sheets_v4 } from '@googleapis/sheets';\nimport { narrow } from '../../lib/enums.js';\nimport type { DeveloperMetadata } from '../entities/DeveloperMetadata.js';\nimport { projectDeveloperMetadataLocation } from './filters.js';\n\n/** Project REST developer metadata onto the DeveloperMetadata shape, cleaning nulls to undefined. */\nexport function projectDeveloperMetadata(\n data: sheets_v4.Schema$DeveloperMetadata,\n): DeveloperMetadata {\n return {\n metadataId: data.metadataId ?? 0,\n metadataKey: data.metadataKey ?? undefined,\n metadataValue: data.metadataValue ?? undefined,\n location: data.location ? projectDeveloperMetadataLocation(data.location) : undefined,\n visibility: narrow(data.visibility, ['DOCUMENT', 'PROJECT']),\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spreadsheet.d.ts","sourceRoot":"","sources":["../../../src/sheets/lib/spreadsheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"spreadsheet.d.ts","sourceRoot":"","sources":["../../../src/sheets/lib/spreadsheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,iGAAiG;AACjG,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,sBAAsB,GAAG,eAAe,CAgB9F;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,CAAC,kBAAkB,GAAG,WAAW,CAkBlF"}
|