@commandable/integration-data 0.0.5 → 0.0.6
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 +64 -0
- package/dist/credentials-index.js.map +1 -1
- package/integrations/github/__tests__/get_handlers.test.ts +202 -7
- package/integrations/github/__tests__/write_handlers.test.ts +171 -21
- package/integrations/github/handlers/create_commit.js +10 -2
- 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 +9 -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 +58 -20
- 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/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/__tests__/write_and_admin_handlers.test.ts +0 -13
- 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 +17 -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/__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/__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/__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 +33 -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/__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/__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/new_integration_prompt.md +5 -1
- package/package.json +1 -1
- 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
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"properties": {
|
|
5
|
-
"
|
|
5
|
+
"userId": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "User email address or the special value 'me'. Defaults to 'me'."
|
|
8
|
+
}
|
|
6
9
|
},
|
|
7
|
-
"required": ["documentId"],
|
|
8
10
|
"additionalProperties": false
|
|
9
11
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["threadId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": { "type": "string", "description": "User email address or 'me'. Defaults to 'me'." },
|
|
7
|
+
"threadId": { "type": "string", "description": "Gmail thread ID." },
|
|
8
|
+
"format": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["minimal", "full", "metadata"],
|
|
11
|
+
"description": "Thread message format. Defaults to full."
|
|
12
|
+
},
|
|
13
|
+
"metadataHeaders": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"description": "Headers to include when format is metadata.",
|
|
16
|
+
"items": { "type": "string" }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["draftId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "User email address or 'me'. Defaults to 'me'."
|
|
9
|
+
},
|
|
10
|
+
"draftId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Gmail draft ID."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["labelId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "User email address or 'me'. Defaults to 'me'."
|
|
9
|
+
},
|
|
10
|
+
"labelId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Gmail label ID."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["messageId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "User email address or 'me'. Defaults to 'me'."
|
|
9
|
+
},
|
|
10
|
+
"messageId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Gmail message ID."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["threadId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "User email address or 'me'. Defaults to 'me'."
|
|
9
|
+
},
|
|
10
|
+
"threadId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Gmail thread ID."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"userId": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "User email address or 'me'. Defaults to 'me'."
|
|
8
|
+
},
|
|
9
|
+
"q": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Gmail search query to filter drafts. Supports the same operators as list_messages: 'subject:keyword', 'to:user@example.com', etc."
|
|
12
|
+
},
|
|
13
|
+
"maxResults": {
|
|
14
|
+
"type": "integer",
|
|
15
|
+
"minimum": 1,
|
|
16
|
+
"maximum": 500,
|
|
17
|
+
"default": 20,
|
|
18
|
+
"description": "Maximum number of drafts to return. Defaults to 20. Use pageToken from the response for the next page."
|
|
19
|
+
},
|
|
20
|
+
"pageToken": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Page token from a previous list_drafts response. Pass this to retrieve the next page."
|
|
23
|
+
},
|
|
24
|
+
"includeSpamTrash": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Include drafts from SPAM and TRASH in results. Defaults to false."
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"type": "object",
|
|
4
|
-
"required": ["spreadsheetId", "metadataId"],
|
|
5
4
|
"properties": {
|
|
6
|
-
"
|
|
7
|
-
|
|
5
|
+
"userId": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "User email address or the special value 'me'. Defaults to 'me'."
|
|
8
|
+
}
|
|
8
9
|
},
|
|
9
10
|
"additionalProperties": false
|
|
10
11
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"userId": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "User email address or 'me'. Defaults to 'me'."
|
|
8
|
+
},
|
|
9
|
+
"q": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Gmail search query. Supported operators: 'is:unread', 'is:read', 'from:user@example.com', 'to:user@example.com', 'subject:keyword', 'has:attachment', 'label:INBOX', 'after:2024/01/01', 'before:2024/12/31', 'newer_than:7d', 'older_than:1y', 'in:sent', 'in:drafts'. Combine operators with spaces (implicit AND) or use OR/NOT."
|
|
12
|
+
},
|
|
13
|
+
"labelIds": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"description": "Filter to messages with all of these label IDs applied. Common IDs: 'INBOX', 'UNREAD', 'STARRED', 'SENT', 'DRAFT', 'SPAM', 'TRASH'. Use list_labels for custom label IDs.",
|
|
16
|
+
"items": { "type": "string" }
|
|
17
|
+
},
|
|
18
|
+
"maxResults": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": 1,
|
|
21
|
+
"maximum": 500,
|
|
22
|
+
"default": 20,
|
|
23
|
+
"description": "Maximum number of messages to return. Defaults to 20. Use pageToken from the response for the next page of results."
|
|
24
|
+
},
|
|
25
|
+
"pageToken": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Page token from a previous list_messages response. Pass this to retrieve the next page."
|
|
28
|
+
},
|
|
29
|
+
"includeSpamTrash": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"description": "Include messages from SPAM and TRASH in results. Defaults to false."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"userId": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "User email address or 'me'. Defaults to 'me'."
|
|
8
|
+
},
|
|
9
|
+
"q": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Gmail search query. Supported operators: 'is:unread', 'from:user@example.com', 'to:user@example.com', 'subject:keyword', 'has:attachment', 'after:2024/01/01', 'newer_than:7d', 'label:INBOX'. Same syntax as list_messages."
|
|
12
|
+
},
|
|
13
|
+
"labelIds": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"description": "Filter to threads where all messages have these label IDs. Common IDs: 'INBOX', 'UNREAD', 'STARRED', 'SENT'. Use list_labels for custom label IDs.",
|
|
16
|
+
"items": { "type": "string" }
|
|
17
|
+
},
|
|
18
|
+
"maxResults": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": 1,
|
|
21
|
+
"maximum": 500,
|
|
22
|
+
"default": 20,
|
|
23
|
+
"description": "Maximum number of threads to return. Defaults to 20. Use pageToken from the response for the next page of results."
|
|
24
|
+
},
|
|
25
|
+
"pageToken": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Page token from a previous list_threads response. Pass this to retrieve the next page."
|
|
28
|
+
},
|
|
29
|
+
"includeSpamTrash": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"description": "Include threads from SPAM and TRASH in results. Defaults to false."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["messageId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": { "type": "string", "description": "User email address or 'me'. Defaults to 'me'." },
|
|
7
|
+
"messageId": { "type": "string", "description": "Gmail message ID." },
|
|
8
|
+
"addLabelIds": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": { "type": "string" },
|
|
11
|
+
"description": "Label IDs to add."
|
|
12
|
+
},
|
|
13
|
+
"removeLabelIds": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Label IDs to remove."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"anyOf": [
|
|
20
|
+
{ "required": ["addLabelIds"] },
|
|
21
|
+
{ "required": ["removeLabelIds"] }
|
|
22
|
+
],
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["threadId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": { "type": "string", "description": "User email address or 'me'. Defaults to 'me'." },
|
|
7
|
+
"threadId": { "type": "string", "description": "Gmail thread ID." },
|
|
8
|
+
"addLabelIds": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": { "type": "string" },
|
|
11
|
+
"description": "Label IDs to add."
|
|
12
|
+
},
|
|
13
|
+
"removeLabelIds": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Label IDs to remove."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"anyOf": [
|
|
20
|
+
{ "required": ["addLabelIds"] },
|
|
21
|
+
{ "required": ["removeLabelIds"] }
|
|
22
|
+
],
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["messageId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": { "type": "string", "description": "User email or 'me'. Defaults to 'me'." },
|
|
7
|
+
"messageId": { "type": "string", "description": "Gmail message ID. Obtain from list_messages or search results." }
|
|
8
|
+
},
|
|
9
|
+
"additionalProperties": false
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"userId": { "type": "string", "description": "User email address or 'me'. Defaults to 'me'." },
|
|
6
|
+
"draftId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Draft ID to send."
|
|
9
|
+
},
|
|
10
|
+
"raw": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Optional base64url encoded RFC822 message string for one-off send."
|
|
13
|
+
},
|
|
14
|
+
"threadId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Optional existing thread ID when sending a one-off draft payload."
|
|
17
|
+
},
|
|
18
|
+
"labelIds": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": { "type": "string" },
|
|
21
|
+
"description": "Optional label IDs when sending a one-off draft payload."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"anyOf": [
|
|
25
|
+
{ "required": ["draftId"] },
|
|
26
|
+
{ "required": ["raw"] }
|
|
27
|
+
],
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["to", "subject", "body"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": { "type": "string", "description": "User email or 'me'. Defaults to 'me'." },
|
|
7
|
+
"to": { "type": "string", "description": "Recipient email address. Use comma-separated values for multiple recipients (e.g. 'alice@example.com, bob@example.com')." },
|
|
8
|
+
"cc": { "type": "string", "description": "CC recipients, comma-separated." },
|
|
9
|
+
"bcc": { "type": "string", "description": "BCC recipients, comma-separated." },
|
|
10
|
+
"subject": { "type": "string", "description": "Email subject line." },
|
|
11
|
+
"body": { "type": "string", "description": "Plain text email body. Required unless htmlBody is provided." },
|
|
12
|
+
"htmlBody": { "type": "string", "description": "HTML email body. If provided, takes precedence over body and the email is sent as text/html." },
|
|
13
|
+
"replyToMessageId": { "type": "string", "description": "Message ID of the email being replied to. Sets the In-Reply-To header for proper threading. Use with threadId." },
|
|
14
|
+
"threadId": { "type": "string", "description": "Thread ID to add this message to. Required when replying so the reply appears in the same conversation." }
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": ["labelId"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": { "type": "string", "description": "User email address or 'me'. Defaults to 'me'." },
|
|
7
|
+
"labelId": { "type": "string", "description": "Gmail label ID." },
|
|
8
|
+
"name": { "type": "string", "description": "Label display name." },
|
|
9
|
+
"messageListVisibility": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["show", "hide"]
|
|
12
|
+
},
|
|
13
|
+
"labelListVisibility": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["labelShow", "labelShowIfUnread", "labelHide"]
|
|
16
|
+
},
|
|
17
|
+
"color": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"textColor": { "type": "string", "description": "Hex color, e.g. #000000" },
|
|
21
|
+
"backgroundColor": { "type": "string", "description": "Hex color, e.g. #ffffff" }
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"anyOf": [
|
|
27
|
+
{ "required": ["name"] },
|
|
28
|
+
{ "required": ["messageListVisibility"] },
|
|
29
|
+
{ "required": ["labelListVisibility"] },
|
|
30
|
+
{ "required": ["color"] }
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -63,60 +63,14 @@ suite('google-sheet read handlers (live)', () => {
|
|
|
63
63
|
expect(result?.spreadsheetId || result?.sheets).toBeTruthy()
|
|
64
64
|
}, 30000)
|
|
65
65
|
|
|
66
|
-
it('
|
|
66
|
+
it('read_sheet returns markdown with A1 coordinates', async () => {
|
|
67
67
|
if (!spreadsheetId)
|
|
68
68
|
return expect(true).toBe(true)
|
|
69
|
-
const handler = sheets.read('
|
|
69
|
+
const handler = sheets.read('read_sheet')
|
|
70
70
|
const range = sheetTitle ? `${sheetTitle}!A1:B5` : 'A1:B5'
|
|
71
|
-
const result = await handler({ spreadsheetId, range })
|
|
72
|
-
expect(result?.range
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
it('batch_get_values returns multiple ranges', async () => {
|
|
76
|
-
if (!spreadsheetId)
|
|
77
|
-
return expect(true).toBe(true)
|
|
78
|
-
const handler = sheets.read('batch_get_values')
|
|
79
|
-
const aTitle = sheetTitle || 'Sheet1'
|
|
80
|
-
const result = await handler({ spreadsheetId, ranges: [`${aTitle}!A1:A3`, `${aTitle}!B1:B3`] })
|
|
81
|
-
expect(Array.isArray(result?.valueRanges)).toBe(true)
|
|
82
|
-
}, 30000)
|
|
83
|
-
|
|
84
|
-
it('get_spreadsheet_by_data_filter returns metadata', async () => {
|
|
85
|
-
if (!spreadsheetId)
|
|
86
|
-
return expect(true).toBe(true)
|
|
87
|
-
const handler = sheets.read('get_spreadsheet_by_data_filter')
|
|
88
|
-
const aTitle = sheetTitle || 'Sheet1'
|
|
89
|
-
const result = await handler({ spreadsheetId, dataFilters: [{ a1Range: `${aTitle}!A1:A1` }] })
|
|
90
|
-
expect(result?.spreadsheetId || result?.sheets).toBeTruthy()
|
|
91
|
-
}, 30000)
|
|
92
|
-
|
|
93
|
-
it('get_values_by_data_filter returns values', async () => {
|
|
94
|
-
if (!spreadsheetId)
|
|
95
|
-
return expect(true).toBe(true)
|
|
96
|
-
const handler = sheets.read('get_values_by_data_filter')
|
|
97
|
-
const aTitle = sheetTitle || 'Sheet1'
|
|
98
|
-
const result = await handler({ spreadsheetId, dataFilters: [{ a1Range: `${aTitle}!A1:B2` }] })
|
|
99
|
-
expect(Array.isArray(result?.valueRanges)).toBe(true)
|
|
100
|
-
}, 30000)
|
|
101
|
-
|
|
102
|
-
it('search_developer_metadata returns results or empty', async () => {
|
|
103
|
-
if (!spreadsheetId)
|
|
104
|
-
return expect(true).toBe(true)
|
|
105
|
-
const handler = sheets.read('search_developer_metadata')
|
|
106
|
-
const result = await handler({ spreadsheetId, dataFilters: [{ developerMetadataLookup: { visibility: 'DOCUMENT' } }] })
|
|
107
|
-
expect(result !== undefined).toBe(true)
|
|
108
|
-
}, 30000)
|
|
109
|
-
|
|
110
|
-
it('get_developer_metadata retrieves by id when available', async () => {
|
|
111
|
-
if (!spreadsheetId)
|
|
112
|
-
return expect(true).toBe(true)
|
|
113
|
-
const search = sheets.read('search_developer_metadata')
|
|
114
|
-
const list = await search({ spreadsheetId, dataFilters: [{ developerMetadataLookup: { visibility: 'DOCUMENT' } }] })
|
|
115
|
-
const first = list?.matchedDeveloperMetadata?.[0]?.developerMetadata || list?.developerMetadata?.[0]
|
|
116
|
-
if (!first?.metadataId)
|
|
117
|
-
return expect(true).toBe(true)
|
|
118
|
-
const getdm = sheets.read('get_developer_metadata')
|
|
119
|
-
const got = await getdm({ spreadsheetId, metadataId: first.metadataId })
|
|
120
|
-
expect(got?.metadataId).toBe(first.metadataId)
|
|
71
|
+
const result = await handler({ spreadsheetId, range, valueRenderOption: 'FORMATTED_VALUE' })
|
|
72
|
+
expect(result?.range).toBeTruthy()
|
|
73
|
+
expect(typeof result?.markdown).toBe('string')
|
|
74
|
+
expect(result?.columnCount >= 1).toBe(true)
|
|
121
75
|
}, 30000)
|
|
122
76
|
})
|
|
@@ -110,17 +110,6 @@ suite('google-sheet write handlers (live)', () => {
|
|
|
110
110
|
expect(res?.totalUpdatedCells >= 0 || res?.spreadsheetId).toBeTruthy()
|
|
111
111
|
}, 60000)
|
|
112
112
|
|
|
113
|
-
it('batch_update_values_by_data_filter updates via filters', async () => {
|
|
114
|
-
if (!ctx.spreadsheetId)
|
|
115
|
-
return expect(true).toBe(true)
|
|
116
|
-
const aTitle = sheetTitle || 'Sheet1'
|
|
117
|
-
const batch_update_values_by_data_filter = sheets.write('batch_update_values_by_data_filter')
|
|
118
|
-
const res = await batch_update_values_by_data_filter({ spreadsheetId: ctx.spreadsheetId, data: [
|
|
119
|
-
{ dataFilter: { a1Range: `${aTitle}!D1:D1` }, values: [[`CmdTestDF ${Date.now()}`]] },
|
|
120
|
-
], valueInputOption: 'USER_ENTERED' })
|
|
121
|
-
expect(res?.totalUpdatedCells >= 0 || res?.spreadsheetId).toBeTruthy()
|
|
122
|
-
}, 60000)
|
|
123
|
-
|
|
124
113
|
it('batch_clear_values clears multiple ranges', async () => {
|
|
125
114
|
if (!ctx.spreadsheetId)
|
|
126
115
|
return expect(true).toBe(true)
|
|
@@ -130,15 +119,6 @@ suite('google-sheet write handlers (live)', () => {
|
|
|
130
119
|
expect(Boolean(res?.spreadsheetId) || Array.isArray(res?.clearedRanges)).toBe(true)
|
|
131
120
|
}, 60000)
|
|
132
121
|
|
|
133
|
-
it('batch_clear_values_by_data_filter clears via filters', async () => {
|
|
134
|
-
if (!ctx.spreadsheetId)
|
|
135
|
-
return expect(true).toBe(true)
|
|
136
|
-
const aTitle = sheetTitle || 'Sheet1'
|
|
137
|
-
const batch_clear_values_by_data_filter = sheets.write('batch_clear_values_by_data_filter')
|
|
138
|
-
const res = await batch_clear_values_by_data_filter({ spreadsheetId: ctx.spreadsheetId, dataFilters: [{ a1Range: `${aTitle}!E1:E2` }] })
|
|
139
|
-
expect(Boolean(res?.spreadsheetId) || Array.isArray(res?.clearedRanges)).toBe(true)
|
|
140
|
-
}, 60000)
|
|
141
|
-
|
|
142
122
|
it('batch_update handles a trivial request (no-op findReplace)', async () => {
|
|
143
123
|
if (!ctx.spreadsheetId)
|
|
144
124
|
return expect(true).toBe(true)
|
|
@@ -5,6 +5,8 @@ async (input) => {
|
|
|
5
5
|
params.set('includeGridData', String(includeGridData))
|
|
6
6
|
if (Array.isArray(ranges))
|
|
7
7
|
ranges.forEach(r => params.append('ranges', String(r)))
|
|
8
|
+
if (input.fields)
|
|
9
|
+
params.set('fields', input.fields)
|
|
8
10
|
const qs = params.toString()
|
|
9
11
|
const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}${qs ? `?${qs}` : ''}`
|
|
10
12
|
const res = await integration.fetch(path)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
async (input) => {
|
|
2
|
+
const toColumnName = (index) => {
|
|
3
|
+
let n = index + 1
|
|
4
|
+
let out = ''
|
|
5
|
+
while (n > 0) {
|
|
6
|
+
const rem = (n - 1) % 26
|
|
7
|
+
out = String.fromCharCode(65 + rem) + out
|
|
8
|
+
n = Math.floor((n - 1) / 26)
|
|
9
|
+
}
|
|
10
|
+
return out
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const columnNameToIndex = (name) => {
|
|
14
|
+
let value = 0
|
|
15
|
+
for (const ch of name.toUpperCase()) {
|
|
16
|
+
const code = ch.charCodeAt(0)
|
|
17
|
+
if (code < 65 || code > 90) continue
|
|
18
|
+
value = value * 26 + (code - 64)
|
|
19
|
+
}
|
|
20
|
+
return Math.max(0, value - 1)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const parseResolvedRange = (resolvedRange) => {
|
|
24
|
+
// Examples: "Sheet1!A1:D5", "Sheet1!B:B", "Sheet1!2:9"
|
|
25
|
+
const a1 = String(resolvedRange || '').split('!')[1] || ''
|
|
26
|
+
const [start = 'A1'] = a1.split(':')
|
|
27
|
+
const letters = (start.match(/[A-Za-z]+/) || ['A'])[0]
|
|
28
|
+
const rowDigits = (start.match(/\d+/) || ['1'])[0]
|
|
29
|
+
return {
|
|
30
|
+
startColumn: columnNameToIndex(letters),
|
|
31
|
+
startRow: Math.max(1, parseInt(rowDigits, 10) || 1),
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const escapeCell = (value) =>
|
|
36
|
+
String(value ?? '')
|
|
37
|
+
.replace(/\|/g, '\\|')
|
|
38
|
+
.replace(/\r?\n/g, '<br>')
|
|
39
|
+
|
|
40
|
+
const spreadsheetId = input.spreadsheetId
|
|
41
|
+
const range = input.range || 'A1:Z1000'
|
|
42
|
+
const params = new URLSearchParams()
|
|
43
|
+
if (input.valueRenderOption) params.set('valueRenderOption', input.valueRenderOption)
|
|
44
|
+
|
|
45
|
+
const qs = params.toString()
|
|
46
|
+
const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/values/${encodeURIComponent(range)}${qs ? `?${qs}` : ''}`
|
|
47
|
+
const res = await integration.fetch(path)
|
|
48
|
+
const payload = await res.json()
|
|
49
|
+
|
|
50
|
+
const values = Array.isArray(payload?.values) ? payload.values : []
|
|
51
|
+
const resolvedRange = payload?.range || range
|
|
52
|
+
const { startColumn, startRow } = parseResolvedRange(resolvedRange)
|
|
53
|
+
|
|
54
|
+
const width = Math.max(1, ...values.map((row) => (Array.isArray(row) ? row.length : 0)))
|
|
55
|
+
const headerCells = Array.from({ length: width }, (_, i) => toColumnName(startColumn + i))
|
|
56
|
+
const lines = [
|
|
57
|
+
`| | ${headerCells.join(' | ')} |`,
|
|
58
|
+
`|---|${Array(width).fill('---').join('|')}|`,
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
for (let i = 0; i < values.length; i += 1) {
|
|
62
|
+
const row = Array.isArray(values[i]) ? values[i] : []
|
|
63
|
+
const padded = [...row, ...Array(width - row.length).fill('')]
|
|
64
|
+
const escaped = padded.map((cell) => escapeCell(cell))
|
|
65
|
+
lines.push(`| ${startRow + i} | ${escaped.join(' | ')} |`)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
spreadsheetId,
|
|
70
|
+
range: resolvedRange,
|
|
71
|
+
rowCount: values.length,
|
|
72
|
+
columnCount: width,
|
|
73
|
+
markdown: lines.join('\n'),
|
|
74
|
+
}
|
|
75
|
+
}
|