azure-devops-extension-api 4.270.0 → 5.272.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accounts/Accounts.d.ts +126 -126
- package/Accounts/Accounts.js +61 -62
- package/Accounts/Accounts.min.js +1 -1
- package/Accounts/AccountsClient.d.ts +24 -24
- package/Accounts/AccountsClient.js +78 -124
- package/Accounts/AccountsClient.min.js +1 -1
- package/Accounts/index.d.ts +2 -2
- package/Accounts/index.js +18 -9
- package/Accounts/index.min.js +1 -1
- package/AdvancedSecurity.Reporting/Reporting.d.ts +717 -717
- package/AdvancedSecurity.Reporting/Reporting.js +203 -204
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +83 -83
- package/AdvancedSecurity.Reporting/ReportingClient.js +267 -343
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
- package/Alert/Alert.d.ts +1272 -1265
- package/Alert/Alert.js +425 -426
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +201 -159
- package/Alert/AlertClient.js +558 -533
- package/Alert/AlertClient.min.js +1 -1
- package/Build/Build.d.ts +3318 -3292
- package/Build/Build.js +613 -607
- package/Build/Build.min.js +1 -1
- package/Build/BuildClient.d.ts +842 -820
- package/Build/BuildClient.js +2319 -2568
- package/Build/BuildClient.min.js +1 -1
- package/Build/BuildServices.d.ts +32 -32
- package/Build/BuildServices.js +13 -14
- package/Build/BuildServices.min.js +1 -1
- package/Build/index.d.ts +3 -3
- package/Build/index.js +19 -10
- package/Build/index.min.js +1 -1
- package/Comments/Comments.d.ts +309 -309
- package/Comments/Comments.js +93 -94
- package/Comments/Comments.min.js +1 -1
- package/Comments/index.d.ts +1 -1
- package/Comments/index.js +17 -8
- package/Comments/index.min.js +1 -1
- package/Common/Client.d.ts +9 -9
- package/Common/Client.js +25 -26
- package/Common/Client.min.js +1 -1
- package/Common/CommonServices.d.ts +774 -735
- package/Common/CommonServices.js +71 -72
- package/Common/CommonServices.min.js +1 -1
- package/Common/Context.js +2 -0
- package/Common/Fetch.d.ts +95 -95
- package/Common/Fetch.js +131 -168
- package/Common/Fetch.min.js +1 -1
- package/Common/RestClientBase.d.ts +96 -96
- package/Common/RestClientBase.js +109 -139
- package/Common/RestClientBase.min.js +1 -1
- package/Common/System.d.ts +30 -30
- package/Common/System.js +39 -40
- package/Common/System.min.js +1 -1
- package/Common/SystemData.d.ts +129 -129
- package/Common/SystemData.js +138 -139
- package/Common/SystemData.min.js +1 -1
- package/Common/Util/Serialization.d.ts +15 -15
- package/Common/Util/Serialization.js +51 -53
- package/Common/Util/Serialization.min.js +1 -1
- package/Common/Util/Url.d.ts +238 -236
- package/Common/Util/Url.js +605 -626
- package/Common/Util/Url.min.js +1 -1
- package/Common/index.d.ts +3 -3
- package/Common/index.js +19 -9
- package/Common/index.min.js +1 -1
- package/Contributions/Contributions.d.ts +694 -694
- package/Contributions/Contributions.js +185 -186
- package/Contributions/Contributions.min.js +1 -1
- package/Contributions/ContributionsClient.d.ts +31 -31
- package/Contributions/ContributionsClient.js +99 -147
- package/Contributions/ContributionsClient.min.js +1 -1
- package/Contributions/index.d.ts +2 -2
- package/Contributions/index.js +18 -9
- package/Contributions/index.min.js +1 -1
- package/Core/Core.d.ts +546 -546
- package/Core/Core.js +79 -80
- package/Core/Core.min.js +1 -1
- package/Core/CoreClient.d.ts +224 -224
- package/Core/CoreClient.js +652 -777
- package/Core/CoreClient.min.js +1 -1
- package/Core/index.d.ts +2 -2
- package/Core/index.js +18 -9
- package/Core/index.min.js +1 -1
- package/Dashboard/Dashboard.d.ts +393 -393
- package/Dashboard/Dashboard.js +56 -57
- package/Dashboard/Dashboard.min.js +1 -1
- package/Dashboard/DashboardClient.d.ts +106 -106
- package/Dashboard/DashboardClient.js +317 -393
- package/Dashboard/DashboardClient.min.js +1 -1
- package/Dashboard/WidgetConfigHelpers.d.ts +34 -34
- package/Dashboard/WidgetConfigHelpers.js +41 -45
- package/Dashboard/WidgetConfigHelpers.min.js +1 -1
- package/Dashboard/WidgetContracts.d.ts +213 -213
- package/Dashboard/WidgetContracts.js +24 -25
- package/Dashboard/WidgetContracts.min.js +1 -1
- package/Dashboard/WidgetHelpers.d.ts +89 -89
- package/Dashboard/WidgetHelpers.js +135 -146
- package/Dashboard/WidgetHelpers.min.js +1 -1
- package/Dashboard/index.d.ts +5 -5
- package/Dashboard/index.js +21 -12
- package/Dashboard/index.min.js +1 -1
- package/DistributedTaskCommon/DistributedTaskCommon.d.ts +103 -103
- package/DistributedTaskCommon/DistributedTaskCommon.js +7 -9
- package/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -1
- package/DistributedTaskCommon/index.d.ts +1 -1
- package/DistributedTaskCommon/index.js +17 -4
- package/DistributedTaskCommon/index.min.js +1 -1
- package/ExtensionManagement/ExtensionManagement.d.ts +1163 -1163
- package/ExtensionManagement/ExtensionManagement.js +284 -285
- package/ExtensionManagement/ExtensionManagement.min.js +1 -1
- package/ExtensionManagement/ExtensionManagementClient.d.ts +191 -191
- package/ExtensionManagement/ExtensionManagementClient.js +551 -648
- package/ExtensionManagement/ExtensionManagementClient.min.js +1 -1
- package/ExtensionManagement/index.d.ts +2 -2
- package/ExtensionManagement/index.js +18 -9
- package/ExtensionManagement/index.min.js +1 -1
- package/Favorite/Favorite.d.ts +124 -124
- package/Favorite/Favorite.js +7 -9
- package/Favorite/Favorite.min.js +1 -1
- package/Favorite/FavoriteClient.d.ts +78 -78
- package/Favorite/FavoriteClient.js +247 -314
- package/Favorite/FavoriteClient.min.js +1 -1
- package/FeatureAvailability/FeatureAvailability.d.ts +13 -13
- package/FeatureAvailability/FeatureAvailability.js +7 -9
- package/FeatureAvailability/FeatureAvailability.min.js +1 -1
- package/FeatureAvailability/FeatureAvailabilityClient.d.ts +45 -45
- package/FeatureAvailability/FeatureAvailabilityClient.js +136 -189
- package/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -1
- package/FeatureAvailability/index.d.ts +2 -2
- package/FeatureAvailability/index.js +18 -8
- package/FeatureAvailability/index.min.js +1 -1
- package/FeatureManagement/FeatureManagement.d.ts +161 -161
- package/FeatureManagement/FeatureManagement.js +26 -27
- package/FeatureManagement/FeatureManagement.min.js +1 -1
- package/FeatureManagement/FeatureManagementClient.d.ts +78 -78
- package/FeatureManagement/FeatureManagementClient.js +214 -273
- package/FeatureManagement/FeatureManagementClient.min.js +1 -1
- package/FeatureManagement/index.d.ts +2 -2
- package/FeatureManagement/index.js +18 -9
- package/FeatureManagement/index.min.js +1 -1
- package/FileContainer/FileContainer.d.ts +193 -193
- package/FileContainer/FileContainer.js +58 -59
- package/FileContainer/FileContainer.min.js +1 -1
- package/FileContainer/FileContainerClient.d.ts +47 -47
- package/FileContainer/FileContainerClient.js +132 -182
- package/FileContainer/FileContainerClient.min.js +1 -1
- package/FileContainer/index.d.ts +2 -2
- package/FileContainer/index.js +18 -9
- package/FileContainer/index.min.js +1 -1
- package/FormInput/FormInput.d.ts +278 -278
- package/FormInput/FormInput.js +77 -78
- package/FormInput/FormInput.min.js +1 -1
- package/FormInput/index.d.ts +1 -1
- package/FormInput/index.js +17 -8
- package/FormInput/index.min.js +1 -1
- package/Gallery/Gallery.d.ts +1911 -1911
- package/Gallery/Gallery.js +788 -789
- package/Gallery/Gallery.min.js +1 -1
- package/Gallery/GalleryClient.d.ts +612 -603
- package/Gallery/GalleryClient.js +1882 -2100
- package/Gallery/GalleryClient.min.js +1 -1
- package/Gallery/index.d.ts +2 -2
- package/Gallery/index.js +18 -9
- package/Gallery/index.min.js +1 -1
- package/Git/CodeEditorTypes.d.ts +305 -305
- package/Git/CodeEditorTypes.js +27 -28
- package/Git/CodeEditorTypes.min.js +1 -1
- package/Git/Git.d.ts +3976 -4071
- package/Git/Git.js +830 -839
- package/Git/Git.min.js +1 -1
- package/Git/GitClient.d.ts +1468 -1466
- package/Git/GitClient.js +3892 -4347
- package/Git/GitClient.min.js +1 -1
- package/Git/GitServices.d.ts +16 -16
- package/Git/GitServices.js +10 -11
- package/Git/GitServices.min.js +1 -1
- package/Git/index.d.ts +4 -4
- package/Git/index.js +20 -11
- package/Git/index.min.js +1 -1
- package/Graph/Graph.d.ts +518 -518
- package/Graph/Graph.js +14 -15
- package/Graph/Graph.min.js +1 -1
- package/Graph/GraphClient.d.ts +261 -261
- package/Graph/GraphClient.js +737 -867
- package/Graph/GraphClient.min.js +1 -1
- package/Graph/index.d.ts +2 -2
- package/Graph/index.js +18 -9
- package/Graph/index.min.js +1 -1
- package/Identities/Identities.d.ts +242 -242
- package/Identities/Identities.js +49 -50
- package/Identities/Identities.min.js +1 -1
- package/Identities/IdentityProvider.d.ts +40 -40
- package/Identities/IdentityProvider.js +47 -49
- package/Identities/IdentityProvider.min.js +1 -1
- package/Identities/IdentityService.d.ts +72 -72
- package/Identities/IdentityService.js +13 -14
- package/Identities/IdentityService.min.js +1 -1
- package/Identities/index.d.ts +3 -3
- package/Identities/index.js +19 -10
- package/Identities/index.min.js +1 -1
- package/Locations/Locations.d.ts +150 -150
- package/Locations/Locations.js +28 -29
- package/Locations/Locations.min.js +1 -1
- package/Locations/LocationsClient.d.ts +65 -65
- package/Locations/LocationsClient.js +211 -276
- package/Locations/LocationsClient.min.js +1 -1
- package/Locations/index.d.ts +2 -2
- package/Locations/index.js +18 -9
- package/Locations/index.min.js +1 -1
- package/Management/Management.d.ts +424 -407
- package/Management/Management.js +27 -28
- package/Management/Management.min.js +1 -1
- package/Management/ManagementClient.d.ts +137 -105
- package/Management/ManagementClient.js +413 -398
- package/Management/ManagementClient.min.js +1 -1
- package/Notification/Notification.d.ts +1387 -1387
- package/Notification/Notification.js +385 -386
- package/Notification/Notification.min.js +1 -1
- package/Notification/NotificationClient.d.ts +149 -149
- package/Notification/NotificationClient.js +420 -511
- package/Notification/NotificationClient.min.js +1 -1
- package/Notification/index.d.ts +2 -2
- package/Notification/index.js +18 -9
- package/Notification/index.min.js +1 -1
- package/Operations/Operations.d.ts +77 -77
- package/Operations/Operations.js +38 -39
- package/Operations/Operations.min.js +1 -1
- package/Operations/OperationsClient.d.ts +13 -13
- package/Operations/OperationsClient.js +45 -86
- package/Operations/OperationsClient.min.js +1 -1
- package/Operations/index.d.ts +2 -2
- package/Operations/index.js +18 -9
- package/Operations/index.min.js +1 -1
- package/Pipelines/Pipelines.d.ts +342 -341
- package/Pipelines/Pipelines.js +82 -83
- package/Pipelines/Pipelines.min.js +1 -1
- package/Pipelines/PipelinesClient.d.ts +92 -92
- package/Pipelines/PipelinesClient.js +260 -325
- package/Pipelines/PipelinesClient.min.js +1 -1
- package/Policy/Policy.d.ts +160 -160
- package/Policy/Policy.js +38 -39
- package/Policy/Policy.min.js +1 -1
- package/Policy/PolicyClient.d.ts +99 -99
- package/Policy/PolicyClient.js +274 -346
- package/Policy/PolicyClient.min.js +1 -1
- package/Policy/index.d.ts +2 -2
- package/Policy/index.js +18 -9
- package/Policy/index.min.js +1 -1
- package/Profile/Profile.d.ts +175 -175
- package/Profile/Profile.js +35 -36
- package/Profile/Profile.min.js +1 -1
- package/Profile/ProfileClient.d.ts +86 -86
- package/Profile/ProfileClient.js +277 -347
- package/Profile/ProfileClient.min.js +1 -1
- package/Profile/index.d.ts +2 -2
- package/Profile/index.js +18 -9
- package/Profile/index.min.js +1 -1
- package/ProjectAnalysis/ProjectAnalysis.d.ts +59 -59
- package/ProjectAnalysis/ProjectAnalysis.js +18 -19
- package/ProjectAnalysis/ProjectAnalysis.min.js +1 -1
- package/ProjectAnalysis/ProjectAnalysisClient.d.ts +34 -34
- package/ProjectAnalysis/ProjectAnalysisClient.js +110 -159
- package/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -1
- package/ProjectAnalysis/index.d.ts +2 -2
- package/ProjectAnalysis/index.js +18 -9
- package/ProjectAnalysis/index.min.js +1 -1
- package/README.md +57 -1
- package/Release/Release.d.ts +4068 -4068
- package/Release/Release.js +876 -877
- package/Release/Release.min.js +1 -1
- package/Release/ReleaseClient.d.ts +720 -720
- package/Release/ReleaseClient.js +2003 -2273
- package/Release/ReleaseClient.min.js +1 -1
- package/Release/index.d.ts +2 -2
- package/Release/index.js +18 -9
- package/Release/index.min.js +1 -1
- package/ResourceUsage/ResourceUsage.d.ts +13 -13
- package/ResourceUsage/ResourceUsage.js +7 -9
- package/ResourceUsage/ResourceUsage.min.js +1 -1
- package/ResourceUsage/ResourceUsageClient.d.ts +20 -20
- package/ResourceUsage/ResourceUsageClient.js +51 -93
- package/ResourceUsage/ResourceUsageClient.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpoint.d.ts +894 -894
- package/ServiceEndpoint/ServiceEndpoint.js +84 -85
- package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpointClient.d.ts +190 -190
- package/ServiceEndpoint/ServiceEndpointClient.js +556 -669
- package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
- package/ServiceEndpoint/index.d.ts +2 -2
- package/ServiceEndpoint/index.js +18 -9
- package/ServiceEndpoint/index.min.js +1 -1
- package/ServiceHooks/ServiceHooks.d.ts +762 -758
- package/ServiceHooks/ServiceHooks.js +114 -115
- package/ServiceHooks/ServiceHooks.min.js +1 -1
- package/ServiceHooks/ServiceHooksClient.d.ts +156 -156
- package/ServiceHooks/ServiceHooksClient.js +434 -526
- package/ServiceHooks/ServiceHooksClient.min.js +1 -1
- package/ServiceHooks/index.d.ts +2 -2
- package/ServiceHooks/index.js +18 -9
- package/ServiceHooks/index.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +3777 -3777
- package/TaskAgent/TaskAgent.js +594 -594
- package/TaskAgent/TaskAgent.min.js +1 -1
- package/TaskAgent/TaskAgentClient.d.ts +1085 -1073
- package/TaskAgent/TaskAgentClient.js +3273 -3731
- package/TaskAgent/TaskAgentClient.min.js +1 -1
- package/TaskAgent/index.d.ts +2 -2
- package/TaskAgent/index.js +18 -9
- package/TaskAgent/index.min.js +1 -1
- package/Test/Test.d.ts +5918 -5874
- package/Test/Test.js +1068 -1069
- package/Test/Test.min.js +1 -1
- package/Test/TestClient.d.ts +635 -635
- package/Test/TestClient.js +1822 -2088
- package/Test/TestClient.min.js +1 -1
- package/Test/index.d.ts +2 -2
- package/Test/index.js +18 -9
- package/Test/index.min.js +1 -1
- package/TestPlan/TestPlan.d.ts +1616 -1616
- package/TestPlan/TestPlan.js +270 -271
- package/TestPlan/TestPlan.min.js +1 -1
- package/TestPlan/TestPlanClient.d.ts +408 -408
- package/TestPlan/TestPlanClient.js +1160 -1387
- package/TestPlan/TestPlanClient.min.js +1 -1
- package/TestPlan/index.d.ts +2 -2
- package/TestPlan/index.js +18 -9
- package/TestPlan/index.min.js +1 -1
- package/TestResults/TestResults.d.ts +5 -5
- package/TestResults/TestResults.js +7 -9
- package/TestResults/TestResults.min.js +1 -1
- package/TestResults/TestResultsClient.d.ts +1060 -1039
- package/TestResults/TestResultsClient.js +3099 -3491
- package/TestResults/TestResultsClient.min.js +1 -1
- package/TestResults/index.d.ts +2 -2
- package/TestResults/index.js +18 -8
- package/TestResults/index.min.js +1 -1
- package/Tfvc/Tfvc.d.ts +773 -730
- package/Tfvc/Tfvc.js +151 -107
- package/Tfvc/Tfvc.min.js +1 -1
- package/Tfvc/TfvcClient.d.ts +227 -227
- package/Tfvc/TfvcClient.js +620 -732
- package/Tfvc/TfvcClient.min.js +1 -1
- package/Tfvc/index.d.ts +2 -2
- package/Tfvc/index.js +18 -9
- package/Tfvc/index.min.js +1 -1
- package/WebApi/WebApi.d.ts +408 -408
- package/WebApi/WebApi.js +55 -56
- package/WebApi/WebApi.min.js +1 -1
- package/WebApi/index.d.ts +1 -1
- package/WebApi/index.js +17 -8
- package/WebApi/index.min.js +1 -1
- package/Wiki/Wiki.d.ts +328 -328
- package/Wiki/Wiki.js +22 -23
- package/Wiki/Wiki.min.js +1 -1
- package/Wiki/WikiClient.d.ts +218 -218
- package/Wiki/WikiClient.js +585 -684
- package/Wiki/WikiClient.min.js +1 -1
- package/Wiki/index.d.ts +2 -2
- package/Wiki/index.js +18 -9
- package/Wiki/index.min.js +1 -1
- package/Work/Work.d.ts +1298 -1298
- package/Work/Work.js +187 -188
- package/Work/Work.min.js +1 -1
- package/Work/WorkClient.d.ts +421 -421
- package/Work/WorkClient.js +1255 -1455
- package/Work/WorkClient.min.js +1 -1
- package/Work/index.d.ts +2 -2
- package/Work/index.js +18 -9
- package/Work/index.min.js +1 -1
- package/WorkItemTracking/WorkItemTracking.d.ts +2158 -2158
- package/WorkItemTracking/WorkItemTracking.js +431 -432
- package/WorkItemTracking/WorkItemTracking.min.js +1 -1
- package/WorkItemTracking/WorkItemTrackingClient.d.ts +624 -624
- package/WorkItemTracking/WorkItemTrackingClient.js +1688 -1918
- package/WorkItemTracking/WorkItemTrackingClient.min.js +1 -1
- package/WorkItemTracking/WorkItemTrackingServices.d.ts +320 -320
- package/WorkItemTracking/WorkItemTrackingServices.js +18 -19
- package/WorkItemTracking/WorkItemTrackingServices.min.js +1 -1
- package/WorkItemTracking/index.d.ts +3 -3
- package/WorkItemTracking/index.js +19 -10
- package/WorkItemTracking/index.min.js +1 -1
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +1238 -1238
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +299 -300
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -1
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.d.ts +462 -462
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1224 -1386
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -1
- package/WorkItemTrackingProcess/index.d.ts +2 -2
- package/WorkItemTrackingProcess/index.js +18 -9
- package/WorkItemTrackingProcess/index.min.js +1 -1
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +575 -575
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +96 -97
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -1
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.d.ts +376 -376
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +991 -1126
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -1
- package/WorkItemTrackingProcessDefinitions/index.d.ts +2 -2
- package/WorkItemTrackingProcessDefinitions/index.js +18 -9
- package/WorkItemTrackingProcessDefinitions/index.min.js +1 -1
- package/_manifest/Spdx2xVs3xComparisonToolOutput.json +4 -4
- package/_manifest/spdx_2.2/ESRPClientLogs0512212427548.json +1 -0
- package/_manifest/spdx_2.2/bsi.cose +0 -0
- package/_manifest/spdx_2.2/bsi.json +1 -1
- package/_manifest/spdx_2.2/manifest.cat +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.json +1 -1
- package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
- package/_manifest/spdx_3.0/manifest.spdx.json +1 -1
- package/_manifest/spdx_3.0/manifest.spdx.json.sha256 +1 -1
- package/esm/Accounts/Accounts.js +58 -0
- package/esm/Accounts/Accounts.min.js +1 -0
- package/esm/Accounts/AccountsClient.js +59 -0
- package/esm/Accounts/AccountsClient.min.js +1 -0
- package/esm/Accounts/index.js +2 -0
- package/esm/Accounts/index.min.js +1 -0
- package/esm/AdvancedSecurity.Reporting/Reporting.js +200 -0
- package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
- package/esm/AdvancedSecurity.Reporting/ReportingClient.js +228 -0
- package/esm/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -0
- package/esm/Alert/Alert.js +422 -0
- package/esm/Alert/Alert.min.js +1 -0
- package/esm/Alert/AlertClient.js +499 -0
- package/esm/Alert/AlertClient.min.js +1 -0
- package/esm/Build/Build.js +610 -0
- package/esm/Build/Build.min.js +1 -0
- package/esm/Build/BuildClient.js +2108 -0
- package/esm/Build/BuildClient.min.js +1 -0
- package/esm/Build/BuildServices.js +10 -0
- package/esm/Build/BuildServices.min.js +1 -0
- package/esm/Build/index.js +3 -0
- package/esm/Build/index.min.js +1 -0
- package/esm/Comments/Comments.js +90 -0
- package/esm/Comments/Comments.min.js +1 -0
- package/esm/Comments/index.js +1 -0
- package/esm/Comments/index.min.js +1 -0
- package/esm/Common/Client.js +22 -0
- package/esm/Common/Client.min.js +1 -0
- package/esm/Common/CommonServices.js +68 -0
- package/esm/Common/CommonServices.min.js +1 -0
- package/esm/Common/Context.js +1 -0
- package/esm/Common/Fetch.js +117 -0
- package/esm/Common/Fetch.min.js +1 -0
- package/esm/Common/RestClientBase.js +92 -0
- package/esm/Common/RestClientBase.min.js +1 -0
- package/esm/Common/System.js +36 -0
- package/esm/Common/System.min.js +1 -0
- package/esm/Common/SystemData.js +135 -0
- package/esm/Common/SystemData.min.js +1 -0
- package/esm/Common/Util/Serialization.js +48 -0
- package/esm/Common/Util/Serialization.min.js +1 -0
- package/esm/Common/Util/Url.js +595 -0
- package/esm/Common/Util/Url.min.js +1 -0
- package/esm/Common/index.js +3 -0
- package/esm/Common/index.min.js +1 -0
- package/esm/Contributions/Contributions.js +182 -0
- package/esm/Contributions/Contributions.min.js +1 -0
- package/esm/Contributions/ContributionsClient.js +78 -0
- package/esm/Contributions/ContributionsClient.min.js +1 -0
- package/esm/Contributions/index.js +2 -0
- package/esm/Contributions/index.min.js +1 -0
- package/esm/Core/Core.js +76 -0
- package/esm/Core/Core.min.js +1 -0
- package/esm/Core/CoreClient.js +573 -0
- package/esm/Core/CoreClient.min.js +1 -0
- package/esm/Core/index.js +2 -0
- package/esm/Core/index.min.js +1 -0
- package/esm/Dashboard/Dashboard.js +53 -0
- package/esm/Dashboard/Dashboard.min.js +1 -0
- package/esm/Dashboard/DashboardClient.js +278 -0
- package/esm/Dashboard/DashboardClient.min.js +1 -0
- package/esm/Dashboard/WidgetConfigHelpers.js +37 -0
- package/esm/Dashboard/WidgetConfigHelpers.min.js +1 -0
- package/esm/Dashboard/WidgetContracts.js +21 -0
- package/esm/Dashboard/WidgetContracts.min.js +1 -0
- package/esm/Dashboard/WidgetHelpers.js +129 -0
- package/esm/Dashboard/WidgetHelpers.min.js +1 -0
- package/esm/Dashboard/index.js +5 -0
- package/esm/Dashboard/index.min.js +1 -0
- package/esm/DistributedTaskCommon/DistributedTaskCommon.js +6 -0
- package/esm/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -0
- package/esm/DistributedTaskCommon/index.js +1 -0
- package/esm/DistributedTaskCommon/index.min.js +1 -0
- package/esm/ExtensionManagement/ExtensionManagement.js +281 -0
- package/esm/ExtensionManagement/ExtensionManagement.min.js +1 -0
- package/esm/ExtensionManagement/ExtensionManagementClient.js +486 -0
- package/esm/ExtensionManagement/ExtensionManagementClient.min.js +1 -0
- package/esm/ExtensionManagement/index.js +2 -0
- package/esm/ExtensionManagement/index.min.js +1 -0
- package/esm/Favorite/Favorite.js +6 -0
- package/esm/Favorite/Favorite.min.js +1 -0
- package/esm/Favorite/FavoriteClient.js +214 -0
- package/esm/Favorite/FavoriteClient.min.js +1 -0
- package/esm/FeatureAvailability/FeatureAvailability.js +6 -0
- package/esm/FeatureAvailability/FeatureAvailability.min.js +1 -0
- package/esm/FeatureAvailability/FeatureAvailabilityClient.js +113 -0
- package/esm/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -0
- package/esm/FeatureAvailability/index.js +2 -0
- package/esm/FeatureAvailability/index.min.js +1 -0
- package/esm/FeatureManagement/FeatureManagement.js +23 -0
- package/esm/FeatureManagement/FeatureManagement.min.js +1 -0
- package/esm/FeatureManagement/FeatureManagementClient.js +183 -0
- package/esm/FeatureManagement/FeatureManagementClient.min.js +1 -0
- package/esm/FeatureManagement/index.js +2 -0
- package/esm/FeatureManagement/index.min.js +1 -0
- package/esm/FileContainer/FileContainer.js +55 -0
- package/esm/FileContainer/FileContainer.min.js +1 -0
- package/esm/FileContainer/FileContainerClient.js +111 -0
- package/esm/FileContainer/FileContainerClient.min.js +1 -0
- package/esm/FileContainer/index.js +2 -0
- package/esm/FileContainer/index.min.js +1 -0
- package/esm/FormInput/FormInput.js +74 -0
- package/esm/FormInput/FormInput.min.js +1 -0
- package/esm/FormInput/index.js +1 -0
- package/esm/FormInput/index.min.js +1 -0
- package/esm/Gallery/Gallery.js +785 -0
- package/esm/Gallery/Gallery.min.js +1 -0
- package/esm/Gallery/GalleryClient.js +1699 -0
- package/esm/Gallery/GalleryClient.min.js +1 -0
- package/esm/Gallery/index.js +2 -0
- package/esm/Gallery/index.min.js +1 -0
- package/esm/Git/CodeEditorTypes.js +24 -0
- package/esm/Git/CodeEditorTypes.min.js +1 -0
- package/esm/Git/Git.js +827 -0
- package/esm/Git/Git.min.js +1 -0
- package/esm/Git/GitClient.js +3571 -0
- package/esm/Git/GitClient.min.js +1 -0
- package/esm/Git/GitServices.js +7 -0
- package/esm/Git/GitServices.min.js +1 -0
- package/esm/Git/index.js +4 -0
- package/esm/Git/index.min.js +1 -0
- package/esm/Graph/Graph.js +11 -0
- package/esm/Graph/Graph.min.js +1 -0
- package/esm/Graph/GraphClient.js +644 -0
- package/esm/Graph/GraphClient.min.js +1 -0
- package/esm/Graph/index.js +2 -0
- package/esm/Graph/index.min.js +1 -0
- package/esm/Identities/Identities.js +46 -0
- package/esm/Identities/Identities.min.js +1 -0
- package/esm/Identities/IdentityProvider.js +43 -0
- package/esm/Identities/IdentityProvider.min.js +1 -0
- package/esm/Identities/IdentityService.js +10 -0
- package/esm/Identities/IdentityService.min.js +1 -0
- package/esm/Identities/index.js +3 -0
- package/esm/Identities/index.min.js +1 -0
- package/esm/Locations/Locations.js +25 -0
- package/esm/Locations/Locations.min.js +1 -0
- package/esm/Locations/LocationsClient.js +178 -0
- package/esm/Locations/LocationsClient.min.js +1 -0
- package/esm/Locations/index.js +2 -0
- package/esm/Locations/index.min.js +1 -0
- package/esm/Management/Management.js +24 -0
- package/esm/Management/Management.min.js +1 -0
- package/esm/Management/ManagementClient.js +358 -0
- package/esm/Management/ManagementClient.min.js +1 -0
- package/esm/Notification/Notification.js +382 -0
- package/esm/Notification/Notification.min.js +1 -0
- package/esm/Notification/NotificationClient.js +359 -0
- package/esm/Notification/NotificationClient.min.js +1 -0
- package/esm/Notification/index.js +2 -0
- package/esm/Notification/index.min.js +1 -0
- package/esm/Operations/Operations.js +35 -0
- package/esm/Operations/Operations.min.js +1 -0
- package/esm/Operations/OperationsClient.js +30 -0
- package/esm/Operations/OperationsClient.min.js +1 -0
- package/esm/Operations/index.js +2 -0
- package/esm/Operations/index.min.js +1 -0
- package/esm/Pipelines/Pipelines.js +79 -0
- package/esm/Pipelines/Pipelines.min.js +1 -0
- package/esm/Pipelines/PipelinesClient.js +227 -0
- package/esm/Pipelines/PipelinesClient.min.js +1 -0
- package/esm/Policy/Policy.js +35 -0
- package/esm/Policy/Policy.min.js +1 -0
- package/esm/Policy/PolicyClient.js +237 -0
- package/esm/Policy/PolicyClient.min.js +1 -0
- package/esm/Policy/index.js +2 -0
- package/esm/Policy/index.min.js +1 -0
- package/esm/Profile/Profile.js +32 -0
- package/esm/Profile/Profile.min.js +1 -0
- package/esm/Profile/ProfileClient.js +240 -0
- package/esm/Profile/ProfileClient.min.js +1 -0
- package/esm/Profile/index.js +2 -0
- package/esm/Profile/index.min.js +1 -0
- package/esm/ProjectAnalysis/ProjectAnalysis.js +15 -0
- package/esm/ProjectAnalysis/ProjectAnalysis.min.js +1 -0
- package/esm/ProjectAnalysis/ProjectAnalysisClient.js +89 -0
- package/esm/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -0
- package/esm/ProjectAnalysis/index.js +2 -0
- package/esm/ProjectAnalysis/index.min.js +1 -0
- package/esm/Release/Release.js +873 -0
- package/esm/Release/Release.min.js +1 -0
- package/esm/Release/ReleaseClient.js +1816 -0
- package/esm/Release/ReleaseClient.min.js +1 -0
- package/esm/Release/index.js +2 -0
- package/esm/Release/index.min.js +1 -0
- package/esm/ResourceUsage/ResourceUsage.js +6 -0
- package/esm/ResourceUsage/ResourceUsage.min.js +1 -0
- package/esm/ResourceUsage/ResourceUsageClient.js +34 -0
- package/esm/ResourceUsage/ResourceUsageClient.min.js +1 -0
- package/esm/ServiceEndpoint/ServiceEndpoint.js +81 -0
- package/esm/ServiceEndpoint/ServiceEndpoint.min.js +1 -0
- package/esm/ServiceEndpoint/ServiceEndpointClient.js +489 -0
- package/esm/ServiceEndpoint/ServiceEndpointClient.min.js +1 -0
- package/esm/ServiceEndpoint/index.js +2 -0
- package/esm/ServiceEndpoint/index.min.js +1 -0
- package/esm/ServiceHooks/ServiceHooks.js +111 -0
- package/esm/ServiceHooks/ServiceHooks.min.js +1 -0
- package/esm/ServiceHooks/ServiceHooksClient.js +375 -0
- package/esm/ServiceHooks/ServiceHooksClient.min.js +1 -0
- package/esm/ServiceHooks/index.js +2 -0
- package/esm/ServiceHooks/index.min.js +1 -0
- package/esm/TaskAgent/TaskAgent.js +590 -0
- package/esm/TaskAgent/TaskAgent.min.js +1 -0
- package/esm/TaskAgent/TaskAgentClient.js +2946 -0
- package/esm/TaskAgent/TaskAgentClient.min.js +1 -0
- package/esm/TaskAgent/index.js +2 -0
- package/esm/TaskAgent/index.min.js +1 -0
- package/esm/Test/Test.js +1065 -0
- package/esm/Test/Test.min.js +1 -0
- package/esm/Test/TestClient.js +1655 -0
- package/esm/Test/TestClient.min.js +1 -0
- package/esm/Test/index.js +2 -0
- package/esm/Test/index.min.js +1 -0
- package/esm/TestPlan/TestPlan.js +267 -0
- package/esm/TestPlan/TestPlan.min.js +1 -0
- package/esm/TestPlan/TestPlanClient.js +1051 -0
- package/esm/TestPlan/TestPlanClient.min.js +1 -0
- package/esm/TestPlan/index.js +2 -0
- package/esm/TestPlan/index.min.js +1 -0
- package/esm/TestResults/TestResults.js +6 -0
- package/esm/TestResults/TestResults.min.js +1 -0
- package/esm/TestResults/TestResultsClient.js +2822 -0
- package/esm/TestResults/TestResultsClient.min.js +1 -0
- package/esm/TestResults/index.js +2 -0
- package/esm/TestResults/index.min.js +1 -0
- package/esm/Tfvc/Tfvc.js +148 -0
- package/esm/Tfvc/Tfvc.min.js +1 -0
- package/esm/Tfvc/TfvcClient.js +559 -0
- package/esm/Tfvc/TfvcClient.min.js +1 -0
- package/esm/Tfvc/index.js +2 -0
- package/esm/Tfvc/index.min.js +1 -0
- package/esm/WebApi/WebApi.js +52 -0
- package/esm/WebApi/WebApi.min.js +1 -0
- package/esm/WebApi/index.js +1 -0
- package/esm/WebApi/index.min.js +1 -0
- package/esm/Wiki/Wiki.js +19 -0
- package/esm/Wiki/Wiki.min.js +1 -0
- package/esm/Wiki/WikiClient.js +528 -0
- package/esm/Wiki/WikiClient.min.js +1 -0
- package/esm/Wiki/index.js +2 -0
- package/esm/Wiki/index.min.js +1 -0
- package/esm/Work/Work.js +184 -0
- package/esm/Work/Work.min.js +1 -0
- package/esm/Work/WorkClient.js +1128 -0
- package/esm/Work/WorkClient.min.js +1 -0
- package/esm/Work/index.js +2 -0
- package/esm/Work/index.min.js +1 -0
- package/esm/WorkItemTracking/WorkItemTracking.js +428 -0
- package/esm/WorkItemTracking/WorkItemTracking.min.js +1 -0
- package/esm/WorkItemTracking/WorkItemTrackingClient.js +1525 -0
- package/esm/WorkItemTracking/WorkItemTrackingClient.min.js +1 -0
- package/esm/WorkItemTracking/WorkItemTrackingServices.js +15 -0
- package/esm/WorkItemTracking/WorkItemTrackingServices.min.js +1 -0
- package/esm/WorkItemTracking/index.js +3 -0
- package/esm/WorkItemTracking/index.min.js +1 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.js +296 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1097 -0
- package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -0
- package/esm/WorkItemTrackingProcess/index.js +2 -0
- package/esm/WorkItemTrackingProcess/index.min.js +1 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +93 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +886 -0
- package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -0
- package/esm/WorkItemTrackingProcessDefinitions/index.js +2 -0
- package/esm/WorkItemTrackingProcessDefinitions/index.min.js +1 -0
- package/esm/index.js +1 -0
- package/esm/index.min.js +1 -0
- package/index.d.ts +1 -1
- package/index.js +17 -8
- package/index.min.js +1 -1
- package/package.json +232 -37
- package/Boards/Boards.d.ts +0 -631
- package/Boards/Boards.js +0 -26
- package/Boards/Boards.min.js +0 -1
- package/Boards/BoardsClient.d.ts +0 -187
- package/Boards/BoardsClient.js +0 -589
- package/Boards/BoardsClient.min.js +0 -1
- package/Boards/index.d.ts +0 -2
- package/Boards/index.js +0 -9
- package/Boards/index.min.js +0 -1
- package/_manifest/spdx_2.2/ESRPClientLogs0331143549591.json +0 -1
- package/_manifest/spdx_3.0/ESRPClientLogs0331143549461.json +0 -1
- package/_manifest/spdx_3.0/bsi.cose +0 -0
- package/_manifest/spdx_3.0/bsi.json +0 -1
- package/_manifest/spdx_3.0/manifest.cat +0 -0
- package/_manifest/spdx_3.0/manifest.spdx.cose +0 -0
|
@@ -0,0 +1,2108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ---------------------------------------------------------
|
|
3
|
+
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* ---------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
import { RestClientBase } from "../Common/RestClientBase";
|
|
7
|
+
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
|
|
8
|
+
export class BuildRestClient extends RestClientBase {
|
|
9
|
+
constructor(options) {
|
|
10
|
+
super(options);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Associates an artifact with a build.
|
|
14
|
+
*
|
|
15
|
+
* @param artifact - The artifact.
|
|
16
|
+
* @param project - Project ID or project name
|
|
17
|
+
* @param buildId - The ID of the build.
|
|
18
|
+
*/
|
|
19
|
+
async createArtifact(artifact, project, buildId) {
|
|
20
|
+
return this.beginRequest({
|
|
21
|
+
apiVersion: "7.2-preview.5",
|
|
22
|
+
method: "POST",
|
|
23
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
|
|
24
|
+
routeValues: {
|
|
25
|
+
project: project,
|
|
26
|
+
buildId: buildId
|
|
27
|
+
},
|
|
28
|
+
body: artifact
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets a specific artifact for a build.
|
|
33
|
+
*
|
|
34
|
+
* @param project - Project ID or project name
|
|
35
|
+
* @param buildId - The ID of the build.
|
|
36
|
+
* @param artifactName - The name of the artifact.
|
|
37
|
+
*/
|
|
38
|
+
async getArtifact(project, buildId, artifactName) {
|
|
39
|
+
const queryValues = {
|
|
40
|
+
artifactName: artifactName
|
|
41
|
+
};
|
|
42
|
+
return this.beginRequest({
|
|
43
|
+
apiVersion: "7.2-preview.5",
|
|
44
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
|
|
45
|
+
routeValues: {
|
|
46
|
+
project: project,
|
|
47
|
+
buildId: buildId
|
|
48
|
+
},
|
|
49
|
+
queryParams: queryValues
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Gets a specific artifact for a build.
|
|
54
|
+
*
|
|
55
|
+
* @param project - Project ID or project name
|
|
56
|
+
* @param buildId - The ID of the build.
|
|
57
|
+
* @param artifactName - The name of the artifact.
|
|
58
|
+
*/
|
|
59
|
+
async getArtifactContentZip(project, buildId, artifactName) {
|
|
60
|
+
const queryValues = {
|
|
61
|
+
artifactName: artifactName
|
|
62
|
+
};
|
|
63
|
+
return this.beginRequest({
|
|
64
|
+
apiVersion: "7.2-preview.5",
|
|
65
|
+
httpResponseType: "application/zip",
|
|
66
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
|
|
67
|
+
routeValues: {
|
|
68
|
+
project: project,
|
|
69
|
+
buildId: buildId
|
|
70
|
+
},
|
|
71
|
+
queryParams: queryValues
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Gets all artifacts for a build.
|
|
76
|
+
*
|
|
77
|
+
* @param project - Project ID or project name
|
|
78
|
+
* @param buildId - The ID of the build.
|
|
79
|
+
*/
|
|
80
|
+
async getArtifacts(project, buildId) {
|
|
81
|
+
return this.beginRequest({
|
|
82
|
+
apiVersion: "7.2-preview.5",
|
|
83
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
|
|
84
|
+
routeValues: {
|
|
85
|
+
project: project,
|
|
86
|
+
buildId: buildId
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Gets a file from the build.
|
|
92
|
+
*
|
|
93
|
+
* @param project - Project ID or project name
|
|
94
|
+
* @param buildId - The ID of the build.
|
|
95
|
+
* @param artifactName - The name of the artifact.
|
|
96
|
+
* @param fileId - The primary key for the file.
|
|
97
|
+
* @param fileName - The name that the file will be set to.
|
|
98
|
+
*/
|
|
99
|
+
async getFile(project, buildId, artifactName, fileId, fileName) {
|
|
100
|
+
const queryValues = {
|
|
101
|
+
artifactName: artifactName,
|
|
102
|
+
fileId: fileId,
|
|
103
|
+
fileName: fileName
|
|
104
|
+
};
|
|
105
|
+
return this.beginRequest({
|
|
106
|
+
apiVersion: "7.2-preview.5",
|
|
107
|
+
httpResponseType: "application/octet-stream",
|
|
108
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
|
|
109
|
+
routeValues: {
|
|
110
|
+
project: project,
|
|
111
|
+
buildId: buildId
|
|
112
|
+
},
|
|
113
|
+
queryParams: queryValues
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Gets the list of attachments of a specific type that are associated with a build.
|
|
118
|
+
*
|
|
119
|
+
* @param project - Project ID or project name
|
|
120
|
+
* @param buildId - The ID of the build.
|
|
121
|
+
* @param type - The type of attachment.
|
|
122
|
+
*/
|
|
123
|
+
async getAttachments(project, buildId, type) {
|
|
124
|
+
return this.beginRequest({
|
|
125
|
+
apiVersion: "7.2-preview.2",
|
|
126
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/attachments/{type}",
|
|
127
|
+
routeValues: {
|
|
128
|
+
project: project,
|
|
129
|
+
buildId: buildId,
|
|
130
|
+
type: type
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Gets a specific attachment.
|
|
136
|
+
*
|
|
137
|
+
* @param project - Project ID or project name
|
|
138
|
+
* @param buildId - The ID of the build.
|
|
139
|
+
* @param timelineId - The ID of the timeline.
|
|
140
|
+
* @param recordId - The ID of the timeline record.
|
|
141
|
+
* @param type - The type of the attachment.
|
|
142
|
+
* @param name - The name of the attachment.
|
|
143
|
+
*/
|
|
144
|
+
async getAttachment(project, buildId, timelineId, recordId, type, name) {
|
|
145
|
+
return this.beginRequest({
|
|
146
|
+
apiVersion: "7.2-preview.2",
|
|
147
|
+
httpResponseType: "application/octet-stream",
|
|
148
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}",
|
|
149
|
+
routeValues: {
|
|
150
|
+
project: project,
|
|
151
|
+
buildId: buildId,
|
|
152
|
+
timelineId: timelineId,
|
|
153
|
+
recordId: recordId,
|
|
154
|
+
type: type,
|
|
155
|
+
name: name
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @param resources -
|
|
161
|
+
* @param project - Project ID or project name
|
|
162
|
+
*/
|
|
163
|
+
async authorizeProjectResources(resources, project) {
|
|
164
|
+
return this.beginRequest({
|
|
165
|
+
apiVersion: "7.2-preview.1",
|
|
166
|
+
method: "PATCH",
|
|
167
|
+
routeTemplate: "{project}/_apis/build/authorizedresources",
|
|
168
|
+
routeValues: {
|
|
169
|
+
project: project
|
|
170
|
+
},
|
|
171
|
+
body: resources
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @param project - Project ID or project name
|
|
176
|
+
* @param type -
|
|
177
|
+
* @param id -
|
|
178
|
+
*/
|
|
179
|
+
async getProjectResources(project, type, id) {
|
|
180
|
+
const queryValues = {
|
|
181
|
+
type: type,
|
|
182
|
+
id: id
|
|
183
|
+
};
|
|
184
|
+
return this.beginRequest({
|
|
185
|
+
apiVersion: "7.2-preview.1",
|
|
186
|
+
routeTemplate: "{project}/_apis/build/authorizedresources",
|
|
187
|
+
routeValues: {
|
|
188
|
+
project: project
|
|
189
|
+
},
|
|
190
|
+
queryParams: queryValues
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge.
|
|
195
|
+
*
|
|
196
|
+
* @param project - The project ID or name.
|
|
197
|
+
* @param definitionId - The ID of the definition.
|
|
198
|
+
* @param branchName - The name of the branch.
|
|
199
|
+
*/
|
|
200
|
+
async getBadge(project, definitionId, branchName) {
|
|
201
|
+
const queryValues = {
|
|
202
|
+
branchName: branchName
|
|
203
|
+
};
|
|
204
|
+
return this.beginRequest({
|
|
205
|
+
apiVersion: "7.2-preview.2",
|
|
206
|
+
routeTemplate: "_apis/public/build/definitions/{project}/{definitionId}/badge",
|
|
207
|
+
routeValues: {
|
|
208
|
+
project: project,
|
|
209
|
+
definitionId: definitionId
|
|
210
|
+
},
|
|
211
|
+
queryParams: queryValues
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Gets a list of branches for the given source code repository.
|
|
216
|
+
*
|
|
217
|
+
* @param project - Project ID or project name
|
|
218
|
+
* @param providerName - The name of the source provider.
|
|
219
|
+
* @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
|
220
|
+
* @param repository - The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
|
|
221
|
+
* @param branchName - If supplied, the name of the branch to check for specifically.
|
|
222
|
+
*/
|
|
223
|
+
async listBranches(project, providerName, serviceEndpointId, repository, branchName) {
|
|
224
|
+
const queryValues = {
|
|
225
|
+
serviceEndpointId: serviceEndpointId,
|
|
226
|
+
repository: repository,
|
|
227
|
+
branchName: branchName
|
|
228
|
+
};
|
|
229
|
+
return this.beginRequest({
|
|
230
|
+
apiVersion: "7.2-preview.1",
|
|
231
|
+
routeTemplate: "{project}/_apis/sourceProviders/{providerName}/branches",
|
|
232
|
+
routeValues: {
|
|
233
|
+
project: project,
|
|
234
|
+
providerName: providerName
|
|
235
|
+
},
|
|
236
|
+
queryParams: queryValues
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Gets a badge that indicates the status of the most recent build for the specified branch.
|
|
241
|
+
*
|
|
242
|
+
* @param project - Project ID or project name
|
|
243
|
+
* @param repoType - The repository type.
|
|
244
|
+
* @param repoId - The repository ID.
|
|
245
|
+
* @param branchName - The branch name.
|
|
246
|
+
*/
|
|
247
|
+
async getBuildBadge(project, repoType, repoId, branchName) {
|
|
248
|
+
const queryValues = {
|
|
249
|
+
repoId: repoId,
|
|
250
|
+
branchName: branchName
|
|
251
|
+
};
|
|
252
|
+
return this.beginRequest({
|
|
253
|
+
apiVersion: "7.2-preview.2",
|
|
254
|
+
routeTemplate: "{project}/_apis/build/repos/{repoType}/badge",
|
|
255
|
+
routeValues: {
|
|
256
|
+
project: project,
|
|
257
|
+
repoType: repoType
|
|
258
|
+
},
|
|
259
|
+
queryParams: queryValues
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Gets a badge that indicates the status of the most recent build for the specified branch.
|
|
264
|
+
*
|
|
265
|
+
* @param project - Project ID or project name
|
|
266
|
+
* @param repoType - The repository type.
|
|
267
|
+
* @param repoId - The repository ID.
|
|
268
|
+
* @param branchName - The branch name.
|
|
269
|
+
*/
|
|
270
|
+
async getBuildBadgeData(project, repoType, repoId, branchName) {
|
|
271
|
+
const queryValues = {
|
|
272
|
+
repoId: repoId,
|
|
273
|
+
branchName: branchName
|
|
274
|
+
};
|
|
275
|
+
return this.beginRequest({
|
|
276
|
+
apiVersion: "7.2-preview.2",
|
|
277
|
+
routeTemplate: "{project}/_apis/build/repos/{repoType}/badge",
|
|
278
|
+
routeValues: {
|
|
279
|
+
project: project,
|
|
280
|
+
repoType: repoType
|
|
281
|
+
},
|
|
282
|
+
queryParams: queryValues
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Gets all retention leases that apply to a specific build.
|
|
287
|
+
*
|
|
288
|
+
* @param project - Project ID or project name
|
|
289
|
+
* @param buildId - The ID of the build.
|
|
290
|
+
*/
|
|
291
|
+
async getRetentionLeasesForBuild(project, buildId) {
|
|
292
|
+
return this.beginRequest({
|
|
293
|
+
apiVersion: "7.2-preview.1",
|
|
294
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/leases",
|
|
295
|
+
routeValues: {
|
|
296
|
+
project: project,
|
|
297
|
+
buildId: buildId
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Deletes a build.
|
|
303
|
+
*
|
|
304
|
+
* @param project - Project ID or project name
|
|
305
|
+
* @param buildId - The ID of the build.
|
|
306
|
+
*/
|
|
307
|
+
async deleteBuild(project, buildId) {
|
|
308
|
+
return this.beginRequest({
|
|
309
|
+
apiVersion: "7.2-preview.8",
|
|
310
|
+
method: "DELETE",
|
|
311
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}",
|
|
312
|
+
routeValues: {
|
|
313
|
+
project: project,
|
|
314
|
+
buildId: buildId
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Gets a build
|
|
320
|
+
*
|
|
321
|
+
* @param project - Project ID or project name
|
|
322
|
+
* @param buildId -
|
|
323
|
+
* @param propertyFilters -
|
|
324
|
+
*/
|
|
325
|
+
async getBuild(project, buildId, propertyFilters) {
|
|
326
|
+
const queryValues = {
|
|
327
|
+
propertyFilters: propertyFilters
|
|
328
|
+
};
|
|
329
|
+
return this.beginRequest({
|
|
330
|
+
apiVersion: "7.2-preview.8",
|
|
331
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}",
|
|
332
|
+
routeValues: {
|
|
333
|
+
project: project,
|
|
334
|
+
buildId: buildId
|
|
335
|
+
},
|
|
336
|
+
queryParams: queryValues
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Gets a list of builds.
|
|
341
|
+
*
|
|
342
|
+
* @param project - Project ID or project name
|
|
343
|
+
* @param definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions.
|
|
344
|
+
* @param queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues.
|
|
345
|
+
* @param buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search.
|
|
346
|
+
* @param minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified.
|
|
347
|
+
* @param maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified.
|
|
348
|
+
* @param requestedFor - If specified, filters to builds requested for the specified user.
|
|
349
|
+
* @param reasonFilter - If specified, filters to builds that match this reason.
|
|
350
|
+
* @param statusFilter - If specified, filters to builds that match this status.
|
|
351
|
+
* @param resultFilter - If specified, filters to builds that match this result.
|
|
352
|
+
* @param tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags.
|
|
353
|
+
* @param properties - A comma-delimited list of properties to retrieve.
|
|
354
|
+
* @param top - The maximum number of builds to return.
|
|
355
|
+
* @param continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds.
|
|
356
|
+
* @param maxBuildsPerDefinition - The maximum number of builds to return per definition.
|
|
357
|
+
* @param deletedFilter - Indicates whether to exclude, include, or only return deleted builds.
|
|
358
|
+
* @param queryOrder - The order in which builds should be returned.
|
|
359
|
+
* @param branchName - If specified, filters to builds that built branches that built this branch.
|
|
360
|
+
* @param buildIds - A comma-delimited list that specifies the IDs of builds to retrieve.
|
|
361
|
+
* @param repositoryId - If specified, filters to builds that built from this repository.
|
|
362
|
+
* @param repositoryType - If specified, filters to builds that built from repositories of this type.
|
|
363
|
+
*/
|
|
364
|
+
async getBuilds(project, definitions, queues, buildNumber, minTime, maxTime, requestedFor, reasonFilter, statusFilter, resultFilter, tagFilters, properties, top, continuationToken, maxBuildsPerDefinition, deletedFilter, queryOrder, branchName, buildIds, repositoryId, repositoryType) {
|
|
365
|
+
const queryValues = {
|
|
366
|
+
definitions: definitions && definitions.join(","),
|
|
367
|
+
queues: queues && queues.join(","),
|
|
368
|
+
buildNumber: buildNumber,
|
|
369
|
+
minTime: minTime,
|
|
370
|
+
maxTime: maxTime,
|
|
371
|
+
requestedFor: requestedFor,
|
|
372
|
+
reasonFilter: reasonFilter,
|
|
373
|
+
statusFilter: statusFilter,
|
|
374
|
+
resultFilter: resultFilter,
|
|
375
|
+
tagFilters: tagFilters && tagFilters.join(","),
|
|
376
|
+
properties: properties && properties.join(","),
|
|
377
|
+
'$top': top,
|
|
378
|
+
continuationToken: continuationToken,
|
|
379
|
+
maxBuildsPerDefinition: maxBuildsPerDefinition,
|
|
380
|
+
deletedFilter: deletedFilter,
|
|
381
|
+
queryOrder: queryOrder,
|
|
382
|
+
branchName: branchName,
|
|
383
|
+
buildIds: buildIds && buildIds.join(","),
|
|
384
|
+
repositoryId: repositoryId,
|
|
385
|
+
repositoryType: repositoryType
|
|
386
|
+
};
|
|
387
|
+
return this.beginRequest({
|
|
388
|
+
apiVersion: "7.2-preview.8",
|
|
389
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}",
|
|
390
|
+
routeValues: {
|
|
391
|
+
project: project
|
|
392
|
+
},
|
|
393
|
+
queryParams: queryValues,
|
|
394
|
+
returnRawResponse: true
|
|
395
|
+
}).then(async (response) => {
|
|
396
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
397
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
398
|
+
return body;
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Queues a build
|
|
403
|
+
*
|
|
404
|
+
* @param build -
|
|
405
|
+
* @param project - Project ID or project name
|
|
406
|
+
* @param ignoreWarnings -
|
|
407
|
+
* @param checkInTicket -
|
|
408
|
+
* @param sourceBuildId -
|
|
409
|
+
* @param definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body
|
|
410
|
+
*/
|
|
411
|
+
async queueBuild(build, project, ignoreWarnings, checkInTicket, sourceBuildId, definitionId) {
|
|
412
|
+
const queryValues = {
|
|
413
|
+
ignoreWarnings: ignoreWarnings,
|
|
414
|
+
checkInTicket: checkInTicket,
|
|
415
|
+
sourceBuildId: sourceBuildId,
|
|
416
|
+
definitionId: definitionId
|
|
417
|
+
};
|
|
418
|
+
return this.beginRequest({
|
|
419
|
+
apiVersion: "7.2-preview.8",
|
|
420
|
+
method: "POST",
|
|
421
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}",
|
|
422
|
+
routeValues: {
|
|
423
|
+
project: project
|
|
424
|
+
},
|
|
425
|
+
queryParams: queryValues,
|
|
426
|
+
body: build
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Updates a build.
|
|
431
|
+
*
|
|
432
|
+
* @param build - The build.
|
|
433
|
+
* @param project - Project ID or project name
|
|
434
|
+
* @param buildId - The ID of the build.
|
|
435
|
+
* @param retry -
|
|
436
|
+
*/
|
|
437
|
+
async updateBuild(build, project, buildId, retry) {
|
|
438
|
+
const queryValues = {
|
|
439
|
+
retry: retry
|
|
440
|
+
};
|
|
441
|
+
return this.beginRequest({
|
|
442
|
+
apiVersion: "7.2-preview.8",
|
|
443
|
+
method: "PATCH",
|
|
444
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}",
|
|
445
|
+
routeValues: {
|
|
446
|
+
project: project,
|
|
447
|
+
buildId: buildId
|
|
448
|
+
},
|
|
449
|
+
queryParams: queryValues,
|
|
450
|
+
body: build
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Updates multiple builds.
|
|
455
|
+
*
|
|
456
|
+
* @param builds - The builds to update.
|
|
457
|
+
* @param project - Project ID or project name
|
|
458
|
+
*/
|
|
459
|
+
async updateBuilds(builds, project) {
|
|
460
|
+
return this.beginRequest({
|
|
461
|
+
apiVersion: "7.2-preview.8",
|
|
462
|
+
method: "PATCH",
|
|
463
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}",
|
|
464
|
+
routeValues: {
|
|
465
|
+
project: project
|
|
466
|
+
},
|
|
467
|
+
body: builds
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Gets the changes associated with a build
|
|
472
|
+
*
|
|
473
|
+
* @param project - Project ID or project name
|
|
474
|
+
* @param buildId -
|
|
475
|
+
* @param continuationToken -
|
|
476
|
+
* @param top - The maximum number of changes to return
|
|
477
|
+
* @param includeSourceChange -
|
|
478
|
+
*/
|
|
479
|
+
async getBuildChanges(project, buildId, continuationToken, top, includeSourceChange) {
|
|
480
|
+
const queryValues = {
|
|
481
|
+
continuationToken: continuationToken,
|
|
482
|
+
'$top': top,
|
|
483
|
+
includeSourceChange: includeSourceChange
|
|
484
|
+
};
|
|
485
|
+
return this.beginRequest({
|
|
486
|
+
apiVersion: "7.2-preview.2",
|
|
487
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/changes",
|
|
488
|
+
routeValues: {
|
|
489
|
+
project: project,
|
|
490
|
+
buildId: buildId
|
|
491
|
+
},
|
|
492
|
+
queryParams: queryValues,
|
|
493
|
+
returnRawResponse: true
|
|
494
|
+
}).then(async (response) => {
|
|
495
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
496
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
497
|
+
return body;
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Gets the changes made to the repository between two given builds.
|
|
502
|
+
*
|
|
503
|
+
* @param project - Project ID or project name
|
|
504
|
+
* @param fromBuildId - The ID of the first build.
|
|
505
|
+
* @param toBuildId - The ID of the last build.
|
|
506
|
+
* @param top - The maximum number of changes to return.
|
|
507
|
+
*/
|
|
508
|
+
async getChangesBetweenBuilds(project, fromBuildId, toBuildId, top) {
|
|
509
|
+
const queryValues = {
|
|
510
|
+
fromBuildId: fromBuildId,
|
|
511
|
+
toBuildId: toBuildId,
|
|
512
|
+
'$top': top
|
|
513
|
+
};
|
|
514
|
+
return this.beginRequest({
|
|
515
|
+
apiVersion: "7.2-preview.2",
|
|
516
|
+
routeTemplate: "{project}/_apis/build/changes",
|
|
517
|
+
routeValues: {
|
|
518
|
+
project: project
|
|
519
|
+
},
|
|
520
|
+
queryParams: queryValues
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Gets a controller
|
|
525
|
+
*
|
|
526
|
+
* @param controllerId -
|
|
527
|
+
*/
|
|
528
|
+
async getBuildController(controllerId) {
|
|
529
|
+
return this.beginRequest({
|
|
530
|
+
apiVersion: "7.2-preview.2",
|
|
531
|
+
routeTemplate: "_apis/build/Controllers/{controllerId}",
|
|
532
|
+
routeValues: {
|
|
533
|
+
controllerId: controllerId
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Gets controller, optionally filtered by name
|
|
539
|
+
*
|
|
540
|
+
* @param name -
|
|
541
|
+
*/
|
|
542
|
+
async getBuildControllers(name) {
|
|
543
|
+
const queryValues = {
|
|
544
|
+
name: name
|
|
545
|
+
};
|
|
546
|
+
return this.beginRequest({
|
|
547
|
+
apiVersion: "7.2-preview.2",
|
|
548
|
+
routeTemplate: "_apis/build/Controllers/{controllerId}",
|
|
549
|
+
queryParams: queryValues
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Creates a new definition.
|
|
554
|
+
*
|
|
555
|
+
* @param definition - The definition.
|
|
556
|
+
* @param project - Project ID or project name
|
|
557
|
+
* @param definitionToCloneId -
|
|
558
|
+
* @param definitionToCloneRevision -
|
|
559
|
+
*/
|
|
560
|
+
async createDefinition(definition, project, definitionToCloneId, definitionToCloneRevision) {
|
|
561
|
+
const queryValues = {
|
|
562
|
+
definitionToCloneId: definitionToCloneId,
|
|
563
|
+
definitionToCloneRevision: definitionToCloneRevision
|
|
564
|
+
};
|
|
565
|
+
return this.beginRequest({
|
|
566
|
+
apiVersion: "7.2-preview.8",
|
|
567
|
+
method: "POST",
|
|
568
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
|
|
569
|
+
routeValues: {
|
|
570
|
+
project: project
|
|
571
|
+
},
|
|
572
|
+
queryParams: queryValues,
|
|
573
|
+
body: definition
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Deletes a definition and all associated builds.
|
|
578
|
+
*
|
|
579
|
+
* @param project - Project ID or project name
|
|
580
|
+
* @param definitionId - The ID of the definition.
|
|
581
|
+
*/
|
|
582
|
+
async deleteDefinition(project, definitionId) {
|
|
583
|
+
return this.beginRequest({
|
|
584
|
+
apiVersion: "7.2-preview.8",
|
|
585
|
+
method: "DELETE",
|
|
586
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
|
|
587
|
+
routeValues: {
|
|
588
|
+
project: project,
|
|
589
|
+
definitionId: definitionId
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Gets a definition, optionally at a specific revision.
|
|
595
|
+
*
|
|
596
|
+
* @param project - Project ID or project name
|
|
597
|
+
* @param definitionId - The ID of the definition.
|
|
598
|
+
* @param revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
|
|
599
|
+
* @param minMetricsTime - If specified, indicates the date from which metrics should be included.
|
|
600
|
+
* @param propertyFilters - A comma-delimited list of properties to include in the results.
|
|
601
|
+
* @param includeLatestBuilds -
|
|
602
|
+
*/
|
|
603
|
+
async getDefinition(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) {
|
|
604
|
+
const queryValues = {
|
|
605
|
+
revision: revision,
|
|
606
|
+
minMetricsTime: minMetricsTime,
|
|
607
|
+
propertyFilters: propertyFilters && propertyFilters.join(","),
|
|
608
|
+
includeLatestBuilds: includeLatestBuilds
|
|
609
|
+
};
|
|
610
|
+
return this.beginRequest({
|
|
611
|
+
apiVersion: "7.2-preview.8",
|
|
612
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
|
|
613
|
+
routeValues: {
|
|
614
|
+
project: project,
|
|
615
|
+
definitionId: definitionId
|
|
616
|
+
},
|
|
617
|
+
queryParams: queryValues
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Gets a list of definitions.
|
|
622
|
+
*
|
|
623
|
+
* @param project - Project ID or project name
|
|
624
|
+
* @param name - If specified, filters to definitions whose names match this pattern.
|
|
625
|
+
* @param repositoryId - A repository ID. If specified, filters to definitions that use this repository.
|
|
626
|
+
* @param repositoryType - If specified, filters to definitions that have a repository of this type.
|
|
627
|
+
* @param queryOrder - Indicates the order in which definitions should be returned.
|
|
628
|
+
* @param top - The maximum number of definitions to return.
|
|
629
|
+
* @param continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
|
|
630
|
+
* @param minMetricsTime - If specified, indicates the date from which metrics should be included.
|
|
631
|
+
* @param definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve.
|
|
632
|
+
* @param path - If specified, filters to definitions under this folder.
|
|
633
|
+
* @param builtAfter - If specified, filters to definitions that have builds after this date.
|
|
634
|
+
* @param notBuiltAfter - If specified, filters to definitions that do not have builds after this date.
|
|
635
|
+
* @param includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
|
|
636
|
+
* @param includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition.
|
|
637
|
+
* @param taskIdFilter - If specified, filters to definitions that use the specified task.
|
|
638
|
+
* @param processType - If specified, filters to definitions with the given process type.
|
|
639
|
+
* @param yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true
|
|
640
|
+
*/
|
|
641
|
+
async getDefinitions(project, name, repositoryId, repositoryType, queryOrder, top, continuationToken, minMetricsTime, definitionIds, path, builtAfter, notBuiltAfter, includeAllProperties, includeLatestBuilds, taskIdFilter, processType, yamlFilename) {
|
|
642
|
+
const queryValues = {
|
|
643
|
+
name: name,
|
|
644
|
+
repositoryId: repositoryId,
|
|
645
|
+
repositoryType: repositoryType,
|
|
646
|
+
queryOrder: queryOrder,
|
|
647
|
+
'$top': top,
|
|
648
|
+
continuationToken: continuationToken,
|
|
649
|
+
minMetricsTime: minMetricsTime,
|
|
650
|
+
definitionIds: definitionIds && definitionIds.join(","),
|
|
651
|
+
path: path,
|
|
652
|
+
builtAfter: builtAfter,
|
|
653
|
+
notBuiltAfter: notBuiltAfter,
|
|
654
|
+
includeAllProperties: includeAllProperties,
|
|
655
|
+
includeLatestBuilds: includeLatestBuilds,
|
|
656
|
+
taskIdFilter: taskIdFilter,
|
|
657
|
+
processType: processType,
|
|
658
|
+
yamlFilename: yamlFilename
|
|
659
|
+
};
|
|
660
|
+
return this.beginRequest({
|
|
661
|
+
apiVersion: "7.2-preview.8",
|
|
662
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
|
|
663
|
+
routeValues: {
|
|
664
|
+
project: project
|
|
665
|
+
},
|
|
666
|
+
queryParams: queryValues,
|
|
667
|
+
returnRawResponse: true
|
|
668
|
+
}).then(async (response) => {
|
|
669
|
+
const body = await response.text().then(deserializeVssJsonObject);
|
|
670
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
671
|
+
return body;
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Restores a deleted definition
|
|
676
|
+
*
|
|
677
|
+
* @param project - Project ID or project name
|
|
678
|
+
* @param definitionId - The identifier of the definition to restore.
|
|
679
|
+
* @param deleted - When false, restores a deleted definition.
|
|
680
|
+
*/
|
|
681
|
+
async restoreDefinition(project, definitionId, deleted) {
|
|
682
|
+
const queryValues = {
|
|
683
|
+
deleted: deleted
|
|
684
|
+
};
|
|
685
|
+
return this.beginRequest({
|
|
686
|
+
apiVersion: "7.2-preview.8",
|
|
687
|
+
method: "PATCH",
|
|
688
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
|
|
689
|
+
routeValues: {
|
|
690
|
+
project: project,
|
|
691
|
+
definitionId: definitionId
|
|
692
|
+
},
|
|
693
|
+
queryParams: queryValues
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT.
|
|
698
|
+
*
|
|
699
|
+
* @param definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted.
|
|
700
|
+
* @param project - Project ID or project name
|
|
701
|
+
* @param definitionId - The ID of the definition.
|
|
702
|
+
* @param secretsSourceDefinitionId - Optional ID of the definition to use as the source for secrets.
|
|
703
|
+
* @param secretsSourceDefinitionRevision - Optional revision of the secrets source definition.
|
|
704
|
+
* @param cancelPausedBuilds - If true, cancels paused builds when the pipeline is being enabled from a paused or disabled state.
|
|
705
|
+
*/
|
|
706
|
+
async updateDefinition(definition, project, definitionId, secretsSourceDefinitionId, secretsSourceDefinitionRevision, cancelPausedBuilds) {
|
|
707
|
+
const queryValues = {
|
|
708
|
+
secretsSourceDefinitionId: secretsSourceDefinitionId,
|
|
709
|
+
secretsSourceDefinitionRevision: secretsSourceDefinitionRevision,
|
|
710
|
+
cancelPausedBuilds: cancelPausedBuilds
|
|
711
|
+
};
|
|
712
|
+
return this.beginRequest({
|
|
713
|
+
apiVersion: "7.2-preview.8",
|
|
714
|
+
method: "PUT",
|
|
715
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
|
|
716
|
+
routeValues: {
|
|
717
|
+
project: project,
|
|
718
|
+
definitionId: definitionId
|
|
719
|
+
},
|
|
720
|
+
queryParams: queryValues,
|
|
721
|
+
body: definition
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Gets the contents of a file in the given source code repository.
|
|
726
|
+
*
|
|
727
|
+
* @param project - Project ID or project name
|
|
728
|
+
* @param providerName - The name of the source provider.
|
|
729
|
+
* @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
|
730
|
+
* @param repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
|
|
731
|
+
* @param commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
|
|
732
|
+
* @param path - The path to the file to retrieve, relative to the root of the repository.
|
|
733
|
+
*/
|
|
734
|
+
async getFileContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) {
|
|
735
|
+
const queryValues = {
|
|
736
|
+
serviceEndpointId: serviceEndpointId,
|
|
737
|
+
repository: repository,
|
|
738
|
+
commitOrBranch: commitOrBranch,
|
|
739
|
+
path: path
|
|
740
|
+
};
|
|
741
|
+
return this.beginRequest({
|
|
742
|
+
apiVersion: "7.2-preview.1",
|
|
743
|
+
httpResponseType: "text/plain",
|
|
744
|
+
routeTemplate: "{project}/_apis/sourceProviders/{providerName}/fileContents",
|
|
745
|
+
routeValues: {
|
|
746
|
+
project: project,
|
|
747
|
+
providerName: providerName
|
|
748
|
+
},
|
|
749
|
+
queryParams: queryValues
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Creates a new folder.
|
|
754
|
+
*
|
|
755
|
+
* @param folder - The folder.
|
|
756
|
+
* @param project - Project ID or project name
|
|
757
|
+
* @param path - The full path of the folder.
|
|
758
|
+
*/
|
|
759
|
+
async createFolder(folder, project, path) {
|
|
760
|
+
const queryValues = {
|
|
761
|
+
path: path
|
|
762
|
+
};
|
|
763
|
+
return this.beginRequest({
|
|
764
|
+
apiVersion: "7.2-preview.2",
|
|
765
|
+
method: "PUT",
|
|
766
|
+
routeTemplate: "{project}/_apis/build/folders/{*path}",
|
|
767
|
+
routeValues: {
|
|
768
|
+
project: project
|
|
769
|
+
},
|
|
770
|
+
queryParams: queryValues,
|
|
771
|
+
body: folder
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Deletes a definition folder. Definitions and their corresponding builds will also be deleted.
|
|
776
|
+
*
|
|
777
|
+
* @param project - Project ID or project name
|
|
778
|
+
* @param path - The full path to the folder.
|
|
779
|
+
*/
|
|
780
|
+
async deleteFolder(project, path) {
|
|
781
|
+
const queryValues = {
|
|
782
|
+
path: path
|
|
783
|
+
};
|
|
784
|
+
return this.beginRequest({
|
|
785
|
+
apiVersion: "7.2-preview.2",
|
|
786
|
+
method: "DELETE",
|
|
787
|
+
routeTemplate: "{project}/_apis/build/folders/{*path}",
|
|
788
|
+
routeValues: {
|
|
789
|
+
project: project
|
|
790
|
+
},
|
|
791
|
+
queryParams: queryValues
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Gets a list of build definition folders.
|
|
796
|
+
*
|
|
797
|
+
* @param project - Project ID or project name
|
|
798
|
+
* @param path - The path to start with.
|
|
799
|
+
* @param queryOrder - The order in which folders should be returned.
|
|
800
|
+
*/
|
|
801
|
+
async getFolders(project, path, queryOrder) {
|
|
802
|
+
const queryValues = {
|
|
803
|
+
queryOrder: queryOrder
|
|
804
|
+
};
|
|
805
|
+
return this.beginRequest({
|
|
806
|
+
apiVersion: "7.2-preview.2",
|
|
807
|
+
routeTemplate: "{project}/_apis/build/folders/{*path}",
|
|
808
|
+
routeValues: {
|
|
809
|
+
project: project,
|
|
810
|
+
path: path
|
|
811
|
+
},
|
|
812
|
+
queryParams: queryValues
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Updates an existing folder at given existing path
|
|
817
|
+
*
|
|
818
|
+
* @param folder - The new version of the folder.
|
|
819
|
+
* @param project - Project ID or project name
|
|
820
|
+
* @param path - The full path to the folder.
|
|
821
|
+
*/
|
|
822
|
+
async updateFolder(folder, project, path) {
|
|
823
|
+
const queryValues = {
|
|
824
|
+
path: path
|
|
825
|
+
};
|
|
826
|
+
return this.beginRequest({
|
|
827
|
+
apiVersion: "7.2-preview.2",
|
|
828
|
+
method: "POST",
|
|
829
|
+
routeTemplate: "{project}/_apis/build/folders/{*path}",
|
|
830
|
+
routeValues: {
|
|
831
|
+
project: project
|
|
832
|
+
},
|
|
833
|
+
queryParams: queryValues,
|
|
834
|
+
body: folder
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Gets pipeline general settings.
|
|
839
|
+
*
|
|
840
|
+
* @param project - Project ID or project name
|
|
841
|
+
*/
|
|
842
|
+
async getBuildGeneralSettings(project) {
|
|
843
|
+
return this.beginRequest({
|
|
844
|
+
apiVersion: "7.2-preview.1",
|
|
845
|
+
routeTemplate: "{project}/_apis/build/generalSettings",
|
|
846
|
+
routeValues: {
|
|
847
|
+
project: project
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Updates pipeline general settings.
|
|
853
|
+
*
|
|
854
|
+
* @param newSettings -
|
|
855
|
+
* @param project - Project ID or project name
|
|
856
|
+
*/
|
|
857
|
+
async updateBuildGeneralSettings(newSettings, project) {
|
|
858
|
+
return this.beginRequest({
|
|
859
|
+
apiVersion: "7.2-preview.1",
|
|
860
|
+
method: "PATCH",
|
|
861
|
+
routeTemplate: "{project}/_apis/build/generalSettings",
|
|
862
|
+
routeValues: {
|
|
863
|
+
project: project
|
|
864
|
+
},
|
|
865
|
+
body: newSettings
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline.
|
|
870
|
+
*
|
|
871
|
+
* @param daysToLookback -
|
|
872
|
+
*/
|
|
873
|
+
async getRetentionHistory(daysToLookback) {
|
|
874
|
+
const queryValues = {
|
|
875
|
+
daysToLookback: daysToLookback
|
|
876
|
+
};
|
|
877
|
+
return this.beginRequest({
|
|
878
|
+
apiVersion: "7.2-preview.1",
|
|
879
|
+
routeTemplate: "_apis/build/retention/history",
|
|
880
|
+
queryParams: queryValues
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Gets the latest build for a definition, optionally scoped to a specific branch.
|
|
885
|
+
*
|
|
886
|
+
* @param project - Project ID or project name
|
|
887
|
+
* @param definition - definition name with optional leading folder path, or the definition id
|
|
888
|
+
* @param branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used.
|
|
889
|
+
*/
|
|
890
|
+
async getLatestBuild(project, definition, branchName) {
|
|
891
|
+
const queryValues = {
|
|
892
|
+
branchName: branchName
|
|
893
|
+
};
|
|
894
|
+
return this.beginRequest({
|
|
895
|
+
apiVersion: "7.2-preview.2",
|
|
896
|
+
routeTemplate: "{project}/_apis/build/latest/{*definition}",
|
|
897
|
+
routeValues: {
|
|
898
|
+
project: project,
|
|
899
|
+
definition: definition
|
|
900
|
+
},
|
|
901
|
+
queryParams: queryValues
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* Adds new leases for pipeline runs.
|
|
906
|
+
*
|
|
907
|
+
* @param newLeases -
|
|
908
|
+
* @param project - Project ID or project name
|
|
909
|
+
*/
|
|
910
|
+
async addRetentionLeases(newLeases, project) {
|
|
911
|
+
return this.beginRequest({
|
|
912
|
+
apiVersion: "7.2-preview.2",
|
|
913
|
+
method: "POST",
|
|
914
|
+
routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
|
|
915
|
+
routeValues: {
|
|
916
|
+
project: project
|
|
917
|
+
},
|
|
918
|
+
body: newLeases
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Removes specific retention leases.
|
|
923
|
+
*
|
|
924
|
+
* @param project - Project ID or project name
|
|
925
|
+
* @param ids -
|
|
926
|
+
*/
|
|
927
|
+
async deleteRetentionLeasesById(project, ids) {
|
|
928
|
+
const queryValues = {
|
|
929
|
+
ids: ids && ids.join(",")
|
|
930
|
+
};
|
|
931
|
+
return this.beginRequest({
|
|
932
|
+
apiVersion: "7.2-preview.2",
|
|
933
|
+
method: "DELETE",
|
|
934
|
+
routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
|
|
935
|
+
routeValues: {
|
|
936
|
+
project: project
|
|
937
|
+
},
|
|
938
|
+
queryParams: queryValues
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Returns the details of the retention lease given a lease id.
|
|
943
|
+
*
|
|
944
|
+
* @param project - Project ID or project name
|
|
945
|
+
* @param leaseId -
|
|
946
|
+
*/
|
|
947
|
+
async getRetentionLease(project, leaseId) {
|
|
948
|
+
return this.beginRequest({
|
|
949
|
+
apiVersion: "7.2-preview.2",
|
|
950
|
+
routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
|
|
951
|
+
routeValues: {
|
|
952
|
+
project: project,
|
|
953
|
+
leaseId: leaseId
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Returns any leases matching the specified MinimalRetentionLeases
|
|
959
|
+
*
|
|
960
|
+
* @param project - Project ID or project name
|
|
961
|
+
* @param leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|'
|
|
962
|
+
*/
|
|
963
|
+
async getRetentionLeasesByMinimalRetentionLeases(project, leasesToFetch) {
|
|
964
|
+
const queryValues = {
|
|
965
|
+
leasesToFetch: leasesToFetch && leasesToFetch.join("|")
|
|
966
|
+
};
|
|
967
|
+
return this.beginRequest({
|
|
968
|
+
apiVersion: "7.2-preview.2",
|
|
969
|
+
routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
|
|
970
|
+
routeValues: {
|
|
971
|
+
project: project
|
|
972
|
+
},
|
|
973
|
+
queryParams: queryValues
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
/**
|
|
977
|
+
* Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run.
|
|
978
|
+
*
|
|
979
|
+
* @param project - Project ID or project name
|
|
980
|
+
* @param ownerId -
|
|
981
|
+
* @param definitionId - An optional parameter to limit the search to a specific pipeline definition.
|
|
982
|
+
* @param runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
|
|
983
|
+
*/
|
|
984
|
+
async getRetentionLeasesByOwnerId(project, ownerId, definitionId, runId) {
|
|
985
|
+
const queryValues = {
|
|
986
|
+
ownerId: ownerId,
|
|
987
|
+
definitionId: definitionId,
|
|
988
|
+
runId: runId
|
|
989
|
+
};
|
|
990
|
+
return this.beginRequest({
|
|
991
|
+
apiVersion: "7.2-preview.2",
|
|
992
|
+
routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
|
|
993
|
+
routeValues: {
|
|
994
|
+
project: project
|
|
995
|
+
},
|
|
996
|
+
queryParams: queryValues
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run.
|
|
1001
|
+
*
|
|
1002
|
+
* @param project - Project ID or project name
|
|
1003
|
+
* @param userOwnerId - The user id to search for.
|
|
1004
|
+
* @param definitionId - An optional parameter to limit the search to a specific pipeline definition.
|
|
1005
|
+
* @param runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
|
|
1006
|
+
*/
|
|
1007
|
+
async getRetentionLeasesByUserId(project, userOwnerId, definitionId, runId) {
|
|
1008
|
+
const queryValues = {
|
|
1009
|
+
userOwnerId: userOwnerId,
|
|
1010
|
+
definitionId: definitionId,
|
|
1011
|
+
runId: runId
|
|
1012
|
+
};
|
|
1013
|
+
return this.beginRequest({
|
|
1014
|
+
apiVersion: "7.2-preview.2",
|
|
1015
|
+
routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
|
|
1016
|
+
routeValues: {
|
|
1017
|
+
project: project
|
|
1018
|
+
},
|
|
1019
|
+
queryParams: queryValues
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Updates the duration or pipeline protection status of a retention lease.
|
|
1024
|
+
*
|
|
1025
|
+
* @param leaseUpdate - The new data for the retention lease.
|
|
1026
|
+
* @param project - Project ID or project name
|
|
1027
|
+
* @param leaseId - The ID of the lease to update.
|
|
1028
|
+
*/
|
|
1029
|
+
async updateRetentionLease(leaseUpdate, project, leaseId) {
|
|
1030
|
+
return this.beginRequest({
|
|
1031
|
+
apiVersion: "7.2-preview.2",
|
|
1032
|
+
method: "PATCH",
|
|
1033
|
+
routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
|
|
1034
|
+
routeValues: {
|
|
1035
|
+
project: project,
|
|
1036
|
+
leaseId: leaseId
|
|
1037
|
+
},
|
|
1038
|
+
body: leaseUpdate
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* Gets an individual log file for a build.
|
|
1043
|
+
*
|
|
1044
|
+
* @param project - Project ID or project name
|
|
1045
|
+
* @param buildId - The ID of the build.
|
|
1046
|
+
* @param logId - The ID of the log file.
|
|
1047
|
+
* @param startLine - The start line.
|
|
1048
|
+
* @param endLine - The end line.
|
|
1049
|
+
*/
|
|
1050
|
+
async getBuildLog(project, buildId, logId, startLine, endLine) {
|
|
1051
|
+
const queryValues = {
|
|
1052
|
+
startLine: startLine,
|
|
1053
|
+
endLine: endLine
|
|
1054
|
+
};
|
|
1055
|
+
return this.beginRequest({
|
|
1056
|
+
apiVersion: "7.2-preview.2",
|
|
1057
|
+
httpResponseType: "text/plain",
|
|
1058
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
|
|
1059
|
+
routeValues: {
|
|
1060
|
+
project: project,
|
|
1061
|
+
buildId: buildId,
|
|
1062
|
+
logId: logId
|
|
1063
|
+
},
|
|
1064
|
+
queryParams: queryValues
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Gets an individual log file for a build.
|
|
1069
|
+
*
|
|
1070
|
+
* @param project - Project ID or project name
|
|
1071
|
+
* @param buildId - The ID of the build.
|
|
1072
|
+
* @param logId - The ID of the log file.
|
|
1073
|
+
* @param startLine - The start line.
|
|
1074
|
+
* @param endLine - The end line.
|
|
1075
|
+
*/
|
|
1076
|
+
async getBuildLogLines(project, buildId, logId, startLine, endLine) {
|
|
1077
|
+
const queryValues = {
|
|
1078
|
+
startLine: startLine,
|
|
1079
|
+
endLine: endLine
|
|
1080
|
+
};
|
|
1081
|
+
return this.beginRequest({
|
|
1082
|
+
apiVersion: "7.2-preview.2",
|
|
1083
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
|
|
1084
|
+
routeValues: {
|
|
1085
|
+
project: project,
|
|
1086
|
+
buildId: buildId,
|
|
1087
|
+
logId: logId
|
|
1088
|
+
},
|
|
1089
|
+
queryParams: queryValues
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Gets the logs for a build.
|
|
1094
|
+
*
|
|
1095
|
+
* @param project - Project ID or project name
|
|
1096
|
+
* @param buildId - The ID of the build.
|
|
1097
|
+
*/
|
|
1098
|
+
async getBuildLogs(project, buildId) {
|
|
1099
|
+
return this.beginRequest({
|
|
1100
|
+
apiVersion: "7.2-preview.2",
|
|
1101
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
|
|
1102
|
+
routeValues: {
|
|
1103
|
+
project: project,
|
|
1104
|
+
buildId: buildId
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* Gets the logs for a build.
|
|
1110
|
+
*
|
|
1111
|
+
* @param project - Project ID or project name
|
|
1112
|
+
* @param buildId - The ID of the build.
|
|
1113
|
+
*/
|
|
1114
|
+
async getBuildLogsZip(project, buildId) {
|
|
1115
|
+
return this.beginRequest({
|
|
1116
|
+
apiVersion: "7.2-preview.2",
|
|
1117
|
+
httpResponseType: "application/zip",
|
|
1118
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
|
|
1119
|
+
routeValues: {
|
|
1120
|
+
project: project,
|
|
1121
|
+
buildId: buildId
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Gets an individual log file for a build.
|
|
1127
|
+
*
|
|
1128
|
+
* @param project - Project ID or project name
|
|
1129
|
+
* @param buildId - The ID of the build.
|
|
1130
|
+
* @param logId - The ID of the log file.
|
|
1131
|
+
* @param startLine - The start line.
|
|
1132
|
+
* @param endLine - The end line.
|
|
1133
|
+
*/
|
|
1134
|
+
async getBuildLogZip(project, buildId, logId, startLine, endLine) {
|
|
1135
|
+
const queryValues = {
|
|
1136
|
+
startLine: startLine,
|
|
1137
|
+
endLine: endLine
|
|
1138
|
+
};
|
|
1139
|
+
return this.beginRequest({
|
|
1140
|
+
apiVersion: "7.2-preview.2",
|
|
1141
|
+
httpResponseType: "application/zip",
|
|
1142
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
|
|
1143
|
+
routeValues: {
|
|
1144
|
+
project: project,
|
|
1145
|
+
buildId: buildId,
|
|
1146
|
+
logId: logId
|
|
1147
|
+
},
|
|
1148
|
+
queryParams: queryValues
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Gets build metrics for a project.
|
|
1153
|
+
*
|
|
1154
|
+
* @param project - Project ID or project name
|
|
1155
|
+
* @param metricAggregationType - The aggregation type to use (hourly, daily).
|
|
1156
|
+
* @param minMetricsTime - The date from which to calculate metrics.
|
|
1157
|
+
*/
|
|
1158
|
+
async getProjectMetrics(project, metricAggregationType, minMetricsTime) {
|
|
1159
|
+
const queryValues = {
|
|
1160
|
+
minMetricsTime: minMetricsTime
|
|
1161
|
+
};
|
|
1162
|
+
return this.beginRequest({
|
|
1163
|
+
apiVersion: "7.2-preview.1",
|
|
1164
|
+
routeTemplate: "{project}/_apis/build/Metrics/{metricAggregationType}",
|
|
1165
|
+
routeValues: {
|
|
1166
|
+
project: project,
|
|
1167
|
+
metricAggregationType: metricAggregationType
|
|
1168
|
+
},
|
|
1169
|
+
queryParams: queryValues
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Gets build metrics for a definition.
|
|
1174
|
+
*
|
|
1175
|
+
* @param project - Project ID or project name
|
|
1176
|
+
* @param definitionId - The ID of the definition.
|
|
1177
|
+
* @param minMetricsTime - The date from which to calculate metrics.
|
|
1178
|
+
*/
|
|
1179
|
+
async getDefinitionMetrics(project, definitionId, minMetricsTime) {
|
|
1180
|
+
const queryValues = {
|
|
1181
|
+
minMetricsTime: minMetricsTime
|
|
1182
|
+
};
|
|
1183
|
+
return this.beginRequest({
|
|
1184
|
+
apiVersion: "7.2-preview.1",
|
|
1185
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}/Metrics",
|
|
1186
|
+
routeValues: {
|
|
1187
|
+
project: project,
|
|
1188
|
+
definitionId: definitionId
|
|
1189
|
+
},
|
|
1190
|
+
queryParams: queryValues
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* Gets all build definition options supported by the system.
|
|
1195
|
+
*
|
|
1196
|
+
* @param project - Project ID or project name
|
|
1197
|
+
*/
|
|
1198
|
+
async getBuildOptionDefinitions(project) {
|
|
1199
|
+
return this.beginRequest({
|
|
1200
|
+
apiVersion: "7.2-preview.2",
|
|
1201
|
+
routeTemplate: "{project}/_apis/build/options",
|
|
1202
|
+
routeValues: {
|
|
1203
|
+
project: project
|
|
1204
|
+
}
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
/**
|
|
1208
|
+
* Gets the contents of a directory in the given source code repository.
|
|
1209
|
+
*
|
|
1210
|
+
* @param project - Project ID or project name
|
|
1211
|
+
* @param providerName - The name of the source provider.
|
|
1212
|
+
* @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
|
1213
|
+
* @param repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
|
|
1214
|
+
* @param commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
|
|
1215
|
+
* @param path - The path contents to list, relative to the root of the repository.
|
|
1216
|
+
*/
|
|
1217
|
+
async getPathContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) {
|
|
1218
|
+
const queryValues = {
|
|
1219
|
+
serviceEndpointId: serviceEndpointId,
|
|
1220
|
+
repository: repository,
|
|
1221
|
+
commitOrBranch: commitOrBranch,
|
|
1222
|
+
path: path
|
|
1223
|
+
};
|
|
1224
|
+
return this.beginRequest({
|
|
1225
|
+
apiVersion: "7.2-preview.1",
|
|
1226
|
+
routeTemplate: "{project}/_apis/sourceProviders/{providerName}/pathContents",
|
|
1227
|
+
routeValues: {
|
|
1228
|
+
project: project,
|
|
1229
|
+
providerName: providerName
|
|
1230
|
+
},
|
|
1231
|
+
queryParams: queryValues
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Gets properties for a build.
|
|
1236
|
+
*
|
|
1237
|
+
* @param project - Project ID or project name
|
|
1238
|
+
* @param buildId - The ID of the build.
|
|
1239
|
+
* @param filter - A comma-delimited list of properties. If specified, filters to these specific properties.
|
|
1240
|
+
*/
|
|
1241
|
+
async getBuildProperties(project, buildId, filter) {
|
|
1242
|
+
const queryValues = {
|
|
1243
|
+
filter: filter && filter.join(",")
|
|
1244
|
+
};
|
|
1245
|
+
return this.beginRequest({
|
|
1246
|
+
apiVersion: "7.2-preview.1",
|
|
1247
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/properties",
|
|
1248
|
+
routeValues: {
|
|
1249
|
+
project: project,
|
|
1250
|
+
buildId: buildId
|
|
1251
|
+
},
|
|
1252
|
+
queryParams: queryValues
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Updates properties for a build.
|
|
1257
|
+
*
|
|
1258
|
+
* @param document - A json-patch document describing the properties to update.
|
|
1259
|
+
* @param project - Project ID or project name
|
|
1260
|
+
* @param buildId - The ID of the build.
|
|
1261
|
+
*/
|
|
1262
|
+
async updateBuildProperties(document, project, buildId) {
|
|
1263
|
+
return this.beginRequest({
|
|
1264
|
+
apiVersion: "7.2-preview.1",
|
|
1265
|
+
method: "PATCH",
|
|
1266
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/properties",
|
|
1267
|
+
routeValues: {
|
|
1268
|
+
project: project,
|
|
1269
|
+
buildId: buildId
|
|
1270
|
+
},
|
|
1271
|
+
customHeaders: {
|
|
1272
|
+
"Content-Type": "application/json-patch+json",
|
|
1273
|
+
},
|
|
1274
|
+
body: document
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Gets properties for a definition.
|
|
1279
|
+
*
|
|
1280
|
+
* @param project - Project ID or project name
|
|
1281
|
+
* @param definitionId - The ID of the definition.
|
|
1282
|
+
* @param filter - A comma-delimited list of properties. If specified, filters to these specific properties.
|
|
1283
|
+
*/
|
|
1284
|
+
async getDefinitionProperties(project, definitionId, filter) {
|
|
1285
|
+
const queryValues = {
|
|
1286
|
+
filter: filter && filter.join(",")
|
|
1287
|
+
};
|
|
1288
|
+
return this.beginRequest({
|
|
1289
|
+
apiVersion: "7.2-preview.1",
|
|
1290
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}/properties",
|
|
1291
|
+
routeValues: {
|
|
1292
|
+
project: project,
|
|
1293
|
+
definitionId: definitionId
|
|
1294
|
+
},
|
|
1295
|
+
queryParams: queryValues
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Updates properties for a definition.
|
|
1300
|
+
*
|
|
1301
|
+
* @param document - A json-patch document describing the properties to update.
|
|
1302
|
+
* @param project - Project ID or project name
|
|
1303
|
+
* @param definitionId - The ID of the definition.
|
|
1304
|
+
*/
|
|
1305
|
+
async updateDefinitionProperties(document, project, definitionId) {
|
|
1306
|
+
return this.beginRequest({
|
|
1307
|
+
apiVersion: "7.2-preview.1",
|
|
1308
|
+
method: "PATCH",
|
|
1309
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}/properties",
|
|
1310
|
+
routeValues: {
|
|
1311
|
+
project: project,
|
|
1312
|
+
definitionId: definitionId
|
|
1313
|
+
},
|
|
1314
|
+
customHeaders: {
|
|
1315
|
+
"Content-Type": "application/json-patch+json",
|
|
1316
|
+
},
|
|
1317
|
+
body: document
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* Gets a pull request object from source provider.
|
|
1322
|
+
*
|
|
1323
|
+
* @param project - Project ID or project name
|
|
1324
|
+
* @param providerName - The name of the source provider.
|
|
1325
|
+
* @param pullRequestId - Vendor-specific id of the pull request.
|
|
1326
|
+
* @param repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request.
|
|
1327
|
+
* @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
|
1328
|
+
*/
|
|
1329
|
+
async getPullRequest(project, providerName, pullRequestId, repositoryId, serviceEndpointId) {
|
|
1330
|
+
const queryValues = {
|
|
1331
|
+
repositoryId: repositoryId,
|
|
1332
|
+
serviceEndpointId: serviceEndpointId
|
|
1333
|
+
};
|
|
1334
|
+
return this.beginRequest({
|
|
1335
|
+
apiVersion: "7.2-preview.1",
|
|
1336
|
+
routeTemplate: "{project}/_apis/sourceProviders/{providerName}/pullRequests/{pullRequestId}",
|
|
1337
|
+
routeValues: {
|
|
1338
|
+
project: project,
|
|
1339
|
+
providerName: providerName,
|
|
1340
|
+
pullRequestId: pullRequestId
|
|
1341
|
+
},
|
|
1342
|
+
queryParams: queryValues
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Gets a build report.
|
|
1347
|
+
*
|
|
1348
|
+
* @param project - Project ID or project name
|
|
1349
|
+
* @param buildId - The ID of the build.
|
|
1350
|
+
* @param type -
|
|
1351
|
+
*/
|
|
1352
|
+
async getBuildReport(project, buildId, type) {
|
|
1353
|
+
const queryValues = {
|
|
1354
|
+
type: type
|
|
1355
|
+
};
|
|
1356
|
+
return this.beginRequest({
|
|
1357
|
+
apiVersion: "7.2-preview.2",
|
|
1358
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/report",
|
|
1359
|
+
routeValues: {
|
|
1360
|
+
project: project,
|
|
1361
|
+
buildId: buildId
|
|
1362
|
+
},
|
|
1363
|
+
queryParams: queryValues
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Gets a build report.
|
|
1368
|
+
*
|
|
1369
|
+
* @param project - Project ID or project name
|
|
1370
|
+
* @param buildId - The ID of the build.
|
|
1371
|
+
* @param type -
|
|
1372
|
+
*/
|
|
1373
|
+
async getBuildReportHtmlContent(project, buildId, type) {
|
|
1374
|
+
const queryValues = {
|
|
1375
|
+
type: type
|
|
1376
|
+
};
|
|
1377
|
+
return this.beginRequest({
|
|
1378
|
+
apiVersion: "7.2-preview.2",
|
|
1379
|
+
httpResponseType: "text/html",
|
|
1380
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/report",
|
|
1381
|
+
routeValues: {
|
|
1382
|
+
project: project,
|
|
1383
|
+
buildId: buildId
|
|
1384
|
+
},
|
|
1385
|
+
queryParams: queryValues
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Gets a list of source code repositories.
|
|
1390
|
+
*
|
|
1391
|
+
* @param project - Project ID or project name
|
|
1392
|
+
* @param providerName - The name of the source provider.
|
|
1393
|
+
* @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
|
1394
|
+
* @param repository - If specified, the vendor-specific identifier or the name of a single repository to get.
|
|
1395
|
+
* @param resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.
|
|
1396
|
+
* @param pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query.
|
|
1397
|
+
* @param continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories.
|
|
1398
|
+
*/
|
|
1399
|
+
async listRepositories(project, providerName, serviceEndpointId, repository, resultSet, pageResults, continuationToken) {
|
|
1400
|
+
const queryValues = {
|
|
1401
|
+
serviceEndpointId: serviceEndpointId,
|
|
1402
|
+
repository: repository,
|
|
1403
|
+
resultSet: resultSet,
|
|
1404
|
+
pageResults: pageResults,
|
|
1405
|
+
continuationToken: continuationToken
|
|
1406
|
+
};
|
|
1407
|
+
return this.beginRequest({
|
|
1408
|
+
apiVersion: "7.2-preview.1",
|
|
1409
|
+
routeTemplate: "{project}/_apis/sourceProviders/{providerName}/repositories",
|
|
1410
|
+
routeValues: {
|
|
1411
|
+
project: project,
|
|
1412
|
+
providerName: providerName
|
|
1413
|
+
},
|
|
1414
|
+
queryParams: queryValues
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* @param resources -
|
|
1419
|
+
* @param project - Project ID or project name
|
|
1420
|
+
* @param definitionId -
|
|
1421
|
+
*/
|
|
1422
|
+
async authorizeDefinitionResources(resources, project, definitionId) {
|
|
1423
|
+
return this.beginRequest({
|
|
1424
|
+
apiVersion: "7.2-preview.1",
|
|
1425
|
+
method: "PATCH",
|
|
1426
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}/resources",
|
|
1427
|
+
routeValues: {
|
|
1428
|
+
project: project,
|
|
1429
|
+
definitionId: definitionId
|
|
1430
|
+
},
|
|
1431
|
+
body: resources
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* @param project - Project ID or project name
|
|
1436
|
+
* @param definitionId -
|
|
1437
|
+
*/
|
|
1438
|
+
async getDefinitionResources(project, definitionId) {
|
|
1439
|
+
return this.beginRequest({
|
|
1440
|
+
apiVersion: "7.2-preview.1",
|
|
1441
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}/resources",
|
|
1442
|
+
routeValues: {
|
|
1443
|
+
project: project,
|
|
1444
|
+
definitionId: definitionId
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* Gets information about build resources in the system.
|
|
1450
|
+
*
|
|
1451
|
+
*/
|
|
1452
|
+
async getResourceUsage() {
|
|
1453
|
+
return this.beginRequest({
|
|
1454
|
+
apiVersion: "7.2-preview.2",
|
|
1455
|
+
routeTemplate: "_apis/build/ResourceUsage"
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* Gets the project's retention settings.
|
|
1460
|
+
*
|
|
1461
|
+
* @param project - Project ID or project name
|
|
1462
|
+
*/
|
|
1463
|
+
async getRetentionSettings(project) {
|
|
1464
|
+
return this.beginRequest({
|
|
1465
|
+
apiVersion: "7.2-preview.1",
|
|
1466
|
+
routeTemplate: "{project}/_apis/build/retention",
|
|
1467
|
+
routeValues: {
|
|
1468
|
+
project: project
|
|
1469
|
+
}
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Updates the project's retention settings.
|
|
1474
|
+
*
|
|
1475
|
+
* @param updateModel -
|
|
1476
|
+
* @param project - Project ID or project name
|
|
1477
|
+
*/
|
|
1478
|
+
async updateRetentionSettings(updateModel, project) {
|
|
1479
|
+
return this.beginRequest({
|
|
1480
|
+
apiVersion: "7.2-preview.1",
|
|
1481
|
+
method: "PATCH",
|
|
1482
|
+
routeTemplate: "{project}/_apis/build/retention",
|
|
1483
|
+
routeValues: {
|
|
1484
|
+
project: project
|
|
1485
|
+
},
|
|
1486
|
+
body: updateModel
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* Gets all revisions of a definition.
|
|
1491
|
+
*
|
|
1492
|
+
* @param project - Project ID or project name
|
|
1493
|
+
* @param definitionId - The ID of the definition.
|
|
1494
|
+
*/
|
|
1495
|
+
async getDefinitionRevisions(project, definitionId) {
|
|
1496
|
+
return this.beginRequest({
|
|
1497
|
+
apiVersion: "7.2-preview.3",
|
|
1498
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}/revisions",
|
|
1499
|
+
routeValues: {
|
|
1500
|
+
project: project,
|
|
1501
|
+
definitionId: definitionId
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Gets the build settings.
|
|
1507
|
+
*
|
|
1508
|
+
* @param project - Project ID or project name
|
|
1509
|
+
*/
|
|
1510
|
+
async getBuildSettings(project) {
|
|
1511
|
+
return this.beginRequest({
|
|
1512
|
+
apiVersion: "7.2-preview.1",
|
|
1513
|
+
routeTemplate: "{project}/_apis/build/settings",
|
|
1514
|
+
routeValues: {
|
|
1515
|
+
project: project
|
|
1516
|
+
}
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Updates the build settings.
|
|
1521
|
+
*
|
|
1522
|
+
* @param settings - The new settings.
|
|
1523
|
+
* @param project - Project ID or project name
|
|
1524
|
+
*/
|
|
1525
|
+
async updateBuildSettings(settings, project) {
|
|
1526
|
+
return this.beginRequest({
|
|
1527
|
+
apiVersion: "7.2-preview.1",
|
|
1528
|
+
method: "PATCH",
|
|
1529
|
+
routeTemplate: "{project}/_apis/build/settings",
|
|
1530
|
+
routeValues: {
|
|
1531
|
+
project: project
|
|
1532
|
+
},
|
|
1533
|
+
body: settings
|
|
1534
|
+
});
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* Get a list of source providers and their capabilities.
|
|
1538
|
+
*
|
|
1539
|
+
* @param project - Project ID or project name
|
|
1540
|
+
*/
|
|
1541
|
+
async listSourceProviders(project) {
|
|
1542
|
+
return this.beginRequest({
|
|
1543
|
+
apiVersion: "7.2-preview.1",
|
|
1544
|
+
routeTemplate: "{project}/_apis/sourceProviders",
|
|
1545
|
+
routeValues: {
|
|
1546
|
+
project: project
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Update a build stage
|
|
1552
|
+
*
|
|
1553
|
+
* @param updateParameters -
|
|
1554
|
+
* @param buildId -
|
|
1555
|
+
* @param stageRefName -
|
|
1556
|
+
* @param project - Project ID or project name
|
|
1557
|
+
*/
|
|
1558
|
+
async updateStage(updateParameters, buildId, stageRefName, project) {
|
|
1559
|
+
return this.beginRequest({
|
|
1560
|
+
apiVersion: "7.2-preview.1",
|
|
1561
|
+
method: "PATCH",
|
|
1562
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/stages/{stageRefName}",
|
|
1563
|
+
routeValues: {
|
|
1564
|
+
project: project,
|
|
1565
|
+
buildId: buildId,
|
|
1566
|
+
stageRefName: stageRefName
|
|
1567
|
+
},
|
|
1568
|
+
body: updateParameters
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
/**
|
|
1572
|
+
* Gets the latest timeline for a build filtered to a specific stage.
|
|
1573
|
+
*
|
|
1574
|
+
* @param project - Project ID or project name
|
|
1575
|
+
* @param buildId - The ID of the build.
|
|
1576
|
+
* @param stageName - The name of the stage to filter by.
|
|
1577
|
+
* @param changeId - The change ID to filter by.
|
|
1578
|
+
* @param planId - The ID of the plan.
|
|
1579
|
+
*/
|
|
1580
|
+
async getBuildStageLatestTimeline(project, buildId, stageName, changeId, planId) {
|
|
1581
|
+
const queryValues = {
|
|
1582
|
+
changeId: changeId,
|
|
1583
|
+
planId: planId
|
|
1584
|
+
};
|
|
1585
|
+
return this.beginRequest({
|
|
1586
|
+
apiVersion: "7.2-preview.1",
|
|
1587
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/Timeline/stages/{stageName}",
|
|
1588
|
+
routeValues: {
|
|
1589
|
+
project: project,
|
|
1590
|
+
buildId: buildId,
|
|
1591
|
+
stageName: stageName
|
|
1592
|
+
},
|
|
1593
|
+
queryParams: queryValues
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
/**
|
|
1597
|
+
* Gets the timeline for a build filtered to a specific stage.
|
|
1598
|
+
*
|
|
1599
|
+
* @param project - Project ID or project name
|
|
1600
|
+
* @param buildId - The ID of the build.
|
|
1601
|
+
* @param timelineId - The ID of the timeline.
|
|
1602
|
+
* @param stageName - The name of the stage to filter by.
|
|
1603
|
+
* @param changeId - The change ID to filter by.
|
|
1604
|
+
* @param planId - The ID of the plan.
|
|
1605
|
+
*/
|
|
1606
|
+
async getBuildStageTimeline(project, buildId, timelineId, stageName, changeId, planId) {
|
|
1607
|
+
const queryValues = {
|
|
1608
|
+
changeId: changeId,
|
|
1609
|
+
planId: planId
|
|
1610
|
+
};
|
|
1611
|
+
return this.beginRequest({
|
|
1612
|
+
apiVersion: "7.2-preview.1",
|
|
1613
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}/stages/{stageName}",
|
|
1614
|
+
routeValues: {
|
|
1615
|
+
project: project,
|
|
1616
|
+
buildId: buildId,
|
|
1617
|
+
timelineId: timelineId,
|
|
1618
|
+
stageName: stageName
|
|
1619
|
+
},
|
|
1620
|
+
queryParams: queryValues
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
/**
|
|
1624
|
+
* \<p\>Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.\</p\> \<p\>If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.\</p\>
|
|
1625
|
+
*
|
|
1626
|
+
* @param project - Project ID or project name
|
|
1627
|
+
* @param definition - Either the definition name with optional leading folder path, or the definition id.
|
|
1628
|
+
* @param branchName - Only consider the most recent build for this branch. If not specified, the default branch is used.
|
|
1629
|
+
* @param stageName - Use this stage within the pipeline to render the status.
|
|
1630
|
+
* @param jobName - Use this job within a stage of the pipeline to render the status.
|
|
1631
|
+
* @param configuration - Use this job configuration to render the status
|
|
1632
|
+
* @param label - Replaces the default text on the left side of the badge.
|
|
1633
|
+
*/
|
|
1634
|
+
async getStatusBadge(project, definition, branchName, stageName, jobName, configuration, label) {
|
|
1635
|
+
const queryValues = {
|
|
1636
|
+
branchName: branchName,
|
|
1637
|
+
stageName: stageName,
|
|
1638
|
+
jobName: jobName,
|
|
1639
|
+
configuration: configuration,
|
|
1640
|
+
label: label
|
|
1641
|
+
};
|
|
1642
|
+
return this.beginRequest({
|
|
1643
|
+
apiVersion: "7.2-preview.1",
|
|
1644
|
+
routeTemplate: "{project}/_apis/build/status/{*definition}",
|
|
1645
|
+
routeValues: {
|
|
1646
|
+
project: project,
|
|
1647
|
+
definition: definition
|
|
1648
|
+
},
|
|
1649
|
+
queryParams: queryValues
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Adds a tag to a build.
|
|
1654
|
+
*
|
|
1655
|
+
* @param project - Project ID or project name
|
|
1656
|
+
* @param buildId - The ID of the build.
|
|
1657
|
+
* @param tag - The tag to add.
|
|
1658
|
+
*/
|
|
1659
|
+
async addBuildTag(project, buildId, tag) {
|
|
1660
|
+
return this.beginRequest({
|
|
1661
|
+
apiVersion: "7.2-preview.3",
|
|
1662
|
+
method: "PUT",
|
|
1663
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
|
|
1664
|
+
routeValues: {
|
|
1665
|
+
project: project,
|
|
1666
|
+
buildId: buildId,
|
|
1667
|
+
tag: tag
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
/**
|
|
1672
|
+
* Adds tags to a build.
|
|
1673
|
+
*
|
|
1674
|
+
* @param tags - The tags to add. Request body is composed directly from listed tags.
|
|
1675
|
+
* @param project - Project ID or project name
|
|
1676
|
+
* @param buildId - The ID of the build.
|
|
1677
|
+
*/
|
|
1678
|
+
async addBuildTags(tags, project, buildId) {
|
|
1679
|
+
return this.beginRequest({
|
|
1680
|
+
apiVersion: "7.2-preview.3",
|
|
1681
|
+
method: "POST",
|
|
1682
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
|
|
1683
|
+
routeValues: {
|
|
1684
|
+
project: project,
|
|
1685
|
+
buildId: buildId
|
|
1686
|
+
},
|
|
1687
|
+
body: tags
|
|
1688
|
+
});
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
|
|
1692
|
+
*
|
|
1693
|
+
* @param project - Project ID or project name
|
|
1694
|
+
* @param buildId - The ID of the build.
|
|
1695
|
+
* @param tag - The tag to remove.
|
|
1696
|
+
*/
|
|
1697
|
+
async deleteBuildTag(project, buildId, tag) {
|
|
1698
|
+
return this.beginRequest({
|
|
1699
|
+
apiVersion: "7.2-preview.3",
|
|
1700
|
+
method: "DELETE",
|
|
1701
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
|
|
1702
|
+
routeValues: {
|
|
1703
|
+
project: project,
|
|
1704
|
+
buildId: buildId,
|
|
1705
|
+
tag: tag
|
|
1706
|
+
}
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
/**
|
|
1710
|
+
* Gets the tags for a build.
|
|
1711
|
+
*
|
|
1712
|
+
* @param project - Project ID or project name
|
|
1713
|
+
* @param buildId - The ID of the build.
|
|
1714
|
+
*/
|
|
1715
|
+
async getBuildTags(project, buildId) {
|
|
1716
|
+
return this.beginRequest({
|
|
1717
|
+
apiVersion: "7.2-preview.3",
|
|
1718
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
|
|
1719
|
+
routeValues: {
|
|
1720
|
+
project: project,
|
|
1721
|
+
buildId: buildId
|
|
1722
|
+
}
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* Adds/Removes tags from a build.
|
|
1727
|
+
*
|
|
1728
|
+
* @param updateParameters - The tags to add/remove.
|
|
1729
|
+
* @param project - Project ID or project name
|
|
1730
|
+
* @param buildId - The ID of the build.
|
|
1731
|
+
*/
|
|
1732
|
+
async updateBuildTags(updateParameters, project, buildId) {
|
|
1733
|
+
return this.beginRequest({
|
|
1734
|
+
apiVersion: "7.2-preview.3",
|
|
1735
|
+
method: "PATCH",
|
|
1736
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
|
|
1737
|
+
routeValues: {
|
|
1738
|
+
project: project,
|
|
1739
|
+
buildId: buildId
|
|
1740
|
+
},
|
|
1741
|
+
body: updateParameters
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
* Adds a tag to a definition
|
|
1746
|
+
*
|
|
1747
|
+
* @param project - Project ID or project name
|
|
1748
|
+
* @param definitionId - The ID of the definition.
|
|
1749
|
+
* @param tag - The tag to add.
|
|
1750
|
+
*/
|
|
1751
|
+
async addDefinitionTag(project, definitionId, tag) {
|
|
1752
|
+
return this.beginRequest({
|
|
1753
|
+
apiVersion: "7.2-preview.3",
|
|
1754
|
+
method: "PUT",
|
|
1755
|
+
routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
|
|
1756
|
+
routeValues: {
|
|
1757
|
+
project: project,
|
|
1758
|
+
definitionId: definitionId,
|
|
1759
|
+
tag: tag
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1763
|
+
/**
|
|
1764
|
+
* Adds multiple tags to a definition.
|
|
1765
|
+
*
|
|
1766
|
+
* @param tags - The tags to add.
|
|
1767
|
+
* @param project - Project ID or project name
|
|
1768
|
+
* @param definitionId - The ID of the definition.
|
|
1769
|
+
*/
|
|
1770
|
+
async addDefinitionTags(tags, project, definitionId) {
|
|
1771
|
+
return this.beginRequest({
|
|
1772
|
+
apiVersion: "7.2-preview.3",
|
|
1773
|
+
method: "POST",
|
|
1774
|
+
routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
|
|
1775
|
+
routeValues: {
|
|
1776
|
+
project: project,
|
|
1777
|
+
definitionId: definitionId
|
|
1778
|
+
},
|
|
1779
|
+
body: tags
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
|
|
1784
|
+
*
|
|
1785
|
+
* @param project - Project ID or project name
|
|
1786
|
+
* @param definitionId - The ID of the definition.
|
|
1787
|
+
* @param tag - The tag to remove.
|
|
1788
|
+
*/
|
|
1789
|
+
async deleteDefinitionTag(project, definitionId, tag) {
|
|
1790
|
+
return this.beginRequest({
|
|
1791
|
+
apiVersion: "7.2-preview.3",
|
|
1792
|
+
method: "DELETE",
|
|
1793
|
+
routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
|
|
1794
|
+
routeValues: {
|
|
1795
|
+
project: project,
|
|
1796
|
+
definitionId: definitionId,
|
|
1797
|
+
tag: tag
|
|
1798
|
+
}
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Gets the tags for a definition.
|
|
1803
|
+
*
|
|
1804
|
+
* @param project - Project ID or project name
|
|
1805
|
+
* @param definitionId - The ID of the definition.
|
|
1806
|
+
* @param revision - The definition revision number. If not specified, uses the latest revision of the definition.
|
|
1807
|
+
*/
|
|
1808
|
+
async getDefinitionTags(project, definitionId, revision) {
|
|
1809
|
+
const queryValues = {
|
|
1810
|
+
revision: revision
|
|
1811
|
+
};
|
|
1812
|
+
return this.beginRequest({
|
|
1813
|
+
apiVersion: "7.2-preview.3",
|
|
1814
|
+
routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
|
|
1815
|
+
routeValues: {
|
|
1816
|
+
project: project,
|
|
1817
|
+
definitionId: definitionId
|
|
1818
|
+
},
|
|
1819
|
+
queryParams: queryValues
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1822
|
+
/**
|
|
1823
|
+
* Adds/Removes tags from a definition.
|
|
1824
|
+
*
|
|
1825
|
+
* @param updateParameters - The tags to add/remove.
|
|
1826
|
+
* @param project - Project ID or project name
|
|
1827
|
+
* @param definitionId - The ID of the definition.
|
|
1828
|
+
*/
|
|
1829
|
+
async updateDefinitionTags(updateParameters, project, definitionId) {
|
|
1830
|
+
return this.beginRequest({
|
|
1831
|
+
apiVersion: "7.2-preview.3",
|
|
1832
|
+
method: "PATCH",
|
|
1833
|
+
routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
|
|
1834
|
+
routeValues: {
|
|
1835
|
+
project: project,
|
|
1836
|
+
definitionId: definitionId
|
|
1837
|
+
},
|
|
1838
|
+
body: updateParameters
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* Removes a tag from builds, definitions, and from the tag store
|
|
1843
|
+
*
|
|
1844
|
+
* @param project - Project ID or project name
|
|
1845
|
+
* @param tag - The tag to remove.
|
|
1846
|
+
*/
|
|
1847
|
+
async deleteTag(project, tag) {
|
|
1848
|
+
return this.beginRequest({
|
|
1849
|
+
apiVersion: "7.2-preview.3",
|
|
1850
|
+
method: "DELETE",
|
|
1851
|
+
routeTemplate: "{project}/_apis/build/tags/{*tag}",
|
|
1852
|
+
routeValues: {
|
|
1853
|
+
project: project,
|
|
1854
|
+
tag: tag
|
|
1855
|
+
}
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* Gets a list of all build tags in the project.
|
|
1860
|
+
*
|
|
1861
|
+
* @param project - Project ID or project name
|
|
1862
|
+
*/
|
|
1863
|
+
async getTags(project) {
|
|
1864
|
+
return this.beginRequest({
|
|
1865
|
+
apiVersion: "7.2-preview.3",
|
|
1866
|
+
routeTemplate: "{project}/_apis/build/tags/{*tag}",
|
|
1867
|
+
routeValues: {
|
|
1868
|
+
project: project
|
|
1869
|
+
}
|
|
1870
|
+
});
|
|
1871
|
+
}
|
|
1872
|
+
/**
|
|
1873
|
+
* Deletes a build definition template.
|
|
1874
|
+
*
|
|
1875
|
+
* @param project - Project ID or project name
|
|
1876
|
+
* @param templateId - The ID of the template.
|
|
1877
|
+
*/
|
|
1878
|
+
async deleteTemplate(project, templateId) {
|
|
1879
|
+
return this.beginRequest({
|
|
1880
|
+
apiVersion: "7.2-preview.3",
|
|
1881
|
+
method: "DELETE",
|
|
1882
|
+
routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
|
|
1883
|
+
routeValues: {
|
|
1884
|
+
project: project,
|
|
1885
|
+
templateId: templateId
|
|
1886
|
+
}
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1890
|
+
* Gets a specific build definition template.
|
|
1891
|
+
*
|
|
1892
|
+
* @param project - Project ID or project name
|
|
1893
|
+
* @param templateId - The ID of the requested template.
|
|
1894
|
+
*/
|
|
1895
|
+
async getTemplate(project, templateId) {
|
|
1896
|
+
return this.beginRequest({
|
|
1897
|
+
apiVersion: "7.2-preview.3",
|
|
1898
|
+
routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
|
|
1899
|
+
routeValues: {
|
|
1900
|
+
project: project,
|
|
1901
|
+
templateId: templateId
|
|
1902
|
+
}
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
* Gets all definition templates.
|
|
1907
|
+
*
|
|
1908
|
+
* @param project - Project ID or project name
|
|
1909
|
+
*/
|
|
1910
|
+
async getTemplates(project) {
|
|
1911
|
+
return this.beginRequest({
|
|
1912
|
+
apiVersion: "7.2-preview.3",
|
|
1913
|
+
routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
|
|
1914
|
+
routeValues: {
|
|
1915
|
+
project: project
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
/**
|
|
1920
|
+
* Updates an existing build definition template.
|
|
1921
|
+
*
|
|
1922
|
+
* @param template - The new version of the template.
|
|
1923
|
+
* @param project - Project ID or project name
|
|
1924
|
+
* @param templateId - The ID of the template.
|
|
1925
|
+
*/
|
|
1926
|
+
async saveTemplate(template, project, templateId) {
|
|
1927
|
+
return this.beginRequest({
|
|
1928
|
+
apiVersion: "7.2-preview.3",
|
|
1929
|
+
method: "PUT",
|
|
1930
|
+
routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
|
|
1931
|
+
routeValues: {
|
|
1932
|
+
project: project,
|
|
1933
|
+
templateId: templateId
|
|
1934
|
+
},
|
|
1935
|
+
body: template
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
/**
|
|
1939
|
+
* Gets details for a build
|
|
1940
|
+
*
|
|
1941
|
+
* @param project - Project ID or project name
|
|
1942
|
+
* @param buildId -
|
|
1943
|
+
* @param timelineId -
|
|
1944
|
+
* @param changeId -
|
|
1945
|
+
* @param planId -
|
|
1946
|
+
*/
|
|
1947
|
+
async getBuildTimeline(project, buildId, timelineId, changeId, planId) {
|
|
1948
|
+
const queryValues = {
|
|
1949
|
+
changeId: changeId,
|
|
1950
|
+
planId: planId
|
|
1951
|
+
};
|
|
1952
|
+
return this.beginRequest({
|
|
1953
|
+
apiVersion: "7.2-preview.3",
|
|
1954
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",
|
|
1955
|
+
routeValues: {
|
|
1956
|
+
project: project,
|
|
1957
|
+
buildId: buildId,
|
|
1958
|
+
timelineId: timelineId
|
|
1959
|
+
},
|
|
1960
|
+
queryParams: queryValues
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Recreates the webhooks for the specified triggers in the given source code repository.
|
|
1965
|
+
*
|
|
1966
|
+
* @param triggerTypes - The types of triggers to restore webhooks for.
|
|
1967
|
+
* @param project - Project ID or project name
|
|
1968
|
+
* @param providerName - The name of the source provider.
|
|
1969
|
+
* @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
|
1970
|
+
* @param repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
|
|
1971
|
+
*/
|
|
1972
|
+
async restoreWebhooks(triggerTypes, project, providerName, serviceEndpointId, repository) {
|
|
1973
|
+
const queryValues = {
|
|
1974
|
+
serviceEndpointId: serviceEndpointId,
|
|
1975
|
+
repository: repository
|
|
1976
|
+
};
|
|
1977
|
+
return this.beginRequest({
|
|
1978
|
+
apiVersion: "7.2-preview.1",
|
|
1979
|
+
method: "POST",
|
|
1980
|
+
routeTemplate: "{project}/_apis/sourceProviders/{providerName}/webhooks",
|
|
1981
|
+
routeValues: {
|
|
1982
|
+
project: project,
|
|
1983
|
+
providerName: providerName
|
|
1984
|
+
},
|
|
1985
|
+
queryParams: queryValues,
|
|
1986
|
+
body: triggerTypes
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* Gets a list of webhooks installed in the given source code repository.
|
|
1991
|
+
*
|
|
1992
|
+
* @param project - Project ID or project name
|
|
1993
|
+
* @param providerName - The name of the source provider.
|
|
1994
|
+
* @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
|
1995
|
+
* @param repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
|
|
1996
|
+
*/
|
|
1997
|
+
async listWebhooks(project, providerName, serviceEndpointId, repository) {
|
|
1998
|
+
const queryValues = {
|
|
1999
|
+
serviceEndpointId: serviceEndpointId,
|
|
2000
|
+
repository: repository
|
|
2001
|
+
};
|
|
2002
|
+
return this.beginRequest({
|
|
2003
|
+
apiVersion: "7.2-preview.1",
|
|
2004
|
+
routeTemplate: "{project}/_apis/sourceProviders/{providerName}/webhooks",
|
|
2005
|
+
routeValues: {
|
|
2006
|
+
project: project,
|
|
2007
|
+
providerName: providerName
|
|
2008
|
+
},
|
|
2009
|
+
queryParams: queryValues
|
|
2010
|
+
});
|
|
2011
|
+
}
|
|
2012
|
+
/**
|
|
2013
|
+
* Gets the work items associated with a build. Only work items in the same project are returned.
|
|
2014
|
+
*
|
|
2015
|
+
* @param project - Project ID or project name
|
|
2016
|
+
* @param buildId - The ID of the build.
|
|
2017
|
+
* @param top - The maximum number of work items to return.
|
|
2018
|
+
*/
|
|
2019
|
+
async getBuildWorkItemsRefs(project, buildId, top) {
|
|
2020
|
+
const queryValues = {
|
|
2021
|
+
'$top': top
|
|
2022
|
+
};
|
|
2023
|
+
return this.beginRequest({
|
|
2024
|
+
apiVersion: "7.2-preview.2",
|
|
2025
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/workitems",
|
|
2026
|
+
routeValues: {
|
|
2027
|
+
project: project,
|
|
2028
|
+
buildId: buildId
|
|
2029
|
+
},
|
|
2030
|
+
queryParams: queryValues
|
|
2031
|
+
});
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
* Gets the work items associated with a build, filtered to specific commits.
|
|
2035
|
+
*
|
|
2036
|
+
* @param commitIds - A comma-delimited list of commit IDs.
|
|
2037
|
+
* @param project - Project ID or project name
|
|
2038
|
+
* @param buildId - The ID of the build.
|
|
2039
|
+
* @param top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified.
|
|
2040
|
+
*/
|
|
2041
|
+
async getBuildWorkItemsRefsFromCommits(commitIds, project, buildId, top) {
|
|
2042
|
+
const queryValues = {
|
|
2043
|
+
'$top': top
|
|
2044
|
+
};
|
|
2045
|
+
return this.beginRequest({
|
|
2046
|
+
apiVersion: "7.2-preview.2",
|
|
2047
|
+
method: "POST",
|
|
2048
|
+
routeTemplate: "{project}/_apis/build/builds/{buildId}/workitems",
|
|
2049
|
+
routeValues: {
|
|
2050
|
+
project: project,
|
|
2051
|
+
buildId: buildId
|
|
2052
|
+
},
|
|
2053
|
+
queryParams: queryValues,
|
|
2054
|
+
body: commitIds
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* Gets all the work items between two builds.
|
|
2059
|
+
*
|
|
2060
|
+
* @param project - Project ID or project name
|
|
2061
|
+
* @param fromBuildId - The ID of the first build.
|
|
2062
|
+
* @param toBuildId - The ID of the last build.
|
|
2063
|
+
* @param top - The maximum number of work items to return.
|
|
2064
|
+
*/
|
|
2065
|
+
async getWorkItemsBetweenBuilds(project, fromBuildId, toBuildId, top) {
|
|
2066
|
+
const queryValues = {
|
|
2067
|
+
fromBuildId: fromBuildId,
|
|
2068
|
+
toBuildId: toBuildId,
|
|
2069
|
+
'$top': top
|
|
2070
|
+
};
|
|
2071
|
+
return this.beginRequest({
|
|
2072
|
+
apiVersion: "7.2-preview.2",
|
|
2073
|
+
routeTemplate: "{project}/_apis/build/workitems",
|
|
2074
|
+
routeValues: {
|
|
2075
|
+
project: project
|
|
2076
|
+
},
|
|
2077
|
+
queryParams: queryValues
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
2080
|
+
/**
|
|
2081
|
+
* Converts a definition to YAML, optionally at a specific revision.
|
|
2082
|
+
*
|
|
2083
|
+
* @param project - Project ID or project name
|
|
2084
|
+
* @param definitionId - The ID of the definition.
|
|
2085
|
+
* @param revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
|
|
2086
|
+
* @param minMetricsTime - If specified, indicates the date from which metrics should be included.
|
|
2087
|
+
* @param propertyFilters - A comma-delimited list of properties to include in the results.
|
|
2088
|
+
* @param includeLatestBuilds -
|
|
2089
|
+
*/
|
|
2090
|
+
async getDefinitionYaml(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) {
|
|
2091
|
+
const queryValues = {
|
|
2092
|
+
revision: revision,
|
|
2093
|
+
minMetricsTime: minMetricsTime,
|
|
2094
|
+
propertyFilters: propertyFilters && propertyFilters.join(","),
|
|
2095
|
+
includeLatestBuilds: includeLatestBuilds
|
|
2096
|
+
};
|
|
2097
|
+
return this.beginRequest({
|
|
2098
|
+
apiVersion: "7.2-preview.1",
|
|
2099
|
+
routeTemplate: "{project}/_apis/build/definitions/{definitionId}/yaml",
|
|
2100
|
+
routeValues: {
|
|
2101
|
+
project: project,
|
|
2102
|
+
definitionId: definitionId
|
|
2103
|
+
},
|
|
2104
|
+
queryParams: queryValues
|
|
2105
|
+
});
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
BuildRestClient.RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4";
|