@aqajooon/mcp-server-azure-devops 0.0.0-stage → 0.1.55
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/LICENSE +21 -0
- package/README.md +318 -2
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +501 -0
- package/dist/clients/azure-devops.js.map +1 -0
- package/dist/features/environments/feature.d.ts +24 -0
- package/dist/features/environments/feature.js +48 -0
- package/dist/features/environments/feature.js.map +1 -0
- package/dist/features/environments/index.d.ts +10 -0
- package/dist/features/environments/index.js +42 -0
- package/dist/features/environments/index.js.map +1 -0
- package/dist/features/environments/schema.d.ts +7 -0
- package/dist/features/environments/schema.js +28 -0
- package/dist/features/environments/schema.js.map +1 -0
- package/dist/features/libraries/feature.d.ts +27 -0
- package/dist/features/libraries/feature.js +47 -0
- package/dist/features/libraries/feature.js.map +1 -0
- package/dist/features/libraries/index.d.ts +10 -0
- package/dist/features/libraries/index.js +42 -0
- package/dist/features/libraries/index.js.map +1 -0
- package/dist/features/libraries/schema.d.ts +7 -0
- package/dist/features/libraries/schema.js +27 -0
- package/dist/features/libraries/schema.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +38 -0
- package/dist/features/organizations/__test__/test-helpers.js.map +1 -0
- package/dist/features/organizations/index.d.ts +13 -0
- package/dist/features/organizations/index.js +63 -0
- package/dist/features/organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.d.ts +13 -0
- package/dist/features/organizations/list-organizations/feature.js +101 -0
- package/dist/features/organizations/list-organizations/feature.js.map +1 -0
- package/dist/features/organizations/list-organizations/index.d.ts +2 -0
- package/dist/features/organizations/list-organizations/index.js +19 -0
- package/dist/features/organizations/list-organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/schema.d.ts +2 -0
- package/dist/features/organizations/list-organizations/schema.js +6 -0
- package/dist/features/organizations/list-organizations/schema.js.map +1 -0
- package/dist/features/organizations/schemas.d.ts +6 -0
- package/dist/features/organizations/schemas.js +10 -0
- package/dist/features/organizations/schemas.js.map +1 -0
- package/dist/features/organizations/tool-definitions.d.ts +5 -0
- package/dist/features/organizations/tool-definitions.js +16 -0
- package/dist/features/organizations/tool-definitions.js.map +1 -0
- package/dist/features/organizations/types.d.ts +21 -0
- package/dist/features/organizations/types.js +8 -0
- package/dist/features/organizations/types.js.map +1 -0
- package/dist/features/pipelines/artifacts.d.ts +11 -0
- package/dist/features/pipelines/artifacts.js +288 -0
- package/dist/features/pipelines/artifacts.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.d.ts +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js +222 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.d.ts +2 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js +19 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.d.ts +7 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js +23 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/get-pipeline/feature.js +46 -0
- package/dist/features/pipelines/get-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline/index.js +19 -0
- package/dist/features/pipelines/get-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/schema.d.ts +9 -0
- package/dist/features/pipelines/get-pipeline/schema.js +29 -0
- package/dist/features/pipelines/get-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js +57 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-log/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-log/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/schema.d.ts +13 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js +40 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js +76 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.d.ts +26 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js +105 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.d.ts +47 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js +185 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.d.ts +7 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js +21 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.d.ts +41 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js +450 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js.map +1 -0
- package/dist/features/pipelines/helpers.d.ts +3 -0
- package/dist/features/pipelines/helpers.js +29 -0
- package/dist/features/pipelines/helpers.js.map +1 -0
- package/dist/features/pipelines/index.d.ts +22 -0
- package/dist/features/pipelines/index.js +216 -0
- package/dist/features/pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.d.ts +3 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js +98 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js +19 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.d.ts +28 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js +50 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.d.ts +10 -0
- package/dist/features/pipelines/list-pipelines/feature.js +42 -0
- package/dist/features/pipelines/list-pipelines/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipelines/index.js +19 -0
- package/dist/features/pipelines/list-pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/schema.d.ts +9 -0
- package/dist/features/pipelines/list-pipelines/schema.js +23 -0
- package/dist/features/pipelines/list-pipelines/schema.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.d.ts +3 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js +95 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/index.d.ts +2 -0
- package/dist/features/pipelines/pipeline-timeline/index.js +19 -0
- package/dist/features/pipelines/pipeline-timeline/index.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/schema.d.ts +31 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js +51 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js.map +1 -0
- package/dist/features/pipelines/tool-definitions.d.ts +5 -0
- package/dist/features/pipelines/tool-definitions.js +87 -0
- package/dist/features/pipelines/tool-definitions.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js +65 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/trigger-pipeline/index.js +8 -0
- package/dist/features/pipelines/trigger-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/schema.d.ts +15 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js +45 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/types.d.ts +122 -0
- package/dist/features/pipelines/types.js +3 -0
- package/dist/features/pipelines/types.js.map +1 -0
- package/dist/features/projects/__test__/test-helpers.d.ts +13 -0
- package/dist/features/projects/__test__/test-helpers.js +35 -0
- package/dist/features/projects/__test__/test-helpers.js.map +1 -0
- package/dist/features/projects/get-project/feature.d.ts +11 -0
- package/dist/features/projects/get-project/feature.js +29 -0
- package/dist/features/projects/get-project/feature.js.map +1 -0
- package/dist/features/projects/get-project/index.d.ts +2 -0
- package/dist/features/projects/get-project/index.js +19 -0
- package/dist/features/projects/get-project/index.js.map +1 -0
- package/dist/features/projects/get-project/schema.d.ts +2 -0
- package/dist/features/projects/get-project/schema.js +6 -0
- package/dist/features/projects/get-project/schema.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.d.ts +78 -0
- package/dist/features/projects/get-project-details/feature.js +185 -0
- package/dist/features/projects/get-project-details/feature.js.map +1 -0
- package/dist/features/projects/get-project-details/index.d.ts +2 -0
- package/dist/features/projects/get-project-details/index.js +8 -0
- package/dist/features/projects/get-project-details/index.js.map +1 -0
- package/dist/features/projects/get-project-details/schema.d.ts +2 -0
- package/dist/features/projects/get-project-details/schema.js +6 -0
- package/dist/features/projects/get-project-details/schema.js.map +1 -0
- package/dist/features/projects/index.d.ts +15 -0
- package/dist/features/projects/index.js +80 -0
- package/dist/features/projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/feature.d.ts +10 -0
- package/dist/features/projects/list-projects/feature.js +25 -0
- package/dist/features/projects/list-projects/feature.js.map +1 -0
- package/dist/features/projects/list-projects/index.d.ts +2 -0
- package/dist/features/projects/list-projects/index.js +19 -0
- package/dist/features/projects/list-projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/schema.d.ts +2 -0
- package/dist/features/projects/list-projects/schema.js +6 -0
- package/dist/features/projects/list-projects/schema.js.map +1 -0
- package/dist/features/projects/schemas.d.ts +30 -0
- package/dist/features/projects/schemas.js +76 -0
- package/dist/features/projects/schemas.js.map +1 -0
- package/dist/features/projects/tool-definitions.d.ts +5 -0
- package/dist/features/projects/tool-definitions.js +26 -0
- package/dist/features/projects/tool-definitions.js.map +1 -0
- package/dist/features/projects/types.d.ts +11 -0
- package/dist/features/projects/types.js +3 -0
- package/dist/features/projects/types.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.d.ts +13 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js +161 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js +18 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.d.ts +12 -0
- package/dist/features/pull-requests/create-pull-request/feature.js +99 -0
- package/dist/features/pull-requests/create-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/index.js +19 -0
- package/dist/features/pull-requests/create-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/schema.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/create-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.d.ts +6 -0
- package/dist/features/pull-requests/get-pull-request/feature.js +22 -0
- package/dist/features/pull-requests/get-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/get-pull-request/index.js +19 -0
- package/dist/features/pull-requests/get-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/get-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.d.ts +22 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js +60 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.d.ts +51 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js +259 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.d.ts +13 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js +88 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js.map +1 -0
- package/dist/features/pull-requests/index.d.ts +21 -0
- package/dist/features/pull-requests/index.js +167 -0
- package/dist/features/pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.d.ts +17 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js +81 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/index.d.ts +2 -0
- package/dist/features/pull-requests/list-pull-requests/index.js +19 -0
- package/dist/features/pull-requests/list-pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js +6 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js.map +1 -0
- package/dist/features/pull-requests/schemas.d.ts +157 -0
- package/dist/features/pull-requests/schemas.js +337 -0
- package/dist/features/pull-requests/schemas.js.map +1 -0
- package/dist/features/pull-requests/tool-definitions.d.ts +5 -0
- package/dist/features/pull-requests/tool-definitions.js +60 -0
- package/dist/features/pull-requests/tool-definitions.js.map +1 -0
- package/dist/features/pull-requests/types.d.ts +118 -0
- package/dist/features/pull-requests/types.js +3 -0
- package/dist/features/pull-requests/types.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.d.ts +9 -0
- package/dist/features/pull-requests/update-pull-request/feature.js +250 -0
- package/dist/features/pull-requests/update-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.d.ts +14 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js +87 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js.map +1 -0
- package/dist/features/repositories/__test__/test-helpers.d.ts +13 -0
- package/dist/features/repositories/__test__/test-helpers.js +35 -0
- package/dist/features/repositories/__test__/test-helpers.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.d.ts +6 -0
- package/dist/features/repositories/create-branch/feature.js +33 -0
- package/dist/features/repositories/create-branch/feature.js.map +1 -0
- package/dist/features/repositories/create-branch/index.d.ts +1 -0
- package/dist/features/repositories/create-branch/index.js +18 -0
- package/dist/features/repositories/create-branch/index.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.d.ts +6 -0
- package/dist/features/repositories/create-commit/feature.js +122 -0
- package/dist/features/repositories/create-commit/feature.js.map +1 -0
- package/dist/features/repositories/create-commit/index.d.ts +1 -0
- package/dist/features/repositories/create-commit/index.js +18 -0
- package/dist/features/repositories/create-commit/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.d.ts +22 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js +303 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/index.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js +19 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js +6 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.d.ts +23 -0
- package/dist/features/repositories/get-file-content/feature.js +96 -0
- package/dist/features/repositories/get-file-content/feature.js.map +1 -0
- package/dist/features/repositories/get-file-content/index.d.ts +2 -0
- package/dist/features/repositories/get-file-content/index.js +19 -0
- package/dist/features/repositories/get-file-content/index.js.map +1 -0
- package/dist/features/repositories/get-file-content/schema.d.ts +2 -0
- package/dist/features/repositories/get-file-content/schema.js +6 -0
- package/dist/features/repositories/get-file-content/schema.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.d.ts +12 -0
- package/dist/features/repositories/get-repository/feature.js +30 -0
- package/dist/features/repositories/get-repository/feature.js.map +1 -0
- package/dist/features/repositories/get-repository/index.d.ts +2 -0
- package/dist/features/repositories/get-repository/index.js +19 -0
- package/dist/features/repositories/get-repository/index.js.map +1 -0
- package/dist/features/repositories/get-repository/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository/schema.js +6 -0
- package/dist/features/repositories/get-repository/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.d.ts +11 -0
- package/dist/features/repositories/get-repository-details/feature.js +67 -0
- package/dist/features/repositories/get-repository-details/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-details/index.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/index.js +19 -0
- package/dist/features/repositories/get-repository-details/index.js.map +1 -0
- package/dist/features/repositories/get-repository-details/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/schema.js +6 -0
- package/dist/features/repositories/get-repository-details/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.d.ts +6 -0
- package/dist/features/repositories/get-repository-tree/feature.js +65 -0
- package/dist/features/repositories/get-repository-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/index.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/index.js +18 -0
- package/dist/features/repositories/get-repository-tree/index.js.map +1 -0
- package/dist/features/repositories/index.d.ts +23 -0
- package/dist/features/repositories/index.js +207 -0
- package/dist/features/repositories/index.js.map +1 -0
- package/dist/features/repositories/list-branches/feature.d.ts +14 -0
- package/dist/features/repositories/list-branches/feature.js +56 -0
- package/dist/features/repositories/list-branches/feature.js.map +1 -0
- package/dist/features/repositories/list-branches/index.d.ts +2 -0
- package/dist/features/repositories/list-branches/index.js +19 -0
- package/dist/features/repositories/list-branches/index.js.map +1 -0
- package/dist/features/repositories/list-branches/schema.d.ts +8 -0
- package/dist/features/repositories/list-branches/schema.js +28 -0
- package/dist/features/repositories/list-branches/schema.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.d.ts +6 -0
- package/dist/features/repositories/list-commits/feature.js +75 -0
- package/dist/features/repositories/list-commits/feature.js.map +1 -0
- package/dist/features/repositories/list-commits/index.d.ts +1 -0
- package/dist/features/repositories/list-commits/index.js +18 -0
- package/dist/features/repositories/list-commits/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.d.ts +10 -0
- package/dist/features/repositories/list-repositories/feature.js +25 -0
- package/dist/features/repositories/list-repositories/feature.js.map +1 -0
- package/dist/features/repositories/list-repositories/index.d.ts +2 -0
- package/dist/features/repositories/list-repositories/index.js +19 -0
- package/dist/features/repositories/list-repositories/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/schema.d.ts +2 -0
- package/dist/features/repositories/list-repositories/schema.js +6 -0
- package/dist/features/repositories/list-repositories/schema.js.map +1 -0
- package/dist/features/repositories/list-tags/feature.d.ts +13 -0
- package/dist/features/repositories/list-tags/feature.js +52 -0
- package/dist/features/repositories/list-tags/feature.js.map +1 -0
- package/dist/features/repositories/list-tags/index.d.ts +2 -0
- package/dist/features/repositories/list-tags/index.js +19 -0
- package/dist/features/repositories/list-tags/index.js.map +1 -0
- package/dist/features/repositories/list-tags/schema.d.ts +8 -0
- package/dist/features/repositories/list-tags/schema.js +28 -0
- package/dist/features/repositories/list-tags/schema.js.map +1 -0
- package/dist/features/repositories/schemas.d.ts +101 -0
- package/dist/features/repositories/schemas.js +306 -0
- package/dist/features/repositories/schemas.js.map +1 -0
- package/dist/features/repositories/tool-definitions.d.ts +5 -0
- package/dist/features/repositories/tool-definitions.js +106 -0
- package/dist/features/repositories/tool-definitions.js.map +1 -0
- package/dist/features/repositories/types.d.ts +167 -0
- package/dist/features/repositories/types.js +3 -0
- package/dist/features/repositories/types.js.map +1 -0
- package/dist/features/search/index.d.ts +15 -0
- package/dist/features/search/index.js +65 -0
- package/dist/features/search/index.js.map +1 -0
- package/dist/features/search/schemas.d.ts +58 -0
- package/dist/features/search/schemas.js +159 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/search-code/feature.d.ts +10 -0
- package/dist/features/search/search-code/feature.js +178 -0
- package/dist/features/search/search-code/feature.js.map +1 -0
- package/dist/features/search/search-code/index.d.ts +2 -0
- package/dist/features/search/search-code/index.js +19 -0
- package/dist/features/search/search-code/index.js.map +1 -0
- package/dist/features/search/search-wiki/feature.d.ts +10 -0
- package/dist/features/search/search-wiki/feature.js +133 -0
- package/dist/features/search/search-wiki/feature.js.map +1 -0
- package/dist/features/search/search-wiki/index.d.ts +1 -0
- package/dist/features/search/search-wiki/index.js +18 -0
- package/dist/features/search/search-wiki/index.js.map +1 -0
- package/dist/features/search/search-work-items/feature.d.ts +10 -0
- package/dist/features/search/search-work-items/feature.js +119 -0
- package/dist/features/search/search-work-items/feature.js.map +1 -0
- package/dist/features/search/search-work-items/index.d.ts +1 -0
- package/dist/features/search/search-work-items/index.js +18 -0
- package/dist/features/search/search-work-items/index.js.map +1 -0
- package/dist/features/search/tool-definitions.d.ts +5 -0
- package/dist/features/search/tool-definitions.js +26 -0
- package/dist/features/search/tool-definitions.js.map +1 -0
- package/dist/features/search/types.d.ts +537 -0
- package/dist/features/search/types.js +3 -0
- package/dist/features/search/types.js.map +1 -0
- package/dist/features/service-connections/feature.d.ts +21 -0
- package/dist/features/service-connections/feature.js +51 -0
- package/dist/features/service-connections/feature.js.map +1 -0
- package/dist/features/service-connections/index.d.ts +10 -0
- package/dist/features/service-connections/index.js +42 -0
- package/dist/features/service-connections/index.js.map +1 -0
- package/dist/features/service-connections/schema.d.ts +8 -0
- package/dist/features/service-connections/schema.js +28 -0
- package/dist/features/service-connections/schema.js.map +1 -0
- package/dist/features/users/get-me/feature.d.ts +12 -0
- package/dist/features/users/get-me/feature.js +96 -0
- package/dist/features/users/get-me/feature.js.map +1 -0
- package/dist/features/users/get-me/index.d.ts +2 -0
- package/dist/features/users/get-me/index.js +19 -0
- package/dist/features/users/get-me/index.js.map +1 -0
- package/dist/features/users/get-me/schema.d.ts +2 -0
- package/dist/features/users/get-me/schema.js +6 -0
- package/dist/features/users/get-me/schema.js.map +1 -0
- package/dist/features/users/index.d.ts +17 -0
- package/dist/features/users/index.js +52 -0
- package/dist/features/users/index.js.map +1 -0
- package/dist/features/users/schemas.d.ts +5 -0
- package/dist/features/users/schemas.js +9 -0
- package/dist/features/users/schemas.js.map +1 -0
- package/dist/features/users/tool-definitions.d.ts +5 -0
- package/dist/features/users/tool-definitions.js +16 -0
- package/dist/features/users/tool-definitions.js.map +1 -0
- package/dist/features/users/types.d.ts +17 -0
- package/dist/features/users/types.js +3 -0
- package/dist/features/users/types.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.d.ts +49 -0
- package/dist/features/wikis/create-wiki/feature.js +56 -0
- package/dist/features/wikis/create-wiki/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki/index.js +9 -0
- package/dist/features/wikis/create-wiki/index.js.map +1 -0
- package/dist/features/wikis/create-wiki/schema.d.ts +25 -0
- package/dist/features/wikis/create-wiki/schema.js +60 -0
- package/dist/features/wikis/create-wiki/schema.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.d.ts +18 -0
- package/dist/features/wikis/create-wiki-page/feature.js +95 -0
- package/dist/features/wikis/create-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki-page/index.js +8 -0
- package/dist/features/wikis/create-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/create-wiki-page/schema.js +36 -0
- package/dist/features/wikis/create-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.d.ts +33 -0
- package/dist/features/wikis/get-wiki-page/feature.js +68 -0
- package/dist/features/wikis/get-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/get-wiki-page/index.js +8 -0
- package/dist/features/wikis/get-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/schema.d.ts +10 -0
- package/dist/features/wikis/get-wiki-page/schema.js +23 -0
- package/dist/features/wikis/get-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.d.ts +25 -0
- package/dist/features/wikis/get-wikis/feature.js +37 -0
- package/dist/features/wikis/get-wikis/feature.js.map +1 -0
- package/dist/features/wikis/get-wikis/index.d.ts +2 -0
- package/dist/features/wikis/get-wikis/index.js +8 -0
- package/dist/features/wikis/get-wikis/index.js.map +1 -0
- package/dist/features/wikis/get-wikis/schema.d.ts +8 -0
- package/dist/features/wikis/get-wikis/schema.js +21 -0
- package/dist/features/wikis/get-wikis/schema.js.map +1 -0
- package/dist/features/wikis/index.d.ts +16 -0
- package/dist/features/wikis/index.js +141 -0
- package/dist/features/wikis/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.d.ts +20 -0
- package/dist/features/wikis/list-wiki-pages/feature.js +79 -0
- package/dist/features/wikis/list-wiki-pages/feature.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/index.d.ts +2 -0
- package/dist/features/wikis/list-wiki-pages/index.js +8 -0
- package/dist/features/wikis/list-wiki-pages/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/schema.d.ts +10 -0
- package/dist/features/wikis/list-wiki-pages/schema.js +22 -0
- package/dist/features/wikis/list-wiki-pages/schema.js.map +1 -0
- package/dist/features/wikis/tool-definitions.d.ts +5 -0
- package/dist/features/wikis/tool-definitions.js +46 -0
- package/dist/features/wikis/tool-definitions.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/feature.js +63 -0
- package/dist/features/wikis/update-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/update-wiki-page/index.js +8 -0
- package/dist/features/wikis/update-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/schema.js +32 -0
- package/dist/features/wikis/update-wiki-page/schema.js.map +1 -0
- package/dist/features/work-items/__test__/fixtures.d.ts +9 -0
- package/dist/features/work-items/__test__/fixtures.js +28 -0
- package/dist/features/work-items/__test__/fixtures.js.map +1 -0
- package/dist/features/work-items/__test__/test-helpers.d.ts +13 -0
- package/dist/features/work-items/__test__/test-helpers.js +35 -0
- package/dist/features/work-items/__test__/test-helpers.js.map +1 -0
- package/dist/features/work-items/__test__/test-utils.d.ts +17 -0
- package/dist/features/work-items/__test__/test-utils.js +39 -0
- package/dist/features/work-items/__test__/test-utils.js.map +1 -0
- package/dist/features/work-items/attachment-schemas.d.ts +24 -0
- package/dist/features/work-items/attachment-schemas.js +46 -0
- package/dist/features/work-items/attachment-schemas.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/create-work-item/feature.js +107 -0
- package/dist/features/work-items/create-work-item/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item/index.js +19 -0
- package/dist/features/work-items/create-work-item/index.js.map +1 -0
- package/dist/features/work-items/create-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item/schema.js +6 -0
- package/dist/features/work-items/create-work-item/schema.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/feature.d.ts +11 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js +107 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/create-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js +51 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/get-work-item/feature.js +69 -0
- package/dist/features/work-items/get-work-item/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item/index.js +19 -0
- package/dist/features/work-items/get-work-item/index.js.map +1 -0
- package/dist/features/work-items/get-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item/schema.js +6 -0
- package/dist/features/work-items/get-work-item/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js +108 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/get-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-comments/feature.js +78 -0
- package/dist/features/work-items/get-work-item-comments/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/index.js +19 -0
- package/dist/features/work-items/get-work-item-comments/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/schema.js +6 -0
- package/dist/features/work-items/get-work-item-comments/schema.js.map +1 -0
- package/dist/features/work-items/index.d.ts +21 -0
- package/dist/features/work-items/index.js +181 -0
- package/dist/features/work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.d.ts +10 -0
- package/dist/features/work-items/list-work-items/feature.js +92 -0
- package/dist/features/work-items/list-work-items/feature.js.map +1 -0
- package/dist/features/work-items/list-work-items/index.d.ts +2 -0
- package/dist/features/work-items/list-work-items/index.js +19 -0
- package/dist/features/work-items/list-work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/schema.d.ts +2 -0
- package/dist/features/work-items/list-work-items/schema.js +6 -0
- package/dist/features/work-items/list-work-items/schema.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.d.ts +24 -0
- package/dist/features/work-items/manage-work-item-link/feature.js +91 -0
- package/dist/features/work-items/manage-work-item-link/feature.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/index.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/index.js +8 -0
- package/dist/features/work-items/manage-work-item-link/index.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/schema.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/schema.js +6 -0
- package/dist/features/work-items/manage-work-item-link/schema.js.map +1 -0
- package/dist/features/work-items/schemas.d.ts +99 -0
- package/dist/features/work-items/schemas.js +181 -0
- package/dist/features/work-items/schemas.js.map +1 -0
- package/dist/features/work-items/tool-definitions.d.ts +5 -0
- package/dist/features/work-items/tool-definitions.js +56 -0
- package/dist/features/work-items/tool-definitions.js.map +1 -0
- package/dist/features/work-items/types.d.ts +87 -0
- package/dist/features/work-items/types.js +3 -0
- package/dist/features/work-items/types.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/update-work-item/feature.js +155 -0
- package/dist/features/work-items/update-work-item/feature.js.map +1 -0
- package/dist/features/work-items/update-work-item/index.d.ts +2 -0
- package/dist/features/work-items/update-work-item/index.js +19 -0
- package/dist/features/work-items/update-work-item/index.js.map +1 -0
- package/dist/features/work-items/update-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/update-work-item/schema.js +6 -0
- package/dist/features/work-items/update-work-item/schema.js.map +1 -0
- package/dist/http-server.d.ts +22 -0
- package/dist/http-server.js +137 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +138 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +379 -0
- package/dist/server.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +242 -0
- package/dist/shared/api/client.js.map +1 -0
- package/dist/shared/api/index.d.ts +1 -0
- package/dist/shared/api/index.js +18 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/auth/auth-factory.d.ts +53 -0
- package/dist/shared/auth/auth-factory.js +194 -0
- package/dist/shared/auth/auth-factory.js.map +1 -0
- package/dist/shared/auth/client-factory.d.ts +109 -0
- package/dist/shared/auth/client-factory.js +272 -0
- package/dist/shared/auth/client-factory.js.map +1 -0
- package/dist/shared/auth/index.d.ts +11 -0
- package/dist/shared/auth/index.js +18 -0
- package/dist/shared/auth/index.js.map +1 -0
- package/dist/shared/azure-devops-url.d.ts +17 -0
- package/dist/shared/azure-devops-url.js +120 -0
- package/dist/shared/azure-devops-url.js.map +1 -0
- package/dist/shared/config/index.d.ts +1 -0
- package/dist/shared/config/index.js +18 -0
- package/dist/shared/config/index.js.map +1 -0
- package/dist/shared/config/version.d.ts +4 -0
- package/dist/shared/config/version.js +8 -0
- package/dist/shared/config/version.js.map +1 -0
- package/dist/shared/enums/index.d.ts +40 -0
- package/dist/shared/enums/index.js +87 -0
- package/dist/shared/enums/index.js.map +1 -0
- package/dist/shared/errors/azure-devops-errors.d.ts +107 -0
- package/dist/shared/errors/azure-devops-errors.js +161 -0
- package/dist/shared/errors/azure-devops-errors.js.map +1 -0
- package/dist/shared/errors/handle-request-error.d.ts +32 -0
- package/dist/shared/errors/handle-request-error.js +121 -0
- package/dist/shared/errors/handle-request-error.js.map +1 -0
- package/dist/shared/errors/index.d.ts +1 -0
- package/dist/shared/errors/index.js +18 -0
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/shared/test/test-helpers.d.ts +20 -0
- package/dist/shared/test/test-helpers.js +57 -0
- package/dist/shared/test/test-helpers.js.map +1 -0
- package/dist/shared/test/text-content.d.ts +10 -0
- package/dist/shared/test/text-content.js +20 -0
- package/dist/shared/test/text-content.js.map +1 -0
- package/dist/shared/types/config.d.ts +27 -0
- package/dist/shared/types/config.js +3 -0
- package/dist/shared/types/config.js.map +1 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.js +18 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/request-handler.d.ts +21 -0
- package/dist/shared/types/request-handler.js +3 -0
- package/dist/shared/types/request-handler.js.map +1 -0
- package/dist/shared/types/tool-definition.d.ts +9 -0
- package/dist/shared/types/tool-definition.js +3 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/to-json-schema.d.ts +6 -0
- package/dist/shared/utils/to-json-schema.js +12 -0
- package/dist/shared/utils/to-json-schema.js.map +1 -0
- package/dist/utils/environment.d.ts +21 -0
- package/dist/utils/environment.js +58 -0
- package/dist/utils/environment.js.map +1 -0
- package/docs/SOLUTION_SUMMARY.md +145 -0
- package/docs/authentication.md +293 -0
- package/docs/azure-identity-authentication.md +187 -0
- package/docs/ci-setup.md +61 -0
- package/docs/docker.md +135 -0
- package/docs/examples/README.md +33 -0
- package/docs/examples/azure-cli-authentication.env +25 -0
- package/docs/examples/azure-identity-authentication.env +33 -0
- package/docs/examples/pat-authentication.env +24 -0
- package/docs/important-knowledge/azure-devops-rest-api-research.md +88 -0
- package/docs/important-knowledge/llm-tldr-cli.md +37 -0
- package/docs/npm-trusted-publishers-migration.md +142 -0
- package/docs/release-troubleshooting.md +153 -0
- package/docs/testing/README.md +140 -0
- package/docs/testing/setup.md +72 -0
- package/docs/tools/README.md +76 -0
- package/docs/tools/core-navigation.md +114 -0
- package/docs/tools/organizations.md +73 -0
- package/docs/tools/pipelines.md +532 -0
- package/docs/tools/projects.md +114 -0
- package/docs/tools/pull-requests.md +1110 -0
- package/docs/tools/repositories.md +610 -0
- package/docs/tools/resources.md +133 -0
- package/docs/tools/search.md +165 -0
- package/docs/tools/user-tools.md +39 -0
- package/docs/tools/wiki.md +192 -0
- package/docs/tools/work-items.md +244 -0
- package/package.json +125 -4
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getWorkItemAttachment = getWorkItemAttachment;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const errors_1 = require("../../../shared/errors");
|
|
40
|
+
/**
|
|
41
|
+
* Get an attachment from a work item and save it to the local filesystem
|
|
42
|
+
*
|
|
43
|
+
* @param connection The Azure DevOps WebApi connection
|
|
44
|
+
* @param options Options for getting the attachment
|
|
45
|
+
* @returns The result of the operation including file path and size
|
|
46
|
+
*/
|
|
47
|
+
async function getWorkItemAttachment(connection, options) {
|
|
48
|
+
try {
|
|
49
|
+
// Validate required parameters
|
|
50
|
+
if (!options.attachmentId) {
|
|
51
|
+
throw new Error('Attachment ID is required');
|
|
52
|
+
}
|
|
53
|
+
if (!options.outputPath) {
|
|
54
|
+
throw new Error('Output path is required');
|
|
55
|
+
}
|
|
56
|
+
const witApi = await connection.getWorkItemTrackingApi();
|
|
57
|
+
// Download the attachment content
|
|
58
|
+
const attachmentStream = await witApi.getAttachmentContent(options.attachmentId);
|
|
59
|
+
if (!attachmentStream) {
|
|
60
|
+
throw new Error('Failed to download attachment: No content received');
|
|
61
|
+
}
|
|
62
|
+
// Ensure the output directory exists
|
|
63
|
+
const outputDir = path.dirname(options.outputPath);
|
|
64
|
+
if (!fs.existsSync(outputDir)) {
|
|
65
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
66
|
+
}
|
|
67
|
+
// Write the attachment to the output file
|
|
68
|
+
const writeStream = fs.createWriteStream(options.outputPath);
|
|
69
|
+
await new Promise((resolve, reject) => {
|
|
70
|
+
attachmentStream.pipe(writeStream);
|
|
71
|
+
attachmentStream.on('error', reject);
|
|
72
|
+
writeStream.on('error', reject);
|
|
73
|
+
writeStream.on('finish', resolve);
|
|
74
|
+
});
|
|
75
|
+
// Azure DevOps may return an HTML/JSON error body for invalid attachment
|
|
76
|
+
// IDs instead of throwing; detect that and surface a not-found error.
|
|
77
|
+
const statsBeforeCheck = fs.statSync(options.outputPath);
|
|
78
|
+
if (statsBeforeCheck.size > 0 && statsBeforeCheck.size < 4096) {
|
|
79
|
+
const preview = fs
|
|
80
|
+
.readFileSync(options.outputPath)
|
|
81
|
+
.toString('utf8')
|
|
82
|
+
.toLowerCase();
|
|
83
|
+
if (preview.includes('<!doctype') ||
|
|
84
|
+
preview.includes('<html') ||
|
|
85
|
+
preview.includes('tf401232') ||
|
|
86
|
+
preview.includes('attachment does not exist') ||
|
|
87
|
+
preview.includes('"typekey"') ||
|
|
88
|
+
preview.includes('exception')) {
|
|
89
|
+
fs.unlinkSync(options.outputPath);
|
|
90
|
+
throw new Error(`Failed to get attachment: Attachment not found (${options.attachmentId})`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Get the file size
|
|
94
|
+
const stats = fs.statSync(options.outputPath);
|
|
95
|
+
return {
|
|
96
|
+
filePath: options.outputPath,
|
|
97
|
+
fileName: path.basename(options.outputPath),
|
|
98
|
+
size: stats.size,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
throw new Error(`Failed to get attachment: ${error instanceof Error ? error.message : String(error)}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/work-items/get-work-item-attachment/feature.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,EAAE,+BAAW;AACzB,MAAY,IAAI,iCAAa;AAC7B,mDAA0D;AAM1D;;;;;;GAMG;AACI,KAAK,gCACV,UAAkB,EAClB,OAAqC;IAErC,IAAI,CAAC;QACH,+BAA+B;QAC/B,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,sBAAsB,EAAE,CAAC;QAEzD,kCAAkC;QAClC,MAAM,gBAAgB,GAAG,MAAM,MAAM,CAAC,oBAAoB,CACxD,OAAO,CAAC,YAAY,CACrB,CAAC;QAEF,IAAI,CAAC,gBAAgB,EAAE,C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AO,CAAC,QAAQ,CAAC,2BAA2B,CAAC;gBAC7C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;gBAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAC7B,CAAC;gBACD,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;gBAClC,MAAM,IAAI,KAAK,CACb,mDAAmD,OAAO,CAAC,YAAY,GAAG,CAC3E,CAAC;YACJ,CAAC;QACH,CAAC;QAED,oBAAoB;QACpB,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAE9C,OAAO;YACL,QAAQ,EAAE,OAAO,CAAC,UAAU;YAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,yBAAgB,EAAE,CAAC;YACtC,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CACb,6BAA6B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACtF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema"), exports);
|
|
18
|
+
__exportStar(require("./feature"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/work-items/get-work-item-attachment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetWorkItemAttachmentSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
Object.defineProperty(exports, "GetWorkItemAttachmentSchema", { enumerable: true, get: function () { return schemas_1.GetWorkItemAttachmentSchema; } });
|
|
6
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/work-items/get-work-item-attachment/schema.ts"],"names":[],"mappings":";;;AAAA,wCAAyD;4GAAhD,qCAA2B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { GetWorkItemCommentsOptions, CommentList } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Get comments for a work item
|
|
5
|
+
*
|
|
6
|
+
* @param connection The Azure DevOps WebApi connection
|
|
7
|
+
* @param options Options for getting work item comments
|
|
8
|
+
* @returns The list of work item comments
|
|
9
|
+
*/
|
|
10
|
+
export declare function getWorkItemComments(connection: WebApi, options: GetWorkItemCommentsOptions): Promise<CommentList>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkItemComments = getWorkItemComments;
|
|
4
|
+
const WorkItemTrackingInterfaces_1 = require("azure-devops-node-api/interfaces/WorkItemTrackingInterfaces");
|
|
5
|
+
const errors_1 = require("../../../shared/errors");
|
|
6
|
+
/**
|
|
7
|
+
* Maps string-based expansion options to the CommentExpandOptions enum
|
|
8
|
+
*/
|
|
9
|
+
const expandMap = {
|
|
10
|
+
none: WorkItemTrackingInterfaces_1.CommentExpandOptions.None,
|
|
11
|
+
reactions: WorkItemTrackingInterfaces_1.CommentExpandOptions.Reactions,
|
|
12
|
+
renderedtext: WorkItemTrackingInterfaces_1.CommentExpandOptions.RenderedText,
|
|
13
|
+
all: WorkItemTrackingInterfaces_1.CommentExpandOptions.All,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Maps string-based sort order options to the CommentSortOrder enum
|
|
17
|
+
*/
|
|
18
|
+
const orderMap = {
|
|
19
|
+
asc: WorkItemTrackingInterfaces_1.CommentSortOrder.Asc,
|
|
20
|
+
desc: WorkItemTrackingInterfaces_1.CommentSortOrder.Desc,
|
|
21
|
+
};
|
|
22
|
+
function isNotFoundError(error) {
|
|
23
|
+
if (!error || typeof error !== 'object') {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
const errorObj = error;
|
|
27
|
+
return errorObj.statusCode === 404 || errorObj.response?.status === 404;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get comments for a work item
|
|
31
|
+
*
|
|
32
|
+
* @param connection The Azure DevOps WebApi connection
|
|
33
|
+
* @param options Options for getting work item comments
|
|
34
|
+
* @returns The list of work item comments
|
|
35
|
+
*/
|
|
36
|
+
async function getWorkItemComments(connection, options) {
|
|
37
|
+
try {
|
|
38
|
+
const witApi = await connection.getWorkItemTrackingApi();
|
|
39
|
+
const { workItemId, projectId, top, continuationToken, includeDeleted, expand = 'all', order = 'asc', } = options;
|
|
40
|
+
let resolvedProjectId = projectId;
|
|
41
|
+
if (!resolvedProjectId) {
|
|
42
|
+
try {
|
|
43
|
+
const workItem = await witApi.getWorkItem(workItemId, [
|
|
44
|
+
'System.TeamProject',
|
|
45
|
+
]);
|
|
46
|
+
if (!workItem ||
|
|
47
|
+
!workItem.fields ||
|
|
48
|
+
!workItem.fields['System.TeamProject']) {
|
|
49
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Work item '${workItemId}' not found`);
|
|
50
|
+
}
|
|
51
|
+
resolvedProjectId = workItem.fields['System.TeamProject'];
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
if (isNotFoundError(error)) {
|
|
58
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Work item '${workItemId}' not found`);
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const expandVal = expandMap[expand.toLowerCase()] ?? WorkItemTrackingInterfaces_1.CommentExpandOptions.All;
|
|
64
|
+
const orderVal = orderMap[order.toLowerCase()] ?? WorkItemTrackingInterfaces_1.CommentSortOrder.Asc;
|
|
65
|
+
const commentList = await witApi.getComments(resolvedProjectId, workItemId, top, continuationToken, includeDeleted, expandVal, orderVal);
|
|
66
|
+
if (!commentList) {
|
|
67
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Comments for work item '${workItemId}' not found`);
|
|
68
|
+
}
|
|
69
|
+
return commentList;
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
throw new errors_1.AzureDevOpsError(`Failed to get work item comments: ${error instanceof Error ? error.message : String(error)}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/work-items/get-work-item-comments/feature.ts"],"names":[],"mappings":";;;AACA,4GAGqE;AACrE,mDAGgC;AAGhC;;GAEG;AACH,MAAM,SAAS,GAAyC;IACtD,IAAI,EAAE,iDAAoB,CAAC,IAAI;IAC/B,SAAS,EAAE,iDAAoB,CAAC,SAAS;IACzC,YAAY,EAAE,iDAAoB,CAAC,YAAY;IAC/C,GAAG,EAAE,iDAAoB,CAAC,GAAG;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,QAAQ,GAAqC;IACjD,GAAG,EAAE,6CAAgB,CAAC,GAAG;IACzB,IAAI,EAAE,6CAAgB,CAAC,IAAI;CAC5B,CAAC;AAEF,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,QAAQ,GAAG,KAGhB,CAAC;IAEF,OAAO,QAAQ,CAAC,UAAU,KAAK,GAAG,IAAI,QAAQ,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,CAAC;AAC1E,CAAC;AAED;;;;;;GAMG;AACI,KAAK,8BACV,UAAkB,EAClB,OAAmC;IAEnC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,sBAAsB,EAAE,CAAC;QACzD,MAAM,EACJ,UAAU,EACV,SAAS,EACT,GAAG,EACH,iBAAiB,EACjB,cAAc,EACd,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,KAAK,GACd,GAAG,OAAO,CAAC;QAEZ,IAAI,iBAAiB,GAAG,SAAS,CAAC;QAClC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,IAAI,CAAC;gBACH,MAAM,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K,CAAC;QACd,CAAC;QACD,MAAM,IAAI,yBAAgB,CACxB,qCAAqC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC9F,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema"), exports);
|
|
18
|
+
__exportStar(require("./feature"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/work-items/get-work-item-comments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetWorkItemCommentsSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
Object.defineProperty(exports, "GetWorkItemCommentsSchema", { enumerable: true, get: function () { return schemas_1.GetWorkItemCommentsSchema; } });
|
|
6
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/work-items/get-work-item-comments/schema.ts"],"names":[],"mappings":";;;AAAA,wCAAuD;0GAA9C,mCAAyB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './schemas';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export * from './list-work-items';
|
|
4
|
+
export * from './get-work-item';
|
|
5
|
+
export * from './create-work-item';
|
|
6
|
+
export * from './update-work-item';
|
|
7
|
+
export * from './manage-work-item-link';
|
|
8
|
+
export * from './get-work-item-comments';
|
|
9
|
+
export * from './create-work-item-attachment';
|
|
10
|
+
export * from './get-work-item-attachment';
|
|
11
|
+
export * from './delete-work-item-attachment';
|
|
12
|
+
export * from './tool-definitions';
|
|
13
|
+
import { RequestIdentifier, RequestHandler } from '../../shared/types/request-handler';
|
|
14
|
+
/**
|
|
15
|
+
* Checks if the request is for the work items feature
|
|
16
|
+
*/
|
|
17
|
+
export declare const isWorkItemsRequest: RequestIdentifier;
|
|
18
|
+
/**
|
|
19
|
+
* Handles work items feature requests
|
|
20
|
+
*/
|
|
21
|
+
export declare const handleWorkItemsRequest: RequestHandler;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.handleWorkItemsRequest = exports.isWorkItemsRequest = void 0;
|
|
18
|
+
// Re-export schemas and types
|
|
19
|
+
__exportStar(require("./schemas"), exports);
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
// Re-export features
|
|
22
|
+
__exportStar(require("./list-work-items"), exports);
|
|
23
|
+
__exportStar(require("./get-work-item"), exports);
|
|
24
|
+
__exportStar(require("./create-work-item"), exports);
|
|
25
|
+
__exportStar(require("./update-work-item"), exports);
|
|
26
|
+
__exportStar(require("./manage-work-item-link"), exports);
|
|
27
|
+
__exportStar(require("./get-work-item-comments"), exports);
|
|
28
|
+
__exportStar(require("./create-work-item-attachment"), exports);
|
|
29
|
+
__exportStar(require("./get-work-item-attachment"), exports);
|
|
30
|
+
__exportStar(require("./delete-work-item-attachment"), exports);
|
|
31
|
+
// Export tool definitions
|
|
32
|
+
__exportStar(require("./tool-definitions"), exports);
|
|
33
|
+
const environment_1 = require("../../utils/environment");
|
|
34
|
+
const _1 = require("./");
|
|
35
|
+
/**
|
|
36
|
+
* Checks if the request is for the work items feature
|
|
37
|
+
*/
|
|
38
|
+
const isWorkItemsRequest = (request) => {
|
|
39
|
+
const toolName = request.params.name;
|
|
40
|
+
return [
|
|
41
|
+
'get_work_item',
|
|
42
|
+
'list_work_items',
|
|
43
|
+
'create_work_item',
|
|
44
|
+
'update_work_item',
|
|
45
|
+
'manage_work_item_link',
|
|
46
|
+
'get_work_item_comments',
|
|
47
|
+
'create_work_item_attachment',
|
|
48
|
+
'get_work_item_attachment',
|
|
49
|
+
'delete_work_item_attachment',
|
|
50
|
+
].includes(toolName);
|
|
51
|
+
};
|
|
52
|
+
exports.isWorkItemsRequest = isWorkItemsRequest;
|
|
53
|
+
/**
|
|
54
|
+
* Handles work items feature requests
|
|
55
|
+
*/
|
|
56
|
+
const handleWorkItemsRequest = async (connection, request) => {
|
|
57
|
+
switch (request.params.name) {
|
|
58
|
+
case 'get_work_item': {
|
|
59
|
+
const args = _1.GetWorkItemSchema.parse(request.params.arguments);
|
|
60
|
+
const result = await (0, _1.getWorkItem)(connection, args.workItemId, args.expand);
|
|
61
|
+
return {
|
|
62
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
case 'list_work_items': {
|
|
66
|
+
const args = _1.ListWorkItemsSchema.parse(request.params.arguments);
|
|
67
|
+
const result = await (0, _1.listWorkItems)(connection, {
|
|
68
|
+
projectId: args.projectId ?? environment_1.defaultProject,
|
|
69
|
+
teamId: args.teamId,
|
|
70
|
+
queryId: args.queryId,
|
|
71
|
+
wiql: args.wiql,
|
|
72
|
+
top: args.top,
|
|
73
|
+
skip: args.skip,
|
|
74
|
+
fields: args.fields,
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
case 'create_work_item': {
|
|
81
|
+
const args = _1.CreateWorkItemSchema.parse(request.params.arguments);
|
|
82
|
+
const result = await (0, _1.createWorkItem)(connection, args.projectId ?? environment_1.defaultProject, args.workItemType, {
|
|
83
|
+
title: args.title,
|
|
84
|
+
description: args.description,
|
|
85
|
+
assignedTo: args.assignedTo,
|
|
86
|
+
areaPath: args.areaPath,
|
|
87
|
+
iterationPath: args.iterationPath,
|
|
88
|
+
priority: args.priority,
|
|
89
|
+
parentId: args.parentId,
|
|
90
|
+
tags: args.tags,
|
|
91
|
+
additionalFields: args.additionalFields,
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
case 'update_work_item': {
|
|
98
|
+
const args = _1.UpdateWorkItemSchema.parse(request.params.arguments);
|
|
99
|
+
const result = await (0, _1.updateWorkItem)(connection, args.workItemId, {
|
|
100
|
+
title: args.title,
|
|
101
|
+
description: args.description,
|
|
102
|
+
assignedTo: args.assignedTo,
|
|
103
|
+
areaPath: args.areaPath,
|
|
104
|
+
iterationPath: args.iterationPath,
|
|
105
|
+
priority: args.priority,
|
|
106
|
+
state: args.state,
|
|
107
|
+
tags: args.tags,
|
|
108
|
+
tagsToAdd: args.tagsToAdd,
|
|
109
|
+
tagsToRemove: args.tagsToRemove,
|
|
110
|
+
additionalFields: args.additionalFields,
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
case 'manage_work_item_link': {
|
|
117
|
+
const args = _1.ManageWorkItemLinkSchema.parse(request.params.arguments);
|
|
118
|
+
const result = await (0, _1.manageWorkItemLink)(connection, args.projectId ?? environment_1.defaultProject, {
|
|
119
|
+
sourceWorkItemId: args.sourceWorkItemId,
|
|
120
|
+
targetWorkItemId: args.targetWorkItemId,
|
|
121
|
+
operation: args.operation,
|
|
122
|
+
relationType: args.relationType,
|
|
123
|
+
newRelationType: args.newRelationType,
|
|
124
|
+
comment: args.comment,
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
case 'get_work_item_comments': {
|
|
131
|
+
const args = _1.GetWorkItemCommentsSchema.parse(request.params.arguments);
|
|
132
|
+
const result = await (0, _1.getWorkItemComments)(connection, {
|
|
133
|
+
workItemId: args.workItemId,
|
|
134
|
+
projectId: args.projectId,
|
|
135
|
+
top: args.top,
|
|
136
|
+
continuationToken: args.continuationToken,
|
|
137
|
+
includeDeleted: args.includeDeleted,
|
|
138
|
+
expand: args.expand,
|
|
139
|
+
order: args.order,
|
|
140
|
+
});
|
|
141
|
+
return {
|
|
142
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
case 'create_work_item_attachment': {
|
|
146
|
+
const args = _1.CreateWorkItemAttachmentSchema.parse(request.params.arguments);
|
|
147
|
+
const result = await (0, _1.createWorkItemAttachment)(connection, args.workItemId, {
|
|
148
|
+
filePath: args.filePath,
|
|
149
|
+
fileName: args.fileName,
|
|
150
|
+
comment: args.comment,
|
|
151
|
+
});
|
|
152
|
+
return {
|
|
153
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
case 'get_work_item_attachment': {
|
|
157
|
+
const args = _1.GetWorkItemAttachmentSchema.parse(request.params.arguments);
|
|
158
|
+
const result = await (0, _1.getWorkItemAttachment)(connection, {
|
|
159
|
+
attachmentId: args.attachmentId,
|
|
160
|
+
outputPath: args.outputPath,
|
|
161
|
+
});
|
|
162
|
+
return {
|
|
163
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
case 'delete_work_item_attachment': {
|
|
167
|
+
const args = _1.DeleteWorkItemAttachmentSchema.parse(request.params.arguments);
|
|
168
|
+
const result = await (0, _1.deleteWorkItemAttachment)(connection, {
|
|
169
|
+
workItemId: args.workItemId,
|
|
170
|
+
attachmentId: args.attachmentId,
|
|
171
|
+
});
|
|
172
|
+
return {
|
|
173
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
default:
|
|
177
|
+
throw new Error(`Unknown work items tool: ${request.params.name}`);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
exports.handleWorkItemsRequest = handleWorkItemsRequest;
|
|
181
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/work-items/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,4CAA0B;AAC1B,0CAAwB;AAExB,qBAAqB;AACrB,oDAAkC;AAClC,kDAAgC;AAChC,qDAAmC;AACnC,qDAAmC;AACnC,0DAAwC;AACxC,2DAAyC;AACzC,gEAA8C;AAC9C,6DAA2C;AAC3C,gEAA8C;AAE9C,0BAA0B;AAC1B,qDAAmC;AASnC,yDAAyD;AACzD,yBAmBY;AAOZ;;GAEG;AACI,MAAM,kBAAkB,GAAsB,CACnD,OAAwB,EACf,EAAE;IACX,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IACrC,OAAO;QACL,eAAe;QACf,iBAAiB;QACjB,kBAAkB;QAClB,kBAAkB;QAClB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,6BAA6B;KAC9B,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC;AAfW,QAAA,kBAAkB,GAAlB,kBAAkB,CAe7B;AAEF;;GAEG;AACI,MAAM,sBAAsB,GAAmB,KAAK,EACzD,UAAkB,EAClB,OAAwB,EACG,EAAE;IAC7B,QAAQ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5B,KAAK,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,GAAG,oBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC/D,MAAM,MAAM,GAAG,MAAM,IAAA,cAAW,EAC9B,UAAU,EACV,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,MAAM,CACZ,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,CA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,CAAC,CAAC;YACH,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACnE,CAAC;QACJ,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC,CAAC;AApJW,QAAA,sBAAsB,GAAtB,sBAAsB,CAoJjC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { ListWorkItemsOptions, WorkItem as WorkItemType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* List work items in a project
|
|
5
|
+
*
|
|
6
|
+
* @param connection The Azure DevOps WebApi connection
|
|
7
|
+
* @param options Options for listing work items
|
|
8
|
+
* @returns List of work items
|
|
9
|
+
*/
|
|
10
|
+
export declare function listWorkItems(connection: WebApi, options: ListWorkItemsOptions): Promise<WorkItemType[]>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listWorkItems = listWorkItems;
|
|
4
|
+
const errors_1 = require("../../../shared/errors");
|
|
5
|
+
/**
|
|
6
|
+
* Constructs the default WIQL query for listing work items
|
|
7
|
+
*/
|
|
8
|
+
function constructDefaultWiql(projectId, teamId) {
|
|
9
|
+
let query = `SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = '${projectId}'`;
|
|
10
|
+
if (teamId) {
|
|
11
|
+
query += ` AND [System.TeamId] = '${teamId}'`;
|
|
12
|
+
}
|
|
13
|
+
query += ' ORDER BY [System.Id]';
|
|
14
|
+
return query;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* List work items in a project
|
|
18
|
+
*
|
|
19
|
+
* @param connection The Azure DevOps WebApi connection
|
|
20
|
+
* @param options Options for listing work items
|
|
21
|
+
* @returns List of work items
|
|
22
|
+
*/
|
|
23
|
+
async function listWorkItems(connection, options) {
|
|
24
|
+
try {
|
|
25
|
+
const witApi = await connection.getWorkItemTrackingApi();
|
|
26
|
+
const { projectId, teamId, queryId, wiql } = options;
|
|
27
|
+
let workItemRefs = [];
|
|
28
|
+
if (queryId) {
|
|
29
|
+
const teamContext = {
|
|
30
|
+
project: projectId,
|
|
31
|
+
team: teamId,
|
|
32
|
+
};
|
|
33
|
+
const queryResult = await witApi.queryById(queryId, teamContext);
|
|
34
|
+
workItemRefs = queryResult.workItems || [];
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const query = wiql || constructDefaultWiql(projectId, teamId);
|
|
38
|
+
const teamContext = {
|
|
39
|
+
project: projectId,
|
|
40
|
+
team: teamId,
|
|
41
|
+
};
|
|
42
|
+
const queryResult = await witApi.queryByWiql({ query }, teamContext);
|
|
43
|
+
workItemRefs = queryResult.workItems || [];
|
|
44
|
+
}
|
|
45
|
+
// Apply pagination in memory
|
|
46
|
+
const { top = 200, skip } = options;
|
|
47
|
+
if (skip !== undefined) {
|
|
48
|
+
workItemRefs = workItemRefs.slice(skip);
|
|
49
|
+
}
|
|
50
|
+
if (top !== undefined) {
|
|
51
|
+
workItemRefs = workItemRefs.slice(0, top);
|
|
52
|
+
}
|
|
53
|
+
const workItemIds = workItemRefs
|
|
54
|
+
.map((ref) => ref.id)
|
|
55
|
+
.filter((id) => id !== undefined);
|
|
56
|
+
if (workItemIds.length === 0) {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
const defaultFields = [
|
|
60
|
+
'System.Id',
|
|
61
|
+
'System.Title',
|
|
62
|
+
'System.State',
|
|
63
|
+
'System.AssignedTo',
|
|
64
|
+
];
|
|
65
|
+
const fields = options.fields
|
|
66
|
+
? [...new Set([...defaultFields, ...options.fields])]
|
|
67
|
+
: defaultFields;
|
|
68
|
+
const workItems = await witApi.getWorkItems(workItemIds, fields, undefined, undefined);
|
|
69
|
+
if (!workItems) {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
return workItems.filter((wi) => wi !== undefined);
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
// Check for specific error types and convert to appropriate Azure DevOps errors
|
|
79
|
+
if (error instanceof Error) {
|
|
80
|
+
if (error.message.includes('Authentication') ||
|
|
81
|
+
error.message.includes('Unauthorized')) {
|
|
82
|
+
throw new errors_1.AzureDevOpsAuthenticationError(`Failed to authenticate: ${error.message}`);
|
|
83
|
+
}
|
|
84
|
+
if (error.message.includes('not found') ||
|
|
85
|
+
error.message.includes('does not exist')) {
|
|
86
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Resource not found: ${error.message}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
throw new errors_1.AzureDevOpsError(`Failed to list work items: ${error instanceof Error ? error.message : String(error)}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/work-items/list-work-items/feature.ts"],"names":[],"mappings":";;;AAMA,mDAIgC;AAGhC;;GAEG;AACH,SAAS,oBAAoB,CAAC,SAAiB,EAAE,MAAe;IAC9D,IAAI,KAAK,GAAG,mEAAmE,SAAS,GAAG,CAAC;IAC5F,IAAI,MAAM,EAAE,CAAC;QACX,KAAK,IAAI,2BAA2B,MAAM,GAAG,CAAC;IAChD,CAAC;IACD,KAAK,IAAI,uBAAuB,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACI,KAAK,wBACV,UAAkB,EAClB,OAA6B;IAE7B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM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