@commandable/integration-data 0.0.6 → 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 +119 -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 +5 -5
- package/integrations/github/__tests__/write_handlers.test.ts +176 -58
- package/integrations/github/handlers/create_file.js +46 -0
- package/integrations/github/handlers/delete_file.js +14 -1
- package/integrations/github/handlers/edit_file.js +52 -0
- package/integrations/github/handlers/edit_files.js +107 -0
- package/integrations/github/manifest.json +74 -47
- package/integrations/github/prompt.md +36 -0
- package/integrations/github/schemas/create_file.json +13 -0
- package/integrations/github/schemas/delete_file.json +2 -2
- package/integrations/github/schemas/edit_file.json +26 -0
- package/integrations/github/schemas/edit_files.json +39 -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 -7
- package/integrations/google-calendar/manifest.json +27 -17
- package/integrations/google-docs/README.md +30 -0
- package/integrations/google-drive/README.md +26 -0
- package/integrations/google-gmail/.env.test.example +11 -0
- package/integrations/google-gmail/README.md +49 -0
- package/integrations/google-gmail/handlers/create_draft_email.js +1 -1
- package/integrations/google-gmail/handlers/read_email.js +1 -1
- package/integrations/google-gmail/handlers/send_email.js +1 -1
- package/integrations/google-gmail/manifest.json +36 -25
- package/integrations/google-sheet/README.md +27 -0
- package/integrations/google-slides/README.md +28 -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 +173 -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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"query": { "type": "string", "description": "Free-text search query (optional)." },
|
|
5
|
+
"filters": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"description": "Property-based filters converted into HubSpot filterGroups.",
|
|
8
|
+
"items": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"propertyName": { "type": "string" },
|
|
12
|
+
"operator": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"EQ",
|
|
16
|
+
"NEQ",
|
|
17
|
+
"LT",
|
|
18
|
+
"LTE",
|
|
19
|
+
"GT",
|
|
20
|
+
"GTE",
|
|
21
|
+
"BETWEEN",
|
|
22
|
+
"HAS_PROPERTY",
|
|
23
|
+
"NOT_HAS_PROPERTY",
|
|
24
|
+
"CONTAINS_TOKEN"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"value": { "type": ["string", "number", "boolean"] }
|
|
28
|
+
},
|
|
29
|
+
"required": ["propertyName", "operator"],
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"properties": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": { "type": "string" },
|
|
36
|
+
"description": "Which task properties to return (e.g. hs_task_subject, hs_task_status, hs_timestamp)."
|
|
37
|
+
},
|
|
38
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
39
|
+
"after": { "type": "string", "description": "Paging cursor token." }
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
}
|
|
43
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"query": { "type": "string", "description": "Free-text search query (optional)." },
|
|
5
|
+
"filters": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"description": "Property-based filters converted into HubSpot filterGroups.",
|
|
8
|
+
"items": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"propertyName": { "type": "string" },
|
|
12
|
+
"operator": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"EQ",
|
|
16
|
+
"NEQ",
|
|
17
|
+
"LT",
|
|
18
|
+
"LTE",
|
|
19
|
+
"GT",
|
|
20
|
+
"GTE",
|
|
21
|
+
"BETWEEN",
|
|
22
|
+
"HAS_PROPERTY",
|
|
23
|
+
"NOT_HAS_PROPERTY",
|
|
24
|
+
"CONTAINS_TOKEN"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"value": { "type": ["string", "number", "boolean"] }
|
|
28
|
+
},
|
|
29
|
+
"required": ["propertyName", "operator"],
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"properties": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": { "type": "string" },
|
|
36
|
+
"description": "Which ticket properties to return."
|
|
37
|
+
},
|
|
38
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
39
|
+
"after": { "type": "string", "description": "Paging cursor token." }
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
}
|
|
43
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"id": {
|
|
5
|
+
"type": "string",
|
|
6
|
+
"title": "Company ID",
|
|
7
|
+
"description": "HubSpot company object ID."
|
|
8
|
+
},
|
|
9
|
+
"name": { "type": "string" },
|
|
10
|
+
"domain": { "type": "string" },
|
|
11
|
+
"properties": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "HubSpot company properties to update (propertyName -> value).",
|
|
14
|
+
"additionalProperties": true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["id"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
20
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"id": {
|
|
5
|
+
"type": "string",
|
|
6
|
+
"title": "Contact ID",
|
|
7
|
+
"description": "HubSpot contact object ID."
|
|
8
|
+
},
|
|
9
|
+
"firstname": { "type": "string" },
|
|
10
|
+
"lastname": { "type": "string" },
|
|
11
|
+
"email": { "type": "string" },
|
|
12
|
+
"properties": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "HubSpot contact properties to update (propertyName -> value).",
|
|
15
|
+
"additionalProperties": true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["id"],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"id": { "type": "string", "description": "HubSpot deal object ID." },
|
|
5
|
+
"dealname": { "type": "string" },
|
|
6
|
+
"amount": { "type": ["string", "number"] },
|
|
7
|
+
"pipeline": { "type": "string" },
|
|
8
|
+
"dealstage": { "type": "string" },
|
|
9
|
+
"closedate": { "type": ["string", "number"] },
|
|
10
|
+
"properties": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "HubSpot deal properties to update (propertyName -> value).",
|
|
13
|
+
"additionalProperties": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["id"],
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"id": { "type": "string", "description": "HubSpot task object ID." },
|
|
5
|
+
"subject": { "type": "string", "description": "Maps to hs_task_subject." },
|
|
6
|
+
"body": { "type": "string", "description": "Maps to hs_task_body." },
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": ["NOT_STARTED", "COMPLETED"],
|
|
10
|
+
"description": "Maps to hs_task_status."
|
|
11
|
+
},
|
|
12
|
+
"priority": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["LOW", "MEDIUM", "HIGH"],
|
|
15
|
+
"description": "Maps to hs_task_priority."
|
|
16
|
+
},
|
|
17
|
+
"dueTimestamp": {
|
|
18
|
+
"type": ["string", "number"],
|
|
19
|
+
"description": "Maps to hs_timestamp (task due date/time). Prefer Unix timestamp in milliseconds."
|
|
20
|
+
},
|
|
21
|
+
"hubspot_owner_id": { "type": ["string", "number"] },
|
|
22
|
+
"properties": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"description": "Advanced: raw HubSpot task properties to update (propertyName -> value).",
|
|
25
|
+
"additionalProperties": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["id"],
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"id": { "type": "string", "description": "HubSpot ticket object ID." },
|
|
5
|
+
"subject": { "type": "string" },
|
|
6
|
+
"content": { "type": "string" },
|
|
7
|
+
"hs_pipeline": { "type": "string" },
|
|
8
|
+
"hs_pipeline_stage": { "type": "string" },
|
|
9
|
+
"properties": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"description": "HubSpot ticket properties to update (propertyName -> value).",
|
|
12
|
+
"additionalProperties": true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": ["id"],
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
}
|
|
18
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Jira (Jira Cloud)
|
|
2
|
+
# Credentials mode uses an Atlassian API token (easy for local/CI).
|
|
3
|
+
#
|
|
4
|
+
# ----------------------
|
|
5
|
+
# Variant: api_token
|
|
6
|
+
# ----------------------
|
|
7
|
+
# JIRA_DOMAIN:
|
|
8
|
+
# - If your site URL is https://YOUR_DOMAIN.atlassian.net, then YOUR_DOMAIN is the value.
|
|
9
|
+
JIRA_DOMAIN=commandable
|
|
10
|
+
#
|
|
11
|
+
# JIRA_EMAIL:
|
|
12
|
+
# - The email address of the Atlassian account that owns the API token.
|
|
13
|
+
JIRA_EMAIL=theo@commandable.ai
|
|
14
|
+
#
|
|
15
|
+
# JIRA_API_TOKEN:
|
|
16
|
+
# - Create an Atlassian API token at:
|
|
17
|
+
# https://id.atlassian.com/manage-profile/security/api-tokens
|
|
18
|
+
JIRA_API_TOKEN=ATATT3xFfGF0q1hqu1FdEJJHaLHdP6aHe2YwVWg2gu4TEBtP0ZWfFh46z7ZQDg0VHIE2PuVLw2MB7tgR-47cjuyVTXGS_UO1-VoKbODopCGCAR_BOWdcdWc5yN4QnIsU_V7LsWqj8hRNn9wEwkxthy3Um5brD26ehgEUeY9cvpjboiIqLcvEA6k=787A1BCE
|
|
19
|
+
#
|
|
20
|
+
# ----------------------
|
|
21
|
+
# Jira write test configuration (required for write suite)
|
|
22
|
+
# ----------------------
|
|
23
|
+
# These tests create/update/comment/assign (and optionally transition/delete) issues.
|
|
24
|
+
# Use a dedicated test project.
|
|
25
|
+
|
|
26
|
+
# JIRA_TEST_PROJECT_KEY:
|
|
27
|
+
# - The project key visible in the Jira UI, e.g. "PROJ".
|
|
28
|
+
# - You can also get it from the URL when viewing a project (the key is usually shown in the URL and in the project header).
|
|
29
|
+
JIRA_TEST_PROJECT_KEY=INTTEST
|
|
30
|
+
#
|
|
31
|
+
# Optional: transition testing
|
|
32
|
+
# JIRA_TEST_TRANSITION_NAME:
|
|
33
|
+
# - A transition name that exists in your project's workflow (case-insensitive).
|
|
34
|
+
# - To find a valid transition name in the UI:
|
|
35
|
+
# 1) Open any issue in the test project
|
|
36
|
+
# 2) Click the status dropdown (e.g. \"To Do\" / \"In Progress\" / \"Done\")
|
|
37
|
+
# 3) Use one of the visible transition actions as the name (e.g. \"Start Progress\", \"Done\")
|
|
38
|
+
JIRA_TEST_TRANSITION_NAME="In Progress"
|
|
39
|
+
#
|
|
40
|
+
# Optional: sprint roundtrip testing (create_sprint -> move_issues_to_sprint -> delete_sprint)
|
|
41
|
+
# JIRA_TEST_BOARD_ID:
|
|
42
|
+
# - Numeric board ID (a Scrum board recommended).
|
|
43
|
+
# - To find it in the UI:
|
|
44
|
+
# 1) Open the board in Jira (Board view)
|
|
45
|
+
# 2) The URL usually contains `/boards/<id>` — that number is the boardId
|
|
46
|
+
JIRA_TEST_BOARD_ID=37
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Jira (Jira Cloud) live integration tests
|
|
2
|
+
#
|
|
3
|
+
# Credentials mode uses an Atlassian API token (easy for local/CI).
|
|
4
|
+
#
|
|
5
|
+
# ----------------------
|
|
6
|
+
# Variant: api_token
|
|
7
|
+
# ----------------------
|
|
8
|
+
# JIRA_DOMAIN:
|
|
9
|
+
# - If your site URL is https://YOUR_DOMAIN.atlassian.net, then YOUR_DOMAIN is the value.
|
|
10
|
+
JIRA_DOMAIN=
|
|
11
|
+
#
|
|
12
|
+
# JIRA_EMAIL:
|
|
13
|
+
# - The email address of the Atlassian account that owns the API token.
|
|
14
|
+
JIRA_EMAIL=
|
|
15
|
+
#
|
|
16
|
+
# JIRA_API_TOKEN:
|
|
17
|
+
# - Create an Atlassian API token at: https://id.atlassian.com/manage-profile/security/api-tokens
|
|
18
|
+
JIRA_API_TOKEN=
|
|
19
|
+
#
|
|
20
|
+
# ----------------------
|
|
21
|
+
# Write test configuration
|
|
22
|
+
# ----------------------
|
|
23
|
+
# These tests create/update/comment/assign (and optionally transition/delete) issues.
|
|
24
|
+
# Use a dedicated test project.
|
|
25
|
+
#
|
|
26
|
+
# JIRA_TEST_PROJECT_KEY:
|
|
27
|
+
# - The project key visible in the Jira UI, e.g. "PROJ".
|
|
28
|
+
JIRA_TEST_PROJECT_KEY=
|
|
29
|
+
#
|
|
30
|
+
# Optional: transition testing
|
|
31
|
+
# JIRA_TEST_TRANSITION_NAME:
|
|
32
|
+
# - A transition name that exists in your project's workflow (case-insensitive).
|
|
33
|
+
# - To find one: open any issue → click the status dropdown → use a visible action name
|
|
34
|
+
# (e.g. "Start Progress", "Done")
|
|
35
|
+
JIRA_TEST_TRANSITION_NAME=
|
|
36
|
+
#
|
|
37
|
+
# Optional: sprint roundtrip testing (create_sprint → move_issues_to_sprint → delete_sprint)
|
|
38
|
+
# JIRA_TEST_BOARD_ID:
|
|
39
|
+
# - Numeric board ID (a Scrum board recommended).
|
|
40
|
+
# - To find it: open the board in Jira → the URL contains /boards/<id>
|
|
41
|
+
JIRA_TEST_BOARD_ID=
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Jira
|
|
2
|
+
|
|
3
|
+
**23 tools** across 2 toolsets
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Credential variants
|
|
8
|
+
|
|
9
|
+
| Variant | Label |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `api_token` | API Token (Email + Token) _(default)_ |
|
|
12
|
+
|
|
13
|
+
## Toolsets
|
|
14
|
+
|
|
15
|
+
| Toolset | Description |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `issues` | Search, read, create, and manage Jira issues |
|
|
18
|
+
| `boards` | Work with Jira Software boards, sprints, and backlogs |
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
|
|
22
|
+
| Tool | Scope | Toolset | Description |
|
|
23
|
+
|---|---|---|---|
|
|
24
|
+
| `search_issues` | read | `issues` | Search for issues using JQL. Returns a compact list of issues with key fields. Uses the m… |
|
|
25
|
+
| `get_issue` | read | `issues` | Get details for a Jira issue by key (e.g. PROJ-123). Converts the issue description from … |
|
|
26
|
+
| `get_issue_comments` | read | `issues` | List comments on an issue. Converts each comment body from Jira ADF into Markdown. |
|
|
27
|
+
| `list_projects` | read | `issues` | List accessible Jira projects (key, name, type). Use this before creating issues to disco… |
|
|
28
|
+
| `get_project` | read | `issues` | Get a project by key or ID. Includes issue types when expandIssueTypes=true, which is use… |
|
|
29
|
+
| `get_transitions` | read | `issues` | List available workflow transitions for an issue. Use this to discover valid transition n… |
|
|
30
|
+
| `get_myself` | read | `issues` | Get the authenticated Jira user profile for the current credentials. |
|
|
31
|
+
| `search_users` | read | `issues` | Search for users and return accountIds for assignment. Use this to find assigneeAccountId… |
|
|
32
|
+
| `create_issue` | write | `issues` | Create a new Jira issue. Provide descriptionText as Markdown; the handler converts it to … |
|
|
33
|
+
| `update_issue` | write | `issues` | Update a Jira issue. You can use simple fields like summary/descriptionText/labels/priori… |
|
|
34
|
+
| `transition_issue` | write | `issues` | Transition an issue to a new workflow status. Provide transitionId or transitionName. If … |
|
|
35
|
+
| `add_comment` | write | `issues` | Add a comment to an issue. Provide bodyText as Markdown; the handler converts it to Jira … |
|
|
36
|
+
| `assign_issue` | write | `issues` | Assign an issue to a user (by accountId) or unassign it (accountId=null). Use search_user… |
|
|
37
|
+
| `delete_issue` | write | `issues` | Delete an issue. This is irreversible. Use with care. |
|
|
38
|
+
| `list_boards` | read | `boards` | List Jira Software boards. Filter by projectKeyOrId and board type (scrum/kanban). |
|
|
39
|
+
| `get_board` | read | `boards` | Get details for a Jira Software board by boardId. |
|
|
40
|
+
| `list_sprints` | read | `boards` | List sprints for a board. Optionally filter by sprint state (future/active/closed). |
|
|
41
|
+
| `get_sprint` | read | `boards` | Get sprint details by sprintId (name, state, start/end dates, goal). |
|
|
42
|
+
| `get_sprint_issues` | read | `boards` | List issues in a sprint. Useful for sprint status reports and review preparation. |
|
|
43
|
+
| `get_backlog_issues` | read | `boards` | List issues in the backlog for a board. |
|
|
44
|
+
| `move_issues_to_sprint` | write | `boards` | Move one or more issues into a sprint (agile API). |
|
|
45
|
+
| `create_sprint` | write | `boards` | Create a sprint in a board (agile API). Use this for sprint-planning workflows and for in… |
|
|
46
|
+
| `update_sprint` | write | `boards` | Update a sprint (agile API). Use to rename, set/change goal, start a sprint (state: activ… |
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { createCredentialStore, createIntegrationNode, createProxy, createToolbox, hasEnv } from '../../__tests__/liveHarness.js'
|
|
3
|
+
|
|
4
|
+
// LIVE Jira read tests using credentials
|
|
5
|
+
//
|
|
6
|
+
// Variant: api_token
|
|
7
|
+
// - JIRA_DOMAIN
|
|
8
|
+
// - JIRA_EMAIL
|
|
9
|
+
// - JIRA_API_TOKEN
|
|
10
|
+
//
|
|
11
|
+
// Optional (improves coverage):
|
|
12
|
+
// - JIRA_TEST_PROJECT_KEY
|
|
13
|
+
|
|
14
|
+
const env = process.env as Record<string, string | undefined>
|
|
15
|
+
|
|
16
|
+
const suiteOrSkip = hasEnv('JIRA_DOMAIN', 'JIRA_EMAIL', 'JIRA_API_TOKEN') ? describe : describe.skip
|
|
17
|
+
|
|
18
|
+
suiteOrSkip('jira read handlers (live)', () => {
|
|
19
|
+
describe('variant: api_token', () => {
|
|
20
|
+
const ctx: {
|
|
21
|
+
projectKey?: string
|
|
22
|
+
issueKey?: string
|
|
23
|
+
boardId?: number
|
|
24
|
+
sprintId?: number
|
|
25
|
+
} = {}
|
|
26
|
+
|
|
27
|
+
let jira: ReturnType<typeof createToolbox>
|
|
28
|
+
|
|
29
|
+
beforeAll(async () => {
|
|
30
|
+
const credentialStore = createCredentialStore(async () => ({
|
|
31
|
+
domain: env.JIRA_DOMAIN!,
|
|
32
|
+
email: env.JIRA_EMAIL!,
|
|
33
|
+
apiToken: env.JIRA_API_TOKEN!,
|
|
34
|
+
}))
|
|
35
|
+
const proxy = createProxy(credentialStore)
|
|
36
|
+
jira = createToolbox('jira', proxy, createIntegrationNode('jira', { label: 'Jira', credentialId: 'jira-creds', credentialVariant: 'api_token' }), 'api_token')
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const list_projects = jira.read('list_projects')
|
|
40
|
+
const projectsResp = await list_projects({ maxResults: 5 })
|
|
41
|
+
const first = projectsResp?.projects?.[0]
|
|
42
|
+
ctx.projectKey = env.JIRA_TEST_PROJECT_KEY || first?.key
|
|
43
|
+
}
|
|
44
|
+
catch {}
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
if (ctx.projectKey) {
|
|
48
|
+
const search_issues = jira.read('search_issues')
|
|
49
|
+
const issuesResp = await search_issues({
|
|
50
|
+
jql: `project = ${ctx.projectKey} ORDER BY updated DESC`,
|
|
51
|
+
fields: ['summary', 'updated'],
|
|
52
|
+
maxResults: 1,
|
|
53
|
+
})
|
|
54
|
+
const firstIssue = issuesResp?.issues?.[0]
|
|
55
|
+
ctx.issueKey = firstIssue?.key
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch {}
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
const list_boards = jira.read('list_boards')
|
|
62
|
+
const boardsResp = await list_boards({ maxResults: 5 })
|
|
63
|
+
const firstBoard = boardsResp?.boards?.[0]
|
|
64
|
+
ctx.boardId = typeof firstBoard?.id === 'number' ? firstBoard.id : undefined
|
|
65
|
+
}
|
|
66
|
+
catch {}
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
if (ctx.boardId) {
|
|
70
|
+
const list_sprints = jira.read('list_sprints')
|
|
71
|
+
const sprintsResp = await list_sprints({ boardId: ctx.boardId, maxResults: 5 })
|
|
72
|
+
const firstSprint = sprintsResp?.sprints?.[0]
|
|
73
|
+
ctx.sprintId = typeof firstSprint?.id === 'number' ? firstSprint.id : undefined
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch {}
|
|
77
|
+
}, 60000)
|
|
78
|
+
|
|
79
|
+
it('get_myself returns authenticated user', async () => {
|
|
80
|
+
const get_myself = jira.read('get_myself')
|
|
81
|
+
const me = await get_myself({})
|
|
82
|
+
expect(me?.accountId).toBeTruthy()
|
|
83
|
+
}, 30000)
|
|
84
|
+
|
|
85
|
+
it('list_projects returns projects', async () => {
|
|
86
|
+
const list_projects = jira.read('list_projects')
|
|
87
|
+
const res = await list_projects({ maxResults: 5 })
|
|
88
|
+
expect(res?.projects).toBeTruthy()
|
|
89
|
+
expect(Array.isArray(res.projects)).toBe(true)
|
|
90
|
+
}, 30000)
|
|
91
|
+
|
|
92
|
+
it('get_project returns issueTypes when available', async () => {
|
|
93
|
+
if (!ctx.projectKey)
|
|
94
|
+
return expect(true).toBe(true)
|
|
95
|
+
const get_project = jira.read('get_project')
|
|
96
|
+
const project = await get_project({ projectIdOrKey: ctx.projectKey, expandIssueTypes: true })
|
|
97
|
+
expect(project?.key?.toUpperCase?.()).toBe(ctx.projectKey.toUpperCase())
|
|
98
|
+
expect(Array.isArray(project?.issueTypes)).toBe(true)
|
|
99
|
+
}, 30000)
|
|
100
|
+
|
|
101
|
+
it('search_issues returns issue list (best effort)', async () => {
|
|
102
|
+
if (!ctx.projectKey)
|
|
103
|
+
return expect(true).toBe(true)
|
|
104
|
+
const search_issues = jira.read('search_issues')
|
|
105
|
+
const res = await search_issues({ jql: `project = ${ctx.projectKey} ORDER BY updated DESC`, maxResults: 5 })
|
|
106
|
+
expect(res?.issues).toBeTruthy()
|
|
107
|
+
expect(Array.isArray(res.issues)).toBe(true)
|
|
108
|
+
}, 30000)
|
|
109
|
+
|
|
110
|
+
it('get_issue returns issue details (if any issue key discovered)', async () => {
|
|
111
|
+
if (!ctx.issueKey)
|
|
112
|
+
return expect(true).toBe(true)
|
|
113
|
+
const get_issue = jira.read('get_issue')
|
|
114
|
+
const issue = await get_issue({ issueIdOrKey: ctx.issueKey })
|
|
115
|
+
expect(issue?.key).toBe(ctx.issueKey)
|
|
116
|
+
}, 30000)
|
|
117
|
+
|
|
118
|
+
it('get_issue_comments returns comments (if any issue key discovered)', async () => {
|
|
119
|
+
if (!ctx.issueKey)
|
|
120
|
+
return expect(true).toBe(true)
|
|
121
|
+
const get_issue_comments = jira.read('get_issue_comments')
|
|
122
|
+
const comments = await get_issue_comments({ issueIdOrKey: ctx.issueKey, maxResults: 5 })
|
|
123
|
+
expect(comments?.comments).toBeTruthy()
|
|
124
|
+
expect(Array.isArray(comments.comments)).toBe(true)
|
|
125
|
+
}, 30000)
|
|
126
|
+
|
|
127
|
+
it('get_transitions returns transitions (if any issue key discovered)', async () => {
|
|
128
|
+
if (!ctx.issueKey)
|
|
129
|
+
return expect(true).toBe(true)
|
|
130
|
+
const get_transitions = jira.read('get_transitions')
|
|
131
|
+
const res = await get_transitions({ issueIdOrKey: ctx.issueKey })
|
|
132
|
+
expect(Array.isArray(res?.transitions)).toBe(true)
|
|
133
|
+
}, 30000)
|
|
134
|
+
|
|
135
|
+
it('search_users returns users (best effort)', async () => {
|
|
136
|
+
const get_myself = jira.read('get_myself')
|
|
137
|
+
const me = await get_myself({})
|
|
138
|
+
const query = me?.displayName || 'a'
|
|
139
|
+
const search_users = jira.read('search_users')
|
|
140
|
+
const res = await search_users({ query, maxResults: 5 })
|
|
141
|
+
expect(Array.isArray(res?.users)).toBe(true)
|
|
142
|
+
}, 30000)
|
|
143
|
+
|
|
144
|
+
it('boards: list_boards works (best effort)', async () => {
|
|
145
|
+
const list_boards = jira.read('list_boards')
|
|
146
|
+
const res = await list_boards({ maxResults: 5 })
|
|
147
|
+
expect(res?.boards).toBeTruthy()
|
|
148
|
+
expect(Array.isArray(res.boards)).toBe(true)
|
|
149
|
+
}, 30000)
|
|
150
|
+
|
|
151
|
+
it('boards: get_board works when boardId is available', async () => {
|
|
152
|
+
if (!ctx.boardId)
|
|
153
|
+
return expect(true).toBe(true)
|
|
154
|
+
const get_board = jira.read('get_board')
|
|
155
|
+
const board = await get_board({ boardId: ctx.boardId })
|
|
156
|
+
expect(board?.id).toBe(ctx.boardId)
|
|
157
|
+
}, 30000)
|
|
158
|
+
|
|
159
|
+
it('boards: list_sprints works when boardId is available', async () => {
|
|
160
|
+
if (!ctx.boardId)
|
|
161
|
+
return expect(true).toBe(true)
|
|
162
|
+
const list_sprints = jira.read('list_sprints')
|
|
163
|
+
const res = await list_sprints({ boardId: ctx.boardId, maxResults: 5 })
|
|
164
|
+
expect(res?.sprints).toBeTruthy()
|
|
165
|
+
expect(Array.isArray(res.sprints)).toBe(true)
|
|
166
|
+
}, 30000)
|
|
167
|
+
|
|
168
|
+
it('boards: get_sprint works when sprintId is available', async () => {
|
|
169
|
+
if (!ctx.sprintId)
|
|
170
|
+
return expect(true).toBe(true)
|
|
171
|
+
const get_sprint = jira.read('get_sprint')
|
|
172
|
+
const sprint = await get_sprint({ sprintId: ctx.sprintId })
|
|
173
|
+
expect(sprint?.id).toBe(ctx.sprintId)
|
|
174
|
+
}, 30000)
|
|
175
|
+
|
|
176
|
+
it('boards: get_sprint_issues works when sprintId is available', async () => {
|
|
177
|
+
if (!ctx.sprintId)
|
|
178
|
+
return expect(true).toBe(true)
|
|
179
|
+
const get_sprint_issues = jira.read('get_sprint_issues')
|
|
180
|
+
const res = await get_sprint_issues({ sprintId: ctx.sprintId, maxResults: 5 })
|
|
181
|
+
expect(res).toBeTruthy()
|
|
182
|
+
}, 30000)
|
|
183
|
+
|
|
184
|
+
it('boards: get_backlog_issues works when boardId is available', async () => {
|
|
185
|
+
if (!ctx.boardId)
|
|
186
|
+
return expect(true).toBe(true)
|
|
187
|
+
const get_backlog_issues = jira.read('get_backlog_issues')
|
|
188
|
+
const res = await get_backlog_issues({ boardId: ctx.boardId, maxResults: 5 })
|
|
189
|
+
expect(res).toBeTruthy()
|
|
190
|
+
}, 30000)
|
|
191
|
+
})
|
|
192
|
+
})
|
|
193
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { getMissingToolUsages } from '../../__tests__/usageParity.js'
|
|
3
|
+
|
|
4
|
+
describe('jira static usage parity', () => {
|
|
5
|
+
it('every api_token tool is referenced in tests', () => {
|
|
6
|
+
const missing = getMissingToolUsages({
|
|
7
|
+
integrationName: 'jira',
|
|
8
|
+
importMetaUrl: import.meta.url,
|
|
9
|
+
credentialVariant: 'api_token',
|
|
10
|
+
})
|
|
11
|
+
expect(missing, `Missing handler usages in tests: ${missing.join(', ')}`).toEqual([])
|
|
12
|
+
})
|
|
13
|
+
})
|
|
14
|
+
|