Merge pull request #133 from microsoft/releases/4.236.0
Releases/4.236.0
This commit is contained in:
Коммит
4007a78109
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "azure-devops-extension-api",
|
||||
"version": "4.235.0",
|
||||
"version": "4.236.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "azure-devops-extension-api",
|
||||
"version": "4.235.0",
|
||||
"version": "4.236.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"whatwg-fetch": "~3.0.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "azure-devops-extension-api",
|
||||
"version": "4.235.0",
|
||||
"version": "4.236.0",
|
||||
"description": "REST client libraries and contracts for Azure DevOps web extension developers.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Alert Summary by severity.
|
||||
*/
|
||||
export interface AlertSummaryBySeverity {
|
||||
/**
|
||||
* Total Critical severity alerts.
|
||||
*/
|
||||
critical: number;
|
||||
/**
|
||||
* Total High severity alerts.
|
||||
*/
|
||||
high: number;
|
||||
/**
|
||||
* Total low severity alerts.
|
||||
*/
|
||||
low: number;
|
||||
/**
|
||||
* Total Medium severity alerts.
|
||||
*/
|
||||
medium: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Org Alert Summary.
|
||||
*/
|
||||
export interface OrgAlertSummary {
|
||||
/**
|
||||
* Org Id.
|
||||
*/
|
||||
orgId: string;
|
||||
/**
|
||||
* A list of Project summary data.
|
||||
*/
|
||||
projects: ProjectAlertSummary[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Org Enablement Summary.
|
||||
*/
|
||||
export interface OrgEnablementSummary {
|
||||
/**
|
||||
* Org Id.
|
||||
*/
|
||||
orgId: string;
|
||||
/**
|
||||
* A list of Project Enablement data.
|
||||
*/
|
||||
projects: ProjectEnablementSummary[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Project Alert Summary.
|
||||
*/
|
||||
export interface ProjectAlertSummary {
|
||||
/**
|
||||
* Project Id.
|
||||
*/
|
||||
projectId: string;
|
||||
/**
|
||||
* Project Name.
|
||||
*/
|
||||
projectName: string;
|
||||
/**
|
||||
* A list of RepoAlertSummary data.
|
||||
*/
|
||||
repos: RepoAlertSummary[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Project Enablement Summary.
|
||||
*/
|
||||
export interface ProjectEnablementSummary {
|
||||
/**
|
||||
* Project Id.
|
||||
*/
|
||||
projectId: string;
|
||||
/**
|
||||
* Project Name.
|
||||
*/
|
||||
projectName: string;
|
||||
/**
|
||||
* A list of RepoEnablementSummary data.
|
||||
*/
|
||||
repos: RepoEnablementSummary[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Repo Alert Summary.
|
||||
*/
|
||||
export interface RepoAlertSummary {
|
||||
/**
|
||||
* Total alerts by severity.
|
||||
*/
|
||||
alertsBySeverity: AlertSummaryBySeverity;
|
||||
/**
|
||||
* RepoId.
|
||||
*/
|
||||
repoId: string;
|
||||
/**
|
||||
* Repo Name.
|
||||
*/
|
||||
repoName: string;
|
||||
/**
|
||||
* Total active alerts in the repo.
|
||||
*/
|
||||
totalAlerts: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Repo Enablement Summary.
|
||||
*/
|
||||
export interface RepoEnablementSummary {
|
||||
/**
|
||||
* AdvSec is enabled for the repo.
|
||||
*/
|
||||
advSecIsEnabled: boolean;
|
||||
/**
|
||||
* RepoId.
|
||||
*/
|
||||
repoId: string;
|
||||
/**
|
||||
* Repo Name.
|
||||
*/
|
||||
repoName: string;
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { IVssRestClientOptions } from "../Common/Context";
|
||||
import { RestClientBase } from "../Common/RestClientBase";
|
||||
|
||||
import * as Reporting from "../AdvancedSecurity.Reporting/Reporting";
|
||||
|
||||
export class ReportingRestClient extends RestClientBase {
|
||||
constructor(options: IVssRestClientOptions) {
|
||||
super(options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Alert summary by severity for the org
|
||||
*
|
||||
*/
|
||||
public async getAlertSummaryForOrg(
|
||||
): Promise<Reporting.OrgAlertSummary> {
|
||||
|
||||
return this.beginRequest<Reporting.OrgAlertSummary>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
routeTemplate: "_apis/Reporting/summary/{action}",
|
||||
routeValues: {
|
||||
action: "Alerts"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public async getEnablementSummaryForOrg(
|
||||
): Promise<Reporting.OrgEnablementSummary> {
|
||||
|
||||
return this.beginRequest<Reporting.OrgEnablementSummary>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
routeTemplate: "_apis/Reporting/summary/{action}",
|
||||
routeValues: {
|
||||
action: "Enablement"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
|
@ -70,6 +70,10 @@ export interface Dashboard {
|
|||
* Server defined version tracking value, used for edit collision detection.
|
||||
*/
|
||||
eTag: string;
|
||||
/**
|
||||
* Dashboard Global Parameters Config
|
||||
*/
|
||||
globalParametersConfig: string;
|
||||
/**
|
||||
* ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty.
|
||||
*/
|
||||
|
|
|
@ -25,10 +25,6 @@ export interface AdvSecEnablementStatus {
|
|||
* Enabled status 0 disabled, 1 enabled, Null never explicitly set, always whatever project is, ya this should probably be an enum somewhere
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Enabled changed on datetime To Be Removed M223 +
|
||||
*/
|
||||
enabledChangedOnDate: Date;
|
||||
/**
|
||||
* ProjectId
|
||||
*/
|
||||
|
|
|
@ -96,6 +96,26 @@ export class ManagementRestClient extends RestClientBase {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -\> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.
|
||||
*
|
||||
* @param meterUsage -
|
||||
*/
|
||||
public async createBillingSnapshot(
|
||||
meterUsage: Management.MeterUsage
|
||||
): Promise<void> {
|
||||
|
||||
return this.beginRequest<void>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
method: "POST",
|
||||
routeTemplate: "_apis/Management/MeterUsage/{action}",
|
||||
routeValues: {
|
||||
action: "Default"
|
||||
},
|
||||
body: meterUsage
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all billable committers details, including those not matched with a VSID.
|
||||
*
|
||||
|
@ -156,24 +176,6 @@ export class ManagementRestClient extends RestClientBase {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param meterUsage -
|
||||
*/
|
||||
public async setBillingSnapshot(
|
||||
meterUsage: Management.MeterUsage
|
||||
): Promise<void> {
|
||||
|
||||
return this.beginRequest<void>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
method: "POST",
|
||||
routeTemplate: "_apis/Management/MeterUsage/{action}",
|
||||
routeValues: {
|
||||
action: "Default"
|
||||
},
|
||||
body: meterUsage
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current status of Advanced Security for the organization
|
||||
*
|
||||
|
|
|
@ -1160,7 +1160,9 @@ export interface EventsConfig {
|
|||
|
||||
export enum ExclusiveLockType {
|
||||
RunLatest = 0,
|
||||
Sequential = 1
|
||||
Sequential = 1,
|
||||
BranchRunLatest = 2,
|
||||
Parallel = 3
|
||||
}
|
||||
|
||||
export interface ExpressionValidationItem extends ValidationItem {
|
||||
|
@ -1621,6 +1623,10 @@ export interface ResourceLockRequest {
|
|||
* The date/time this request was assigned.
|
||||
*/
|
||||
assignTime: Date;
|
||||
/**
|
||||
* The branch the lock belongs to. It's used only by RunLatest exclusive locks of persisted stages.
|
||||
*/
|
||||
branch: string;
|
||||
/**
|
||||
* The ID of the check run waiting on this request
|
||||
*/
|
||||
|
|
|
@ -3667,14 +3667,17 @@ export class TaskAgentRestClient extends RestClientBase {
|
|||
*
|
||||
* @param project - Project ID or project name
|
||||
* @param groupIds - Comma separated list of Ids of variable groups.
|
||||
* @param loadSecrets -
|
||||
*/
|
||||
public async getVariableGroupsById(
|
||||
project: string,
|
||||
groupIds: number[]
|
||||
groupIds: number[],
|
||||
loadSecrets?: boolean
|
||||
): Promise<TaskAgent.VariableGroup[]> {
|
||||
|
||||
const queryValues: any = {
|
||||
groupIds: groupIds && groupIds.join(",")
|
||||
groupIds: groupIds && groupIds.join(","),
|
||||
loadSecrets: loadSecrets
|
||||
};
|
||||
|
||||
return this.beginRequest<TaskAgent.VariableGroup[]>({
|
||||
|
|
|
@ -1223,19 +1223,19 @@ export interface LineBlockCoverage {
|
|||
/**
|
||||
* Links
|
||||
*/
|
||||
export interface Link<T> {
|
||||
export interface Link {
|
||||
/**
|
||||
* Display Name
|
||||
*/
|
||||
displayName: string;
|
||||
/**
|
||||
* Operation Type
|
||||
* Link Operation Type Valid values = (Open, WebService)
|
||||
*/
|
||||
operationType: LinkOperationType;
|
||||
operationType: string;
|
||||
/**
|
||||
* Parent type
|
||||
* Link type (maps to enum value; see parent object for acceptable values)
|
||||
*/
|
||||
type: T;
|
||||
type: string;
|
||||
/**
|
||||
* Link url
|
||||
*/
|
||||
|
@ -1260,20 +1260,6 @@ export interface LinkedWorkItemsQueryResult {
|
|||
workItems: WorkItemReference[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the operation type to take when clicking on a link
|
||||
*/
|
||||
export enum LinkOperationType {
|
||||
/**
|
||||
* Open link in new tab/window
|
||||
*/
|
||||
Open = 0,
|
||||
/**
|
||||
* Make web service call
|
||||
*/
|
||||
WebService = 1
|
||||
}
|
||||
|
||||
/**
|
||||
* Test summary metrics.
|
||||
*/
|
||||
|
@ -1784,21 +1770,6 @@ export enum ResultGroupType {
|
|||
Generic = 4
|
||||
}
|
||||
|
||||
export enum ResultLinkType {
|
||||
/**
|
||||
* Result Investigation
|
||||
*/
|
||||
ResultInvestigation = 0,
|
||||
/**
|
||||
* Test info
|
||||
*/
|
||||
TestInfo = 1,
|
||||
/**
|
||||
* More info
|
||||
*/
|
||||
MoreInfo = 2
|
||||
}
|
||||
|
||||
export enum ResultMetadata {
|
||||
/**
|
||||
* Rerun metadata
|
||||
|
@ -2353,17 +2324,6 @@ export enum Service {
|
|||
Tfs = 2
|
||||
}
|
||||
|
||||
export enum SessionLinkType {
|
||||
/**
|
||||
* Default
|
||||
*/
|
||||
None = 0,
|
||||
/**
|
||||
* Link type for Session information
|
||||
*/
|
||||
SessionInfo = 1
|
||||
}
|
||||
|
||||
export enum SessionResult {
|
||||
/**
|
||||
* Default
|
||||
|
@ -2464,9 +2424,9 @@ export interface SharedStepModel {
|
|||
*/
|
||||
export interface Source {
|
||||
/**
|
||||
* Source links
|
||||
* Source links Valid values for "type" property = (SessionInfo)
|
||||
*/
|
||||
links: Link<SessionLinkType>[];
|
||||
links: Link[];
|
||||
/**
|
||||
* Source origin system
|
||||
*/
|
||||
|
@ -2971,9 +2931,9 @@ export interface TestCaseResult {
|
|||
*/
|
||||
layoutUid: string;
|
||||
/**
|
||||
* Links
|
||||
* Links Valid values for "type" property = (MoreInfo, ResultInvestigation, TestInfo)
|
||||
*/
|
||||
links: Link<ResultLinkType>[];
|
||||
links: Link[];
|
||||
/**
|
||||
* Locale
|
||||
*/
|
||||
|
@ -5147,6 +5107,24 @@ export interface TestSessionExploredWorkItemReference extends TestSessionWorkIte
|
|||
startTime: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifications for the TestResults Session
|
||||
*/
|
||||
export interface TestSessionNotification {
|
||||
/**
|
||||
* Notification Body
|
||||
*/
|
||||
body: string;
|
||||
/**
|
||||
* Notification Severity Valid values = (Informational, Warning, Error, Critical)
|
||||
*/
|
||||
severity: string;
|
||||
/**
|
||||
* Notification Title
|
||||
*/
|
||||
title: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the source from which the test session was created
|
||||
*/
|
||||
|
|
|
@ -657,6 +657,49 @@ export class TestResultsRestClient extends RestClientBase {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newFields -
|
||||
* @param project - Project ID or project name
|
||||
*/
|
||||
public async addCustomFields(
|
||||
newFields: Test.CustomTestFieldDefinition[],
|
||||
project: string
|
||||
): Promise<Test.CustomTestFieldDefinition[]> {
|
||||
|
||||
return this.beginRequest<Test.CustomTestFieldDefinition[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
method: "POST",
|
||||
routeTemplate: "{project}/_apis/testresults/extensionfields",
|
||||
routeValues: {
|
||||
project: project
|
||||
},
|
||||
body: newFields
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param project - Project ID or project name
|
||||
* @param scopeFilter -
|
||||
*/
|
||||
public async queryCustomFields(
|
||||
project: string,
|
||||
scopeFilter: Test.CustomTestFieldScope
|
||||
): Promise<Test.CustomTestFieldDefinition[]> {
|
||||
|
||||
const queryValues: any = {
|
||||
scopeFilter: scopeFilter
|
||||
};
|
||||
|
||||
return this.beginRequest<Test.CustomTestFieldDefinition[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
routeTemplate: "{project}/_apis/testresults/extensionfields",
|
||||
routeValues: {
|
||||
project: project
|
||||
},
|
||||
queryParams: queryValues
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file coverage for the specified file
|
||||
*
|
||||
|
@ -680,6 +723,51 @@ export class TestResultsRestClient extends RestClientBase {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param project - Project ID or project name
|
||||
* @param buildDefinitionId -
|
||||
* @param minBuildCreatedDate -
|
||||
*/
|
||||
public async getFlakyTestResultsByBuildDefinitionId(
|
||||
project: string,
|
||||
buildDefinitionId: number,
|
||||
minBuildCreatedDate: Date
|
||||
): Promise<Test.TestCaseResult[]> {
|
||||
|
||||
const queryValues: any = {
|
||||
buildDefinitionId: buildDefinitionId,
|
||||
minBuildCreatedDate: minBuildCreatedDate
|
||||
};
|
||||
|
||||
return this.beginRequest<Test.TestCaseResult[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
routeTemplate: "{project}/_apis/testresults/flakytestresults/builddefinition",
|
||||
routeValues: {
|
||||
project: project
|
||||
},
|
||||
queryParams: queryValues
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param project - Project ID or project name
|
||||
* @param runId -
|
||||
*/
|
||||
public async getFlakyTestResultsByTestRun(
|
||||
project: string,
|
||||
runId: number
|
||||
): Promise<Test.TestCaseResult[]> {
|
||||
|
||||
return this.beginRequest<Test.TestCaseResult[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
routeTemplate: "{project}/_apis/testresults/flakytestresults/runs/{runId}",
|
||||
routeValues: {
|
||||
project: project,
|
||||
runId: runId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filter -
|
||||
* @param project - Project ID or project name
|
||||
|
@ -2720,6 +2808,27 @@ export class TestResultsRestClient extends RestClientBase {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves Test runs associated to a session
|
||||
*
|
||||
* @param project - Project ID or project name
|
||||
* @param sessionId - Id of TestResults session to obtain Test Runs for.
|
||||
*/
|
||||
public async getTestRunsBySessionId(
|
||||
project: string,
|
||||
sessionId: number
|
||||
): Promise<number[]> {
|
||||
|
||||
return this.beginRequest<number[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/runs",
|
||||
routeValues: {
|
||||
project: project,
|
||||
sessionId: sessionId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates TestResultsSession object in TCM data store
|
||||
*
|
||||
|
@ -2814,6 +2923,52 @@ export class TestResultsRestClient extends RestClientBase {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates Notification object in TCM data store for a given session
|
||||
*
|
||||
* @param notifications - Notification(s) to add for the specified sessionId
|
||||
* @param project - Project ID or project name
|
||||
* @param sessionId - ID of Session to add Notification
|
||||
*/
|
||||
public async createNotification(
|
||||
notifications: Test.TestSessionNotification[],
|
||||
project: string,
|
||||
sessionId: number
|
||||
): Promise<number[]> {
|
||||
|
||||
return this.beginRequest<number[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
method: "POST",
|
||||
routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/notifications",
|
||||
routeValues: {
|
||||
project: project,
|
||||
sessionId: sessionId
|
||||
},
|
||||
body: notifications
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves TestResultsSession Notification objects in TCM data store
|
||||
*
|
||||
* @param project - Project ID or project name
|
||||
* @param sessionId - Id of TestResults session to obtain Notifications for.
|
||||
*/
|
||||
public async getSessionNotifications(
|
||||
project: string,
|
||||
sessionId: number
|
||||
): Promise<Test.TestSessionNotification[]> {
|
||||
|
||||
return this.beginRequest<Test.TestSessionNotification[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/notifications",
|
||||
routeValues: {
|
||||
project: project,
|
||||
sessionId: sessionId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Test Results to test run session
|
||||
*
|
||||
|
@ -2877,6 +3032,31 @@ export class TestResultsRestClient extends RestClientBase {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates TestResultsMRX objects in TCM data store for existing test results
|
||||
*
|
||||
* @param results - Results object with only test results MRX properties and existing testResultId
|
||||
* @param project - Project ID or project name
|
||||
* @param runId - RunId of test run
|
||||
*/
|
||||
public async updateTestResultsToTestRunSession(
|
||||
results: Test.TestCaseResult[],
|
||||
project: string,
|
||||
runId: number
|
||||
): Promise<number[]> {
|
||||
|
||||
return this.beginRequest<number[]>({
|
||||
apiVersion: "7.2-preview.1",
|
||||
method: "PATCH",
|
||||
routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",
|
||||
routeValues: {
|
||||
project: project,
|
||||
runId: runId
|
||||
},
|
||||
body: results
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param testSettings -
|
||||
* @param project - Project ID or project name
|
||||
|
|
|
@ -361,6 +361,11 @@ export interface TraceFilter {
|
|||
userLogin: string;
|
||||
}
|
||||
|
||||
export enum UserProfileBackupState {
|
||||
Inactive = 0,
|
||||
Active = 1
|
||||
}
|
||||
|
||||
export enum UserProfileSyncState {
|
||||
None = 0,
|
||||
Completed = 1,
|
||||
|
|
Загрузка…
Ссылка в новой задаче