google-mcp-suite 1.11.2 → 1.12.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/ADOPTING.md +4 -3
- package/README.md +7 -7
- package/dist/auth/config.js.map +1 -1
- package/dist/auth/oauth.js.map +1 -1
- package/dist/calendar/capabilities.js.map +1 -1
- package/dist/calendar/entities/NotificationLevel.d.ts +2 -2
- package/dist/calendar/lib/notifications.d.ts +3 -3
- package/dist/calendar/lib/notifications.d.ts.map +1 -1
- package/dist/calendar/methods/add_calendar_entry/schema.d.ts.map +1 -1
- package/dist/calendar/methods/clear_calendar/schema.d.ts.map +1 -1
- package/dist/calendar/methods/create_calendar/schema.d.ts.map +1 -1
- package/dist/calendar/methods/delete_calendar/schema.d.ts.map +1 -1
- package/dist/calendar/methods/get_calendar/schema.d.ts.map +1 -1
- package/dist/calendar/methods/get_calendar_entry/schema.d.ts.map +1 -1
- package/dist/calendar/methods/get_colors/schema.d.ts.map +1 -1
- package/dist/calendar/methods/get_setting/schema.d.ts.map +1 -1
- package/dist/calendar/methods/list_event_instances/schema.d.ts.map +1 -1
- package/dist/calendar/methods/list_settings/schema.d.ts.map +1 -1
- package/dist/calendar/methods/move_event/schema.d.ts.map +1 -1
- package/dist/calendar/methods/patch_event/index.d.ts +6 -6
- package/dist/calendar/methods/patch_event/schema.d.ts +6 -6
- package/dist/calendar/methods/patch_event/schema.d.ts.map +1 -1
- package/dist/calendar/methods/query_free_busy/schema.d.ts.map +1 -1
- package/dist/calendar/methods/quick_add_event/schema.d.ts.map +1 -1
- package/dist/calendar/methods/registry.d.ts +6 -6
- package/dist/calendar/methods/remove_calendar_entry/schema.d.ts.map +1 -1
- package/dist/calendar/methods/update_calendar/schema.d.ts.map +1 -1
- package/dist/calendar/methods/update_calendar_entry/schema.d.ts.map +1 -1
- package/dist/calendar/operation.d.ts.map +1 -1
- package/dist/calendar/tools/create_event/index.d.ts +3 -3
- package/dist/calendar/tools/create_event/schema.d.ts +3 -3
- package/dist/calendar/tools/create_event/schema.d.ts.map +1 -1
- package/dist/calendar/tools/delete_event/index.d.ts +2 -2
- package/dist/calendar/tools/delete_event/schema.d.ts +2 -2
- package/dist/calendar/tools/delete_event/schema.d.ts.map +1 -1
- package/dist/calendar/tools/get_event/schema.d.ts.map +1 -1
- package/dist/calendar/tools/list_calendars/schema.d.ts.map +1 -1
- package/dist/calendar/tools/list_events/index.d.ts +4 -4
- package/dist/calendar/tools/list_events/schema.d.ts +4 -4
- package/dist/calendar/tools/list_events/schema.d.ts.map +1 -1
- package/dist/calendar/tools/registry.d.ts +15 -15
- package/dist/calendar/tools/respond_to_event/index.d.ts +3 -3
- package/dist/calendar/tools/respond_to_event/schema.d.ts +3 -3
- package/dist/calendar/tools/respond_to_event/schema.d.ts.map +1 -1
- package/dist/calendar/tools/suggest_time/schema.d.ts.map +1 -1
- package/dist/calendar/tools/update_event/index.d.ts +3 -3
- package/dist/calendar/tools/update_event/schema.d.ts +3 -3
- package/dist/calendar/tools/update_event/schema.d.ts.map +1 -1
- package/dist/docs/capabilities.js.map +1 -1
- package/dist/docs/entities/ParagraphStyle.d.ts +4 -4
- package/dist/docs/entities/TextStyle.d.ts +1 -1
- package/dist/docs/methods/create_document/schema.d.ts.map +1 -1
- package/dist/docs/methods/create_paragraph_bullets/index.d.ts +6 -6
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts +6 -6
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts.map +1 -1
- package/dist/docs/methods/delete_content_range/schema.d.ts.map +1 -1
- package/dist/docs/methods/delete_paragraph_bullets/schema.d.ts.map +1 -1
- package/dist/docs/methods/get_document/schema.d.ts.map +1 -1
- package/dist/docs/methods/insert_text/schema.d.ts.map +1 -1
- package/dist/docs/methods/registry.d.ts +11 -11
- package/dist/docs/methods/replace_all_text/schema.d.ts.map +1 -1
- package/dist/docs/methods/update_paragraph_style/index.d.ts +4 -4
- package/dist/docs/methods/update_paragraph_style/schema.d.ts +4 -4
- package/dist/docs/methods/update_paragraph_style/schema.d.ts.map +1 -1
- package/dist/docs/methods/update_text_style/index.d.ts +1 -1
- package/dist/docs/methods/update_text_style/schema.d.ts +1 -1
- package/dist/docs/methods/update_text_style/schema.d.ts.map +1 -1
- package/dist/docs/operation.d.ts.map +1 -1
- package/dist/doctor/auth.js.map +1 -1
- package/dist/doctor/browser.js.map +1 -1
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/services.js.map +1 -1
- package/dist/drive/capabilities.js.map +1 -1
- package/dist/drive/entities/Comment.d.ts +1 -1
- package/dist/drive/entities/Permission.d.ts +5 -5
- package/dist/drive/entities/Reply.d.ts +1 -1
- package/dist/drive/methods/create_comment/index.d.ts +1 -1
- package/dist/drive/methods/create_comment/schema.d.ts +1 -1
- package/dist/drive/methods/create_comment/schema.d.ts.map +1 -1
- package/dist/drive/methods/create_reply/index.d.ts +2 -2
- package/dist/drive/methods/create_reply/schema.d.ts +2 -2
- package/dist/drive/methods/create_reply/schema.d.ts.map +1 -1
- package/dist/drive/methods/create_shared_drive/schema.d.ts.map +1 -1
- package/dist/drive/methods/delete_comment/schema.d.ts.map +1 -1
- package/dist/drive/methods/delete_file/schema.d.ts.map +1 -1
- package/dist/drive/methods/delete_reply/schema.d.ts.map +1 -1
- package/dist/drive/methods/delete_revision/schema.d.ts.map +1 -1
- package/dist/drive/methods/delete_shared_drive/schema.d.ts.map +1 -1
- package/dist/drive/methods/empty_trash/schema.d.ts.map +1 -1
- package/dist/drive/methods/get_about/schema.d.ts.map +1 -1
- package/dist/drive/methods/get_comment/index.d.ts +1 -1
- package/dist/drive/methods/get_comment/schema.d.ts +1 -1
- package/dist/drive/methods/get_comment/schema.d.ts.map +1 -1
- package/dist/drive/methods/get_reply/index.d.ts +1 -1
- package/dist/drive/methods/get_reply/schema.d.ts +1 -1
- package/dist/drive/methods/get_reply/schema.d.ts.map +1 -1
- package/dist/drive/methods/get_revision/schema.d.ts.map +1 -1
- package/dist/drive/methods/get_shared_drive/schema.d.ts.map +1 -1
- package/dist/drive/methods/hide_shared_drive/schema.d.ts.map +1 -1
- package/dist/drive/methods/list_comments/index.d.ts +1 -1
- package/dist/drive/methods/list_comments/schema.d.ts +1 -1
- package/dist/drive/methods/list_comments/schema.d.ts.map +1 -1
- package/dist/drive/methods/list_replies/index.d.ts +1 -1
- package/dist/drive/methods/list_replies/schema.d.ts +1 -1
- package/dist/drive/methods/list_replies/schema.d.ts.map +1 -1
- package/dist/drive/methods/list_revisions/schema.d.ts.map +1 -1
- package/dist/drive/methods/list_shared_drives/schema.d.ts.map +1 -1
- package/dist/drive/methods/registry.d.ts +9 -9
- package/dist/drive/methods/trash_file/schema.d.ts.map +1 -1
- package/dist/drive/methods/unhide_shared_drive/schema.d.ts.map +1 -1
- package/dist/drive/methods/untrash_file/schema.d.ts.map +1 -1
- package/dist/drive/methods/update_comment/index.d.ts +1 -1
- package/dist/drive/methods/update_comment/schema.d.ts +1 -1
- package/dist/drive/methods/update_comment/schema.d.ts.map +1 -1
- package/dist/drive/methods/update_file/schema.d.ts.map +1 -1
- package/dist/drive/methods/update_reply/index.d.ts +1 -1
- package/dist/drive/methods/update_reply/schema.d.ts +1 -1
- package/dist/drive/methods/update_reply/schema.d.ts.map +1 -1
- package/dist/drive/methods/update_revision/schema.d.ts.map +1 -1
- package/dist/drive/methods/update_shared_drive/schema.d.ts.map +1 -1
- package/dist/drive/operation.d.ts.map +1 -1
- package/dist/drive/tools/copy_file/schema.d.ts.map +1 -1
- package/dist/drive/tools/create_file/schema.d.ts.map +1 -1
- package/dist/drive/tools/download_file_content/schema.d.ts.map +1 -1
- package/dist/drive/tools/get_file_metadata/schema.d.ts.map +1 -1
- package/dist/drive/tools/get_file_permissions/index.d.ts +5 -5
- package/dist/drive/tools/get_file_permissions/schema.d.ts +5 -5
- package/dist/drive/tools/get_file_permissions/schema.d.ts.map +1 -1
- package/dist/drive/tools/list_recent_files/index.d.ts +1 -1
- package/dist/drive/tools/list_recent_files/schema.d.ts +1 -1
- package/dist/drive/tools/list_recent_files/schema.d.ts.map +1 -1
- package/dist/drive/tools/read_file_content/schema.d.ts.map +1 -1
- package/dist/drive/tools/registry.d.ts +6 -6
- package/dist/drive/tools/search_files/schema.d.ts.map +1 -1
- package/dist/gmail/capabilities.js.map +1 -1
- package/dist/gmail/entities/Filter.d.ts +1 -1
- package/dist/gmail/entities/FilterCriteria.d.ts +1 -1
- package/dist/gmail/methods/batch_delete_messages/schema.d.ts.map +1 -1
- package/dist/gmail/methods/batch_modify_messages/schema.d.ts.map +1 -1
- package/dist/gmail/methods/create_filter/index.d.ts +2 -2
- package/dist/gmail/methods/create_filter/schema.d.ts +2 -2
- package/dist/gmail/methods/create_filter/schema.d.ts.map +1 -1
- package/dist/gmail/methods/delete_draft/schema.d.ts.map +1 -1
- package/dist/gmail/methods/delete_filter/schema.d.ts.map +1 -1
- package/dist/gmail/methods/delete_label/schema.d.ts.map +1 -1
- package/dist/gmail/methods/delete_message/schema.d.ts.map +1 -1
- package/dist/gmail/methods/delete_thread/schema.d.ts.map +1 -1
- package/dist/gmail/methods/download_attachment/schema.d.ts.map +1 -1
- package/dist/gmail/methods/get_draft/schema.d.ts.map +1 -1
- package/dist/gmail/methods/get_filter/index.d.ts +1 -1
- package/dist/gmail/methods/get_filter/schema.d.ts +1 -1
- package/dist/gmail/methods/get_filter/schema.d.ts.map +1 -1
- package/dist/gmail/methods/get_label/schema.d.ts.map +1 -1
- package/dist/gmail/methods/get_message/index.d.ts +1 -1
- package/dist/gmail/methods/get_message/schema.d.ts +1 -1
- package/dist/gmail/methods/get_message/schema.d.ts.map +1 -1
- package/dist/gmail/methods/list_filters/index.d.ts +1 -1
- package/dist/gmail/methods/list_filters/schema.d.ts +1 -1
- package/dist/gmail/methods/list_filters/schema.d.ts.map +1 -1
- package/dist/gmail/methods/list_messages/schema.d.ts.map +1 -1
- package/dist/gmail/methods/registry.d.ts +5 -5
- package/dist/gmail/methods/send_draft/schema.d.ts.map +1 -1
- package/dist/gmail/methods/send_message/schema.d.ts.map +1 -1
- package/dist/gmail/methods/trash_message/schema.d.ts.map +1 -1
- package/dist/gmail/methods/trash_thread/schema.d.ts.map +1 -1
- package/dist/gmail/methods/untrash_message/schema.d.ts.map +1 -1
- package/dist/gmail/methods/untrash_thread/schema.d.ts.map +1 -1
- package/dist/gmail/methods/update_draft/schema.d.ts.map +1 -1
- package/dist/gmail/methods/update_label/schema.d.ts.map +1 -1
- package/dist/gmail/operation.d.ts.map +1 -1
- package/dist/gmail/tools/create_draft/schema.d.ts.map +1 -1
- package/dist/gmail/tools/create_label/schema.d.ts.map +1 -1
- package/dist/gmail/tools/get_thread/index.d.ts +1 -1
- package/dist/gmail/tools/get_thread/schema.d.ts +1 -1
- package/dist/gmail/tools/get_thread/schema.d.ts.map +1 -1
- package/dist/gmail/tools/label_message/schema.d.ts.map +1 -1
- package/dist/gmail/tools/label_thread/schema.d.ts.map +1 -1
- package/dist/gmail/tools/list_drafts/schema.d.ts.map +1 -1
- package/dist/gmail/tools/list_labels/schema.d.ts.map +1 -1
- package/dist/gmail/tools/registry.d.ts +1 -1
- package/dist/gmail/tools/search_threads/schema.d.ts.map +1 -1
- package/dist/gmail/tools/unlabel_message/schema.d.ts.map +1 -1
- package/dist/gmail/tools/unlabel_thread/schema.d.ts.map +1 -1
- package/dist/lib/instructions.d.ts +1 -1
- package/dist/lib/instructions.js +2 -2
- package/dist/lib/instructions.js.map +1 -1
- package/dist/lib/operation.d.ts.map +1 -1
- package/dist/sheets/capabilities.js.map +1 -1
- package/dist/sheets/entities/BasicChartSpec.d.ts +72 -0
- package/dist/sheets/entities/BasicChartSpec.d.ts.map +1 -0
- package/dist/sheets/entities/BasicChartSpec.js +53 -0
- package/dist/sheets/entities/BasicChartSpec.js.map +1 -0
- package/dist/sheets/entities/Border.d.ts +38 -0
- package/dist/sheets/entities/Border.d.ts.map +1 -0
- package/dist/sheets/entities/Border.js +15 -0
- package/dist/sheets/entities/Border.js.map +1 -0
- package/dist/sheets/entities/CellFormat.d.ts +86 -0
- package/dist/sheets/entities/CellFormat.d.ts.map +1 -0
- package/dist/sheets/entities/CellFormat.js +30 -0
- package/dist/sheets/entities/CellFormat.js.map +1 -0
- package/dist/sheets/entities/ChartData.d.ts +20 -0
- package/dist/sheets/entities/ChartData.d.ts.map +1 -0
- package/dist/sheets/entities/ChartData.js +18 -0
- package/dist/sheets/entities/ChartData.js.map +1 -0
- package/dist/sheets/entities/ChartSpec.d.ts +111 -0
- package/dist/sheets/entities/ChartSpec.d.ts.map +1 -0
- package/dist/sheets/entities/ChartSpec.js +18 -0
- package/dist/sheets/entities/ChartSpec.js.map +1 -0
- package/dist/sheets/entities/Color.d.ts +15 -0
- package/dist/sheets/entities/Color.d.ts.map +1 -0
- package/dist/sheets/entities/Color.js +24 -0
- package/dist/sheets/entities/Color.js.map +1 -0
- package/dist/sheets/entities/ColorStyle.d.ts +29 -0
- package/dist/sheets/entities/ColorStyle.d.ts.map +1 -0
- package/dist/sheets/entities/ColorStyle.js +28 -0
- package/dist/sheets/entities/ColorStyle.js.map +1 -0
- package/dist/sheets/entities/DataFilter.d.ts +3 -3
- package/dist/sheets/entities/DataFilterValueRange.d.ts +4 -4
- package/dist/sheets/entities/DateTimeRenderOption.d.ts +1 -1
- package/dist/sheets/entities/DeveloperMetadata.d.ts +2 -2
- package/dist/sheets/entities/DeveloperMetadataLocation.d.ts +2 -2
- package/dist/sheets/entities/DeveloperMetadataLookup.d.ts +3 -3
- package/dist/sheets/entities/DimensionRange.d.ts +1 -1
- package/dist/sheets/entities/DimensionRange.d.ts.map +1 -1
- package/dist/sheets/entities/DimensionRange.js +2 -0
- package/dist/sheets/entities/DimensionRange.js.map +1 -1
- package/dist/sheets/entities/EmbeddedObjectPosition.d.ts +24 -0
- package/dist/sheets/entities/EmbeddedObjectPosition.d.ts.map +1 -0
- package/dist/sheets/entities/EmbeddedObjectPosition.js +17 -0
- package/dist/sheets/entities/EmbeddedObjectPosition.js.map +1 -0
- package/dist/sheets/entities/GridCoordinate.d.ts +13 -0
- package/dist/sheets/entities/GridCoordinate.d.ts.map +1 -0
- package/dist/sheets/entities/GridCoordinate.js +12 -0
- package/dist/sheets/entities/GridCoordinate.js.map +1 -0
- package/dist/sheets/entities/GridProperties.d.ts +1 -1
- package/dist/sheets/entities/GridProperties.d.ts.map +1 -1
- package/dist/sheets/entities/GridProperties.js +10 -3
- package/dist/sheets/entities/GridProperties.js.map +1 -1
- package/dist/sheets/entities/MajorDimension.d.ts +1 -1
- package/dist/sheets/entities/MatchedValueRange.d.ts +4 -4
- package/dist/sheets/entities/NamedRange.d.ts +21 -0
- package/dist/sheets/entities/NamedRange.d.ts.map +1 -0
- package/dist/sheets/entities/NamedRange.js +15 -0
- package/dist/sheets/entities/NamedRange.js.map +1 -0
- package/dist/sheets/entities/NumberFormat.d.ts +21 -0
- package/dist/sheets/entities/NumberFormat.d.ts.map +1 -0
- package/dist/sheets/entities/NumberFormat.js +16 -0
- package/dist/sheets/entities/NumberFormat.js.map +1 -0
- package/dist/sheets/entities/OverlayPosition.d.ts +20 -0
- package/dist/sheets/entities/OverlayPosition.d.ts.map +1 -0
- package/dist/sheets/entities/OverlayPosition.js +34 -0
- package/dist/sheets/entities/OverlayPosition.js.map +1 -0
- package/dist/sheets/entities/PieChartSpec.d.ts +42 -0
- package/dist/sheets/entities/PieChartSpec.d.ts.map +1 -0
- package/dist/sheets/entities/PieChartSpec.js +30 -0
- package/dist/sheets/entities/PieChartSpec.js.map +1 -0
- package/dist/sheets/entities/SheetProperties.d.ts +23 -5
- package/dist/sheets/entities/SheetProperties.d.ts.map +1 -1
- package/dist/sheets/entities/SheetProperties.js +5 -3
- package/dist/sheets/entities/SheetProperties.js.map +1 -1
- package/dist/sheets/entities/Spreadsheet.d.ts +33 -4
- package/dist/sheets/entities/Spreadsheet.d.ts.map +1 -1
- package/dist/sheets/entities/Spreadsheet.js +5 -0
- package/dist/sheets/entities/Spreadsheet.js.map +1 -1
- package/dist/sheets/entities/SpreadsheetProperties.d.ts +2 -2
- package/dist/sheets/entities/TextFormat.d.ts +35 -0
- package/dist/sheets/entities/TextFormat.d.ts.map +1 -0
- package/dist/sheets/entities/TextFormat.js +18 -0
- package/dist/sheets/entities/TextFormat.js.map +1 -0
- package/dist/sheets/entities/UpdateValuesByDataFilterResponse.d.ts +4 -4
- package/dist/sheets/entities/UpdateValuesResponse.d.ts +1 -1
- package/dist/sheets/entities/ValueRange.d.ts +1 -1
- package/dist/sheets/entities/ValueRenderOption.d.ts +1 -1
- package/dist/sheets/instructions.d.ts.map +1 -1
- package/dist/sheets/instructions.js +6 -1
- package/dist/sheets/instructions.js.map +1 -1
- package/dist/sheets/lib/charts.d.ts +15 -0
- package/dist/sheets/lib/charts.d.ts.map +1 -0
- package/dist/sheets/lib/charts.js +66 -0
- package/dist/sheets/lib/charts.js.map +1 -0
- package/dist/sheets/lib/formats.d.ts +29 -0
- package/dist/sheets/lib/formats.d.ts.map +1 -0
- package/dist/sheets/lib/formats.js +61 -0
- package/dist/sheets/lib/formats.js.map +1 -0
- package/dist/sheets/lib/requests.d.ts +20 -0
- package/dist/sheets/lib/requests.d.ts.map +1 -0
- package/dist/sheets/lib/requests.js +41 -0
- package/dist/sheets/lib/requests.js.map +1 -0
- package/dist/sheets/lib/spreadsheet.d.ts +3 -0
- package/dist/sheets/lib/spreadsheet.d.ts.map +1 -1
- package/dist/sheets/lib/spreadsheet.js +32 -0
- package/dist/sheets/lib/spreadsheet.js.map +1 -1
- package/dist/sheets/methods/add_chart/handler.d.ts +5 -0
- package/dist/sheets/methods/add_chart/handler.d.ts.map +1 -0
- package/dist/sheets/methods/add_chart/handler.js +25 -0
- package/dist/sheets/methods/add_chart/handler.js.map +1 -0
- package/dist/sheets/methods/add_chart/index.d.ts +125 -0
- package/dist/sheets/methods/add_chart/index.d.ts.map +1 -0
- package/dist/sheets/methods/add_chart/index.js +20 -0
- package/dist/sheets/methods/add_chart/index.js.map +1 -0
- package/dist/sheets/methods/add_chart/schema.d.ts +126 -0
- package/dist/sheets/methods/add_chart/schema.d.ts.map +1 -0
- package/dist/sheets/methods/add_chart/schema.js +23 -0
- package/dist/sheets/methods/add_chart/schema.js.map +1 -0
- package/dist/sheets/methods/add_named_range/handler.d.ts +5 -0
- package/dist/sheets/methods/add_named_range/handler.d.ts.map +1 -0
- package/dist/sheets/methods/add_named_range/handler.js +12 -0
- package/dist/sheets/methods/add_named_range/handler.js.map +1 -0
- package/dist/sheets/methods/add_named_range/index.d.ts +26 -0
- package/dist/sheets/methods/add_named_range/index.d.ts.map +1 -0
- package/dist/sheets/methods/add_named_range/index.js +20 -0
- package/dist/sheets/methods/add_named_range/index.js.map +1 -0
- package/dist/sheets/methods/add_named_range/schema.d.ts +26 -0
- package/dist/sheets/methods/add_named_range/schema.d.ts.map +1 -0
- package/dist/sheets/methods/add_named_range/schema.js +14 -0
- package/dist/sheets/methods/add_named_range/schema.js.map +1 -0
- package/dist/sheets/methods/add_sheet/handler.d.ts +5 -0
- package/dist/sheets/methods/add_sheet/handler.d.ts.map +1 -0
- package/dist/sheets/methods/add_sheet/handler.js +19 -0
- package/dist/sheets/methods/add_sheet/handler.js.map +1 -0
- package/dist/sheets/methods/add_sheet/index.d.ts +69 -0
- package/dist/sheets/methods/add_sheet/index.d.ts.map +1 -0
- package/dist/sheets/methods/add_sheet/index.js +20 -0
- package/dist/sheets/methods/add_sheet/index.js.map +1 -0
- package/dist/sheets/methods/add_sheet/schema.d.ts +69 -0
- package/dist/sheets/methods/add_sheet/schema.d.ts.map +1 -0
- package/dist/sheets/methods/add_sheet/schema.js +24 -0
- package/dist/sheets/methods/add_sheet/schema.js.map +1 -0
- package/dist/sheets/methods/append_values/index.d.ts +5 -5
- package/dist/sheets/methods/append_values/schema.d.ts +5 -5
- package/dist/sheets/methods/append_values/schema.d.ts.map +1 -1
- package/dist/sheets/methods/auto_resize_dimensions/handler.d.ts +5 -0
- package/dist/sheets/methods/auto_resize_dimensions/handler.d.ts.map +1 -0
- package/dist/sheets/methods/auto_resize_dimensions/handler.js +9 -0
- package/dist/sheets/methods/auto_resize_dimensions/handler.js.map +1 -0
- package/dist/sheets/methods/auto_resize_dimensions/index.d.ts +16 -0
- package/dist/sheets/methods/auto_resize_dimensions/index.d.ts.map +1 -0
- package/dist/sheets/methods/auto_resize_dimensions/index.js +17 -0
- package/dist/sheets/methods/auto_resize_dimensions/index.js.map +1 -0
- package/dist/sheets/methods/auto_resize_dimensions/schema.d.ts +20 -0
- package/dist/sheets/methods/auto_resize_dimensions/schema.d.ts.map +1 -0
- package/dist/sheets/methods/auto_resize_dimensions/schema.js +13 -0
- package/dist/sheets/methods/auto_resize_dimensions/schema.js.map +1 -0
- package/dist/sheets/methods/batch_clear_values/schema.d.ts.map +1 -1
- package/dist/sheets/methods/batch_clear_values_by_data_filter/index.d.ts +3 -3
- package/dist/sheets/methods/batch_clear_values_by_data_filter/schema.d.ts +3 -3
- package/dist/sheets/methods/batch_clear_values_by_data_filter/schema.d.ts.map +1 -1
- package/dist/sheets/methods/batch_get_values/index.d.ts +4 -4
- package/dist/sheets/methods/batch_get_values/schema.d.ts +4 -4
- package/dist/sheets/methods/batch_get_values/schema.d.ts.map +1 -1
- package/dist/sheets/methods/batch_get_values_by_data_filter/index.d.ts +10 -10
- package/dist/sheets/methods/batch_get_values_by_data_filter/schema.d.ts +10 -10
- package/dist/sheets/methods/batch_get_values_by_data_filter/schema.d.ts.map +1 -1
- package/dist/sheets/methods/batch_update_values/index.d.ts +4 -4
- package/dist/sheets/methods/batch_update_values/schema.d.ts +4 -4
- package/dist/sheets/methods/batch_update_values/schema.d.ts.map +1 -1
- package/dist/sheets/methods/batch_update_values_by_data_filter/index.d.ts +10 -10
- package/dist/sheets/methods/batch_update_values_by_data_filter/schema.d.ts +10 -10
- package/dist/sheets/methods/batch_update_values_by_data_filter/schema.d.ts.map +1 -1
- package/dist/sheets/methods/clear_values/schema.d.ts.map +1 -1
- package/dist/sheets/methods/copy_sheet/index.d.ts +20 -2
- package/dist/sheets/methods/copy_sheet/index.d.ts.map +1 -1
- package/dist/sheets/methods/copy_sheet/schema.d.ts +20 -2
- package/dist/sheets/methods/copy_sheet/schema.d.ts.map +1 -1
- package/dist/sheets/methods/create_spreadsheet/index.d.ts +33 -4
- package/dist/sheets/methods/create_spreadsheet/index.d.ts.map +1 -1
- package/dist/sheets/methods/create_spreadsheet/schema.d.ts +33 -4
- package/dist/sheets/methods/create_spreadsheet/schema.d.ts.map +1 -1
- package/dist/sheets/methods/delete_dimension/handler.d.ts +5 -0
- package/dist/sheets/methods/delete_dimension/handler.d.ts.map +1 -0
- package/dist/sheets/methods/delete_dimension/handler.js +9 -0
- package/dist/sheets/methods/delete_dimension/handler.js.map +1 -0
- package/dist/sheets/methods/delete_dimension/index.d.ts +19 -0
- package/dist/sheets/methods/delete_dimension/index.d.ts.map +1 -0
- package/dist/sheets/methods/delete_dimension/index.js +20 -0
- package/dist/sheets/methods/delete_dimension/index.js.map +1 -0
- package/dist/sheets/methods/delete_dimension/schema.d.ts +20 -0
- package/dist/sheets/methods/delete_dimension/schema.d.ts.map +1 -0
- package/dist/sheets/methods/delete_dimension/schema.js +13 -0
- package/dist/sheets/methods/delete_dimension/schema.js.map +1 -0
- package/dist/sheets/methods/delete_embedded_object/handler.d.ts +5 -0
- package/dist/sheets/methods/delete_embedded_object/handler.d.ts.map +1 -0
- package/dist/sheets/methods/delete_embedded_object/handler.js +8 -0
- package/dist/sheets/methods/delete_embedded_object/handler.js.map +1 -0
- package/dist/sheets/methods/delete_embedded_object/index.d.ts +12 -0
- package/dist/sheets/methods/delete_embedded_object/index.d.ts.map +1 -0
- package/dist/sheets/methods/delete_embedded_object/index.js +20 -0
- package/dist/sheets/methods/delete_embedded_object/index.js.map +1 -0
- package/dist/sheets/methods/delete_embedded_object/schema.d.ts +13 -0
- package/dist/sheets/methods/delete_embedded_object/schema.d.ts.map +1 -0
- package/dist/sheets/methods/delete_embedded_object/schema.js +16 -0
- package/dist/sheets/methods/delete_embedded_object/schema.js.map +1 -0
- package/dist/sheets/methods/delete_named_range/handler.d.ts +5 -0
- package/dist/sheets/methods/delete_named_range/handler.d.ts.map +1 -0
- package/dist/sheets/methods/delete_named_range/handler.js +8 -0
- package/dist/sheets/methods/delete_named_range/handler.js.map +1 -0
- package/dist/sheets/methods/delete_named_range/index.d.ts +12 -0
- package/dist/sheets/methods/delete_named_range/index.d.ts.map +1 -0
- package/dist/sheets/methods/delete_named_range/index.js +20 -0
- package/dist/sheets/methods/delete_named_range/index.js.map +1 -0
- package/dist/sheets/methods/delete_named_range/schema.d.ts +13 -0
- package/dist/sheets/methods/delete_named_range/schema.d.ts.map +1 -0
- package/dist/sheets/methods/delete_named_range/schema.js +15 -0
- package/dist/sheets/methods/delete_named_range/schema.js.map +1 -0
- package/dist/sheets/methods/delete_sheet/handler.d.ts +5 -0
- package/dist/sheets/methods/delete_sheet/handler.d.ts.map +1 -0
- package/dist/sheets/methods/delete_sheet/handler.js +6 -0
- package/dist/sheets/methods/delete_sheet/handler.js.map +1 -0
- package/dist/sheets/methods/delete_sheet/index.d.ts +13 -0
- package/dist/sheets/methods/delete_sheet/index.d.ts.map +1 -0
- package/dist/sheets/methods/delete_sheet/index.js +21 -0
- package/dist/sheets/methods/delete_sheet/index.js.map +1 -0
- package/dist/sheets/methods/delete_sheet/schema.d.ts +13 -0
- package/dist/sheets/methods/delete_sheet/schema.d.ts.map +1 -0
- package/dist/sheets/methods/delete_sheet/schema.js +13 -0
- package/dist/sheets/methods/delete_sheet/schema.js.map +1 -0
- package/dist/sheets/methods/duplicate_sheet/handler.d.ts +5 -0
- package/dist/sheets/methods/duplicate_sheet/handler.d.ts.map +1 -0
- package/dist/sheets/methods/duplicate_sheet/handler.js +15 -0
- package/dist/sheets/methods/duplicate_sheet/handler.js.map +1 -0
- package/dist/sheets/methods/duplicate_sheet/index.d.ts +46 -0
- package/dist/sheets/methods/duplicate_sheet/index.d.ts.map +1 -0
- package/dist/sheets/methods/duplicate_sheet/index.js +20 -0
- package/dist/sheets/methods/duplicate_sheet/index.js.map +1 -0
- package/dist/sheets/methods/duplicate_sheet/schema.d.ts +46 -0
- package/dist/sheets/methods/duplicate_sheet/schema.d.ts.map +1 -0
- package/dist/sheets/methods/duplicate_sheet/schema.js +26 -0
- package/dist/sheets/methods/duplicate_sheet/schema.js.map +1 -0
- package/dist/sheets/methods/get_developer_metadata/index.d.ts +2 -2
- package/dist/sheets/methods/get_developer_metadata/schema.d.ts +2 -2
- package/dist/sheets/methods/get_developer_metadata/schema.d.ts.map +1 -1
- package/dist/sheets/methods/get_spreadsheet/index.d.ts +33 -4
- package/dist/sheets/methods/get_spreadsheet/index.d.ts.map +1 -1
- package/dist/sheets/methods/get_spreadsheet/schema.d.ts +33 -4
- package/dist/sheets/methods/get_spreadsheet/schema.d.ts.map +1 -1
- package/dist/sheets/methods/get_values/index.d.ts +4 -4
- package/dist/sheets/methods/get_values/schema.d.ts +4 -4
- package/dist/sheets/methods/get_values/schema.d.ts.map +1 -1
- package/dist/sheets/methods/insert_dimension/handler.d.ts +5 -0
- package/dist/sheets/methods/insert_dimension/handler.d.ts.map +1 -0
- package/dist/sheets/methods/insert_dimension/handler.js +18 -0
- package/dist/sheets/methods/insert_dimension/handler.js.map +1 -0
- package/dist/sheets/methods/insert_dimension/index.d.ts +16 -0
- package/dist/sheets/methods/insert_dimension/index.d.ts.map +1 -0
- package/dist/sheets/methods/insert_dimension/index.js +16 -0
- package/dist/sheets/methods/insert_dimension/index.js.map +1 -0
- package/dist/sheets/methods/insert_dimension/schema.d.ts +21 -0
- package/dist/sheets/methods/insert_dimension/schema.d.ts.map +1 -0
- package/dist/sheets/methods/insert_dimension/schema.js +22 -0
- package/dist/sheets/methods/insert_dimension/schema.js.map +1 -0
- package/dist/sheets/methods/registry.d.ts +882 -65
- package/dist/sheets/methods/registry.d.ts.map +1 -1
- package/dist/sheets/methods/registry.js +37 -2
- package/dist/sheets/methods/registry.js.map +1 -1
- package/dist/sheets/methods/repeat_cell/handler.d.ts +5 -0
- package/dist/sheets/methods/repeat_cell/handler.d.ts.map +1 -0
- package/dist/sheets/methods/repeat_cell/handler.js +22 -0
- package/dist/sheets/methods/repeat_cell/handler.js.map +1 -0
- package/dist/sheets/methods/repeat_cell/index.d.ts +95 -0
- package/dist/sheets/methods/repeat_cell/index.d.ts.map +1 -0
- package/dist/sheets/methods/repeat_cell/index.js +22 -0
- package/dist/sheets/methods/repeat_cell/index.js.map +1 -0
- package/dist/sheets/methods/repeat_cell/schema.d.ts +94 -0
- package/dist/sheets/methods/repeat_cell/schema.d.ts.map +1 -0
- package/dist/sheets/methods/repeat_cell/schema.js +18 -0
- package/dist/sheets/methods/repeat_cell/schema.js.map +1 -0
- package/dist/sheets/methods/search_developer_metadata/index.d.ts +8 -8
- package/dist/sheets/methods/search_developer_metadata/schema.d.ts +8 -8
- package/dist/sheets/methods/search_developer_metadata/schema.d.ts.map +1 -1
- package/dist/sheets/methods/update_borders/handler.d.ts +5 -0
- package/dist/sheets/methods/update_borders/handler.d.ts.map +1 -0
- package/dist/sheets/methods/update_borders/handler.js +21 -0
- package/dist/sheets/methods/update_borders/handler.js.map +1 -0
- package/dist/sheets/methods/update_borders/index.d.ts +191 -0
- package/dist/sheets/methods/update_borders/index.d.ts.map +1 -0
- package/dist/sheets/methods/update_borders/index.js +20 -0
- package/dist/sheets/methods/update_borders/index.js.map +1 -0
- package/dist/sheets/methods/update_borders/schema.d.ts +192 -0
- package/dist/sheets/methods/update_borders/schema.d.ts.map +1 -0
- package/dist/sheets/methods/update_borders/schema.js +20 -0
- package/dist/sheets/methods/update_borders/schema.js.map +1 -0
- package/dist/sheets/methods/update_chart_spec/handler.d.ts +5 -0
- package/dist/sheets/methods/update_chart_spec/handler.d.ts.map +1 -0
- package/dist/sheets/methods/update_chart_spec/handler.js +10 -0
- package/dist/sheets/methods/update_chart_spec/handler.js.map +1 -0
- package/dist/sheets/methods/update_chart_spec/index.d.ts +112 -0
- package/dist/sheets/methods/update_chart_spec/index.d.ts.map +1 -0
- package/dist/sheets/methods/update_chart_spec/index.js +20 -0
- package/dist/sheets/methods/update_chart_spec/index.js.map +1 -0
- package/dist/sheets/methods/update_chart_spec/schema.d.ts +113 -0
- package/dist/sheets/methods/update_chart_spec/schema.d.ts.map +1 -0
- package/dist/sheets/methods/update_chart_spec/schema.js +15 -0
- package/dist/sheets/methods/update_chart_spec/schema.js.map +1 -0
- package/dist/sheets/methods/update_sheet_properties/handler.d.ts +5 -0
- package/dist/sheets/methods/update_sheet_properties/handler.d.ts.map +1 -0
- package/dist/sheets/methods/update_sheet_properties/handler.js +30 -0
- package/dist/sheets/methods/update_sheet_properties/handler.js.map +1 -0
- package/dist/sheets/methods/update_sheet_properties/index.d.ts +44 -0
- package/dist/sheets/methods/update_sheet_properties/index.d.ts.map +1 -0
- package/dist/sheets/methods/update_sheet_properties/index.js +24 -0
- package/dist/sheets/methods/update_sheet_properties/index.js.map +1 -0
- package/dist/sheets/methods/update_sheet_properties/schema.d.ts +41 -0
- package/dist/sheets/methods/update_sheet_properties/schema.d.ts.map +1 -0
- package/dist/sheets/methods/update_sheet_properties/schema.js +28 -0
- package/dist/sheets/methods/update_sheet_properties/schema.js.map +1 -0
- package/dist/sheets/methods/update_spreadsheet_properties/handler.d.ts +5 -0
- package/dist/sheets/methods/update_spreadsheet_properties/handler.d.ts.map +1 -0
- package/dist/sheets/methods/update_spreadsheet_properties/handler.js +26 -0
- package/dist/sheets/methods/update_spreadsheet_properties/handler.js.map +1 -0
- package/dist/sheets/methods/update_spreadsheet_properties/index.d.ts +20 -0
- package/dist/sheets/methods/update_spreadsheet_properties/index.d.ts.map +1 -0
- package/dist/sheets/methods/update_spreadsheet_properties/index.js +21 -0
- package/dist/sheets/methods/update_spreadsheet_properties/index.js.map +1 -0
- package/dist/sheets/methods/update_spreadsheet_properties/schema.d.ts +20 -0
- package/dist/sheets/methods/update_spreadsheet_properties/schema.d.ts.map +1 -0
- package/dist/sheets/methods/update_spreadsheet_properties/schema.js +19 -0
- package/dist/sheets/methods/update_spreadsheet_properties/schema.js.map +1 -0
- package/dist/sheets/methods/update_values/index.d.ts +4 -4
- package/dist/sheets/methods/update_values/schema.d.ts +4 -4
- package/dist/sheets/methods/update_values/schema.d.ts.map +1 -1
- package/dist/sheets/operation.d.ts.map +1 -1
- package/dist/suite/dispatch.d.ts +1 -1
- package/dist/suite/dispatch.d.ts.map +1 -1
- package/package.json +6 -6
package/ADOPTING.md
CHANGED
|
@@ -17,9 +17,10 @@ Most agent clients ship, or will ship, some built-in Google integration. This
|
|
|
17
17
|
suite exists because a thin slice is not enough to actually run an account, and
|
|
18
18
|
the differences are concrete:
|
|
19
19
|
|
|
20
|
-
- **MCP and then some.**
|
|
21
|
-
*plus* the broader REST method surface
|
|
22
|
-
|
|
20
|
+
- **MCP and then some.** The Gmail, Calendar, and Drive servers expose
|
|
21
|
+
Google's curated MCP toolset *plus* the broader REST method surface;
|
|
22
|
+
Sheets and Docs are REST-sourced throughout: [132 operations](./README.md#services)
|
|
23
|
+
across Gmail (33), Calendar (25), Drive (35), Sheets (30), and Docs (9). Each
|
|
23
24
|
service's `CAPABILITIES.md` enumerates its operations with provenance.
|
|
24
25
|
Built-in connectors document a narrower surface; as of this writing,
|
|
25
26
|
Anthropic documents its claude.ai Gmail connector as searching, reading,
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
16
|
<strong>Google Workspace MCP servers you can read in an afternoon, one per service.</strong><br />
|
|
17
|
-
The curated <a href="https://modelcontextprotocol.io/">MCP</a> toolset plus the broader REST surface for Gmail, Google Calendar, Google Drive, Google Docs, and Google Sheets, one server per service per account: <strong>
|
|
17
|
+
The curated <a href="https://modelcontextprotocol.io/">MCP</a> toolset plus the broader REST surface for Gmail, Google Calendar, Google Drive, Google Docs, and Google Sheets, one server per service per account: <strong>132 self-describing operations</strong> across five Google services, so an AI agent (Claude, Cursor, or any MCP client) can do (nearly) anything your accounts can, on several accounts at once, and never on the wrong one. Every operation cites its Google reference page and validates input and output; test coverage is pinned at 100%.
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<p align="center">
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<sub><strong>
|
|
33
|
+
<sub><strong>132 operations</strong> ship today: <strong>Gmail</strong> (<a href="./src/gmail/CAPABILITIES.md">33</a>), <strong>Calendar</strong> (<a href="./src/calendar/CAPABILITIES.md">25</a>), <strong>Sheets</strong> (<a href="./src/sheets/CAPABILITIES.md">30</a>), <strong>Docs</strong> (<a href="./src/docs/CAPABILITIES.md">9</a>), and <strong>Drive</strong> (<a href="./src/drive/CAPABILITIES.md">35</a>).</sub>
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
36
|
<p align="center"><sub><strong>Replacing a built-in connector?</strong> Hand your agent <a href="./ADOPTING.md">ADOPTING.md</a>: the playbook to adopt, supersede, verify, and decommission.</sub></p>
|
|
@@ -46,7 +46,7 @@ The design has two internal concepts and nothing else:
|
|
|
46
46
|
|
|
47
47
|
That is the whole surface. Read one operation folder and you understand all of them.
|
|
48
48
|
|
|
49
|
-
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17), Drive with [35](./src/drive/CAPABILITIES.md) (8 plus 27), Sheets with [
|
|
49
|
+
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17), Drive with [35](./src/drive/CAPABILITIES.md) (8 plus 27), Sheets with [30](./src/sheets/CAPABILITIES.md), and Docs with [9](./src/docs/CAPABILITIES.md) (Sheets and Docs are REST-sourced throughout; Google published no MCP toolset for either when they shipped, though previews now exist); the split is explained in [MCP, and then some](#mcp-and-then-some).
|
|
50
50
|
- **The folder tree mirrors Google's docs.** A Google tools-list reference page becomes a `tools/` folder; a Google REST method reference page becomes a `methods/` folder. If you can find the operation in Google's docs, you can find it in this repo.
|
|
51
51
|
|
|
52
52
|
| Google's reference page | This repo's folder |
|
|
@@ -67,7 +67,7 @@ This is an MCP server, and deliberately more than one. Google publishes an MCP t
|
|
|
67
67
|
- **`tools/`** mirrors Google's **MCP toolset** reference, verbatim.
|
|
68
68
|
- **`methods/`** covers the broader **REST** reference, the operations the MCP toolset omits.
|
|
69
69
|
|
|
70
|
-
The split is Google's own (its MCP reference and its REST reference are separate trees); we keep it on disk on purpose and unify it operationally (one `Operation` type, one merged wire surface where everything is an MCP tool). The breadth of [the operation list](./src/gmail/CAPABILITIES.md) is the evidence that MCP alone is not enough for real work. Sheets and Docs are the limit case: Google
|
|
70
|
+
The split is Google's own (its MCP reference and its REST reference are separate trees); we keep it on disk on purpose and unify it operationally (one `Operation` type, one merged wire surface where everything is an MCP tool). The breadth of [the operation list](./src/gmail/CAPABILITIES.md) is the evidence that MCP alone is not enough for real work. Sheets and Docs are the limit case: Google published no MCP toolset for either when they shipped (developer previews have since appeared), so those servers are methods-only ([30](./src/sheets/CAPABILITIES.md) and [9](./src/docs/CAPABILITIES.md) operations sourced entirely from the REST reference). Keeping the two sourced surfaces separate also makes each new operation a bounded, documentation-driven unit of work; the recipe is in [EXTENDING.md](./EXTENDING.md).
|
|
71
71
|
|
|
72
72
|
## Quickstart
|
|
73
73
|
|
|
@@ -139,7 +139,7 @@ src/
|
|
|
139
139
|
doctor/ # google-mcp-doctor: provisioning + auth-health CLI
|
|
140
140
|
gmail/ # the Gmail server (reference/canary); new services mirror its shape
|
|
141
141
|
calendar/ # the Calendar server; same shape
|
|
142
|
-
sheets/ # the Sheets server; same shape, methods-only (
|
|
142
|
+
sheets/ # the Sheets server; same shape, methods-only (REST-sourced)
|
|
143
143
|
docs/ # the Docs server; same shape, methods-only
|
|
144
144
|
drive/ # the Drive server; same shape (MCP toolset + REST methods)
|
|
145
145
|
```
|
|
@@ -187,11 +187,11 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full task list, [AGENTS.md](./A
|
|
|
187
187
|
|---|---|---|
|
|
188
188
|
| **Gmail** | ✅ Implemented | [33 operations](./src/gmail/CAPABILITIES.md): threads, messages, drafts, labels, filters, attachments |
|
|
189
189
|
| **Calendar** | ✅ Implemented | [25 operations](./src/calendar/CAPABILITIES.md): events, calendars, free/busy, meeting-time suggestions |
|
|
190
|
-
| **Sheets** | ✅ Implemented | [
|
|
190
|
+
| **Sheets** | ✅ Implemented | [30 operations](./src/sheets/CAPABILITIES.md): spreadsheets, values, batch and data-filter reads/writes, developer metadata, sheet management, dimensions, named ranges, formatting and borders, charts |
|
|
191
191
|
| **Docs** | ✅ Implemented | [9 operations](./src/docs/CAPABILITIES.md): document reads and creation, curated text editing and styling |
|
|
192
192
|
| **Drive** | ✅ Implemented | [35 operations](./src/drive/CAPABILITIES.md): files, search, content, comments, revisions, shared drives |
|
|
193
193
|
|
|
194
|
-
Gmail is the reference (canary) implementation; Calendar is its first replication; Sheets and Docs are methods-only (Google
|
|
194
|
+
Gmail is the reference (canary) implementation; Calendar is its first replication; Sheets and Docs are methods-only (REST-sourced; Google's MCP toolsets for them arrived later, as previews); Drive carries both wings; each new service mirrors the same shape.
|
|
195
195
|
|
|
196
196
|
---
|
|
197
197
|
|
package/dist/auth/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;GAqBG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CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,SAAS,CAAC,OAAe,EAAE,MAAM,GAAW,UAAU,EAAE;IACtE,OAAO,MAAM,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,OAAO,OAAO,CAAC,CAAC;AAChF,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,MAAM,GAAW,UAAU,EAAE;IAC5E,MAAM,QAAQ,GAAG,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC;IAC3C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACb,yBAAyB,QAAQ,uDAAuD,CACzF,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,6EAA6E;IAC7E,oFAAoF;IACpF,0BAA0B;IAC1B,sDAAsD;IACtD,QAAQ;IACR,uCAAuC;IACvC,SAAS;IACT,8CAA8C;IAC9C,OAAO;IACP,2CAA2C;IAC3C,WAAW;IACX,0CAA0C;IAC1C,+EAA+E;IAC/E,gFAAgF;IAChF,iFAAiF;IACjF,8BAA8B;IAC9B,wDAAwD;IACxD,yDAAyD;IACzD,yDAAyD;CAC1D,CAAC","sourcesContent":["import os from 'node:os';\nimport path from 'node:path';\nimport { z } from 'zod';\n\n/**\n * One typed, validated view of the runtime configuration.\n *\n * `loadConfig()` is the single place configuration is read from `process.env`;\n * everything else reads the returned `Config`. (Two sanctioned non-Config\n * reads elsewhere: `server()` in src/lib/server.ts reads `GOOGLE_MCP_ACCOUNT`\n * at startup, where instance identity is bound, and the doctor's `detectWsl`\n * probes `WSL_DISTRO_NAME` for host detection.) It is read lazily (on call,\n * not at import) so a host can set the environment before first use, and so\n * tests can vary it.\n *\n * Canonical credential layout (all overridable by env):\n *\n * <dir>/client_secret.json shared OAuth app\n * <dir>/tokens/<account>.json per-account token\n *\n * Env overrides (empty/whitespace values are treated as unset):\n * GOOGLE_MCP_DIR the config dir (default ~/.google-mcp)\n * GOOGLE_MCP_CLIENT_SECRET path to the client secret JSON\n * GOOGLE_MCP_TOKEN a specific token file (single-account override)\n * GOOGLE_MCP_ACCOUNT which account this instance is bound to\n */\n\n// Account names become path segments (`tokens/<account>.json`), so they must not\n// contain separators or traversal. Allow letters, digits, and the punctuation\n// that appears in email addresses and simple slugs.\nconst accountSchema = z\n .string()\n .regex(/^[A-Za-z0-9._%+@-]+$/)\n .refine((v) => !v.includes('..'));\n\nconst EnvSchema = z.object({\n GOOGLE_MCP_DIR: z.string().optional(),\n GOOGLE_MCP_CLIENT_SECRET: z.string().optional(),\n GOOGLE_MCP_TOKEN: z.string().optional(),\n GOOGLE_MCP_ACCOUNT: z.string().optional(),\n});\n\nexport type Config = {\n dir: string;\n tokensDir: string;\n clientSecretPath: string;\n tokenOverride?: string;\n account?: string;\n};\n\nfunction clean(value: string | undefined): string | undefined {\n const trimmed = value?.trim();\n return trimmed ? trimmed : undefined;\n}\n\n/**\n * Parse and validate the environment into one typed `Config`; consumers read\n * the returned object, not `process.env` (see the module note for the two\n * sanctioned exceptions).\n */\nexport function loadConfig(env: NodeJS.ProcessEnv = process.env): Config {\n const e = EnvSchema.parse(env);\n const dir = clean(e.GOOGLE_MCP_DIR) ?? path.join(os.homedir(), '.google-mcp');\n const tokenOverride = clean(e.GOOGLE_MCP_TOKEN);\n const account = clean(e.GOOGLE_MCP_ACCOUNT);\n return {\n dir,\n tokensDir: path.join(dir, 'tokens'),\n clientSecretPath: clean(e.GOOGLE_MCP_CLIENT_SECRET) ?? path.join(dir, 'client_secret.json'),\n ...(tokenOverride ? { tokenOverride } : {}),\n ...(account ? { account } : {}),\n };\n}\n\n/** The token file for `account`: the single-account override, or the per-account default. */\nexport function tokenPath(account: string, config: Config = loadConfig()): string {\n return config.tokenOverride ?? path.join(config.tokensDir, `${account}.json`);\n}\n\n/** The account to act as (explicit arg wins over env), validated as a safe path segment. */\nexport function resolveAccount(account?: string, config: Config = loadConfig()): string {\n const resolved = account ?? config.account;\n if (!resolved) {\n throw new Error('No account selected; set GOOGLE_MCP_ACCOUNT or pass an account.');\n }\n if (!accountSchema.safeParse(resolved).success) {\n throw new Error(\n `Invalid account name \"${resolved}\": only letters, digits, and . _ % + @ - are allowed.`,\n );\n }\n return resolved;\n}\n\n/**\n * Front-loaded union of every planned service's OAuth scopes (the B1 model): each\n * account consents once and is authorized for everything. Google only issues a\n * refresh token on a fresh grant, so adding a scope here later forces re-consent\n * of every account. The OAuth consent screen must list these same scopes.\n */\nexport const SCOPES = [\n // Gmail: mail.google.com is full access incl. permanent delete (gmail.modify\n // cannot delete); settings.basic covers filters, forwarding, vacation, and aliases.\n 'https://mail.google.com/',\n 'https://www.googleapis.com/auth/gmail.settings.basic',\n // Drive\n 'https://www.googleapis.com/auth/drive',\n // Sheets\n 'https://www.googleapis.com/auth/spreadsheets',\n // Docs\n 'https://www.googleapis.com/auth/documents',\n // Calendar\n 'https://www.googleapis.com/auth/calendar',\n // Meet (REST API v2): space.created manages app-created spaces and reads their\n // conference records; space.readonly reads any accessible space plus conference\n // records, recordings, transcripts, and participants; space.settings edits space\n // settings (e.g. moderation).\n 'https://www.googleapis.com/auth/meetings.space.created',\n 'https://www.googleapis.com/auth/meetings.space.readonly',\n 'https://www.googleapis.com/auth/meetings.space.settings',\n];\n"]}
|
package/dist/auth/oauth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/auth/oauth.ts"],"names":[],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AAC;gBACrC,qEAAqE;gBACrE,kEAAkE;gBAClE,uDAAuD;gBACvD,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC9B,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC7D,MAAM,CAAC,GAAG,EAAE,cAAc,IAAI,8BAA8B,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,GAAG,EAAE,wBAAwB,EAAE,KAAK,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,SAAS,wBAAwB,CAAC,CAAC,CAAC;QACxF,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACzB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QACH,uEAAuE;QACvE,2DAA2D;QAC3D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,+BAA+B,IAAI,MAAM,OAAO,EAAE,CAAC,CAAC;QAClE,KAAK,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { randomBytes } from 'node:crypto';\nimport { chmodSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';\nimport { createServer } from 'node:http';\nimport { CodeChallengeMethod, OAuth2Client } from 'google-auth-library';\nimport open from 'open';\nimport { z } from 'zod';\nimport { forGoogle } from '../lib/optionality.js';\nimport { readJsonFile } from '../lib/utils/json.js';\nimport { loadConfig, resolveAccount, SCOPES, tokenPath } from './config.js';\n\n// The loopback IP literal, not `localhost` (RFC 8252 section 8.3, and Google's\n// loopback guidance): name resolution is host-file-manipulable and can point\n// `localhost` at ::1 where nothing listens.\nconst redirectUri = (port: number) => `http://127.0.0.1:${port}/oauth2callback`;\n\nconst ClientKeys = z.object({\n client_id: z.string().optional(),\n client_secret: z.string().optional(),\n});\n\n/** The two shapes Google's console downloads use; everything else is rejected below. */\nconst ClientSecretFile = z.object({\n installed: ClientKeys.optional(),\n web: ClientKeys.optional(),\n});\n\ntype ClientSecret = { client_id: string; client_secret: string };\n\nfunction loadClientSecret(): ClientSecret {\n const secretPath = loadConfig().clientSecretPath;\n let raw: z.infer<typeof ClientSecretFile>;\n try {\n raw = readJsonFile(secretPath, ClientSecretFile);\n } catch (err) {\n if (err instanceof z.ZodError) {\n throw new Error(\n `Invalid OAuth client secret at ${secretPath} (expected \"installed\" or \"web\").`,\n );\n }\n throw err;\n }\n const keys = raw.installed ?? raw.web;\n if (!keys?.client_id || !keys.client_secret) {\n throw new Error(\n `Invalid OAuth client secret at ${secretPath} (expected \"installed\" or \"web\").`,\n );\n }\n return { client_id: keys.client_id, client_secret: keys.client_secret };\n}\n\n/**\n * The token fields the library refreshes from; everything else Google stores\n * in the file rides along untyped (the file is this suite's own write).\n */\nconst StoredToken = z.looseObject({\n access_token: z.string().optional(),\n refresh_token: z.string().optional(),\n});\n\nfunction newClient(port = 3000): OAuth2Client {\n const { client_id, client_secret } = loadClientSecret();\n return new OAuth2Client(client_id, client_secret, redirectUri(port));\n}\n\n/**\n * Build an authenticated client for `account` (default: GOOGLE_MCP_ACCOUNT) from\n * its stored token. The library auto-refreshes the access token from the refresh\n * token as needed.\n */\nexport async function authorizedClient(account?: string): Promise<OAuth2Client> {\n const client = newClient();\n const config = loadConfig();\n const token = readJsonFile(tokenPath(resolveAccount(account, config), config), StoredToken);\n // forGoogle drops undefined-valued keys, reconciling zod's `?: T | undefined`\n // with the library's exactOptionalPropertyTypes-strict Credentials.\n client.setCredentials(forGoogle(token));\n return client;\n}\n\n/**\n * The shape gaxios gives an error when Google's token endpoint rejects a\n * refresh: `response.data.error` carries the OAuth 2.0 error code (RFC 6749\n * section 5.2). Typed on the response body, never on message text, so an\n * operation error that merely mentions \"invalid_grant\" cannot match.\n */\nconst TokenEndpointError = z.object({\n response: z.object({ data: z.object({ error: z.string() }) }),\n});\n\n/**\n * True when an error is Google's token endpoint refusing the stored refresh\n * token (`invalid_grant`: expired or revoked). No retry with the same client\n * can succeed, but a rebuild from disk heals the instance after a re-auth.\n * A false negative degrades to the plain error envelope; the shape check\n * makes a false positive structurally impossible.\n */\nexport function isInvalidGrant(error: unknown): boolean {\n const parsed = TokenEndpointError.safeParse(error);\n return parsed.success && parsed.data.response.data.error === 'invalid_grant';\n}\n\n/**\n * Run the browser consent flow for `account` and persist its token. The token\n * file is written 0600 inside a 0700 tokens dir; the consent requests offline\n * access and forces the screen so a refresh token is always returned. The flow\n * carries a random `state` (verified at the callback: any browser tab can fire\n * requests at the loopback port, since CORS blocks reads, not sends, so only\n * the redirect Google issued for this flow is accepted) and PKCE (RFC 8252\n * section 8.1: a local process that wins a race for the port cannot exchange\n * an intercepted code without the verifier). `port`, `openBrowser`, and\n * `timeoutMs` are injectable for testing; the callback server is closed on\n * every exit path, including an abandoned consent. `loginHint` prefills the\n * Google account chooser when the account label is not itself an email\n * (e.g. a short alias like `personal`).\n */\nexport async function runAuthFlow(\n account?: string,\n options: {\n port?: number;\n openBrowser?: (url: string) => unknown;\n loginHint?: string;\n timeoutMs?: number;\n } = {},\n): Promise<void> {\n const port = options.port ?? 3000;\n const openBrowser = options.openBrowser ?? open;\n const timeoutMs = options.timeoutMs ?? 5 * 60 * 1000;\n const config = loadConfig();\n const acct = resolveAccount(account, config);\n const client = newClient(port);\n const loginHint = options.loginHint ?? (acct.includes('@') ? acct : undefined);\n const { codeVerifier, codeChallenge } = await client.generateCodeVerifierAsync();\n if (!codeChallenge) {\n throw new Error('PKCE challenge generation failed; cannot start the consent flow.');\n }\n const state = randomBytes(16).toString('hex');\n const authUrl = client.generateAuthUrl({\n access_type: 'offline',\n prompt: 'consent',\n scope: SCOPES,\n state,\n code_challenge_method: CodeChallengeMethod.S256,\n code_challenge: codeChallenge,\n ...(loginHint ? { login_hint: loginHint } : {}),\n });\n\n await new Promise<void>((resolve, reject) => {\n const server = createServer(async (req, res) => {\n // Absolute-form request targets reach req.url verbatim, and an\n // unparseable one (proxy-style \"GET http:// HTTP/1.1\") would throw in\n // the URL constructor; answer 400 rather than crash the flow on an\n // unhandled rejection.\n let requested: URL;\n try {\n requested = new URL(req.url ?? '/', redirectUri(port));\n } catch {\n res.writeHead(400);\n res.end();\n return;\n }\n if (requested.pathname !== '/oauth2callback') {\n // Browsers probe for favicons; answer rather than leave sockets hanging.\n res.writeHead(404);\n res.end();\n return;\n }\n const finish = (status: number, body: string, err?: unknown) => {\n res.writeHead(status);\n res.end(body);\n clearTimeout(timer);\n server.close();\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n };\n const params = requested.searchParams;\n if (params.get('state') !== state) {\n finish(403, 'State mismatch.', new Error('OAuth state mismatch; possible CSRF.'));\n return;\n }\n const code = params.get('code');\n if (!code) {\n finish(\n 400,\n 'No authorization code provided.',\n new Error('No authorization code provided.'),\n );\n return;\n }\n try {\n const { tokens } = await client.getToken({ code, codeVerifier });\n mkdirSync(config.tokensDir, { recursive: true, mode: 0o700 });\n // mkdir's mode applies only on create; tighten a pre-existing dir so\n // token filenames (account labels) stay unreadable to other users.\n chmodSync(config.tokensDir, 0o700);\n const file = tokenPath(acct, config);\n // Recreate rather than overwrite: writeFileSync applies mode only on\n // create, and tightening afterwards would leave fresh token bytes\n // briefly readable through a pre-existing looser mode.\n rmSync(file, { force: true });\n writeFileSync(file, JSON.stringify(tokens), { mode: 0o600 });\n finish(200, `Authorized ${acct}. You can close this window.`);\n } catch (error) {\n finish(500, 'Authentication failed.', error);\n }\n });\n const timer = setTimeout(() => {\n server.close();\n reject(new Error(`Authorization timed out after ${timeoutMs}ms; rerun doctor auth.`));\n }, timeoutMs);\n server.on('error', (err) => {\n clearTimeout(timer);\n reject(err);\n });\n // Loopback only (RFC 8252 section 8.3): with no host, Node binds every\n // interface and the consent port is briefly LAN-reachable.\n server.listen(port, '127.0.0.1');\n console.error(`Visit this URL to authorize ${acct}:\\n${authUrl}`);\n void openBrowser(authUrl);\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/auth/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE5E,+EAA+E;AAC/E,6EAA6E;AAC7E,4CAA4C;AAC5C,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAoB,IAAI,iBAAiB,CAAC;AAEhF,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEH,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AAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,+BAA+B,IAAI,MAAM,OAAO,EAAE,CAAC,CAAC;QAClE,KAAK,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { randomBytes } from 'node:crypto';\nimport { chmodSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';\nimport { createServer } from 'node:http';\nimport { CodeChallengeMethod, OAuth2Client } from 'google-auth-library';\nimport open from 'open';\nimport { z } from 'zod';\nimport { forGoogle } from '../lib/optionality.js';\nimport { readJsonFile } from '../lib/utils/json.js';\nimport { loadConfig, resolveAccount, SCOPES, tokenPath } from './config.js';\n\n// The loopback IP literal, not `localhost` (RFC 8252 section 8.3, and Google's\n// loopback guidance): name resolution is host-file-manipulable and can point\n// `localhost` at ::1 where nothing listens.\nconst redirectUri = (port: number) => `http://127.0.0.1:${port}/oauth2callback`;\n\nconst ClientKeys = z.object({\n client_id: z.string().optional(),\n client_secret: z.string().optional(),\n});\n\n/** The two shapes Google's console downloads use; everything else is rejected below. */\nconst ClientSecretFile = z.object({\n installed: ClientKeys.optional(),\n web: ClientKeys.optional(),\n});\n\ntype ClientSecret = { client_id: string; client_secret: string };\n\nfunction loadClientSecret(): ClientSecret {\n const secretPath = loadConfig().clientSecretPath;\n let raw: z.infer<typeof ClientSecretFile>;\n try {\n raw = readJsonFile(secretPath, ClientSecretFile);\n } catch (err) {\n if (err instanceof z.ZodError) {\n throw new Error(\n `Invalid OAuth client secret at ${secretPath} (expected \"installed\" or \"web\").`,\n );\n }\n throw err;\n }\n const keys = raw.installed ?? raw.web;\n if (!keys?.client_id || !keys.client_secret) {\n throw new Error(\n `Invalid OAuth client secret at ${secretPath} (expected \"installed\" or \"web\").`,\n );\n }\n return { client_id: keys.client_id, client_secret: keys.client_secret };\n}\n\n/**\n * The token fields the library refreshes from; everything else Google stores\n * in the file rides along untyped (the file is this suite's own write).\n */\nconst StoredToken = z.looseObject({\n access_token: z.string().optional(),\n refresh_token: z.string().optional(),\n});\n\nfunction newClient(port = 3000): OAuth2Client {\n const { client_id, client_secret } = loadClientSecret();\n return new OAuth2Client(client_id, client_secret, redirectUri(port));\n}\n\n/**\n * Build an authenticated client for `account` (default: GOOGLE_MCP_ACCOUNT) from\n * its stored token. The library auto-refreshes the access token from the refresh\n * token as needed.\n */\nexport async function authorizedClient(account?: string): Promise<OAuth2Client> {\n const client = newClient();\n const config = loadConfig();\n const token = readJsonFile(tokenPath(resolveAccount(account, config), config), StoredToken);\n // forGoogle drops undefined-valued keys, reconciling zod's `?: T | undefined`\n // with the library's exactOptionalPropertyTypes-strict Credentials.\n client.setCredentials(forGoogle(token));\n return client;\n}\n\n/**\n * The shape gaxios gives an error when Google's token endpoint rejects a\n * refresh: `response.data.error` carries the OAuth 2.0 error code (RFC 6749\n * section 5.2). Typed on the response body, never on message text, so an\n * operation error that merely mentions \"invalid_grant\" cannot match.\n */\nconst TokenEndpointError = z.object({\n response: z.object({ data: z.object({ error: z.string() }) }),\n});\n\n/**\n * True when an error is Google's token endpoint refusing the stored refresh\n * token (`invalid_grant`: expired or revoked). No retry with the same client\n * can succeed, but a rebuild from disk heals the instance after a re-auth.\n * A false negative degrades to the plain error envelope; the shape check\n * makes a false positive structurally impossible.\n */\nexport function isInvalidGrant(error: unknown): boolean {\n const parsed = TokenEndpointError.safeParse(error);\n return parsed.success && parsed.data.response.data.error === 'invalid_grant';\n}\n\n/**\n * Run the browser consent flow for `account` and persist its token. The token\n * file is written 0600 inside a 0700 tokens dir; the consent requests offline\n * access and forces the screen so a refresh token is always returned. The flow\n * carries a random `state` (verified at the callback: any browser tab can fire\n * requests at the loopback port, since CORS blocks reads, not sends, so only\n * the redirect Google issued for this flow is accepted) and PKCE (RFC 8252\n * section 8.1: a local process that wins a race for the port cannot exchange\n * an intercepted code without the verifier). `port`, `openBrowser`, and\n * `timeoutMs` are injectable for testing; the callback server is closed on\n * every exit path, including an abandoned consent. `loginHint` prefills the\n * Google account chooser when the account label is not itself an email\n * (e.g. a short alias like `personal`).\n */\nexport async function runAuthFlow(\n account?: string,\n options: {\n port?: number;\n openBrowser?: (url: string) => unknown;\n loginHint?: string;\n timeoutMs?: number;\n } = {},\n): Promise<void> {\n const port = options.port ?? 3000;\n const openBrowser = options.openBrowser ?? open;\n const timeoutMs = options.timeoutMs ?? 5 * 60 * 1000;\n const config = loadConfig();\n const acct = resolveAccount(account, config);\n const client = newClient(port);\n const loginHint = options.loginHint ?? (acct.includes('@') ? acct : undefined);\n const { codeVerifier, codeChallenge } = await client.generateCodeVerifierAsync();\n if (!codeChallenge) {\n throw new Error('PKCE challenge generation failed; cannot start the consent flow.');\n }\n const state = randomBytes(16).toString('hex');\n const authUrl = client.generateAuthUrl({\n access_type: 'offline',\n prompt: 'consent',\n scope: SCOPES,\n state,\n code_challenge_method: CodeChallengeMethod.S256,\n code_challenge: codeChallenge,\n ...(loginHint ? { login_hint: loginHint } : {}),\n });\n\n await new Promise<void>((resolve, reject) => {\n const server = createServer(async (req, res) => {\n // Absolute-form request targets reach req.url verbatim, and an\n // unparseable one (proxy-style \"GET http:// HTTP/1.1\") would throw in\n // the URL constructor; answer 400 rather than crash the flow on an\n // unhandled rejection.\n let requested: URL;\n try {\n requested = new URL(req.url ?? '/', redirectUri(port));\n } catch {\n res.writeHead(400);\n res.end();\n return;\n }\n if (requested.pathname !== '/oauth2callback') {\n // Browsers probe for favicons; answer rather than leave sockets hanging.\n res.writeHead(404);\n res.end();\n return;\n }\n const finish = (status: number, body: string, err?: unknown) => {\n res.writeHead(status);\n res.end(body);\n clearTimeout(timer);\n server.close();\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n };\n const params = requested.searchParams;\n if (params.get('state') !== state) {\n finish(403, 'State mismatch.', new Error('OAuth state mismatch; possible CSRF.'));\n return;\n }\n const code = params.get('code');\n if (!code) {\n finish(\n 400,\n 'No authorization code provided.',\n new Error('No authorization code provided.'),\n );\n return;\n }\n try {\n const { tokens } = await client.getToken({ code, codeVerifier });\n mkdirSync(config.tokensDir, { recursive: true, mode: 0o700 });\n // mkdir's mode applies only on create; tighten a pre-existing dir so\n // token filenames (account labels) stay unreadable to other users.\n chmodSync(config.tokensDir, 0o700);\n const file = tokenPath(acct, config);\n // Recreate rather than overwrite: writeFileSync applies mode only on\n // create, and tightening afterwards would leave fresh token bytes\n // briefly readable through a pre-existing looser mode.\n rmSync(file, { force: true });\n writeFileSync(file, JSON.stringify(tokens), { mode: 0o600 });\n finish(200, `Authorized ${acct}. You can close this window.`);\n } catch (error) {\n finish(500, 'Authentication failed.', error);\n }\n });\n const timer = setTimeout(() => {\n server.close();\n reject(new Error(`Authorization timed out after ${timeoutMs}ms; rerun doctor auth.`));\n }, timeoutMs);\n server.on('error', (err) => {\n clearTimeout(timer);\n reject(err);\n });\n // Loopback only (RFC 8252 section 8.3): with no host, Node binds every\n // interface and the consent port is briefly LAN-reachable.\n server.listen(port, '127.0.0.1');\n console.error(`Visit this URL to authorize ${acct}:\\n${authUrl}`);\n void openBrowser(authUrl);\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/calendar/capabilities.ts"],"names":[],"mappings":";AACA,4EAA4E;AAC5E,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,IAAI,
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/calendar/capabilities.ts"],"names":[],"mappings":";AACA,4EAA4E;AAC5E,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;IACrB,iBAAiB,CAAC,OAAO,IAAI,CAAC,GAAG,EAAE,uBAAuB,EAAE;QAC1D,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE;QACvC,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE;KAC7C,CAAC,CAAC;AACL,CAAC","sourcesContent":["#!/usr/bin/env node\n// Regenerate CAPABILITIES.md from the live tool/method registries: `bun run\n// capabilities`. The doc is derived from the same registries the server lists\n// and dispatches, so it cannot drift from the code. Agents that speak MCP should\n// discover the live, fully-schema'd surface via the server's `tools/list`.\nimport { writeCapabilities } from '../lib/capabilities.js';\nimport { methods } from './methods/registry.js';\nimport { tools } from './tools/registry.js';\n\nif (import.meta.main) {\n writeCapabilities(import.meta.url, 'Calendar capabilities', [\n { kind: 'MCP Tool', operations: tools },\n { kind: 'REST Method', operations: methods },\n ]);\n}\n"]}
|
|
@@ -11,9 +11,9 @@ import { z } from 'zod';
|
|
|
11
11
|
* @see https://developers.google.com/workspace/calendar/api/v3/reference/mcp/tools_list/create_event
|
|
12
12
|
*/
|
|
13
13
|
export declare const NotificationLevel: z.ZodEnum<{
|
|
14
|
-
NONE: "NONE";
|
|
15
|
-
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
16
14
|
ALL: "ALL";
|
|
15
|
+
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
16
|
+
NONE: "NONE";
|
|
17
17
|
}>;
|
|
18
18
|
export type NotificationLevel = z.infer<typeof NotificationLevel>;
|
|
19
19
|
//# sourceMappingURL=NotificationLevel.d.ts.map
|
|
@@ -2,9 +2,9 @@ import type { Optional } from '../../lib/optionality.js';
|
|
|
2
2
|
import type { NotificationLevel } from '../entities/NotificationLevel.js';
|
|
3
3
|
/** The REST `sendUpdates` value for each notification level. */
|
|
4
4
|
declare const sendUpdates: {
|
|
5
|
-
readonly NONE:
|
|
6
|
-
readonly EXTERNAL_ONLY:
|
|
7
|
-
readonly ALL:
|
|
5
|
+
readonly NONE: 'none';
|
|
6
|
+
readonly EXTERNAL_ONLY: 'externalOnly';
|
|
7
|
+
readonly ALL: 'all';
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Map a write tool's `notificationLevel` input onto the REST `sendUpdates`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../src/calendar/lib/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,gEAAgE;AAChE,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../src/calendar/lib/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,gEAAgE;AAChE,QAAA,MAAM,WAAW;aACf,IAAI,EAAE,MAAM;aACZ,aAAa,EAAE,cAAc;aAC7B,GAAG,EAAE,KAAK;CACF,CAAC;AAEX;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GACjC,CAAC,OAAO,WAAW,CAAC,CAAC,iBAAiB,CAAC,CAEzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/add_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/add_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;IAKL,MAAM;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/clear_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/clear_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM;IACjB,KAAK;;;IAQL,gDAAgD;IAChD,MAAM;;;CAGP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/create_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/create_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;IAYL,MAAM;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/delete_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/delete_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM;IACjB,KAAK;;;IAKL,iDAAiD;IACjD,MAAM;;;CAGP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;IAML,MAAM;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;IAML,MAAM;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_colors/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_colors/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;IACL,MAAM;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_setting/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/get_setting/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;IAKL,MAAM;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/list_event_instances/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/list_event_instances/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;;;;IA4CL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/list_settings/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/list_settings/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,MAAM;IACjB,KAAK;;;;IASL,MAAM;;;;;;;CAOP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/move_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/move_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;;;IAgBL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -23,19 +23,19 @@ export declare const patch_event: import("../../../lib/operation.js").Operation<
|
|
|
23
23
|
}, import("zod/v4/core").$strict>>;
|
|
24
24
|
recurrence: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
25
25
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
26
|
-
tentative: "tentative";
|
|
27
|
-
confirmed: "confirmed";
|
|
28
26
|
cancelled: "cancelled";
|
|
27
|
+
confirmed: "confirmed";
|
|
28
|
+
tentative: "tentative";
|
|
29
29
|
}>>;
|
|
30
30
|
transparency: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
31
31
|
opaque: "opaque";
|
|
32
32
|
transparent: "transparent";
|
|
33
33
|
}>>;
|
|
34
34
|
visibility: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
35
|
+
confidential: "confidential";
|
|
35
36
|
default: "default";
|
|
36
|
-
public: "public";
|
|
37
37
|
private: "private";
|
|
38
|
-
|
|
38
|
+
public: "public";
|
|
39
39
|
}>>;
|
|
40
40
|
attendees: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
41
41
|
email: import("zod").ZodString;
|
|
@@ -43,10 +43,10 @@ export declare const patch_event: import("../../../lib/operation.js").Operation<
|
|
|
43
43
|
optional: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
44
44
|
resource: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
45
45
|
responseStatus: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
46
|
-
|
|
46
|
+
accepted: "accepted";
|
|
47
47
|
declined: "declined";
|
|
48
|
+
needsAction: "needsAction";
|
|
48
49
|
tentative: "tentative";
|
|
49
|
-
accepted: "accepted";
|
|
50
50
|
}>>;
|
|
51
51
|
comment: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
52
|
additionalGuests: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -18,19 +18,19 @@ export declare const schema: {
|
|
|
18
18
|
}, z.core.$strict>>;
|
|
19
19
|
recurrence: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
20
|
status: z.ZodOptional<z.ZodEnum<{
|
|
21
|
-
tentative: "tentative";
|
|
22
|
-
confirmed: "confirmed";
|
|
23
21
|
cancelled: "cancelled";
|
|
22
|
+
confirmed: "confirmed";
|
|
23
|
+
tentative: "tentative";
|
|
24
24
|
}>>;
|
|
25
25
|
transparency: z.ZodOptional<z.ZodEnum<{
|
|
26
26
|
opaque: "opaque";
|
|
27
27
|
transparent: "transparent";
|
|
28
28
|
}>>;
|
|
29
29
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
confidential: "confidential";
|
|
30
31
|
default: "default";
|
|
31
|
-
public: "public";
|
|
32
32
|
private: "private";
|
|
33
|
-
|
|
33
|
+
public: "public";
|
|
34
34
|
}>>;
|
|
35
35
|
attendees: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
36
|
email: z.ZodString;
|
|
@@ -38,10 +38,10 @@ export declare const schema: {
|
|
|
38
38
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
39
39
|
resource: z.ZodOptional<z.ZodBoolean>;
|
|
40
40
|
responseStatus: z.ZodOptional<z.ZodEnum<{
|
|
41
|
-
|
|
41
|
+
accepted: "accepted";
|
|
42
42
|
declined: "declined";
|
|
43
|
+
needsAction: "needsAction";
|
|
43
44
|
tentative: "tentative";
|
|
44
|
-
accepted: "accepted";
|
|
45
45
|
}>>;
|
|
46
46
|
comment: z.ZodOptional<z.ZodString>;
|
|
47
47
|
additionalGuests: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/patch_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkCxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/patch_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkCxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiGL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/query_free_busy/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/query_free_busy/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;IAqBL,MAAM;;;;;;;;;;;;;;CAaP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/quick_add_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/quick_add_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;;IAmBL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -250,19 +250,19 @@ export declare const methods: {
|
|
|
250
250
|
}, import("zod/v4/core").$strict>>;
|
|
251
251
|
recurrence: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
252
252
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
253
|
-
tentative: "tentative";
|
|
254
|
-
confirmed: "confirmed";
|
|
255
253
|
cancelled: "cancelled";
|
|
254
|
+
confirmed: "confirmed";
|
|
255
|
+
tentative: "tentative";
|
|
256
256
|
}>>;
|
|
257
257
|
transparency: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
258
258
|
opaque: "opaque";
|
|
259
259
|
transparent: "transparent";
|
|
260
260
|
}>>;
|
|
261
261
|
visibility: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
262
|
+
confidential: "confidential";
|
|
262
263
|
default: "default";
|
|
263
|
-
public: "public";
|
|
264
264
|
private: "private";
|
|
265
|
-
|
|
265
|
+
public: "public";
|
|
266
266
|
}>>;
|
|
267
267
|
attendees: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
268
268
|
email: import("zod").ZodString;
|
|
@@ -270,10 +270,10 @@ export declare const methods: {
|
|
|
270
270
|
optional: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
271
271
|
resource: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
272
272
|
responseStatus: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
273
|
-
|
|
273
|
+
accepted: "accepted";
|
|
274
274
|
declined: "declined";
|
|
275
|
+
needsAction: "needsAction";
|
|
275
276
|
tentative: "tentative";
|
|
276
|
-
accepted: "accepted";
|
|
277
277
|
}>>;
|
|
278
278
|
comment: import("zod").ZodOptional<import("zod").ZodString>;
|
|
279
279
|
additionalGuests: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/remove_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/remove_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM;IACjB,KAAK;;;IAKL,iDAAiD;IACjD,MAAM;;;CAGP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/update_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/update_calendar/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;IAgBL,MAAM;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/update_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/methods/update_calendar_entry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;;;;;;;;;IAqCL,MAAM;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/calendar/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,qBAAqB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,EAAE,SAAS,CAAC,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/calendar/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,qBAAqB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,EAAE,SAAS,CAAC,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC,CAAC,SAAS,OAC1E,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,CAAC,KAC5C,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,CAAmB,CAAC"}
|
|
@@ -23,15 +23,15 @@ export declare const create_event: import("../../../lib/operation.js").Operation
|
|
|
23
23
|
allDay: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
24
24
|
timeZone: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
25
|
notificationLevel: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
26
|
-
NONE: "NONE";
|
|
27
|
-
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
28
26
|
ALL: "ALL";
|
|
27
|
+
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
28
|
+
NONE: "NONE";
|
|
29
29
|
}>>;
|
|
30
30
|
addGoogleMeetUrl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
31
31
|
visibility: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
32
32
|
default: "default";
|
|
33
|
-
public: "public";
|
|
34
33
|
private: "private";
|
|
34
|
+
public: "public";
|
|
35
35
|
}>>;
|
|
36
36
|
colorId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
37
37
|
googleMeetUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -19,15 +19,15 @@ export declare const schema: {
|
|
|
19
19
|
allDay: z.ZodOptional<z.ZodBoolean>;
|
|
20
20
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
21
21
|
notificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
22
|
-
NONE: "NONE";
|
|
23
|
-
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
24
22
|
ALL: "ALL";
|
|
23
|
+
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
24
|
+
NONE: "NONE";
|
|
25
25
|
}>>;
|
|
26
26
|
addGoogleMeetUrl: z.ZodOptional<z.ZodBoolean>;
|
|
27
27
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
28
28
|
default: "default";
|
|
29
|
-
public: "public";
|
|
30
29
|
private: "private";
|
|
30
|
+
public: "public";
|
|
31
31
|
}>>;
|
|
32
32
|
colorId: z.ZodOptional<z.ZodString>;
|
|
33
33
|
googleMeetUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/create_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/create_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuDL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -6,9 +6,9 @@ export declare const delete_event: import("../../../lib/operation.js").Operation
|
|
|
6
6
|
eventId: import("zod").ZodString;
|
|
7
7
|
calendarId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
8
|
notificationLevel: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
9
|
-
NONE: "NONE";
|
|
10
|
-
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
11
9
|
ALL: "ALL";
|
|
10
|
+
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
11
|
+
NONE: "NONE";
|
|
12
12
|
}>>;
|
|
13
13
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
14
14
|
id: import("zod").ZodString;
|
|
@@ -4,9 +4,9 @@ export declare const schema: {
|
|
|
4
4
|
eventId: z.ZodString;
|
|
5
5
|
calendarId: z.ZodOptional<z.ZodString>;
|
|
6
6
|
notificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
7
|
-
NONE: "NONE";
|
|
8
|
-
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
9
7
|
ALL: "ALL";
|
|
8
|
+
EXTERNAL_ONLY: "EXTERNAL_ONLY";
|
|
9
|
+
NONE: "NONE";
|
|
10
10
|
}>>;
|
|
11
11
|
}, z.core.$strict>;
|
|
12
12
|
output: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/delete_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/delete_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;;;;;;IAYL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/get_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/get_event/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;IASL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/list_calendars/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/calendar/tools/list_calendars/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,MAAM;IACjB,KAAK;;;;IASL,MAAM;;;;;;;;;CAWP,CAAC"}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const list_events: import("../../../lib/operation.js").Operation<import("@googleapis/calendar").calendar_v3.Calendar, import("zod").ZodObject<{
|
|
8
8
|
eventTypeFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
9
|
+
birthday: "birthday";
|
|
9
10
|
default: "default";
|
|
10
|
-
outOfOffice: "outOfOffice";
|
|
11
11
|
focusTime: "focusTime";
|
|
12
|
-
workingLocation: "workingLocation";
|
|
13
|
-
birthday: "birthday";
|
|
14
12
|
fromGmail: "fromGmail";
|
|
13
|
+
outOfOffice: "outOfOffice";
|
|
14
|
+
workingLocation: "workingLocation";
|
|
15
15
|
}>>>;
|
|
16
16
|
calendarId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
17
|
pageSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -21,9 +21,9 @@ export declare const list_events: import("../../../lib/operation.js").Operation<
|
|
|
21
21
|
timeZone: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
22
|
orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
23
23
|
default: "default";
|
|
24
|
+
lastModified: "lastModified";
|
|
24
25
|
startTime: "startTime";
|
|
25
26
|
startTimeDesc: "startTimeDesc";
|
|
26
|
-
lastModified: "lastModified";
|
|
27
27
|
}>>;
|
|
28
28
|
fullText: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
29
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|