Merge pull request #81 from olaseeniolay/master

Updated M157 to M215
This commit is contained in:
olaseeniolay 2023-01-19 11:13:46 -08:00 коммит произвёл GitHub
Родитель bd06868b78 ddc8464329
Коммит 262679876c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
58 изменённых файлов: 6130 добавлений и 1727 удалений

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

@ -30,7 +30,7 @@ export class AccountsRestClient extends RestClientBase {
};
return this.beginRequest<Accounts.Account>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Accounts/{accountId}",
queryParams: queryValues,
@ -46,7 +46,7 @@ export class AccountsRestClient extends RestClientBase {
): Promise<Accounts.Account> {
return this.beginRequest<Accounts.Account>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Accounts/{accountId}",
routeValues: {
accountId: accountId
@ -55,7 +55,7 @@ export class AccountsRestClient extends RestClientBase {
}
/**
* Get a list of accounts for a specific owner or a specific member.
* Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
*
* @param ownerId - ID for the owner of the accounts.
* @param memberId - ID for a member of the accounts.
@ -74,7 +74,7 @@ export class AccountsRestClient extends RestClientBase {
};
return this.beginRequest<Accounts.Account[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Accounts/{accountId}",
queryParams: queryValues
});

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

@ -151,6 +151,10 @@ export interface Build {
* The agent specification for the build.
*/
agentSpecification: AgentSpecification;
/**
* Append Commit Message To BuildNumber in UI.
*/
appendCommitMessageToRunName: boolean;
/**
* The build number/name of the build.
*/
@ -237,7 +241,7 @@ export interface Build {
*/
quality: string;
/**
* The queue. This is only set if the definition type is Build.
* The queue. This is only set if the definition type is Build. WARNING: this field is deprecated and does not corresponds to the jobs queues.
*/
queue: AgentPoolQueue;
/**
@ -293,6 +297,10 @@ export interface Build {
*/
status: BuildStatus;
tags: string[];
/**
* Parameters to template expression evaluation
*/
templateParameters: { [key: string] : string; };
/**
* The build that triggered this build via a Build completion trigger.
*/
@ -721,6 +729,10 @@ export interface BuildDefinitionStep {
* The reference name for this step.
*/
refName: string;
/**
* Number of retries.
*/
retryCountOnTaskFailure: number;
/**
* The task associated with this step.
*/
@ -1116,14 +1128,18 @@ export enum BuildReason {
* The build was started when another build completed.
*/
BuildCompletion = 512,
/**
* The build was started when resources in pipeline triggered it
*/
ResourceTrigger = 1024,
/**
* The build was triggered for retention policy purposes.
*/
Triggered = 943,
Triggered = 1967,
/**
* All reasons.
*/
All = 1007
All = 2031
}
/**
@ -1288,6 +1304,38 @@ export enum BuildResult {
Canceled = 32
}
/**
* A historical overview of build retention information. This includes a list of snapshots taken about build retention usage, and a list of builds that have exceeded the default 30 day retention policy.
*/
export interface BuildRetentionHistory {
/**
* A list of builds that are older than the default retention policy, but are not marked as retained. Something is causing these builds to not get cleaned up.
*/
buildRetentionSamples: BuildRetentionSample[];
}
/**
* A snapshot of build retention information. This class takes a sample at the given time. It provides information about retained builds, files associated with those retained builds, and number of files being retained.
*/
export interface BuildRetentionSample {
/**
* Summary of retention by build
*/
builds: string;
/**
* List of build definitions
*/
definitions: string;
/**
* Summary of files consumed by retained builds
*/
files: string;
/**
* The date and time when the sample was taken
*/
sampleTime: Date;
}
export interface BuildsDeletedEvent extends BuildsDeletedEvent1 {
}
@ -1841,6 +1889,10 @@ export enum FolderQueryOrder {
* Represents the ability to build forks of the selected repository.
*/
export interface Forks {
/**
* Indicates whether a build should allow a full access token or scope it down when building forks of the selected repository.
*/
allowFullAccessToken: boolean;
/**
* Indicates whether a build should use secrets when building forks of the selected repository.
*/
@ -1956,6 +2008,21 @@ export interface MappingDetails {
serverPath: string;
}
export interface MinimalRetentionLease {
/**
* The pipeline definition of the run.
*/
definitionId: number;
/**
* User-provided string that identifies the owner of a retention lease.
*/
ownerId: string;
/**
* The pipeline run to protect.
*/
runId: number;
}
/**
* Represents options for running a phase against multiple agents.
*/
@ -1970,6 +2037,32 @@ export interface MultipleAgentExecutionOptions extends AgentTargetExecutionOptio
maxConcurrency: number;
}
/**
* Required information to create a new retention lease.
*/
export interface NewRetentionLease {
/**
* The number of days to consider the lease valid. A retention lease valid for more than 100 years (36500 days) will display as retaining the build "forever".
*/
daysValid: number;
/**
* The pipeline definition of the run.
*/
definitionId: number;
/**
* User-provided string that identifies the owner of a retention lease.
*/
ownerId: string;
/**
* If set, this lease will also prevent the pipeline from being deleted while the lease is still valid.
*/
protectPipeline: boolean;
/**
* The pipeline run to protect.
*/
runId: number;
}
/**
* Represents a phase of a build definition.
*/
@ -2017,6 +2110,40 @@ export interface PhaseTarget {
type: number;
}
/**
* Contains pipeline general settings.
*/
export interface PipelineGeneralSettings {
/**
* Disable classic pipelines creation.
*/
disableClassicPipelineCreation: boolean;
/**
* If enabled, scope of access for all non-release pipelines reduces to the current project.
*/
enforceJobAuthScope: boolean;
/**
* If enabled, scope of access for all release pipelines reduces to the current project.
*/
enforceJobAuthScopeForReleases: boolean;
/**
* Restricts the scope of access for all pipelines to only repositories explicitly referenced by the pipeline.
*/
enforceReferencedRepoScopedToken: boolean;
/**
* If enabled, only those variables that are explicitly marked as "Settable at queue time" can be set at queue time.
*/
enforceSettableVar: boolean;
/**
* Allows pipelines to record metadata.
*/
publishPipelineMetadata: boolean;
/**
* Anonymous users can access the status badge API for all pipelines unless this option is enabled.
*/
statusBadgesArePrivate: boolean;
}
export enum ProcessTemplateType {
/**
* Indicates a custom template.
@ -2048,6 +2175,10 @@ export interface ProjectRetentionSetting {
* The rules for pipeline run retention.
*/
purgeRuns: RetentionSetting;
/**
* The rules for retaining runs per protected branch.
*/
retainRunsPerProtectedBranch: RetentionSetting;
}
/**
@ -2070,6 +2201,10 @@ export interface PullRequest {
* Description for the pull request.
*/
description: string;
/**
* Returns if pull request is draft
*/
draft: boolean;
/**
* Unique identifier for the pull request
*/
@ -2112,6 +2247,7 @@ export interface PullRequestTrigger extends BuildTrigger {
forks: Forks;
isCommentRequiredForPullRequest: boolean;
pathFilters: string[];
requireCommentsForNonTeamMemberAndNonContributors: boolean;
requireCommentsForNonTeamMembersOnly: boolean;
settingsSourceType: number;
}
@ -2218,6 +2354,54 @@ export enum ResultSet {
Top = 1
}
/**
* A valid retention lease prevents automated systems from deleting a pipeline run.
*/
export interface RetentionLease {
/**
* When the lease was created.
*/
createdOn: Date;
/**
* The pipeline definition of the run.
*/
definitionId: number;
/**
* The unique identifier for this lease.
*/
leaseId: number;
/**
* Non-unique string that identifies the owner of a retention lease.
*/
ownerId: string;
/**
* If set, this lease will also prevent the pipeline from being deleted while the lease is still valid.
*/
protectPipeline: boolean;
/**
* The pipeline run protected by this lease.
*/
runId: number;
/**
* The last day the lease is considered valid.
*/
validUntil: Date;
}
/**
* An update to the retention parameters of a retention lease.
*/
export interface RetentionLeaseUpdate {
/**
* The number of days to consider the lease valid. A retention lease valid for more than 100 years (36500 days) will display as retaining the build "forever".
*/
daysValid: number;
/**
* If set, this lease will also prevent the pipeline from being deleted while the lease is still valid.
*/
protectPipeline: boolean;
}
/**
* Represents a retention policy for a build definition.
*/
@ -2777,6 +2961,10 @@ export interface TimelineRecord {
*/
percentComplete: number;
previousAttempts: TimelineAttempt[];
/**
* The queue ID of the queue that the operation ran on.
*/
queueId: number;
/**
* The result.
*/
@ -2849,6 +3037,7 @@ export interface TimelineReference {
export interface UpdateProjectRetentionSettingModel {
artifactsRetention: UpdateRetentionSettingModel;
pullRequestRunRetention: UpdateRetentionSettingModel;
retainRunsPerProtectedBranch: UpdateRetentionSettingModel;
runRetention: UpdateRetentionSettingModel;
}
@ -2857,9 +3046,15 @@ export interface UpdateRetentionSettingModel {
}
export interface UpdateStageParameters {
forceRetryAllJobs: boolean;
state: StageUpdateType;
}
export interface UpdateTagParameters {
tagsToAdd: string[];
tagsToRemove: string[];
}
export enum ValidationResult {
OK = 0,
Warning = 1,
@ -3098,6 +3293,16 @@ export interface XamlDefinitionReference {
url: string;
}
/**
* Represents a yaml build.
*/
export interface YamlBuild {
/**
* The yaml used to define the build
*/
yaml: string;
}
/**
* Represents a YAML process.
*/

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -156,7 +156,7 @@ export interface ContributionConstraint {
*/
properties: any;
/**
* Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will elimiate the contribution from the tree completely if the constraint is applied.
* Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied.
*/
relationships: string[];
}

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

@ -26,7 +26,7 @@ export class ContributionsRestClient extends RestClientBase {
): Promise<Contributions.ContributionNodeQueryResult> {
return this.beginRequest<Contributions.ContributionNodeQueryResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Contribution/nodes/query",
body: query
@ -45,7 +45,7 @@ export class ContributionsRestClient extends RestClientBase {
): Promise<Contributions.DataProviderResult> {
return this.beginRequest<Contributions.DataProviderResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Contribution/dataProviders/query/{scopeName}/{scopeValue}",
routeValues: {
@ -74,7 +74,7 @@ export class ContributionsRestClient extends RestClientBase {
};
return this.beginRequest<Contributions.InstalledExtension[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Contribution/InstalledApps/{extensionId}",
queryParams: queryValues
});
@ -96,7 +96,7 @@ export class ContributionsRestClient extends RestClientBase {
};
return this.beginRequest<Contributions.InstalledExtension>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Contribution/InstalledApps/{publisherName}/{extensionName}",
routeValues: {
publisherName: publisherName,

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as Core from "../Core/Core";
import * as Operations from "../Operations/Operations";
@ -28,7 +29,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/projects/{projectId}/avatar",
routeValues: {
@ -49,7 +50,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/projects/{projectId}/avatar",
routeValues: {
@ -69,7 +70,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.WebApiConnectedService> {
return this.beginRequest<Core.WebApiConnectedService>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/projects/{projectId}/connectedServices/{name}",
routeValues: {
@ -89,7 +90,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.WebApiConnectedServiceDetails> {
return this.beginRequest<Core.WebApiConnectedServiceDetails>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/projects/{projectId}/connectedServices/{name}",
routeValues: {
projectId: projectId,
@ -112,7 +113,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.WebApiConnectedService[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/projects/{projectId}/connectedServices/{name}",
routeValues: {
projectId: projectId
@ -131,7 +132,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/core/identityMru/{mruName}",
routeValues: {
@ -151,7 +152,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/core/identityMru/{mruName}",
routeValues: {
@ -168,7 +169,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<WebApi.IdentityRef[]> {
return this.beginRequest<WebApi.IdentityRef[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/core/identityMru/{mruName}",
routeValues: {
mruName: mruName
@ -186,7 +187,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/core/identityMru/{mruName}",
routeValues: {
@ -217,7 +218,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<WebApi.TeamMember[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/projects/{projectId}/teams/{teamId}/members",
routeValues: {
projectId: projectId,
@ -237,7 +238,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.Process> {
return this.beginRequest<Core.Process>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/process/processes/{*processId}",
routeValues: {
processId: processId
@ -253,7 +254,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.Process[]> {
return this.beginRequest<Core.Process[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/process/processes/{*processId}"
});
}
@ -268,7 +269,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.TeamProjectCollection> {
return this.beginRequest<Core.TeamProjectCollection>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/projectCollections/{collectionId}",
routeValues: {
collectionId: collectionId
@ -293,7 +294,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.TeamProjectCollectionReference[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/projectCollections/{collectionId}",
queryParams: queryValues
});
@ -313,7 +314,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.ProjectInfo[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/projectHistory",
queryParams: queryValues
});
@ -338,7 +339,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.TeamProject>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
routeTemplate: "_apis/projects/{*projectId}",
routeValues: {
projectId: projectId
@ -372,10 +373,15 @@ export class CoreRestClient extends RestClientBase {
getDefaultTeamImageUrl: getDefaultTeamImageUrl
};
return this.beginRequest<Core.TeamProjectReference[]>({
apiVersion: "5.2-preview.4",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.4",
routeTemplate: "_apis/projects/{*projectId}",
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Core.TeamProjectReference[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -389,7 +395,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Operations.OperationReference> {
return this.beginRequest<Operations.OperationReference>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
method: "POST",
routeTemplate: "_apis/projects/{*projectId}",
body: projectToCreate
@ -406,7 +412,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Operations.OperationReference> {
return this.beginRequest<Operations.OperationReference>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
method: "DELETE",
routeTemplate: "_apis/projects/{*projectId}",
routeValues: {
@ -427,7 +433,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Operations.OperationReference> {
return this.beginRequest<Operations.OperationReference>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
method: "PATCH",
routeTemplate: "_apis/projects/{*projectId}",
routeValues: {
@ -454,7 +460,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.ProjectProperties[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/projectsproperties",
queryParams: queryValues
});
@ -476,7 +482,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.ProjectProperty[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/projects/{projectId}/properties",
routeValues: {
projectId: projectId
@ -497,7 +503,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/projects/{projectId}/properties",
routeValues: {
@ -518,7 +524,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.Proxy> {
return this.beginRequest<Core.Proxy>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "_apis/proxies",
body: proxy
@ -540,7 +546,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/proxies",
queryParams: queryValues
@ -559,7 +565,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.Proxy[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/proxies",
queryParams: queryValues
});
@ -588,7 +594,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.WebApiTeam[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "_apis/teams",
queryParams: queryValues
});
@ -606,7 +612,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.WebApiTeam> {
return this.beginRequest<Core.WebApiTeam>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "_apis/projects/{projectId}/teams/{*teamId}",
routeValues: {
@ -628,7 +634,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "DELETE",
routeTemplate: "_apis/projects/{projectId}/teams/{*teamId}",
routeValues: {
@ -656,7 +662,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.WebApiTeam>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "_apis/projects/{projectId}/teams/{*teamId}",
routeValues: {
projectId: projectId,
@ -691,7 +697,7 @@ export class CoreRestClient extends RestClientBase {
};
return this.beginRequest<Core.WebApiTeam[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "_apis/projects/{projectId}/teams/{*teamId}",
routeValues: {
projectId: projectId
@ -714,7 +720,7 @@ export class CoreRestClient extends RestClientBase {
): Promise<Core.WebApiTeam> {
return this.beginRequest<Core.WebApiTeam>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "_apis/projects/{projectId}/teams/{*teamId}",
routeValues: {

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

@ -4,11 +4,64 @@
* ---------------------------------------------------------
*/
/**
* Copy options of a Dashboard.
*/
export interface CopyDashboardOptions {
/**
* Dashboard Scope. Can be either Project or Project_Team
*/
copyDashboardScope: DashboardScope;
/**
* When this flag is set to true,option to select the folder to copy Queries of copy dashboard will appear.
*/
copyQueriesFlag: boolean;
/**
* Description of the dashboard
*/
description: string;
/**
* Name of the dashboard
*/
name: string;
/**
* ID of the project. Provided by service at creation time.
*/
projectId: string;
/**
* Path to which the queries should be copied of copy dashboard
*/
queryFolderPath: string;
/**
* Refresh interval of dashboard
*/
refreshInterval: number;
/**
* ID of the team. Provided by service at creation time
*/
teamId: string;
}
export interface CopyDashboardResponse {
/**
* Copied Dashboard
*/
copiedDashboard: Dashboard;
/**
* Copy Dashboard options
*/
copyDashboardOptions: CopyDashboardOptions;
}
/**
* Model of a Dashboard.
*/
export interface Dashboard {
_links: any;
/**
* Entity to which the dashboard is scoped.
*/
dashboardScope: DashboardScope;
/**
* Description of the dashboard.
*/
@ -17,6 +70,10 @@ export interface Dashboard {
* Server defined version tracking value, used for edit collision detection.
*/
eTag: 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.
*/
groupId: string;
/**
* ID of the Dashboard. Provided by service at creation time.
*/
@ -26,7 +83,7 @@ export interface Dashboard {
*/
name: string;
/**
* ID of the Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard.
* ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard.
*/
ownerId: string;
/**
@ -83,8 +140,18 @@ export interface DashboardResponse extends DashboardGroupEntry {
* identifies the scope of dashboard storage and permissions.
*/
export enum DashboardScope {
/**
* [DEPRECATED] Dashboard is scoped to the collection user.
*/
Collection_User = 0,
Project_Team = 1
/**
* Dashboard is scoped to the team.
*/
Project_Team = 1,
/**
* Dashboard is scoped to the project.
*/
Project = 2
}
export enum GroupMemberPermission {

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

@ -32,7 +32,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Dashboard>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
routeValues: {
@ -58,7 +58,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "DELETE",
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
routeValues: {
@ -84,7 +84,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Dashboard>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
routeValues: {
project: project,
@ -95,19 +95,19 @@ export class DashboardRestClient extends RestClientBase {
}
/**
* Get a list of dashboards.
* Get a list of dashboards under a project.
*
* @param teamContext - The team context for the operation
*/
public async getDashboards(
public async getDashboardsByProject(
teamContext: TfsCore.TeamContext
): Promise<Dashboard.DashboardGroup> {
): Promise<Dashboard.Dashboard[]> {
const project = teamContext.projectId || teamContext.project;
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.DashboardGroup>({
apiVersion: "5.2-preview.2",
return this.beginRequest<Dashboard.Dashboard[]>({
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
routeValues: {
project: project,
@ -133,7 +133,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Dashboard>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
routeValues: {
@ -160,7 +160,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.DashboardGroup>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
routeValues: {
@ -188,7 +188,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Widget>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
routeValues: {
@ -217,7 +217,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Dashboard>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
routeValues: {
@ -246,7 +246,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Widget>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
routeValues: {
project: project,
@ -276,7 +276,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Widget>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
routeValues: {
@ -308,7 +308,7 @@ export class DashboardRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Dashboard.Widget>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
routeValues: {
@ -333,7 +333,7 @@ export class DashboardRestClient extends RestClientBase {
): Promise<Dashboard.WidgetMetadataResponse> {
return this.beginRequest<Dashboard.WidgetMetadataResponse>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Dashboard/WidgetTypes/{contributionId}",
routeValues: {
project: project,
@ -358,7 +358,7 @@ export class DashboardRestClient extends RestClientBase {
};
return this.beginRequest<Dashboard.WidgetTypesResponse>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Dashboard/WidgetTypes/{contributionId}",
routeValues: {
project: project

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

@ -24,7 +24,7 @@ export enum AcquisitionAssignmentType {
export interface AcquisitionOperation {
/**
* State of the the AcquisitionOperation for the current user
* State of the AcquisitionOperation for the current user
*/
operationState: AcquisitionOperationState;
/**
@ -277,7 +277,7 @@ export interface ContributionConstraint {
*/
properties: any;
/**
* Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will elimiate the contribution from the tree completely if the constraint is applied.
* Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied.
*/
relationships: string[];
}

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

@ -47,7 +47,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
};
return this.beginRequest<ExtensionManagement.AcquisitionOptions>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/AcquisitionOptions",
queryParams: queryValues
});
@ -61,7 +61,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.ExtensionAcquisitionRequest> {
return this.beginRequest<ExtensionManagement.ExtensionAcquisitionRequest>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/ExtensionManagement/AcquisitionRequests",
body: acquisitionRequest
@ -78,7 +78,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.ExtensionAuditLog> {
return this.beginRequest<ExtensionManagement.ExtensionAuditLog>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/AuditLog/{publisherName}/{extensionName}",
routeValues: {
publisherName: publisherName,
@ -99,7 +99,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.ExtensionAuthorization> {
return this.beginRequest<ExtensionManagement.ExtensionAuthorization>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Authorizations/{registrationId}",
routeValues: {
@ -128,7 +128,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<any> {
return this.beginRequest<any>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",
routeValues: {
@ -160,7 +160,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",
routeValues: {
@ -192,7 +192,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<any> {
return this.beginRequest<any>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",
routeValues: {
publisherName: publisherName,
@ -221,7 +221,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<any[]> {
return this.beginRequest<any[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",
routeValues: {
publisherName: publisherName,
@ -251,7 +251,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<any> {
return this.beginRequest<any>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",
routeValues: {
@ -283,7 +283,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<any> {
return this.beginRequest<any>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",
routeValues: {
@ -311,7 +311,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.ExtensionDataCollection[]> {
return this.beginRequest<ExtensionManagement.ExtensionDataCollection[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/ExtensionDataCollectionQuery",
routeValues: {
@ -345,7 +345,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
};
return this.beginRequest<ExtensionManagement.ExtensionState[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/ExtensionStates",
queryParams: queryValues
});
@ -359,7 +359,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.InstalledExtension[]> {
return this.beginRequest<ExtensionManagement.InstalledExtension[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensionQuery",
body: query
@ -371,7 +371,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
*
* @param includeDisabledExtensions - If true (the default), include disabled extensions in the results.
* @param includeErrors - If true, include installed extensions with errors.
* @param assetTypes -
* @param assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types.
* @param includeInstallationIssues -
*/
public async getInstalledExtensions(
@ -389,7 +389,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
};
return this.beginRequest<ExtensionManagement.InstalledExtension[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{extensionId}",
queryParams: queryValues
});
@ -405,7 +405,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.InstalledExtension> {
return this.beginRequest<ExtensionManagement.InstalledExtension>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{extensionId}",
body: extension
@ -417,7 +417,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
*
* @param publisherName - Name of the publisher. Example: "fabrikam".
* @param extensionName - Name of the extension. Example: "ops-tools".
* @param assetTypes -
* @param assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types.
*/
public async getInstalledExtensionByName(
publisherName: string,
@ -430,7 +430,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
};
return this.beginRequest<ExtensionManagement.InstalledExtension>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",
routeValues: {
publisherName: publisherName,
@ -454,7 +454,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.InstalledExtension> {
return this.beginRequest<ExtensionManagement.InstalledExtension>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",
routeValues: {
@ -486,7 +486,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",
routeValues: {
@ -505,7 +505,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<Gallery.UserExtensionPolicy> {
return this.beginRequest<Gallery.UserExtensionPolicy>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/Policies/{userId}",
routeValues: {
userId: userId
@ -533,7 +533,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
};
return this.beginRequest<number>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/{requesterId}",
routeValues: {
@ -552,7 +552,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.RequestedExtension[]> {
return this.beginRequest<ExtensionManagement.RequestedExtension[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/RequestedExtensions"
});
}
@ -575,7 +575,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
};
return this.beginRequest<number>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}",
routeValues: {
@ -597,7 +597,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/me",
routeValues: {
@ -619,7 +619,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<ExtensionManagement.RequestedExtension> {
return this.beginRequest<ExtensionManagement.RequestedExtension>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/me",
routeValues: {
@ -636,7 +636,7 @@ export class ExtensionManagementRestClient extends RestClientBase {
): Promise<string> {
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ExtensionManagement/Token"
});
}

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

@ -28,7 +28,7 @@ export class FeatureAvailabilityRestClient extends RestClientBase {
};
return this.beginRequest<FeatureAvailability.FeatureFlag[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureFlags/{name}",
queryParams: queryValues
});
@ -50,7 +50,7 @@ export class FeatureAvailabilityRestClient extends RestClientBase {
};
return this.beginRequest<FeatureAvailability.FeatureFlag>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureFlags/{name}",
routeValues: {
name: name
@ -78,7 +78,7 @@ export class FeatureAvailabilityRestClient extends RestClientBase {
};
return this.beginRequest<FeatureAvailability.FeatureFlag>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureFlags/{name}",
routeValues: {
name: name
@ -106,7 +106,7 @@ export class FeatureAvailabilityRestClient extends RestClientBase {
};
return this.beginRequest<FeatureAvailability.FeatureFlag>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureFlags/{name}",
routeValues: {
name: name
@ -139,7 +139,7 @@ export class FeatureAvailabilityRestClient extends RestClientBase {
};
return this.beginRequest<FeatureAvailability.FeatureFlag>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/FeatureFlags/{name}",
routeValues: {

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

@ -24,7 +24,7 @@ export class FeatureManagementRestClient extends RestClientBase {
): Promise<FeatureManagement.ContributedFeature> {
return this.beginRequest<FeatureManagement.ContributedFeature>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureManagement/Features/{featureId}",
routeValues: {
featureId: featureId
@ -46,7 +46,7 @@ export class FeatureManagementRestClient extends RestClientBase {
};
return this.beginRequest<FeatureManagement.ContributedFeature[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureManagement/Features/{featureId}",
queryParams: queryValues
});
@ -64,7 +64,7 @@ export class FeatureManagementRestClient extends RestClientBase {
): Promise<FeatureManagement.ContributedFeatureState> {
return this.beginRequest<FeatureManagement.ContributedFeatureState>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureManagement/FeatureStates/{userScope}/{featureId}",
routeValues: {
featureId: featureId,
@ -96,7 +96,7 @@ export class FeatureManagementRestClient extends RestClientBase {
};
return this.beginRequest<FeatureManagement.ContributedFeatureState>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/FeatureManagement/FeatureStates/{userScope}/{featureId}",
routeValues: {
@ -124,7 +124,7 @@ export class FeatureManagementRestClient extends RestClientBase {
): Promise<FeatureManagement.ContributedFeatureState> {
return this.beginRequest<FeatureManagement.ContributedFeatureState>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/FeatureManagement/FeatureStates/{userScope}/{scopeName}/{scopeValue}/{featureId}",
routeValues: {
featureId: featureId,
@ -162,7 +162,7 @@ export class FeatureManagementRestClient extends RestClientBase {
};
return this.beginRequest<FeatureManagement.ContributedFeatureState>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/FeatureManagement/FeatureStates/{userScope}/{scopeName}/{scopeValue}/{featureId}",
routeValues: {
@ -186,7 +186,7 @@ export class FeatureManagementRestClient extends RestClientBase {
): Promise<FeatureManagement.ContributedFeatureStateQuery> {
return this.beginRequest<FeatureManagement.ContributedFeatureStateQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/FeatureManagement/FeatureStatesQuery",
body: query
@ -205,7 +205,7 @@ export class FeatureManagementRestClient extends RestClientBase {
): Promise<FeatureManagement.ContributedFeatureStateQuery> {
return this.beginRequest<FeatureManagement.ContributedFeatureStateQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/FeatureManagement/FeatureStatesQuery/{userScope}",
routeValues: {
@ -231,7 +231,7 @@ export class FeatureManagementRestClient extends RestClientBase {
): Promise<FeatureManagement.ContributedFeatureStateQuery> {
return this.beginRequest<FeatureManagement.ContributedFeatureStateQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/FeatureManagement/FeatureStatesQuery/{userScope}/{scopeName}/{scopeValue}",
routeValues: {

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

@ -4,6 +4,25 @@
* ---------------------------------------------------------
*/
/**
* Compression type for file stored in Blobstore
*/
export enum BlobCompressionType {
None = 0,
GZip = 1
}
/**
* Represents an reference to a file in Blobstore
*/
export interface ContainerItemBlobReference {
artifactHash: string;
artifactId: number;
compressionType: BlobCompressionType;
scopeIdentifier: string;
sessionId: string;
}
/**
* Status of a container item.
*/
@ -112,6 +131,11 @@ export interface FileContainer {
* Represents an item in a container.
*/
export interface FileContainerItem {
/**
* Id for Blobstore reference
*/
artifactId: number;
blobMetadata: ContainerItemBlobReference;
/**
* Container Id.
*/

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

@ -16,7 +16,7 @@ export class FileContainerRestClient extends RestClientBase {
}
/**
* Creates the specified items in in the referenced container.
* Creates the specified items in the referenced container.
*
* @param items -
* @param containerId -
@ -33,7 +33,7 @@ export class FileContainerRestClient extends RestClientBase {
};
return this.beginRequest<FileContainer.FileContainerItem[]>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
method: "POST",
routeTemplate: "_apis/resources/Containers/{containerId}/{*itemPath}",
routeValues: {
@ -63,7 +63,7 @@ export class FileContainerRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
method: "DELETE",
routeTemplate: "_apis/resources/Containers/{containerId}/{*itemPath}",
routeValues: {
@ -90,7 +90,7 @@ export class FileContainerRestClient extends RestClientBase {
};
return this.beginRequest<FileContainer.FileContainer[]>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
routeTemplate: "_apis/resources/Containers/{containerId}/{*itemPath}",
queryParams: queryValues
});
@ -105,6 +105,9 @@ export class FileContainerRestClient extends RestClientBase {
* @param downloadFileName -
* @param includeDownloadTickets -
* @param isShallow -
* @param ignoreRequestedMediaType -
* @param includeBlobMetadata -
* @param saveAbsolutePath -
*/
public async getItems(
containerId: number,
@ -114,7 +117,10 @@ export class FileContainerRestClient extends RestClientBase {
format?: string,
downloadFileName?: string,
includeDownloadTickets?: boolean,
isShallow?: boolean
isShallow?: boolean,
ignoreRequestedMediaType?: boolean,
includeBlobMetadata?: boolean,
saveAbsolutePath?: boolean
): Promise<FileContainer.FileContainerItem[]> {
const queryValues: any = {
@ -124,11 +130,14 @@ export class FileContainerRestClient extends RestClientBase {
'$format': format,
downloadFileName: downloadFileName,
includeDownloadTickets: includeDownloadTickets,
isShallow: isShallow
isShallow: isShallow,
ignoreRequestedMediaType: ignoreRequestedMediaType,
includeBlobMetadata: includeBlobMetadata,
saveAbsolutePath: saveAbsolutePath
};
return this.beginRequest<FileContainer.FileContainerItem[]>({
apiVersion: "5.2-preview.4",
apiVersion: "7.1-preview.4",
routeTemplate: "_apis/resources/Containers/{containerId}/{*itemPath}",
routeValues: {
containerId: containerId

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

@ -172,7 +172,7 @@ export enum InputMode {
*/
export interface InputValidation {
/**
* Gets or sets the data data type to validate.
* Gets or sets the data type to validate.
*/
dataType: InputDataType;
/**

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

@ -23,7 +23,7 @@ export enum AcquisitionAssignmentType {
export interface AcquisitionOperation {
/**
* State of the the AcquisitionOperation for the current user
* State of the AcquisitionOperation for the current user
*/
operationState: AcquisitionOperationState;
/**
@ -235,6 +235,53 @@ export interface CustomerLastContact {
lastContactDate: Date;
}
/**
* An entity representing the data required to create a Customer Support Request.
*/
export interface CustomerSupportRequest {
/**
* Display name of extension in concern
*/
displayName: string;
/**
* Email of user making the support request
*/
emailId: string;
/**
* Extension name
*/
extensionName: string;
/**
* Link to the extension details page
*/
extensionURL: string;
/**
* User-provided support request message.
*/
message: string;
/**
* Publisher name
*/
publisherName: string;
/**
* Reason for support request
*/
reason: string;
reCaptchaToken: string;
/**
* VSID of the user making the support request
*/
reporterVSID: string;
/**
* Review under concern
*/
review: Review;
/**
* The UI source through which the request was made
*/
sourceLink: string;
}
export enum DraftPatchOperation {
Publish = 1,
Cancel = 2
@ -337,7 +384,7 @@ export interface ExtensionCategory {
*/
categoryName: string;
/**
* This parameter is obsolete. Refer to LanguageTitles for langauge specific titles
* This parameter is obsolete. Refer to LanguageTitles for language specific titles
*/
language: string;
/**
@ -419,6 +466,7 @@ export interface ExtensionDraftAsset extends ExtensionFile {
export interface ExtensionDraftPatch {
extensionData: UnpackagedExtensionData;
operation: DraftPatchOperation;
reCaptchaToken: string;
}
/**
@ -663,11 +711,11 @@ export enum ExtensionQueryFilterType {
*/
FeaturedInCategory = 11,
/**
* When retrieving extensions from a query, exclude the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be excluded. In case of mulitple flags to be specified, a logical OR of the interger values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag.
* When retrieving extensions from a query, exclude the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be excluded. In case of multiple flags to be specified, a logical OR of the interger values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag.
*/
ExcludeWithFlags = 12,
/**
* When retrieving extensions from a query, include the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of mulitple flags to be specified, a logical OR of the integer values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included.
* When retrieving extensions from a query, include the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included.
*/
IncludeWithFlags = 13,
/**
@ -695,13 +743,25 @@ export enum ExtensionQueryFilterType {
*/
PublisherDisplayName = 19,
/**
* When retrieving extensions from a query, include the extensions which have a publisher having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of mulitple flags to be specified, a logical OR of the integer values should be given as value for this filter There should be at most one filter of this type. This only acts as a restrictive filter after. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included.
* When retrieving extensions from a query, include the extensions which have a publisher having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter There should be at most one filter of this type. This only acts as a restrictive filter after. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included.
*/
IncludeWithPublisherFlags = 20,
/**
* Filter to get extensions shared with particular organization
*/
OrganizationSharedWith = 21
OrganizationSharedWith = 21,
/**
* Filter to get VS IDE extensions by Product Architecture
*/
ProductArchitecture = 22,
/**
* Filter to get VS Code extensions by target platform.
*/
TargetPlatform = 23,
/**
* Retrieve an extension based on the extensionName.
*/
ExtensionName = 24
}
/**
@ -772,6 +832,10 @@ export enum ExtensionQueryFlags {
* Include the details about which organizations the extension has been shared with if the extension is a private extension.
*/
IncludeSharedOrganizations = 16384,
/**
* Include the details if an extension is in conflict list or not Currently being used for VSCode extensions.
*/
IncludeNameConflictInfo = 32768,
/**
* AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required.
*/
@ -830,6 +894,7 @@ export interface ExtensionVersion {
flags: ExtensionVersionFlags;
lastUpdated: Date;
properties: { key: string; value: string }[];
targetPlatform: string;
validationResultMessage: string;
version: string;
versionDescription: string;
@ -861,7 +926,10 @@ export interface FilterCriteria {
}
export interface InstallationTarget {
extensionVersion: string;
productArchitecture: string;
target: string;
targetPlatform: string;
targetVersion: string;
}
@ -969,6 +1037,10 @@ export interface PublishedExtension {
installationTargets: InstallationTarget[];
lastUpdated: Date;
longDescription: string;
/**
* Check if Extension is in conflict list or not. Taking as String and not as boolean because we don't want end customer to see this flag and by making it Boolean it is coming as false for all the cases.
*/
presentInConflictList: string;
/**
* Date on which the extension was first uploaded.
*/
@ -1049,6 +1121,10 @@ export enum PublishedExtensionFlags {
export interface Publisher extends PublisherBase {
_links: any;
domain: string;
isDnsTokenVerified: boolean;
isDomainVerified: boolean;
reCaptchaToken: string;
}
/**
@ -1072,7 +1148,9 @@ export interface PublisherBase {
*/
export interface PublisherFacts {
displayName: string;
domain: string;
flags: PublisherFlags;
isDomainVerified: boolean;
publisherId: string;
publisherName: string;
}
@ -1375,7 +1453,7 @@ export interface QueryFilter {
*/
pageSize: number;
/**
* The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embeded in the token.
* The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embedded in the token.
*/
pagingToken: string;
/**
@ -1392,6 +1470,7 @@ export interface QueryFilter {
* The structure of the question / thread
*/
export interface Question extends QnAItem {
reCaptchaToken: string;
/**
* List of answers in for the question / thread
*/
@ -1424,6 +1503,7 @@ export interface RatingCountPerRating {
* The structure of a response
*/
export interface Response extends QnAItem {
reCaptchaToken: string;
}
/**
@ -1496,6 +1576,7 @@ export interface Review {
* Rating provided by the user
*/
rating: number;
reCaptchaToken: string;
/**
* Reply, if any, for this review
*/
@ -1876,3 +1957,9 @@ export interface UserReportedConcern {
*/
userId: string;
}
export enum VSCodeWebExtensionStatisicsType {
Install = 1,
Update = 2,
Uninstall = 3
}

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

@ -26,7 +26,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/extensions/{extensionId}/accounts/{accountName}",
routeValues: {
@ -46,7 +46,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/extensions/{extensionId}/accounts/{accountName}",
routeValues: {
@ -68,7 +68,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",
routeValues: {
@ -91,7 +91,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",
routeValues: {
@ -122,7 +122,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.AcquisitionOptions>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/acquisitionoptions/{itemId}",
routeValues: {
itemId: itemId
@ -139,7 +139,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionAcquisitionRequest> {
return this.beginRequest<Gallery.ExtensionAcquisitionRequest>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/acquisitionrequests",
body: acquisitionRequest
@ -171,7 +171,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assetbyname/{*assetType}",
routeValues: {
@ -210,7 +210,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/public/gallery/extensions/{extensionId}/{version}/assets/{assetType}",
routeValues: {
@ -247,7 +247,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assets/{*assetType}",
routeValues: {
@ -277,7 +277,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.AzurePublisher>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/azurepublisher",
routeValues: {
@ -295,7 +295,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.AzurePublisher> {
return this.beginRequest<Gallery.AzurePublisher>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/publishers/{publisherName}/azurepublisher",
routeValues: {
publisherName: publisherName
@ -315,7 +315,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/categories",
queryParams: queryValues
});
@ -338,7 +338,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.CategoriesResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/categories/{categoryName}",
routeValues: {
categoryName: categoryName
@ -355,6 +355,7 @@ export class GalleryRestClient extends RestClientBase {
* @param productVersion -
* @param skus -
* @param subSkus -
* @param productArchitecture -
*/
public async getCategoryTree(
product: string,
@ -363,7 +364,8 @@ export class GalleryRestClient extends RestClientBase {
source?: string,
productVersion?: string,
skus?: string,
subSkus?: string
subSkus?: string,
productArchitecture?: string
): Promise<Gallery.ProductCategory> {
const queryValues: any = {
@ -371,11 +373,12 @@ export class GalleryRestClient extends RestClientBase {
source: source,
productVersion: productVersion,
skus: skus,
subSkus: subSkus
subSkus: subSkus,
productArchitecture: productArchitecture
};
return this.beginRequest<Gallery.ProductCategory>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/{product}/categories/{categoryId}",
routeValues: {
product: product,
@ -411,7 +414,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.ProductCategoriesResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/{product}/categories/root",
routeValues: {
product: product
@ -432,7 +435,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/certificates/{version}",
routeValues: {
@ -453,7 +456,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/contentverificationlog",
routeValues: {
@ -463,6 +466,21 @@ export class GalleryRestClient extends RestClientBase {
});
}
/**
* @param customerSupportRequest -
*/
public async createSupportRequest(
customerSupportRequest: Gallery.CustomerSupportRequest
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/public/support",
body: customerSupportRequest
});
}
/**
* @param publisherName -
* @param extensionName -
@ -473,7 +491,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraft> {
return this.beginRequest<Gallery.ExtensionDraft>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
routeValues: {
@ -497,7 +515,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraft> {
return this.beginRequest<Gallery.ExtensionDraft>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
routeValues: {
@ -525,7 +543,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraft> {
return this.beginRequest<Gallery.ExtensionDraft>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
routeValues: {
@ -558,7 +576,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraftAsset> {
return this.beginRequest<Gallery.ExtensionDraftAsset>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}/assets/{*assetType}",
routeValues: {
@ -589,7 +607,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraft> {
return this.beginRequest<Gallery.ExtensionDraft>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
routeValues: {
@ -617,7 +635,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraft> {
return this.beginRequest<Gallery.ExtensionDraft>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
routeValues: {
@ -642,7 +660,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraft> {
return this.beginRequest<Gallery.ExtensionDraft>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
routeValues: {
@ -672,7 +690,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDraftAsset> {
return this.beginRequest<Gallery.ExtensionDraftAsset>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
routeValues: {
@ -706,7 +724,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
routeValues: {
@ -730,7 +748,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
routeValues: {
@ -768,7 +786,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.ExtensionEvents>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/events",
routeValues: {
publisherName: publisherName,
@ -788,7 +806,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/events",
body: extensionEvents
@ -811,7 +829,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.ExtensionQueryResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/public/gallery/extensionquery",
customHeaders: {
@ -824,18 +842,28 @@ export class GalleryRestClient extends RestClientBase {
/**
* @param content - Content to upload
* @param extensionType -
* @param reCaptchaToken -
*/
public async createExtension(
content: any
content: any,
extensionType?: string,
reCaptchaToken?: string
): Promise<Gallery.PublishedExtension> {
const queryValues: any = {
extensionType: extensionType,
reCaptchaToken: reCaptchaToken
};
return this.beginRequest<Gallery.PublishedExtension>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "_apis/gallery/extensions/{extensionId}",
customHeaders: {
"Content-Type": "application/octet-stream",
},
queryParams: queryValues,
body: content,
isRawData: true
});
@ -855,7 +883,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/gallery/extensions/{extensionId}",
routeValues: {
@ -882,7 +910,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.PublishedExtension>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/gallery/extensions/{extensionId}",
routeValues: {
extensionId: extensionId
@ -893,32 +921,48 @@ export class GalleryRestClient extends RestClientBase {
/**
* @param extensionId -
* @param reCaptchaToken -
*/
public async updateExtensionById(
extensionId: string
extensionId: string,
reCaptchaToken?: string
): Promise<Gallery.PublishedExtension> {
const queryValues: any = {
reCaptchaToken: reCaptchaToken
};
return this.beginRequest<Gallery.PublishedExtension>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "_apis/gallery/extensions/{extensionId}",
routeValues: {
extensionId: extensionId
}
},
queryParams: queryValues
});
}
/**
* @param content - Content to upload
* @param publisherName -
* @param extensionType -
* @param reCaptchaToken -
*/
public async createExtensionWithPublisher(
content: any,
publisherName: string
publisherName: string,
extensionType?: string,
reCaptchaToken?: string
): Promise<Gallery.PublishedExtension> {
const queryValues: any = {
extensionType: extensionType,
reCaptchaToken: reCaptchaToken
};
return this.beginRequest<Gallery.PublishedExtension>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
routeValues: {
@ -927,6 +971,7 @@ export class GalleryRestClient extends RestClientBase {
customHeaders: {
"Content-Type": "application/octet-stream",
},
queryParams: queryValues,
body: content,
isRawData: true
});
@ -948,7 +993,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
routeValues: {
@ -983,7 +1028,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.PublishedExtension>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
routeValues: {
publisherName: publisherName,
@ -1002,21 +1047,27 @@ export class GalleryRestClient extends RestClientBase {
* @param content - Content to upload
* @param publisherName - Name of the publisher
* @param extensionName - Name of the extension
* @param extensionType -
* @param reCaptchaToken -
* @param bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not
*/
public async updateExtension(
content: any,
publisherName: string,
extensionName: string,
extensionType?: string,
reCaptchaToken?: string,
bypassScopeCheck?: boolean
): Promise<Gallery.PublishedExtension> {
const queryValues: any = {
extensionType: extensionType,
reCaptchaToken: reCaptchaToken,
bypassScopeCheck: bypassScopeCheck
};
return this.beginRequest<Gallery.PublishedExtension>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
routeValues: {
@ -1048,7 +1099,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.PublishedExtension>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
routeValues: {
@ -1073,7 +1124,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",
routeValues: {
@ -1099,7 +1150,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",
routeValues: {
@ -1119,7 +1170,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/extensionValidator",
body: azureRestApiRequestModel
@ -1136,7 +1187,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/notifications",
body: notificationData
@ -1168,7 +1219,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/package",
routeValues: {
@ -1210,7 +1261,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/privateasset/{assetToken}/{*assetType}",
routeValues: {
@ -1243,7 +1294,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
routeValues: {
@ -1269,7 +1320,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
routeValues: {
@ -1299,7 +1350,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<{ [key: string] : string; }>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
routeValues: {
@ -1315,6 +1366,39 @@ export class GalleryRestClient extends RestClientBase {
});
}
/**
* @param publisherName -
*/
public async fetchDomainToken(
publisherName: string
): Promise<string> {
return this.beginRequest<string>({
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/publishers/{publisherName}/verify/token",
routeValues: {
publisherName: publisherName
}
});
}
/**
* @param publisherName -
*/
public async verifyDomainToken(
publisherName: string
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}/verify/token",
routeValues: {
publisherName: publisherName
}
});
}
/**
* @param publisherQuery -
*/
@ -1323,7 +1407,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.PublisherQueryResult> {
return this.beginRequest<Gallery.PublisherQueryResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/public/gallery/publisherquery",
body: publisherQuery
@ -1338,7 +1422,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Publisher> {
return this.beginRequest<Gallery.Publisher>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{publisherName}",
body: publisher
@ -1353,7 +1437,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/publishers/{publisherName}",
routeValues: {
@ -1376,7 +1460,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.Publisher>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/publishers/{publisherName}",
routeValues: {
publisherName: publisherName
@ -1395,7 +1479,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Publisher> {
return this.beginRequest<Gallery.Publisher>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/gallery/publishers/{publisherName}",
routeValues: {
@ -1423,7 +1507,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.PublisherRoleAssignment[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{publisherName}",
routeValues: {
@ -1434,6 +1518,22 @@ export class GalleryRestClient extends RestClientBase {
});
}
/**
* @param publisherName -
*/
public async getPublisherWithoutToken(
publisherName: string
): Promise<Gallery.Publisher> {
return this.beginRequest<Gallery.Publisher>({
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/publisherWithoutToken/{publisherName}",
routeValues: {
publisherName: publisherName
}
});
}
/**
* Returns a list of questions with their responses associated with an extension.
*
@ -1458,7 +1558,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.QuestionsResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/qna",
routeValues: {
publisherName: publisherName,
@ -1484,7 +1584,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Concern> {
return this.beginRequest<Gallery.Concern>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/qna/{questionId}/concern",
routeValues: {
@ -1510,7 +1610,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Question> {
return this.beginRequest<Gallery.Question>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
routeValues: {
@ -1535,7 +1635,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
routeValues: {
@ -1562,7 +1662,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Question> {
return this.beginRequest<Gallery.Question>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
routeValues: {
@ -1590,7 +1690,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Response> {
return this.beginRequest<Gallery.Response>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
routeValues: {
@ -1618,7 +1718,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
routeValues: {
@ -1648,7 +1748,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Response> {
return this.beginRequest<Gallery.Response>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
routeValues: {
@ -1685,7 +1785,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<any>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/reports",
routeValues: {
publisherName: publisherName,
@ -1722,7 +1822,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.ReviewsResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/reviews",
routeValues: {
publisherName: publisherName,
@ -1753,7 +1853,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.ReviewSummary>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/publishers/{pubName}/extensions/{extName}/reviews/summary",
routeValues: {
pubName: pubName,
@ -1777,7 +1877,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.Review> {
return this.beginRequest<Gallery.Review>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
routeValues: {
@ -1791,7 +1891,7 @@ export class GalleryRestClient extends RestClientBase {
/**
* Deletes a review
*
* @param pubName - Name of the pubilsher who published the extension
* @param pubName - Name of the publisher who published the extension
* @param extName - Name of the extension
* @param reviewId - Id of the review which needs to be updated
*/
@ -1802,7 +1902,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
routeValues: {
@ -1817,7 +1917,7 @@ export class GalleryRestClient extends RestClientBase {
* Updates or Flags a review
*
* @param reviewPatch - ReviewPatch object which contains the changes to be applied to the review
* @param pubName - Name of the pubilsher who published the extension
* @param pubName - Name of the publisher who published the extension
* @param extName - Name of the extension
* @param reviewId - Id of the review which needs to be updated
*/
@ -1829,7 +1929,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ReviewPatch> {
return this.beginRequest<Gallery.ReviewPatch>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
routeValues: {
@ -1849,7 +1949,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionCategory> {
return this.beginRequest<Gallery.ExtensionCategory>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/categories",
body: category
@ -1868,7 +1968,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<{ [key: string] : any; }> {
return this.beginRequest<{ [key: string] : any; }>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/settings/{userScope}/{*key}",
routeValues: {
userScope: userScope,
@ -1889,7 +1989,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/gallery/settings/{userScope}/{*key}",
routeValues: {
@ -1913,7 +2013,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/gallery/signingkey/{keyType}",
routeValues: {
@ -1931,7 +2031,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<string> {
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/signingkey/{keyType}",
routeValues: {
keyType: keyType
@ -1951,7 +2051,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/statistics",
routeValues: {
@ -1984,7 +2084,7 @@ export class GalleryRestClient extends RestClientBase {
};
return this.beginRequest<Gallery.ExtensionDailyStats>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/stats",
routeValues: {
publisherName: publisherName,
@ -2008,7 +2108,7 @@ export class GalleryRestClient extends RestClientBase {
): Promise<Gallery.ExtensionDailyStats> {
return this.beginRequest<Gallery.ExtensionDailyStats>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",
routeValues: {
publisherName: publisherName,
@ -2025,20 +2125,23 @@ export class GalleryRestClient extends RestClientBase {
* @param extensionName - Name of the extension
* @param version - Version of the extension
* @param statType - Type of stat to increment
* @param targetPlatform -
*/
public async incrementExtensionDailyStat(
publisherName: string,
extensionName: string,
version: string,
statType: string
statType: string,
targetPlatform?: string
): Promise<void> {
const queryValues: any = {
statType: statType
statType: statType,
targetPlatform: targetPlatform
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",
routeValues: {
@ -2054,21 +2157,51 @@ export class GalleryRestClient extends RestClientBase {
* @param publisherName -
* @param extensionName -
* @param version -
* @param targetPlatform -
*/
public async getVerificationLog(
publisherName: string,
extensionName: string,
version: string
version: string,
targetPlatform?: string
): Promise<ArrayBuffer> {
const queryValues: any = {
targetPlatform: targetPlatform
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/verificationlog",
routeValues: {
publisherName: publisherName,
extensionName: extensionName,
version: version
},
queryParams: queryValues
});
}
/**
* @param itemName -
* @param version -
* @param statType -
*/
public async updateVSCodeWebExtensionStatistics(
itemName: string,
version: string,
statType: Gallery.VSCodeWebExtensionStatisicsType
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/public/gallery/itemName/{itemName}/version/{version}/statType/{statType}/vscodewebextension",
routeValues: {
itemName: itemName,
version: version,
statType: statType
}
});
}

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

@ -830,6 +830,10 @@ export interface GitCommitRef {
* Committer of the commit.
*/
committer: GitUserDate;
/**
* Indicates that commit contains too many changes to be displayed
*/
commitTooManyChanges: boolean;
/**
* An enumeration of the parent commit IDs for this commit.
*/
@ -1469,7 +1473,9 @@ export interface GitMergeOperationStatusDetail {
}
export interface GitMergeOriginRef {
cherryPickId: number;
pullRequestId: number;
revertId: number;
}
/**
@ -1595,6 +1601,10 @@ export interface GitPullRequest {
* If this is a PR from a fork this will contain information about its source.
*/
forkSource: GitForkRef;
/**
* Multiple mergebases warning
*/
hasMultipleMergeBases: boolean;
/**
* Draft / WIP pull request.
*/
@ -1723,6 +1733,10 @@ export interface GitPullRequestCommentThreadContext {
* Preferences about how the pull request should be completed.
*/
export interface GitPullRequestCompletionOptions {
/**
* List of any policy configuration Id's which auto-complete should not wait for. Only applies to optional policies (isBlocking == false). Auto-complete always waits for required policies (isBlocking == true).
*/
autoCompleteIgnoreConfigIds: number[];
/**
* If true, policies will be explicitly bypassed while the pull request is completed.
*/
@ -1740,11 +1754,11 @@ export interface GitPullRequestCompletionOptions {
*/
mergeCommitMessage: string;
/**
* Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squash if SquashMerge == true. The SquashMerge member is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge member will be ignored.
* Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squashed if SquashMerge == true. The SquashMerge property is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge property will be ignored.
*/
mergeStrategy: GitPullRequestMergeStrategy;
/**
* SquashMerge is deprecated. You should explicity set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true.
* SquashMerge is deprecated. You should explicitly set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true.
*/
squashMerge: boolean;
/**
@ -1849,6 +1863,10 @@ export interface GitPullRequestIterationChanges {
* The options which are used when a pull request merge is created.
*/
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;
detectRenameFalsePositives: boolean;
/**
* If true, rename detection will not be performed during the merge.
@ -2094,6 +2112,10 @@ export interface GitQueryCommitsCriteria {
* If provided, identifies the commit or branch to search
*/
itemVersion: GitVersionDescriptor;
/**
* If enabled, this option will ignore the itemVersion and compareVersion parameters
*/
showOldestCommitsFirst: boolean;
/**
* If provided, an upper bound for filtering commits alphabetically
*/
@ -2297,9 +2319,17 @@ export interface GitRepository {
defaultBranch: string;
id: string;
/**
* True if the repository was created as a fork
* True if the repository is disabled. False otherwise.
*/
isDisabled: boolean;
/**
* True if the repository was created as a fork.
*/
isFork: boolean;
/**
* True if the repository is in maintenance. False otherwise.
*/
isInMaintenance: boolean;
name: string;
parentRepository: GitRepositoryRef;
project: TfsCore.TeamProjectReference;
@ -2578,7 +2608,7 @@ export interface GitTreeDiff {
*/
baseTreeId: string;
/**
* List of tree entries that differ between the base and target tree. Renames and object type changes are returned as a delete for the old object and add for the new object. If a continuation token is returned in the response header, some tree entries are yet to be processed and may yeild more diff entries. If the continuation token is not returned all the diff entries have been included in this response.
* List of tree entries that differ between the base and target tree. Renames and object type changes are returned as a delete for the old object and add for the new object. If a continuation token is returned in the response header, some tree entries are yet to be processed and may yield more diff entries. If the continuation token is not returned all the diff entries have been included in this response.
*/
diffEntries: GitTreeDiffEntry[];
/**
@ -2779,6 +2809,10 @@ export interface HistoryEntry<T> {
* Identity information including a vote on a pull request.
*/
export interface IdentityRefWithVote extends WebApi.IdentityRef {
/**
* Indicates if this reviewer has declined to review this pull request.
*/
hasDeclined: boolean;
/**
* Indicates if this reviewer is flagged for attention on this pull request.
*/
@ -2796,7 +2830,7 @@ export interface IdentityRefWithVote extends WebApi.IdentityRef {
*/
vote: number;
/**
* Groups or teams that that this reviewer contributed to. \<br /\> Groups and teams can be reviewers on pull requests but can not vote directly. When a member of the group or team votes, that vote is rolled up into the group or team vote. VotedFor is a list of such votes.
* Groups or teams that this reviewer contributed to. \<br /\> Groups and teams can be reviewers on pull requests but can not vote directly. When a member of the group or team votes, that vote is rolled up into the group or team vote. VotedFor is a list of such votes.
*/
votedFor: IdentityRefWithVote[];
}
@ -2864,7 +2898,8 @@ export enum IterationReason {
Create = 2,
Rebase = 4,
Unknown = 8,
Retarget = 16
Retarget = 16,
ResolveConflicts = 32
}
/**
@ -3012,7 +3047,7 @@ export enum PullRequestStatus {
*/
Completed = 3,
/**
* Used in pull request search criterias to include all statuses.
* Used in pull request search criteria to include all statuses.
*/
All = 4
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -6,6 +6,22 @@
import * as Identities from "../Identities/Identities";
export interface AadGraphMember extends GraphMember {
/**
* The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the \@ sign. For GitHub users, this corresponds to the GitHub user handle.
*/
directoryAlias: string;
/**
* When true, the group has been deleted in the identity provider
*/
isDeletedInOrigin: boolean;
metadataUpdateDate: Date;
/**
* The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values.
*/
metaType: string;
}
export interface GraphCachePolicies {
/**
* Size of the cache
@ -270,6 +286,50 @@ export interface GraphScopeCreationContext {
storageKey: string;
}
export interface GraphServicePrincipal extends AadGraphMember {
applicationId: string;
}
/**
* Do not attempt to use this type to create a new service principal. Use one of the subclasses instead. This type does not contain sufficient fields to create a new service principal.
*/
export interface GraphServicePrincipalCreationContext {
/**
* Optional: If provided, we will use this identifier for the storage key of the created service principal
*/
storageKey: string;
}
/**
* Use this type to create a new service principal using the OriginID as a reference to an existing service principal from an external AAD backed provider. This is the subset of GraphServicePrincipal fields required for creation of a GraphServicePrincipal for the AAD use case when looking up the service principal by its unique ID in the backing provider.
*/
export interface GraphServicePrincipalOriginIdCreationContext extends GraphServicePrincipalCreationContext {
/**
* This should be the object id of the service principal from the AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Team Services will communicate with the source provider to fill all other fields on creation.
*/
originId: string;
}
/**
* Use this type to update an existing service principal using the OriginID as a reference to an existing service principal from an external AAD backed provider. This is the subset of GraphServicePrincipal fields required for creation of a GraphServicePrincipal for AAD use case when looking up the service principal by its unique ID in the backing provider.
*/
export interface GraphServicePrincipalOriginIdUpdateContext extends GraphServicePrincipalUpdateContext {
/**
* This should be the object id or sid of the service principal from the source AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Azure Devops will communicate with the source provider to fill all other fields on creation.
*/
originId: string;
}
/**
* Do not attempt to use this type to update service principal. Use one of the subclasses instead. This type does not contain sufficient fields to create a new service principal.
*/
export interface GraphServicePrincipalUpdateContext {
/**
* Storage key should not be specified in case of updating service principal
*/
storageKey: string;
}
/**
* Storage key of a Graph entity
*/
@ -360,23 +420,7 @@ export enum GraphTraversalDirection {
Up = 2
}
/**
* Graph user entity
*/
export interface GraphUser extends GraphMember {
/**
* The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the \@ sign. For GitHub users, this corresponds to the GitHub user handle.
*/
directoryAlias: string;
/**
* When true, the group has been deleted in the identity provider
*/
isDeletedInOrigin: boolean;
metadataUpdateDate: Date;
/**
* The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values.
*/
metaType: string;
export interface GraphUser extends AadGraphMember {
}
/**
@ -393,6 +437,9 @@ export interface GraphUserCreationContext {
* Use this type to create a new user using the mail address 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 mail address in the backing provider.
*/
export interface GraphUserMailAddressCreationContext extends GraphUserCreationContext {
/**
* This should be the mail address of the user in the source AD or AAD provider. Example: Jamal.Hartnett\@contoso.com Team Services will communicate with the source provider to fill all other fields on creation.
*/
mailAddress: string;
}
@ -430,6 +477,16 @@ export interface GraphUserPrincipalNameCreationContext extends GraphUserCreation
principalName: string;
}
/**
* Use this type for transfering identity rights, for instance after performing a Tenant switch.
*/
export interface GraphUserPrincipalNameUpdateContext extends GraphUserUpdateContext {
/**
* This should be Principal Name (UPN) to which we want to transfer rights. Example: destination\@email.com
*/
principalName: string;
}
/**
* Do not attempt to use this type to update user. Use one of the subclasses instead. This type does not contain sufficient fields to create a new user.
*/
@ -440,6 +497,20 @@ export interface GraphUserUpdateContext {
storageKey: string;
}
export interface IdentityMapping {
source: UserPrincipalName;
target: UserPrincipalName;
}
export interface IdentityMappings {
mappings: IdentityMapping[];
}
export interface MappingResult {
code: string;
errorMessage: string;
}
export interface PagedGraphGroups {
/**
* This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request.
@ -451,6 +522,17 @@ export interface PagedGraphGroups {
graphGroups: GraphGroup[];
}
export interface PagedGraphServicePrincipals {
/**
* This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request.
*/
continuationToken: string[];
/**
* The enumerable list of service principals found within a page.
*/
graphServicePrincipals: GraphServicePrincipal[];
}
export interface PagedGraphUsers {
/**
* This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request.
@ -464,5 +546,16 @@ export interface PagedGraphUsers {
export interface RequestAccessPayLoad {
message: string;
projectUri: string;
urlRequested: string;
}
export interface ResolveDisconnectedUsersResponse {
code: string;
errorMessage: string;
mappingResults: MappingResult[];
}
export interface UserPrincipalName {
principalName: string;
}

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

@ -26,7 +26,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/Graph/Subjects/{subjectDescriptor}/Avatars",
routeValues: {
@ -52,7 +52,7 @@ export class GraphRestClient extends RestClientBase {
};
return this.beginRequest<Profile.Avatar>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Subjects/{subjectDescriptor}/Avatars",
routeValues: {
subjectDescriptor: subjectDescriptor
@ -71,7 +71,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/Graph/Subjects/{subjectDescriptor}/Avatars",
routeValues: {
@ -87,7 +87,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphCachePolicies> {
return this.beginRequest<Graph.GraphCachePolicies>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/CachePolicies"
});
}
@ -102,7 +102,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphDescriptorResult> {
return this.beginRequest<Graph.GraphDescriptorResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Descriptors/{storageKey}",
routeValues: {
storageKey: storageKey
@ -129,7 +129,7 @@ export class GraphRestClient extends RestClientBase {
};
return this.beginRequest<Graph.GraphFederatedProviderData>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/FederatedProviderData/{subjectDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor
@ -157,7 +157,7 @@ export class GraphRestClient extends RestClientBase {
};
return this.beginRequest<Graph.GraphGroup>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/Groups/{groupDescriptor}",
queryParams: queryValues,
@ -175,7 +175,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/Graph/Groups/{groupDescriptor}",
routeValues: {
@ -194,7 +194,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphGroup> {
return this.beginRequest<Graph.GraphGroup>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Groups/{groupDescriptor}",
routeValues: {
groupDescriptor: groupDescriptor
@ -214,7 +214,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphGroup> {
return this.beginRequest<Graph.GraphGroup>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/Graph/Groups/{groupDescriptor}",
routeValues: {
@ -227,6 +227,29 @@ export class GraphRestClient extends RestClientBase {
});
}
/**
* Identity Translation - Translate endpoint is supposed to be used by geneva action.
*
* @param masterId -
* @param localId -
*/
public async translate(
masterId?: string,
localId?: string
): Promise<string> {
const queryValues: any = {
masterId: masterId,
localId: localId
};
return this.beginRequest<string>({
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/IdentityTranslation",
queryParams: queryValues
});
}
/**
* @param memberLookup -
*/
@ -235,7 +258,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<{ [key: string] : Graph.GraphMember; }> {
return this.beginRequest<{ [key: string] : Graph.GraphMember; }>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/MemberLookup",
body: memberLookup
@ -252,7 +275,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphMember> {
return this.beginRequest<Graph.GraphMember>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Members/{memberDescriptor}",
routeValues: {
memberDescriptor: memberDescriptor
@ -272,7 +295,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphMembership> {
return this.beginRequest<Graph.GraphMembership>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/Graph/Memberships/{subjectDescriptor}/{containerDescriptor}",
routeValues: {
@ -294,13 +317,14 @@ export class GraphRestClient extends RestClientBase {
): Promise<boolean> {
return this.beginRequest<Response>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "HEAD",
routeTemplate: "_apis/Graph/Memberships/{subjectDescriptor}/{containerDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor,
containerDescriptor: containerDescriptor
}
},
returnRawResponse: true
}).then(async response => {
return true;
}).catch((error) => {
@ -323,7 +347,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphMembership> {
return this.beginRequest<Graph.GraphMembership>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Memberships/{subjectDescriptor}/{containerDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor,
@ -344,7 +368,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/Graph/Memberships/{subjectDescriptor}/{containerDescriptor}",
routeValues: {
@ -373,7 +397,7 @@ export class GraphRestClient extends RestClientBase {
};
return this.beginRequest<Graph.GraphMembership[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Memberships/{subjectDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor
@ -392,7 +416,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphMembershipState> {
return this.beginRequest<Graph.GraphMembershipState>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/MembershipStates/{subjectDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor
@ -419,7 +443,7 @@ export class GraphRestClient extends RestClientBase {
};
return this.beginRequest<{ [key: string] : Graph.GraphMembershipTraversal; }>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/MembershipTraversals/{subjectDescriptor}",
queryParams: queryValues,
@ -446,7 +470,7 @@ export class GraphRestClient extends RestClientBase {
};
return this.beginRequest<Graph.GraphMembershipTraversal>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/MembershipTraversals/{subjectDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor
@ -463,7 +487,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphProviderInfo> {
return this.beginRequest<Graph.GraphProviderInfo>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Users/{userDescriptor}/ProviderInfo",
routeValues: {
userDescriptor: userDescriptor
@ -479,13 +503,30 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/RequestAccess",
body: jsondocument
});
}
/**
* Batch-map a list of users to new users.
*
* @param mappings - A list of mappings.
*/
public async resolve(
mappings: Graph.IdentityMappings
): Promise<Graph.ResolveDisconnectedUsersResponse> {
return this.beginRequest<Graph.ResolveDisconnectedUsersResponse>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/ResolveDisconnectedUsers",
body: mappings
});
}
/**
* @param creationContext -
* @param scopeDescriptor -
@ -496,7 +537,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphScope> {
return this.beginRequest<Graph.GraphScope>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/Scopes/{scopeDescriptor}",
routeValues: {
@ -514,7 +555,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/Graph/Scopes/{scopeDescriptor}",
routeValues: {
@ -533,7 +574,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphScope> {
return this.beginRequest<Graph.GraphScope>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Scopes/{scopeDescriptor}",
routeValues: {
scopeDescriptor: scopeDescriptor
@ -551,7 +592,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/Graph/Scopes/{scopeDescriptor}",
routeValues: {
@ -564,6 +605,89 @@ export class GraphRestClient extends RestClientBase {
});
}
/**
* Materialize an existing AAD service principal into the ADO account.
*
* @param creationContext - The subset of the full graph service principal used to uniquely find the graph subject in an external provider.
* @param groupDescriptors - A comma separated list of descriptors of groups you want the graph service principal to join
*/
public async createServicePrincipal(
creationContext: Graph.GraphServicePrincipalCreationContext,
groupDescriptors?: string[]
): Promise<Graph.GraphServicePrincipal> {
const queryValues: any = {
groupDescriptors: groupDescriptors && groupDescriptors.join(",")
};
return this.beginRequest<Graph.GraphServicePrincipal>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/ServicePrincipals/{servicePrincipalDescriptor}",
queryParams: queryValues,
body: creationContext
});
}
/**
* Disables a service principal.
*
* @param servicePrincipalDescriptor - The descriptor of the service principal to delete.
*/
public async deleteServicePrincipal(
servicePrincipalDescriptor: string
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/Graph/ServicePrincipals/{servicePrincipalDescriptor}",
routeValues: {
servicePrincipalDescriptor: servicePrincipalDescriptor
}
});
}
/**
* Get a service principal by its descriptor.
*
* @param servicePrincipalDescriptor - The descriptor of the desired service principal.
*/
public async getServicePrincipal(
servicePrincipalDescriptor: string
): Promise<Graph.GraphServicePrincipal> {
return this.beginRequest<Graph.GraphServicePrincipal>({
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/ServicePrincipals/{servicePrincipalDescriptor}",
routeValues: {
servicePrincipalDescriptor: servicePrincipalDescriptor
}
});
}
/**
* Map an existing service principal to a different service principal.
*
* @param updateContext - The subset of the full graph service principal used to uniquely find the graph subject in an external provider.
* @param servicePrincipalDescriptor - The descriptor of the service principal to update
*/
public async updateServicePrincipal(
updateContext: Graph.GraphServicePrincipalUpdateContext,
servicePrincipalDescriptor: string
): Promise<Graph.GraphServicePrincipal> {
return this.beginRequest<Graph.GraphServicePrincipal>({
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/Graph/ServicePrincipals/{servicePrincipalDescriptor}",
routeValues: {
servicePrincipalDescriptor: servicePrincipalDescriptor
},
body: updateContext
});
}
/**
* Resolve a descriptor to a storage key.
*
@ -574,7 +698,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphStorageKeyResult> {
return this.beginRequest<Graph.GraphStorageKeyResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/StorageKeys/{subjectDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor
@ -592,7 +716,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<{ [key: string] : Graph.GraphSubject; }> {
return this.beginRequest<{ [key: string] : Graph.GraphSubject; }>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/SubjectLookup",
body: subjectLookup
@ -609,7 +733,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphSubject[]> {
return this.beginRequest<Graph.GraphSubject[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/SubjectQuery",
body: subjectQuery
@ -624,7 +748,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphSubject> {
return this.beginRequest<Graph.GraphSubject>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Subjects/{subjectDescriptor}",
routeValues: {
subjectDescriptor: subjectDescriptor
@ -648,7 +772,7 @@ export class GraphRestClient extends RestClientBase {
};
return this.beginRequest<Graph.GraphUser>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Graph/Users/{userDescriptor}",
queryParams: queryValues,
@ -666,7 +790,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/Graph/Users/{userDescriptor}",
routeValues: {
@ -685,7 +809,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphUser> {
return this.beginRequest<Graph.GraphUser>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Graph/Users/{userDescriptor}",
routeValues: {
userDescriptor: userDescriptor
@ -694,10 +818,10 @@ export class GraphRestClient extends RestClientBase {
}
/**
* Map an existing user to a different identity
* Map an existing user to a different user.
*
* @param updateContext - The subset of the full graph user used to uniquely find the graph subject in an external provider.
* @param userDescriptor - the descriptor of the user to update
* @param userDescriptor - The descriptor of the user to update
*/
public async updateUser(
updateContext: Graph.GraphUserUpdateContext,
@ -705,7 +829,7 @@ export class GraphRestClient extends RestClientBase {
): Promise<Graph.GraphUser> {
return this.beginRequest<Graph.GraphUser>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/Graph/Users/{userDescriptor}",
routeValues: {

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

@ -92,10 +92,22 @@ export interface IdentityBase {
*/
customDisplayName: string;
descriptor: IdentityDescriptor;
/**
* Identity Identifier. Also called Storage Key, or VSID
*/
id: string;
/**
* True if the identity has a membership in any Azure Devops group in the organization.
*/
isActive: boolean;
/**
* True if the identity is a group.
*/
isContainer: boolean;
masterId: string;
/**
* Id of the members of the identity (groups only).
*/
memberIds: string[];
memberOf: IdentityDescriptor[];
members: IdentityDescriptor[];
@ -107,6 +119,9 @@ export interface IdentityBase {
providerDisplayName: string;
resourceVersion: number;
socialDescriptor: string;
/**
* Subject descriptor of a Graph entity.
*/
subjectDescriptor: string;
uniqueUserId: number;
}

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

@ -35,7 +35,7 @@ export class LocationsRestClient extends RestClientBase {
};
return this.beginRequest<Locations.ConnectionData>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ConnectionData",
queryParams: queryValues
});
@ -58,7 +58,7 @@ export class LocationsRestClient extends RestClientBase {
};
return this.beginRequest<Locations.ResourceAreaInfo>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ResourceAreas/{areaId}",
routeValues: {
areaId: areaId
@ -81,7 +81,7 @@ export class LocationsRestClient extends RestClientBase {
};
return this.beginRequest<Locations.ResourceAreaInfo>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ResourceAreas/{areaId}",
routeValues: {
areaId: areaId
@ -105,7 +105,7 @@ export class LocationsRestClient extends RestClientBase {
};
return this.beginRequest<Locations.ResourceAreaInfo[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ResourceAreas/{areaId}",
queryParams: queryValues
});
@ -123,7 +123,7 @@ export class LocationsRestClient extends RestClientBase {
};
return this.beginRequest<Locations.ResourceAreaInfo[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ResourceAreas/{areaId}",
queryParams: queryValues
});
@ -139,7 +139,7 @@ export class LocationsRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/ServiceDefinitions/{serviceType}/{identifier}",
routeValues: {
@ -170,7 +170,7 @@ export class LocationsRestClient extends RestClientBase {
};
return this.beginRequest<Locations.ServiceDefinition>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ServiceDefinitions/{serviceType}/{identifier}",
routeValues: {
serviceType: serviceType,
@ -188,7 +188,7 @@ export class LocationsRestClient extends RestClientBase {
): Promise<Locations.ServiceDefinition[]> {
return this.beginRequest<Locations.ServiceDefinition[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/ServiceDefinitions/{serviceType}/{identifier}",
routeValues: {
serviceType: serviceType
@ -204,7 +204,7 @@ export class LocationsRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/ServiceDefinitions/{serviceType}/{identifier}",
body: serviceDefinitions

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

@ -792,7 +792,7 @@ export interface NotificationSubscription {
*/
subscriber: WebApi.IdentityRef;
/**
* REST API URL of the subscriotion.
* REST API URL of the subscription.
*/
url: string;
/**
@ -989,7 +989,7 @@ export interface SubscriptionChannelWithAddress {
}
/**
* Contains all the diagonstics settings for a subscription.
* Contains all the diagnostics settings for a subscription.
*/
export interface SubscriptionDiagnostics {
/**
@ -1176,7 +1176,7 @@ export interface SubscriptionQueryCondition {
*/
filter: ISubscriptionFilter;
/**
* Flags to specify the the type subscriptions to query for.
* Flags to specify the type subscriptions to query for.
*/
flags: SubscriptionFlags;
/**

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

@ -23,7 +23,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/notification/BatchNotificationOperations",
body: operation
@ -51,7 +51,7 @@ export class NotificationRestClient extends RestClientBase {
};
return this.beginRequest<Notification.INotificationDiagnosticLog[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/DiagnosticLogs/{source}/entries/{entryId}",
routeValues: {
source: source,
@ -71,7 +71,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.SubscriptionDiagnostics> {
return this.beginRequest<Notification.SubscriptionDiagnostics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/subscriptions/{subscriptionId}/diagnostics",
routeValues: {
subscriptionId: subscriptionId
@ -91,7 +91,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.SubscriptionDiagnostics> {
return this.beginRequest<Notification.SubscriptionDiagnostics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/notification/subscriptions/{subscriptionId}/diagnostics",
routeValues: {
@ -111,7 +111,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<WebApi.VssNotificationEvent> {
return this.beginRequest<WebApi.VssNotificationEvent>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/notification/Events",
body: notificationEvent
@ -128,7 +128,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.EventTransformResult> {
return this.beginRequest<Notification.EventTransformResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/notification/EventTransforms",
body: transformRequest
@ -145,7 +145,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationEventField[]> {
return this.beginRequest<Notification.NotificationEventField[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/notification/eventTypes/{eventType}/fieldValuesQuery",
routeValues: {
@ -165,7 +165,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationEventType> {
return this.beginRequest<Notification.NotificationEventType>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/EventTypes/{eventType}",
routeValues: {
eventType: eventType
@ -187,7 +187,7 @@ export class NotificationRestClient extends RestClientBase {
};
return this.beginRequest<Notification.NotificationEventType[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/EventTypes/{eventType}",
queryParams: queryValues
});
@ -201,7 +201,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationReason> {
return this.beginRequest<Notification.NotificationReason>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/NotificationReasons/{notificationId}",
routeValues: {
notificationId: notificationId
@ -221,7 +221,7 @@ export class NotificationRestClient extends RestClientBase {
};
return this.beginRequest<Notification.NotificationReason[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/NotificationReasons/{notificationId}",
queryParams: queryValues
});
@ -233,7 +233,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationAdminSettings> {
return this.beginRequest<Notification.NotificationAdminSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/Settings"
});
}
@ -246,7 +246,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationAdminSettings> {
return this.beginRequest<Notification.NotificationAdminSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/notification/Settings",
body: updateParameters
@ -263,7 +263,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationSubscriber> {
return this.beginRequest<Notification.NotificationSubscriber>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/Subscribers/{subscriberId}",
routeValues: {
subscriberId: subscriberId
@ -283,7 +283,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationSubscriber> {
return this.beginRequest<Notification.NotificationSubscriber>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/notification/Subscribers/{subscriberId}",
routeValues: {
@ -303,7 +303,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationSubscription[]> {
return this.beginRequest<Notification.NotificationSubscription[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/notification/SubscriptionQuery",
body: subscriptionQuery
@ -320,7 +320,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationSubscription> {
return this.beginRequest<Notification.NotificationSubscription>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/notification/Subscriptions/{subscriptionId}",
body: createParameters
@ -337,7 +337,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/notification/Subscriptions/{subscriptionId}",
routeValues: {
@ -362,7 +362,7 @@ export class NotificationRestClient extends RestClientBase {
};
return this.beginRequest<Notification.NotificationSubscription>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/Subscriptions/{subscriptionId}",
routeValues: {
subscriptionId: subscriptionId
@ -391,7 +391,7 @@ export class NotificationRestClient extends RestClientBase {
};
return this.beginRequest<Notification.NotificationSubscription[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/Subscriptions/{subscriptionId}",
queryParams: queryValues
});
@ -409,7 +409,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationSubscription> {
return this.beginRequest<Notification.NotificationSubscription>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/notification/Subscriptions/{subscriptionId}",
routeValues: {
@ -427,11 +427,28 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.NotificationSubscriptionTemplate[]> {
return this.beginRequest<Notification.NotificationSubscriptionTemplate[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/notification/SubscriptionTemplates"
});
}
/**
* Publish an event. This request is only for the Token service since it's a deploy only service.
*
* @param notificationEvent -
*/
public async publishTokenEvent(
notificationEvent: WebApi.VssNotificationEvent
): Promise<WebApi.VssNotificationEvent> {
return this.beginRequest<WebApi.VssNotificationEvent>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/notification/TokenNotificationEvent",
body: notificationEvent
});
}
/**
* Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions.
*
@ -446,7 +463,7 @@ export class NotificationRestClient extends RestClientBase {
): Promise<Notification.SubscriptionUserSettings> {
return this.beginRequest<Notification.SubscriptionUserSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/notification/Subscriptions/{subscriptionId}/UserSettings/{userId}",
routeValues: {

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

@ -15,7 +15,7 @@ export class OperationsRestClient extends RestClientBase {
}
/**
* Gets an operation from the the operationId using the given pluginId.
* Gets an operation from the operationId using the given pluginId.
*
* @param operationId - The ID for the operation.
* @param pluginId - The ID for the plugin.
@ -30,7 +30,7 @@ export class OperationsRestClient extends RestClientBase {
};
return this.beginRequest<Operations.Operation>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/operations/{operationId}",
routeValues: {
operationId: operationId

331
src/Pipelines/Pipelines.ts Normal file
Просмотреть файл

@ -0,0 +1,331 @@
/*
* ---------------------------------------------------------
* Copyright(C) Microsoft Corporation. All rights reserved.
* ---------------------------------------------------------
*/
import * as WebApi from "../WebApi/WebApi";
/**
* Artifacts are collections of files produced by a pipeline. Use artifacts to share files between stages in a pipeline or between different pipelines.
*/
export interface Artifact {
/**
* The name of the artifact.
*/
name: string;
/**
* Signed url for downloading this artifact
*/
signedContent: WebApi.SignedUrl;
/**
* Self-referential url
*/
url: string;
}
export interface BuildResourceParameters {
version: string;
}
export enum ConfigurationType {
/**
* Unknown type.
*/
Unknown = 0,
/**
* YAML.
*/
Yaml = 1,
/**
* Designer JSON.
*/
DesignerJson = 2,
/**
* Just-in-time.
*/
JustInTime = 3,
/**
* Designer-JSON.
*/
DesignerHyphenJson = 2
}
export interface Container {
environment: { [key: string] : string; };
image: string;
mapDockerSocket: boolean;
options: string;
ports: string[];
volumes: string[];
}
export interface ContainerResource {
container: Container;
}
export interface ContainerResourceParameters {
version: string;
}
/**
* Configuration parameters of the pipeline.
*/
export interface CreatePipelineConfigurationParameters {
/**
* Type of configuration.
*/
type: ConfigurationType;
}
/**
* Parameters to create a pipeline.
*/
export interface CreatePipelineParameters {
/**
* Configuration parameters of the pipeline.
*/
configuration: CreatePipelineConfigurationParameters;
/**
* Folder of the pipeline.
*/
folder: string;
/**
* Name of the pipeline.
*/
name: string;
}
/**
* Expansion options for GetArtifact and ListArtifacts.
*/
export enum GetArtifactExpandOptions {
/**
* No expansion.
*/
None = 0,
/**
* Include signed content.
*/
SignedContent = 1
}
/**
* $expand options for GetLog and ListLogs.
*/
export enum GetLogExpandOptions {
None = 0,
SignedContent = 1
}
/**
* Log for a pipeline.
*/
export interface Log {
/**
* The date and time the log was created.
*/
createdOn: Date;
/**
* The ID of the log.
*/
id: number;
/**
* The date and time the log was last changed.
*/
lastChangedOn: Date;
/**
* The number of lines in the log.
*/
lineCount: number;
signedContent: WebApi.SignedUrl;
url: string;
}
/**
* A collection of logs.
*/
export interface LogCollection {
/**
* The list of logs.
*/
logs: Log[];
signedContent: WebApi.SignedUrl;
/**
* URL of the log.
*/
url: string;
}
export interface PackageResourceParameters {
version: string;
}
/**
* Definition of a pipeline.
*/
export interface Pipeline extends PipelineBase {
_links: any;
configuration: PipelineConfiguration;
/**
* URL of the pipeline
*/
url: string;
}
export interface PipelineBase {
/**
* Pipeline folder
*/
folder: string;
/**
* Pipeline ID
*/
id: number;
/**
* Pipeline name
*/
name: string;
/**
* Revision number
*/
revision: number;
}
export interface PipelineConfiguration {
type: ConfigurationType;
}
/**
* A reference to a Pipeline.
*/
export interface PipelineReference extends PipelineBase {
url: string;
}
export interface PipelineResource {
pipeline: PipelineReference;
version: string;
}
export interface PipelineResourceParameters {
version: string;
}
export interface PreviewRun {
finalYaml: string;
}
export interface Repository {
type: RepositoryType;
}
export interface RepositoryResource {
refName: string;
repository: Repository;
version: string;
}
export interface RepositoryResourceParameters {
refName: string;
/**
* This is the security token to use when connecting to the repository.
*/
token: string;
/**
* Optional. This is the type of the token given. If not provided, a type of "Bearer" is assumed. Note: Use "Basic" for a PAT token.
*/
tokenType: string;
version: string;
}
export enum RepositoryType {
Unknown = 0,
GitHub = 1,
AzureReposGit = 2,
GitHubEnterprise = 3,
AzureReposGitHyphenated = 2
}
export interface Run extends RunReference {
_links: any;
createdDate: Date;
finalYaml: string;
finishedDate: Date;
pipeline: PipelineReference;
resources: RunResources;
result: RunResult;
state: RunState;
templateParameters: { [key: string] : any; };
url: string;
variables: { [key: string] : Variable; };
}
/**
* Settings which influence pipeline runs.
*/
export interface RunPipelineParameters {
/**
* If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.
*/
previewRun: boolean;
/**
* The resources the run requires.
*/
resources: RunResourcesParameters;
stagesToSkip: string[];
templateParameters: { [key: string] : string; };
variables: { [key: string] : Variable; };
/**
* If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file.
*/
yamlOverride: string;
}
export interface RunReference {
id: number;
name: string;
}
export interface RunResources {
containers: { [key: string] : ContainerResource; };
pipelines: { [key: string] : PipelineResource; };
repositories: { [key: string] : RepositoryResource; };
}
export interface RunResourcesParameters {
builds: { [key: string] : BuildResourceParameters; };
containers: { [key: string] : ContainerResourceParameters; };
packages: { [key: string] : PackageResourceParameters; };
pipelines: { [key: string] : PipelineResourceParameters; };
repositories: { [key: string] : RepositoryResourceParameters; };
}
/**
* This is not a Flags enum because we don't want to set multiple results on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple results.
*/
export enum RunResult {
Unknown = 0,
Succeeded = 1,
Failed = 2,
Canceled = 4
}
/**
* This is not a Flags enum because we don't want to set multiple states on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple states.
*/
export enum RunState {
Unknown = 0,
InProgress = 1,
Canceling = 2,
Completed = 4
}
export interface SignalRConnection {
signedContent: WebApi.SignedUrl;
}
export interface Variable {
isSecret: boolean;
value: string;
}

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

@ -0,0 +1,306 @@
/*
* ---------------------------------------------------------
* Copyright(C) Microsoft Corporation. All rights reserved.
* ---------------------------------------------------------
*/
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import * as Pipelines from "../Pipelines/Pipelines";
export class PipelinesRestClient extends RestClientBase {
constructor(options: IVssRestClientOptions) {
super(options);
}
/**
* Get a specific artifact from a pipeline run
*
* @param project - Project ID or project name
* @param pipelineId - ID of the pipeline.
* @param runId - ID of the run of that pipeline.
* @param artifactName - Name of the artifact.
* @param expand - Expand options. Default is None.
*/
public async getArtifact(
project: string,
pipelineId: number,
runId: number,
artifactName: string,
expand?: Pipelines.GetArtifactExpandOptions
): Promise<Pipelines.Artifact> {
const queryValues: any = {
artifactName: artifactName,
'$expand': expand
};
return this.beginRequest<Pipelines.Artifact>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}/artifacts",
routeValues: {
project: project,
pipelineId: pipelineId,
runId: runId
},
queryParams: queryValues
});
}
/**
* Get a specific log from a pipeline run
*
* @param project - Project ID or project name
* @param pipelineId - ID of the pipeline.
* @param runId - ID of the run of that pipeline.
* @param logId - ID of the log.
* @param expand - Expand options. Default is None.
*/
public async getLog(
project: string,
pipelineId: number,
runId: number,
logId: number,
expand?: Pipelines.GetLogExpandOptions
): Promise<Pipelines.Log> {
const queryValues: any = {
'$expand': expand
};
return this.beginRequest<Pipelines.Log>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}/logs/{logId}",
routeValues: {
project: project,
pipelineId: pipelineId,
runId: runId,
logId: logId
},
queryParams: queryValues
});
}
/**
* Get a list of logs from a pipeline run.
*
* @param project - Project ID or project name
* @param pipelineId - ID of the pipeline.
* @param runId - ID of the run of that pipeline.
* @param expand - Expand options. Default is None.
*/
public async listLogs(
project: string,
pipelineId: number,
runId: number,
expand?: Pipelines.GetLogExpandOptions
): Promise<Pipelines.LogCollection> {
const queryValues: any = {
'$expand': expand
};
return this.beginRequest<Pipelines.LogCollection>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}/logs/{logId}",
routeValues: {
project: project,
pipelineId: pipelineId,
runId: runId
},
queryParams: queryValues
});
}
/**
* Create a pipeline.
*
* @param inputParameters - Input parameters.
* @param project - Project ID or project name
*/
public async createPipeline(
inputParameters: Pipelines.CreatePipelineParameters,
project: string
): Promise<Pipelines.Pipeline> {
return this.beginRequest<Pipelines.Pipeline>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}",
routeValues: {
project: project
},
body: inputParameters
});
}
/**
* Gets a pipeline, optionally at the specified version
*
* @param project - Project ID or project name
* @param pipelineId - The pipeline ID
* @param pipelineVersion - The pipeline version
*/
public async getPipeline(
project: string,
pipelineId: number,
pipelineVersion?: number
): Promise<Pipelines.Pipeline> {
const queryValues: any = {
pipelineVersion: pipelineVersion
};
return this.beginRequest<Pipelines.Pipeline>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}",
routeValues: {
project: project,
pipelineId: pipelineId
},
queryParams: queryValues
});
}
/**
* Get a list of pipelines.
*
* @param project - Project ID or project name
* @param orderBy - A sort expression. Defaults to "name asc"
* @param top - The maximum number of pipelines to return
* @param continuationToken - A continuation token from a previous request, to retrieve the next page of results
*/
public async listPipelines(
project: string,
orderBy?: string,
top?: number,
continuationToken?: string
): Promise<Pipelines.Pipeline[]> {
const queryValues: any = {
orderBy: orderBy,
'$top': top,
continuationToken: continuationToken
};
return this.beginRequest<Pipelines.Pipeline[]>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}",
routeValues: {
project: project
},
queryParams: queryValues
});
}
/**
* Queues a dry run of the pipeline and returns an object containing the final yaml.
*
* @param runParameters - Optional additional parameters for this run.
* @param project - Project ID or project name
* @param pipelineId - The pipeline ID.
* @param pipelineVersion - The pipeline version.
*/
public async preview(
runParameters: Pipelines.RunPipelineParameters,
project: string,
pipelineId: number,
pipelineVersion?: number
): Promise<Pipelines.PreviewRun> {
const queryValues: any = {
pipelineVersion: pipelineVersion
};
return this.beginRequest<Pipelines.PreviewRun>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/preview",
routeValues: {
project: project,
pipelineId: pipelineId
},
queryParams: queryValues,
body: runParameters
});
}
/**
* Gets a run for a particular pipeline.
*
* @param project - Project ID or project name
* @param pipelineId - The pipeline id
* @param runId - The run id
*/
public async getRun(
project: string,
pipelineId: number,
runId: number
): Promise<Pipelines.Run> {
return this.beginRequest<Pipelines.Run>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}",
routeValues: {
project: project,
pipelineId: pipelineId,
runId: runId
}
});
}
/**
* Gets top 10000 runs for a particular pipeline.
*
* @param project - Project ID or project name
* @param pipelineId - The pipeline id
*/
public async listRuns(
project: string,
pipelineId: number
): Promise<Pipelines.Run[]> {
return this.beginRequest<Pipelines.Run[]>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}",
routeValues: {
project: project,
pipelineId: pipelineId
}
});
}
/**
* Runs a pipeline.
*
* @param runParameters - Optional additional parameters for this run.
* @param project - Project ID or project name
* @param pipelineId - The pipeline ID.
* @param pipelineVersion - The pipeline version.
*/
public async runPipeline(
runParameters: Pipelines.RunPipelineParameters,
project: string,
pipelineId: number,
pipelineVersion?: number
): Promise<Pipelines.Run> {
const queryValues: any = {
pipelineVersion: pipelineVersion
};
return this.beginRequest<Pipelines.Run>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}",
routeValues: {
project: project,
pipelineId: pipelineId
},
queryParams: queryValues,
body: runParameters
});
}
}

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

@ -34,6 +34,10 @@ export interface PolicyConfiguration extends VersionedPolicyConfigurationRef {
* Indicates whether the policy is enabled.
*/
isEnabled: boolean;
/**
* If set, this policy requires "Manage Enterprise Policies" permission to create, edit, or delete.
*/
isEnterpriseManaged: boolean;
/**
* The policy configuration settings.
*/

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as Policy from "../Policy/Policy";
@ -21,21 +22,18 @@ export class PolicyRestClient extends RestClientBase {
*
* @param configuration - The policy configuration to create.
* @param project - Project ID or project name
* @param configurationId -
*/
public async createPolicyConfiguration(
configuration: Policy.PolicyConfiguration,
project: string,
configurationId?: number
project: string
): Promise<Policy.PolicyConfiguration> {
return this.beginRequest<Policy.PolicyConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
routeValues: {
project: project,
configurationId: configurationId
project: project
},
body: configuration
});
@ -53,7 +51,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
routeValues: {
@ -75,7 +73,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<Policy.PolicyConfiguration> {
return this.beginRequest<Policy.PolicyConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
routeValues: {
project: project,
@ -102,13 +100,18 @@ export class PolicyRestClient extends RestClientBase {
policyType: policyType
};
return this.beginRequest<Policy.PolicyConfiguration[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Policy.PolicyConfiguration[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -126,7 +129,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<Policy.PolicyConfiguration> {
return this.beginRequest<Policy.PolicyConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
routeValues: {
@ -149,7 +152,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<Policy.PolicyEvaluationRecord> {
return this.beginRequest<Policy.PolicyEvaluationRecord>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/Evaluations/{evaluationId}",
routeValues: {
project: project,
@ -170,7 +173,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<Policy.PolicyEvaluationRecord> {
return this.beginRequest<Policy.PolicyEvaluationRecord>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/policy/Evaluations/{evaluationId}",
routeValues: {
@ -205,7 +208,7 @@ export class PolicyRestClient extends RestClientBase {
};
return this.beginRequest<Policy.PolicyEvaluationRecord[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/Evaluations",
routeValues: {
project: project
@ -228,7 +231,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<Policy.PolicyConfiguration> {
return this.beginRequest<Policy.PolicyConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",
routeValues: {
project: project,
@ -259,7 +262,7 @@ export class PolicyRestClient extends RestClientBase {
};
return this.beginRequest<Policy.PolicyConfiguration[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",
routeValues: {
project: project,
@ -281,7 +284,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<Policy.PolicyType> {
return this.beginRequest<Policy.PolicyType>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/Types/{typeId}",
routeValues: {
project: project,
@ -300,7 +303,7 @@ export class PolicyRestClient extends RestClientBase {
): Promise<Policy.PolicyType[]> {
return this.beginRequest<Policy.PolicyType[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/policy/Types/{typeId}",
routeValues: {
project: project

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

@ -31,7 +31,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/Profile/Attributes/{id}",
routeValues: {
@ -55,7 +55,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<Profile.ProfileAttribute>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/Profile/Attributes/{id}",
routeValues: {
id: id
@ -90,7 +90,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<Profile.ProfileAttribute[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/Profile/Attributes/{id}",
routeValues: {
id: id
@ -115,7 +115,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "_apis/Profile/Attributes/{id}",
routeValues: {
@ -136,7 +136,7 @@ export class ProfileRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "_apis/Profile/Attributes/{id}",
routeValues: {
@ -163,7 +163,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<Profile.Avatar>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Profile/Avatar/{id}",
routeValues: {
id: id
@ -194,7 +194,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<Profile.Avatar>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/Profile/Avatar/{id}",
routeValues: {
@ -213,7 +213,7 @@ export class ProfileRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/Profile/Avatar/{id}",
routeValues: {
@ -232,7 +232,7 @@ export class ProfileRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/Profile/Avatar/{id}",
routeValues: {
@ -258,7 +258,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<Profile.Profile>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "_apis/Profile/Profiles/{id}",
queryParams: queryValues,
@ -294,7 +294,7 @@ export class ProfileRestClient extends RestClientBase {
};
return this.beginRequest<Profile.Profile>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "_apis/Profile/Profiles/{id}",
routeValues: {
id: id
@ -315,7 +315,7 @@ export class ProfileRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "_apis/Profile/Profiles/{id}",
routeValues: {

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

@ -24,7 +24,7 @@ export class ProjectAnalysisRestClient extends RestClientBase {
): Promise<ProjectAnalysis.ProjectLanguageAnalytics> {
return this.beginRequest<ProjectAnalysis.ProjectLanguageAnalytics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/projectanalysis/languagemetrics",
routeValues: {
project: project
@ -49,7 +49,7 @@ export class ProjectAnalysisRestClient extends RestClientBase {
};
return this.beginRequest<ProjectAnalysis.ProjectActivityMetrics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/projectanalysis/projectactivitymetrics",
routeValues: {
project: project
@ -83,7 +83,7 @@ export class ProjectAnalysisRestClient extends RestClientBase {
};
return this.beginRequest<ProjectAnalysis.RepositoryActivityMetrics[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/projectanalysis/repositoryactivitymetrics/{repositoryId}",
routeValues: {
project: project
@ -111,7 +111,7 @@ export class ProjectAnalysisRestClient extends RestClientBase {
};
return this.beginRequest<ProjectAnalysis.RepositoryActivityMetrics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/projectanalysis/repositoryactivitymetrics/{repositoryId}",
routeValues: {
project: project,

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

@ -956,13 +956,13 @@ export interface Deployment {
startedOn: Date;
}
export interface DeploymentApprovalCompletedEvent {
export interface DeploymentApprovalCompletedEvent extends DeploymentEvent {
approval: ReleaseApproval;
project: ProjectReference;
release: Release;
}
export interface DeploymentApprovalPendingEvent {
export interface DeploymentApprovalPendingEvent extends DeploymentEvent {
approval: ReleaseApproval;
approvalOptions: ApprovalOptions;
completedApprovals: ReleaseApproval[];
@ -1073,7 +1073,7 @@ export enum DeploymentAuthorizationOwner {
FirstPreDeploymentApprover = 2
}
export interface DeploymentCompletedEvent {
export interface DeploymentCompletedEvent extends DeploymentEvent {
comment: string;
data: { [key: string] : any; };
deployment: Deployment;
@ -1081,6 +1081,11 @@ export interface DeploymentCompletedEvent {
project: ProjectReference;
}
export interface DeploymentEvent extends ReleaseEvent {
attemptId: number;
stageName: string;
}
export enum DeploymentExpands {
All = 0,
DeploymentOnly = 1,
@ -1294,7 +1299,7 @@ export enum DeploymentsQueryType {
FailingSince = 2
}
export interface DeploymentStartedEvent {
export interface DeploymentStartedEvent extends DeploymentEvent {
environment: ReleaseEnvironment;
project: ProjectReference;
release: Release;
@ -1580,7 +1585,7 @@ export interface FavoriteItem {
*/
data: string;
/**
* Unique Id of the the entry.
* Unique Id of the entry.
*/
id: string;
/**
@ -1927,6 +1932,24 @@ export interface MultiConfigInput extends ParallelExecutionInputBase {
export interface MultiMachineInput extends ParallelExecutionInputBase {
}
export interface OrgPipelineReleaseSettings {
/**
* Defines whether user can manage pipeline settings.
*/
hasManagePipelinePoliciesPermission: boolean;
/**
* EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project.
*/
orgEnforceJobAuthScope: boolean;
}
export interface OrgPipelineReleaseSettingsUpdateParameters {
/**
* EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project.
*/
orgEnforceJobAuthScope: boolean;
}
export interface PackageTrigger extends ReleaseTriggerBase {
/**
* Package trigger alias.
@ -1963,6 +1986,32 @@ export enum PipelineProcessTypes {
Yaml = 2
}
export interface ProjectPipelineReleaseSettings {
/**
* EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project.
*/
enforceJobAuthScope: boolean;
/**
* Defines whether user can manage pipeline settings.
*/
hasManageSettingsPermission: boolean;
/**
* EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project.
*/
orgEnforceJobAuthScope: boolean;
/**
* Defines whether project is public.
*/
publicProject: boolean;
}
export interface ProjectPipelineReleaseSettingsUpdateParameters {
/**
* EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project.
*/
enforceJobAuthScope: boolean;
}
export interface ProjectReference {
/**
* Gets the unique identifier of this field.
@ -2086,6 +2135,10 @@ export interface Release {
* Gets or sets the identity who created.
*/
createdBy: WebApi.IdentityRef;
/**
* Gets or sets the identity for whom release was created.
*/
createdFor: WebApi.IdentityRef;
/**
* Gets date on which it got created.
*/
@ -2171,7 +2224,7 @@ export interface Release {
variables: { [key: string] : ConfigurationVariableValue; };
}
export interface ReleaseAbandonedEvent {
export interface ReleaseAbandonedEvent extends ReleaseEvent {
project: ProjectReference;
release: Release;
}
@ -2335,7 +2388,7 @@ export interface ReleaseCondition extends Condition {
result: boolean;
}
export interface ReleaseCreatedEvent {
export interface ReleaseCreatedEvent extends ReleaseEvent {
project: ProjectReference;
release: Release;
}
@ -3022,6 +3075,17 @@ export interface ReleaseEnvironmentCompletedEvent {
webAccessUri: string;
}
export enum ReleaseEnvironmentExpands {
/**
* Return top level properties of object.
*/
None = 0,
/**
* Expand environment with tasks.
*/
Tasks = 1
}
export interface ReleaseEnvironmentShallowReference {
/**
* Gets the links to related resources, APIs, and views for the release environment.
@ -3068,6 +3132,11 @@ export interface ReleaseEnvironmentUpdateMetadata {
variables: { [key: string] : ConfigurationVariableValue; };
}
export interface ReleaseEvent {
id: number;
url: string;
}
export enum ReleaseExpands {
None = 0,
Environments = 2,
@ -3333,6 +3402,10 @@ export interface ReleaseStartMetadata {
* Sets list of artifact to create a release.
*/
artifacts: ArtifactMetadata[];
/**
* Optionally provide a requestor identity
*/
createdFor: string;
/**
* Sets definition Id to create a release.
*/
@ -3938,6 +4011,10 @@ export interface VariableGroupProviderData {
}
export interface VariableValue {
/**
* Gets or sets if the variable is read only or not.
*/
isReadOnly: boolean;
/**
* Gets or sets as the variable is secret or not.
*/
@ -3989,6 +4066,10 @@ export interface WorkflowTask {
* Gets or sets the reference name of the task.
*/
refName: string;
/**
* Gets or sets the task retryCount.
*/
retryCountOnTaskFailure: number;
/**
* Gets or sets the ID of the task.
*/

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as FormInput from "../FormInput/FormInput";
import * as Release from "../Release/Release";
@ -29,7 +30,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.AgentArtifactDefinition[]> {
return this.beginRequest<Release.AgentArtifactDefinition[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/agentartifacts",
routeValues: {
project: project,
@ -74,13 +75,18 @@ export class ReleaseRestClient extends RestClientBase {
includeMyGroupApprovals: includeMyGroupApprovals
};
return this.beginRequest<Release.ReleaseApproval[]>({
apiVersion: "5.2-preview.3",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/Release/approvals",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Release.ReleaseApproval[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -96,7 +102,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseApproval> {
return this.beginRequest<Release.ReleaseApproval>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/Release/approvals/{approvalStepId}/history",
routeValues: {
project: project,
@ -123,7 +129,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseApproval>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/Release/approvals/{approvalId}",
routeValues: {
project: project,
@ -147,7 +153,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseApproval> {
return this.beginRequest<Release.ReleaseApproval>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/approvals/{approvalId}",
routeValues: {
@ -168,7 +174,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseApproval[]> {
return this.beginRequest<Release.ReleaseApproval[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/approvals",
routeValues: {
@ -202,7 +208,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",
routeValues: {
@ -244,7 +250,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",
routeValues: {
@ -281,7 +287,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseTaskAttachment[]> {
return this.beginRequest<Release.ReleaseTaskAttachment[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/attachments/{type}",
routeValues: {
project: project,
@ -314,7 +320,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseTaskAttachment[]> {
return this.beginRequest<Release.ReleaseTaskAttachment[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/attachments/{type}",
routeValues: {
project: project,
@ -347,7 +353,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.AutoTriggerIssue[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/autotriggerissues",
routeValues: {
project: project
@ -372,7 +378,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string> {
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/public/Release/badge/{projectId}/{releaseDefinitionId}/{environmentId}/{branchName}",
routeValues: {
projectId: projectId,
@ -405,7 +411,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.Change[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/changes",
routeValues: {
project: project,
@ -432,7 +438,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.DefinitionEnvironmentReference[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/definitionEnvironments",
routeValues: {
project: project
@ -453,7 +459,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseDefinition> {
return this.beginRequest<Release.ReleaseDefinition>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
method: "POST",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
routeValues: {
@ -484,7 +490,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
method: "DELETE",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
routeValues: {
@ -513,7 +519,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseDefinition>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
routeValues: {
project: project,
@ -541,7 +547,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<string>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
routeValues: {
@ -606,13 +612,18 @@ export class ReleaseRestClient extends RestClientBase {
searchTextContainsFolderName: searchTextContainsFolderName
};
return this.beginRequest<Release.ReleaseDefinition[]>({
apiVersion: "5.2-preview.3",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.4",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Release.ReleaseDefinition[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -630,7 +641,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseDefinition> {
return this.beginRequest<Release.ReleaseDefinition>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
routeValues: {
@ -653,7 +664,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseDefinition> {
return this.beginRequest<Release.ReleaseDefinition>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
method: "PUT",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
routeValues: {
@ -718,13 +729,18 @@ export class ReleaseRestClient extends RestClientBase {
sourceBranch: sourceBranch
};
return this.beginRequest<Release.Deployment[]>({
apiVersion: "5.2-preview.2",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/Release/deployments",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Release.Deployment[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -738,7 +754,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.Deployment[]> {
return this.beginRequest<Release.Deployment[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/Release/deployments",
routeValues: {
@ -754,21 +770,28 @@ export class ReleaseRestClient extends RestClientBase {
* @param project - Project ID or project name
* @param releaseId - Id of the release.
* @param environmentId - Id of the release environment.
* @param expand - A property that should be expanded in the environment.
*/
public async getReleaseEnvironment(
project: string,
releaseId: number,
environmentId: number
environmentId: number,
expand?: Release.ReleaseEnvironmentExpands
): Promise<Release.ReleaseEnvironment> {
const queryValues: any = {
'$expand': expand
};
return this.beginRequest<Release.ReleaseEnvironment>({
apiVersion: "5.2-preview.6",
apiVersion: "7.1-preview.7",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",
routeValues: {
project: project,
releaseId: releaseId,
environmentId: environmentId
}
},
queryParams: queryValues
});
}
@ -788,7 +811,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseEnvironment> {
return this.beginRequest<Release.ReleaseEnvironment>({
apiVersion: "5.2-preview.6",
apiVersion: "7.1-preview.7",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",
routeValues: {
@ -812,7 +835,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseDefinitionEnvironmentTemplate> {
return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
method: "POST",
routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
routeValues: {
@ -838,7 +861,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
method: "DELETE",
routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
routeValues: {
@ -864,7 +887,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
routeValues: {
project: project
@ -889,7 +912,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
routeValues: {
project: project
@ -914,7 +937,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.4",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
routeValues: {
@ -942,7 +965,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.FavoriteItem[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/Release/favorites/{scope}",
routeValues: {
@ -973,7 +996,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/Release/favorites/{scope}",
routeValues: {
@ -1000,7 +1023,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.FavoriteItem[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/favorites/{scope}",
routeValues: {
project: project,
@ -1022,7 +1045,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Release/flightAssignments",
queryParams: queryValues
});
@ -1042,7 +1065,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.Folder> {
return this.beginRequest<Release.Folder>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/Release/folders/{*path}",
routeValues: {
@ -1065,7 +1088,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "{project}/_apis/Release/folders/{*path}",
routeValues: {
@ -1093,7 +1116,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.Folder[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/Release/folders/{*path}",
routeValues: {
project: project,
@ -1117,7 +1140,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.Folder> {
return this.beginRequest<Release.Folder>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/folders/{*path}",
routeValues: {
@ -1142,7 +1165,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseGates> {
return this.beginRequest<Release.ReleaseGates>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/gates/{gateStepId}",
routeValues: {
@ -1163,7 +1186,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseRevision[]> {
return this.beginRequest<Release.ReleaseRevision[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/history",
routeValues: {
project: project,
@ -1182,7 +1205,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<FormInput.InputValuesQuery> {
return this.beginRequest<FormInput.InputValuesQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/Release/artifacts/inputvaluesquery",
routeValues: {
@ -1208,7 +1231,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.AutoTriggerIssue[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/issues/{buildId}",
routeValues: {
project: project,
@ -1236,7 +1259,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string> {
return this.beginRequest<string>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/gates/{gateId}/tasks/{taskId}/logs",
routeValues: {
@ -1261,7 +1284,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
httpResponseType: "application/zip",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/logs",
routeValues: {
@ -1293,7 +1316,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<string>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks/{taskId}/logs",
routeValues: {
@ -1335,7 +1358,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<string>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks/{taskId}/logs",
routeValues: {
@ -1377,7 +1400,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<string>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs",
routeValues: {
@ -1405,7 +1428,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ManualIntervention> {
return this.beginRequest<Release.ManualIntervention>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",
routeValues: {
project: project,
@ -1427,7 +1450,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ManualIntervention[]> {
return this.beginRequest<Release.ManualIntervention[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",
routeValues: {
project: project,
@ -1452,7 +1475,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ManualIntervention> {
return this.beginRequest<Release.ManualIntervention>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",
routeValues: {
@ -1478,7 +1501,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.Metric[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/metrics",
routeValues: {
project: project
@ -1487,6 +1510,76 @@ export class ReleaseRestClient extends RestClientBase {
});
}
/**
* Gets Org pipeline release settings
*
*/
public async getOrgPipelineReleaseSettings(
): Promise<Release.OrgPipelineReleaseSettings> {
return this.beginRequest<Release.OrgPipelineReleaseSettings>({
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Release/orgPipelineReleaseSettings"
});
}
/**
* Updates Org pipeline release settings
*
* @param newSettings -
*/
public async updateOrgPipelineReleaseSettings(
newSettings: Release.OrgPipelineReleaseSettingsUpdateParameters
): Promise<Release.OrgPipelineReleaseSettings> {
return this.beginRequest<Release.OrgPipelineReleaseSettings>({
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/Release/orgPipelineReleaseSettings",
body: newSettings
});
}
/**
* Gets pipeline release settings
*
* @param project - Project ID or project name
*/
public async getPipelineReleaseSettings(
project: string
): Promise<Release.ProjectPipelineReleaseSettings> {
return this.beginRequest<Release.ProjectPipelineReleaseSettings>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/pipelineReleaseSettings",
routeValues: {
project: project
}
});
}
/**
* Updates pipeline release settings
*
* @param newSettings -
* @param project - Project ID or project name
*/
public async updatePipelineReleaseSettings(
newSettings: Release.ProjectPipelineReleaseSettingsUpdateParameters,
project: string
): Promise<Release.ProjectPipelineReleaseSettings> {
return this.beginRequest<Release.ProjectPipelineReleaseSettings>({
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/pipelineReleaseSettings",
routeValues: {
project: project
},
body: newSettings
});
}
/**
* @param artifactType -
* @param artifactSourceId -
@ -1502,7 +1595,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ProjectReference[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/Release/projects",
queryParams: queryValues
});
@ -1583,13 +1676,18 @@ export class ReleaseRestClient extends RestClientBase {
path: path
};
return this.beginRequest<Release.Release[]>({
apiVersion: "5.2-preview.8",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.8",
routeTemplate: "{project}/_apis/Release/releases",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Release.Release[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -1605,7 +1703,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.Release> {
return this.beginRequest<Release.Release>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
method: "POST",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
@ -1633,7 +1731,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
method: "DELETE",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
@ -1671,7 +1769,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.Release>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
project: project,
@ -1706,7 +1804,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseDefinitionSummary>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
project: project
@ -1733,7 +1831,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<string>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
@ -1762,7 +1860,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
method: "PUT",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
@ -1787,7 +1885,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.Release> {
return this.beginRequest<Release.Release>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
method: "PUT",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
@ -1812,7 +1910,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.Release> {
return this.beginRequest<Release.Release>({
apiVersion: "5.2-preview.8",
apiVersion: "7.1-preview.8",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
routeValues: {
@ -1833,7 +1931,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseSettings> {
return this.beginRequest<Release.ReleaseSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releasesettings",
routeValues: {
project: project
@ -1853,7 +1951,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseSettings> {
return this.beginRequest<Release.ReleaseSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "{project}/_apis/Release/releasesettings",
routeValues: {
@ -1877,7 +1975,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string> {
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",
routeValues: {
@ -1900,7 +1998,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseDefinitionRevision[]> {
return this.beginRequest<Release.ReleaseDefinitionRevision[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",
routeValues: {
project: project,
@ -1919,7 +2017,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.SummaryMailSection[]> {
return this.beginRequest<Release.SummaryMailSection[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/sendmail/{releaseId}",
routeValues: {
project: project,
@ -1940,7 +2038,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/Release/sendmail/{releaseId}",
routeValues: {
@ -1961,7 +2059,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/definitions/{definitionId}/sourcebranches",
routeValues: {
project: project,
@ -1984,7 +2082,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
routeValues: {
@ -2009,7 +2107,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
routeValues: {
@ -2034,7 +2132,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
routeValues: {
@ -2057,7 +2155,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
routeValues: {
project: project,
@ -2080,7 +2178,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
routeValues: {
@ -2105,7 +2203,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
routeValues: {
@ -2130,7 +2228,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
routeValues: {
@ -2153,7 +2251,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
routeValues: {
project: project,
@ -2170,7 +2268,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/tags",
routeValues: {
project: project
@ -2192,7 +2290,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseTask[]> {
return this.beginRequest<Release.ReleaseTask[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks",
routeValues: {
project: project,
@ -2219,7 +2317,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ReleaseTask[]> {
return this.beginRequest<Release.ReleaseTask[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks",
routeValues: {
project: project,
@ -2249,7 +2347,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseTask[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks",
routeValues: {
project: project,
@ -2268,7 +2366,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ArtifactTypeDefinition[]> {
return this.beginRequest<Release.ArtifactTypeDefinition[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/artifacts/types",
routeValues: {
project: project
@ -2290,7 +2388,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ArtifactVersionQueryResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/artifacts/versions",
routeValues: {
project: project
@ -2309,7 +2407,7 @@ export class ReleaseRestClient extends RestClientBase {
): Promise<Release.ArtifactVersionQueryResult> {
return this.beginRequest<Release.ArtifactVersionQueryResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/Release/artifacts/versions",
routeValues: {
@ -2341,7 +2439,7 @@ export class ReleaseRestClient extends RestClientBase {
};
return this.beginRequest<Release.ReleaseWorkItemRef[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/Release/releases/{releaseId}/workitems",
routeValues: {
project: project,

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

@ -84,6 +84,11 @@ export interface AuthorizationHeader {
value: string;
}
export interface AzureAppService {
id: string;
name: string;
}
export interface AzureKeyVaultPermission extends AzureResourcePermission {
vault: string;
}
@ -511,7 +516,7 @@ export interface ResultTransformationDetails {
*/
export interface ServiceEndpoint {
/**
* Gets or sets the identity reference for the administrators group of the service endpoint.
* This is a deprecated field.
*/
administratorsGroup: WebApi.IdentityRef;
/**
@ -576,7 +581,8 @@ export interface ServiceEndpoint {
export enum ServiceEndpointActionFilter {
None = 0,
Manage = 2,
Use = 16
Use = 16,
View = 32
}
/**

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as ServiceEndpoint from "../ServiceEndpoint/ServiceEndpoint";
@ -24,7 +25,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<ServiceEndpoint.AzureManagementGroupQueryResult> {
return this.beginRequest<ServiceEndpoint.AzureManagementGroupQueryResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/serviceendpoint/endpointproxy/azurermmanagementgroups"
});
}
@ -37,7 +38,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<ServiceEndpoint.AzureSubscriptionQueryResult> {
return this.beginRequest<ServiceEndpoint.AzureSubscriptionQueryResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/serviceendpoint/endpointproxy/azurermsubscriptions"
});
}
@ -60,7 +61,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<ServiceEndpoint.ServiceEndpointRequestResult>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/serviceendpoint/endpointproxy",
routeValues: {
@ -83,7 +84,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<string[]> {
return this.beginRequest<string[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/serviceendpoint/endpointproxy",
routeValues: {
@ -94,74 +95,144 @@ export class ServiceEndpointRestClient extends RestClientBase {
}
/**
* Create a service endpoint.
* Creates a new service endpoint
*
* @param endpoint - Service endpoint to create.
* @param project - Project ID or project name
* @param endpoint - Service endpoint to create
*/
public async createServiceEndpoint(
endpoint: ServiceEndpoint.ServiceEndpoint,
project: string
endpoint: ServiceEndpoint.ServiceEndpoint
): Promise<ServiceEndpoint.ServiceEndpoint> {
return this.beginRequest<ServiceEndpoint.ServiceEndpoint>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.4",
method: "POST",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
project: project
},
routeTemplate: "_apis/serviceendpoint/endpoints/{endpointId}",
body: endpoint
});
}
/**
* Delete a service endpoint.
* Delete a service endpoint
*
* @param project - Project ID or project name
* @param endpointId - Id of the service endpoint to delete.
* @param deep - Specific to AzureRM endpoint created in Automatic flow. When set to true, this will also delete corresponding AAD application in Azure. Default value is true.
* @param endpointId - Endpoint Id of endpoint to delete
* @param projectIds - project Ids from which endpoint needs to be deleted
* @param deep - delete the spn created by endpoint
*/
public async deleteServiceEndpoint(
project: string,
endpointId: string,
projectIds: string[],
deep?: boolean
): Promise<void> {
const queryValues: any = {
projectIds: projectIds && projectIds.join(","),
deep: deep
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.4",
method: "DELETE",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeTemplate: "_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
project: project,
endpointId: endpointId
},
queryParams: queryValues
});
}
/**
* Share service endpoint across projects
*
* @param endpointProjectReferences - Project reference details of the target project
* @param endpointId - Endpoint Id of the endpoint to share
*/
public async shareServiceEndpoint(
endpointProjectReferences: ServiceEndpoint.ServiceEndpointProjectReference[],
endpointId: string
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "7.1-preview.4",
method: "PATCH",
routeTemplate: "_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
endpointId: endpointId
},
body: endpointProjectReferences
});
}
/**
* Update the service endpoint
*
* @param endpoint - Updated data for the endpoint
* @param endpointId - Endpoint Id of the endpoint to update
* @param operation - operation type
*/
public async updateServiceEndpoint(
endpoint: ServiceEndpoint.ServiceEndpoint,
endpointId: string,
operation?: string
): Promise<ServiceEndpoint.ServiceEndpoint> {
const queryValues: any = {
operation: operation
};
return this.beginRequest<ServiceEndpoint.ServiceEndpoint>({
apiVersion: "7.1-preview.4",
method: "PUT",
routeTemplate: "_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
endpointId: endpointId
},
queryParams: queryValues,
body: endpoint
});
}
/**
* Update the service endpoints.
*
* @param endpoints - Names of the service endpoints to update.
*/
public async updateServiceEndpoints(
endpoints: ServiceEndpoint.ServiceEndpoint[]
): Promise<ServiceEndpoint.ServiceEndpoint[]> {
return this.beginRequest<ServiceEndpoint.ServiceEndpoint[]>({
apiVersion: "7.1-preview.4",
method: "PUT",
routeTemplate: "_apis/serviceendpoint/endpoints/{endpointId}",
body: endpoints
});
}
/**
* Get the service endpoint details.
*
* @param project - Project ID or project name
* @param endpointId - Id of the service endpoint.
* @param actionFilter - Action filter for the service connection. It specifies the action which can be performed on the service connection.
*/
public async getServiceEndpointDetails(
project: string,
endpointId: string
endpointId: string,
actionFilter?: ServiceEndpoint.ServiceEndpointActionFilter
): Promise<ServiceEndpoint.ServiceEndpoint> {
const queryValues: any = {
actionFilter: actionFilter
};
return this.beginRequest<ServiceEndpoint.ServiceEndpoint>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.4",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
project: project,
endpointId: endpointId
}
},
queryParams: queryValues
});
}
@ -196,7 +267,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<ServiceEndpoint.ServiceEndpoint[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.4",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
project: project
@ -236,7 +307,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<ServiceEndpoint.ServiceEndpoint[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.4",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
project: project
@ -263,7 +334,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<ServiceEndpoint.ServiceEndpoint[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.4",
method: "POST",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
@ -274,60 +345,6 @@ export class ServiceEndpointRestClient extends RestClientBase {
});
}
/**
* Update a service endpoint.
*
* @param endpoint - Service endpoint to update.
* @param project - Project ID or project name
* @param endpointId - Id of the service endpoint to update.
* @param operation - Operation for the service endpoint.
*/
public async updateServiceEndpoint(
endpoint: ServiceEndpoint.ServiceEndpoint,
project: string,
endpointId: string,
operation?: string
): Promise<ServiceEndpoint.ServiceEndpoint> {
const queryValues: any = {
operation: operation
};
return this.beginRequest<ServiceEndpoint.ServiceEndpoint>({
apiVersion: "5.2-preview.2",
method: "PUT",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
project: project,
endpointId: endpointId
},
queryParams: queryValues,
body: endpoint
});
}
/**
* Update the service endpoints.
*
* @param endpoints - Names of the service endpoints to update.
* @param project - Project ID or project name
*/
public async updateServiceEndpoints(
endpoints: ServiceEndpoint.ServiceEndpoint[],
project: string
): Promise<ServiceEndpoint.ServiceEndpoint[]> {
return this.beginRequest<ServiceEndpoint.ServiceEndpoint[]>({
apiVersion: "5.2-preview.2",
method: "PUT",
routeTemplate: "{project}/_apis/serviceendpoint/endpoints/{endpointId}",
routeValues: {
project: project
},
body: endpoints
});
}
/**
* Get service endpoint execution records.
*
@ -348,14 +365,19 @@ export class ServiceEndpointRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<ServiceEndpoint.ServiceEndpointExecutionRecord[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/serviceendpoint/{endpointId}/executionhistory",
routeValues: {
project: project,
endpointId: endpointId
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <ServiceEndpoint.ServiceEndpointExecutionRecord[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -371,7 +393,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<ServiceEndpoint.ServiceEndpointExecutionRecord[]> {
return this.beginRequest<ServiceEndpoint.ServiceEndpointExecutionRecord[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/serviceendpoint/executionhistory",
routeValues: {
@ -389,7 +411,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<ServiceEndpoint.OAuthConfiguration> {
return this.beginRequest<ServiceEndpoint.OAuthConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/serviceendpoint/oauthconfiguration/{configurationId}",
body: configurationParams
@ -404,7 +426,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<ServiceEndpoint.OAuthConfiguration> {
return this.beginRequest<ServiceEndpoint.OAuthConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/serviceendpoint/oauthconfiguration/{configurationId}",
routeValues: {
@ -421,7 +443,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<ServiceEndpoint.OAuthConfiguration> {
return this.beginRequest<ServiceEndpoint.OAuthConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/serviceendpoint/oauthconfiguration/{configurationId}",
routeValues: {
configurationId: configurationId
@ -444,7 +466,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<ServiceEndpoint.OAuthConfiguration[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/serviceendpoint/oauthconfiguration/{configurationId}",
queryParams: queryValues
});
@ -460,7 +482,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<ServiceEndpoint.OAuthConfiguration> {
return this.beginRequest<ServiceEndpoint.OAuthConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/serviceendpoint/oauthconfiguration/{configurationId}",
routeValues: {
@ -484,7 +506,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<ServiceEndpoint.ProjectReference[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/serviceendpoint/share/{endpointId}",
routeValues: {
endpointId: endpointId
@ -510,7 +532,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/serviceendpoint/share/{endpointId}",
routeValues: {
@ -537,27 +559,12 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<ServiceEndpoint.ServiceEndpointType[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/serviceendpoint/types",
queryParams: queryValues
});
}
/**
* @param authenticationRequest -
*/
public async acquireAccessToken(
authenticationRequest: ServiceEndpoint.AadOauthTokenRequest
): Promise<ServiceEndpoint.AadOauthTokenResult> {
return this.beginRequest<ServiceEndpoint.AadOauthTokenResult>({
apiVersion: "5.2-preview.1",
method: "POST",
routeTemplate: "_apis/serviceendpoint/vstsaadoauth/vstsaadoauth",
body: authenticationRequest
});
}
/**
* @param tenantId -
* @param redirectUri -
@ -582,7 +589,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
};
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/serviceendpoint/vstsaadoauth/vstsaadoauth",
queryParams: queryValues
@ -595,7 +602,7 @@ export class ServiceEndpointRestClient extends RestClientBase {
): Promise<string> {
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/serviceendpoint/vstsaadoauth/vstsaadoauth"
});
}

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

@ -522,7 +522,7 @@ export interface Publisher {
*/
export interface PublisherEvent {
/**
* Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notificaton.
* Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notification.
*/
diagnostics: { [key: string] : string; };
/**
@ -629,6 +629,7 @@ export interface Subscription {
eventDescription: string;
eventType: string;
id: string;
lastProbationRetryDate: Date;
modifiedBy: WebApi.IdentityRef;
modifiedDate: Date;
probationRetries: number;

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

@ -34,7 +34,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.ConsumerAction>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/consumers/{consumerId}/Actions/{consumerActionId}",
routeValues: {
consumerId: consumerId,
@ -60,7 +60,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.ConsumerAction[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/consumers/{consumerId}/Actions/{consumerActionId}",
routeValues: {
consumerId: consumerId
@ -85,7 +85,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.Consumer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/Consumers/{consumerId}",
routeValues: {
consumerId: consumerId
@ -108,7 +108,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.Consumer[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/Consumers/{consumerId}",
queryParams: queryValues
});
@ -122,7 +122,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<Notification.SubscriptionDiagnostics> {
return this.beginRequest<Notification.SubscriptionDiagnostics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/subscriptions/{subscriptionId}/diagnostics",
routeValues: {
subscriptionId: subscriptionId
@ -140,7 +140,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<Notification.SubscriptionDiagnostics> {
return this.beginRequest<Notification.SubscriptionDiagnostics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/hooks/subscriptions/{subscriptionId}/diagnostics",
routeValues: {
@ -162,7 +162,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.EventTypeDescriptor> {
return this.beginRequest<ServiceHooks.EventTypeDescriptor>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/publishers/{publisherId}/EventTypes/{eventTypeId}",
routeValues: {
publisherId: publisherId,
@ -181,7 +181,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.EventTypeDescriptor[]> {
return this.beginRequest<ServiceHooks.EventTypeDescriptor[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/publishers/{publisherId}/EventTypes/{eventTypeId}",
routeValues: {
publisherId: publisherId
@ -206,7 +206,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.PublisherEvent[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/public/hooks/ExternalEvents",
queryParams: queryValues
@ -225,7 +225,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.Notification> {
return this.beginRequest<ServiceHooks.Notification>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/subscriptions/{subscriptionId}/Notifications/{notificationId}",
routeValues: {
subscriptionId: subscriptionId,
@ -256,7 +256,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.Notification[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/subscriptions/{subscriptionId}/Notifications/{notificationId}",
routeValues: {
subscriptionId: subscriptionId
@ -275,7 +275,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.NotificationsQuery> {
return this.beginRequest<ServiceHooks.NotificationsQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/hooks/NotificationsQuery",
body: query
@ -292,7 +292,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<FormInput.InputValuesQuery> {
return this.beginRequest<FormInput.InputValuesQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/hooks/publishers/{publisherId}/inputValuesQuery",
routeValues: {
@ -312,7 +312,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.Publisher> {
return this.beginRequest<ServiceHooks.Publisher>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/Publishers/{publisherId}",
routeValues: {
publisherId: publisherId
@ -328,7 +328,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.Publisher[]> {
return this.beginRequest<ServiceHooks.Publisher[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/Publishers/{publisherId}"
});
}
@ -343,7 +343,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.PublishersQuery> {
return this.beginRequest<ServiceHooks.PublishersQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/hooks/PublishersQuery",
body: query
@ -360,7 +360,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.Subscription> {
return this.beginRequest<ServiceHooks.Subscription>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/hooks/Subscriptions/{subscriptionId}",
body: subscription
@ -377,7 +377,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/hooks/Subscriptions/{subscriptionId}",
routeValues: {
@ -396,7 +396,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.Subscription> {
return this.beginRequest<ServiceHooks.Subscription>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/Subscriptions/{subscriptionId}",
routeValues: {
subscriptionId: subscriptionId
@ -427,7 +427,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.Subscription[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/hooks/Subscriptions/{subscriptionId}",
queryParams: queryValues
});
@ -445,7 +445,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.Subscription> {
return this.beginRequest<ServiceHooks.Subscription>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/hooks/Subscriptions/{subscriptionId}",
routeValues: {
@ -465,7 +465,7 @@ export class ServiceHooksRestClient extends RestClientBase {
): Promise<ServiceHooks.SubscriptionsQuery> {
return this.beginRequest<ServiceHooks.SubscriptionsQuery>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/hooks/SubscriptionsQuery",
body: query
@ -488,7 +488,7 @@ export class ServiceHooksRestClient extends RestClientBase {
};
return this.beginRequest<ServiceHooks.Notification>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/hooks/TestNotifications/{notificationId}",
queryParams: queryValues,

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -376,7 +376,7 @@ export interface CloneOperationInformation {
*/
sourceProject: ShallowReference;
/**
* Current state of the operation. When State reaches Suceeded or Failed, the operation is complete
* Current state of the operation. When State reaches Succeeded or Failed, the operation is complete
*/
state: CloneOperationState;
/**
@ -463,6 +463,21 @@ export interface CloneStatistics {
totalTestCasesCount: number;
}
export interface CloneTestCaseOptions {
/**
* If set to true, include the attachments
*/
includeAttachments: boolean;
/**
* If set to true, include the links
*/
includeLinks: boolean;
/**
* Comment on the link that will link the new clone test case to the original Set null for no comment
*/
relatedLinkComment: string;
}
/**
* Represents the build configuration (platform, flavor) and coverage data for the build
*/
@ -605,7 +620,11 @@ export enum CoverageSummaryStatus {
/**
* The summary evaluation is pending
*/
Pending = 4
Pending = 4,
/**
* Summary evaluation may be ongoing but another merge has been requested.
*/
UpdateRequestQueued = 5
}
export interface CreateTestMessageLogEntryRequest {
@ -703,7 +722,7 @@ export interface FailingSince {
*/
build: BuildReference;
/**
* Time since failing.
* Time since failing(UTC).
*/
date: Date;
/**
@ -864,15 +883,15 @@ export interface JobReference {
*/
export interface LastResultDetails {
/**
* CompletedDate of LastResult.
* Completed date of last result.
*/
dateCompleted: Date;
/**
* Duration of LastResult.
* Duration of the last result in milliseconds.
*/
duration: number;
/**
* RunBy.
* The user who executed the last result.
*/
runBy: WebApi.IdentityRef;
}
@ -1175,6 +1194,13 @@ export interface NameValuePair {
value: string;
}
export interface NewTestResultLoggingSettings {
/**
* LogNewTests defines whether or not we will record new test cases coming into the system
*/
logNewTests: boolean;
}
export enum OperationType {
Add = 1,
Delete = 2
@ -1479,7 +1505,7 @@ export interface ReleaseReference {
*/
attempt: number;
/**
* Release Creation Date.
* Release Creation Date(UTC).
*/
creationDate: Date;
/**
@ -1487,7 +1513,7 @@ export interface ReleaseReference {
*/
definitionId: number;
/**
* Environment creation Date.
* Environment creation Date(UTC).
*/
environmentCreationDate: Date;
/**
@ -1907,7 +1933,7 @@ export interface RunCreateModel {
*/
startDate: string;
/**
* The state of the run. Type TestRunState Valid states - Unspecified ,NotStarted, InProgress, Completed, Waiting, Aborted, NeedsInvestigation
* The state of the run. Type TestRunState Valid states - NotStarted, InProgress, Waiting
*/
state: string;
/**
@ -2413,7 +2439,7 @@ export interface TestActionResult2 {
*/
export interface TestActionResultModel extends TestResultModelBase {
/**
* Path identifier test step in test case workitem.
* Path identifier for test step in test case workitem. Note: 1) It is represented in Hexadecimal format with 8 digits for a step. 2) Internally, the step ID value for first step starts with 2 so actionPath = 00000002 step 9, will have an ID = 10 and actionPath = 0000000a step 15, will have an ID =16 and actionPath = 00000010 3) actionPath of shared step is concatenated with the parent step of test case. Example, it would be something of type - 0000000300000001 where 00000003 denotes action path of test step and 00000001 denotes action path for shared step
*/
actionPath: string;
/**
@ -2429,7 +2455,7 @@ export interface TestActionResultModel extends TestResultModelBase {
*/
stepIdentifier: string;
/**
* Url of test action result.
* Url of test action result. Deprecated in hosted environment.
*/
url: string;
}
@ -2591,7 +2617,7 @@ export interface TestCaseResult {
*/
comment: string;
/**
* Time when test execution completed. Completed date should be greater than StartedDate.
* Time when test execution completed(UTC). Completed date should be greater than StartedDate.
*/
completedDate: Date;
/**
@ -2603,7 +2629,7 @@ export interface TestCaseResult {
*/
configuration: ShallowReference;
/**
* Timestamp when test result created.
* Timestamp when test result created(UTC).
*/
createdDate: Date;
/**
@ -2639,7 +2665,7 @@ export interface TestCaseResult {
*/
lastUpdatedBy: WebApi.IdentityRef;
/**
* Last updated datetime of test result.
* Last updated datetime of test result(UTC).
*/
lastUpdatedDate: Date;
/**
@ -2695,7 +2721,7 @@ export interface TestCaseResult {
*/
stackTrace: string;
/**
* Time when test execution started.
* Time when test execution started(UTC).
*/
startedDate: Date;
/**
@ -2851,7 +2877,7 @@ export interface TestConfiguration {
*/
project: ShallowReference;
/**
* Revision of the the configuration
* Revision of the configuration
*/
revision: number;
/**
@ -3024,7 +3050,7 @@ export interface TestIterationDetailsModel {
*/
comment: string;
/**
* Time when execution completed.
* Time when execution completed(UTC).
*/
completedDate: Date;
/**
@ -3048,7 +3074,7 @@ export interface TestIterationDetailsModel {
*/
parameters: TestResultParameterModel[];
/**
* Time when execution started.
* Time when execution started(UTC).
*/
startedDate: Date;
/**
@ -3231,6 +3257,46 @@ export enum TestLogStatusCode {
StorageCapacityExceeded = 16
}
/**
* Attachment metadata for test attachments from LogStore.
*/
export interface TestLogStoreAttachment {
/**
* Attachment type.
*/
attachmentType: AttachmentType;
/**
* Comment associated with attachment.
*/
comment: string;
/**
* Attachment created date.
*/
createdDate: Date;
/**
* Attachment file name.
*/
fileName: string;
/**
* Attachment size.
*/
size: number;
/**
* Attachment Url.
*/
url: string;
}
/**
* Reference to test attachment.
*/
export interface TestLogStoreAttachmentReference {
/**
* Url to download the attachment.
*/
url: string;
}
/**
* Represents Test Log store endpoint details.
*/
@ -3914,7 +3980,7 @@ export interface TestResultModelBase {
*/
comment: string;
/**
* Time when execution completed.
* Time when execution completed(UTC).
*/
completedDate: Date;
/**
@ -3930,7 +3996,7 @@ export interface TestResultModelBase {
*/
outcome: string;
/**
* Time when execution started.
* Time when execution started(UTC).
*/
startedDate: Date;
}
@ -3966,7 +4032,7 @@ export interface TestResultParameterModel {
*/
stepIdentifier: string;
/**
* Url of test parameter.
* Url of test parameter. Deprecated in hosted environment.
*/
url: string;
/**
@ -4068,6 +4134,7 @@ 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;
newTestResultLoggingSettings: NewTestResultLoggingSettings;
}
export enum TestResultsSettingsType {
@ -4078,7 +4145,11 @@ export enum TestResultsSettingsType {
/**
* Returns Flaky Test Settings.
*/
Flaky = 2
Flaky = 2,
/**
* Returns whether to log new tests or not
*/
NewTestLogging = 3
}
export interface TestResultSummary {
@ -4095,6 +4166,10 @@ export interface TestResultsUpdateSettings {
* FlakySettings defines Flaky Settings Data.
*/
flakySettings: FlakySettings;
/**
* NewTestResultLoggingSettings defines the setting for logging new test results
*/
newTestResultLoggingSettings: NewTestResultLoggingSettings;
}
export interface TestResultsWithWatermark {
@ -4781,7 +4856,7 @@ export interface TestSubResult {
*/
comment: string;
/**
* Time when test execution completed.
* Time when test execution completed(UTC).
*/
completedDate: Date;
/**
@ -4813,7 +4888,7 @@ export interface TestSubResult {
*/
id: number;
/**
* Time when result last updated.
* Time when result last updated(UTC).
*/
lastUpdatedDate: Date;
/**
@ -4837,7 +4912,7 @@ export interface TestSubResult {
*/
stackTrace: string;
/**
* Time when test execution started.
* Time when test execution started(UTC).
*/
startedDate: Date;
/**

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as TfsCore from "../Core/Core";
import * as Test from "../Test/Test";
@ -17,36 +18,6 @@ export class TestRestClient extends RestClientBase {
public static readonly RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e";
/**
* Gets the action results for an iteration in a test result.
*
* @param project - Project ID or project name
* @param runId - ID of the test run that contains the result.
* @param testCaseResultId - ID of the test result that contains the iterations.
* @param iterationId - ID of the iteration that contains the actions.
* @param actionPath - Path of a specific action, used to get just that action.
*/
public async getActionResults(
project: string,
runId: number,
testCaseResultId: number,
iterationId: number,
actionPath?: string
): Promise<Test.TestActionResultModel[]> {
return this.beginRequest<Test.TestActionResultModel[]>({
apiVersion: "5.2-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}/ActionResults/{actionPath}",
routeValues: {
project: project,
runId: runId,
testCaseResultId: testCaseResultId,
iterationId: iterationId,
actionPath: actionPath
}
});
}
/**
* Attach a file to test step result
*
@ -72,7 +43,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestAttachmentReference>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
@ -101,7 +72,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestAttachmentReference> {
return this.beginRequest<Test.TestAttachmentReference>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
@ -135,7 +106,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestAttachmentReference>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
@ -164,7 +135,7 @@ export class TestRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
@ -190,7 +161,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestAttachment[]> {
return this.beginRequest<Test.TestAttachment[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
project: project,
@ -216,7 +187,7 @@ export class TestRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/zip",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
@ -250,7 +221,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
@ -283,7 +254,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestAttachment[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
project: project,
@ -316,7 +287,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/zip",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
routeValues: {
@ -343,7 +314,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestAttachmentReference> {
return this.beginRequest<Test.TestAttachmentReference>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
routeValues: {
@ -368,7 +339,7 @@ export class TestRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
routeValues: {
@ -391,7 +362,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestAttachment[]> {
return this.beginRequest<Test.TestAttachment[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
routeValues: {
project: project,
@ -414,7 +385,7 @@ export class TestRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/zip",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
routeValues: {
@ -437,7 +408,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.WorkItemReference[]> {
return this.beginRequest<Test.WorkItemReference[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Bugs",
routeValues: {
project: project,
@ -466,7 +437,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.BuildCoverage[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/CodeCoverage",
routeValues: {
project: project
@ -494,7 +465,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.CodeCoverageSummary>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/CodeCoverage",
routeValues: {
project: project
@ -521,7 +492,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/CodeCoverage",
routeValues: {
@ -550,7 +521,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestRunCoverage[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/Runs/{runId}/CodeCoverage",
routeValues: {
project: project,
@ -570,7 +541,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.CustomTestFieldDefinition[]> {
return this.beginRequest<Test.CustomTestFieldDefinition[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/ExtensionFields",
routeValues: {
@ -594,7 +565,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.CustomTestFieldDefinition[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/ExtensionFields",
routeValues: {
project: project
@ -613,7 +584,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestResultHistory> {
return this.beginRequest<Test.TestResultHistory>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/Results/History",
routeValues: {
@ -645,7 +616,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestIterationDetailsModel>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",
routeValues: {
project: project,
@ -677,7 +648,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestIterationDetailsModel[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",
routeValues: {
project: project,
@ -698,7 +669,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.LinkedWorkItemsQueryResult[]> {
return this.beginRequest<Test.LinkedWorkItemsQueryResult[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/LinkedWorkItemsQuery",
routeValues: {
@ -720,7 +691,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestMessageLogDetails[]> {
return this.beginRequest<Test.TestMessageLogDetails[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/Runs/{runId}/MessageLogs",
routeValues: {
project: project,
@ -729,40 +700,6 @@ export class TestRestClient extends RestClientBase {
});
}
/**
* Get a list of parameterized results
*
* @param project - Project ID or project name
* @param runId - ID of the test run that contains the result.
* @param testCaseResultId - ID of the test result that contains the iterations.
* @param iterationId - ID of the iteration that contains the parameterized results.
* @param paramName - Name of the parameter.
*/
public async getResultParameters(
project: string,
runId: number,
testCaseResultId: number,
iterationId: number,
paramName?: string
): Promise<Test.TestResultParameterModel[]> {
const queryValues: any = {
paramName: paramName
};
return this.beginRequest<Test.TestResultParameterModel[]>({
apiVersion: "5.2-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}/ParameterResults",
routeValues: {
project: project,
runId: runId,
testCaseResultId: testCaseResultId,
iterationId: iterationId
},
queryParams: queryValues
});
}
/**
* Get a test point.
*
@ -785,7 +722,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestPoint>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",
routeValues: {
project: project,
@ -835,7 +772,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestPoint[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",
routeValues: {
project: project,
@ -864,7 +801,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestPoint[]> {
return this.beginRequest<Test.TestPoint[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",
routeValues: {
@ -898,7 +835,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestPointsQuery>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/test/Points",
routeValues: {
@ -941,7 +878,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestResultsDetails>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/test/ResultDetailsByBuild",
routeValues: {
project: project
@ -985,7 +922,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestResultsDetails>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/test/ResultDetailsByRelease",
routeValues: {
project: project
@ -1006,7 +943,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestResultDocument> {
return this.beginRequest<Test.TestResultDocument>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/Runs/{runId}/ResultDocument",
routeValues: {
@ -1039,13 +976,18 @@ export class TestRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<Test.FieldDetailsForTestResults[]>({
apiVersion: "5.2-preview.2",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/test/ResultGroupsByBuild",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Test.FieldDetailsForTestResults[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -1074,20 +1016,25 @@ export class TestRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<Test.FieldDetailsForTestResults[]>({
apiVersion: "5.2-preview.2",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/test/ResultGroupsByRelease",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Test.FieldDetailsForTestResults[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
/**
* Get list of test Result meta data details for corresponding testcasereferenceId
*
* @param testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma seperated list of valid ids (limit no. of ids 200).
* @param testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200).
* @param project - Project ID or project name
*/
public async queryTestResultsMetaData(
@ -1096,7 +1043,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestResultMetaData[]> {
return this.beginRequest<Test.TestResultMetaData[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/test/Results/ResultMetaData",
routeValues: {
@ -1116,7 +1063,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.ResultRetentionSettings> {
return this.beginRequest<Test.ResultRetentionSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/ResultRetentionSettings",
routeValues: {
project: project
@ -1136,7 +1083,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.ResultRetentionSettings> {
return this.beginRequest<Test.ResultRetentionSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/test/ResultRetentionSettings",
routeValues: {
@ -1160,7 +1107,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestCaseResult[]> {
return this.beginRequest<Test.TestCaseResult[]>({
apiVersion: "5.2-preview.6",
apiVersion: "7.1-preview.6",
method: "POST",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
routeValues: {
@ -1191,7 +1138,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestCaseResult>({
apiVersion: "5.2-preview.6",
apiVersion: "7.1-preview.6",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
routeValues: {
project: project,
@ -1229,7 +1176,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestCaseResult[]>({
apiVersion: "5.2-preview.6",
apiVersion: "7.1-preview.6",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
routeValues: {
project: project,
@ -1253,7 +1200,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestCaseResult[]> {
return this.beginRequest<Test.TestCaseResult[]>({
apiVersion: "5.2-preview.6",
apiVersion: "7.1-preview.6",
method: "PATCH",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
routeValues: {
@ -1265,6 +1212,8 @@ export class TestRestClient extends RestClientBase {
}
/**
* This API will return results by Ids with fields specified/trend for particular automated test method. We are still improving this API and have not finalized proper signature and contract.
*
* @param query -
* @param project - Project ID or project name
*/
@ -1274,7 +1223,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestResultsQuery> {
return this.beginRequest<Test.TestResultsQuery>({
apiVersion: "5.2-preview.6",
apiVersion: "7.1-preview.6",
method: "POST",
routeTemplate: "{project}/_apis/test/Results",
routeValues: {
@ -1309,13 +1258,18 @@ export class TestRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<Test.ShallowTestCaseResult[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/ResultsByBuild",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Test.ShallowTestCaseResult[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -1347,13 +1301,18 @@ export class TestRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<Test.ShallowTestCaseResult[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/ResultsByRelease",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Test.ShallowTestCaseResult[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -1380,7 +1339,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestResultSummary>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/ResultSummaryByBuild",
routeValues: {
project: project
@ -1415,7 +1374,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestResultSummary>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/ResultSummaryByRelease",
routeValues: {
project: project
@ -1434,7 +1393,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestResultSummary[]> {
return this.beginRequest<Test.TestResultSummary[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "{project}/_apis/test/ResultSummaryByRelease",
routeValues: {
@ -1460,7 +1419,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestSummaryForWorkItem[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/ResultSummaryByRequirement",
routeValues: {
@ -1481,7 +1440,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.AggregatedDataForResultTrend[]> {
return this.beginRequest<Test.AggregatedDataForResultTrend[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/ResultTrendByBuild",
routeValues: {
@ -1501,7 +1460,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.AggregatedDataForResultTrend[]> {
return this.beginRequest<Test.AggregatedDataForResultTrend[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/ResultTrendByRelease",
routeValues: {
@ -1523,7 +1482,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestRunStatistic> {
return this.beginRequest<Test.TestRunStatistic>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}/Statistics",
routeValues: {
project: project,
@ -1544,7 +1503,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestRun> {
return this.beginRequest<Test.TestRun>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "{project}/_apis/test/Runs/{runId}",
routeValues: {
@ -1566,7 +1525,7 @@ export class TestRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "DELETE",
routeTemplate: "{project}/_apis/test/Runs/{runId}",
routeValues: {
@ -1581,7 +1540,7 @@ export class TestRestClient extends RestClientBase {
*
* @param project - Project ID or project name
* @param runId - ID of the run to get.
* @param includeDetails - Defualt value is true. It includes details like run statistics,release,build,Test enviornment,Post process state and more
* @param includeDetails - Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more.
*/
public async getTestRunById(
project: string,
@ -1594,7 +1553,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestRun>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}",
routeValues: {
project: project,
@ -1641,7 +1600,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestRun[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}",
routeValues: {
project: project
@ -1657,16 +1616,16 @@ export class TestRestClient extends RestClientBase {
* @param minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory).
* @param maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
* @param state - Current state of the Runs to be queried.
* @param planIds - Plan Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
* @param planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
* @param isAutomated - Automation type of the Runs to be queried.
* @param publishContext - PublishContext of the Runs to be queried.
* @param buildIds - Build Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
* @param buildDefIds - Build Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
* @param buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
* @param buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
* @param branchName - Source Branch name of the Runs to be queried.
* @param releaseIds - Release Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
* @param releaseDefIds - Release Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
* @param releaseEnvIds - Release Environment Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
* @param releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
* @param releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
* @param releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
* @param releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
* @param releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
* @param runTitle - Run Title of the Runs to be queried.
* @param top - Number of runs to be queried. Limit is 100
* @param continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user.
@ -1710,13 +1669,18 @@ export class TestRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<Test.TestRun[]>({
apiVersion: "5.2-preview.3",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Runs/{runId}",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Test.TestRun[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -1734,7 +1698,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestRun> {
return this.beginRequest<Test.TestRun>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "{project}/_apis/test/Runs/{runId}",
routeValues: {
@ -1760,7 +1724,7 @@ export class TestRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Test.TestSession>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/{team}/_apis/test/Session/{testSessionId}",
routeValues: {
@ -1802,7 +1766,7 @@ export class TestRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Test.TestSession[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/test/Session/{testSessionId}",
routeValues: {
project: project,
@ -1827,7 +1791,7 @@ export class TestRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Test.TestSession>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/test/Session/{testSessionId}",
routeValues: {
@ -1848,7 +1812,7 @@ export class TestRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/test/SharedParameter/{sharedParameterId}",
routeValues: {
@ -1868,7 +1832,7 @@ export class TestRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/test/SharedStep/{sharedStepId}",
routeValues: {
@ -1894,7 +1858,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.SuiteTestCase[]> {
return this.beginRequest<Test.SuiteTestCase[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
routeValues: {
@ -1923,7 +1887,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.SuiteTestCase> {
return this.beginRequest<Test.SuiteTestCase>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
routeValues: {
project: project,
@ -1949,7 +1913,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.SuiteTestCase[]> {
return this.beginRequest<Test.SuiteTestCase[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
routeValues: {
project: project,
@ -1976,7 +1940,7 @@ export class TestRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "DELETE",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
routeValues: {
@ -2007,7 +1971,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.SuiteTestCase[]> {
return this.beginRequest<Test.SuiteTestCase[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
routeValues: {
@ -2033,7 +1997,7 @@ export class TestRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/test/TestCases/{testCaseId}",
routeValues: {
@ -2055,7 +2019,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestHistoryQuery> {
return this.beginRequest<Test.TestHistoryQuery>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/test/Results/TestHistory",
routeValues: {
@ -2075,7 +2039,7 @@ export class TestRestClient extends RestClientBase {
): Promise<number> {
return this.beginRequest<number>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/TestSettings/{testSettingsId}",
routeValues: {
@ -2095,7 +2059,7 @@ export class TestRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/test/TestSettings/{testSettingsId}",
routeValues: {
@ -2115,7 +2079,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.TestSettings> {
return this.beginRequest<Test.TestSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/TestSettings/{testSettingsId}",
routeValues: {
project: project,
@ -2134,7 +2098,7 @@ export class TestRestClient extends RestClientBase {
): Promise<Test.WorkItemToTestLinks> {
return this.beginRequest<Test.WorkItemToTestLinks>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/TestMethods/WorkItems",
routeValues: {
@ -2161,7 +2125,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<boolean>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",
routeValues: {
@ -2185,7 +2149,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.TestToWorkItemLinks>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",
routeValues: {
@ -2224,7 +2188,7 @@ export class TestRestClient extends RestClientBase {
};
return this.beginRequest<Test.WorkItemReference[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/test/Results/WorkItems",
routeValues: {
project: project

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

@ -56,6 +56,55 @@ export interface CloneOperationCommonResponse {
state: Test.CloneOperationState;
}
export interface CloneTestCaseOperationInformation {
/**
* Various information related to the clone
*/
cloneOperationResponse: CloneOperationCommonResponse;
/**
* Test Plan Clone create parameters
*/
cloneOptions: Test.CloneTestCaseOptions;
/**
* Information of destination Test Suite
*/
destinationTestSuite: TestSuiteReferenceWithProject;
/**
* Information of source Test Suite
*/
sourceTestSuite: SourceTestSuiteResponse;
}
/**
* Parameters for Test Suite clone operation
*/
export interface CloneTestCaseParams {
/**
* Test Case Clone create parameters
*/
cloneOptions: Test.CloneTestCaseOptions;
/**
* Information about destination Test Plan
*/
destinationTestPlan: TestPlanReference;
/**
* Information about destination Test Suite
*/
destinationTestSuite: DestinationTestSuiteInfo;
/**
* Information about source Test Plan
*/
sourceTestPlan: TestPlanReference;
/**
* Information about source Test Suite
*/
sourceTestSuite: SourceTestSuiteInfo;
/**
* Test Case IDs
*/
testCaseIds: number[];
}
/**
* Response for Test Plan clone operation
*/
@ -212,6 +261,82 @@ export enum LastResolutionState {
MaxValue = 5
}
/**
* Enum representing the return code of data provider.
*/
export enum LibraryTestCasesDataReturnCode {
Success = 0,
Error = 1
}
/**
* This data model is used in Work item-based tabs of Test Plans Library.
*/
export interface LibraryWorkItemsData {
/**
* Specifies the column option field names
*/
columnOptions: string[];
/**
* Continuation token to fetch next set of elements. Present only when HasMoreElements is true.
*/
continuationToken: string;
/**
* Boolean indicating if the WIQL query has exceeded the limit of items returned.
*/
exceededWorkItemQueryLimit: boolean;
/**
* Boolean indicating if there are more elements present than what are being sent.
*/
hasMoreElements: boolean;
/**
* Specifies if there was an error while execution of data provider.
*/
returnCode: LibraryTestCasesDataReturnCode;
/**
* List of work items returned when OrderByField is sent something other than Id.
*/
workItemIds: number[];
/**
* List of work items to be returned.
*/
workItems: WorkItemDetails[];
}
/**
* This is the request data contract for LibraryTestCaseDataProvider.
*/
export interface LibraryWorkItemsDataProviderRequest {
/**
* Specifies the list of column options to show in test cases table.
*/
columnOptions: string[];
/**
* The continuation token required for paging of work items. This is required when getting subsequent sets of work items when OrderByField is Id.
*/
continuationToken: string;
/**
* List of filter values to be supplied. Currently supported filters are Title, State, AssignedTo, Priority, AreaPath.
*/
filterValues: TestPlansLibraryWorkItemFilter[];
/**
* Whether the data is to be sorted in ascending or descending order. When not supplied, defaults to descending.
*/
isAscending: boolean;
/**
* The type of query to run.
*/
libraryQueryType: TestPlansLibraryQuery;
/**
* Work item field on which to order the results. When not supplied, defaults to work item IDs.
*/
orderByField: string;
/**
* List of work items to query for field details. This is required when getting subsequent sets of work item fields when OrderByField is other than Id.
*/
workItemIds: number[];
}
export enum Outcome {
/**
* Only used during an update to preserve the existing value.
@ -394,6 +519,20 @@ export interface SourceTestSuiteInfo {
id: number;
}
/**
* Source Test Suite Response for Test Case clone operation
*/
export interface SourceTestSuiteResponse extends TestSuiteReference {
/**
* project reference
*/
project: TfsCore.TeamProjectReference;
/**
* Id of suites to be cloned inside source Test Plan
*/
testCaseIds: number[];
}
/**
* A suite entry defines properties for a test suite.
*/
@ -606,6 +745,33 @@ export interface TestConfigurationReference {
name: string;
}
/**
* Test Entity Count Used to store test cases count (define tab) and test point count (execute tab) Used to store test cases count (define tab) and test point count (execute tab)
*/
export interface TestEntityCount {
/**
* Test Entity Count
*/
count: number;
/**
* Test Plan under which the Test Entities are
*/
testPlanId: number;
/**
* Test Suite under which the Test Entities are
*/
testSuiteId: number;
/**
* Total test entities in the suite without the applied filters
*/
totalCount: number;
}
export enum TestEntityTypes {
TestCase = 0,
TestPoint = 1
}
/**
* The test plan resource.
*/
@ -743,8 +909,12 @@ export interface TestPlanReference {
*/
export interface TestPlansHubRefreshData {
defineColumnOptionFields: string[];
defineTabCustomColumnFieldMap: { [key: string] : string; };
errorMessage: string;
executeColumnOptionFields: string[];
executeTabCustomColumnFieldMap: { [key: string] : string; };
isAdvancedExtensionEnabled: boolean;
selectedPivotId: string;
selectedSuiteId: number;
testCasePageSize: number;
testCases: TestCase[];
@ -757,6 +927,48 @@ export interface TestPlansHubRefreshData {
testSuitesContinuationToken: string;
}
/**
* Enum used to define the queries used in Test Plans Library.
*/
export enum TestPlansLibraryQuery {
None = 0,
AllTestCases = 1,
TestCasesWithActiveBugs = 2,
TestCasesNotLinkedToRequirements = 3,
TestCasesLinkedToRequirements = 4,
AllSharedSteps = 11,
SharedStepsNotLinkedToRequirement = 12
}
/**
* Container to hold information about a filter being applied in Test Plans Library.
*/
export interface TestPlansLibraryWorkItemFilter {
/**
* Work item field name on which the items are to be filtered.
*/
fieldName: string;
/**
* Work item field values corresponding to the field name.
*/
fieldValues: string[];
/**
* Mode of the filter.
*/
filterMode: TestPlansLibraryWorkItemFilterMode;
}
export enum TestPlansLibraryWorkItemFilterMode {
/**
* Default. Have the field values separated by an OR clause.
*/
Or = 0,
/**
* Have the field values separated by an AND clause.
*/
And = 1
}
/**
* The test plan update parameters.
*/
@ -833,24 +1045,6 @@ export interface TestPoint {
testSuite: TestSuiteReference;
}
/**
* Test Point Count
*/
export interface TestPointCount {
/**
* Test Point Count
*/
count: number;
/**
* Test Plan under which the Test Points are
*/
testPlanId: number;
/**
* Test Suite under which the Test Points are
*/
testSuiteId: number;
}
export interface TestPointDetailedReference {
configuration: TestConfigurationReference;
plan: TestPlanReference;
@ -1113,7 +1307,16 @@ export enum UserFriendlyTestOutcome {
Ready = 4,
NotApplicable = 5,
Paused = 6,
MaxValue = 6
Timeout = 7,
Warning = 8,
Error = 9,
NotExecuted = 10,
Inconclusive = 11,
Aborted = 12,
None = 13,
NotImpacted = 14,
Unspecified = 15,
MaxValue = 15
}
/**

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as TestPlan from "../TestPlan/TestPlan";
@ -26,7 +27,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestConfiguration> {
return this.beginRequest<TestPlan.TestConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Configurations/{testConfigurationId}",
routeValues: {
@ -52,7 +53,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/testplan/Configurations/{testConfigurationId}",
routeValues: {
@ -74,7 +75,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestConfiguration> {
return this.beginRequest<TestPlan.TestConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Configurations/{testConfigurationId}",
routeValues: {
project: project,
@ -98,13 +99,18 @@ export class TestPlanRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<TestPlan.TestConfiguration[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Configurations/{testConfigurationId}",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <TestPlan.TestConfiguration[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -126,7 +132,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.TestConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/testplan/Configurations/{testConfigurationId}",
routeValues: {
@ -145,27 +151,30 @@ export class TestPlanRestClient extends RestClientBase {
* @param configurations -
* @param testers -
* @param assignedTo -
* @param entity -
*/
public async getTestPointCountByPlanId(
public async getTestEntityCountByPlanId(
project: string,
planId: number,
states?: string,
outcome?: TestPlan.UserFriendlyTestOutcome,
configurations?: string,
testers?: string,
assignedTo?: string
): Promise<TestPlan.TestPointCount[]> {
assignedTo?: string,
entity?: TestPlan.TestEntityTypes
): Promise<TestPlan.TestEntityCount[]> {
const queryValues: any = {
states: states,
outcome: outcome,
configurations: configurations,
testers: testers,
assignedTo: assignedTo
assignedTo: assignedTo,
entity: entity
};
return this.beginRequest<TestPlan.TestPointCount[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<TestPlan.TestEntityCount[]>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Count/{planId}",
routeValues: {
project: project,
@ -187,7 +196,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestPlan> {
return this.beginRequest<TestPlan.TestPlan>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}",
routeValues: {
@ -209,7 +218,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}",
routeValues: {
@ -231,7 +240,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestPlan> {
return this.beginRequest<TestPlan.TestPlan>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}",
routeValues: {
project: project,
@ -264,13 +273,18 @@ export class TestPlanRestClient extends RestClientBase {
filterActivePlans: filterActivePlans
};
return this.beginRequest<TestPlan.TestPlan[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <TestPlan.TestPlan[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -288,7 +302,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestPlan> {
return this.beginRequest<TestPlan.TestPlan>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}",
routeValues: {
@ -317,7 +331,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.SuiteEntry[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/SuiteEntry/{suiteId}",
routeValues: {
project: project,
@ -341,7 +355,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.SuiteEntry[]> {
return this.beginRequest<TestPlan.SuiteEntry[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/testplan/SuiteEntry/{suiteId}",
routeValues: {
@ -352,6 +366,34 @@ export class TestPlanRestClient extends RestClientBase {
});
}
/**
* Create bulk requirement based test suites.
*
* @param testSuiteCreateParams - Parameters for suite creation
* @param project - Project ID or project name
* @param planId - ID of the test plan where requirement based suites need to be created.
* @param parentSuiteId - ID of the parent suite under which requirement based suites will be created
*/
public async createBulkTestSuites(
testSuiteCreateParams: TestPlan.TestSuiteCreateParams[],
project: string,
planId: number,
parentSuiteId: number
): Promise<TestPlan.TestSuite[]> {
return this.beginRequest<TestPlan.TestSuite[]>({
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{parentSuiteId}/bulk",
routeValues: {
project: project,
planId: planId,
parentSuiteId: parentSuiteId
},
body: testSuiteCreateParams
});
}
/**
* Create test suite.
*
@ -366,7 +408,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestSuite> {
return this.beginRequest<TestPlan.TestSuite>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",
routeValues: {
@ -391,7 +433,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",
routeValues: {
@ -422,7 +464,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.TestSuite>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",
routeValues: {
project: project,
@ -456,14 +498,19 @@ export class TestPlanRestClient extends RestClientBase {
asTreeView: asTreeView
};
return this.beginRequest<TestPlan.TestSuite[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",
routeValues: {
project: project,
planId: planId
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <TestPlan.TestSuite[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -483,7 +530,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestSuite> {
return this.beginRequest<TestPlan.TestSuite>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",
routeValues: {
@ -509,7 +556,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.TestSuite[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/testplan/Suites",
queryParams: queryValues
});
@ -531,9 +578,9 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestCase[]> {
return this.beginRequest<TestPlan.TestCase[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseIds}",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",
routeValues: {
project: project,
planId: planId,
@ -544,12 +591,12 @@ export class TestPlanRestClient extends RestClientBase {
}
/**
* Get Test Cases For a Suite.
* Get a particular Test Case from a Suite.
*
* @param project - Project ID or project name
* @param planId - ID of the test plan for which test cases are requested.
* @param suiteId - ID of the test suite for which test cases are requested.
* @param testCaseIds - Test Case Ids to be fetched.
* @param testCaseId - Test Case Id to be fetched.
* @param witFields - Get the list of witFields.
* @param returnIdentityRef - If set to true, returns all identity fields, like AssignedTo, ActivatedBy etc., as IdentityRef objects. If set to false, these fields are returned as unique names in string format. This is false by default.
*/
@ -557,7 +604,7 @@ export class TestPlanRestClient extends RestClientBase {
project: string,
planId: number,
suiteId: number,
testCaseIds: string,
testCaseId: string,
witFields?: string,
returnIdentityRef?: boolean
): Promise<TestPlan.TestCase[]> {
@ -568,20 +615,20 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.TestCase[]>({
apiVersion: "5.2-preview.2",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseIds}",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",
routeValues: {
project: project,
planId: planId,
suiteId: suiteId,
testCaseIds: testCaseIds
testCaseId: testCaseId
},
queryParams: queryValues
});
}
/**
* Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional paramter. If configuration Ids is null, it return all the test cases
* Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional parameter. If configuration Ids is null, it return all the test cases
*
* @param project - Project ID or project name
* @param planId - ID of the test plan for which test cases are requested.
@ -593,6 +640,7 @@ export class TestPlanRestClient extends RestClientBase {
* @param returnIdentityRef - If set to true, returns all identity fields, like AssignedTo, ActivatedBy etc., as IdentityRef objects. If set to false, these fields are returned as unique names in string format. This is false by default.
* @param expand - If set to false, will get a smaller payload containing only basic details about the suite test case object
* @param excludeFlags - Flag to exclude various values from payload. For example to remove point assignments pass exclude = 1. To remove extra information (links, test plan , test suite) pass exclude = 2. To remove both extra information and point assignments pass exclude = 3 (1 + 2).
* @param isRecursive -
*/
public async getTestCaseList(
project: string,
@ -604,7 +652,8 @@ export class TestPlanRestClient extends RestClientBase {
continuationToken?: string,
returnIdentityRef?: boolean,
expand?: boolean,
excludeFlags?: TestPlan.ExcludeFlags
excludeFlags?: TestPlan.ExcludeFlags,
isRecursive?: boolean
): Promise<TestPlan.TestCase[]> {
const queryValues: any = {
@ -614,18 +663,24 @@ export class TestPlanRestClient extends RestClientBase {
continuationToken: continuationToken,
returnIdentityRef: returnIdentityRef,
expand: expand,
excludeFlags: excludeFlags
excludeFlags: excludeFlags,
isRecursive: isRecursive
};
return this.beginRequest<TestPlan.TestCase[]>({
apiVersion: "5.2-preview.2",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseIds}",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",
routeValues: {
project: project,
planId: planId,
suiteId: suiteId
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <TestPlan.TestCase[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -644,16 +699,52 @@ export class TestPlanRestClient extends RestClientBase {
testCaseIds: string
): Promise<void> {
const queryValues: any = {
testCaseIds: testCaseIds
};
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "DELETE",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseIds}",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",
routeValues: {
project: project,
planId: planId,
suiteId: suiteId,
testCaseIds: testCaseIds
}
suiteId: suiteId
},
queryParams: queryValues
});
}
/**
* Removes test cases from a suite based on the list of test case Ids provided. This API can be used to remove a larger number of test cases.
*
* @param project - Project ID or project name
* @param planId - ID of the test plan from which test cases are to be removed.
* @param suiteId - ID of the test suite from which test cases are to be removed.
* @param testIds - Comma separated string of Test Case Ids to be removed.
*/
public async removeTestCasesListFromSuite(
project: string,
planId: number,
suiteId: number,
testIds: string
): Promise<void> {
const queryValues: any = {
testIds: testIds
};
return this.beginRequest<void>({
apiVersion: "7.1-preview.3",
method: "DELETE",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",
routeValues: {
project: project,
planId: planId,
suiteId: suiteId
},
queryParams: queryValues
});
}
@ -673,9 +764,9 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestCase[]> {
return this.beginRequest<TestPlan.TestCase[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseIds}",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",
routeValues: {
project: project,
planId: planId,
@ -685,6 +776,47 @@ export class TestPlanRestClient extends RestClientBase {
});
}
/**
* @param cloneRequestBody -
* @param project - Project ID or project name
*/
public async cloneTestCase(
cloneRequestBody: TestPlan.CloneTestCaseParams,
project: string
): Promise<TestPlan.CloneTestCaseOperationInformation> {
return this.beginRequest<TestPlan.CloneTestCaseOperationInformation>({
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/testplan/TestCases/CloneTestCaseOperation/{cloneOperationId}",
routeValues: {
project: project
},
body: cloneRequestBody
});
}
/**
* Get clone information.
*
* @param project - Project ID or project name
* @param cloneOperationId - Operation ID returned when we queue a clone operation
*/
public async getTestCaseCloneInformation(
project: string,
cloneOperationId: number
): Promise<TestPlan.CloneTestCaseOperationInformation> {
return this.beginRequest<TestPlan.CloneTestCaseOperationInformation>({
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/testplan/TestCases/CloneTestCaseOperation/{cloneOperationId}",
routeValues: {
project: project,
cloneOperationId: cloneOperationId
}
});
}
/**
* Delete a test case.
*
@ -697,7 +829,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/testplan/TestCases/{testCaseId}",
routeValues: {
@ -725,7 +857,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.CloneTestPlanOperationInformation>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Plans/CloneOperation/{cloneOperationId}",
routeValues: {
@ -748,7 +880,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.CloneTestPlanOperationInformation> {
return this.beginRequest<TestPlan.CloneTestPlanOperationInformation>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/testplan/Plans/CloneOperation/{cloneOperationId}",
routeValues: {
project: project,
@ -758,12 +890,12 @@ export class TestPlanRestClient extends RestClientBase {
}
/**
* Get a list of points based on point Ids provided.
* Get a particular Test Point from a suite.
*
* @param project - Project ID or project name
* @param planId - ID of the test plan for which test points are requested.
* @param suiteId - ID of the test suite for which test points are requested.
* @param pointIds - ID of test points to be fetched.
* @param pointId - ID of test point to be fetched.
* @param returnIdentityRef - If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object.
* @param includePointDetails - If set to false, will get a smaller payload containing only basic details about the test point object
*/
@ -771,24 +903,24 @@ export class TestPlanRestClient extends RestClientBase {
project: string,
planId: number,
suiteId: number,
pointIds: string,
pointId: string,
returnIdentityRef?: boolean,
includePointDetails?: boolean
): Promise<TestPlan.TestPoint[]> {
const queryValues: any = {
pointId: pointId,
returnIdentityRef: returnIdentityRef,
includePointDetails: includePointDetails
};
return this.beginRequest<TestPlan.TestPoint[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",
routeValues: {
project: project,
planId: planId,
suiteId: suiteId,
pointIds: pointIds
suiteId: suiteId
},
queryParams: queryValues
});
@ -805,6 +937,7 @@ export class TestPlanRestClient extends RestClientBase {
* @param continuationToken - If the list of test point returned is not complete, a continuation token to query next batch of test points is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test points.
* @param returnIdentityRef - If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object.
* @param includePointDetails - If set to false, will get a smaller payload containing only basic details about the test point object
* @param isRecursive - If set to true, will also fetch test points belonging to child suites recursively.
*/
public async getPointsList(
project: string,
@ -814,7 +947,8 @@ export class TestPlanRestClient extends RestClientBase {
testCaseId?: string,
continuationToken?: string,
returnIdentityRef?: boolean,
includePointDetails?: boolean
includePointDetails?: boolean,
isRecursive?: boolean
): Promise<TestPlan.TestPoint[]> {
const queryValues: any = {
@ -822,18 +956,24 @@ export class TestPlanRestClient extends RestClientBase {
testCaseId: testCaseId,
continuationToken: continuationToken,
returnIdentityRef: returnIdentityRef,
includePointDetails: includePointDetails
includePointDetails: includePointDetails,
isRecursive: isRecursive
};
return this.beginRequest<TestPlan.TestPoint[]>({
apiVersion: "5.2-preview.2",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",
routeValues: {
project: project,
planId: planId,
suiteId: suiteId
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <TestPlan.TestPoint[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -862,7 +1002,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.TestPoint[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",
routeValues: {
@ -893,7 +1033,7 @@ export class TestPlanRestClient extends RestClientBase {
};
return this.beginRequest<TestPlan.CloneTestSuiteOperationInformation>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Suites/CloneOperation/{cloneOperationId}",
routeValues: {
@ -916,7 +1056,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.CloneTestSuiteOperationInformation> {
return this.beginRequest<TestPlan.CloneTestSuiteOperationInformation>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/_apis/testplan/Suites/CloneOperation/{cloneOperationId}",
routeValues: {
project: project,
@ -937,7 +1077,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestVariable> {
return this.beginRequest<TestPlan.TestVariable>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/testplan/Variables/{testVariableId}",
routeValues: {
@ -959,7 +1099,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/testplan/Variables/{testVariableId}",
routeValues: {
@ -981,7 +1121,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestVariable> {
return this.beginRequest<TestPlan.TestVariable>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Variables/{testVariableId}",
routeValues: {
project: project,
@ -1005,13 +1145,18 @@ export class TestPlanRestClient extends RestClientBase {
continuationToken: continuationToken
};
return this.beginRequest<TestPlan.TestVariable[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/testplan/Variables/{testVariableId}",
routeValues: {
project: project
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <TestPlan.TestVariable[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -1029,7 +1174,7 @@ export class TestPlanRestClient extends RestClientBase {
): Promise<TestPlan.TestVariable> {
return this.beginRequest<TestPlan.TestVariable>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/_apis/testplan/Variables/{testVariableId}",
routeValues: {

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -66,9 +66,17 @@ export interface GitRepository {
defaultBranch: string;
id: string;
/**
* True if the repository was created as a fork
* True if the repository is disabled. False otherwise.
*/
isDisabled: boolean;
/**
* True if the repository was created as a fork.
*/
isFork: boolean;
/**
* True if the repository is in maintenance. False otherwise.
*/
isInMaintenance: boolean;
name: string;
parentRepository: GitRepositoryRef;
project: TfsCore.TeamProjectReference;

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as Tfvc from "../Tfvc/Tfvc";
@ -38,7 +39,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcBranch>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/Branches/{*path}",
routeValues: {
project: project
@ -72,7 +73,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcBranch[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/Branches/{*path}",
routeValues: {
project: project
@ -103,7 +104,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcBranchRef[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/Branches/{*path}",
routeValues: {
project: project
@ -130,13 +131,18 @@ export class TfvcRestClient extends RestClientBase {
'$top': top
};
return this.beginRequest<Tfvc.TfvcChange[]>({
apiVersion: "5.2-preview.1",
return this.beginRequest<Response>({
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/tfvc/changesets/{id}/changes",
routeValues: {
id: id
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
const body = <Tfvc.TfvcChange[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
@ -152,7 +158,7 @@ export class TfvcRestClient extends RestClientBase {
): Promise<Tfvc.TfvcChangesetRef> {
return this.beginRequest<Tfvc.TfvcChangesetRef>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
method: "POST",
routeTemplate: "{project}/_apis/tfvc/changesets/{id}",
routeValues: {
@ -204,7 +210,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcChangeset>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/tfvc/changesets/{id}",
routeValues: {
project: project,
@ -242,7 +248,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcChangesetRef[]>({
apiVersion: "5.2-preview.3",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/_apis/tfvc/changesets/{id}",
routeValues: {
project: project
@ -261,7 +267,7 @@ export class TfvcRestClient extends RestClientBase {
): Promise<Tfvc.TfvcChangesetRef[]> {
return this.beginRequest<Tfvc.TfvcChangesetRef[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/tfvc/ChangesetsBatch",
body: changesetsRequestData
@ -278,7 +284,7 @@ export class TfvcRestClient extends RestClientBase {
): Promise<Tfvc.AssociatedWorkItem[]> {
return this.beginRequest<Tfvc.AssociatedWorkItem[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/tfvc/changesets/{id}/workItems",
routeValues: {
id: id
@ -298,7 +304,7 @@ export class TfvcRestClient extends RestClientBase {
): Promise<Tfvc.TfvcItem[][]> {
return this.beginRequest<Tfvc.TfvcItem[][]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/tfvc/ItemBatch",
routeValues: {
@ -320,7 +326,7 @@ export class TfvcRestClient extends RestClientBase {
): Promise<ArrayBuffer> {
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
httpResponseType: "application/zip",
routeTemplate: "{project}/_apis/tfvc/ItemBatch",
@ -365,7 +371,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcItem>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/Items/{*path}",
routeValues: {
project: project
@ -408,7 +414,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/octet-stream",
routeTemplate: "{project}/_apis/tfvc/Items/{*path}",
routeValues: {
@ -443,7 +449,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcItem[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/Items/{*path}",
routeValues: {
project: project
@ -486,7 +492,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "text/plain",
routeTemplate: "{project}/_apis/tfvc/Items/{*path}",
routeValues: {
@ -530,7 +536,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
httpResponseType: "application/zip",
routeTemplate: "{project}/_apis/tfvc/Items/{*path}",
routeValues: {
@ -559,7 +565,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcItem[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/tfvc/labels/{labelId}/items",
routeValues: {
labelId: labelId
@ -586,7 +592,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcLabel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/Labels/{labelId}",
routeValues: {
project: project,
@ -601,7 +607,7 @@ export class TfvcRestClient extends RestClientBase {
*
* @param requestData - labelScope, name, owner, and itemLabelFilter
* @param project - Project ID or project name
* @param top - Max number of labels to return
* @param top - Max number of labels to return, defaults to 100 when undefined
* @param skip - Number of labels to skip
*/
public async getLabels(
@ -618,7 +624,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcLabelRef[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/Labels/{labelId}",
routeValues: {
project: project
@ -647,7 +653,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcChange[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/tfvc/shelvesets/changes",
queryParams: queryValues
});
@ -670,7 +676,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcShelveset>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/tfvc/shelvesets",
queryParams: queryValues
});
@ -696,7 +702,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcShelvesetRef[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/tfvc/shelvesets",
queryParams: queryValues
});
@ -716,7 +722,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.AssociatedWorkItem[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/tfvc/shelvesets/workitems",
queryParams: queryValues
});
@ -738,7 +744,7 @@ export class TfvcRestClient extends RestClientBase {
};
return this.beginRequest<Tfvc.TfvcStatistics>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/tfvc/stats",
routeValues: {
project: project

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

@ -209,7 +209,14 @@ export enum Operation {
Test = 5
}
export interface PagedList<T> {
/**
* A list that contains a single page of results from a query.
*/
export interface PagedList<T> extends Array<T> {
/**
* A string that can be passed to the same endpoint that returned this PagedList in order to retrieve the next page of results.
*/
continuationToken: string | null;
}
/**
@ -276,7 +283,13 @@ export interface ServiceEvent {
* A signed url allowing limited-time anonymous access to private resources.
*/
export interface SignedUrl {
/**
* Timestamp when access expires.
*/
signatureExpires: Date;
/**
* The URL to allow access to.
*/
url: string;
}
@ -353,13 +366,19 @@ export interface VssJsonCollectionWrapper extends VssJsonCollectionWrapperBase {
}
/**
* This class is used to serialized collections as a single JSON object on the wire, to avoid serializing JSON arrays directly to the client, which can be a security hole
* This class is used to serialize collections as a single JSON object on the wire.
*/
export interface VssJsonCollectionWrapperV<T> extends VssJsonCollectionWrapperBase {
/**
* The serialized item.
*/
value: T;
}
export interface VssJsonCollectionWrapperBase {
/**
* The number of serialized items.
*/
count: number;
}
@ -396,7 +415,7 @@ export interface VssNotificationEvent {
*/
processDelay: any;
/**
* Optional: A list of scopes which are are relevant to the event.
* Optional: A list of scopes which are relevant to the event.
*/
scopes: EventScope[];
/**

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

@ -154,6 +154,24 @@ export interface WikiPageCreateOrUpdateParameters {
content: string;
}
/**
* Defines a page with its metedata in a wiki.
*/
export interface WikiPageDetail {
/**
* When present, permanent identifier for the wiki page
*/
id: number;
/**
* Path of the wiki page.
*/
path: string;
/**
* Path of the wiki page.
*/
viewStats: WikiPageStat[];
}
/**
* Request contract for Wiki Page Move.
*/
@ -210,6 +228,38 @@ export interface WikiPageResponse {
page: WikiPage;
}
/**
* Contract encapsulating parameters for the pages batch.
*/
export interface WikiPagesBatchRequest {
/**
* If the list of page data returned is not complete, a continuation token to query next batch of pages is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of Wiki Page Data.
*/
continuationToken: string;
/**
* last N days from the current day for which page views is to be returned. It's inclusive of current day.
*/
pageViewsForDays: number;
/**
* Total count of pages on a wiki to return.
*/
top: number;
}
/**
* Defines properties for wiki page stat.
*/
export interface WikiPageStat {
/**
* the count of the stat for the Day
*/
count: number;
/**
* Day of the stat
*/
day: Date;
}
/**
* Defines properties for wiki page view stats.
*/
@ -279,6 +329,10 @@ export interface WikiV2 extends WikiCreateBaseParameters {
* ID of the wiki.
*/
id: string;
/**
* Is wiki repository disabled
*/
isDisabled: boolean;
/**
* Properties of the wiki.
*/

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

@ -6,6 +6,7 @@
import { IVssRestClientOptions } from "../Common/Context";
import { RestClientBase } from "../Common/RestClientBase";
import { deserializeVssJsonObject } from "../Common/Util/Serialization";
import * as Comments_Contracts from "../Comments/Comments";
import * as Git from "../Git/Git";
@ -497,6 +498,74 @@ export class WikiRestClient extends RestClientBase {
});
}
/**
* Returns pageable list of Wiki Pages
*
* @param pagesBatchRequest - Wiki batch page request.
* @param project - Project ID or project name
* @param wikiIdentifier - Wiki ID or wiki name.
* @param versionDescriptor - GitVersionDescriptor for the page. (Optional in case of ProjectWiki).
*/
public async getPagesBatch(
pagesBatchRequest: Wiki.WikiPagesBatchRequest,
project: string,
wikiIdentifier: string,
versionDescriptor?: Git.GitVersionDescriptor
): Promise<Wiki.WikiPageDetail[]> {
const queryValues: any = {
versionDescriptor: versionDescriptor
};
return this.beginRequest<Response>({
apiVersion: "5.2-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/wiki/wikis/{wikiIdentifier}/pagesBatch",
routeValues: {
project: project,
wikiIdentifier: wikiIdentifier
},
queryParams: queryValues,
body: pagesBatchRequest,
returnRawResponse: true
}).then(async response => {
const body = <Wiki.WikiPageDetail[]>await response.text().then(deserializeVssJsonObject);
body.continuationToken = response.headers.get("x-ms-continuationtoken");
return body;
});
}
/**
* Returns page detail corresponding to Page ID.
*
* @param project - Project ID or project name
* @param wikiIdentifier - Wiki ID or wiki name.
* @param pageId - Wiki page ID.
* @param pageViewsForDays - last N days from the current day for which page views is to be returned. It's inclusive of current day.
*/
public async getPageData(
project: string,
wikiIdentifier: string,
pageId: number,
pageViewsForDays?: number
): Promise<Wiki.WikiPageDetail> {
const queryValues: any = {
pageViewsForDays: pageViewsForDays
};
return this.beginRequest<Wiki.WikiPageDetail>({
apiVersion: "5.2-preview.1",
routeTemplate: "{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/stats",
routeValues: {
project: project,
wikiIdentifier: wikiIdentifier,
pageId: pageId
},
queryParams: queryValues
});
}
/**
* Creates a new page view stats resource or updates an existing page view stats resource.
*

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

@ -274,6 +274,7 @@ export interface BoardReference {
}
export interface BoardRow {
color: string;
id: string;
name: string;
}
@ -334,6 +335,10 @@ export interface CardFieldSettings {
* Flag indicating whether to show assigned to field on cards. When true, AssignedToDisplayFormat will determine how the field will be displayed
*/
showAssignedTo: boolean;
/**
* Flag indicating whether to show child rollup on cards
*/
showChildRollup: boolean;
/**
* Flag indicating whether to show empty fields on cards
*/
@ -342,6 +347,10 @@ export interface CardFieldSettings {
* Flag indicating whether to show ID on cards
*/
showId: boolean;
/**
* Flag indicating whether to show parent field on cards
*/
showParent: boolean;
/**
* Flag indicating whether to show state field on cards
*/
@ -427,9 +436,13 @@ export interface DeliveryViewData extends PlanViewData {
*/
endDate: Date;
/**
* Max number of teams can be configured for a delivery plan.
* Max number of teams that can be configured for a delivery plan
*/
maxExpandedTeams: number;
/**
* Mapping between parent id, title and all the child work item ids
*/
parentItemMaps: ParentChildWIMap[];
/**
* The start date for the delivery view data
*/
@ -438,6 +451,14 @@ export interface DeliveryViewData extends PlanViewData {
* All the team data
*/
teams: TimelineTeamData[];
/**
* List of all work item ids that have a dependency but not a violation
*/
workItemDependencies: number[];
/**
* List of all work item ids that have a violation
*/
workItemViolations: number[];
}
/**
@ -456,6 +477,14 @@ export interface DeliveryViewPropertyCollection {
* Markers. Will be missing/null if there are no markers.
*/
markers: Marker[];
/**
* Card style settings
*/
styleSettings: Rule[];
/**
* tag style settings
*/
tagStyleSettings: Rule[];
/**
* Team backlog mappings
*/
@ -548,6 +577,15 @@ export interface ITaskboardColumnMapping {
workItemType: string;
}
/**
* Capacity and teams for all teams in an iteration
*/
export interface IterationCapacity {
teams: TeamCapacityTotals[];
totalIterationCapacityPerDay: number;
totalIterationDaysOff: number;
}
/**
* Represents work items in an iteration backlog
*/
@ -588,6 +626,7 @@ export interface ParentChildWIMap {
childWorkItemIds: number[];
id: number;
title: string;
workItemTypeName: string;
}
/**
@ -610,6 +649,10 @@ export interface Plan {
* Id of the plan
*/
id: string;
/**
* Date when the plan was last accessed. Default is null.
*/
lastAccessed: Date;
/**
* Identity that last modified this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4.
*/
@ -898,6 +941,24 @@ export interface TeamBacklogMapping {
teamId: string;
}
/**
* Represents team member capacity with totals aggregated
*/
export interface TeamCapacity {
teamMembers: TeamMemberCapacityIdentityRef[];
totalCapacityPerDay: number;
totalDaysOff: number;
}
/**
* Team information with total capacity and days off
*/
export interface TeamCapacityTotals {
teamCapacityPerDay: number;
teamId: string;
teamTotalDaysOff: number;
}
/**
* Represents a single TeamFieldValue
*/
@ -1128,10 +1189,15 @@ export interface TimelineTeamData {
* The field reference names of the partially paged work items, such as ID, WorkItemType
*/
partiallyPagedFieldReferenceNames: string[];
partiallyPagedWorkItems: any[][];
/**
* The project id the team belongs team
*/
projectId: string;
/**
* Work item types for which we will collect roll up data on the client side
*/
rollupWorkItemTypes: string[];
/**
* Status for this team.
*/
@ -1148,6 +1214,10 @@ export interface TimelineTeamData {
* The team field values
*/
teamFieldValues: TeamFieldValue[];
/**
* Work items associated with the team that are not under any of the team's iterations
*/
workItems: any[][];
/**
* Colors for the work item types.
*/

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

@ -30,7 +30,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BacklogConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/backlogconfiguration",
routeValues: {
project: project,
@ -54,7 +54,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BacklogLevelWorkItems>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/backlogs/{backlogId}/workItems",
routeValues: {
project: project,
@ -79,7 +79,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BacklogLevelConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/backlogs/{id}",
routeValues: {
project: project,
@ -102,7 +102,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BacklogLevelConfiguration[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/backlogs/{id}",
routeValues: {
project: project,
@ -135,7 +135,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardBadge>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boardbadge/{id}",
routeValues: {
project: project,
@ -170,7 +170,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<string>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boardbadge/{id}",
routeValues: {
project: project,
@ -191,7 +191,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<Work.BoardSuggestedValue[]> {
return this.beginRequest<Work.BoardSuggestedValue[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/work/boardcolumns",
routeValues: {
project: project
@ -221,7 +221,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.ParentChildWIMap[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/boardparents",
routeValues: {
project: project,
@ -241,7 +241,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<Work.BoardSuggestedValue[]> {
return this.beginRequest<Work.BoardSuggestedValue[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/work/boardrows",
routeValues: {
project: project
@ -264,7 +264,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.Board>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/{id}",
routeValues: {
project: project,
@ -287,7 +287,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardReference[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/{id}",
routeValues: {
project: project,
@ -313,7 +313,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<{ [key: string] : string; }>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/work/boards/{id}",
routeValues: {
@ -340,7 +340,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardUserSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/boardusersettings",
routeValues: {
project: project,
@ -367,7 +367,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardUserSettings>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/boardusersettings",
routeValues: {
@ -380,21 +380,21 @@ export class WorkRestClient extends RestClientBase {
}
/**
* Get a team's capacity
* Get a team's capacity including total capacity and days off
*
* @param teamContext - The team context for the operation
* @param iterationId - ID of the iteration
*/
public async getCapacitiesWithIdentityRef(
public async getCapacitiesWithIdentityRefAndTotals(
teamContext: TfsCore.TeamContext,
iterationId: string
): Promise<Work.TeamMemberCapacityIdentityRef[]> {
): Promise<Work.TeamCapacity> {
const project = teamContext.projectId || teamContext.project;
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamMemberCapacityIdentityRef[]>({
apiVersion: "5.2-preview.2",
return this.beginRequest<Work.TeamCapacity>({
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",
routeValues: {
project: project,
@ -421,7 +421,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamMemberCapacityIdentityRef>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",
routeValues: {
project: project,
@ -449,7 +449,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamMemberCapacityIdentityRef[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",
routeValues: {
@ -480,7 +480,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamMemberCapacityIdentityRef>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.3",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",
routeValues: {
@ -508,7 +508,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardCardRuleSettings>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/cardrulesettings",
routeValues: {
project: project,
@ -535,7 +535,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardCardRuleSettings>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/cardrulesettings",
routeValues: {
@ -562,7 +562,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/taskboard/cardrulesettings",
routeValues: {
@ -588,7 +588,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardCardSettings>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/cardsettings",
routeValues: {
project: project,
@ -615,7 +615,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardCardSettings>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/cardsettings",
routeValues: {
@ -642,7 +642,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/work/taskboard/cardsettings",
routeValues: {
@ -670,7 +670,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardChart>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/charts/{name}",
routeValues: {
project: project,
@ -696,7 +696,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardChartReference[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/charts/{name}",
routeValues: {
project: project,
@ -725,7 +725,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardChart>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/charts/{name}",
routeValues: {
@ -753,7 +753,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardColumn[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/columns/{id}",
routeValues: {
project: project,
@ -780,7 +780,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardColumn[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/columns/{id}",
routeValues: {
@ -816,7 +816,7 @@ export class WorkRestClient extends RestClientBase {
};
return this.beginRequest<Work.DeliveryViewData>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/work/plans/{id}/deliverytimeline",
routeValues: {
project: project,
@ -826,6 +826,27 @@ export class WorkRestClient extends RestClientBase {
});
}
/**
* Get an iteration's capacity for all teams in iteration
*
* @param project - Project ID or project name
* @param iterationId - ID of the iteration
*/
public async getTotalIterationCapacities(
project: string,
iterationId: string
): Promise<Work.IterationCapacity> {
return this.beginRequest<Work.IterationCapacity>({
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/work/iterations/{iterationId}/iterationcapacities",
routeValues: {
project: project,
iterationId: iterationId
}
});
}
/**
* Delete a team's iteration by iterationId
*
@ -841,7 +862,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{id}",
routeValues: {
@ -867,7 +888,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamSettingsIteration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{id}",
routeValues: {
project: project,
@ -896,7 +917,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamSettingsIteration[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{id}",
routeValues: {
project: project,
@ -921,7 +942,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamSettingsIteration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{id}",
routeValues: {
@ -944,7 +965,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<Work.Plan> {
return this.beginRequest<Work.Plan>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/work/plans/{id}",
routeValues: {
@ -966,7 +987,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "{project}/_apis/work/plans/{id}",
routeValues: {
@ -988,7 +1009,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<Work.Plan> {
return this.beginRequest<Work.Plan>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/work/plans/{id}",
routeValues: {
project: project,
@ -1007,7 +1028,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<Work.Plan[]> {
return this.beginRequest<Work.Plan[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/work/plans/{id}",
routeValues: {
project: project
@ -1029,7 +1050,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<Work.Plan> {
return this.beginRequest<Work.Plan>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "{project}/_apis/work/plans/{id}",
routeValues: {
@ -1050,7 +1071,7 @@ export class WorkRestClient extends RestClientBase {
): Promise<Work.ProcessConfiguration> {
return this.beginRequest<Work.ProcessConfiguration>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/_apis/work/processconfiguration",
routeValues: {
project: project
@ -1073,7 +1094,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardRow[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/rows/{id}",
routeValues: {
project: project,
@ -1100,7 +1121,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.BoardRow[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/work/boards/{board}/rows/{id}",
routeValues: {
@ -1123,7 +1144,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TaskboardColumns>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/taskboardColumns",
routeValues: {
project: project,
@ -1145,7 +1166,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TaskboardColumns>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "{project}/{team}/_apis/work/taskboardColumns",
routeValues: {
@ -1169,7 +1190,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TaskboardWorkItemColumn[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/taskboardWorkItems/{iterationId}/{workItemId}",
routeValues: {
project: project,
@ -1196,7 +1217,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/taskboardWorkItems/{iterationId}/{workItemId}",
routeValues: {
@ -1224,7 +1245,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamSettingsDaysOff>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff",
routeValues: {
project: project,
@ -1237,7 +1258,7 @@ export class WorkRestClient extends RestClientBase {
/**
* Set a team's days off for an iteration
*
* @param daysOffPatch - Team's days off patch containting a list of start and end dates
* @param daysOffPatch - Team's days off patch containing a list of start and end dates
* @param teamContext - The team context for the operation
* @param iterationId - ID of the iteration
*/
@ -1251,7 +1272,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamSettingsDaysOff>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff",
routeValues: {
@ -1276,7 +1297,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamFieldValues>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/teamfieldvalues",
routeValues: {
project: project,
@ -1300,7 +1321,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamFieldValues>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/teamfieldvalues",
routeValues: {
@ -1324,7 +1345,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamSetting>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/teamsettings",
routeValues: {
project: project,
@ -1348,7 +1369,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.TeamSetting>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/teamsettings",
routeValues: {
@ -1374,7 +1395,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.IterationWorkItems>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/workitems",
routeValues: {
project: project,
@ -1399,7 +1420,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.ReorderResult[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/workitemsorder",
routeValues: {
@ -1427,7 +1448,7 @@ export class WorkRestClient extends RestClientBase {
const team = teamContext.teamId || teamContext.team;
return this.beginRequest<Work.ReorderResult[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "{project}/{team}/_apis/work/iterations/{iterationId}/workitemsorder",
routeValues: {

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

@ -394,6 +394,21 @@ export interface CommentVersion extends WorkItemTrackingResource {
version: number;
}
export interface EmailRecipients {
/**
* Plaintext email addresses.
*/
emailAddresses: string[];
/**
* TfIds
*/
tfIds: string[];
/**
* Unresolved entity ids
*/
unresolvedEntityIds: string[];
}
export interface ExternalDeployment {
artifactId: string;
createdBy: string;
@ -494,6 +509,20 @@ export enum FieldType {
PicklistDouble = 13
}
/**
* Describes an update request for a work item field.
*/
export interface FieldUpdate {
/**
* Indicates whether the user wants to restore the field.
*/
isDeleted: boolean;
/**
* Indicates whether the user wants to lock the field.
*/
isLocked: boolean;
}
/**
* Enum for field usages.
*/
@ -601,6 +630,61 @@ export enum LogicalOperation {
OR = 2
}
export interface MailMessage {
/**
* The mail body in HTML format.
*/
body: string;
/**
* CC recipients.
*/
cc: EmailRecipients;
/**
* The in-reply-to header value
*/
inReplyTo: string;
/**
* The Message Id value
*/
messageId: string;
/**
* Reply To recipients.
*/
replyTo: EmailRecipients;
/**
* The mail subject.
*/
subject: string;
/**
* To recipients
*/
to: EmailRecipients;
}
/**
* Stores process ID.
*/
export interface ProcessIdModel {
/**
* The ID of the process.
*/
typeId: string;
}
/**
* Stores project ID and its process ID.
*/
export interface ProcessMigrationResultModel {
/**
* The ID of the process.
*/
processId: string;
/**
* The ID of the project.
*/
projectId: string;
}
/**
* Project work item type state colors
*/
@ -908,6 +992,17 @@ export interface ReportingWorkItemRevisionsFilter {
types: string[];
}
export interface SendMailBody {
fields: string[];
ids: number[];
message: MailMessage;
persistenceId: string;
projectId: string;
sortFields: string[];
tempQueryId: string;
wiql: string;
}
/**
* The class describes reporting work item revision batch.
*/
@ -938,6 +1033,26 @@ export enum TemplateType {
GlobalWorkflow = 1
}
/**
* Describes a request to create a temporary query
*/
export interface TemporaryQueryRequestModel extends WorkItemTrackingResource {
/**
* The WIQL text of the temporary query
*/
wiql: string;
}
/**
* The result of a temporary query creation.
*/
export interface TemporaryQueryResponseModel {
/**
* The id of the temporary query item.
*/
id: string;
}
/**
* Types of tree node structures.
*/
@ -960,6 +1075,16 @@ export enum TreeStructureGroup {
Iterations = 1
}
/**
* Describes an update request for a work item field.
*/
export interface UpdateWorkItemField {
/**
* Indicates whether the user wants to restore the field.
*/
isDeleted: boolean;
}
/**
* A WIQL query
*/
@ -1158,6 +1283,34 @@ export interface WorkItemDelete extends WorkItemDeleteReference {
resource: WorkItem;
}
/**
* Describes response to delete a set of work items.
*/
export interface WorkItemDeleteBatch {
/**
* List of results for each work item
*/
results: WorkItemDelete[];
}
/**
* Describes a request to delete a set of work items
*/
export interface WorkItemDeleteBatchRequest {
/**
* Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
*/
destroy: boolean;
/**
* The requested work item ids
*/
ids: number[];
/**
* Optional parameter, if set to true, notifications will be disabled.
*/
skipNotifications: boolean;
}
/**
* Reference to a deleted work item.
*/
@ -1326,6 +1479,16 @@ export interface WorkItemField extends WorkItemTrackingResource {
usage: FieldUsage;
}
/**
* Describes a field on a work item and it's properties specific to that work item type.
*/
export interface WorkItemField2 extends WorkItemField {
/**
* Indicates whether this field is marked as locked for editing.
*/
isLocked: boolean;
}
/**
* Describes a work item field operation.
*/
@ -1604,6 +1767,7 @@ export interface WorkItemStateTransition {
export interface WorkItemTagDefinition {
id: string;
lastUpdated: Date;
name: string;
url: string;
}
@ -1759,7 +1923,7 @@ export interface WorkItemTypeColor {
}
/**
* Describes work item type nam, its icon and color.
* Describes work item type name, its icon and color.
*/
export interface WorkItemTypeColorAndIcon {
/**
@ -1770,12 +1934,30 @@ export interface WorkItemTypeColorAndIcon {
* The work item type icon.
*/
icon: string;
/**
* Indicates if the work item is disabled in the process.
*/
isDisabled: boolean;
/**
* The name of the work item type.
*/
workItemTypeName: string;
}
/**
* Describes the list of allowed values of the field.
*/
export interface WorkItemTypeFieldAlowedValues {
/**
* The list of field allowed values.
*/
allowedValues: string[];
/**
* Name of the field.
*/
fieldName: string;
}
/**
* Field instance of a work item type.
*/

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

@ -122,7 +122,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.AttachmentReference>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
method: "POST",
routeTemplate: "{project}/_apis/wit/attachments/{id}",
routeValues: {
@ -158,7 +158,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
httpResponseType: "application/octet-stream",
routeTemplate: "{project}/_apis/wit/attachments/{id}",
routeValues: {
@ -190,7 +190,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<ArrayBuffer>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
httpResponseType: "application/zip",
routeTemplate: "{project}/_apis/wit/attachments/{id}",
routeValues: {
@ -223,7 +223,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemClassificationNode[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/classificationNodes",
routeValues: {
project: project
@ -248,7 +248,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemClassificationNode[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/classificationNodes",
routeValues: {
project: project
@ -273,7 +273,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemClassificationNode> {
return this.beginRequest<WorkItemTracking.WorkItemClassificationNode>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
routeValues: {
@ -305,7 +305,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<void>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "DELETE",
routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
routeValues: {
@ -337,7 +337,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemClassificationNode>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
routeValues: {
project: project,
@ -364,7 +364,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemClassificationNode> {
return this.beginRequest<WorkItemTracking.WorkItemClassificationNode>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "PATCH",
routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
routeValues: {
@ -446,7 +446,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemField> {
return this.beginRequest<WorkItemTracking.WorkItemField>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
routeValues: {
@ -457,7 +457,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
}
/**
* Deletes the field.
* Deletes the field. To undelete a filed, see "Update Field" API.
*
* @param fieldNameOrRefName - Field simple name or reference name
* @param project - Project ID or project name
@ -468,7 +468,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "DELETE",
routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
routeValues: {
@ -490,7 +490,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemField> {
return this.beginRequest<WorkItemTracking.WorkItemField>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
routeValues: {
project: project,
@ -515,7 +515,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemField[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
routeValues: {
project: project
@ -524,6 +524,31 @@ export class WorkItemTrackingRestClient extends RestClientBase {
});
}
/**
* Update a field.
*
* @param payload - Payload contains desired value of the field's properties
* @param fieldNameOrRefName - Name/reference name of the field to be updated
* @param project - Project ID or project name
*/
public async updateField(
payload: WorkItemTracking.UpdateWorkItemField,
fieldNameOrRefName: string,
project?: string
): Promise<WorkItemTracking.WorkItemField> {
return this.beginRequest<WorkItemTracking.WorkItemField>({
apiVersion: "5.0-preview.2",
method: "PATCH",
routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
routeValues: {
project: project,
fieldNameOrRefName: fieldNameOrRefName
},
body: payload
});
}
/**
* Creates a query, or moves a query.
*
@ -544,7 +569,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.QueryHierarchyItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/wit/queries/{*query}",
routeValues: {
@ -568,7 +593,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "DELETE",
routeTemplate: "{project}/_apis/wit/queries/{*query}",
routeValues: {
@ -600,7 +625,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.QueryHierarchyItem[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/queries/{*query}",
routeValues: {
project: project
@ -617,23 +642,26 @@ export class WorkItemTrackingRestClient extends RestClientBase {
* @param expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.
* @param depth - In the folder of queries, return child queries and folders to this depth.
* @param includeDeleted - Include deleted queries and folders
* @param useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format
*/
public async getQuery(
project: string,
query: string,
expand?: WorkItemTracking.QueryExpand,
depth?: number,
includeDeleted?: boolean
includeDeleted?: boolean,
useIsoDateFormat?: boolean
): Promise<WorkItemTracking.QueryHierarchyItem> {
const queryValues: any = {
'$expand': expand,
'$depth': depth,
'$includeDeleted': includeDeleted
'$includeDeleted': includeDeleted,
'$useIsoDateFormat': useIsoDateFormat
};
return this.beginRequest<WorkItemTracking.QueryHierarchyItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/queries/{*query}",
routeValues: {
project: project,
@ -668,7 +696,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.QueryHierarchyItemsResult>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/queries/{*query}",
routeValues: {
project: project
@ -697,7 +725,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.QueryHierarchyItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "PATCH",
routeTemplate: "{project}/_apis/wit/queries/{*query}",
routeValues: {
@ -721,7 +749,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.QueryHierarchyItem[]> {
return this.beginRequest<WorkItemTracking.QueryHierarchyItem[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/wit/queriesBatch",
routeValues: {
@ -743,7 +771,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "DELETE",
routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
routeValues: {
@ -765,7 +793,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemDelete> {
return this.beginRequest<WorkItemTracking.WorkItemDelete>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
routeValues: {
project: project,
@ -790,7 +818,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemDeleteReference[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
routeValues: {
project: project
@ -809,7 +837,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemDeleteShallowReference[]> {
return this.beginRequest<WorkItemTracking.WorkItemDeleteShallowReference[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
routeValues: {
project: project
@ -831,7 +859,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemDelete> {
return this.beginRequest<WorkItemTracking.WorkItemDelete>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "PATCH",
routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
routeValues: {
@ -862,7 +890,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",
routeValues: {
project: project,
@ -897,7 +925,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItem[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",
routeValues: {
project: project,
@ -907,6 +935,28 @@ export class WorkItemTrackingRestClient extends RestClientBase {
});
}
/**
* RESTful method to send mail for selected/queried work items.
*
* @param body -
* @param project - Project ID or project name
*/
public async sendMail(
body: WorkItemTracking.SendMailBody,
project?: string
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.0-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/wit/sendMail",
routeValues: {
project: project
},
body: body
});
}
/**
* Creates a template
*
@ -1051,7 +1101,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemUpdate> {
return this.beginRequest<WorkItemTracking.WorkItemUpdate>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",
routeValues: {
project: project,
@ -1082,7 +1132,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemUpdate[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",
routeValues: {
project: project,
@ -1115,7 +1165,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemQueryResult>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "POST",
routeTemplate: "{project}/{team}/_apis/wit/wiql",
routeValues: {
@ -1150,7 +1200,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<Response>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "HEAD",
routeTemplate: "{project}/{team}/_apis/wit/wiql/{id}",
routeValues: {
@ -1158,9 +1208,10 @@ export class WorkItemTrackingRestClient extends RestClientBase {
team: team,
id: id
},
queryParams: queryValues
queryParams: queryValues,
returnRawResponse: true
}).then(async response => {
return Number(response.headers.get("X-Total-Count"));
return Number(response.headers.get("X-Total-Count"));
});
}
@ -1187,7 +1238,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemQueryResult>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/{team}/_apis/wit/wiql/{id}",
routeValues: {
project: project,
@ -1217,7 +1268,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemIcon>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
routeTemplate: "_apis/wit/workItemIcons/{icon}",
routeValues: {
icon: icon
@ -1234,7 +1285,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemIcon[]> {
return this.beginRequest<WorkItemTracking.WorkItemIcon[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
routeTemplate: "_apis/wit/workItemIcons/{icon}"
});
}
@ -1258,7 +1309,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<any>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
httpResponseType: "image/svg+xml",
routeTemplate: "_apis/wit/workItemIcons/{icon}",
routeValues: {
@ -1287,7 +1338,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<any>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
httpResponseType: "image/xaml+xml",
routeTemplate: "_apis/wit/workItemIcons/{icon}",
routeValues: {
@ -1322,7 +1373,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.ReportingWorkItemLinksBatch>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/reporting/workItemLinks",
routeValues: {
project: project
@ -1341,7 +1392,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemRelationType> {
return this.beginRequest<WorkItemTracking.WorkItemRelationType>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "_apis/wit/workItemRelationTypes/{relation}",
routeValues: {
relation: relation
@ -1357,7 +1408,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemRelationType[]> {
return this.beginRequest<WorkItemTracking.WorkItemRelationType[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "_apis/wit/workItemRelationTypes/{relation}"
});
}
@ -1408,7 +1459,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.ReportingWorkItemRevisionsBatch>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/reporting/workItemRevisions",
routeValues: {
project: project
@ -1441,7 +1492,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.ReportingWorkItemRevisionsBatch>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
method: "POST",
routeTemplate: "{project}/_apis/wit/reporting/workItemRevisions",
routeValues: {
@ -1481,7 +1532,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
method: "POST",
routeTemplate: "{project}/_apis/wit/workItems/${type}",
routeValues: {
@ -1520,7 +1571,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workItems/${type}",
routeValues: {
project: project,
@ -1548,7 +1599,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemDelete>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
method: "DELETE",
routeTemplate: "{project}/_apis/wit/workItems/{id}",
routeValues: {
@ -1583,7 +1634,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workItems/{id}",
routeValues: {
project: project,
@ -1621,7 +1672,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItem[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workItems/{id}",
routeValues: {
project: project
@ -1659,7 +1710,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItem>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
method: "PATCH",
routeTemplate: "{project}/_apis/wit/workItems/{id}",
routeValues: {
@ -1686,7 +1737,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItem[]> {
return this.beginRequest<WorkItemTracking.WorkItem[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/wit/workItemsBatch",
routeValues: {
@ -1746,7 +1797,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemTypeCategory[]> {
return this.beginRequest<WorkItemTracking.WorkItemTypeCategory[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/workItemTypeCategories/{category}",
routeValues: {
project: project
@ -1766,7 +1817,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemTypeCategory> {
return this.beginRequest<WorkItemTracking.WorkItemTypeCategory>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/workItemTypeCategories/{category}",
routeValues: {
project: project,
@ -1821,7 +1872,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemType> {
return this.beginRequest<WorkItemTracking.WorkItemType>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/workItemTypes/{type}",
routeValues: {
project: project,
@ -1840,7 +1891,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.WorkItemType[]> {
return this.beginRequest<WorkItemTracking.WorkItemType[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.2",
routeTemplate: "{project}/_apis/wit/workItemTypes/{type}",
routeValues: {
project: project
@ -1866,7 +1917,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemTypeFieldWithReferences[]>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workitemtypes/{type}/fields/{field}",
routeValues: {
project: project,
@ -1896,7 +1947,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemTypeFieldWithReferences>({
apiVersion: "5.0",
apiVersion: "5.0-preview.3",
routeTemplate: "{project}/_apis/wit/workitemtypes/{type}/fields/{field}",
routeValues: {
project: project,
@ -1946,7 +1997,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTracking.WorkItemTypeTemplate>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
routeTemplate: "{project}/_apis/wit/workItemTypeTemplate/{type}",
routeValues: {
project: project,
@ -1968,7 +2019,7 @@ export class WorkItemTrackingRestClient extends RestClientBase {
): Promise<WorkItemTracking.ProvisioningResult> {
return this.beginRequest<WorkItemTracking.ProvisioningResult>({
apiVersion: "5.0",
apiVersion: "5.0-preview.1",
method: "POST",
routeTemplate: "{project}/_apis/wit/workItemTypeTemplate/{type}",
routeValues: {

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

@ -198,6 +198,7 @@ export interface FieldModel {
description: string;
id: string;
isIdentity: boolean;
isLocked: boolean;
name: string;
type: FieldType;
url: string;
@ -519,7 +520,7 @@ export interface ProcessBehavior {
*/
color: string;
/**
* Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process.
* Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process.
*/
customization: CustomizationType;
/**
@ -808,6 +809,10 @@ export interface ProcessWorkItemTypeField {
* Description of the field.
*/
description: string;
/**
* Information about field definition being locked for editing
*/
isLocked: boolean;
/**
* Name of the field.
*/
@ -960,7 +965,11 @@ export enum RuleActionType {
/**
* Hides target field from the form. This is a server side only action.
*/
HideTargetField = 14
HideTargetField = 14,
/**
* Disallows a field from being set to a specific value.
*/
DisallowValue = 15
}
/**
@ -1242,6 +1251,10 @@ export interface WorkItemTypeBehavior {
* If true the work item type is the default work item type in the behavior
*/
isDefault: boolean;
/**
* If true the work item type is the default work item type in the parent behavior
*/
isLegacyDefault: boolean;
/**
* URL of the work item type behavior
*/

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

@ -28,7 +28,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessBehavior> {
return this.beginRequest<WorkItemTrackingProcess.ProcessBehavior>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/behaviors/{behaviorRefName}",
routeValues: {
@ -50,7 +50,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/behaviors/{behaviorRefName}",
routeValues: {
@ -78,7 +78,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.ProcessBehavior>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/behaviors/{behaviorRefName}",
routeValues: {
processId: processId,
@ -104,7 +104,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.ProcessBehavior[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/behaviors/{behaviorRefName}",
routeValues: {
processId: processId
@ -127,7 +127,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessBehavior> {
return this.beginRequest<WorkItemTrackingProcess.ProcessBehavior>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "_apis/work/processes/{processId}/behaviors/{behaviorRefName}",
routeValues: {
@ -154,7 +154,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Control> {
return this.beginRequest<WorkItemTrackingProcess.Control>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -190,7 +190,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.Control>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -220,7 +220,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -250,7 +250,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Control> {
return this.beginRequest<WorkItemTrackingProcess.Control>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -277,7 +277,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessWorkItemTypeField> {
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemTypeField>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",
routeValues: {
@ -300,7 +300,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessWorkItemTypeField[]> {
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemTypeField[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",
routeValues: {
processId: processId,
@ -329,7 +329,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemTypeField>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",
routeValues: {
processId: processId,
@ -354,7 +354,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",
routeValues: {
@ -381,7 +381,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessWorkItemTypeField> {
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemTypeField>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",
routeValues: {
@ -411,7 +411,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Group> {
return this.beginRequest<WorkItemTrackingProcess.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -453,7 +453,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -494,7 +494,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -527,7 +527,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -560,7 +560,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Group> {
return this.beginRequest<WorkItemTrackingProcess.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -586,7 +586,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.FormLayout> {
return this.beginRequest<WorkItemTrackingProcess.FormLayout>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout",
routeValues: {
processId: processId,
@ -605,7 +605,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.PickList> {
return this.beginRequest<WorkItemTrackingProcess.PickList>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processes/lists/{listId}",
body: picklist
@ -622,7 +622,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processes/lists/{listId}",
routeValues: {
@ -641,7 +641,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.PickList> {
return this.beginRequest<WorkItemTrackingProcess.PickList>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/lists/{listId}",
routeValues: {
listId: listId
@ -657,7 +657,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.PickListMetadata[]> {
return this.beginRequest<WorkItemTrackingProcess.PickListMetadata[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/lists/{listId}"
});
}
@ -674,7 +674,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.PickList> {
return this.beginRequest<WorkItemTrackingProcess.PickList>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processes/lists/{listId}",
routeValues: {
@ -698,7 +698,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Page> {
return this.beginRequest<WorkItemTrackingProcess.Page>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",
routeValues: {
@ -723,7 +723,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",
routeValues: {
@ -748,7 +748,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Page> {
return this.beginRequest<WorkItemTrackingProcess.Page>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",
routeValues: {
@ -769,7 +769,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessInfo> {
return this.beginRequest<WorkItemTrackingProcess.ProcessInfo>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "_apis/work/processes/{processTypeId}",
body: createRequest
@ -786,7 +786,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processTypeId}",
routeValues: {
@ -807,7 +807,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessInfo> {
return this.beginRequest<WorkItemTrackingProcess.ProcessInfo>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processTypeId}",
routeValues: {
@ -831,7 +831,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.ProcessInfo[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processTypeId}",
queryParams: queryValues
});
@ -853,7 +853,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.ProcessInfo>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processTypeId}",
routeValues: {
processTypeId: processTypeId
@ -876,7 +876,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessRule> {
return this.beginRequest<WorkItemTrackingProcess.ProcessRule>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",
routeValues: {
@ -901,7 +901,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",
routeValues: {
@ -926,7 +926,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessRule> {
return this.beginRequest<WorkItemTrackingProcess.ProcessRule>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",
routeValues: {
processId: processId,
@ -948,7 +948,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessRule[]> {
return this.beginRequest<WorkItemTrackingProcess.ProcessRule[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",
routeValues: {
processId: processId,
@ -973,7 +973,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessRule> {
return this.beginRequest<WorkItemTrackingProcess.ProcessRule>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PUT",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",
routeValues: {
@ -999,7 +999,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -1024,7 +1024,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -1049,7 +1049,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
processId: processId,
@ -1071,7 +1071,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemStateResultModel[]> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemStateResultModel[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
processId: processId,
@ -1096,7 +1096,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -1124,7 +1124,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -1150,7 +1150,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Control[]> {
return this.beginRequest<WorkItemTrackingProcess.Control[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/systemcontrols/{controlId}",
routeValues: {
@ -1173,7 +1173,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Control[]> {
return this.beginRequest<WorkItemTrackingProcess.Control[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/systemcontrols/{controlId}",
routeValues: {
processId: processId,
@ -1198,7 +1198,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.Control> {
return this.beginRequest<WorkItemTrackingProcess.Control>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/systemcontrols/{controlId}",
routeValues: {
@ -1222,7 +1222,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessWorkItemType> {
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemType>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}",
routeValues: {
@ -1233,7 +1233,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
}
/**
* Removes a work itewm type in the process.
* Removes a work item type in the process.
*
* @param processId - The ID of the process.
* @param witRefName - The reference name of the work item type.
@ -1244,7 +1244,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}",
routeValues: {
@ -1272,7 +1272,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemType>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}",
routeValues: {
processId: processId,
@ -1298,7 +1298,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
};
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemType[]>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}",
routeValues: {
processId: processId
@ -1321,7 +1321,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.ProcessWorkItemType> {
return this.beginRequest<WorkItemTrackingProcess.ProcessWorkItemType>({
apiVersion: "5.2-preview.2",
apiVersion: "7.1-preview.2",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypes/{witRefName}",
routeValues: {
@ -1346,7 +1346,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemTypeBehavior> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemTypeBehavior>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
@ -1371,7 +1371,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemTypeBehavior> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemTypeBehavior>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
processId: processId,
@ -1393,7 +1393,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemTypeBehavior[]> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemTypeBehavior[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
processId: processId,
@ -1416,7 +1416,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
@ -1441,7 +1441,7 @@ export class WorkItemTrackingProcessRestClient extends RestClientBase {
): Promise<WorkItemTrackingProcess.WorkItemTypeBehavior> {
return this.beginRequest<WorkItemTrackingProcess.WorkItemTypeBehavior>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {

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

@ -491,6 +491,7 @@ export interface WorkItemStateResultModel {
export interface WorkItemTypeBehavior {
behavior: WorkItemBehaviorReference;
isDefault: boolean;
isLegacyDefault: boolean;
url: string;
}
@ -516,11 +517,12 @@ export interface WorkItemTypeFieldModel {
}
/**
* New version of WorkItemTypeFieldModel supporting defaultValue as object (such as IdentityRef)
* New version of WorkItemTypeFieldModel supporting defaultValue as object (such as IdentityRef) and description
*/
export interface WorkItemTypeFieldModel2 {
allowGroups: boolean;
defaultValue: any;
description: string;
name: string;
pickList: PickListMetadataModel;
readOnly: boolean;

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

@ -28,7 +28,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.BehaviorModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.BehaviorModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",
routeValues: {
@ -50,7 +50,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",
routeValues: {
@ -72,7 +72,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.BehaviorModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.BehaviorModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",
routeValues: {
processId: processId,
@ -91,7 +91,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.BehaviorModel[]> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.BehaviorModel[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",
routeValues: {
processId: processId
@ -113,7 +113,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.BehaviorModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.BehaviorModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",
routeValues: {
@ -140,7 +140,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.Control> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.Control>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -170,7 +170,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.Control> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.Control>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -199,7 +199,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -235,7 +235,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
};
return this.beginRequest<WorkItemTrackingProcessDefinitions.Control>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",
routeValues: {
@ -261,7 +261,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.FieldModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.FieldModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/fields/{field}",
routeValues: {
@ -283,7 +283,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.FieldModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.FieldModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/fields/{field}",
routeValues: {
@ -311,7 +311,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.Group> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -344,7 +344,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.Group> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -376,7 +376,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -418,7 +418,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
};
return this.beginRequest<WorkItemTrackingProcessDefinitions.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -459,7 +459,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
};
return this.beginRequest<WorkItemTrackingProcessDefinitions.Group>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",
routeValues: {
@ -486,7 +486,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.FormLayout> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.FormLayout>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout",
routeValues: {
processId: processId,
@ -503,7 +503,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.PickListMetadataModel[]> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.PickListMetadataModel[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/lists"
});
}
@ -518,7 +518,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.PickListModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.PickListModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/lists/{listId}",
body: picklist
@ -535,7 +535,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/lists/{listId}",
routeValues: {
@ -554,7 +554,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.PickListModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.PickListModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/lists/{listId}",
routeValues: {
listId: listId
@ -574,7 +574,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.PickListModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.PickListModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processDefinitions/lists/{listId}",
routeValues: {
@ -598,7 +598,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.Page> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.Page>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",
routeValues: {
@ -623,7 +623,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.Page> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.Page>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",
routeValues: {
@ -648,7 +648,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",
routeValues: {
@ -673,7 +673,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -698,7 +698,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -723,7 +723,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
processId: processId,
@ -745,7 +745,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel[]> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
processId: processId,
@ -770,7 +770,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PUT",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -798,7 +798,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemStateResultModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",
routeValues: {
@ -824,7 +824,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
@ -849,7 +849,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
processId: processId,
@ -871,7 +871,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior[]> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
processId: processId,
@ -894,7 +894,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
@ -919,7 +919,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeBehavior>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",
routeValues: {
@ -942,7 +942,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",
routeValues: {
@ -953,7 +953,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
}
/**
* Removes a work itewm type in the process.
* Removes a work item type in the process.
*
* @param processId - The ID of the process
* @param witRefName - The reference name of the work item type
@ -964,7 +964,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",
routeValues: {
@ -992,7 +992,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
};
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",
routeValues: {
processId: processId,
@ -1018,7 +1018,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
};
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeModel[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",
routeValues: {
processId: processId
@ -1041,7 +1041,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeModel> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeModel>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",
routeValues: {
@ -1066,7 +1066,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "POST",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",
routeValues: {
@ -1091,7 +1091,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",
routeValues: {
processId: processId,
@ -1113,7 +1113,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2[]> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2[]>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",
routeValues: {
processId: processId,
@ -1136,7 +1136,7 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
): Promise<void> {
return this.beginRequest<void>({
apiVersion: "5.2-preview.1",
apiVersion: "7.1-preview.1",
method: "DELETE",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",
routeValues: {
@ -1147,4 +1147,29 @@ export class WorkItemTrackingProcessDefinitionsRestClient extends RestClientBase
});
}
/**
* Updates a single field in the scope of the given process and work item type.
*
* @param field - The model with which to update the field
* @param processId - The ID of the process
* @param witRefNameForFields - Work item type reference name for fields
*/
public async updateWorkItemTypeField(
field: WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2,
processId: string,
witRefNameForFields: string
): Promise<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2> {
return this.beginRequest<WorkItemTrackingProcessDefinitions.WorkItemTypeFieldModel2>({
apiVersion: "7.1-preview.1",
method: "PATCH",
routeTemplate: "_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",
routeValues: {
processId: processId,
witRefNameForFields: witRefNameForFields
},
body: field
});
}
}