* M234 API updates

* fix import

* update version
This commit is contained in:
Denis Rumyantsev 2024-03-05 11:10:49 +01:00 коммит произвёл GitHub
Родитель 37331db331
Коммит b0f028ccba
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
25 изменённых файлов: 637 добавлений и 236 удалений

Просмотреть файл

@ -25,7 +25,7 @@ export interface IAlertApi extends basem.ClientApiBase {
getAlertInstances(project: string, alertId: number, repository: string, ref?: string): Promise<AlertInterfaces.AlertAnalysisInstance[]>;
uploadSarif(customHeaders: any, contentStream: NodeJS.ReadableStream, project: string, repository: string): Promise<number>;
getUxFilters(project: string, repository: string, alertType: AlertInterfaces.AlertType): Promise<AlertInterfaces.UxFilters>;
getSarif(sarifId: number): Promise<boolean>;
getSarif(sarifId: number): Promise<AlertInterfaces.SarifUploadStatus>;
}
export class AlertApi extends basem.ClientApiBase implements IAlertApi {
@ -257,9 +257,11 @@ export class AlertApi extends basem.ClientApiBase implements IAlertApi {
}
/**
* Get instances of an alert.
*
* @param {string} project - Project ID or project name
* @param {number} alertId
* @param {string} repository
* @param {number} alertId - ID of alert to retrieve
* @param {string} repository - Name or id of a repository that alert is part of
* @param {string} ref
*/
public async getAlertInstances(
@ -418,16 +420,16 @@ export class AlertApi extends basem.ClientApiBase implements IAlertApi {
*/
public async getSarif(
sarifId: number
): Promise<boolean> {
): Promise<AlertInterfaces.SarifUploadStatus> {
return new Promise<boolean>(async (resolve, reject) => {
return new Promise<AlertInterfaces.SarifUploadStatus>(async (resolve, reject) => {
let routeValues: any = {
sarifId: sarifId
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"7.2-preview.2",
"Alert",
"a04689e7-0f81-48a2-8d18-40654c47494c",
routeValues);
@ -436,11 +438,11 @@ export class AlertApi extends basem.ClientApiBase implements IAlertApi {
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<boolean>;
res = await this.rest.get<boolean>(url, options);
let res: restm.IRestResponse<AlertInterfaces.SarifUploadStatus>;
res = await this.rest.get<AlertInterfaces.SarifUploadStatus>(url, options);
let ret = this.formatResponse(res.result,
null,
AlertInterfaces.TypeInfo.SarifUploadStatus,
false);
resolve(ret);

Просмотреть файл

@ -53,12 +53,14 @@ export class ExtensionManagementApi extends basem.ClientApiBase implements IExte
public static readonly RESOURCE_AREA_ID = "6c2b0933-3600-42ae-bf8b-93d4f7e83594";
/**
* @param {string} itemId
* @param {boolean} testCommerce
* @param {boolean} isFreeOrTrialInstall
* @param {boolean} isAccountOwner
* @param {boolean} isLinked
* @param {boolean} isConnectedServer
* This API is called by acquisition/install page to get possible user actions like Buy/Request
*
* @param {string} itemId - Fully qualified name of extension (<publisher_id>.<extension_id>)
* @param {boolean} testCommerce - Parameter to test paid preview extension without making azure plans public
* @param {boolean} isFreeOrTrialInstall - Parameter represents install or trial workflow (required for legacy install flows)
* @param {boolean} isAccountOwner - Parameter represents whether user is owner or PCA of an account
* @param {boolean} isLinked - Parameter represents whether account is linked with a subscription
* @param {boolean} isConnectedServer - Parameter represents whether Buy operation should be evaluated
* @param {boolean} isBuyOperationValid
*/
public async getAcquisitionOptions(

Просмотреть файл

@ -182,18 +182,20 @@ export class FileContainerApiBase extends basem.ClientApiBase implements IFileCo
}
/**
* @param {number} containerId
* @param {string} scope
* @param {string} itemPath
* @param {boolean} metadata
* @param {string} format
* @param {string} downloadFileName
* Gets the specified file container object in a format dependent upon the given parameters or HTTP Accept request header
*
* @param {number} containerId - The requested container Id
* @param {string} scope - A guid representing the scope of the container. This is often the project id.
* @param {string} itemPath - The path to the item of interest
* @param {boolean} metadata - If true, this overrides any specified format parameter or HTTP Accept request header to provide non-recursive information for the given itemPath
* @param {string} format - If specified, this overrides the HTTP Accept request header to return either 'json' or 'zip'. If $format is specified, then api-version should also be specified as a query parameter.
* @param {string} downloadFileName - If specified and returning other than JSON format, then this download name will be used (else defaults to itemPath)
* @param {boolean} includeDownloadTickets
* @param {boolean} isShallow
* @param {boolean} ignoreRequestedMediaType
* @param {boolean} isShallow - If true, returns only immediate children(files & folders) for the given itemPath. False will return all items recursively within itemPath.
* @param {boolean} ignoreRequestedMediaType - Set to true to ignore the HTTP Accept request header. Default is false.
* @param {boolean} includeBlobMetadata
* @param {boolean} saveAbsolutePath
* @param {boolean} preferRedirect
* @param {boolean} saveAbsolutePath - Set to false to not save the absolute path to the specified directory of the artifact in the returned archive. Works only for artifact directories. Default is true.
* @param {boolean} preferRedirect - Set to true to get the redirect response which leads to the stream with content. Default is false.
*/
public async getItems(
containerId: number,

Просмотреть файл

@ -75,6 +75,7 @@ export interface IGalleryApi extends compatBase.GalleryCompatHttpClientBase {
getPublisher(publisherName: string, flags?: number): Promise<GalleryInterfaces.Publisher>;
updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise<GalleryInterfaces.Publisher>;
updatePublisherMembers(roleAssignments: GalleryInterfaces.PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise<GalleryInterfaces.PublisherRoleAssignment[]>;
publishExtensionWithPublisherSignature(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise<GalleryInterfaces.PublishedExtension>;
getPublisherWithoutToken(publisherName: string): Promise<GalleryInterfaces.Publisher>;
getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise<GalleryInterfaces.QuestionsResult>;
reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise<GalleryInterfaces.Concern>;
@ -2159,7 +2160,9 @@ export class GalleryApi extends compatBase.GalleryCompatHttpClientBase implement
}
/**
* @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel
* Rest end point to validate if an Azure publisher owns an extension for 3rd party commerce scenario. Azure only supports POST operations and the above signature is not typical of the REST operations. http://sharepoint/sites/AzureUX/_layouts/15/WopiFrame2.aspx?sourcedoc={A793D31E-6DC6-4174-8FA3-DE3F82B51642}&file=Data%20Market%20Partner%20integration%20with%20Marketplace%20service.docx&action=default
*
* @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel - All the parameters are sent in the request body
*/
public async extensionValidator(
azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel
@ -2826,6 +2829,68 @@ export class GalleryApi extends compatBase.GalleryCompatHttpClientBase implement
});
}
/**
* @param {NodeJS.ReadableStream} contentStream - Content to upload
* @param {string} publisherName
* @param {string} extensionName
* @param {string} extensionType
* @param {string} reCaptchaToken
* @param {boolean} bypassScopeCheck
*/
public async publishExtensionWithPublisherSignature(
customHeaders: any,
contentStream: NodeJS.ReadableStream,
publisherName: string,
extensionName: string,
extensionType?: string,
reCaptchaToken?: string,
bypassScopeCheck?: boolean
): Promise<GalleryInterfaces.PublishedExtension> {
return new Promise<GalleryInterfaces.PublishedExtension>(async (resolve, reject) => {
let routeValues: any = {
publisherName: publisherName,
extensionName: extensionName
};
let queryValues: any = {
extensionType: extensionType,
reCaptchaToken: reCaptchaToken,
bypassScopeCheck: bypassScopeCheck,
};
customHeaders = customHeaders || {};
customHeaders["Content-Type"] = "multipart/related";
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"gallery",
"e11ea35a-16fe-4b80-ab11-c4cab88a0969",
routeValues,
queryValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
options.additionalHeaders = customHeaders;
let res: restm.IRestResponse<GalleryInterfaces.PublishedExtension>;
res = await this.rest.uploadStream<GalleryInterfaces.PublishedExtension>("PUT", url, contentStream, options);
let ret = this.formatResponse(res.result,
GalleryInterfaces.TypeInfo.PublishedExtension,
false);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* @param {string} publisherName
*/

Просмотреть файл

@ -1206,8 +1206,10 @@ export class GitApi extends basem.ClientApiBase implements IGitApi {
}
/**
* @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria
* @param {string} repositoryId
* Retrieve statistics for multiple commits
*
* @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria - Base Commit and List of Target Commits to compare.
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} project - Project ID or project name
*/
public async getBranchStatsBatch(

Просмотреть файл

@ -42,6 +42,8 @@ export class ManagementApi extends basem.ClientApiBase implements IManagementApi
}
/**
* Delete the billing info for an organization.
*
* @param {string} organizationId
*/
public async deleteBillingInfo(
@ -82,6 +84,8 @@ export class ManagementApi extends basem.ClientApiBase implements IManagementApi
}
/**
* Delete the meter usage history from Primary SU for an organization.
*
* @param {string} organizationId
*/
public async deleteMeterUsageHistory(
@ -164,6 +168,8 @@ export class ManagementApi extends basem.ClientApiBase implements IManagementApi
}
/**
* Save the billing info for an organization.
*
* @param {ManagementInterfaces.BillingInfo} billingInfo
* @param {string} organizationId
*/

Просмотреть файл

@ -1220,22 +1220,24 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
}
/**
* Get a list of deployments
*
* @param {string} project - Project ID or project name
* @param {number} definitionId
* @param {number} definitionEnvironmentId
* @param {string} createdBy
* @param {Date} minModifiedTime
* @param {Date} maxModifiedTime
* @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus
* @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus
* @param {boolean} latestAttemptsOnly
* @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder
* @param {number} top
* @param {number} continuationToken
* @param {string} createdFor
* @param {Date} minStartedTime
* @param {Date} maxStartedTime
* @param {string} sourceBranch
* @param {number} definitionId - List the deployments for a given definition id.
* @param {number} definitionEnvironmentId - List the deployments for a given definition environment id.
* @param {string} createdBy - List the deployments for which deployments are created as identity specified.
* @param {Date} minModifiedTime - List the deployments with LastModified time >= minModifiedTime.
* @param {Date} maxModifiedTime - List the deployments with LastModified time <= maxModifiedTime.
* @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus - List the deployments with given deployment status. Defult is 'All'.
* @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus - List the deployments with given operation status. Default is 'All'.
* @param {boolean} latestAttemptsOnly - 'true' to include deployments with latest attempt only. Default is 'false'.
* @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - List the deployments with given query order. Default is 'Descending'.
* @param {number} top - List the deployments with given top. Default top is '50' and Max top is '100'.
* @param {number} continuationToken - List the deployments with deployment id >= continuationToken.
* @param {string} createdFor - List the deployments for which deployments are requested as identity specified.
* @param {Date} minStartedTime - List the deployments with StartedOn time >= minStartedTime.
* @param {Date} maxStartedTime - List the deployments with StartedOn time <= maxStartedTime.
* @param {string} sourceBranch - List the deployments that are deployed from given branch name.
*/
public async getDeployments(
project: string,

Просмотреть файл

@ -45,9 +45,6 @@ export interface ITestResultsApi extends basem.ClientApiBase {
queryTestResultHistory(filter: Contracts.ResultsFilter, project: string): Promise<Contracts.TestResultHistory>;
getTestRunMessageLogs(project: string, runId: number): Promise<Contracts.TestMessageLogDetails[]>;
getTestPipelineMetrics(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, metricNames?: Contracts.Metrics[], groupByNode?: boolean): Promise<Contracts.PipelineTestMetrics>;
createOneMRXTestSession(session: Contracts.Session, project: string): Promise<number>;
getOneMRXTestSession(project: string, buildId: number): Promise<Contracts.Session[]>;
getOneMRXTestSessionLayout(project: string, sessionId: string): Promise<any[]>;
getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<Contracts.TestResultsDetails>;
publishTestResultDocument(document: Contracts.TestResultDocument, project: string, runId: number): Promise<Contracts.TestResultDocument>;
@ -110,6 +107,10 @@ export interface ITestResultsApi extends basem.ClientApiBase {
testLogStoreEndpointDetailsForResult(project: string, runId: number, resultId: number, subResultId: number, filePath: string, type: Contracts.TestLogType): Promise<Contracts.TestLogStoreEndpointDetails>;
getTestLogStoreEndpointDetailsForRunLog(project: string, runId: number, type: Contracts.TestLogType, filePath: string): Promise<Contracts.TestLogStoreEndpointDetails>;
testLogStoreEndpointDetailsForRun(project: string, runId: number, testLogStoreOperationType: Contracts.TestLogStoreOperationType, filePath?: string, type?: Contracts.TestLogType): Promise<Contracts.TestLogStoreEndpointDetails>;
createTestSession(session: Contracts.TestResultsSession, project: string): Promise<number>;
getTestSession(project: string, buildId: number): Promise<Contracts.TestResultsSession[]>;
getTestSessionLayout(project: string, sessionId: string): Promise<any[]>;
createEnvironment(environments: Contracts.TestSessionEnvironment[], project: string): Promise<void>;
createTestSettings(testSettings: Contracts.TestSettings, project: string): Promise<number>;
deleteTestSettings(project: string, testSettingsId: number): Promise<void>;
getTestSettingsById(project: string, testSettingsId: number): Promise<Contracts.TestSettings>;
@ -1092,6 +1093,8 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
}
/**
* http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10&deltaBuildId=9 Request: build id and delta build id (optional)
*
* @param {string} project - Project ID or project name
* @param {number} buildId
* @param {number} deltaBuildId
@ -1434,151 +1437,6 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
});
}
/**
* Creates OneMRX Session object in TCM data store
*
* @param {Contracts.Session} session - Received session object.
* @param {string} project - Project ID or project name
*/
public async createOneMRXTestSession(
session: Contracts.Session,
project: string
): Promise<number> {
return new Promise<number>(async (resolve, reject) => {
let routeValues: any = {
project: project
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"testresults",
"531e61ce-580d-4962-8591-0b2942b6bf78",
routeValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<number>;
res = await this.rest.create<number>(url, session, options);
let ret = this.formatResponse(res.result,
null,
false);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* Retrieves OneMRX Session metadata object in TCM data store
*
* @param {string} project - Project ID or project name
* @param {number} buildId
*/
public async getOneMRXTestSession(
project: string,
buildId: number
): Promise<Contracts.Session[]> {
if (buildId == null) {
throw new TypeError('buildId can not be null or undefined');
}
return new Promise<Contracts.Session[]>(async (resolve, reject) => {
let routeValues: any = {
project: project
};
let queryValues: any = {
buildId: buildId,
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"testresults",
"531e61ce-580d-4962-8591-0b2942b6bf78",
routeValues,
queryValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<Contracts.Session[]>;
res = await this.rest.get<Contracts.Session[]>(url, options);
let ret = this.formatResponse(res.result,
Contracts.TypeInfo.Session,
true);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* Retrieves OneMRX Session Layout object in TCM data store
*
* @param {string} project - Project ID or project name
* @param {string} sessionId
*/
public async getOneMRXTestSessionLayout(
project: string,
sessionId: string
): Promise<any[]> {
if (sessionId == null) {
throw new TypeError('sessionId can not be null or undefined');
}
return new Promise<any[]>(async (resolve, reject) => {
let routeValues: any = {
project: project
};
let queryValues: any = {
sessionId: sessionId,
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"testresults",
"531e61ce-580d-4962-8591-0b2942b6bf78",
routeValues,
queryValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<any[]>;
res = await this.rest.get<any[]>(url, options);
let ret = this.formatResponse(res.result,
null,
true);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* @param {string} project - Project ID or project name
* @param {number} buildId
@ -3549,8 +3407,10 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
}
/**
* Get all the tags in a build.
*
* @param {string} project - Project ID or project name
* @param {number} buildId
* @param {number} buildId - Build ID
*/
public async getTestTagsForBuild(
project: string,
@ -3598,9 +3458,11 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
}
/**
* Get all the tags in a release.
*
* @param {string} project - Project ID or project name
* @param {number} releaseId
* @param {number} releaseEnvId
* @param {number} releaseId - Release ID
* @param {number} releaseEnvId - Release environment ID
*/
public async getTestTagsForRelease(
project: string,
@ -3653,9 +3515,11 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
}
/**
* @param {Contracts.TestTagsUpdateModel} testTagsUpdateModel
* Update tags of a run, Tags can be Added and Deleted
*
* @param {Contracts.TestTagsUpdateModel} testTagsUpdateModel - TestTagsUpdateModel
* @param {string} project - Project ID or project name
* @param {number} runId
* @param {number} runId - RunId of the run
*/
public async updateTestRunTags(
testTagsUpdateModel: Contracts.TestTagsUpdateModel,
@ -3697,8 +3561,10 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
}
/**
* Get all the tags in a build.
*
* @param {string} project - Project ID or project name
* @param {number} buildId
* @param {number} buildId - Build ID
*/
public async getTestTagSummaryForBuild(
project: string,
@ -3746,9 +3612,11 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
}
/**
* Get all the tags in a release.
*
* @param {string} project - Project ID or project name
* @param {number} releaseId
* @param {number} releaseEnvId
* @param {number} releaseId - Release ID
* @param {number} releaseEnvId - Release environment ID
*/
public async getTestTagSummaryForRelease(
project: string,
@ -5001,6 +4869,194 @@ export class TestResultsApi extends basem.ClientApiBase implements ITestResultsA
});
}
/**
* Creates TestResultsSession object in TCM data store
*
* @param {Contracts.TestResultsSession} session - Received session object.
* @param {string} project - Project ID or project name
*/
public async createTestSession(
session: Contracts.TestResultsSession,
project: string
): Promise<number> {
return new Promise<number>(async (resolve, reject) => {
let routeValues: any = {
project: project
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"testresults",
"531e61ce-580d-4962-8591-0b2942b6bf78",
routeValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<number>;
res = await this.rest.create<number>(url, session, options);
let ret = this.formatResponse(res.result,
null,
false);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* Retrieves TestResultsSession metadata object in TCM data store
*
* @param {string} project - Project ID or project name
* @param {number} buildId
*/
public async getTestSession(
project: string,
buildId: number
): Promise<Contracts.TestResultsSession[]> {
if (buildId == null) {
throw new TypeError('buildId can not be null or undefined');
}
return new Promise<Contracts.TestResultsSession[]>(async (resolve, reject) => {
let routeValues: any = {
project: project
};
let queryValues: any = {
buildId: buildId,
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"testresults",
"531e61ce-580d-4962-8591-0b2942b6bf78",
routeValues,
queryValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<Contracts.TestResultsSession[]>;
res = await this.rest.get<Contracts.TestResultsSession[]>(url, options);
let ret = this.formatResponse(res.result,
Contracts.TypeInfo.TestResultsSession,
true);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* Retrieves TestResultsSession Layout object in TCM data store
*
* @param {string} project - Project ID or project name
* @param {string} sessionId
*/
public async getTestSessionLayout(
project: string,
sessionId: string
): Promise<any[]> {
if (sessionId == null) {
throw new TypeError('sessionId can not be null or undefined');
}
return new Promise<any[]>(async (resolve, reject) => {
let routeValues: any = {
project: project
};
let queryValues: any = {
sessionId: sessionId,
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"testresults",
"531e61ce-580d-4962-8591-0b2942b6bf78",
routeValues,
queryValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<any[]>;
res = await this.rest.get<any[]>(url, options);
let ret = this.formatResponse(res.result,
null,
true);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* Creates Environment object in TCM data store
*
* @param {Contracts.TestSessionEnvironment[]} environments - Received Environment object.
* @param {string} project - Project ID or project name
*/
public async createEnvironment(
environments: Contracts.TestSessionEnvironment[],
project: string
): Promise<void> {
return new Promise<void>(async (resolve, reject) => {
let routeValues: any = {
project: project
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"7.2-preview.1",
"testresults",
"f9c2e9e4-9c9a-4c1d-9a7d-2b4c8a6f0d5f",
routeValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<void>;
res = await this.rest.create<void>(url, environments, options);
let ret = this.formatResponse(res.result,
null,
false);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}
/**
* @param {Contracts.TestSettings} testSettings
* @param {string} project - Project ID or project name

Просмотреть файл

@ -79,7 +79,7 @@ export interface Alert {
*/
truncatedSecret?: string;
/**
* ValidationFingerprints for the secret liveness check. Only return on demanded
* ValidationFingerprints for the secret liveness check. Only returned on demand in Get API with Expand parameter set to be ValidationFingerprint (not returned in List API)
*/
validationFingerprints?: ValidationFingerprint[];
}
@ -287,6 +287,9 @@ export enum ComponentType {
* Indicates the component is a loose file. Not a package as understood by different package managers.
*/
File = 9,
/**
* Indicates the component is a Go package.
*/
Go = 10,
/**
* Indicates the component is a Docker Image
@ -578,6 +581,35 @@ export interface Rule {
tags?: string[];
}
export enum SarifJobStatus {
/**
* The job type when it is new
*/
New = 0,
/**
* The job type when it is queued
*/
Queued = 1,
/**
* The job type when it is completed
*/
Completed = 2,
/**
* The job type when it fails
*/
Failed = 3,
}
export interface SarifUploadStatus {
errors?: SarifValidationError[];
processingStatus?: SarifJobStatus;
}
export interface SarifValidationError {
nodePointer?: string;
validationError?: string;
}
export interface SearchCriteria {
/**
* If provided, only return alerts of this type. Otherwise, return alerts of all types.
@ -877,6 +909,16 @@ export var TypeInfo = {
"versionControl": 2
}
},
SarifJobStatus: {
enumValues: {
"new": 0,
"queued": 1,
"completed": 2,
"failed": 3
}
},
SarifUploadStatus: <any>{
},
SearchCriteria: <any>{
},
Severity: {
@ -1027,6 +1069,12 @@ TypeInfo.Result.fields = {
}
};
TypeInfo.SarifUploadStatus.fields = {
processingStatus: {
enumType: TypeInfo.SarifJobStatus
}
};
TypeInfo.SearchCriteria.fields = {
alertType: {
enumType: TypeInfo.AlertType

Просмотреть файл

@ -2400,7 +2400,13 @@ export interface RealtimeBuildEvent {
}
export enum RepositoryCleanOptions {
/**
* Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory)
*/
Source = 0,
/**
* Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory), also re-create $(build.binariesDirectory)
*/
SourceAndOutputDir = 1,
/**
* Re-create $(build.sourcesDirectory)

Просмотреть файл

@ -105,6 +105,9 @@ export interface CommentCreateParameters {
* Optional CommentId of the parent in order to add a reply for an existing comment
*/
parentId?: number;
/**
* Text of the comment
*/
text: string;
}
@ -124,6 +127,9 @@ export enum CommentExpandOptions {
* Include the rendered text (html) in addition to markdown text
*/
RenderedText = 8,
/**
* If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes.
*/
RenderedTextOnly = 16,
/**
* If specified, then responses will be expanded in the results
@ -244,6 +250,9 @@ export enum CommentReactionType {
* Base class for comment resource references
*/
export interface CommentResourceReference {
/**
* REST URL for the resource.
*/
url?: string;
}

Просмотреть файл

@ -379,8 +379,17 @@ export interface TeamProjectReference {
* A data transfer object that stores the metadata associated with the creation of temporary data.
*/
export interface TemporaryDataCreatedDTO extends TemporaryDataDTO {
/**
* Temporary data expiration date.
*/
expirationDate?: Date;
/**
* Temporary data id.
*/
id?: string;
/**
* Rest url for the temporary data.
*/
url?: string;
}
@ -388,8 +397,17 @@ export interface TemporaryDataCreatedDTO extends TemporaryDataDTO {
* A data transfer object that stores the metadata associated with the temporary data.
*/
export interface TemporaryDataDTO {
/**
* Temporary data expire in seconds
*/
expirationSeconds?: number;
/**
* Temporary data origin
*/
origin?: string;
/**
* Temporary data.
*/
value?: any;
}

Просмотреть файл

@ -174,6 +174,9 @@ export enum DashboardScope {
Project = 2,
}
/**
* None - Team member cannot edit dashboard Edit - Team member can add, configure and delete widgets Manage - Team member can add, reorder, delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
*/
export enum GroupMemberPermission {
None = 0,
Edit = 1,
@ -217,6 +220,9 @@ export interface SemanticVersion {
patch?: number;
}
/**
* Read - User can see dashboards Create - User can create dashboards Edit - User can add, configure and delete widgets, and edit dashboard settings. Delete - User can delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
*/
export enum TeamDashboardPermission {
None = 0,
Read = 1,

Просмотреть файл

@ -678,6 +678,9 @@ export interface PackageVersion {
* Used to correct mistakes in the version numbering scheme.
*/
epoch?: number;
/**
* Human readable version string. This string is of the form <epoch>:<name>-<revision> and is only set when kind is NORMAL.
*/
fullName?: string;
/**
* Required. Distinguishes between sentinel MIN/MAX versions and normal versions.

Просмотреть файл

@ -274,6 +274,9 @@ export interface CustomerSupportRequest {
* Reason for support request
*/
reason?: string;
/**
* ReCaptcha Token
*/
reCaptchaToken?: string;
/**
* VSID of the user making the support request
@ -484,6 +487,9 @@ export interface ExtensionEvent {
* Id which identifies each data point uniquely
*/
id?: number;
/**
* Generic properties container which stores the data related to each event. For well known events like uninstall, install etc. We expect the Properties object to be a List<UninstallProperties>, List<InstallProperties>
*/
properties?: any;
/**
* Timestamp of when the event occurred
@ -938,6 +944,9 @@ export enum ExtensionVersionFlags {
* One condition in a QueryFilter.
*/
export interface FilterCriteria {
/**
* The FilterType defines how the filters are to be applied to the extensions. See the documentation on the filter type to understand how the filters are matched.
*/
filterType?: number;
/**
* The value used in the match based on the filter type.
@ -1587,6 +1596,9 @@ export interface Review {
* Flag for soft deletion
*/
isDeleted?: boolean;
/**
* Flag for Ignoring Review from average rating calculation
*/
isIgnored?: boolean;
/**
* Version of the product for which review was submitted

Просмотреть файл

@ -1999,6 +1999,9 @@ export interface GitPullRequestMergeOptions {
* If true, conflict resolutions applied during the merge will be put in separate commits to preserve authorship info for git blame, etc.
*/
conflictAuthorshipCommits?: boolean;
/**
* If true, renames where there is more than one valid way to map the original file locations to renamed file locations will be treated as false positives and ignored.
*/
detectRenameFalsePositives?: boolean;
/**
* If true, rename detection will not be performed during the merge.

Просмотреть файл

@ -52,7 +52,13 @@ export interface BlockSubscriptionChannel {
* Default delivery preference for group subscribers. Indicates how the subscriber should be notified.
*/
export enum DefaultGroupDeliveryPreference {
/**
* Do not send notifications by default. Note: notifications can still be delivered to subscribers, for example via a custom subscription.
*/
NoDelivery = -1,
/**
* Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group.
*/
EachMember = 2,
}
@ -266,6 +272,9 @@ export interface ExpressionFilterGroup {
start?: number;
}
/**
* This class represents the Subscription Filter associated with a subscription in a user readable format e.g. "filterModel":{ "clauses":[ { "logicalOperator":"", "fieldName":"PortfolioProject", "operator":"=", "value":"@@MyProjectName@@", "index":1 } ], "groups":[ ], "maxGroupLevel":0 }
*/
export interface ExpressionFilterModel {
/**
* Flat list of clauses in this subscription

Просмотреть файл

@ -669,6 +669,25 @@ export interface Change {
timestamp?: Date;
}
export interface CheckConfigurationReference {
/**
* Check configuration Id of generated gate.
*/
id?: number;
/**
* Name of the resource for which gate was generated.
*/
resourceName?: string;
/**
* Type of the resource for which the gate was generated.
*/
resourceType?: string;
/**
* Version of the check configuration gate was generated with.
*/
version?: number;
}
export interface CodeRepositoryReference {
/**
* Gets and sets the repository references.
@ -1637,6 +1656,9 @@ export interface Folder {
path?: string;
}
/**
* Specifies the desired ordering of folders.
*/
export enum FolderPathQueryOrder {
/**
* No order.
@ -2430,6 +2452,10 @@ export interface ReleaseDefinition extends ReleaseDefinitionShallowReference {
* Whether release definition is deleted.
*/
isDeleted?: boolean;
/**
* Whether release definition is disabled.
*/
isDisabled?: boolean;
/**
* Gets the reference of last release.
*/
@ -2711,6 +2737,10 @@ export enum ReleaseDefinitionExpands {
}
export interface ReleaseDefinitionGate {
/**
* Gets or sets the flag that indicates if gate was generated.
*/
isGenerated?: boolean;
/**
* Gets or sets the gates workflow.
*/
@ -4038,6 +4068,10 @@ export interface WorkflowTask {
* Gets or sets as the task always run or not.
*/
alwaysRun?: boolean;
/**
* Gets or sets the check configuration if check is injected as gate.
*/
checkConfig?: CheckConfigurationReference;
/**
* Gets or sets the task condition.
*/

Просмотреть файл

@ -225,6 +225,20 @@ export interface SBOMTelemetry {
toolExecutionResult?: number;
}
/**
* Used to provide the FileHash of the SBOM file and EBOM ID to be added to the catalog file.
*/
export interface SignRequest {
/**
* The EBOM ID for the associated image.
*/
ebomId?: string;
/**
* The file hash of the generated SBOM file.
*/
fileHash?: FileHash;
}
/**
* The base reponse object for all responses from the signing api.
*/

Просмотреть файл

@ -1014,21 +1014,6 @@ export interface LastResultDetails {
runBy?: VSSInterfaces.IdentityRef;
}
export enum LayoutType {
/**
* Default
*/
None = 0,
/**
* Entry type for Group information
*/
Group = 1,
/**
* Entry type for Job information
*/
Job = 2,
}
export interface LegacyBuildConfiguration {
branchName?: string;
buildConfigurationId?: number;
@ -1402,6 +1387,10 @@ export interface PipelineReference {
* Reference of the phase.
*/
phaseReference?: PhaseReference;
/**
* Reference of the BuildDefinitionId.
*/
pipelineDefinitionId?: number;
/**
* Reference of the pipeline with which this pipeline instance is related.
*/
@ -4477,6 +4466,83 @@ export interface TestResultsQuery {
resultsFilter?: ResultsFilter;
}
/**
* The TestResultSession is a higher-level container for test results by encapsulating multiple TestRun objects
*/
export interface TestResultsSession {
/**
* TestResultsSession end time
*/
endTimeUTC: Date;
/**
* TestResultsSession layout
*/
layout: any[];
/**
* TestResultsSession name
*/
name: string;
/**
* TestResultsSession result
*/
result: SessionResult;
/**
* TestResultsSession source pipeline details
*/
sessionSourcePipeline: SessionSourcePipeline;
/**
* TestResultsSession source
*/
source: Source;
/**
* TestResultsSession start time
*/
startTimeUTC: Date;
/**
* TestResultsSession state
*/
state: TestResultsSessionState;
/**
* List of test run ids
*/
testRuns: number[];
/**
* TestResultsSession timeline
*/
timeline?: Timeline<SessionTimelineType>[];
/**
* TestResultsSession type
*/
type: string;
/**
* TestResultsSession Uid
*/
uid: string;
}
export enum TestResultsSessionState {
/**
* Default
*/
None = 0,
/**
* Session state with Running
*/
Running = 1,
/**
* Session state with Completed
*/
Completed = 2,
/**
* Session state with Waiting
*/
Waiting = 3,
/**
* Session state with Cancelled
*/
Cancelled = 4,
}
export interface TestResultsSettings {
/**
* IsRequired and EmitDefaultValue are passed as false as if users doesn't pass anything, should not come for serialisation and deserialisation.
@ -5028,6 +5094,17 @@ export interface TestSession {
url?: string;
}
export interface TestSessionEnvironment {
/**
* Environment display name
*/
displayName: string;
/**
* Processor architecture
*/
processorArchitecture: string;
}
export interface TestSessionExploredWorkItemReference extends TestSessionWorkItemReference {
/**
* Workitem references of workitems filed as a part of the current workitem exploration.
@ -5692,13 +5769,6 @@ export var TypeInfo = {
},
LastResultDetails: <any>{
},
LayoutType: {
enumValues: {
"none": 0,
"group": 1,
"job": 2
}
},
LegacyBuildConfiguration: <any>{
},
LegacyReleaseReference: <any>{
@ -6057,6 +6127,17 @@ export var TypeInfo = {
},
TestResultsQuery: <any>{
},
TestResultsSession: <any>{
},
TestResultsSessionState: {
enumValues: {
"none": 0,
"running": 1,
"completed": 2,
"waiting": 3,
"cancelled": 4
}
},
TestResultsSettings: <any>{
},
TestResultsSettingsType: {
@ -7127,6 +7208,21 @@ TypeInfo.TestResultsQuery.fields = {
}
};
TypeInfo.TestResultsSession.fields = {
endTimeUTC: {
isDate: true,
},
result: {
enumType: TypeInfo.SessionResult
},
startTimeUTC: {
isDate: true,
},
state: {
enumType: TypeInfo.TestResultsSessionState
},
};
TypeInfo.TestResultsSettings.fields = {
flakySettings: {
typeInfo: TypeInfo.FlakySettings

Просмотреть файл

@ -648,6 +648,9 @@ export interface GitHubConnectionReposBatchRequest {
* Describes a reference to an identity.
*/
export interface IdentityReference extends VSSInterfaces.IdentityRef {
/**
* Gets or sets the identifier of the identity.
*/
id?: string;
/**
* Legacy back-compat property. This has been the WIT specific value from Constants. Will be hidden (but exists) on the client unless they are targeting the newest version
@ -1928,6 +1931,9 @@ export interface WorkItemTrackingResource extends WorkItemTrackingResourceRefere
* Base class for work item tracking resource references.
*/
export interface WorkItemTrackingResourceReference {
/**
* REST URL for the resource.
*/
url?: string;
}
@ -2201,10 +2207,6 @@ export interface WorkItemUpdate extends WorkItemTrackingResource {
workItemId?: number;
}
export interface WorkItemUpdate2 extends WorkItemUpdate {
id?: number;
}
export var TypeInfo = {
AccountMyWorkResult: <any>{
},
@ -2449,8 +2451,6 @@ export var TypeInfo = {
},
WorkItemUpdate: <any>{
},
WorkItemUpdate2: <any>{
},
};
TypeInfo.AccountMyWorkResult.fields = {
@ -2715,9 +2715,3 @@ TypeInfo.WorkItemUpdate.fields = {
isDate: true,
}
};
TypeInfo.WorkItemUpdate2.fields = {
revisedDate: {
isDate: true,
}
};

Просмотреть файл

@ -117,6 +117,9 @@ export interface Control {
* Inner text of the control.
*/
metadata?: string;
/**
* Order in which the control should appear in its group.
*/
order?: number;
/**
* A value indicating whether this layout node has been overridden by a child layout.

Просмотреть файл

@ -1024,13 +1024,22 @@ export enum RuleConditionType {
* $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field.
*/
WhenNotChanged = 4,
/**
* $WhenWas. This condition limits the execution of its children to cases when another field value is changed from one value to another. e.g. If the condition is : When the work item state changes from New to Approved, here $WhenWas clause defines the "New" state of the workitem and $When clause defines "Approved" state.
*/
WhenWas = 5,
WhenStateChangedTo = 6,
WhenStateChangedFromAndTo = 7,
WhenWorkItemIsCreated = 8,
WhenValueIsDefined = 9,
WhenValueIsNotDefined = 10,
/**
* This condition checks if current user is member of a particular group. This condition does not have any 1:1 mapping with any server side rule condition, rather this is a dummy condition added for customer simplicity of understanding. This condition is later translated to a FOR membership filter . e.g. If the condition is : WhenCurrentUserIsMemberOfGroup "Approvers" then "MakeRequired" Field1.Here it translates to a For rule , "MakeRequired" for "Approvers"
*/
WhenCurrentUserIsMemberOfGroup = 11,
/**
* This condition checks if current user is not member of a particular group. This condition does not have any 1:1 mapping with any server side rule condition, rather this is a dummy condition added for customer simplicity of understanding. This condition is later translated to a NOT membership filter . e.g. If the condition is : WhenCurrentUserIsNotMemberOfGroup "Approvers" then "MakeRequired" Field1.Here it translates to a Not rule , "MakeRequired" not "Approvers"
*/
WhenCurrentUserIsNotMemberOfGroup = 12,
}

2
package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "azure-devops-node-api",
"version": "12.4.0",
"version": "12.5.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "azure-devops-node-api",
"description": "Node client for Azure DevOps and TFS REST APIs",
"version": "12.4.0",
"version": "12.5.0",
"main": "./WebApi.js",
"types": "./WebApi.d.ts",
"scripts": {