azure-devops-node-api
Version:
Node client for Azure DevOps and TFS REST APIs
1,943 lines • 85.9 kB
TypeScript
import DistributedTaskCommonInterfaces = require("../interfaces/DistributedTaskCommonInterfaces");
import FormInputInterfaces = require("../interfaces/common/FormInputInterfaces");
import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
export declare enum AadLoginPromptOption {
/**
* Do not provide a prompt option
*/
NoOption = 0,
/**
* Force the user to login again.
*/
Login = 1,
/**
* Force the user to select which account they are logging in with instead of automatically picking the user up from the session state. NOTE: This does not work for switching between the variants of a dual-homed user.
*/
SelectAccount = 2,
/**
* Force the user to login again. <remarks> Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login. </remarks>
*/
FreshLogin = 3,
/**
* Force the user to login again with mfa. <remarks> Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login, if MFA is required. </remarks>
*/
FreshLoginWithMfa = 4
}
export interface AadOauthTokenRequest {
refresh?: boolean;
resource?: string;
tenantId?: string;
token?: string;
}
export interface AadOauthTokenResult {
accessToken?: string;
refreshTokenCache?: string;
}
export interface AgentChangeEvent {
agent?: TaskAgent;
eventType?: string;
pool?: TaskAgentPoolReference;
poolId?: number;
timeStamp?: Date;
}
export interface AgentJobRequestMessage extends JobRequestMessage {
lockedUntil?: Date;
lockToken?: string;
requestId?: number;
tasks?: TaskInstance[];
}
export interface AgentMigrationMessage {
accessToken?: string;
}
export interface AgentPoolEvent {
eventType?: string;
pool?: TaskAgentPool;
}
export interface AgentQueueEvent {
eventType?: string;
queue?: TaskAgentQueue;
}
export interface AgentQueuesEvent {
eventType?: string;
queues?: TaskAgentQueue[];
}
export interface AgentRefreshMessage {
agentId?: number;
targetVersion?: string;
timeout?: any;
}
export declare enum AuditAction {
Add = 1,
Update = 2,
Delete = 3,
Undelete = 4
}
export interface AuthenticationSchemeReference {
inputs?: {
[key: string]: string;
};
type?: string;
}
export interface AuthorizationHeader {
/**
* Gets or sets the name of authorization header.
*/
name?: string;
/**
* Gets or sets the value of authorization header.
*/
value?: string;
}
export interface AzureKeyVaultPermission extends AzureResourcePermission {
vault?: string;
}
export interface AzureKeyVaultVariableGroupProviderData extends VariableGroupProviderData {
lastRefreshedOn?: Date;
serviceEndpointId?: string;
vault?: string;
}
export interface AzureKeyVaultVariableValue extends VariableValue {
contentType?: string;
enabled?: boolean;
expires?: Date;
}
/**
* Azure Management Group
*/
export interface AzureManagementGroup {
/**
* Display name of azure management group
*/
displayName?: string;
/**
* Id of azure management group
*/
id?: string;
/**
* Azure management group name
*/
name?: string;
/**
* Id of tenant from which azure management group belongs
*/
tenantId?: string;
}
/**
* Azure management group query result
*/
export interface AzureManagementGroupQueryResult {
/**
* Error message in case of an exception
*/
errorMessage?: string;
/**
* List of azure management groups
*/
value?: AzureManagementGroup[];
}
export interface AzurePermission {
provisioned?: boolean;
resourceProvider?: string;
}
export interface AzureResourcePermission extends AzurePermission {
resourceGroup?: string;
}
export interface AzureRoleAssignmentPermission extends AzurePermission {
roleAssignmentId?: string;
}
export interface AzureSpnOperationStatus {
state?: string;
statusMessage?: string;
}
export interface AzureSubscription {
displayName?: string;
subscriptionId?: string;
subscriptionTenantId?: string;
subscriptionTenantName?: string;
}
export interface AzureSubscriptionQueryResult {
errorMessage?: string;
value?: AzureSubscription[];
}
export interface ClientCertificate {
/**
* Gets or sets the value of client certificate.
*/
value?: string;
}
export interface CounterVariable {
prefix?: string;
seed?: number;
value?: number;
}
export interface DataSource {
authenticationScheme?: AuthenticationSchemeReference;
endpointUrl?: string;
headers?: AuthorizationHeader[];
name?: string;
resourceUrl?: string;
resultSelector?: string;
}
export interface DataSourceBinding extends DistributedTaskCommonInterfaces.DataSourceBindingBase {
}
export interface DataSourceDetails {
dataSourceName?: string;
dataSourceUrl?: string;
headers?: AuthorizationHeader[];
parameters?: {
[key: string]: string;
};
resourceUrl?: string;
resultSelector?: string;
}
export interface Demand {
name?: string;
value?: string;
}
export interface DemandEquals extends Demand {
}
export interface DemandExists extends Demand {
}
export interface DemandMinimumVersion extends Demand {
}
export interface DependencyBinding {
key?: string;
value?: string;
}
export interface DependencyData {
input?: string;
map?: {
key: string;
value: {
key: string;
value: string;
}[];
}[];
}
export interface DependsOn {
input?: string;
map?: DependencyBinding[];
}
export interface DeploymentGatesChangeEvent {
gateNames?: string[];
}
/**
* Deployment group.
*/
export interface DeploymentGroup extends DeploymentGroupReference {
/**
* Description of the deployment group.
*/
description?: string;
/**
* Number of deployment targets in the deployment group.
*/
machineCount?: number;
/**
* List of deployment targets in the deployment group.
*/
machines?: DeploymentMachine[];
/**
* List of unique tags across all deployment targets in the deployment group.
*/
machineTags?: string[];
}
/**
* This is useful in getting a list of deployment groups, filtered for which caller has permissions to take a particular action.
*/
export declare enum DeploymentGroupActionFilter {
/**
* All deployment groups.
*/
None = 0,
/**
* Only deployment groups for which caller has **manage** permission.
*/
Manage = 2,
/**
* Only deployment groups for which caller has **use** permission.
*/
Use = 16
}
/**
* Properties to create Deployment group.
*/
export interface DeploymentGroupCreateParameter {
/**
* Description of the deployment group.
*/
description?: string;
/**
* Name of the deployment group.
*/
name?: string;
/**
* Deployment pool in which deployment agents are registered. This is obsolete. Kept for compatibility. Will be marked obsolete explicitly by M132.
*/
pool?: DeploymentGroupCreateParameterPoolProperty;
/**
* Identifier of the deployment pool in which deployment agents are registered.
*/
poolId?: number;
}
/**
* Properties of Deployment pool to create Deployment group.
*/
export interface DeploymentGroupCreateParameterPoolProperty {
/**
* Deployment pool identifier.
*/
id?: number;
}
/**
* Properties to be included or expanded in deployment group objects. This is useful when getting a single or list of deployment grouops.
*/
export declare enum DeploymentGroupExpands {
/**
* No additional properties.
*/
None = 0,
/**
* Deprecated: Include all the deployment targets.
*/
Machines = 2,
/**
* Include unique list of tags across all deployment targets.
*/
Tags = 4
}
/**
* Deployment group metrics.
*/
export interface DeploymentGroupMetrics {
/**
* List of deployment group properties. And types of metrics provided for those properties.
*/
columnsHeader?: MetricsColumnsHeader;
/**
* Deployment group.
*/
deploymentGroup?: DeploymentGroupReference;
/**
* Values of properties and the metrics. E.g. 1: total count of deployment targets for which 'TargetState' is 'offline'. E.g. 2: Average time of deployment to the deployment targets for which 'LastJobStatus' is 'passed' and 'TargetState' is 'online'.
*/
rows?: MetricsRow[];
}
/**
* Deployment group reference. This is useful for referring a deployment group in another object.
*/
export interface DeploymentGroupReference {
/**
* Deployment group identifier.
*/
id?: number;
/**
* Name of the deployment group.
*/
name?: string;
/**
* Deployment pool in which deployment agents are registered.
*/
pool?: TaskAgentPoolReference;
/**
* Project to which the deployment group belongs.
*/
project?: ProjectReference;
}
/**
* Deployment group update parameter.
*/
export interface DeploymentGroupUpdateParameter {
/**
* Description of the deployment group.
*/
description?: string;
/**
* Name of the deployment group.
*/
name?: string;
}
/**
* Deployment target.
*/
export interface DeploymentMachine {
/**
* Deployment agent.
*/
agent?: TaskAgent;
/**
* Deployment target Identifier.
*/
id?: number;
/**
* Properties of the deployment target.
*/
properties?: any;
/**
* Tags of the deployment target.
*/
tags?: string[];
}
export interface DeploymentMachineChangedData extends DeploymentMachine {
addedTags?: string[];
deletedTags?: string[];
}
export declare enum DeploymentMachineExpands {
None = 0,
Capabilities = 2,
AssignedRequest = 4
}
export interface DeploymentMachineGroup extends DeploymentMachineGroupReference {
machines?: DeploymentMachine[];
size?: number;
}
export interface DeploymentMachineGroupReference {
id?: number;
name?: string;
pool?: TaskAgentPoolReference;
project?: ProjectReference;
}
export interface DeploymentMachinesChangeEvent {
machineGroupReference?: DeploymentGroupReference;
machines?: DeploymentMachineChangedData[];
}
/**
* Deployment pool summary.
*/
export interface DeploymentPoolSummary {
/**
* List of deployment groups referring to the deployment pool.
*/
deploymentGroups?: DeploymentGroupReference[];
/**
* Number of deployment agents that are offline.
*/
offlineAgentsCount?: number;
/**
* Number of deployment agents that are online.
*/
onlineAgentsCount?: number;
/**
* Deployment pool.
*/
pool?: TaskAgentPoolReference;
/**
* Virtual machine Resource referring in pool.
*/
resource?: EnvironmentResourceReference;
}
/**
* Properties to be included or expanded in deployment pool summary objects. This is useful when getting a single or list of deployment pool summaries.
*/
export declare enum DeploymentPoolSummaryExpands {
/**
* No additional properties
*/
None = 0,
/**
* Include deployment groups referring to the deployment pool.
*/
DeploymentGroups = 2,
/**
* Include Resource referring to the deployment pool.
*/
Resource = 4
}
/**
* Properties to be included or expanded in deployment target objects. This is useful when getting a single or list of deployment targets.
*/
export declare enum DeploymentTargetExpands {
/**
* No additional properties.
*/
None = 0,
/**
* Include capabilities of the deployment agent.
*/
Capabilities = 2,
/**
* Include the job request assigned to the deployment agent.
*/
AssignedRequest = 4,
/**
* Include the last completed job request of the deployment agent.
*/
LastCompletedRequest = 8
}
/**
* Deployment target update parameter.
*/
export interface DeploymentTargetUpdateParameter {
/**
* Identifier of the deployment target.
*/
id?: number;
tags?: string[];
}
export interface DiagnosticLogMetadata {
agentId?: number;
agentName?: string;
fileName?: string;
phaseName?: string;
phaseResult?: string;
poolId?: number;
}
export interface EndpointAuthorization {
/**
* Gets or sets the parameters for the selected authorization scheme.
*/
parameters?: {
[key: string]: string;
};
/**
* Gets or sets the scheme used for service endpoint authentication.
*/
scheme?: string;
}
/**
* Represents url of the service endpoint.
*/
export interface EndpointUrl {
/**
* Gets or sets the dependency bindings.
*/
dependsOn?: DependsOn;
/**
* Gets or sets the display name of service endpoint url.
*/
displayName?: string;
/**
* Gets or sets the help text of service endpoint url.
*/
helpText?: string;
/**
* Gets or sets the visibility of service endpoint url.
*/
isVisible?: string;
/**
* Gets or sets the value of service endpoint url.
*/
value?: string;
}
/**
* This is useful in getting a list of Environments, filtered for which caller has permissions to take a particular action.
*/
export declare enum EnvironmentActionFilter {
/**
* All environments for which user has **view** permission.
*/
None = 0,
/**
* Only environments for which caller has **manage** permission.
*/
Manage = 2,
/**
* Only environments for which caller has **use** permission.
*/
Use = 16
}
/**
* Properties to create Environment.
*/
export interface EnvironmentCreateParameter {
/**
* Description of the environment.
*/
description?: string;
/**
* Name of the environment.
*/
name?: string;
}
/**
* EnvironmentDeploymentExecutionRecord.
*/
export interface EnvironmentDeploymentExecutionRecord {
/**
* Definition of the environment deployment execution owner
*/
definition?: TaskOrchestrationOwner;
/**
* Id of the Environment
*/
environmentId?: number;
/**
* Finish time of the environment deployment execution
*/
finishTime?: Date;
/**
* Id of the Environment deployment execution history record
*/
id?: number;
/**
* Job Attempt
*/
jobAttempt?: number;
/**
* Job name
*/
jobName?: string;
/**
* Owner of the environment deployment execution record
*/
owner?: TaskOrchestrationOwner;
/**
* Plan Id
*/
planId?: string;
/**
* Plan type of the environment deployment execution record
*/
planType?: string;
/**
* Queue time of the environment deployment execution
*/
queueTime?: Date;
/**
* Request identifier of the Environment deployment execution history record
*/
requestIdentifier?: string;
/**
* Resource Id
*/
resourceId?: number;
/**
* Result of the environment deployment execution
*/
result?: TaskResult;
/**
* Project Id
*/
scopeId?: string;
/**
* Service owner Id
*/
serviceOwner?: string;
/**
* Stage Attempt
*/
stageAttempt?: number;
/**
* Stage name
*/
stageName?: string;
/**
* Start time of the environment deployment execution
*/
startTime?: Date;
}
/**
* Properties to be included or expanded in environment objects. This is useful when getting a single environment.
*/
export declare enum EnvironmentExpands {
/**
* No additional properties
*/
None = 0,
/**
* Include resource references referring to the environment.
*/
ResourceReferences = 1
}
/**
* Environment.
*/
export interface EnvironmentInstance {
/**
* Identity reference of the user who created the Environment.
*/
createdBy?: VSSInterfaces.IdentityRef;
/**
* Creation time of the Environment
*/
createdOn?: Date;
/**
* Description of the Environment.
*/
description?: string;
/**
* Id of the Environment
*/
id?: number;
/**
* Identity reference of the user who last modified the Environment.
*/
lastModifiedBy?: VSSInterfaces.IdentityRef;
/**
* Last modified time of the Environment
*/
lastModifiedOn?: Date;
/**
* Name of the Environment.
*/
name?: string;
/**
* Project information for environment.
*/
project?: ProjectReference;
resources?: EnvironmentResourceReference[];
}
/**
* EnvironmentLinkedResourceReference.
*/
export interface EnvironmentLinkedResourceReference {
/**
* Id of the resource.
*/
id?: string;
/**
* Type of resource.
*/
typeName?: string;
}
export interface EnvironmentReference {
id?: number;
name?: string;
}
export interface EnvironmentResource {
createdBy?: VSSInterfaces.IdentityRef;
createdOn?: Date;
environmentReference?: EnvironmentReference;
id?: number;
lastModifiedBy?: VSSInterfaces.IdentityRef;
lastModifiedOn?: Date;
name?: string;
/**
* Tags of the Environment Resource.
*/
tags?: string[];
/**
* Environment resource type
*/
type?: EnvironmentResourceType;
}
/**
* EnvironmentResourceDeploymentExecutionRecord.
*/
export interface EnvironmentResourceDeploymentExecutionRecord {
/**
* Id of the Environment
*/
environmentId?: number;
/**
* Finish time of the environment resource deployment execution
*/
finishTime?: Date;
/**
* Id of the Environment deployment execution history record
*/
requestId?: number;
/**
* Resource Id
*/
resourceId?: number;
/**
* Result of the environment deployment execution
*/
result?: TaskResult;
/**
* Start time of the environment resource deployment execution
*/
startTime?: Date;
}
/**
* EnvironmentResourceReference.
*/
export interface EnvironmentResourceReference {
/**
* Id of the resource.
*/
id?: number;
/**
* Name of the resource.
*/
name?: string;
/**
* Tags of the Environment Resource Reference.
*/
tags?: string[];
/**
* Type of the resource.
*/
type?: EnvironmentResourceType;
}
/**
* EnvironmentResourceType.
*/
export declare enum EnvironmentResourceType {
Undefined = 0,
/**
* Unknown resource type
*/
Generic = 1,
/**
* Virtual machine resource type
*/
VirtualMachine = 2,
/**
* Kubernetes resource type
*/
Kubernetes = 4
}
/**
* Properties to update Environment.
*/
export interface EnvironmentUpdateParameter {
/**
* Description of the environment.
*/
description?: string;
/**
* Name of the environment.
*/
name?: string;
}
export interface EventsConfig {
}
export interface ExpressionValidationItem extends ValidationItem {
}
export interface HelpLink {
text?: string;
url?: string;
}
export interface InputBindingContext {
/**
* Value of the input
*/
value?: string;
}
export interface InputValidationItem extends ValidationItem {
/**
* Provides binding context for the expression to evaluate
*/
context?: InputBindingContext;
}
export interface InputValidationRequest {
inputs?: {
[key: string]: ValidationItem;
};
}
export interface Issue {
category?: string;
data?: {
[key: string]: string;
};
message?: string;
type?: IssueType;
}
export declare enum IssueType {
Error = 1,
Warning = 2
}
export interface JobAssignedEvent extends JobEvent {
request?: TaskAgentJobRequest;
}
export interface JobCancelMessage {
jobId?: string;
timeout?: any;
}
export interface JobCompletedEvent extends JobEvent {
requestId?: number;
result?: TaskResult;
}
/**
* Represents the context of variables and vectors for a job request.
*/
export interface JobEnvironment {
endpoints?: ServiceEndpoint[];
mask?: MaskHint[];
options?: {
[key: string]: JobOption;
};
secureFiles?: SecureFile[];
/**
* Gets or sets the endpoint used for communicating back to the calling service.
*/
systemConnection?: ServiceEndpoint;
variables?: {
[key: string]: string;
};
}
export interface JobEvent {
jobId?: string;
name?: string;
}
export interface JobEventConfig {
timeout?: string;
}
export interface JobEventsConfig extends EventsConfig {
jobAssigned?: JobEventConfig;
jobCompleted?: JobEventConfig;
jobStarted?: JobEventConfig;
}
/**
* Represents an option that may affect the way an agent runs the job.
*/
export interface JobOption {
data?: {
[key: string]: string;
};
/**
* Gets the id of the option.
*/
id?: string;
}
export interface JobRequestMessage {
environment?: JobEnvironment;
jobId?: string;
jobName?: string;
jobRefName?: string;
messageType?: string;
plan?: TaskOrchestrationPlanReference;
timeline?: TimelineReference;
}
export interface JobStartedEvent extends JobEvent {
}
export interface KubernetesResource extends EnvironmentResource {
clusterName?: string;
namespace?: string;
serviceEndpointId?: string;
}
export interface KubernetesResourceCreateParameters {
clusterName?: string;
name?: string;
namespace?: string;
/**
* Tags of the kubernetes resource.
*/
tags?: string[];
}
export interface KubernetesResourceCreateParametersExistingEndpoint extends KubernetesResourceCreateParameters {
serviceEndpointId?: string;
}
export interface KubernetesResourceCreateParametersNewEndpoint extends KubernetesResourceCreateParameters {
endpoint?: ServiceEndpoint;
}
export interface KubernetesResourcePatchParameters {
authorizationParameters?: {
[key: string]: string;
};
/**
* Provider type (CustomProvider or AzureKubernetesServiceProvider) of the resource to be updated
*/
providerType?: string;
resourceId?: number;
}
export declare enum MachineGroupActionFilter {
None = 0,
Manage = 2,
Use = 16
}
/**
* Represents a purchase of resource units in a secondary marketplace.
*/
export interface MarketplacePurchasedLicense {
/**
* The Marketplace display name.
*/
marketplaceName?: string;
/**
* The name of the identity making the purchase as seen by the marketplace
*/
purchaserName?: string;
/**
* The quantity purchased.
*/
purchaseUnitCount?: number;
}
export interface MaskHint {
type?: MaskType;
value?: string;
}
export declare enum MaskType {
Variable = 1,
Regex = 2
}
/**
* Meta data for a metrics column.
*/
export interface MetricsColumnMetaData {
/**
* Name.
*/
columnName?: string;
/**
* Data type.
*/
columnValueType?: string;
}
/**
* Metrics columns header
*/
export interface MetricsColumnsHeader {
/**
* Properties of deployment group for which metrics are provided. E.g. 1: LastJobStatus E.g. 2: TargetState
*/
dimensions?: MetricsColumnMetaData[];
/**
* The types of metrics. E.g. 1: total count of deployment targets. E.g. 2: Average time of deployment to the deployment targets.
*/
metrics?: MetricsColumnMetaData[];
}
/**
* Metrics row.
*/
export interface MetricsRow {
/**
* The values of the properties mentioned as 'Dimensions' in column header. E.g. 1: For a property 'LastJobStatus' - metrics will be provided for 'passed', 'failed', etc. E.g. 2: For a property 'TargetState' - metrics will be provided for 'online', 'offline' targets.
*/
dimensions?: string[];
/**
* Metrics in serialized format. Should be deserialized based on the data type provided in header.
*/
metrics?: string[];
}
/**
* Represents a downloadable package.
*/
export interface PackageMetadata {
/**
* The date the package was created
*/
createdOn?: Date;
/**
* A direct link to download the package.
*/
downloadUrl?: string;
/**
* The UI uses this to display instructions, i.e. "unzip MyAgent.zip"
*/
filename?: string;
/**
* MD5 hash as a base64 string
*/
hashValue?: string;
/**
* A link to documentation
*/
infoUrl?: string;
/**
* The platform (win7, linux, etc.)
*/
platform?: string;
/**
* The type of package (e.g. "agent")
*/
type?: string;
/**
* The package version.
*/
version?: PackageVersion;
}
export interface PackageVersion {
major?: number;
minor?: number;
patch?: number;
}
export interface PlanEnvironment {
mask?: MaskHint[];
options?: {
[key: string]: JobOption;
};
variables?: {
[key: string]: string;
};
}
export declare enum PlanGroupStatus {
Running = 1,
Queued = 2,
All = 3
}
export declare enum PlanGroupStatusFilter {
Running = 1,
Queued = 2,
All = 3
}
export interface ProjectReference {
id?: string;
name?: string;
}
export interface PublishTaskGroupMetadata {
comment?: string;
parentDefinitionRevision?: number;
preview?: boolean;
taskGroupId?: string;
taskGroupRevision?: number;
}
export interface ResourceFilterOptions {
identities?: VSSInterfaces.IdentityRef[];
resourceTypes?: string[];
}
export interface ResourceFilters {
createdBy?: string[];
resourceType?: string[];
searchText?: string;
}
/**
* Resources include Service Connections, Variable Groups and Secure Files.
*/
export interface ResourceItem {
/**
* Gets or sets the identity who created the resource.
*/
createdBy?: VSSInterfaces.IdentityRef;
/**
* Gets or sets description of the resource.
*/
description?: string;
/**
* Gets or sets icon url of the resource.
*/
iconUrl?: string;
/**
* Gets or sets Id of the resource.
*/
id?: string;
/**
* Indicates whether resource is shared with other projects or not.
*/
isShared?: boolean;
/**
* Gets or sets name of the resource.
*/
name?: string;
/**
* Gets or sets internal properties of the resource.
*/
properties?: {
[key: string]: string;
};
/**
* Gets or sets resource type.
*/
resourceType?: string;
}
export interface ResourceLimit {
failedToReachAllProviders?: boolean;
hostId?: string;
isHosted?: boolean;
isPremium?: boolean;
parallelismTag?: string;
resourceLimitsData?: {
[key: string]: string;
};
totalCount?: number;
totalMinutes?: number;
}
export interface ResourcesHubData {
continuationToken?: string;
hasProjectLevelManagePermission?: boolean;
resourceFilterOptions?: ResourceFilterOptions;
resourceFilters?: ResourceFilters;
resourceItems?: ResourceItem[];
}
export interface ResourceUsage {
resourceLimit?: ResourceLimit;
runningRequests?: TaskAgentJobRequest[];
usedCount?: number;
usedMinutes?: number;
}
export interface ResultTransformationDetails {
resultTemplate?: string;
}
export interface SecureFile {
createdBy?: VSSInterfaces.IdentityRef;
createdOn?: Date;
id?: string;
modifiedBy?: VSSInterfaces.IdentityRef;
modifiedOn?: Date;
name?: string;
properties?: {
[key: string]: string;
};
ticket?: string;
}
export declare enum SecureFileActionFilter {
None = 0,
Manage = 2,
Use = 16
}
export interface SecureFileEvent {
eventType?: string;
projectId?: string;
secureFiles?: SecureFile[];
}
export interface SendJobResponse {
events?: JobEventsConfig;
variables?: {
[key: string]: string;
};
}
export interface ServerExecutionDefinition {
events?: EventsConfig;
handlerName?: string;
}
export interface ServerTaskRequestMessage extends JobRequestMessage {
taskDefinition?: TaskDefinition;
taskInstance?: TaskInstance;
}
/**
* Represents an endpoint which may be used by an orchestration job.
*/
export interface ServiceEndpoint {
/**
* Gets or sets the identity reference for the administrators group of the service endpoint.
*/
administratorsGroup?: VSSInterfaces.IdentityRef;
/**
* Gets or sets the authorization data for talking to the endpoint.
*/
authorization?: EndpointAuthorization;
/**
* Gets or sets the identity reference for the user who created the Service endpoint.
*/
createdBy?: VSSInterfaces.IdentityRef;
data?: {
[key: string]: string;
};
/**
* Gets or sets the description of endpoint.
*/
description?: string;
groupScopeId?: string;
/**
* Gets or sets the identifier of this endpoint.
*/
id?: string;
/**
* EndPoint state indicator
*/
isReady?: boolean;
/**
* Indicates whether service endpoint is shared with other projects or not.
*/
isShared?: boolean;
/**
* Gets or sets the friendly name of the endpoint.
*/
name?: string;
/**
* Error message during creation/deletion of endpoint
*/
operationStatus?: any;
/**
* Gets or sets the owner of the endpoint.
*/
owner?: string;
/**
* Gets or sets the identity reference for the readers group of the service endpoint.
*/
readersGroup?: VSSInterfaces.IdentityRef;
/**
* Gets or sets the type of the endpoint.
*/
type?: string;
/**
* Gets or sets the url of the endpoint.
*/
url?: string;
}
export interface ServiceEndpointAuthenticationScheme {
/**
* Gets or sets the authorization headers of service endpoint authentication scheme.
*/
authorizationHeaders?: AuthorizationHeader[];
/**
* Gets or sets the certificates of service endpoint authentication scheme.
*/
clientCertificates?: ClientCertificate[];
/**
* Gets or sets the display name for the service endpoint authentication scheme.
*/
displayName?: string;
/**
* Gets or sets the input descriptors for the service endpoint authentication scheme.
*/
inputDescriptors?: FormInputInterfaces.InputDescriptor[];
/**
* Gets or sets the scheme for service endpoint authentication.
*/
scheme?: string;
}
export interface ServiceEndpointDetails {
authorization?: EndpointAuthorization;
data?: {
[key: string]: string;
};
type?: string;
url?: string;
}
/**
* Represents service endpoint execution data.
*/
export interface ServiceEndpointExecutionData {
/**
* Gets the definition of service endpoint execution owner.
*/
definition?: TaskOrchestrationOwner;
/**
* Gets the finish time of service endpoint execution.
*/
finishTime?: Date;
/**
* Gets the Id of service endpoint execution data.
*/
id?: number;
/**
* Gets the owner of service endpoint execution data.
*/
owner?: TaskOrchestrationOwner;
/**
* Gets the plan type of service endpoint execution data.
*/
planType?: string;
/**
* Gets the result of service endpoint execution.
*/
result?: TaskResult;
/**
* Gets the start time of service endpoint execution.
*/
startTime?: Date;
}
export interface ServiceEndpointExecutionRecord {
/**
* Gets the execution data of service endpoint execution.
*/
data?: ServiceEndpointExecutionData;
/**
* Gets the Id of service endpoint.
*/
endpointId?: string;
}
export interface ServiceEndpointExecutionRecordsInput {
data?: ServiceEndpointExecutionData;
endpointIds?: string[];
}
export interface ServiceEndpointRequest {
dataSourceDetails?: DataSourceDetails;
resultTransformationDetails?: ResultTransformationDetails;
serviceEndpointDetails?: ServiceEndpointDetails;
}
export interface ServiceEndpointRequestResult {
errorMessage?: string;
result?: any;
statusCode?: string;
}
/**
* Represents type of the service endpoint.
*/
export interface ServiceEndpointType {
/**
* Authentication scheme of service endpoint type.
*/
authenticationSchemes?: ServiceEndpointAuthenticationScheme[];
/**
* Data sources of service endpoint type.
*/
dataSources?: DataSource[];
/**
* Dependency data of service endpoint type.
*/
dependencyData?: DependencyData[];
/**
* Gets or sets the description of service endpoint type.
*/
description?: string;
/**
* Gets or sets the display name of service endpoint type.
*/
displayName?: string;
/**
* Gets or sets the endpoint url of service endpoint type.
*/
endpointUrl?: EndpointUrl;
/**
* Gets or sets the help link of service endpoint type.
*/
helpLink?: HelpLink;
helpMarkDown?: string;
/**
* Gets or sets the icon url of service endpoint type.
*/
iconUrl?: string;
/**
* Input descriptor of service endpoint type.
*/
inputDescriptors?: FormInputInterfaces.InputDescriptor[];
/**
* Gets or sets the name of service endpoint type.
*/
name?: string;
/**
* Trusted hosts of a service endpoint type.
*/
trustedHosts?: string[];
/**
* Gets or sets the ui contribution id of service endpoint type.
*/
uiContributionId?: string;
}
/**
* A task agent.
*/
export interface TaskAgent extends TaskAgentReference {
/**
* The agent cloud request that's currently associated with this agent.
*/
assignedAgentCloudRequest?: TaskAgentCloudRequest;
/**
* The request which is currently assigned to this agent.
*/
assignedRequest?: TaskAgentJobRequest;
/**
* Authorization information for this agent.
*/
authorization?: TaskAgentAuthorization;
/**
* Date on which this agent was created.
*/
createdOn?: Date;
/**
* The last request which was completed by this agent.
*/
lastCompletedRequest?: TaskAgentJobRequest;
/**
* Maximum job parallelism allowed for this agent.
*/
maxParallelism?: number;
/**
* Pending update for this agent.
*/
pendingUpdate?: TaskAgentUpdate;
properties?: any;
/**
* Date on which the last connectivity status change occurred.
*/
statusChangedOn?: Date;
systemCapabilities?: {
[key: string]: string;
};
userCapabilities?: {
[key: string]: string;
};
}
/**
* Provides data necessary for authorizing the agent using OAuth 2.0 authentication flows.
*/
export interface TaskAgentAuthorization {
/**
* Endpoint used to obtain access tokens from the configured token service.
*/
authorizationUrl?: string;
/**
* Client identifier for this agent.
*/
clientId?: string;
/**
* Public key used to verify the identity of this agent.
*/
publicKey?: TaskAgentPublicKey;
}
export interface TaskAgentCloud {
/**
* Gets or sets a AcquireAgentEndpoint using which a request can be made to acquire new agent
*/
acquireAgentEndpoint?: string;
acquisitionTimeout?: number;
agentCloudId?: number;
getAccountParallelismEndpoint?: string;
getAgentDefinitionEndpoint?: string;
getAgentRequestStatusEndpoint?: string;
id?: string;
/**
* Signifies that this Agent Cloud is internal and should not be user-manageable
*/
internal?: boolean;
maxParallelism?: number;
name?: string;
releaseAgentEndpoint?: string;
sharedSecret?: string;
/**
* Gets or sets the type of the endpoint.
*/
type?: string;
}
export interface TaskAgentCloudRequest {
agent?: TaskAgentReference;
agentCloudId?: number;
agentConnectedTime?: Date;
agentData?: any;
agentSpecification?: any;
pool?: TaskAgentPoolReference;
provisionedTime?: Date;
provisionRequestTime?: Date;
releaseRequestTime?: Date;
requestId?: string;
}
export interface TaskAgentCloudType {
/**
* Gets or sets the display name of agent cloud type.
*/
displayName?: string;
/**
* Gets or sets the input descriptors
*/
inputDescriptors?: FormInputInterfaces.InputDescriptor[];
/**
* Gets or sets the name of agent cloud type.
*/
name?: string;
}
export interface TaskAgentDelaySource {
delays?: any[];
taskAgent?: TaskAgentReference;
}
export interface TaskAgentJob {
container?: string;
id?: string;
name?: string;
sidecarContainers?: {
[key: string]: string;
};
steps?: TaskAgentJobStep[];
variables?: TaskAgentJobVariable[];
}
/**
* A job request for an agent.
*/
export interface TaskAgentJobRequest {
agentDelays?: TaskAgentDelaySource[];
agentSpecification?: any;
/**
* The date/time this request was assigned.
*/
assignTime?: Date;
/**
* Additional data about the request.
*/
data?: {
[key: string]: string;
};
/**
* The pipeline definition associated with this request
*/
definition?: TaskOrchestrationOwner;
/**
* A list of demands required to fulfill this request.
*/
demands?: Demand[];
expectedDuration?: any;
/**
* The date/time this request was finished.
*/
finishTime?: Date;
/**
* The host which triggered this request.
*/
hostId?: string;
/**
* ID of the job resulting from this request.
*/
jobId?: string;
/**
* Name of the job resulting from this request.
*/
jobName?: string;
/**
* The deadline for the agent to renew the lock.
*/
lockedUntil?: Date;
matchedAgents?: TaskAgentReference[];
matchesAllAgentsInPool?: boolean;
orchestrationId?: string;
/**
* The pipeline associated with this request
*/
owner?: TaskOrchestrationOwner;
planGroup?: string;
/**
* Internal ID for the orchestration plan connected with this request.
*/
planId?: string;
/**
* Internal detail representing the type of orchestration plan.
*/
planType?: string;
/**
* The ID of the pool this request targets
*/
poolId?: number;
/**
* The ID of the queue this request targets
*/
queueId?: number;
/**
* The date/time this request was queued.
*/
queueTime?: Date;
/**
* The date/time this request was receieved by an agent.
*/
receiveTime?: Date;
/**
* ID of the request.
*/
requestId?: number;
/**
* The agent allocated for this request.
*/
reservedAgent?: TaskAgentReference;
/**
* The result of this request.
*/
result?: TaskResult;
/**
* Scope of the pipeline; matches the project ID.
*/
scopeId?: string;
/**
* The service which owns this request.
*/
serviceOwner?: string;
statusMessage?: string;
userDelayed?: boolean;
}
/**
* This is useful in getting a list of deployment targets, filtered by the result of their last job.
*/
export declare enum TaskAgentJobResultFilter {
/**
* Only those deployment targets on which last job failed (**Abandoned**, **Canceled**, **Failed**, **Skipped**).
*/
Failed = 1,
/**
* Only those deployment targets on which last job Passed (**Succeeded**, **Succeeded with issues**).
*/
Passed = 2,
/**
* Only those deployment targets that never executed a job.
*/
NeverDeployed = 4,
/**
* All deployment targets.
*/
All = 7
}
export interface TaskAgentJobStep {
condition?: string;
continueOnError?: boolean;
enabled?: boolean;
env?: {
[key: string]: string;
};
id?: string;
inputs?: {
[key: string]: string;
};
name?: string;
task?: TaskAgentJobTask;
timeoutInMinutes?: number;
type?: TaskAgentJobStepType;
}
export declare enum TaskAgentJobStepType {
Task = 1,
Action = 2
}
export interface TaskAgentJobTask {
id?: string;
name?: string;
version?: string;
}
export interface TaskAgentJobVariable {
name?: string;
secret?: boolean;
value?: string;
}
export interface TaskAgentManualUpdate extends TaskAgentUpdateReason {
}
/**
* Provides a contract for receiving messages from the task orchestrator.
*/
export interface TaskAgentMessage {
/**
* Gets or sets the body of the message. If the <c>IV</c> property is provided the body will need to be decrypted using the <c>TaskAgentSession.EncryptionKey</c> value in addition to the <c>IV</c>.
*/
body?: string;
/**
* Gets or sets the initialization vector used to encrypt this message.
*/
iV?: number[];
/**
* Gets or sets the message identifier.
*/
messageId?: number;
/**
* Gets or sets the message type, describing the data contract found in <c>TaskAgentMessage.Body</c>.
*/
messageType?: string;
}
export interface TaskAgentMinAgentVersionRequiredUpdate extends TaskAgentUpdateReason {
jobDefinition?: TaskOrchestrationOwner;
jobOwner?: TaskOrchestrationOwner;
minAgentVersion?: Demand;
}
/**
* An organization-level grouping of agents.
*/
export interface TaskAgentPool extends TaskAgentPoolReference {
/**
* The ID of the associated agent cloud.
*/
agentCloudId?: number;
/**
* Whether or not a queue should be automatically provisioned for each project collection.
*/
autoProvision?: boolean;
/**
* Whether or not the pool should autosize itself based on the Agent Cloud Provider settings.
*/
autoSize?: boolean;
/**
* Creator of the pool. The creator of the pool is automatically added into the administrators group for the pool on creation.
*/
createdBy?: VSSInterfaces.IdentityRef;
/**
* The date/time of the pool creation.
*/
createdOn?: Date;
/**
* Owner or administrator of the pool.
*/
owner?: VSSInterfaces.IdentityRef;
properties?: any;
/**
* Target parallelism.
*/
targetSize?: number;
}
/**
* Filters pools based on whether the calling user has permission to use or manage the pool.
*/
export declare enum TaskAgentPoolActionFilter {
None = 0,
Manage = 2,
Use = 16
}
export interface TaskAgentPoolMaintenanceDefinition {
/**
* Enable maintenance
*/
enabled?: boolean;
/**
* Id
*/
id?: number;
/**
* Maintenance job timeout per agent
*/
jobTimeoutInMinutes?: number;
/**
* Max percentage of agents within a pool running maintenance job at given time
*/
maxConcurrentAgentsPercentage?: number;
options?: TaskAgentPoolMaintenanceOptions;
/**
* Pool reference for the maintenance definition
*/
pool?: TaskAgentPoolReference;
retentionPolicy?: TaskAgentPoolMaintenanceRetentionPolicy;
scheduleSetting?: TaskAgentPoolMaintenanceSchedule;
}
export interface TaskAgentPoolMaintenanceJob {
/**
* The maintenance definition for the maintenance job
*/
definitionId?: number;
/**
* The total error counts during the maintenance job
*/
errorCount?: number;
/**
* Time that the maintenance job was completed
*/
finishTime?: Date;
/**
* Id of the maintenance job
*/
jobId?: number;
/**
* The log download url for the maintenance job
*/
logsDownloadUrl?: string;
/**
* Orchestration/Plan Id for the maintenance job
*/
orchestrationId?: string;
/**
* Pool reference for the maintenance job
*/
pool?: TaskAgentPoolReference;
/**
* Time that the maintenance job was queued
*/
queueTime?: Date;
/**
* The identity that queued the maintenance job
*/
requestedBy?: VSSInterfaces.IdentityRef;
/**
* The maintenance job result
*/
result?: TaskAgentPoolMaintenanceJobResult;
/**
* Time that the maintenance job was started
*/
startTime?: Date;
/**
* Status of the maintenance job
*/
status?: TaskAgentPoolMaintenanceJobStatus;
targetAgents?: TaskAgentPoolMaintenanceJobTargetAgent[];
/**
* The total warning counts during the maintenance job
*/
warningCount?: number;
}
export declare enum TaskAgentPoolMaintenanceJobResult {
Succeeded = 1,
Failed = 2,
Canceled = 4
}
export declare enum TaskAgentPoolMaintenanceJobStatus {
InProgress = 1,
Completed = 2,
Cancelling = 4,
Queued = 8
}
export interface TaskAgentPoolMaintenanceJobTargetAgent {
agent?: TaskAgentReference;
jobId?: number;
result?: TaskAgentPoolMaintenanceJobResult;
status?: TaskAgentPoolMaintenanceJobStatus;
}
export interface TaskAgentPoolMaintenanceOptions {
/**
* time to consider a System.DefaultWorkingDirectory is stale
*/
workingDirectoryExpirationInDays?: number;
}
export interface TaskAgentPoolMaintenanceRetentionPolicy {
/**
* Number of records to keep for maintenance job executed with this definition.
*/
numberOfHistoryRecordsToKeep?: number;
}
export interface TaskAgentPoolMaintenanceSchedule {
/**
* Days for a build (flags enum for days of the week)
*/
daysToBuild?: TaskAgentPoolMaintenanceScheduleDays;
/**
* The Job Id of the Scheduled job that will queue the pool maintenance job.
*/
scheduleJobId?: string;
/**
* Local timezone hour to start
*/
startHours?: number;
/**
* Local timezone minute to start
*/
startMinutes?: number;
/**
* Time zone of the build schedule (string representation of the time zone id)
*/
timeZoneId?: string;
}
export declare enum TaskAgentPoolMaintenanceScheduleDays {
/**
* Do not run.
*/
None = 0,
/**
* Run on Monday.
*/
Monday = 1,
/**
* Run on Tuesday.
*/
Tuesday = 2,
/**
* Run on Wednesday.
*/
Wednesday = 4,
/**
* Run on Thursday.
*/
Thursday = 8,
/**
* Run on Friday.
*/
Friday = 16,
/**
* Run on Saturday.
*/
Saturday = 32,
/**
* Run on Sunday.
*/
Sunday = 64,
/**
* Run on all days of the week.
*/
All = 127
}
export interface TaskAgentPoolReference {
id?: number;
/**
* Gets or sets a value indicating whether or not this pool is managed by the service.
*/
isHosted?: boolean;
/**
* Determines whether the pool is legacy.
*/
isLegacy?: boolean;
name?: string;
/**
* Gets or sets the type of the pool
*/
poolType?: TaskAgentPoolType;
scope?: string;
/**
* Gets the current size of the pool.
*/
size?: number;
}
export interface TaskAgentPoolStatus extends TaskAgentPoolReference {
/**
* Number of requests queued and assigned to an agent. Not running yet.
*/
assignedRequestCount?: number;
/**
* Number of queued requests which are not assigned to any agents
*/
queuedRequestCount?: number;
/**
* Number of currently running requests
*/
runningRequestCount?: number;
}
export interface TaskAgentPoolSummary {
columnsHeader?: MetricsColumnsHeader;
deploymentGroups?: DeploymentGroupReference[];
pool?: TaskAgentPoolReference;
queues?: TaskAgentQueue[];
rows?: MetricsRow[];
}
/**
* The type of agent pool.
*/
export declare enum TaskAgentPoolType {
/**
* A typical poo