regen (#320)
This commit is contained in:
Родитель
2e02035b9e
Коммит
3c7622f8f5
|
@ -1728,19 +1728,26 @@ export class BuildApi extends basem.ClientApiBase implements IBuildApi {
|
|||
project: string,
|
||||
path: string
|
||||
): Promise<BuildInterfaces.Folder> {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
|
||||
return new Promise<BuildInterfaces.Folder>(async (resolve, reject) => {
|
||||
let routeValues: any = {
|
||||
project: project,
|
||||
path: path
|
||||
project: project
|
||||
};
|
||||
|
||||
let queryValues: any = {
|
||||
path: path,
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.2",
|
||||
"build",
|
||||
"a906531b-d2da-4f55-bda7-f3e676cc50d9",
|
||||
routeValues);
|
||||
routeValues,
|
||||
queryValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
|
@ -1772,19 +1779,26 @@ export class BuildApi extends basem.ClientApiBase implements IBuildApi {
|
|||
project: string,
|
||||
path: string
|
||||
): Promise<void> {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
|
||||
return new Promise<void>(async (resolve, reject) => {
|
||||
let routeValues: any = {
|
||||
project: project,
|
||||
path: path
|
||||
project: project
|
||||
};
|
||||
|
||||
let queryValues: any = {
|
||||
path: path,
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.2",
|
||||
"build",
|
||||
"a906531b-d2da-4f55-bda7-f3e676cc50d9",
|
||||
routeValues);
|
||||
routeValues,
|
||||
queryValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
|
@ -1869,19 +1883,26 @@ export class BuildApi extends basem.ClientApiBase implements IBuildApi {
|
|||
project: string,
|
||||
path: string
|
||||
): Promise<BuildInterfaces.Folder> {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
|
||||
return new Promise<BuildInterfaces.Folder>(async (resolve, reject) => {
|
||||
let routeValues: any = {
|
||||
project: project,
|
||||
path: path
|
||||
project: project
|
||||
};
|
||||
|
||||
let queryValues: any = {
|
||||
path: path,
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.2",
|
||||
"build",
|
||||
"a906531b-d2da-4f55-bda7-f3e676cc50d9",
|
||||
routeValues);
|
||||
routeValues,
|
||||
queryValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
|
|
|
@ -39,6 +39,7 @@ export interface ICoreApi extends basem.ClientApiBase {
|
|||
queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise<OperationsInterfaces.OperationReference>;
|
||||
queueDeleteProject(projectId: string): Promise<OperationsInterfaces.OperationReference>;
|
||||
updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise<OperationsInterfaces.OperationReference>;
|
||||
getProjectsProperties(projectIds: string[], properties?: string[]): Promise<CoreInterfaces.ProjectProperties[]>;
|
||||
getProjectProperties(projectId: string, keys?: string[]): Promise<CoreInterfaces.ProjectProperty[]>;
|
||||
setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise<void>;
|
||||
createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise<CoreInterfaces.Proxy>;
|
||||
|
@ -933,6 +934,57 @@ export class CoreApi extends basem.ClientApiBase implements ICoreApi {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a collection of team project properties for multiple projects.
|
||||
*
|
||||
* @param {string[]} projectIds - A comma-delimited string of team project IDs
|
||||
* @param {string[]} properties
|
||||
*/
|
||||
public async getProjectsProperties(
|
||||
projectIds: string[],
|
||||
properties?: string[]
|
||||
): Promise<CoreInterfaces.ProjectProperties[]> {
|
||||
if (projectIds == null) {
|
||||
throw new TypeError('projectIds can not be null or undefined');
|
||||
}
|
||||
|
||||
return new Promise<CoreInterfaces.ProjectProperties[]>(async (resolve, reject) => {
|
||||
let routeValues: any = {
|
||||
};
|
||||
|
||||
let queryValues: any = {
|
||||
projectIds: projectIds && projectIds.join(","),
|
||||
properties: properties && properties.join(","),
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"core",
|
||||
"0a3ffdfc-fe94-47a6-bb27-79bf3f762eac",
|
||||
routeValues,
|
||||
queryValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
verData.apiVersion);
|
||||
|
||||
let res: restm.IRestResponse<CoreInterfaces.ProjectProperties[]>;
|
||||
res = await this.rest.get<CoreInterfaces.ProjectProperties[]>(url, options);
|
||||
|
||||
let ret = this.formatResponse(res.result,
|
||||
null,
|
||||
true);
|
||||
|
||||
resolve(ret);
|
||||
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a collection of team project properties.
|
||||
*
|
||||
|
|
|
@ -29,7 +29,7 @@ export interface IExtensionManagementApi extends basem.ClientApiBase {
|
|||
setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise<ExtensionManagementInterfaces.ExtensionDataCollection[]>;
|
||||
getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.ExtensionState[]>;
|
||||
getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean, forceRefresh?: boolean): Promise<ExtensionManagementInterfaces.ExtensionState[]>;
|
||||
queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
|
||||
getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
|
||||
updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise<ExtensionManagementInterfaces.InstalledExtension>;
|
||||
|
@ -611,11 +611,13 @@ export class ExtensionManagementApi extends basem.ClientApiBase implements IExte
|
|||
* @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results.
|
||||
* @param {boolean} includeErrors - If true, include installed extensions in an error state in the results.
|
||||
* @param {boolean} includeInstallationIssues
|
||||
* @param {boolean} forceRefresh
|
||||
*/
|
||||
public async getStates(
|
||||
includeDisabled?: boolean,
|
||||
includeErrors?: boolean,
|
||||
includeInstallationIssues?: boolean
|
||||
includeInstallationIssues?: boolean,
|
||||
forceRefresh?: boolean
|
||||
): Promise<ExtensionManagementInterfaces.ExtensionState[]> {
|
||||
|
||||
return new Promise<ExtensionManagementInterfaces.ExtensionState[]>(async (resolve, reject) => {
|
||||
|
@ -626,6 +628,7 @@ export class ExtensionManagementApi extends basem.ClientApiBase implements IExte
|
|||
includeDisabled: includeDisabled,
|
||||
includeErrors: includeErrors,
|
||||
includeInstallationIssues: includeInstallationIssues,
|
||||
forceRefresh: forceRefresh,
|
||||
};
|
||||
|
||||
try {
|
||||
|
|
|
@ -833,8 +833,10 @@ export class NotificationApi extends basem.ClientApiBase implements INotificatio
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {string} targetId
|
||||
* @param {string[]} ids
|
||||
* Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group.
|
||||
*
|
||||
* @param {string} targetId - User or Group ID
|
||||
* @param {string[]} ids - List of subscription IDs
|
||||
* @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags
|
||||
*/
|
||||
public async listSubscriptions(
|
||||
|
|
|
@ -52,7 +52,7 @@ export interface IReleaseApi extends basem.ClientApiBase {
|
|||
deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): Promise<void>;
|
||||
getFavorites(project: string, scope: string, identityId?: string): Promise<ReleaseInterfaces.FavoriteItem[]>;
|
||||
getFlightAssignments(flightName?: string): Promise<string[]>;
|
||||
createFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
|
||||
createFolder(folder: ReleaseInterfaces.Folder, project: string, path?: string): Promise<ReleaseInterfaces.Folder>;
|
||||
deleteFolder(project: string, path: string): Promise<void>;
|
||||
getFolders(project: string, path?: string, queryOrder?: ReleaseInterfaces.FolderPathQueryOrder): Promise<ReleaseInterfaces.Folder[]>;
|
||||
updateFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
|
||||
|
@ -1879,16 +1879,16 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a new folder
|
||||
* Creates a new folder.
|
||||
*
|
||||
* @param {ReleaseInterfaces.Folder} folder
|
||||
* @param {ReleaseInterfaces.Folder} folder - folder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
* @param {string} path - Path of the folder.
|
||||
*/
|
||||
public async createFolder(
|
||||
folder: ReleaseInterfaces.Folder,
|
||||
project: string,
|
||||
path: string
|
||||
path?: string
|
||||
): Promise<ReleaseInterfaces.Folder> {
|
||||
|
||||
return new Promise<ReleaseInterfaces.Folder>(async (resolve, reject) => {
|
||||
|
@ -1899,7 +1899,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"5.1-preview.2",
|
||||
"Release",
|
||||
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
|
||||
routeValues);
|
||||
|
@ -1925,10 +1925,10 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Deletes a definition folder for given folder name and path and all it's existing definitions
|
||||
* Deletes a definition folder for given folder name and path and all it's existing definitions.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
* @param {string} path - Path of the folder to delete.
|
||||
*/
|
||||
public async deleteFolder(
|
||||
project: string,
|
||||
|
@ -1943,7 +1943,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"5.1-preview.2",
|
||||
"Release",
|
||||
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
|
||||
routeValues);
|
||||
|
@ -1969,11 +1969,11 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets folders
|
||||
* Gets folders.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
* @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder
|
||||
* @param {string} path - Path of the folder.
|
||||
* @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder - Gets the results in the defined order. Default is 'None'.
|
||||
*/
|
||||
public async getFolders(
|
||||
project: string,
|
||||
|
@ -1993,7 +1993,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"5.1-preview.2",
|
||||
"Release",
|
||||
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
|
||||
routeValues,
|
||||
|
@ -2020,11 +2020,11 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates an existing folder at given existing path
|
||||
* Updates an existing folder at given existing path.
|
||||
*
|
||||
* @param {ReleaseInterfaces.Folder} folder
|
||||
* @param {ReleaseInterfaces.Folder} folder - folder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
* @param {string} path - Path of the folder to update.
|
||||
*/
|
||||
public async updateFolder(
|
||||
folder: ReleaseInterfaces.Folder,
|
||||
|
@ -2040,7 +2040,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
|||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"5.1-preview.2",
|
||||
"Release",
|
||||
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
|
||||
routeValues);
|
||||
|
|
|
@ -68,7 +68,6 @@ export interface ITaskAgentApiBase extends basem.ClientApiBase {
|
|||
addKubernetesResource(createParameters: TaskAgentInterfaces.KubernetesResourceCreateParameters, project: string, environmentId: number): Promise<TaskAgentInterfaces.KubernetesResource>;
|
||||
deleteKubernetesResource(project: string, environmentId: number, resourceId: number): Promise<void>;
|
||||
getKubernetesResource(project: string, environmentId: number, resourceId: number): Promise<TaskAgentInterfaces.KubernetesResource>;
|
||||
updateKubernetesResource(resource: TaskAgentInterfaces.KubernetesResource, project: string, environmentId: number): Promise<TaskAgentInterfaces.KubernetesResource>;
|
||||
generateDeploymentMachineGroupAccessToken(project: string, machineGroupId: number): Promise<string>;
|
||||
addDeploymentMachineGroup(machineGroup: TaskAgentInterfaces.DeploymentMachineGroup, project: string): Promise<TaskAgentInterfaces.DeploymentMachineGroup>;
|
||||
deleteDeploymentMachineGroup(project: string, machineGroupId: number): Promise<void>;
|
||||
|
@ -2590,50 +2589,6 @@ export class TaskAgentApiBase extends basem.ClientApiBase implements ITaskAgentA
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {TaskAgentInterfaces.KubernetesResource} resource
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} environmentId
|
||||
*/
|
||||
public async updateKubernetesResource(
|
||||
resource: TaskAgentInterfaces.KubernetesResource,
|
||||
project: string,
|
||||
environmentId: number
|
||||
): Promise<TaskAgentInterfaces.KubernetesResource> {
|
||||
|
||||
return new Promise<TaskAgentInterfaces.KubernetesResource>(async (resolve, reject) => {
|
||||
let routeValues: any = {
|
||||
project: project,
|
||||
environmentId: environmentId
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"distributedtask",
|
||||
"73fba52f-15ab-42b3-a538-ce67a9223a04",
|
||||
routeValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
verData.apiVersion);
|
||||
|
||||
let res: restm.IRestResponse<TaskAgentInterfaces.KubernetesResource>;
|
||||
res = await this.rest.update<TaskAgentInterfaces.KubernetesResource>(url, resource, options);
|
||||
|
||||
let ret = this.formatResponse(res.result,
|
||||
TaskAgentInterfaces.TypeInfo.KubernetesResource,
|
||||
false);
|
||||
|
||||
resolve(ret);
|
||||
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} machineGroupId
|
||||
|
|
|
@ -24,6 +24,7 @@ export interface ITaskApi extends basem.ClientApiBase {
|
|||
getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise<TaskAgentInterfaces.TaskAttachment[]>;
|
||||
appendTimelineRecordFeed(lines: TaskAgentInterfaces.TimelineRecordFeedLinesWrapper, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise<void>;
|
||||
getJobInstance(scopeIdentifier: string, hubName: string, orchestrationId: string): Promise<TaskAgentInterfaces.TaskAgentJob>;
|
||||
appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise<TaskAgentInterfaces.TaskLog>;
|
||||
createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.TaskLog>;
|
||||
getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise<string[]>;
|
||||
|
@ -370,6 +371,51 @@ export class TaskApi extends basem.ClientApiBase implements ITaskApi {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} orchestrationId
|
||||
*/
|
||||
public async getJobInstance(
|
||||
scopeIdentifier: string,
|
||||
hubName: string,
|
||||
orchestrationId: string
|
||||
): Promise<TaskAgentInterfaces.TaskAgentJob> {
|
||||
|
||||
return new Promise<TaskAgentInterfaces.TaskAgentJob>(async (resolve, reject) => {
|
||||
let routeValues: any = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
orchestrationId: orchestrationId
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"distributedtask",
|
||||
"0a1efd25-abda-43bd-9629-6c7bdd2e0d60",
|
||||
routeValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
verData.apiVersion);
|
||||
|
||||
let res: restm.IRestResponse<TaskAgentInterfaces.TaskAgentJob>;
|
||||
res = await this.rest.get<TaskAgentInterfaces.TaskAgentJob>(url, options);
|
||||
|
||||
let ret = this.formatResponse(res.result,
|
||||
TaskAgentInterfaces.TypeInfo.TaskAgentJob,
|
||||
false);
|
||||
|
||||
resolve(ret);
|
||||
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
|
|
107
api/WorkApi.ts
107
api/WorkApi.ts
|
@ -67,6 +67,8 @@ export interface IWorkApi extends basem.ClientApiBase {
|
|||
getTeamSettings(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSetting>;
|
||||
updateTeamSettings(teamSettingsPatch: WorkInterfaces.TeamSettingsPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSetting>;
|
||||
getIterationWorkItems(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.IterationWorkItems>;
|
||||
reorderBacklogWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.ReorderResult[]>;
|
||||
reorderIterationWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.ReorderResult[]>;
|
||||
}
|
||||
|
||||
export class WorkApi extends basem.ClientApiBase implements IWorkApi {
|
||||
|
@ -2603,4 +2605,109 @@ export class WorkApi extends basem.ClientApiBase implements IWorkApi {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder Product Backlog/Boards Work Items
|
||||
*
|
||||
* @param {WorkInterfaces.ReorderOperation} operation
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
public async reorderBacklogWorkItems(
|
||||
operation: WorkInterfaces.ReorderOperation,
|
||||
teamContext: TfsCoreInterfaces.TeamContext
|
||||
): Promise<WorkInterfaces.ReorderResult[]> {
|
||||
|
||||
return new Promise<WorkInterfaces.ReorderResult[]>(async (resolve, reject) => {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
|
||||
let routeValues: any = {
|
||||
project: project,
|
||||
team: team
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"work",
|
||||
"1c22b714-e7e4-41b9-85e0-56ee13ef55ed",
|
||||
routeValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
verData.apiVersion);
|
||||
|
||||
let res: restm.IRestResponse<WorkInterfaces.ReorderResult[]>;
|
||||
res = await this.rest.update<WorkInterfaces.ReorderResult[]>(url, operation, options);
|
||||
|
||||
let ret = this.formatResponse(res.result,
|
||||
null,
|
||||
true);
|
||||
|
||||
resolve(ret);
|
||||
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder Sprint Backlog/Taskboard Work Items
|
||||
*
|
||||
* @param {WorkInterfaces.ReorderOperation} operation
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - The id of the iteration
|
||||
*/
|
||||
public async reorderIterationWorkItems(
|
||||
operation: WorkInterfaces.ReorderOperation,
|
||||
teamContext: TfsCoreInterfaces.TeamContext,
|
||||
iterationId: string
|
||||
): Promise<WorkInterfaces.ReorderResult[]> {
|
||||
|
||||
return new Promise<WorkInterfaces.ReorderResult[]>(async (resolve, reject) => {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
|
||||
let routeValues: any = {
|
||||
project: project,
|
||||
team: team,
|
||||
iterationId: iterationId
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"work",
|
||||
"47755db2-d7eb-405a-8c25-675401525fc9",
|
||||
routeValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
verData.apiVersion);
|
||||
|
||||
let res: restm.IRestResponse<WorkInterfaces.ReorderResult[]>;
|
||||
res = await this.rest.update<WorkInterfaces.ReorderResult[]>(url, operation, options);
|
||||
|
||||
let ret = this.formatResponse(res.result,
|
||||
null,
|
||||
true);
|
||||
|
||||
resolve(ret);
|
||||
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ export interface IWorkItemTrackingApi extends basem.ClientApiBase {
|
|||
deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise<void>;
|
||||
getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
getEngagedUsers(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType, top?: number, skip?: number): Promise<VSSInterfaces.IdentityRef[]>;
|
||||
addComment(request: WorkItemTrackingInterfaces.CommentCreate, project: string, workItemId: number): Promise<WorkItemTrackingInterfaces.Comment>;
|
||||
deleteComment(project: string, workItemId: number, commentId: number): Promise<void>;
|
||||
getComment(project: string, workItemId: number, commentId: number, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise<WorkItemTrackingInterfaces.Comment>;
|
||||
|
@ -777,6 +778,66 @@ export class WorkItemTrackingApi extends basem.ClientApiBase implements IWorkIte
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get users who reacted on the comment.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} workItemId - WorkItem ID.
|
||||
* @param {number} commentId - Comment ID.
|
||||
* @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction.
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
*/
|
||||
public async getEngagedUsers(
|
||||
project: string,
|
||||
workItemId: number,
|
||||
commentId: number,
|
||||
reactionType: WorkItemTrackingInterfaces.CommentReactionType,
|
||||
top?: number,
|
||||
skip?: number
|
||||
): Promise<VSSInterfaces.IdentityRef[]> {
|
||||
|
||||
return new Promise<VSSInterfaces.IdentityRef[]>(async (resolve, reject) => {
|
||||
let routeValues: any = {
|
||||
project: project,
|
||||
workItemId: workItemId,
|
||||
commentId: commentId,
|
||||
reactionType: reactionType
|
||||
};
|
||||
|
||||
let queryValues: any = {
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
|
||||
try {
|
||||
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
|
||||
"5.1-preview.1",
|
||||
"wit",
|
||||
"e33ca5e0-2349-4285-af3d-d72d86781c35",
|
||||
routeValues,
|
||||
queryValues);
|
||||
|
||||
let url: string = verData.requestUrl!;
|
||||
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
|
||||
verData.apiVersion);
|
||||
|
||||
let res: restm.IRestResponse<VSSInterfaces.IdentityRef[]>;
|
||||
res = await this.rest.get<VSSInterfaces.IdentityRef[]>(url, options);
|
||||
|
||||
let ret = this.formatResponse(res.result,
|
||||
null,
|
||||
true);
|
||||
|
||||
resolve(ret);
|
||||
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a comment on a work item.
|
||||
*
|
||||
|
|
|
@ -368,6 +368,10 @@ export interface BuildArtifact {
|
|||
* The actual resource.
|
||||
*/
|
||||
resource?: ArtifactResource;
|
||||
/**
|
||||
* The artifact source, which will be the ID of the job that produced this artifact.
|
||||
*/
|
||||
source?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1938,6 +1942,9 @@ export enum IssueType {
|
|||
Warning = 2,
|
||||
}
|
||||
|
||||
export interface JustInTimeProcess extends BuildProcess {
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an entry in a workspace mapping.
|
||||
*/
|
||||
|
|
|
@ -49,6 +49,10 @@ export interface Process extends ProcessReference {
|
|||
* Type of process customization on a collection.
|
||||
*/
|
||||
export enum ProcessCustomizationType {
|
||||
/**
|
||||
* Process customization can't be computed.
|
||||
*/
|
||||
Unknown = -1,
|
||||
/**
|
||||
* Customization based on project-scoped xml customization
|
||||
*/
|
||||
|
@ -142,6 +146,17 @@ export interface ProjectMessage {
|
|||
shouldInvalidateSystemStore?: boolean;
|
||||
}
|
||||
|
||||
export interface ProjectProperties {
|
||||
/**
|
||||
* The team project Id
|
||||
*/
|
||||
projectId?: string;
|
||||
/**
|
||||
* The collection of team project properties
|
||||
*/
|
||||
properties?: ProjectProperty[];
|
||||
}
|
||||
|
||||
/**
|
||||
* A named value associated with a project.
|
||||
*/
|
||||
|
@ -550,6 +565,7 @@ export var TypeInfo = {
|
|||
},
|
||||
ProcessCustomizationType: {
|
||||
enumValues: {
|
||||
"unknown": -1,
|
||||
"xml": 0,
|
||||
"inherited": 1
|
||||
}
|
||||
|
|
|
@ -424,6 +424,10 @@ export interface GraphUserMailAddressCreationContext extends GraphUserCreationCo
|
|||
* Use this type to create a new user using the OriginID as a reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its unique ID in the backing provider.
|
||||
*/
|
||||
export interface GraphUserOriginIdCreationContext extends GraphUserCreationContext {
|
||||
/**
|
||||
* This should be the name of the origin provider. Example: github.com
|
||||
*/
|
||||
origin?: string;
|
||||
/**
|
||||
* This should be the object id or sid of the user from the source AD or AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Team Services will communicate with the source provider to fill all other fields on creation.
|
||||
*/
|
||||
|
|
|
@ -125,6 +125,7 @@ export interface IdentityBatchInfo {
|
|||
includeRestrictedVisibility?: boolean;
|
||||
propertyNames?: string[];
|
||||
queryMembership?: QueryMembership;
|
||||
socialDescriptors?: string[];
|
||||
subjectDescriptors?: string[];
|
||||
}
|
||||
|
||||
|
|
|
@ -670,9 +670,9 @@ export interface CodeRepositoryReference {
|
|||
|
||||
export interface ComplianceSettings {
|
||||
/**
|
||||
* Block Release Definition save if any secrets is saved in Release Definition.
|
||||
* Scan the release definition for secrets
|
||||
*/
|
||||
blockReleaseDefinitionSaveIfSecretPresent?: boolean;
|
||||
checkForCredentialsAndOtherSecrets?: boolean;
|
||||
}
|
||||
|
||||
export interface Condition {
|
||||
|
|
|
@ -1535,6 +1535,15 @@ export interface TaskAgentDelaySource {
|
|||
taskAgent?: TaskAgentReference;
|
||||
}
|
||||
|
||||
export interface TaskAgentJob {
|
||||
container?: string;
|
||||
id?: string;
|
||||
name?: string;
|
||||
sidecarContainers?: { [key: string] : string; };
|
||||
steps?: TaskAgentJobStep[];
|
||||
variables?: TaskAgentJobVariable[];
|
||||
}
|
||||
|
||||
/**
|
||||
* A job request for an agent.
|
||||
*/
|
||||
|
@ -1631,6 +1640,7 @@ export interface TaskAgentJobRequest {
|
|||
*/
|
||||
serviceOwner?: string;
|
||||
statusMessage?: string;
|
||||
userDelayed?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1655,6 +1665,36 @@ export enum TaskAgentJobResultFilter {
|
|||
All = 7,
|
||||
}
|
||||
|
||||
export interface TaskAgentJobStep {
|
||||
condition?: string;
|
||||
continueOnError?: boolean;
|
||||
enabled?: boolean;
|
||||
env?: { [key: string] : string; };
|
||||
id?: string;
|
||||
inputs?: { [key: string] : string; };
|
||||
name?: string;
|
||||
task?: TaskAgentJobTask;
|
||||
timeoutInMinutes?: number;
|
||||
type?: TaskAgentJobStepType;
|
||||
}
|
||||
|
||||
export enum TaskAgentJobStepType {
|
||||
Task = 1,
|
||||
Action = 2,
|
||||
}
|
||||
|
||||
export interface TaskAgentJobTask {
|
||||
id?: string;
|
||||
name?: string;
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface TaskAgentJobVariable {
|
||||
name?: string;
|
||||
secret?: boolean;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface TaskAgentManualUpdate extends TaskAgentUpdateReason {
|
||||
}
|
||||
|
||||
|
@ -2186,6 +2226,7 @@ export interface TaskDefinition {
|
|||
friendlyName?: string;
|
||||
groups?: TaskGroupDefinition[];
|
||||
helpMarkDown?: string;
|
||||
helpUrl?: string;
|
||||
hostType?: string;
|
||||
iconUrl?: string;
|
||||
id?: string;
|
||||
|
@ -3129,6 +3170,8 @@ export var TypeInfo = {
|
|||
},
|
||||
TaskAgentDelaySource: <any>{
|
||||
},
|
||||
TaskAgentJob: <any>{
|
||||
},
|
||||
TaskAgentJobRequest: <any>{
|
||||
},
|
||||
TaskAgentJobResultFilter: {
|
||||
|
@ -3139,6 +3182,14 @@ export var TypeInfo = {
|
|||
"all": 7
|
||||
}
|
||||
},
|
||||
TaskAgentJobStep: <any>{
|
||||
},
|
||||
TaskAgentJobStepType: {
|
||||
enumValues: {
|
||||
"task": 1,
|
||||
"action": 2
|
||||
}
|
||||
},
|
||||
TaskAgentManualUpdate: <any>{
|
||||
},
|
||||
TaskAgentMinAgentVersionRequiredUpdate: <any>{
|
||||
|
@ -3712,6 +3763,13 @@ TypeInfo.TaskAgentDelaySource.fields = {
|
|||
}
|
||||
};
|
||||
|
||||
TypeInfo.TaskAgentJob.fields = {
|
||||
steps: {
|
||||
isArray: true,
|
||||
typeInfo: TypeInfo.TaskAgentJobStep
|
||||
}
|
||||
};
|
||||
|
||||
TypeInfo.TaskAgentJobRequest.fields = {
|
||||
agentDelays: {
|
||||
isArray: true,
|
||||
|
@ -3744,6 +3802,12 @@ TypeInfo.TaskAgentJobRequest.fields = {
|
|||
}
|
||||
};
|
||||
|
||||
TypeInfo.TaskAgentJobStep.fields = {
|
||||
type: {
|
||||
enumType: TypeInfo.TaskAgentJobStepType
|
||||
}
|
||||
};
|
||||
|
||||
TypeInfo.TaskAgentManualUpdate.fields = {
|
||||
code: {
|
||||
enumType: TypeInfo.TaskAgentUpdateReasonType
|
||||
|
|
|
@ -747,6 +747,54 @@ export interface FilterPointQuery {
|
|||
resultState: number[];
|
||||
}
|
||||
|
||||
export interface FlakyDetection {
|
||||
/**
|
||||
* FlakyDetectionPipelines defines Pipelines for Detection.
|
||||
*/
|
||||
flakyDetectionPipelines?: FlakyDetectionPipelines;
|
||||
/**
|
||||
* FlakyDetectionType defines Detection type i.e. 1. System or 2. Manual.
|
||||
*/
|
||||
flakyDetectionType: FlakyDetectionType;
|
||||
}
|
||||
|
||||
export interface FlakyDetectionPipelines {
|
||||
/**
|
||||
* AllowedPipelines - List All Pipelines allowed for detection.
|
||||
*/
|
||||
allowedPipelines?: number[];
|
||||
/**
|
||||
* IsAllPipelinesAllowed if users configure all system's pipelines.
|
||||
*/
|
||||
isAllPipelinesAllowed: boolean;
|
||||
}
|
||||
|
||||
export enum FlakyDetectionType {
|
||||
/**
|
||||
* Custom defines manual detection type.
|
||||
*/
|
||||
Custom = 1,
|
||||
/**
|
||||
* Defines System detection type.
|
||||
*/
|
||||
System = 2,
|
||||
}
|
||||
|
||||
export interface FlakySettings {
|
||||
/**
|
||||
* FlakyDetection defines types of detection.
|
||||
*/
|
||||
flakyDetection?: FlakyDetection;
|
||||
/**
|
||||
* FlakyInSummaryReport defines flaky data should show in summary report or not.
|
||||
*/
|
||||
flakyInSummaryReport?: boolean;
|
||||
/**
|
||||
* ManualMarkUnmarkFlaky defines manual marking unmarking of flaky testcase.
|
||||
*/
|
||||
manualMarkUnmarkFlaky?: boolean;
|
||||
}
|
||||
|
||||
export interface FunctionCoverage {
|
||||
class?: string;
|
||||
name?: string;
|
||||
|
@ -1240,6 +1288,7 @@ export interface PointsResults2 {
|
|||
lastTestResultId?: number;
|
||||
lastTestRunId?: number;
|
||||
lastUpdated?: Date;
|
||||
lastUpdatedBy?: string;
|
||||
planId?: number;
|
||||
pointId?: number;
|
||||
}
|
||||
|
@ -3764,6 +3813,24 @@ export interface TestResultsQuery {
|
|||
resultsFilter?: ResultsFilter;
|
||||
}
|
||||
|
||||
export interface TestResultsSettings {
|
||||
/**
|
||||
* IsRequired and EmitDefaultValue are passed as false as if users doesn't pass anything, should not come for serialisation and deserialisation.
|
||||
*/
|
||||
flakySettings?: FlakySettings;
|
||||
}
|
||||
|
||||
export enum TestResultsSettingsType {
|
||||
/**
|
||||
* Returns All Test Settings.
|
||||
*/
|
||||
All = 1,
|
||||
/**
|
||||
* Returns Flaky Test Settings.
|
||||
*/
|
||||
Flaky = 2,
|
||||
}
|
||||
|
||||
export interface TestResultSummary {
|
||||
aggregatedResultsAnalysis?: AggregatedResultsAnalysis;
|
||||
noConfigRunsCount?: number;
|
||||
|
@ -3773,6 +3840,20 @@ export interface TestResultSummary {
|
|||
totalRunsCount?: number;
|
||||
}
|
||||
|
||||
export interface TestResultsUpdateSettings {
|
||||
/**
|
||||
* FlakySettings defines Flaky Setttings Data.
|
||||
*/
|
||||
flakySettings?: FlakySettings;
|
||||
}
|
||||
|
||||
export interface TestResultsWithWatermark {
|
||||
changedDate?: Date;
|
||||
pointsResults?: PointsResults2[];
|
||||
resultId?: number;
|
||||
runId?: number;
|
||||
}
|
||||
|
||||
export interface TestResultTrendFilter {
|
||||
branchNames?: string[];
|
||||
buildCount?: number;
|
||||
|
@ -4878,6 +4959,16 @@ export var TypeInfo = {
|
|||
},
|
||||
FetchTestResultsResponse: <any>{
|
||||
},
|
||||
FlakyDetection: <any>{
|
||||
},
|
||||
FlakyDetectionType: {
|
||||
enumValues: {
|
||||
"custom": 1,
|
||||
"system": 2
|
||||
}
|
||||
},
|
||||
FlakySettings: <any>{
|
||||
},
|
||||
LastResultDetails: <any>{
|
||||
},
|
||||
LegacyBuildConfiguration: <any>{
|
||||
|
@ -5174,8 +5265,20 @@ export var TypeInfo = {
|
|||
},
|
||||
TestResultsQuery: <any>{
|
||||
},
|
||||
TestResultsSettings: <any>{
|
||||
},
|
||||
TestResultsSettingsType: {
|
||||
enumValues: {
|
||||
"all": 1,
|
||||
"flaky": 2
|
||||
}
|
||||
},
|
||||
TestResultSummary: <any>{
|
||||
},
|
||||
TestResultsUpdateSettings: <any>{
|
||||
},
|
||||
TestResultsWithWatermark: <any>{
|
||||
},
|
||||
TestResultTrendFilter: <any>{
|
||||
},
|
||||
TestRun: <any>{
|
||||
|
@ -5477,6 +5580,18 @@ TypeInfo.FetchTestResultsResponse.fields = {
|
|||
}
|
||||
};
|
||||
|
||||
TypeInfo.FlakyDetection.fields = {
|
||||
flakyDetectionType: {
|
||||
enumType: TypeInfo.FlakyDetectionType
|
||||
}
|
||||
};
|
||||
|
||||
TypeInfo.FlakySettings.fields = {
|
||||
flakyDetection: {
|
||||
typeInfo: TypeInfo.FlakyDetection
|
||||
}
|
||||
};
|
||||
|
||||
TypeInfo.LastResultDetails.fields = {
|
||||
dateCompleted: {
|
||||
isDate: true,
|
||||
|
@ -6130,6 +6245,12 @@ TypeInfo.TestResultsQuery.fields = {
|
|||
}
|
||||
};
|
||||
|
||||
TypeInfo.TestResultsSettings.fields = {
|
||||
flakySettings: {
|
||||
typeInfo: TypeInfo.FlakySettings
|
||||
}
|
||||
};
|
||||
|
||||
TypeInfo.TestResultSummary.fields = {
|
||||
aggregatedResultsAnalysis: {
|
||||
typeInfo: TypeInfo.AggregatedResultsAnalysis
|
||||
|
@ -6145,6 +6266,22 @@ TypeInfo.TestResultSummary.fields = {
|
|||
}
|
||||
};
|
||||
|
||||
TypeInfo.TestResultsUpdateSettings.fields = {
|
||||
flakySettings: {
|
||||
typeInfo: TypeInfo.FlakySettings
|
||||
}
|
||||
};
|
||||
|
||||
TypeInfo.TestResultsWithWatermark.fields = {
|
||||
changedDate: {
|
||||
isDate: true,
|
||||
},
|
||||
pointsResults: {
|
||||
isArray: true,
|
||||
typeInfo: TypeInfo.PointsResults2
|
||||
}
|
||||
};
|
||||
|
||||
TypeInfo.TestResultTrendFilter.fields = {
|
||||
maxCompleteDate: {
|
||||
isDate: true,
|
||||
|
|
|
@ -770,6 +770,46 @@ export interface ProcessConfiguration {
|
|||
url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a reorder request for one or more work items.
|
||||
*/
|
||||
export interface ReorderOperation {
|
||||
/**
|
||||
* IDs of the work items to be reordered. Must be valid WorkItem Ids.
|
||||
*/
|
||||
ids?: number[];
|
||||
/**
|
||||
* IterationPath for reorder operation. This is only used when we reorder from the Iteration Backlog
|
||||
*/
|
||||
iterationPath?: string;
|
||||
/**
|
||||
* ID of the work item that should be after the reordered items. Can use 0 to specify the end of the list.
|
||||
*/
|
||||
nextId?: number;
|
||||
/**
|
||||
* Parent ID for all of the work items involved in this operation. Can use 0 to indicate the items don't have a parent.
|
||||
*/
|
||||
parentId?: number;
|
||||
/**
|
||||
* ID of the work item that should be before the reordered items. Can use 0 to specify the beginning of the list.
|
||||
*/
|
||||
previousId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a reorder result for a work item.
|
||||
*/
|
||||
export interface ReorderResult {
|
||||
/**
|
||||
* The ID of the work item that was reordered.
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* The updated order value of the work item that was reordered.
|
||||
*/
|
||||
order?: number;
|
||||
}
|
||||
|
||||
export interface Rule {
|
||||
clauses?: FilterClause[];
|
||||
filter?: string;
|
||||
|
@ -1043,6 +1083,10 @@ export interface TimelineTeamData {
|
|||
}
|
||||
|
||||
export interface TimelineTeamIteration {
|
||||
/**
|
||||
* The iteration CSS Node Id
|
||||
*/
|
||||
cssNodeId?: string;
|
||||
/**
|
||||
* The end date of the iteration
|
||||
*/
|
||||
|
|
|
@ -486,15 +486,15 @@ export enum FieldType {
|
|||
*/
|
||||
Identity = 10,
|
||||
/**
|
||||
* String picklist field type.
|
||||
* String picklist field type. When creating a string picklist field from REST API, use "String" FieldType.
|
||||
*/
|
||||
PicklistString = 11,
|
||||
/**
|
||||
* Integer picklist field type.
|
||||
* Integer picklist field type. When creating a integer picklist field from REST API, use "Integer" FieldType.
|
||||
*/
|
||||
PicklistInteger = 12,
|
||||
/**
|
||||
* Double picklist field type.
|
||||
* Double picklist field type. When creating a double picklist field from REST API, use "Double" FieldType.
|
||||
*/
|
||||
PicklistDouble = 13,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "azure-devops-node-api",
|
||||
"version": "8.0.1",
|
||||
"version": "9.0.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": "8.2.0",
|
||||
"version": "9.0.0",
|
||||
"main": "./WebApi.js",
|
||||
"types": "./WebApi.d.ts",
|
||||
"scripts": {
|
||||
|
|
|
@ -25,27 +25,4 @@ export async function run(createdProjectId: string) {
|
|||
const buildApiObject: BuildApi.IBuildApi = await webApi.getBuildApi();
|
||||
const defs: BuildInterfaces.DefinitionReference[] = await buildApiObject.getDefinitions(projectId);
|
||||
console.log('Code coverage for build' + defs[0].id + ':', await testApiObject.getCodeCoverageSummary(projectId, defs[0].id));
|
||||
|
||||
common.heading('Create test session');
|
||||
const testSessionModel: TestInterfaces.TestSession = {area: null,
|
||||
comment: 'autogenerated, should be deleted',
|
||||
endDate: null,
|
||||
id: 1012,
|
||||
title: 'mySession',
|
||||
owner: null,
|
||||
startDate: null,
|
||||
state: null};
|
||||
const teamContext: CoreInterfaces.TeamContext = {project: project.name,
|
||||
projectId: project.id,
|
||||
team: project.defaultTeam.name,
|
||||
teamId: project.defaultTeam.id};
|
||||
|
||||
const testSession = await testApiObject.createTestSession(testSessionModel, teamContext);
|
||||
console.log('Created session', testSession.title);
|
||||
|
||||
common.heading('Create test run');
|
||||
const suiteId = 1;
|
||||
const testSuiteModel: TestInterfaces.RunCreateModel = {name: 'myRun', configurationIds: [], plan: null };
|
||||
const testRun: TestInterfaces.TestRun = await testApiObject.createTestRun(testSuiteModel, project.id);
|
||||
console.log('Empty run, should be null:', testRun);
|
||||
}
|
Загрузка…
Ссылка в новой задаче