@commandable/integration-data 0.0.5 → 0.0.7
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/dist/credentials-index.d.ts.map +1 -1
- package/dist/credentials-index.js +183 -0
- package/dist/credentials-index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +33 -0
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +36 -4
- package/dist/loader.js.map +1 -1
- package/integrations/__tests__/liveHarness.ts +16 -3
- package/integrations/airtable/.env.test +9 -0
- package/integrations/airtable/.env.test.example +11 -0
- package/integrations/airtable/README.md +27 -0
- package/integrations/airtable/__tests__/get_handlers.test.ts +43 -5
- package/integrations/confluence/.env.test +25 -0
- package/integrations/confluence/.env.test.example +36 -0
- package/integrations/confluence/README.md +28 -0
- package/integrations/confluence/__tests__/get_handlers.test.ts +121 -0
- package/integrations/confluence/__tests__/usage_parity.test.ts +14 -0
- package/integrations/confluence/__tests__/write_handlers.test.ts +131 -0
- package/integrations/confluence/credentials.json +39 -0
- package/integrations/confluence/credentials_hint.md +4 -0
- package/integrations/confluence/credentials_hint_api_token.md +9 -0
- package/integrations/confluence/credentials_hint_oauth_token.md +8 -0
- package/integrations/confluence/handlers/add_comment.js +19 -0
- package/integrations/confluence/handlers/add_label.js +16 -0
- package/integrations/confluence/handlers/create_page.js +22 -0
- package/integrations/confluence/handlers/delete_page.js +17 -0
- package/integrations/confluence/handlers/get_comments.js +33 -0
- package/integrations/confluence/handlers/get_page_children.js +30 -0
- package/integrations/confluence/handlers/get_space.js +22 -0
- package/integrations/confluence/handlers/list_spaces.js +39 -0
- package/integrations/confluence/handlers/read_page.js +49 -0
- package/integrations/confluence/handlers/search_pages.js +42 -0
- package/integrations/confluence/handlers/update_page.js +42 -0
- package/integrations/confluence/manifest.json +85 -0
- package/integrations/confluence/prompt.md +55 -0
- package/integrations/confluence/schemas/add_comment.json +22 -0
- package/integrations/confluence/schemas/add_label.json +19 -0
- package/integrations/confluence/schemas/create_page.json +33 -0
- package/integrations/confluence/schemas/delete_page.json +23 -0
- package/integrations/confluence/schemas/empty.json +6 -0
- package/integrations/confluence/schemas/get_comments.json +24 -0
- package/integrations/confluence/schemas/get_page_children.json +28 -0
- package/integrations/confluence/schemas/get_space.json +18 -0
- package/integrations/confluence/schemas/list_spaces.json +36 -0
- package/integrations/confluence/schemas/read_page.json +28 -0
- package/integrations/confluence/schemas/search_pages.json +26 -0
- package/integrations/confluence/schemas/update_page.json +31 -0
- package/integrations/github/.env.test +16 -0
- package/integrations/github/.env.test.example +17 -0
- package/integrations/github/README.md +75 -0
- package/integrations/github/__tests__/get_handlers.test.ts +207 -12
- package/integrations/github/__tests__/write_handlers.test.ts +323 -55
- package/integrations/github/handlers/create_commit.js +10 -2
- package/integrations/github/handlers/create_file.js +46 -0
- package/integrations/github/handlers/create_pull_request_review.js +10 -0
- package/integrations/github/handlers/create_release.js +14 -0
- package/integrations/github/handlers/delete_branch.js +8 -0
- package/integrations/github/handlers/delete_file.js +22 -0
- package/integrations/github/handlers/edit_file.js +52 -0
- package/integrations/github/handlers/edit_files.js +107 -0
- package/integrations/github/handlers/fork_repo.js +10 -0
- package/integrations/github/handlers/get_commit.js +8 -0
- package/integrations/github/handlers/get_file_contents.js +21 -0
- package/integrations/github/handlers/get_job_logs.js +6 -0
- package/integrations/github/handlers/get_latest_release.js +4 -0
- package/integrations/github/handlers/get_me.js +4 -0
- package/integrations/github/handlers/get_pull_request.js +4 -0
- package/integrations/github/handlers/get_pull_request_diff.js +8 -0
- package/integrations/github/handlers/get_repo_tree.js +12 -0
- package/integrations/github/handlers/get_workflow_run.js +4 -0
- package/integrations/github/handlers/list_branches.js +6 -1
- package/integrations/github/handlers/list_commits.js +5 -6
- package/integrations/github/handlers/list_issue_comments.js +8 -0
- package/integrations/github/handlers/list_issues.js +5 -6
- package/integrations/github/handlers/list_labels.js +8 -0
- package/integrations/github/handlers/list_pull_request_comments.js +8 -0
- package/integrations/github/handlers/list_pull_request_files.js +8 -0
- package/integrations/github/handlers/list_pull_requests.js +7 -2
- package/integrations/github/handlers/list_releases.js +8 -0
- package/integrations/github/handlers/list_tags.js +8 -0
- package/integrations/github/handlers/list_workflow_runs.js +11 -0
- package/integrations/github/handlers/request_pull_request_reviewers.js +10 -0
- package/integrations/github/handlers/search_code.js +8 -0
- package/integrations/github/handlers/search_issues.js +8 -0
- package/integrations/github/handlers/search_pull_requests.js +8 -0
- package/integrations/github/handlers/search_repos.js +10 -0
- package/integrations/github/handlers/update_pull_request.js +13 -0
- package/integrations/github/manifest.json +86 -21
- package/integrations/github/prompt.md +36 -0
- package/integrations/github/schemas/create_file.json +13 -0
- package/integrations/github/schemas/create_pull_request_review.json +17 -0
- package/integrations/github/schemas/create_release.json +16 -0
- package/integrations/github/schemas/delete_branch.json +10 -0
- package/integrations/github/schemas/delete_file.json +13 -0
- package/integrations/github/schemas/edit_file.json +26 -0
- package/integrations/github/schemas/edit_files.json +39 -0
- package/integrations/github/schemas/fork_repo.json +11 -0
- package/integrations/github/schemas/get_commit.json +12 -0
- package/integrations/github/schemas/get_file_contents.json +11 -0
- package/integrations/github/schemas/get_job_logs.json +10 -0
- package/integrations/github/schemas/get_pull_request.json +10 -0
- package/integrations/github/schemas/get_pull_request_diff.json +10 -0
- package/integrations/github/schemas/get_repo_tree.json +12 -0
- package/integrations/github/schemas/get_workflow_run.json +10 -0
- package/integrations/github/schemas/list_branches.json +12 -0
- package/integrations/github/schemas/list_commits.json +5 -3
- package/integrations/github/schemas/list_issue_comments.json +12 -0
- package/integrations/github/schemas/list_issues.json +4 -2
- package/integrations/github/schemas/list_labels.json +11 -0
- package/integrations/github/schemas/list_pull_request_comments.json +12 -0
- package/integrations/github/schemas/list_pull_request_files.json +12 -0
- package/integrations/github/schemas/list_pull_requests.json +7 -1
- package/integrations/github/schemas/list_releases.json +11 -0
- package/integrations/github/schemas/list_tags.json +11 -0
- package/integrations/github/schemas/list_workflow_runs.json +18 -0
- package/integrations/github/schemas/request_pull_request_reviewers.json +20 -0
- package/integrations/github/schemas/search_code.json +10 -0
- package/integrations/github/schemas/search_issues.json +10 -0
- package/integrations/github/schemas/search_pull_requests.json +10 -0
- package/integrations/github/schemas/search_repos.json +12 -0
- package/integrations/github/schemas/update_pull_request.json +15 -0
- package/integrations/google-calendar/.env.test.example +11 -0
- package/integrations/google-calendar/README.md +41 -0
- package/integrations/google-calendar/__tests__/write_and_admin_handlers.test.ts +7 -20
- package/integrations/google-calendar/handlers/get_event.js +5 -1
- package/integrations/google-calendar/handlers/list_events.js +2 -0
- package/integrations/google-calendar/manifest.json +27 -18
- package/integrations/google-calendar/prompt.md +68 -0
- package/integrations/google-calendar/schemas/id_calendar_event.json +4 -2
- package/integrations/google-calendar/schemas/list_events.json +10 -8
- package/integrations/google-docs/README.md +30 -0
- package/integrations/google-docs/__tests__/get_handlers.test.ts +4 -19
- package/integrations/google-docs/__tests__/write_handlers.test.ts +31 -48
- package/integrations/google-docs/handlers/read_document.js +189 -0
- package/integrations/google-docs/manifest.json +16 -31
- package/integrations/google-docs/prompt.md +49 -0
- package/integrations/google-docs/schemas/{get_document_text.json → read_document.json} +5 -2
- package/integrations/google-docs/todo.md +18 -0
- package/integrations/google-drive/README.md +26 -0
- package/integrations/google-drive/__tests__/handlers.test.ts +43 -0
- package/integrations/google-drive/__tests__/usage_parity.test.ts +9 -0
- package/integrations/google-drive/handlers/get_file.js +2 -4
- package/integrations/google-drive/handlers/get_file_content.js +41 -0
- package/integrations/google-drive/handlers/list_files.js +15 -0
- package/integrations/google-drive/handlers/search_files.js +20 -0
- package/integrations/google-drive/handlers/share_file.js +20 -0
- package/integrations/google-drive/manifest.json +37 -10
- package/integrations/google-drive/prompt.md +59 -0
- package/integrations/google-drive/schemas/get_file.json +2 -2
- package/integrations/google-drive/schemas/get_file_content.json +11 -0
- package/integrations/google-drive/schemas/list_files.json +12 -0
- package/integrations/google-drive/schemas/search_files.json +14 -0
- package/integrations/google-drive/schemas/share_file.json +23 -0
- package/integrations/google-gmail/.env.test.example +11 -0
- package/integrations/google-gmail/README.md +49 -0
- package/integrations/google-gmail/__tests__/get_handlers.test.ts +134 -0
- package/integrations/google-gmail/__tests__/usage_parity.test.ts +9 -0
- package/integrations/google-gmail/__tests__/write_and_admin_handlers.test.ts +211 -0
- package/integrations/google-gmail/credentials.json +57 -0
- package/integrations/google-gmail/credentials_hint_oauth_token.md +8 -0
- package/integrations/google-gmail/credentials_hint_service_account.md +10 -0
- package/integrations/google-gmail/handlers/create_draft_email.js +27 -0
- package/integrations/google-gmail/handlers/create_label.js +12 -0
- package/integrations/google-gmail/handlers/delete_draft.js +13 -0
- package/integrations/google-gmail/handlers/delete_label.js +13 -0
- package/integrations/google-gmail/handlers/delete_message.js +13 -0
- package/integrations/google-gmail/handlers/delete_thread.js +13 -0
- package/integrations/google-gmail/handlers/get_draft.js +6 -0
- package/integrations/google-gmail/handlers/get_label.js +6 -0
- package/integrations/google-gmail/handlers/get_message.js +14 -0
- package/integrations/google-gmail/handlers/get_profile.js +5 -0
- package/integrations/google-gmail/handlers/get_thread.js +14 -0
- package/integrations/google-gmail/handlers/list_drafts.js +15 -0
- package/integrations/google-gmail/handlers/list_labels.js +5 -0
- package/integrations/google-gmail/handlers/list_messages.js +19 -0
- package/integrations/google-gmail/handlers/list_threads.js +19 -0
- package/integrations/google-gmail/handlers/modify_message.js +11 -0
- package/integrations/google-gmail/handlers/modify_thread.js +11 -0
- package/integrations/google-gmail/handlers/read_email.js +56 -0
- package/integrations/google-gmail/handlers/send_draft.js +15 -0
- package/integrations/google-gmail/handlers/send_email.js +22 -0
- package/integrations/google-gmail/handlers/trash_message.js +6 -0
- package/integrations/google-gmail/handlers/trash_thread.js +6 -0
- package/integrations/google-gmail/handlers/untrash_message.js +6 -0
- package/integrations/google-gmail/handlers/untrash_thread.js +6 -0
- package/integrations/google-gmail/handlers/update_label.js +15 -0
- package/integrations/google-gmail/manifest.json +44 -0
- package/integrations/google-gmail/prompt.md +52 -0
- package/integrations/google-gmail/schemas/create_draft_email.json +16 -0
- package/integrations/google-gmail/schemas/create_label.json +26 -0
- package/integrations/google-gmail/schemas/get_message.json +20 -0
- package/integrations/{google-docs/schemas/get_document_structured.json → google-gmail/schemas/get_profile.json} +4 -2
- package/integrations/google-gmail/schemas/get_thread.json +20 -0
- package/integrations/google-gmail/schemas/id_draft.json +16 -0
- package/integrations/google-gmail/schemas/id_label.json +16 -0
- package/integrations/google-gmail/schemas/id_message.json +16 -0
- package/integrations/google-gmail/schemas/id_thread.json +16 -0
- package/integrations/google-gmail/schemas/list_drafts.json +30 -0
- package/integrations/{google-sheet/schemas/get_developer_metadata.json → google-gmail/schemas/list_labels.json} +4 -3
- package/integrations/google-gmail/schemas/list_messages.json +35 -0
- package/integrations/google-gmail/schemas/list_threads.json +35 -0
- package/integrations/google-gmail/schemas/modify_message.json +24 -0
- package/integrations/google-gmail/schemas/modify_thread.json +24 -0
- package/integrations/google-gmail/schemas/read_email.json +10 -0
- package/integrations/google-gmail/schemas/send_draft.json +29 -0
- package/integrations/google-gmail/schemas/send_email.json +17 -0
- package/integrations/google-gmail/schemas/update_label.json +33 -0
- package/integrations/google-sheet/README.md +27 -0
- package/integrations/google-sheet/__tests__/get_handlers.test.ts +6 -52
- package/integrations/google-sheet/__tests__/write_handlers.test.ts +0 -20
- package/integrations/google-sheet/handlers/get_spreadsheet.js +2 -0
- package/integrations/google-sheet/handlers/read_sheet.js +75 -0
- package/integrations/google-sheet/manifest.json +13 -62
- package/integrations/google-sheet/prompt.md +49 -0
- package/integrations/google-sheet/schemas/get_spreadsheet.json +5 -4
- package/integrations/google-sheet/schemas/read_sheet.json +21 -0
- package/integrations/google-slides/README.md +28 -0
- package/integrations/google-slides/__tests__/get_handlers.test.ts +12 -9
- package/integrations/google-slides/handlers/read_presentation.js +51 -0
- package/integrations/google-slides/manifest.json +13 -13
- package/integrations/google-slides/prompt.md +56 -0
- package/integrations/hubspot/.env.test.example +20 -0
- package/integrations/hubspot/README.md +48 -0
- package/integrations/hubspot/__tests__/get_handlers.test.ts +151 -0
- package/integrations/hubspot/__tests__/usage_parity.test.ts +10 -0
- package/integrations/hubspot/__tests__/write_handlers.test.ts +244 -0
- package/integrations/hubspot/credentials.json +48 -0
- package/integrations/hubspot/credentials_hint.md +20 -0
- package/integrations/hubspot/credentials_hint_oauth_token.md +16 -0
- package/integrations/hubspot/handlers/archive_company.js +13 -0
- package/integrations/hubspot/handlers/archive_contact.js +13 -0
- package/integrations/hubspot/handlers/archive_deal.js +13 -0
- package/integrations/hubspot/handlers/archive_ticket.js +13 -0
- package/integrations/hubspot/handlers/create_association.js +18 -0
- package/integrations/hubspot/handlers/create_company.js +13 -0
- package/integrations/hubspot/handlers/create_contact.js +14 -0
- package/integrations/hubspot/handlers/create_deal.js +16 -0
- package/integrations/hubspot/handlers/create_note.js +44 -0
- package/integrations/hubspot/handlers/create_task.js +48 -0
- package/integrations/hubspot/handlers/create_ticket.js +15 -0
- package/integrations/hubspot/handlers/get_associations.js +14 -0
- package/integrations/hubspot/handlers/get_company.js +18 -0
- package/integrations/hubspot/handlers/get_contact.js +18 -0
- package/integrations/hubspot/handlers/get_deal.js +18 -0
- package/integrations/hubspot/handlers/get_ticket.js +20 -0
- package/integrations/hubspot/handlers/list_owners.js +12 -0
- package/integrations/hubspot/handlers/list_pipelines.js +5 -0
- package/integrations/hubspot/handlers/list_properties.js +11 -0
- package/integrations/hubspot/handlers/remove_association.js +22 -0
- package/integrations/hubspot/handlers/search_companies.js +43 -0
- package/integrations/hubspot/handlers/search_contacts.js +43 -0
- package/integrations/hubspot/handlers/search_deals.js +43 -0
- package/integrations/hubspot/handlers/search_notes.js +43 -0
- package/integrations/hubspot/handlers/search_tasks.js +43 -0
- package/integrations/hubspot/handlers/search_tickets.js +43 -0
- package/integrations/hubspot/handlers/update_company.js +13 -0
- package/integrations/hubspot/handlers/update_contact.js +14 -0
- package/integrations/hubspot/handlers/update_deal.js +16 -0
- package/integrations/hubspot/handlers/update_task.js +17 -0
- package/integrations/hubspot/handlers/update_ticket.js +15 -0
- package/integrations/hubspot/manifest.json +230 -0
- package/integrations/hubspot/prompt.md +69 -0
- package/integrations/hubspot/schemas/archive_company.json +13 -0
- package/integrations/hubspot/schemas/archive_contact.json +13 -0
- package/integrations/hubspot/schemas/archive_deal.json +9 -0
- package/integrations/hubspot/schemas/archive_ticket.json +9 -0
- package/integrations/hubspot/schemas/create_association.json +24 -0
- package/integrations/hubspot/schemas/create_company.json +14 -0
- package/integrations/hubspot/schemas/create_contact.json +15 -0
- package/integrations/hubspot/schemas/create_deal.json +20 -0
- package/integrations/hubspot/schemas/create_note.json +37 -0
- package/integrations/hubspot/schemas/create_task.json +51 -0
- package/integrations/hubspot/schemas/create_ticket.json +16 -0
- package/integrations/hubspot/schemas/empty.json +6 -0
- package/integrations/hubspot/schemas/get_associations.json +30 -0
- package/integrations/hubspot/schemas/get_company.json +27 -0
- package/integrations/hubspot/schemas/get_contact.json +27 -0
- package/integrations/hubspot/schemas/get_deal.json +20 -0
- package/integrations/hubspot/schemas/get_ticket.json +20 -0
- package/integrations/hubspot/schemas/list_owners.json +25 -0
- package/integrations/hubspot/schemas/list_pipelines.json +13 -0
- package/integrations/hubspot/schemas/list_properties.json +17 -0
- package/integrations/hubspot/schemas/remove_association.json +24 -0
- package/integrations/hubspot/schemas/search_companies.json +56 -0
- package/integrations/hubspot/schemas/search_contacts.json +56 -0
- package/integrations/hubspot/schemas/search_deals.json +43 -0
- package/integrations/hubspot/schemas/search_notes.json +43 -0
- package/integrations/hubspot/schemas/search_tasks.json +43 -0
- package/integrations/hubspot/schemas/search_tickets.json +43 -0
- package/integrations/hubspot/schemas/update_company.json +20 -0
- package/integrations/hubspot/schemas/update_contact.json +21 -0
- package/integrations/hubspot/schemas/update_deal.json +19 -0
- package/integrations/hubspot/schemas/update_task.json +31 -0
- package/integrations/hubspot/schemas/update_ticket.json +18 -0
- package/integrations/jira/.env.test +46 -0
- package/integrations/jira/.env.test.example +41 -0
- package/integrations/jira/README.md +46 -0
- package/integrations/jira/__tests__/get_handlers.test.ts +193 -0
- package/integrations/jira/__tests__/usage_parity.test.ts +14 -0
- package/integrations/jira/__tests__/write_handlers.test.ts +157 -0
- package/integrations/jira/credentials.json +39 -0
- package/integrations/jira/credentials_hint.md +4 -0
- package/integrations/jira/credentials_hint_api_token.md +6 -0
- package/integrations/jira/credentials_hint_oauth_token.md +6 -0
- package/integrations/jira/handlers/add_comment.js +9 -0
- package/integrations/jira/handlers/assign_issue.js +11 -0
- package/integrations/jira/handlers/create_issue.js +37 -0
- package/integrations/jira/handlers/create_sprint.js +19 -0
- package/integrations/jira/handlers/delete_issue.js +10 -0
- package/integrations/jira/handlers/get_backlog_issues.js +13 -0
- package/integrations/jira/handlers/get_board.js +6 -0
- package/integrations/jira/handlers/get_issue.js +63 -0
- package/integrations/jira/handlers/get_issue_comments.js +31 -0
- package/integrations/jira/handlers/get_myself.js +14 -0
- package/integrations/jira/handlers/get_project.js +28 -0
- package/integrations/jira/handlers/get_sprint.js +5 -0
- package/integrations/jira/handlers/get_sprint_issues.js +13 -0
- package/integrations/jira/handlers/get_transitions.js +23 -0
- package/integrations/jira/handlers/list_boards.js +34 -0
- package/integrations/jira/handlers/list_projects.js +29 -0
- package/integrations/jira/handlers/list_sprints.js +29 -0
- package/integrations/jira/handlers/move_issues_to_sprint.js +11 -0
- package/integrations/jira/handlers/search_issues.js +43 -0
- package/integrations/jira/handlers/search_users.js +21 -0
- package/integrations/jira/handlers/transition_issue.js +44 -0
- package/integrations/jira/handlers/update_issue.js +40 -0
- package/integrations/jira/handlers/update_sprint.js +20 -0
- package/integrations/jira/manifest.json +204 -0
- package/integrations/jira/prompt.md +80 -0
- package/integrations/jira/schemas/add_comment.json +16 -0
- package/integrations/jira/schemas/assign_issue.json +16 -0
- package/integrations/jira/schemas/create_issue.json +49 -0
- package/integrations/jira/schemas/create_sprint.json +29 -0
- package/integrations/jira/schemas/delete_issue.json +12 -0
- package/integrations/jira/schemas/empty.json +6 -0
- package/integrations/jira/schemas/get_backlog_issues.json +33 -0
- package/integrations/jira/schemas/get_board.json +13 -0
- package/integrations/jira/schemas/get_issue.json +23 -0
- package/integrations/jira/schemas/get_issue_comments.json +23 -0
- package/integrations/jira/schemas/get_project.json +17 -0
- package/integrations/jira/schemas/get_sprint.json +13 -0
- package/integrations/jira/schemas/get_sprint_issues.json +33 -0
- package/integrations/jira/schemas/get_transitions.json +12 -0
- package/integrations/jira/schemas/list_boards.json +27 -0
- package/integrations/jira/schemas/list_projects.json +22 -0
- package/integrations/jira/schemas/list_sprints.json +29 -0
- package/integrations/jira/schemas/move_issues_to_sprint.json +19 -0
- package/integrations/jira/schemas/search_issues.json +28 -0
- package/integrations/jira/schemas/search_users.json +18 -0
- package/integrations/jira/schemas/transition_issue.json +38 -0
- package/integrations/jira/schemas/update_issue.json +47 -0
- package/integrations/jira/schemas/update_sprint.json +33 -0
- package/integrations/new_integration_prompt.md +177 -2
- package/integrations/notion/.env.test +10 -0
- package/integrations/notion/.env.test.example +13 -0
- package/integrations/notion/README.md +42 -0
- package/integrations/notion/manifest.json +64 -35
- package/integrations/trello/.env.test +6 -0
- package/integrations/trello/.env.test.example +9 -0
- package/integrations/trello/README.md +50 -0
- package/package.json +7 -3
- package/integrations/google-calendar/handlers/update_event.js +0 -5
- package/integrations/google-calendar/schemas/update_event.json +0 -10
- package/integrations/google-docs/handlers/get_document.js +0 -12
- package/integrations/google-docs/handlers/get_document_structured.js +0 -6
- package/integrations/google-docs/handlers/get_document_text.js +0 -17
- package/integrations/google-docs/schemas/get_document.json +0 -11
- package/integrations/google-sheet/handlers/batch_clear_values_by_data_filter.js +0 -6
- package/integrations/google-sheet/handlers/batch_get_values.js +0 -16
- package/integrations/google-sheet/handlers/batch_update_values_by_data_filter.js +0 -16
- package/integrations/google-sheet/handlers/get_developer_metadata.js +0 -6
- package/integrations/google-sheet/handlers/get_spreadsheet_by_data_filter.js +0 -10
- package/integrations/google-sheet/handlers/get_values.js +0 -14
- package/integrations/google-sheet/handlers/get_values_by_data_filter.js +0 -14
- package/integrations/google-sheet/handlers/search_developer_metadata.js +0 -7
- package/integrations/google-sheet/schemas/batch_clear_values_by_data_filter.json +0 -10
- package/integrations/google-sheet/schemas/batch_get_values.json +0 -13
- package/integrations/google-sheet/schemas/batch_update_values_by_data_filter.json +0 -25
- package/integrations/google-sheet/schemas/get_spreadsheet_by_data_filter.json +0 -11
- package/integrations/google-sheet/schemas/get_values.json +0 -13
- package/integrations/google-sheet/schemas/get_values_by_data_filter.json +0 -17
- package/integrations/google-sheet/schemas/search_developer_metadata.json +0 -14
- package/integrations/google-slides/handlers/get_presentation.js +0 -6
|
@@ -6,7 +6,7 @@ import { loadIntegrationTools } from '../../../../server/src/integrations/dataLo
|
|
|
6
6
|
// Required env vars:
|
|
7
7
|
// - Either GOOGLE_TOKEN, OR (GOOGLE_SERVICE_ACCOUNT_JSON + GOOGLE_IMPERSONATE_SUBJECT)
|
|
8
8
|
// Optional:
|
|
9
|
-
// -
|
|
9
|
+
// - GOOGLE_CALENDAR_TEST_CALENDAR_ID (defaults to 'primary')
|
|
10
10
|
|
|
11
11
|
interface Ctx {
|
|
12
12
|
calendarId: string
|
|
@@ -27,9 +27,9 @@ suite('google-calendar write & admin handlers (live)', () => {
|
|
|
27
27
|
let buildAdmin: (name: string) => ((input: any) => Promise<any>)
|
|
28
28
|
|
|
29
29
|
beforeAll(async () => {
|
|
30
|
-
const {
|
|
30
|
+
const { GOOGLE_CALENDAR_TEST_CALENDAR_ID } = env
|
|
31
31
|
|
|
32
|
-
ctx.calendarId =
|
|
32
|
+
ctx.calendarId = GOOGLE_CALENDAR_TEST_CALENDAR_ID || 'primary'
|
|
33
33
|
|
|
34
34
|
const credentialStore = {
|
|
35
35
|
getCredentials: async () => ({
|
|
@@ -102,19 +102,6 @@ suite('google-calendar write & admin handlers (live)', () => {
|
|
|
102
102
|
const patched = await patch_event({ calendarId: ctx.calendarId, eventId: createdId, body: { summary: `CmdTest Updated ${Date.now()}` } })
|
|
103
103
|
expect(patched?.id).toBe(createdId)
|
|
104
104
|
|
|
105
|
-
// Also exercise full update (PUT)
|
|
106
|
-
const update_event = buildWrite('update_event')
|
|
107
|
-
const updated = await update_event({
|
|
108
|
-
calendarId: ctx.calendarId,
|
|
109
|
-
eventId: createdId,
|
|
110
|
-
body: {
|
|
111
|
-
summary: `CmdTest Updated (PUT) ${Date.now()}`,
|
|
112
|
-
start: { dateTime: patched?.start?.dateTime || new Date().toISOString() },
|
|
113
|
-
end: { dateTime: patched?.end?.dateTime || new Date(Date.now() + 3600000).toISOString() },
|
|
114
|
-
},
|
|
115
|
-
})
|
|
116
|
-
expect(updated?.id).toBe(createdId)
|
|
117
|
-
|
|
118
105
|
const delete_event = buildWrite('delete_event')
|
|
119
106
|
const del = await delete_event({ calendarId: ctx.calendarId, eventId: createdId })
|
|
120
107
|
expect(del?.success === true || del === '').toBe(true)
|
|
@@ -127,7 +114,7 @@ suite('google-calendar write & admin handlers (live)', () => {
|
|
|
127
114
|
}, 30000)
|
|
128
115
|
|
|
129
116
|
it('insert_acl -> get_acl -> update_acl -> delete_acl (admin)', async () => {
|
|
130
|
-
if (!process.env.
|
|
117
|
+
if (!process.env.GOOGLE_CALENDAR_TEST_ADMIN_WRITE)
|
|
131
118
|
return expect(true).toBe(true)
|
|
132
119
|
const insert_acl = buildAdmin('insert_acl')
|
|
133
120
|
const created = await insert_acl({ calendarId: ctx.calendarId, rule: { scope: { type: 'default' }, role: 'reader' } })
|
|
@@ -145,7 +132,7 @@ suite('google-calendar write & admin handlers (live)', () => {
|
|
|
145
132
|
}, 90000)
|
|
146
133
|
|
|
147
134
|
it('quick_add creates a simple event', async () => {
|
|
148
|
-
if (!process.env.
|
|
135
|
+
if (!process.env.GOOGLE_CALENDAR_TEST_QUICK_ADD)
|
|
149
136
|
return expect(true).toBe(true)
|
|
150
137
|
const quick_add = buildWrite('quick_add')
|
|
151
138
|
const res = await quick_add({ calendarId: ctx.calendarId, text: `Lunch tomorrow ${Date.now()}` })
|
|
@@ -153,7 +140,7 @@ suite('google-calendar write & admin handlers (live)', () => {
|
|
|
153
140
|
}, 60000)
|
|
154
141
|
|
|
155
142
|
it('move_event moves an event when provided a source event', async () => {
|
|
156
|
-
if (!process.env.
|
|
143
|
+
if (!process.env.GOOGLE_CALENDAR_TEST_MOVE_DEST)
|
|
157
144
|
return expect(true).toBe(true)
|
|
158
145
|
const create_event = buildWrite('create_event')
|
|
159
146
|
const now = new Date()
|
|
@@ -162,7 +149,7 @@ suite('google-calendar write & admin handlers (live)', () => {
|
|
|
162
149
|
const eventId = created?.id
|
|
163
150
|
expect(eventId).toBeTruthy()
|
|
164
151
|
const move_event = buildWrite('move_event')
|
|
165
|
-
const moved = await move_event({ calendarId: ctx.calendarId, eventId, destinationId: process.env.
|
|
152
|
+
const moved = await move_event({ calendarId: ctx.calendarId, eventId, destinationId: process.env.GOOGLE_CALENDAR_TEST_MOVE_DEST })
|
|
166
153
|
expect(moved?.id).toBeTruthy()
|
|
167
154
|
}, 90000)
|
|
168
155
|
})
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
async (input) => {
|
|
2
|
-
const
|
|
2
|
+
const params = new URLSearchParams()
|
|
3
|
+
if (input.fields)
|
|
4
|
+
params.set('fields', input.fields)
|
|
5
|
+
const qs = params.toString()
|
|
6
|
+
const path = `/calendars/${encodeURIComponent(input.calendarId)}/events/${encodeURIComponent(input.eventId)}${qs ? `?${qs}` : ''}`
|
|
3
7
|
const res = await integration.fetch(path)
|
|
4
8
|
return await res.json()
|
|
5
9
|
}
|
|
@@ -14,6 +14,8 @@ async (input) => {
|
|
|
14
14
|
params.set('singleEvents', String(input.singleEvents))
|
|
15
15
|
if (input.orderBy)
|
|
16
16
|
params.set('orderBy', input.orderBy)
|
|
17
|
+
if (input.fields)
|
|
18
|
+
params.set('fields', input.fields)
|
|
17
19
|
const qs = params.toString()
|
|
18
20
|
const path = `/calendars/${encodeURIComponent(input.calendarId)}/events${qs ? `?${qs}` : ''}`
|
|
19
21
|
const res = await integration.fetch(path)
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "google-calendar",
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
+
"toolsets": {
|
|
5
|
+
"events": {
|
|
6
|
+
"label": "Events",
|
|
7
|
+
"description": "Browse, schedule, and manage calendar events"
|
|
8
|
+
},
|
|
9
|
+
"sharing": {
|
|
10
|
+
"label": "Sharing",
|
|
11
|
+
"description": "Control who can access calendars"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
4
14
|
"tools": [
|
|
5
|
-
{ "name": "list_calendars", "description": "List calendars
|
|
6
|
-
{ "name": "get_calendar", "description": "Get a calendar by ID.", "inputSchema": "schemas/id_calendar.json", "handler": "handlers/get_calendar.js", "scope": "read" },
|
|
7
|
-
{ "name": "list_events", "description": "List events in a calendar with optional time range and
|
|
8
|
-
{ "name": "get_event", "description": "Get a specific event by ID from a calendar.", "inputSchema": "schemas/id_calendar_event.json", "handler": "handlers/get_event.js", "scope": "read" },
|
|
9
|
-
{ "name": "list_colors", "description": "Get the color definitions for calendars and events.", "inputSchema": "schemas/empty.json", "handler": "handlers/list_colors.js", "scope": "read" },
|
|
10
|
-
{ "name": "freebusy_query", "description": "Query free/busy
|
|
11
|
-
{ "name": "list_settings", "description": "List user settings.", "inputSchema": "schemas/empty.json", "handler": "handlers/list_settings.js", "scope": "read" },
|
|
15
|
+
{ "name": "list_calendars", "description": "List all calendars in the authenticated user's calendar list, including the primary calendar and any subscribed or shared calendars. Returns calendar IDs needed for list_events, create_event, and other calendar-specific tools. The primary calendar has calendarId='primary'.", "inputSchema": "schemas/empty.json", "handler": "handlers/list_calendars.js", "scope": "read", "toolset": "events" },
|
|
16
|
+
{ "name": "get_calendar", "description": "Get details for a specific calendar by ID, including its summary, description, timezone, and access role. Use list_calendars to find calendar IDs.", "inputSchema": "schemas/id_calendar.json", "handler": "handlers/get_calendar.js", "scope": "read", "toolset": "events" },
|
|
17
|
+
{ "name": "list_events", "description": "List events in a calendar with optional time range, text search, and pagination. Use calendarId='primary' for the user's main calendar. Set singleEvents=true and orderBy='startTime' to get recurring events expanded into individual instances in chronological order. Times must be RFC3339 format (e.g. '2024-01-15T09:00:00Z' or '2024-01-15T09:00:00-05:00'). Defaults to 25 results. Use pageToken from the response for the next page.", "inputSchema": "schemas/list_events.json", "handler": "handlers/list_events.js", "scope": "read", "toolset": "events" },
|
|
18
|
+
{ "name": "get_event", "description": "Get a specific event by its ID from a calendar. Returns full event details including summary, start, end, attendees, location, description, recurrence, and status. Use list_events to find event IDs.", "inputSchema": "schemas/id_calendar_event.json", "handler": "handlers/get_event.js", "scope": "read", "toolset": "events" },
|
|
19
|
+
{ "name": "list_colors", "description": "Get the set of color definitions available for calendars and events. Returns colorId values and their hex codes. Use colorId values in create_event or patch_event to color-code events.", "inputSchema": "schemas/empty.json", "handler": "handlers/list_colors.js", "scope": "read", "toolset": "events" },
|
|
20
|
+
{ "name": "freebusy_query", "description": "Query free/busy availability for one or more calendars within a time range. Useful for finding open slots or checking if attendees are available. Provide timeMin, timeMax (RFC3339), and an items array of calendar IDs. Returns busy time blocks for each calendar.", "inputSchema": "schemas/freebusy_query.json", "handler": "handlers/freebusy_query.js", "scope": "read", "toolset": "events" },
|
|
21
|
+
{ "name": "list_settings", "description": "List the authenticated user's Google Calendar settings, such as timezone, date format, and notification preferences.", "inputSchema": "schemas/empty.json", "handler": "handlers/list_settings.js", "scope": "read", "toolset": "events" },
|
|
12
22
|
|
|
13
|
-
{ "name": "create_event", "description": "Create
|
|
14
|
-
{ "name": "
|
|
15
|
-
{ "name": "
|
|
16
|
-
{ "name": "
|
|
17
|
-
{ "name": "
|
|
18
|
-
{ "name": "quick_add", "description": "Create an event using natural language text.", "inputSchema": "schemas/quick_add.json", "handler": "handlers/quick_add.js", "scope": "write" },
|
|
23
|
+
{ "name": "create_event", "description": "Create a new event in a calendar. Required fields: calendarId, summary, start, end. Use {dateTime, timeZone} for timed events (e.g. {\"dateTime\": \"2024-01-15T10:00:00\", \"timeZone\": \"America/New_York\"}) or {date} for all-day events (e.g. {\"date\": \"2024-01-15\"}). Optional fields: description, location, attendees (array of {email}), recurrence (RRULE strings), reminders, colorId, visibility. The calendarId field is extracted automatically; all other fields are sent as the event body.", "inputSchema": "schemas/create_event.json", "handler": "handlers/create_event.js", "scope": "write", "toolset": "events" },
|
|
24
|
+
{ "name": "patch_event", "description": "Partially update an event by providing only the fields to change. All other fields are preserved. Use this as the standard event update method. Provide changes in a 'body' object along with calendarId and eventId.", "inputSchema": "schemas/patch_event.json", "handler": "handlers/patch_event.js", "scope": "write", "toolset": "events" },
|
|
25
|
+
{ "name": "delete_event", "description": "Delete an event from a calendar. This permanently removes the event. For recurring events, this deletes only the specified instance. Use list_events to find event IDs.", "inputSchema": "schemas/id_calendar_event.json", "handler": "handlers/delete_event.js", "scope": "write", "toolset": "events" },
|
|
26
|
+
{ "name": "move_event", "description": "Move an event from one calendar to another. Provide the source calendarId, eventId, and the destination calendarId. Returns the updated event in the destination calendar.", "inputSchema": "schemas/move_event.json", "handler": "handlers/move_event.js", "scope": "write", "toolset": "events" },
|
|
27
|
+
{ "name": "quick_add", "description": "Create an event using a natural language text string. Parses the text to extract event details automatically. Examples: 'Meeting with Bob tomorrow at 3pm for 1 hour', 'Dentist appointment on Friday at 2pm', 'Weekly standup every Monday at 9am'. Requires calendarId (use 'primary') and text.", "inputSchema": "schemas/quick_add.json", "handler": "handlers/quick_add.js", "scope": "write", "toolset": "events" },
|
|
19
28
|
|
|
20
|
-
{ "name": "list_acl", "description": "List ACL rules for a calendar.", "inputSchema": "schemas/id_calendar.json", "handler": "handlers/list_acl.js", "scope": "admin" },
|
|
21
|
-
{ "name": "get_acl", "description": "Get a specific ACL rule by ID for a calendar.", "inputSchema": "schemas/get_acl.json", "handler": "handlers/get_acl.js", "scope": "admin" },
|
|
22
|
-
{ "name": "insert_acl", "description": "
|
|
23
|
-
{ "name": "update_acl", "description": "Update an ACL rule
|
|
24
|
-
{ "name": "delete_acl", "description": "
|
|
29
|
+
{ "name": "list_acl", "description": "List the Access Control List (ACL) rules for a calendar. Returns rules defining who has access and at what permission level (reader, writer, owner). Use get_calendar to find the calendarId.", "inputSchema": "schemas/id_calendar.json", "handler": "handlers/list_acl.js", "scope": "admin", "toolset": "sharing" },
|
|
30
|
+
{ "name": "get_acl", "description": "Get a specific ACL rule by its rule ID for a calendar. Use list_acl to find rule IDs.", "inputSchema": "schemas/get_acl.json", "handler": "handlers/get_acl.js", "scope": "admin", "toolset": "sharing" },
|
|
31
|
+
{ "name": "insert_acl", "description": "Add a new ACL rule to grant a user or group access to a calendar. Roles: 'reader' (view), 'writer' (view + edit events), 'owner' (full control). Scope must include type ('user', 'group', 'domain', or 'default') and optionally value (email or domain).", "inputSchema": "schemas/insert_acl.json", "handler": "handlers/insert_acl.js", "scope": "admin", "toolset": "sharing" },
|
|
32
|
+
{ "name": "update_acl", "description": "Update an existing ACL rule to change a user's or group's permission level on a calendar. Use list_acl to find the rule ID.", "inputSchema": "schemas/update_acl.json", "handler": "handlers/update_acl.js", "scope": "admin", "toolset": "sharing" },
|
|
33
|
+
{ "name": "delete_acl", "description": "Remove an ACL rule from a calendar, revoking the associated user's or group's access. Use list_acl to find the rule ID.", "inputSchema": "schemas/delete_acl.json", "handler": "handlers/delete_acl.js", "scope": "admin", "toolset": "sharing" }
|
|
25
34
|
]
|
|
26
35
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
## Calendar IDs
|
|
2
|
+
|
|
3
|
+
- Use `calendarId='primary'` for the authenticated user's main calendar
|
|
4
|
+
- Use `list_calendars` to discover other calendar IDs (work, shared, subscribed calendars)
|
|
5
|
+
- Calendar IDs typically look like email addresses (e.g. `user@example.com`) or opaque strings for subscribed calendars
|
|
6
|
+
|
|
7
|
+
## Date and time format
|
|
8
|
+
|
|
9
|
+
All times must be in RFC3339 format:
|
|
10
|
+
- Timed events: `'2024-01-15T10:00:00-05:00'` (with timezone offset) or `'2024-01-15T15:00:00Z'` (UTC)
|
|
11
|
+
- All-day events use date-only format: `'2024-01-15'`
|
|
12
|
+
|
|
13
|
+
## Creating events
|
|
14
|
+
|
|
15
|
+
For `create_event`, required fields are `calendarId`, `summary`, `start`, and `end`:
|
|
16
|
+
|
|
17
|
+
**Timed event:**
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"calendarId": "primary",
|
|
21
|
+
"summary": "Team Meeting",
|
|
22
|
+
"start": { "dateTime": "2024-01-15T10:00:00", "timeZone": "America/New_York" },
|
|
23
|
+
"end": { "dateTime": "2024-01-15T11:00:00", "timeZone": "America/New_York" }
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**All-day event:**
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"calendarId": "primary",
|
|
31
|
+
"summary": "Company Holiday",
|
|
32
|
+
"start": { "date": "2024-01-15" },
|
|
33
|
+
"end": { "date": "2024-01-16" }
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Note: For all-day events, `end.date` should be the day *after* the last day (exclusive end).
|
|
38
|
+
|
|
39
|
+
## Listing events in chronological order
|
|
40
|
+
|
|
41
|
+
To list upcoming events in start-time order (e.g. "what's on my calendar this week"):
|
|
42
|
+
- Set `singleEvents=true` to expand recurring events into individual instances
|
|
43
|
+
- Set `orderBy='startTime'` (requires `singleEvents=true`)
|
|
44
|
+
- Set `timeMin` to now (current ISO timestamp) and `timeMax` to the end of the desired range
|
|
45
|
+
|
|
46
|
+
## Quick add
|
|
47
|
+
|
|
48
|
+
`quick_add` parses natural language:
|
|
49
|
+
- `"Meeting with Bob tomorrow at 3pm for 1 hour"`
|
|
50
|
+
- `"Dentist appointment on Friday at 2pm"`
|
|
51
|
+
- `"Weekly standup every Monday at 9am"`
|
|
52
|
+
|
|
53
|
+
## Free/busy queries
|
|
54
|
+
|
|
55
|
+
Use `freebusy_query` to check availability before scheduling:
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"timeMin": "2024-01-15T00:00:00Z",
|
|
59
|
+
"timeMax": "2024-01-15T23:59:59Z",
|
|
60
|
+
"items": [{ "id": "primary" }, { "id": "colleague@example.com" }]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Updating events
|
|
65
|
+
|
|
66
|
+
- Use `update_event` for a full replacement (all fields must be provided)
|
|
67
|
+
- Use `patch_event` for partial updates (only provide the fields you want to change in `body`)
|
|
68
|
+
- `patch_event` is preferred when modifying one or two fields to avoid accidentally clearing others
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
2
3
|
"type": "object",
|
|
3
4
|
"properties": {
|
|
4
|
-
"calendarId": { "type": "string", "description": "Calendar ID
|
|
5
|
-
"eventId": { "type": "string", "description": "Event ID." }
|
|
5
|
+
"calendarId": { "type": "string", "description": "Calendar ID. Use 'primary' for the user's main calendar." },
|
|
6
|
+
"eventId": { "type": "string", "description": "Event ID. Obtained from list_events results." },
|
|
7
|
+
"fields": { "type": "string", "description": "Partial response fields selector to reduce response size. Example: 'id,summary,start,end,attendees'." }
|
|
6
8
|
},
|
|
7
9
|
"required": ["calendarId", "eventId"],
|
|
8
10
|
"additionalProperties": false
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
2
3
|
"type": "object",
|
|
3
4
|
"properties": {
|
|
4
|
-
"calendarId": { "type": "string", "description": "Calendar ID
|
|
5
|
-
"timeMin": { "type": "string", "description": "RFC3339
|
|
6
|
-
"timeMax": { "type": "string", "description": "RFC3339
|
|
7
|
-
"q": { "type": "string", "description": "Free-text search query" },
|
|
8
|
-
"maxResults": { "type": "integer", "minimum": 1, "maximum": 2500 },
|
|
9
|
-
"pageToken": { "type": "string" },
|
|
10
|
-
"singleEvents": { "type": "boolean", "description": "Expand recurring events" },
|
|
11
|
-
"orderBy": { "type": "string", "enum": ["startTime", "updated"] }
|
|
5
|
+
"calendarId": { "type": "string", "description": "Calendar ID. Use 'primary' for the user's main calendar. Find other calendar IDs via list_calendars." },
|
|
6
|
+
"timeMin": { "type": "string", "description": "Start of the time range (RFC3339 format, e.g. '2024-01-15T00:00:00Z' or '2024-01-15T09:00:00-05:00'). Only events ending after this time are returned." },
|
|
7
|
+
"timeMax": { "type": "string", "description": "End of the time range (RFC3339 format). Only events starting before this time are returned." },
|
|
8
|
+
"q": { "type": "string", "description": "Free-text search query matching event summary, description, location, and attendee details." },
|
|
9
|
+
"maxResults": { "type": "integer", "minimum": 1, "maximum": 2500, "default": 25, "description": "Maximum number of events to return. Defaults to 25. Use pageToken from the response for the next page." },
|
|
10
|
+
"pageToken": { "type": "string", "description": "Page token from a previous list_events response to retrieve the next page of results." },
|
|
11
|
+
"singleEvents": { "type": "boolean", "description": "Expand recurring events into individual instances. Set to true with orderBy='startTime' to get events in chronological order." },
|
|
12
|
+
"orderBy": { "type": "string", "enum": ["startTime", "updated"], "description": "Sort order. 'startTime' requires singleEvents=true. 'updated' sorts by last modification time." },
|
|
13
|
+
"fields": { "type": "string", "description": "Partial response fields selector to reduce response size. Example: 'items(id,summary,start,end,attendees)'. See Calendar API fields reference." }
|
|
12
14
|
},
|
|
13
15
|
"required": ["calendarId"],
|
|
14
16
|
"additionalProperties": false
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Google Docs
|
|
2
|
+
|
|
3
|
+
**13 tools**
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Credential variants
|
|
8
|
+
|
|
9
|
+
| Variant | Label |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `service_account` | Service Account (recommended) _(default)_ |
|
|
12
|
+
| `oauth_token` | OAuth Access Token (short-lived) |
|
|
13
|
+
|
|
14
|
+
## Tools
|
|
15
|
+
|
|
16
|
+
| Tool | Scope | Description |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| `read_document` | read | Read a Google Doc and return its content as clean Markdown. Preserves headings, bold, ita… |
|
|
19
|
+
| `create_document` | write | Create a new empty Google Doc with the given title. Returns the created document's metada… |
|
|
20
|
+
| `batch_update` | write | Send a documents.batchUpdate request to modify a document with one or more structured req… |
|
|
21
|
+
| `append_text` | write | Append plain text to the end of a Google Doc. Automatically fetches the document to find … |
|
|
22
|
+
| `replace_all_text` | write | Replace all occurrences of a text string in a Google Doc with new text. Case-sensitive by… |
|
|
23
|
+
| `style_first_match` | write | Find the first occurrence of text in a document and apply a TextStyle to it (bold, italic… |
|
|
24
|
+
| `insert_text_after_first_match` | write | Find the first occurrence of text and insert new text immediately before or after it. Use… |
|
|
25
|
+
| `insert_table_after_first_match` | write | Find the first occurrence of text and insert a table with the specified number of rows an… |
|
|
26
|
+
| `insert_page_break_after_first_match` | write | Find the first occurrence of text and insert a page break nearby. Useful for structuring … |
|
|
27
|
+
| `insert_inline_image_after_first_match` | write | Find the first occurrence of text and insert an inline image nearby, referenced by URL. R… |
|
|
28
|
+
| `delete_first_match` | write | Find the first occurrence of text in the document and delete it. Only the first match is … |
|
|
29
|
+
| `update_paragraph_style_for_first_match` | write | Find the first occurrence of text and update the paragraph style for the paragraph contai… |
|
|
30
|
+
| `update_document_style` | write | Update document-level style properties such as page size (pageSize.width, pageSize.height… |
|
|
@@ -70,28 +70,13 @@ suiteOrSkip('google-docs read handlers (live)', () => {
|
|
|
70
70
|
await safeCleanup(async () => drive.write('delete_file')({ fileId: folderId }))
|
|
71
71
|
}, 60000)
|
|
72
72
|
|
|
73
|
-
it('
|
|
73
|
+
it('read_document returns markdown content', async () => {
|
|
74
74
|
if (!documentId)
|
|
75
75
|
return expect(true).toBe(true)
|
|
76
|
-
const handler = docs.read('
|
|
76
|
+
const handler = docs.read('read_document')
|
|
77
77
|
const result = await handler({ documentId })
|
|
78
|
-
expect(result?.documentId || result?.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
it('get_document_text returns plain text', async () => {
|
|
82
|
-
if (!documentId)
|
|
83
|
-
return expect(true).toBe(true)
|
|
84
|
-
const handler = docs.read('get_document_text')
|
|
85
|
-
const result = await handler({ documentId })
|
|
86
|
-
expect(typeof result?.text === 'string').toBe(true)
|
|
87
|
-
}, 30000)
|
|
88
|
-
|
|
89
|
-
it('get_document_structured returns body JSON', async () => {
|
|
90
|
-
if (!documentId)
|
|
91
|
-
return expect(true).toBe(true)
|
|
92
|
-
const handler = docs.read('get_document_structured')
|
|
93
|
-
const result = await handler({ documentId })
|
|
94
|
-
expect(result?.body || result?.documentId).toBeTruthy()
|
|
78
|
+
expect(result?.documentId || result?.title).toBeTruthy()
|
|
79
|
+
expect(typeof result?.markdown).toBe('string')
|
|
95
80
|
}, 30000)
|
|
96
81
|
})
|
|
97
82
|
}
|
|
@@ -88,9 +88,9 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
88
88
|
const marker = `CmdTest ${Date.now()}`
|
|
89
89
|
const res = await append_text({ documentId, text: marker })
|
|
90
90
|
expect(res?.documentId || Array.isArray(res?.replies)).toBeTruthy()
|
|
91
|
-
const
|
|
92
|
-
const after = await
|
|
93
|
-
expect(String(after?.
|
|
91
|
+
const read_document = docs.read('read_document')
|
|
92
|
+
const after = await read_document({ documentId })
|
|
93
|
+
expect(String(after?.markdown || '')).toContain(marker)
|
|
94
94
|
}, 60000)
|
|
95
95
|
|
|
96
96
|
it('insert_text_after_first_match inserts text near target', async () => {
|
|
@@ -98,19 +98,19 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
98
98
|
if (!documentId)
|
|
99
99
|
return expect(true).toBe(true)
|
|
100
100
|
const insert_text_after_first_match = docs.write('insert_text_after_first_match')
|
|
101
|
-
const
|
|
101
|
+
const read_document = docs.read('read_document')
|
|
102
102
|
const anchor = `ANCHOR_${Date.now()}`
|
|
103
103
|
const appended = docs.write('append_text')
|
|
104
|
-
const before = await
|
|
105
|
-
if (!String(before?.
|
|
104
|
+
const before = await read_document({ documentId })
|
|
105
|
+
if (!String(before?.markdown || '').includes(anchor))
|
|
106
106
|
await appended({ documentId, text: `\n${anchor}\n` })
|
|
107
107
|
const insertSnippet = ` CmdTest ${Date.now()} `
|
|
108
108
|
const res = await insert_text_after_first_match({ documentId, findText: anchor, insertText: insertSnippet, position: 'after' })
|
|
109
109
|
expect(res?.applied === true || Array.isArray(res?.replies)).toBeTruthy()
|
|
110
|
-
const after = await
|
|
111
|
-
const text = String(after?.
|
|
110
|
+
const after = await read_document({ documentId })
|
|
111
|
+
const text = String(after?.markdown || '')
|
|
112
112
|
expect(text).toContain(anchor)
|
|
113
|
-
expect(text).toContain(insertSnippet)
|
|
113
|
+
expect(text).toContain(insertSnippet.trim())
|
|
114
114
|
}, 60000)
|
|
115
115
|
|
|
116
116
|
it('replace_all_text replaces occurrences', async () => {
|
|
@@ -127,11 +127,11 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
127
127
|
if (!documentId)
|
|
128
128
|
return expect(true).toBe(true)
|
|
129
129
|
const style_first_match = docs.write('style_first_match')
|
|
130
|
-
const
|
|
130
|
+
const read_document = docs.read('read_document')
|
|
131
131
|
const anchor = `ANCHOR_${Date.now()}`
|
|
132
132
|
const appended = docs.write('append_text')
|
|
133
|
-
const before = await
|
|
134
|
-
if (!
|
|
133
|
+
const before = await read_document({ documentId })
|
|
134
|
+
if (!String(before?.markdown || '').includes(anchor))
|
|
135
135
|
await appended({ documentId, text: `\n${anchor}\n` })
|
|
136
136
|
const res = await style_first_match({ documentId, findText: anchor, textStyle: { bold: true } })
|
|
137
137
|
expect(res?.applied === true || Array.isArray(res?.replies)).toBeTruthy()
|
|
@@ -142,16 +142,16 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
142
142
|
if (!documentId)
|
|
143
143
|
return expect(true).toBe(true)
|
|
144
144
|
const insert_table_after_first_match = docs.write('insert_table_after_first_match')
|
|
145
|
-
const
|
|
145
|
+
const read_document = docs.read('read_document')
|
|
146
146
|
const anchor = `ANCHOR_${Date.now()}`
|
|
147
147
|
const appended = docs.write('append_text')
|
|
148
|
-
const before = await
|
|
149
|
-
if (!
|
|
148
|
+
const before = await read_document({ documentId })
|
|
149
|
+
if (!String(before?.markdown || '').includes(anchor))
|
|
150
150
|
await appended({ documentId, text: `\n${anchor}\n` })
|
|
151
151
|
const res = await insert_table_after_first_match({ documentId, findText: anchor, rows: 1, columns: 1 })
|
|
152
152
|
expect(res?.applied === true || Array.isArray(res?.replies)).toBeTruthy()
|
|
153
|
-
const after = await
|
|
154
|
-
const hasTable = (after?.
|
|
153
|
+
const after = await read_document({ documentId })
|
|
154
|
+
const hasTable = String(after?.markdown || '').includes('|')
|
|
155
155
|
expect(hasTable).toBe(true)
|
|
156
156
|
}, 60000)
|
|
157
157
|
|
|
@@ -160,17 +160,14 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
160
160
|
if (!documentId)
|
|
161
161
|
return expect(true).toBe(true)
|
|
162
162
|
const insert_page_break_after_first_match = docs.write('insert_page_break_after_first_match')
|
|
163
|
-
const
|
|
163
|
+
const read_document = docs.read('read_document')
|
|
164
164
|
const anchor = `ANCHOR_${Date.now()}`
|
|
165
165
|
const appended = docs.write('append_text')
|
|
166
|
-
const before = await
|
|
167
|
-
if (!
|
|
166
|
+
const before = await read_document({ documentId })
|
|
167
|
+
if (!String(before?.markdown || '').includes(anchor))
|
|
168
168
|
await appended({ documentId, text: `\n${anchor}\n` })
|
|
169
169
|
const res = await insert_page_break_after_first_match({ documentId, findText: anchor })
|
|
170
170
|
expect(res?.applied === true || Array.isArray(res?.replies)).toBeTruthy()
|
|
171
|
-
const after = await get_struct({ documentId })
|
|
172
|
-
const hasBreak = (after?.body?.content || []).some((el: any) => Boolean(el.sectionBreak))
|
|
173
|
-
expect(hasBreak).toBe(true)
|
|
174
171
|
}, 60000)
|
|
175
172
|
|
|
176
173
|
it('insert_inline_image_after_first_match inserts an image when allowed', async () => {
|
|
@@ -181,9 +178,9 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
181
178
|
const insert_inline_image_after_first_match = docs.write('insert_inline_image_after_first_match')
|
|
182
179
|
const anchor = `ANCHOR_${Date.now()}`
|
|
183
180
|
const appended = docs.write('append_text')
|
|
184
|
-
const
|
|
185
|
-
const before = await
|
|
186
|
-
if (!String(before?.
|
|
181
|
+
const read_document = docs.read('read_document')
|
|
182
|
+
const before = await read_document({ documentId })
|
|
183
|
+
if (!String(before?.markdown || '').includes(anchor))
|
|
187
184
|
await appended({ documentId, text: `\n${anchor}\n` })
|
|
188
185
|
const res = await insert_inline_image_after_first_match({ documentId, findText: anchor, uri: imageUri })
|
|
189
186
|
expect(res?.applied === true || Array.isArray(res?.replies)).toBeTruthy()
|
|
@@ -194,16 +191,16 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
194
191
|
if (!documentId)
|
|
195
192
|
return expect(true).toBe(true)
|
|
196
193
|
const delete_first_match = docs.write('delete_first_match')
|
|
197
|
-
const
|
|
194
|
+
const read_document = docs.read('read_document')
|
|
198
195
|
const anchor = `ANCHOR_${Date.now()}`
|
|
199
196
|
const appended = docs.write('append_text')
|
|
200
|
-
const before = await
|
|
201
|
-
if (!String(before?.
|
|
197
|
+
const before = await read_document({ documentId })
|
|
198
|
+
if (!String(before?.markdown || '').includes(anchor))
|
|
202
199
|
await appended({ documentId, text: `\n${anchor}\n` })
|
|
203
200
|
const res = await delete_first_match({ documentId, findText: anchor })
|
|
204
201
|
expect(res?.applied === true || Array.isArray(res?.replies)).toBeTruthy()
|
|
205
|
-
const after = await
|
|
206
|
-
expect(String(after?.
|
|
202
|
+
const after = await read_document({ documentId })
|
|
203
|
+
expect(String(after?.markdown || '')).not.toContain(anchor)
|
|
207
204
|
}, 60000)
|
|
208
205
|
|
|
209
206
|
it('update_paragraph_style_for_first_match updates paragraph style near target', async () => {
|
|
@@ -211,28 +208,14 @@ suiteOrSkip('google-docs write handlers (live)', () => {
|
|
|
211
208
|
if (!documentId)
|
|
212
209
|
return expect(true).toBe(true)
|
|
213
210
|
const update_paragraph_style_for_first_match = docs.write('update_paragraph_style_for_first_match')
|
|
214
|
-
const
|
|
211
|
+
const read_document = docs.read('read_document')
|
|
215
212
|
const anchor = `ANCHOR_${Date.now()}`
|
|
216
213
|
const appended = docs.write('append_text')
|
|
217
|
-
const before = await
|
|
218
|
-
if (!
|
|
214
|
+
const before = await read_document({ documentId })
|
|
215
|
+
if (!String(before?.markdown || '').includes(anchor))
|
|
219
216
|
await appended({ documentId, text: `\n${anchor}\n` })
|
|
220
217
|
const res = await update_paragraph_style_for_first_match({ documentId, findText: anchor, paragraphStyle: { alignment: 'CENTER' } })
|
|
221
218
|
expect(res?.applied === true || Array.isArray(res?.replies)).toBeTruthy()
|
|
222
|
-
const after = await get_struct({ documentId })
|
|
223
|
-
let foundAligned = false
|
|
224
|
-
for (const el of (after?.body?.content || [])) {
|
|
225
|
-
if (!el.paragraph)
|
|
226
|
-
continue
|
|
227
|
-
const p = el.paragraph
|
|
228
|
-
const text = (p.elements || []).map((e: any) => e?.textRun?.content || '').join('')
|
|
229
|
-
if (text.includes(anchor)) {
|
|
230
|
-
if (p.paragraphStyle?.alignment === 'CENTER')
|
|
231
|
-
foundAligned = true
|
|
232
|
-
break
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
expect(foundAligned).toBe(true)
|
|
236
219
|
}, 60000)
|
|
237
220
|
|
|
238
221
|
it('update_document_style updates doc style with no-op', async () => {
|