mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
cleanup
This commit is contained in:
+794
@@ -0,0 +1,794 @@
|
||||
/// <reference types="node" />
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import BuildInterfaces = require("./interfaces/BuildInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
export interface IBuildApi extends basem.ClientApiBase {
|
||||
createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise<BuildInterfaces.BuildArtifact>;
|
||||
getArtifact(buildId: number, artifactName: string, project?: string): Promise<BuildInterfaces.BuildArtifact>;
|
||||
getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise<NodeJS.ReadableStream>;
|
||||
getArtifacts(buildId: number, project?: string): Promise<BuildInterfaces.BuildArtifact[]>;
|
||||
getFile(buildId: number, artifactName: string, fileId: string, fileName: string, project?: string): Promise<NodeJS.ReadableStream>;
|
||||
getAttachments(project: string, buildId: number, type: string): Promise<BuildInterfaces.Attachment[]>;
|
||||
getAttachment(project: string, buildId: number, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
getBadge(project: string, definitionId: number, branchName?: string): Promise<string>;
|
||||
listBranches(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<string[]>;
|
||||
getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise<BuildInterfaces.BuildBadge>;
|
||||
getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise<string>;
|
||||
deleteBuild(buildId: number, project?: string): Promise<void>;
|
||||
getBuild(buildId: number, project?: string, propertyFilters?: string): Promise<BuildInterfaces.Build>;
|
||||
getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minTime?: Date, maxTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string, buildIds?: number[], repositoryId?: string, repositoryType?: string): Promise<BuildInterfaces.Build[]>;
|
||||
queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string, sourceBuildId?: number): Promise<BuildInterfaces.Build>;
|
||||
updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string, retry?: boolean): Promise<BuildInterfaces.Build>;
|
||||
updateBuilds(builds: BuildInterfaces.Build[], project?: string): Promise<BuildInterfaces.Build[]>;
|
||||
getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise<BuildInterfaces.Change[]>;
|
||||
getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise<BuildInterfaces.Change[]>;
|
||||
getBuildController(controllerId: number): Promise<BuildInterfaces.BuildController>;
|
||||
getBuildControllers(name?: string): Promise<BuildInterfaces.BuildController[]>;
|
||||
createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
|
||||
deleteDefinition(definitionId: number, project?: string): Promise<void>;
|
||||
getDefinition(definitionId: number, project?: string, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise<BuildInterfaces.BuildDefinition>;
|
||||
getDefinitions(project?: string, name?: string, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string, minMetricsTime?: Date, definitionIds?: number[], path?: string, builtAfter?: Date, notBuiltAfter?: Date, includeAllProperties?: boolean, includeLatestBuilds?: boolean, taskIdFilter?: string, processType?: number, yamlFilename?: string): Promise<BuildInterfaces.BuildDefinitionReference[]>;
|
||||
restoreDefinition(definitionId: number, deleted: boolean, project?: string): Promise<BuildInterfaces.BuildDefinition>;
|
||||
updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
|
||||
getFileContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<NodeJS.ReadableStream>;
|
||||
createFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
|
||||
deleteFolder(project: string, path: string): Promise<void>;
|
||||
getFolders(project: string, path?: string, queryOrder?: BuildInterfaces.FolderQueryOrder): Promise<BuildInterfaces.Folder[]>;
|
||||
updateFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
|
||||
getLatestBuild(project: string, definition: string, branchName?: string): Promise<BuildInterfaces.Build>;
|
||||
getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
getBuildLogLines(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<string[]>;
|
||||
getBuildLogs(project: string, buildId: number): Promise<BuildInterfaces.BuildLog[]>;
|
||||
getBuildLogsZip(project: string, buildId: number): Promise<NodeJS.ReadableStream>;
|
||||
getBuildLogZip(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
getProjectMetrics(project: string, metricAggregationType?: string, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
|
||||
getDefinitionMetrics(project: string, definitionId: number, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
|
||||
getBuildOptionDefinitions(project?: string): Promise<BuildInterfaces.BuildOptionDefinition[]>;
|
||||
getPathContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<BuildInterfaces.SourceRepositoryItem[]>;
|
||||
getBuildProperties(project: string, buildId: number, filter?: string[]): Promise<any>;
|
||||
updateBuildProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, buildId: number): Promise<any>;
|
||||
getDefinitionProperties(project: string, definitionId: number, filter?: string[]): Promise<any>;
|
||||
updateDefinitionProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, definitionId: number): Promise<any>;
|
||||
getPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string): Promise<BuildInterfaces.PullRequest>;
|
||||
getRelatedWorkItemsForCommits(project: string, providerName: string, commits: string[], repositoryId?: string, serviceEndpointId?: string, top?: number): Promise<BuildInterfaces.SourceRelatedWorkItem[]>;
|
||||
getRelatedWorkItemsForPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string, top?: number): Promise<BuildInterfaces.SourceRelatedWorkItem[]>;
|
||||
getBuildReport(project: string, buildId: number, type?: string): Promise<BuildInterfaces.BuildReportMetadata>;
|
||||
getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise<NodeJS.ReadableStream>;
|
||||
listRepositories(project: string, providerName: string, serviceEndpointId?: string, repository?: string, resultSet?: BuildInterfaces.ResultSet, pageResults?: boolean, continuationToken?: string): Promise<BuildInterfaces.SourceRepositories>;
|
||||
authorizeDefinitionResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
|
||||
getDefinitionResources(project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
|
||||
getResourceUsage(): Promise<BuildInterfaces.BuildResourceUsage>;
|
||||
getDefinitionRevisions(project: string, definitionId: number): Promise<BuildInterfaces.BuildDefinitionRevision[]>;
|
||||
getBuildSettings(project?: string): Promise<BuildInterfaces.BuildSettings>;
|
||||
updateBuildSettings(settings: BuildInterfaces.BuildSettings, project?: string): Promise<BuildInterfaces.BuildSettings>;
|
||||
listSourceProviders(project: string): Promise<BuildInterfaces.SourceProviderAttributes[]>;
|
||||
getStatusBadge(project: string, definition: string, branchName?: string, stageName?: string, jobName?: string, configuration?: string, label?: string): Promise<string>;
|
||||
addBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
|
||||
addBuildTags(tags: string[], project: string, buildId: number): Promise<string[]>;
|
||||
deleteBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
|
||||
getBuildTags(project: string, buildId: number): Promise<string[]>;
|
||||
addDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
|
||||
addDefinitionTags(tags: string[], project: string, definitionId: number): Promise<string[]>;
|
||||
deleteDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
|
||||
getDefinitionTags(project: string, definitionId: number, revision?: number): Promise<string[]>;
|
||||
getTags(project: string): Promise<string[]>;
|
||||
deleteTemplate(project: string, templateId: string): Promise<void>;
|
||||
getTemplate(project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
|
||||
getTemplates(project: string): Promise<BuildInterfaces.BuildDefinitionTemplate[]>;
|
||||
saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
|
||||
getTicketedArtifactContentZip(customHeaders: any, buildId: number, projectId: string, artifactName: string, downloadTicket: String): Promise<NodeJS.ReadableStream>;
|
||||
getTicketedLogsContentZip(customHeaders: any, buildId: number, projectId: string, downloadTicket: String): Promise<NodeJS.ReadableStream>;
|
||||
getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number, planId?: string): Promise<BuildInterfaces.Timeline>;
|
||||
restoreWebhooks(triggerTypes: BuildInterfaces.DefinitionTriggerType[], project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<void>;
|
||||
listWebhooks(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<BuildInterfaces.RepositoryWebhook[]>;
|
||||
getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
|
||||
getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
|
||||
getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
|
||||
}
|
||||
export declare class BuildApi extends basem.ClientApiBase implements IBuildApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Associates an artifact with a build.
|
||||
*
|
||||
* @param {BuildInterfaces.BuildArtifact} artifact - The artifact.
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise<BuildInterfaces.BuildArtifact>;
|
||||
/**
|
||||
* Gets a specific artifact for a build.
|
||||
*
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} artifactName - The name of the artifact.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getArtifact(buildId: number, artifactName: string, project?: string): Promise<BuildInterfaces.BuildArtifact>;
|
||||
/**
|
||||
* Gets a specific artifact for a build.
|
||||
*
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} artifactName - The name of the artifact.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets all artifacts for a build.
|
||||
*
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getArtifacts(buildId: number, project?: string): Promise<BuildInterfaces.BuildArtifact[]>;
|
||||
/**
|
||||
* Gets a file from the build.
|
||||
*
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} artifactName - The name of the artifact.
|
||||
* @param {string} fileId - The primary key for the file.
|
||||
* @param {string} fileName - The name that the file will be set to.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getFile(buildId: number, artifactName: string, fileId: string, fileName: string, project?: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets the list of attachments of a specific type that are associated with a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} type - The type of attachment.
|
||||
*/
|
||||
getAttachments(project: string, buildId: number, type: string): Promise<BuildInterfaces.Attachment[]>;
|
||||
/**
|
||||
* Gets a specific attachment.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} timelineId - The ID of the timeline.
|
||||
* @param {string} recordId - The ID of the timeline record.
|
||||
* @param {string} type - The type of the attachment.
|
||||
* @param {string} name - The name of the attachment.
|
||||
*/
|
||||
getAttachment(project: string, buildId: number, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets a badge that indicates the status of the most recent build for a definition.
|
||||
*
|
||||
* @param {string} project - The project ID or name.
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {string} branchName - The name of the branch.
|
||||
*/
|
||||
getBadge(project: string, definitionId: number, branchName?: string): Promise<string>;
|
||||
/**
|
||||
* Gets a list of branches for the given source code repository.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
|
||||
*/
|
||||
listBranches(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<string[]>;
|
||||
/**
|
||||
* Gets a badge that indicates the status of the most recent build for the specified branch.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} repoType - The repository type.
|
||||
* @param {string} repoId - The repository ID.
|
||||
* @param {string} branchName - The branch name.
|
||||
*/
|
||||
getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise<BuildInterfaces.BuildBadge>;
|
||||
/**
|
||||
* Gets a badge that indicates the status of the most recent build for the specified branch.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} repoType - The repository type.
|
||||
* @param {string} repoId - The repository ID.
|
||||
* @param {string} branchName - The branch name.
|
||||
*/
|
||||
getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise<string>;
|
||||
/**
|
||||
* Deletes a build.
|
||||
*
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
deleteBuild(buildId: number, project?: string): Promise<void>;
|
||||
/**
|
||||
* Gets a build
|
||||
*
|
||||
* @param {number} buildId
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} propertyFilters
|
||||
*/
|
||||
getBuild(buildId: number, project?: string, propertyFilters?: string): Promise<BuildInterfaces.Build>;
|
||||
/**
|
||||
* Gets a list of builds.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number[]} definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions.
|
||||
* @param {number[]} queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues.
|
||||
* @param {string} buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search.
|
||||
* @param {Date} minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified.
|
||||
* @param {Date} maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified.
|
||||
* @param {string} requestedFor - If specified, filters to builds requested for the specified user.
|
||||
* @param {BuildInterfaces.BuildReason} reasonFilter - If specified, filters to builds that match this reason.
|
||||
* @param {BuildInterfaces.BuildStatus} statusFilter - If specified, filters to builds that match this status.
|
||||
* @param {BuildInterfaces.BuildResult} resultFilter - If specified, filters to builds that match this result.
|
||||
* @param {string[]} tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags.
|
||||
* @param {string[]} properties - A comma-delimited list of properties to retrieve.
|
||||
* @param {number} top - The maximum number of builds to return.
|
||||
* @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds.
|
||||
* @param {number} maxBuildsPerDefinition - The maximum number of builds to return per definition.
|
||||
* @param {BuildInterfaces.QueryDeletedOption} deletedFilter - Indicates whether to exclude, include, or only return deleted builds.
|
||||
* @param {BuildInterfaces.BuildQueryOrder} queryOrder - The order in which builds should be returned.
|
||||
* @param {string} branchName - If specified, filters to builds that built branches that built this branch.
|
||||
* @param {number[]} buildIds - A comma-delimited list that specifies the IDs of builds to retrieve.
|
||||
* @param {string} repositoryId - If specified, filters to builds that built from this repository.
|
||||
* @param {string} repositoryType - If specified, filters to builds that built from repositories of this type.
|
||||
*/
|
||||
getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minTime?: Date, maxTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string, buildIds?: number[], repositoryId?: string, repositoryType?: string): Promise<BuildInterfaces.Build[]>;
|
||||
/**
|
||||
* Queues a build
|
||||
*
|
||||
* @param {BuildInterfaces.Build} build
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} ignoreWarnings
|
||||
* @param {string} checkInTicket
|
||||
* @param {number} sourceBuildId
|
||||
*/
|
||||
queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string, sourceBuildId?: number): Promise<BuildInterfaces.Build>;
|
||||
/**
|
||||
* Updates a build.
|
||||
*
|
||||
* @param {BuildInterfaces.Build} build - The build.
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} retry
|
||||
*/
|
||||
updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string, retry?: boolean): Promise<BuildInterfaces.Build>;
|
||||
/**
|
||||
* Updates multiple builds.
|
||||
*
|
||||
* @param {BuildInterfaces.Build[]} builds - The builds to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateBuilds(builds: BuildInterfaces.Build[], project?: string): Promise<BuildInterfaces.Build[]>;
|
||||
/**
|
||||
* Gets the changes associated with a build
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
* @param {string} continuationToken
|
||||
* @param {number} top - The maximum number of changes to return
|
||||
* @param {boolean} includeSourceChange
|
||||
*/
|
||||
getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise<BuildInterfaces.Change[]>;
|
||||
/**
|
||||
* Gets the changes made to the repository between two given builds.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} fromBuildId - The ID of the first build.
|
||||
* @param {number} toBuildId - The ID of the last build.
|
||||
* @param {number} top - The maximum number of changes to return.
|
||||
*/
|
||||
getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise<BuildInterfaces.Change[]>;
|
||||
/**
|
||||
* Gets a controller
|
||||
*
|
||||
* @param {number} controllerId
|
||||
*/
|
||||
getBuildController(controllerId: number): Promise<BuildInterfaces.BuildController>;
|
||||
/**
|
||||
* Gets controller, optionally filtered by name
|
||||
*
|
||||
* @param {string} name
|
||||
*/
|
||||
getBuildControllers(name?: string): Promise<BuildInterfaces.BuildController[]>;
|
||||
/**
|
||||
* Creates a new definition.
|
||||
*
|
||||
* @param {BuildInterfaces.BuildDefinition} definition - The definition.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionToCloneId
|
||||
* @param {number} definitionToCloneRevision
|
||||
*/
|
||||
createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
|
||||
/**
|
||||
* Deletes a definition and all associated builds.
|
||||
*
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
deleteDefinition(definitionId: number, project?: string): Promise<void>;
|
||||
/**
|
||||
* Gets a definition, optionally at a specific revision.
|
||||
*
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
|
||||
* @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included.
|
||||
* @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results.
|
||||
* @param {boolean} includeLatestBuilds
|
||||
*/
|
||||
getDefinition(definitionId: number, project?: string, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise<BuildInterfaces.BuildDefinition>;
|
||||
/**
|
||||
* Gets a list of definitions.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} name - If specified, filters to definitions whose names match this pattern.
|
||||
* @param {string} repositoryId - A repository ID. If specified, filters to definitions that use this repository.
|
||||
* @param {string} repositoryType - If specified, filters to definitions that have a repository of this type.
|
||||
* @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - Indicates the order in which definitions should be returned.
|
||||
* @param {number} top - The maximum number of definitions to return.
|
||||
* @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
|
||||
* @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included.
|
||||
* @param {number[]} definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve.
|
||||
* @param {string} path - If specified, filters to definitions under this folder.
|
||||
* @param {Date} builtAfter - If specified, filters to definitions that have builds after this date.
|
||||
* @param {Date} notBuiltAfter - If specified, filters to definitions that do not have builds after this date.
|
||||
* @param {boolean} includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
|
||||
* @param {boolean} includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition.
|
||||
* @param {string} taskIdFilter - If specified, filters to definitions that use the specified task.
|
||||
* @param {number} processType - If specified, filters to definitions with the given process type.
|
||||
* @param {string} yamlFilename - If specified, filters to YAML definitions that match the given filename.
|
||||
*/
|
||||
getDefinitions(project?: string, name?: string, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string, minMetricsTime?: Date, definitionIds?: number[], path?: string, builtAfter?: Date, notBuiltAfter?: Date, includeAllProperties?: boolean, includeLatestBuilds?: boolean, taskIdFilter?: string, processType?: number, yamlFilename?: string): Promise<BuildInterfaces.BuildDefinitionReference[]>;
|
||||
/**
|
||||
* Restores a deleted definition
|
||||
*
|
||||
* @param {number} definitionId - The identifier of the definition to restore.
|
||||
* @param {boolean} deleted - When false, restores a deleted definition.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
restoreDefinition(definitionId: number, deleted: boolean, project?: string): Promise<BuildInterfaces.BuildDefinition>;
|
||||
/**
|
||||
* Updates an existing definition.
|
||||
*
|
||||
* @param {BuildInterfaces.BuildDefinition} definition - The new version of the defintion.
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} secretsSourceDefinitionId
|
||||
* @param {number} secretsSourceDefinitionRevision
|
||||
*/
|
||||
updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
|
||||
/**
|
||||
* Gets the contents of a file in the given source code repository.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
|
||||
* @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
|
||||
* @param {string} path - The path to the file to retrieve, relative to the root of the repository.
|
||||
*/
|
||||
getFileContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Creates a new folder.
|
||||
*
|
||||
* @param {BuildInterfaces.Folder} folder - The folder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path - The full path of the folder.
|
||||
*/
|
||||
createFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
|
||||
/**
|
||||
* Deletes a definition folder. Definitions and their corresponding builds will also be deleted.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path - The full path to the folder.
|
||||
*/
|
||||
deleteFolder(project: string, path: string): Promise<void>;
|
||||
/**
|
||||
* Gets a list of build definition folders.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path - The path to start with.
|
||||
* @param {BuildInterfaces.FolderQueryOrder} queryOrder - The order in which folders should be returned.
|
||||
*/
|
||||
getFolders(project: string, path?: string, queryOrder?: BuildInterfaces.FolderQueryOrder): Promise<BuildInterfaces.Folder[]>;
|
||||
/**
|
||||
* Updates an existing folder at given existing path
|
||||
*
|
||||
* @param {BuildInterfaces.Folder} folder - The new version of the folder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path - The full path to the folder.
|
||||
*/
|
||||
updateFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
|
||||
/**
|
||||
* Gets the latest build for a definition, optionally scoped to a specific branch.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} definition - definition name with optional leading folder path, or the definition id
|
||||
* @param {string} branchName - optional parameter that indicates the specific branch to use
|
||||
*/
|
||||
getLatestBuild(project: string, definition: string, branchName?: string): Promise<BuildInterfaces.Build>;
|
||||
/**
|
||||
* Gets an individual log file for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {number} logId - The ID of the log file.
|
||||
* @param {number} startLine - The start line.
|
||||
* @param {number} endLine - The end line.
|
||||
*/
|
||||
getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets an individual log file for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {number} logId - The ID of the log file.
|
||||
* @param {number} startLine - The start line.
|
||||
* @param {number} endLine - The end line.
|
||||
*/
|
||||
getBuildLogLines(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<string[]>;
|
||||
/**
|
||||
* Gets the logs for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
*/
|
||||
getBuildLogs(project: string, buildId: number): Promise<BuildInterfaces.BuildLog[]>;
|
||||
/**
|
||||
* Gets the logs for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
*/
|
||||
getBuildLogsZip(project: string, buildId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets an individual log file for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {number} logId - The ID of the log file.
|
||||
* @param {number} startLine - The start line.
|
||||
* @param {number} endLine - The end line.
|
||||
*/
|
||||
getBuildLogZip(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets build metrics for a project.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} metricAggregationType - The aggregation type to use (hourly, daily).
|
||||
* @param {Date} minMetricsTime - The date from which to calculate metrics.
|
||||
*/
|
||||
getProjectMetrics(project: string, metricAggregationType?: string, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
|
||||
/**
|
||||
* Gets build metrics for a definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {Date} minMetricsTime - The date from which to calculate metrics.
|
||||
*/
|
||||
getDefinitionMetrics(project: string, definitionId: number, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
|
||||
/**
|
||||
* Gets all build definition options supported by the system.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getBuildOptionDefinitions(project?: string): Promise<BuildInterfaces.BuildOptionDefinition[]>;
|
||||
/**
|
||||
* Gets the contents of a directory in the given source code repository.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
|
||||
* @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
|
||||
* @param {string} path - The path contents to list, relative to the root of the repository.
|
||||
*/
|
||||
getPathContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<BuildInterfaces.SourceRepositoryItem[]>;
|
||||
/**
|
||||
* Gets properties for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties.
|
||||
*/
|
||||
getBuildProperties(project: string, buildId: number, filter?: string[]): Promise<any>;
|
||||
/**
|
||||
* Updates properties for a build.
|
||||
*
|
||||
* @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
*/
|
||||
updateBuildProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, buildId: number): Promise<any>;
|
||||
/**
|
||||
* Gets properties for a definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties.
|
||||
*/
|
||||
getDefinitionProperties(project: string, definitionId: number, filter?: string[]): Promise<any>;
|
||||
/**
|
||||
* Updates properties for a definition.
|
||||
*
|
||||
* @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
*/
|
||||
updateDefinitionProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, definitionId: number): Promise<any>;
|
||||
/**
|
||||
* Gets a pull request object from source provider.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} pullRequestId - Vendor-specific id of the pull request.
|
||||
* @param {string} repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
*/
|
||||
getPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string): Promise<BuildInterfaces.PullRequest>;
|
||||
/**
|
||||
* Gets a list of related work items for a list of commits.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string[]} commits - The comma separated list of vendor-specific identifiers of commits/check-ins.
|
||||
* @param {string} repositoryId - If specified, the vendor-specific identifier or the name of the repository that contains the commits or the pull request.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {number} top - Integer specifying the maximum number of work items to return.
|
||||
*/
|
||||
getRelatedWorkItemsForCommits(project: string, providerName: string, commits: string[], repositoryId?: string, serviceEndpointId?: string, top?: number): Promise<BuildInterfaces.SourceRelatedWorkItem[]>;
|
||||
/**
|
||||
* Gets a list of related work items for a particular Pull Request.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} pullRequestId - The vendor-specific identifier of a Pull Request object.
|
||||
* @param {string} repositoryId - If specified, the vendor-specific identifier or the name of the repository that contains the commits or the pull request.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {number} top - Integer specifying the maximum number of work items to return.
|
||||
*/
|
||||
getRelatedWorkItemsForPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string, top?: number): Promise<BuildInterfaces.SourceRelatedWorkItem[]>;
|
||||
/**
|
||||
* Gets a build report.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} type
|
||||
*/
|
||||
getBuildReport(project: string, buildId: number, type?: string): Promise<BuildInterfaces.BuildReportMetadata>;
|
||||
/**
|
||||
* Gets a build report.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} type
|
||||
*/
|
||||
getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets a list of source code repositories.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {string} repository - If specified, the vendor-specific identifier or the name of a single repository to get.
|
||||
* @param {BuildInterfaces.ResultSet} resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.
|
||||
* @param {boolean} pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query.
|
||||
* @param {string} continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories.
|
||||
*/
|
||||
listRepositories(project: string, providerName: string, serviceEndpointId?: string, repository?: string, resultSet?: BuildInterfaces.ResultSet, pageResults?: boolean, continuationToken?: string): Promise<BuildInterfaces.SourceRepositories>;
|
||||
/**
|
||||
* @param {BuildInterfaces.DefinitionResourceReference[]} resources
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId
|
||||
*/
|
||||
authorizeDefinitionResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId
|
||||
*/
|
||||
getDefinitionResources(project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
|
||||
/**
|
||||
* Gets information about build resources in the system.
|
||||
*
|
||||
*/
|
||||
getResourceUsage(): Promise<BuildInterfaces.BuildResourceUsage>;
|
||||
/**
|
||||
* Gets all revisions of a definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
*/
|
||||
getDefinitionRevisions(project: string, definitionId: number): Promise<BuildInterfaces.BuildDefinitionRevision[]>;
|
||||
/**
|
||||
* Gets the build settings.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getBuildSettings(project?: string): Promise<BuildInterfaces.BuildSettings>;
|
||||
/**
|
||||
* Updates the build settings.
|
||||
*
|
||||
* @param {BuildInterfaces.BuildSettings} settings - The new settings.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateBuildSettings(settings: BuildInterfaces.BuildSettings, project?: string): Promise<BuildInterfaces.BuildSettings>;
|
||||
/**
|
||||
* Get a list of source providers and their capabilities.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
listSourceProviders(project: string): Promise<BuildInterfaces.SourceProviderAttributes[]>;
|
||||
/**
|
||||
* <p>Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.</p> <p>If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.</p>
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} definition - Either the definition name with optional leading folder path, or the definition id.
|
||||
* @param {string} branchName - Only consider the most recent build for this branch.
|
||||
* @param {string} stageName - Use this stage within the pipeline to render the status.
|
||||
* @param {string} jobName - Use this job within a stage of the pipeline to render the status.
|
||||
* @param {string} configuration - Use this job configuration to render the status
|
||||
* @param {string} label - Replaces the default text on the left side of the badge.
|
||||
*/
|
||||
getStatusBadge(project: string, definition: string, branchName?: string, stageName?: string, jobName?: string, configuration?: string, label?: string): Promise<string>;
|
||||
/**
|
||||
* Adds a tag to a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} tag - The tag to add.
|
||||
*/
|
||||
addBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Adds tags to a build.
|
||||
*
|
||||
* @param {string[]} tags - The tags to add.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
*/
|
||||
addBuildTags(tags: string[], project: string, buildId: number): Promise<string[]>;
|
||||
/**
|
||||
* Removes a tag from a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} tag - The tag to remove.
|
||||
*/
|
||||
deleteBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Gets the tags for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
*/
|
||||
getBuildTags(project: string, buildId: number): Promise<string[]>;
|
||||
/**
|
||||
* Adds a tag to a definition
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {string} tag - The tag to add.
|
||||
*/
|
||||
addDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Adds multiple tags to a definition.
|
||||
*
|
||||
* @param {string[]} tags - The tags to add.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
*/
|
||||
addDefinitionTags(tags: string[], project: string, definitionId: number): Promise<string[]>;
|
||||
/**
|
||||
* Removes a tag from a definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {string} tag - The tag to remove.
|
||||
*/
|
||||
deleteDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Gets the tags for a definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - The ID of the definition.
|
||||
* @param {number} revision - The definition revision number. If not specified, uses the latest revision of the definition.
|
||||
*/
|
||||
getDefinitionTags(project: string, definitionId: number, revision?: number): Promise<string[]>;
|
||||
/**
|
||||
* Gets a list of all build and definition tags in the project.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getTags(project: string): Promise<string[]>;
|
||||
/**
|
||||
* Deletes a build definition template.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} templateId - The ID of the template.
|
||||
*/
|
||||
deleteTemplate(project: string, templateId: string): Promise<void>;
|
||||
/**
|
||||
* Gets a specific build definition template.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} templateId - The ID of the requested template.
|
||||
*/
|
||||
getTemplate(project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
|
||||
/**
|
||||
* Gets all definition templates.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getTemplates(project: string): Promise<BuildInterfaces.BuildDefinitionTemplate[]>;
|
||||
/**
|
||||
* Updates an existing build definition template.
|
||||
*
|
||||
* @param {BuildInterfaces.BuildDefinitionTemplate} template - The new version of the template.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} templateId - The ID of the template.
|
||||
*/
|
||||
saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
|
||||
/**
|
||||
* Gets a Zip file of the artifact with the given name for a build.
|
||||
*
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} projectId - The project ID.
|
||||
* @param {string} artifactName - The name of the artifact.
|
||||
* @param {String} downloadTicket - A valid ticket that gives permission to download artifacts
|
||||
*/
|
||||
getTicketedArtifactContentZip(customHeaders: any, buildId: number, projectId: string, artifactName: string, downloadTicket: String): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets a Zip file of the logs for a given build.
|
||||
*
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {string} projectId - The project ID.
|
||||
* @param {String} downloadTicket - A valid ticket that gives permission to download the logs.
|
||||
*/
|
||||
getTicketedLogsContentZip(customHeaders: any, buildId: number, projectId: string, downloadTicket: String): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets details for a build
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
* @param {string} timelineId
|
||||
* @param {number} changeId
|
||||
* @param {string} planId
|
||||
*/
|
||||
getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number, planId?: string): Promise<BuildInterfaces.Timeline>;
|
||||
/**
|
||||
* Recreates the webhooks for the specified triggers in the given source code repository.
|
||||
*
|
||||
* @param {BuildInterfaces.DefinitionTriggerType[]} triggerTypes - The types of triggers to restore webhooks for.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
|
||||
*/
|
||||
restoreWebhooks(triggerTypes: BuildInterfaces.DefinitionTriggerType[], project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<void>;
|
||||
/**
|
||||
* Gets a list of webhooks installed in the given source code repository.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} providerName - The name of the source provider.
|
||||
* @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
|
||||
* @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
|
||||
*/
|
||||
listWebhooks(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<BuildInterfaces.RepositoryWebhook[]>;
|
||||
/**
|
||||
* Gets the work items associated with a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {number} top - The maximum number of work items to return.
|
||||
*/
|
||||
getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
|
||||
/**
|
||||
* Gets the work items associated with a build, filtered to specific commits.
|
||||
*
|
||||
* @param {string[]} commitIds - A comma-delimited list of commit IDs.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - The ID of the build.
|
||||
* @param {number} top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified.
|
||||
*/
|
||||
getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
|
||||
/**
|
||||
* Gets all the work items between two builds.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} fromBuildId - The ID of the first build.
|
||||
* @param {number} toBuildId - The ID of the last build.
|
||||
* @param {number} top - The maximum number of work items to return.
|
||||
*/
|
||||
getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
|
||||
}
|
||||
+2670
File diff suppressed because it is too large
Load Diff
+15
@@ -0,0 +1,15 @@
|
||||
import vsom = require('./VsoClient');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import * as rm from 'typed-rest-client/RestClient';
|
||||
import * as hm from 'typed-rest-client/HttpClient';
|
||||
export declare class ClientApiBase {
|
||||
baseUrl: string;
|
||||
userAgent: string;
|
||||
http: hm.HttpClient;
|
||||
rest: rm.RestClient;
|
||||
vsoClient: vsom.VsoClient;
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], userAgent?: string, options?: VsoBaseInterfaces.IRequestOptions);
|
||||
createAcceptHeader(type: string, apiVersion?: string): string;
|
||||
createRequestOptions(type: string, apiVersion?: string): rm.IRequestOptions;
|
||||
formatResponse(data: any, responseTypeMetadata: any, isCollection: boolean): any;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vsom = require("./VsoClient");
|
||||
const serm = require("./Serialization");
|
||||
const rm = require("typed-rest-client/RestClient");
|
||||
const hm = require("typed-rest-client/HttpClient");
|
||||
class ClientApiBase {
|
||||
constructor(baseUrl, handlers, userAgent, options) {
|
||||
this.baseUrl = baseUrl;
|
||||
this.http = new hm.HttpClient(userAgent, handlers, options);
|
||||
this.rest = new rm.RestClient(userAgent, null, handlers, options);
|
||||
this.vsoClient = new vsom.VsoClient(baseUrl, this.rest);
|
||||
this.userAgent = userAgent;
|
||||
}
|
||||
createAcceptHeader(type, apiVersion) {
|
||||
return type + (apiVersion ? (';api-version=' + apiVersion) : '');
|
||||
}
|
||||
createRequestOptions(type, apiVersion) {
|
||||
let options = {};
|
||||
options.acceptHeader = this.createAcceptHeader(type, apiVersion);
|
||||
return options;
|
||||
}
|
||||
formatResponse(data, responseTypeMetadata, isCollection) {
|
||||
let serializationData = {
|
||||
responseTypeMetadata: responseTypeMetadata,
|
||||
responseIsCollection: isCollection
|
||||
};
|
||||
let deserializedResult = serm.ContractSerializer.deserialize(data, serializationData.responseTypeMetadata, false, serializationData.responseIsCollection);
|
||||
return deserializedResult;
|
||||
}
|
||||
}
|
||||
exports.ClientApiBase = ClientApiBase;
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import CoreInterfaces = require("./interfaces/CoreInterfaces");
|
||||
import OperationsInterfaces = require("./interfaces/common/OperationsInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
export interface ICoreApi extends basem.ClientApiBase {
|
||||
createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise<CoreInterfaces.WebApiConnectedService>;
|
||||
getConnectedServiceDetails(projectId: string, name: string): Promise<CoreInterfaces.WebApiConnectedServiceDetails>;
|
||||
getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise<CoreInterfaces.WebApiConnectedService[]>;
|
||||
createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
|
||||
deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
|
||||
getIdentityMru(mruName: string): Promise<VSSInterfaces.IdentityRef[]>;
|
||||
updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
|
||||
getTeamMembersWithExtendedProperties(projectId: string, teamId: string, top?: number, skip?: number): Promise<VSSInterfaces.TeamMember[]>;
|
||||
getProcessById(processId: string): Promise<CoreInterfaces.Process>;
|
||||
getProcesses(): Promise<CoreInterfaces.Process[]>;
|
||||
getProjectCollection(collectionId: string): Promise<CoreInterfaces.TeamProjectCollection>;
|
||||
getProjectCollections(top?: number, skip?: number): Promise<CoreInterfaces.TeamProjectCollectionReference[]>;
|
||||
getProjectHistoryEntries(minRevision?: number): Promise<CoreInterfaces.ProjectInfo[]>;
|
||||
getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise<CoreInterfaces.TeamProject>;
|
||||
getProjects(stateFilter?: any, top?: number, skip?: number, continuationToken?: string): Promise<CoreInterfaces.TeamProjectReference[]>;
|
||||
queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise<OperationsInterfaces.OperationReference>;
|
||||
queueDeleteProject(projectId: string): Promise<OperationsInterfaces.OperationReference>;
|
||||
updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise<OperationsInterfaces.OperationReference>;
|
||||
getProjectProperties(projectId: string, keys?: string[]): Promise<CoreInterfaces.ProjectProperty[]>;
|
||||
setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise<void>;
|
||||
createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise<CoreInterfaces.Proxy>;
|
||||
deleteProxy(proxyUrl: string, site?: string): Promise<void>;
|
||||
getProxies(proxyUrl?: string): Promise<CoreInterfaces.Proxy[]>;
|
||||
getAllTeams(mine?: boolean, top?: number, skip?: number): Promise<CoreInterfaces.WebApiTeam[]>;
|
||||
createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise<CoreInterfaces.WebApiTeam>;
|
||||
deleteTeam(projectId: string, teamId: string): Promise<void>;
|
||||
getTeam(projectId: string, teamId: string): Promise<CoreInterfaces.WebApiTeam>;
|
||||
getTeams(projectId: string, mine?: boolean, top?: number, skip?: number): Promise<CoreInterfaces.WebApiTeam[]>;
|
||||
updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise<CoreInterfaces.WebApiTeam>;
|
||||
}
|
||||
export declare class CoreApi extends basem.ClientApiBase implements ICoreApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData
|
||||
* @param {string} projectId
|
||||
*/
|
||||
createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise<CoreInterfaces.WebApiConnectedService>;
|
||||
/**
|
||||
* @param {string} projectId
|
||||
* @param {string} name
|
||||
*/
|
||||
getConnectedServiceDetails(projectId: string, name: string): Promise<CoreInterfaces.WebApiConnectedServiceDetails>;
|
||||
/**
|
||||
* @param {string} projectId
|
||||
* @param {CoreInterfaces.ConnectedServiceKind} kind
|
||||
*/
|
||||
getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise<CoreInterfaces.WebApiConnectedService[]>;
|
||||
/**
|
||||
* @param {CoreInterfaces.IdentityData} mruData
|
||||
* @param {string} mruName
|
||||
*/
|
||||
createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
|
||||
/**
|
||||
* @param {CoreInterfaces.IdentityData} mruData
|
||||
* @param {string} mruName
|
||||
*/
|
||||
deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} mruName
|
||||
*/
|
||||
getIdentityMru(mruName: string): Promise<VSSInterfaces.IdentityRef[]>;
|
||||
/**
|
||||
* @param {CoreInterfaces.IdentityData} mruData
|
||||
* @param {string} mruName
|
||||
*/
|
||||
updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
|
||||
/**
|
||||
* Get a list of members for a specific team.
|
||||
*
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project the team belongs to.
|
||||
* @param {string} teamId - The name or ID (GUID) of the team .
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
*/
|
||||
getTeamMembersWithExtendedProperties(projectId: string, teamId: string, top?: number, skip?: number): Promise<VSSInterfaces.TeamMember[]>;
|
||||
/**
|
||||
* Get a process by ID.
|
||||
*
|
||||
* @param {string} processId - ID for a process.
|
||||
*/
|
||||
getProcessById(processId: string): Promise<CoreInterfaces.Process>;
|
||||
/**
|
||||
* Get a list of processes.
|
||||
*
|
||||
*/
|
||||
getProcesses(): Promise<CoreInterfaces.Process[]>;
|
||||
/**
|
||||
* Get project collection with the specified id or name.
|
||||
*
|
||||
* @param {string} collectionId
|
||||
*/
|
||||
getProjectCollection(collectionId: string): Promise<CoreInterfaces.TeamProjectCollection>;
|
||||
/**
|
||||
* Get project collection references for this application.
|
||||
*
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
*/
|
||||
getProjectCollections(top?: number, skip?: number): Promise<CoreInterfaces.TeamProjectCollectionReference[]>;
|
||||
/**
|
||||
* @param {number} minRevision
|
||||
*/
|
||||
getProjectHistoryEntries(minRevision?: number): Promise<CoreInterfaces.ProjectInfo[]>;
|
||||
/**
|
||||
* Get project with the specified id or name, optionally including capabilities.
|
||||
*
|
||||
* @param {string} projectId
|
||||
* @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false).
|
||||
* @param {boolean} includeHistory - Search within renamed projects (that had such name in the past).
|
||||
*/
|
||||
getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise<CoreInterfaces.TeamProject>;
|
||||
/**
|
||||
* Get all projects in the organization that the authenticated user has access to.
|
||||
*
|
||||
* @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed).
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
* @param {string} continuationToken
|
||||
*/
|
||||
getProjects(stateFilter?: any, top?: number, skip?: number, continuationToken?: string): Promise<CoreInterfaces.TeamProjectReference[]>;
|
||||
/**
|
||||
* Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status.
|
||||
*
|
||||
* @param {CoreInterfaces.TeamProject} projectToCreate - The project to create.
|
||||
*/
|
||||
queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise<OperationsInterfaces.OperationReference>;
|
||||
/**
|
||||
* Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
|
||||
*
|
||||
* @param {string} projectId - The project id of the project to delete.
|
||||
*/
|
||||
queueDeleteProject(projectId: string): Promise<OperationsInterfaces.OperationReference>;
|
||||
/**
|
||||
* Update an existing project's name, abbreviation, or description.
|
||||
*
|
||||
* @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project.
|
||||
* @param {string} projectId - The project id of the project to update.
|
||||
*/
|
||||
updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise<OperationsInterfaces.OperationReference>;
|
||||
/**
|
||||
* Get a collection of team project properties.
|
||||
*
|
||||
* @param {string} projectId - The team project ID.
|
||||
* @param {string[]} keys - A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned.
|
||||
*/
|
||||
getProjectProperties(projectId: string, keys?: string[]): Promise<CoreInterfaces.ProjectProperty[]>;
|
||||
/**
|
||||
* Create, update, and delete team project properties.
|
||||
*
|
||||
* @param {string} projectId - The team project ID.
|
||||
* @param {VSSInterfaces.JsonPatchDocument} patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name.
|
||||
*/
|
||||
setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise<void>;
|
||||
/**
|
||||
* @param {CoreInterfaces.Proxy} proxy
|
||||
*/
|
||||
createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise<CoreInterfaces.Proxy>;
|
||||
/**
|
||||
* @param {string} proxyUrl
|
||||
* @param {string} site
|
||||
*/
|
||||
deleteProxy(proxyUrl: string, site?: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} proxyUrl
|
||||
*/
|
||||
getProxies(proxyUrl?: string): Promise<CoreInterfaces.Proxy[]>;
|
||||
/**
|
||||
* Get a list of all teams.
|
||||
*
|
||||
* @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access
|
||||
* @param {number} top - Maximum number of teams to return.
|
||||
* @param {number} skip - Number of teams to skip.
|
||||
*/
|
||||
getAllTeams(mine?: boolean, top?: number, skip?: number): Promise<CoreInterfaces.WebApiTeam[]>;
|
||||
/**
|
||||
* Create a team in a team project.
|
||||
*
|
||||
* @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team.
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project in which to create the team.
|
||||
*/
|
||||
createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise<CoreInterfaces.WebApiTeam>;
|
||||
/**
|
||||
* Delete a team.
|
||||
*
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project containing the team to delete.
|
||||
* @param {string} teamId - The name of ID of the team to delete.
|
||||
*/
|
||||
deleteTeam(projectId: string, teamId: string): Promise<void>;
|
||||
/**
|
||||
* Get a specific team.
|
||||
*
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project containing the team.
|
||||
* @param {string} teamId - The name or ID (GUID) of the team.
|
||||
*/
|
||||
getTeam(projectId: string, teamId: string): Promise<CoreInterfaces.WebApiTeam>;
|
||||
/**
|
||||
* Get a list of teams.
|
||||
*
|
||||
* @param {string} projectId
|
||||
* @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access
|
||||
* @param {number} top - Maximum number of teams to return.
|
||||
* @param {number} skip - Number of teams to skip.
|
||||
*/
|
||||
getTeams(projectId: string, mine?: boolean, top?: number, skip?: number): Promise<CoreInterfaces.WebApiTeam[]>;
|
||||
/**
|
||||
* Update a team's name and/or description.
|
||||
*
|
||||
* @param {CoreInterfaces.WebApiTeam} teamData
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project containing the team to update.
|
||||
* @param {string} teamId - The name of ID of the team to update.
|
||||
*/
|
||||
updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise<CoreInterfaces.WebApiTeam>;
|
||||
}
|
||||
+826
@@ -0,0 +1,826 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const CoreInterfaces = require("./interfaces/CoreInterfaces");
|
||||
const OperationsInterfaces = require("./interfaces/common/OperationsInterfaces");
|
||||
class CoreApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Core-api', options);
|
||||
}
|
||||
/**
|
||||
* @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData
|
||||
* @param {string} projectId
|
||||
*/
|
||||
createConnectedService(connectedServiceCreationData, projectId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, connectedServiceCreationData, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} projectId
|
||||
* @param {string} name
|
||||
*/
|
||||
getConnectedServiceDetails(projectId, name) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId,
|
||||
name: name
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedServiceDetails, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} projectId
|
||||
* @param {CoreInterfaces.ConnectedServiceKind} kind
|
||||
*/
|
||||
getConnectedServices(projectId, kind) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
let queryValues = {
|
||||
kind: kind,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {CoreInterfaces.IdentityData} mruData
|
||||
* @param {string} mruName
|
||||
*/
|
||||
createIdentityMru(mruData, mruName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
mruName: mruName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, mruData, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {CoreInterfaces.IdentityData} mruData
|
||||
* @param {string} mruName
|
||||
*/
|
||||
deleteIdentityMru(mruData, mruName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
mruName: mruName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} mruName
|
||||
*/
|
||||
getIdentityMru(mruName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
mruName: mruName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {CoreInterfaces.IdentityData} mruData
|
||||
* @param {string} mruName
|
||||
*/
|
||||
updateIdentityMru(mruData, mruName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
mruName: mruName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, mruData, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of members for a specific team.
|
||||
*
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project the team belongs to.
|
||||
* @param {string} teamId - The name or ID (GUID) of the team .
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
*/
|
||||
getTeamMembersWithExtendedProperties(projectId, teamId, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId,
|
||||
teamId: teamId
|
||||
};
|
||||
let queryValues = {
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "294c494c-2600-4d7e-b76c-3dd50c3c95be", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a process by ID.
|
||||
*
|
||||
* @param {string} processId - ID for a process.
|
||||
*/
|
||||
getProcessById(processId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
processId: processId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of processes.
|
||||
*
|
||||
*/
|
||||
getProcesses() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get project collection with the specified id or name.
|
||||
*
|
||||
* @param {string} collectionId
|
||||
*/
|
||||
getProjectCollection(collectionId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
collectionId: collectionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get project collection references for this application.
|
||||
*
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
*/
|
||||
getProjectCollections(top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {number} minRevision
|
||||
*/
|
||||
getProjectHistoryEntries(minRevision) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
minRevision: minRevision,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "6488a877-4749-4954-82ea-7340d36be9f2", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.ProjectInfo, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get project with the specified id or name, optionally including capabilities.
|
||||
*
|
||||
* @param {string} projectId
|
||||
* @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false).
|
||||
* @param {boolean} includeHistory - Search within renamed projects (that had such name in the past).
|
||||
*/
|
||||
getProject(projectId, includeCapabilities, includeHistory) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
let queryValues = {
|
||||
includeCapabilities: includeCapabilities,
|
||||
includeHistory: includeHistory,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProject, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get all projects in the organization that the authenticated user has access to.
|
||||
*
|
||||
* @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed).
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
* @param {string} continuationToken
|
||||
*/
|
||||
getProjects(stateFilter, top, skip, continuationToken) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
stateFilter: stateFilter,
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
continuationToken: continuationToken,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProjectReference, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status.
|
||||
*
|
||||
* @param {CoreInterfaces.TeamProject} projectToCreate - The project to create.
|
||||
*/
|
||||
queueCreateProject(projectToCreate) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, projectToCreate, options);
|
||||
let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
|
||||
*
|
||||
* @param {string} projectId - The project id of the project to delete.
|
||||
*/
|
||||
queueDeleteProject(projectId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update an existing project's name, abbreviation, or description.
|
||||
*
|
||||
* @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project.
|
||||
* @param {string} projectId - The project id of the project to update.
|
||||
*/
|
||||
updateProject(projectUpdate, projectId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, projectUpdate, options);
|
||||
let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a collection of team project properties.
|
||||
*
|
||||
* @param {string} projectId - The team project ID.
|
||||
* @param {string[]} keys - A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned.
|
||||
*/
|
||||
getProjectProperties(projectId, keys) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
let queryValues = {
|
||||
keys: keys && keys.join(","),
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create, update, and delete team project properties.
|
||||
*
|
||||
* @param {string} projectId - The team project ID.
|
||||
* @param {VSSInterfaces.JsonPatchDocument} patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name.
|
||||
*/
|
||||
setProjectProperties(customHeaders, projectId, patchDocument) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
customHeaders = customHeaders || {};
|
||||
customHeaders["Content-Type"] = "application/json-patch+json";
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
options.additionalHeaders = customHeaders;
|
||||
let res;
|
||||
res = yield this.rest.update(url, patchDocument, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {CoreInterfaces.Proxy} proxy
|
||||
*/
|
||||
createOrUpdateProxy(proxy) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, proxy, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} proxyUrl
|
||||
* @param {string} site
|
||||
*/
|
||||
deleteProxy(proxyUrl, site) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (proxyUrl == null) {
|
||||
throw new TypeError('proxyUrl can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
proxyUrl: proxyUrl,
|
||||
site: site,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} proxyUrl
|
||||
*/
|
||||
getProxies(proxyUrl) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
proxyUrl: proxyUrl,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of all teams.
|
||||
*
|
||||
* @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access
|
||||
* @param {number} top - Maximum number of teams to return.
|
||||
* @param {number} skip - Number of teams to skip.
|
||||
*/
|
||||
getAllTeams(mine, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
'$mine': mine,
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "7a4d9ee9-3433-4347-b47a-7a80f1cf307e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create a team in a team project.
|
||||
*
|
||||
* @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team.
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project in which to create the team.
|
||||
*/
|
||||
createTeam(team, projectId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, team, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Delete a team.
|
||||
*
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project containing the team to delete.
|
||||
* @param {string} teamId - The name of ID of the team to delete.
|
||||
*/
|
||||
deleteTeam(projectId, teamId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId,
|
||||
teamId: teamId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a specific team.
|
||||
*
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project containing the team.
|
||||
* @param {string} teamId - The name or ID (GUID) of the team.
|
||||
*/
|
||||
getTeam(projectId, teamId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId,
|
||||
teamId: teamId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of teams.
|
||||
*
|
||||
* @param {string} projectId
|
||||
* @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access
|
||||
* @param {number} top - Maximum number of teams to return.
|
||||
* @param {number} skip - Number of teams to skip.
|
||||
*/
|
||||
getTeams(projectId, mine, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId
|
||||
};
|
||||
let queryValues = {
|
||||
'$mine': mine,
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update a team's name and/or description.
|
||||
*
|
||||
* @param {CoreInterfaces.WebApiTeam} teamData
|
||||
* @param {string} projectId - The name or ID (GUID) of the team project containing the team to update.
|
||||
* @param {string} teamId - The name of ID of the team to update.
|
||||
*/
|
||||
updateTeam(teamData, projectId, teamId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
projectId: projectId,
|
||||
teamId: teamId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, teamData, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
CoreApi.RESOURCE_AREA_ID = "79134c72-4a58-4b42-976c-04e7115f32bf";
|
||||
exports.CoreApi = CoreApi;
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import DashboardInterfaces = require("./interfaces/DashboardInterfaces");
|
||||
import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
|
||||
export interface IDashboardApi extends basem.ClientApiBase {
|
||||
createDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext): Promise<DashboardInterfaces.Dashboard>;
|
||||
deleteDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<void>;
|
||||
getDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<DashboardInterfaces.Dashboard>;
|
||||
getDashboards(teamContext: TfsCoreInterfaces.TeamContext): Promise<DashboardInterfaces.DashboardGroup>;
|
||||
replaceDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<DashboardInterfaces.Dashboard>;
|
||||
replaceDashboards(group: DashboardInterfaces.DashboardGroup, teamContext: TfsCoreInterfaces.TeamContext): Promise<DashboardInterfaces.DashboardGroup>;
|
||||
createWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<DashboardInterfaces.Widget>;
|
||||
deleteWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Dashboard>;
|
||||
getWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Widget>;
|
||||
replaceWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Widget>;
|
||||
updateWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Widget>;
|
||||
getWidgetMetadata(contributionId: string, project?: string): Promise<DashboardInterfaces.WidgetMetadataResponse>;
|
||||
getWidgetTypes(scope: DashboardInterfaces.WidgetScope, project?: string): Promise<DashboardInterfaces.WidgetTypesResponse>;
|
||||
}
|
||||
export declare class DashboardApi extends basem.ClientApiBase implements IDashboardApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Create the supplied dashboard.
|
||||
*
|
||||
* @param {DashboardInterfaces.Dashboard} dashboard - The initial state of the dashboard
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
createDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext): Promise<DashboardInterfaces.Dashboard>;
|
||||
/**
|
||||
* Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard to delete.
|
||||
*/
|
||||
deleteDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<void>;
|
||||
/**
|
||||
* Get a dashboard by its ID.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId
|
||||
*/
|
||||
getDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<DashboardInterfaces.Dashboard>;
|
||||
/**
|
||||
* Get a list of dashboards.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
getDashboards(teamContext: TfsCoreInterfaces.TeamContext): Promise<DashboardInterfaces.DashboardGroup>;
|
||||
/**
|
||||
* Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied.
|
||||
*
|
||||
* @param {DashboardInterfaces.Dashboard} dashboard - The Configuration of the dashboard to replace.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard to replace.
|
||||
*/
|
||||
replaceDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<DashboardInterfaces.Dashboard>;
|
||||
/**
|
||||
* Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content.
|
||||
*
|
||||
* @param {DashboardInterfaces.DashboardGroup} group
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
replaceDashboards(group: DashboardInterfaces.DashboardGroup, teamContext: TfsCoreInterfaces.TeamContext): Promise<DashboardInterfaces.DashboardGroup>;
|
||||
/**
|
||||
* Create a widget on the specified dashboard.
|
||||
*
|
||||
* @param {DashboardInterfaces.Widget} widget - State of the widget to add
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of dashboard the widget will be added to.
|
||||
*/
|
||||
createWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise<DashboardInterfaces.Widget>;
|
||||
/**
|
||||
* Delete the specified widget.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to update.
|
||||
*/
|
||||
deleteWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Dashboard>;
|
||||
/**
|
||||
* Get the current state of the specified widget.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to read.
|
||||
*/
|
||||
getWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Widget>;
|
||||
/**
|
||||
* Override the state of the specified widget.
|
||||
*
|
||||
* @param {DashboardInterfaces.Widget} widget - State to be written for the widget.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to update.
|
||||
*/
|
||||
replaceWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Widget>;
|
||||
/**
|
||||
* Perform a partial update of the specified widget.
|
||||
*
|
||||
* @param {DashboardInterfaces.Widget} widget - Description of the widget changes to apply. All non-null fields will be replaced.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to update.
|
||||
*/
|
||||
updateWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise<DashboardInterfaces.Widget>;
|
||||
/**
|
||||
* Get the widget metadata satisfying the specified contribution ID.
|
||||
*
|
||||
* @param {string} contributionId - The ID of Contribution for the Widget
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWidgetMetadata(contributionId: string, project?: string): Promise<DashboardInterfaces.WidgetMetadataResponse>;
|
||||
/**
|
||||
* Get all available widget metadata in alphabetical order.
|
||||
*
|
||||
* @param {DashboardInterfaces.WidgetScope} scope
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWidgetTypes(scope: DashboardInterfaces.WidgetScope, project?: string): Promise<DashboardInterfaces.WidgetTypesResponse>;
|
||||
}
|
||||
+482
@@ -0,0 +1,482 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const DashboardInterfaces = require("./interfaces/DashboardInterfaces");
|
||||
class DashboardApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Dashboard-api', options);
|
||||
}
|
||||
/**
|
||||
* Create the supplied dashboard.
|
||||
*
|
||||
* @param {DashboardInterfaces.Dashboard} dashboard - The initial state of the dashboard
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
createDashboard(dashboard, teamContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, dashboard, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard to delete.
|
||||
*/
|
||||
deleteDashboard(teamContext, dashboardId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a dashboard by its ID.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId
|
||||
*/
|
||||
getDashboard(teamContext, dashboardId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of dashboards.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
getDashboards(teamContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.DashboardGroup, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied.
|
||||
*
|
||||
* @param {DashboardInterfaces.Dashboard} dashboard - The Configuration of the dashboard to replace.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard to replace.
|
||||
*/
|
||||
replaceDashboard(dashboard, teamContext, dashboardId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, dashboard, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content.
|
||||
*
|
||||
* @param {DashboardInterfaces.DashboardGroup} group
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
replaceDashboards(group, teamContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, group, options);
|
||||
let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.DashboardGroup, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create a widget on the specified dashboard.
|
||||
*
|
||||
* @param {DashboardInterfaces.Widget} widget - State of the widget to add
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of dashboard the widget will be added to.
|
||||
*/
|
||||
createWidget(widget, teamContext, dashboardId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, widget, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Delete the specified widget.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to update.
|
||||
*/
|
||||
deleteWidget(teamContext, dashboardId, widgetId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId,
|
||||
widgetId: widgetId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the current state of the specified widget.
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to read.
|
||||
*/
|
||||
getWidget(teamContext, dashboardId, widgetId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId,
|
||||
widgetId: widgetId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Override the state of the specified widget.
|
||||
*
|
||||
* @param {DashboardInterfaces.Widget} widget - State to be written for the widget.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to update.
|
||||
*/
|
||||
replaceWidget(widget, teamContext, dashboardId, widgetId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId,
|
||||
widgetId: widgetId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, widget, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Perform a partial update of the specified widget.
|
||||
*
|
||||
* @param {DashboardInterfaces.Widget} widget - Description of the widget changes to apply. All non-null fields will be replaced.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} dashboardId - ID of the dashboard containing the widget.
|
||||
* @param {string} widgetId - ID of the widget to update.
|
||||
*/
|
||||
updateWidget(widget, teamContext, dashboardId, widgetId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let project = null;
|
||||
let team = null;
|
||||
if (teamContext) {
|
||||
project = teamContext.projectId || teamContext.project;
|
||||
team = teamContext.teamId || teamContext.team;
|
||||
}
|
||||
let routeValues = {
|
||||
project: project,
|
||||
team: team,
|
||||
dashboardId: dashboardId,
|
||||
widgetId: widgetId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, widget, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the widget metadata satisfying the specified contribution ID.
|
||||
*
|
||||
* @param {string} contributionId - The ID of Contribution for the Widget
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWidgetMetadata(contributionId, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
contributionId: contributionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetMetadataResponse, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get all available widget metadata in alphabetical order.
|
||||
*
|
||||
* @param {DashboardInterfaces.WidgetScope} scope
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWidgetTypes(scope, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (scope == null) {
|
||||
throw new TypeError('scope can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
'$scope': scope,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetTypesResponse, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
DashboardApi.RESOURCE_AREA_ID = "31c84e0a-3ece-48fd-a29d-100849af99ba";
|
||||
exports.DashboardApi = DashboardApi;
|
||||
Generated
Vendored
+203
@@ -0,0 +1,203 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import ExtensionManagementInterfaces = require("./interfaces/ExtensionManagementInterfaces");
|
||||
import GalleryInterfaces = require("./interfaces/GalleryInterfaces");
|
||||
export interface IExtensionManagementApi extends basem.ClientApiBase {
|
||||
getAcquisitionOptions(itemId: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean, isAccountOwner?: boolean, isLinked?: boolean, isConnectedServer?: boolean, isBuyOperationValid?: boolean): Promise<ExtensionManagementInterfaces.AcquisitionOptions>;
|
||||
requestAcquisition(acquisitionRequest: ExtensionManagementInterfaces.ExtensionAcquisitionRequest): Promise<ExtensionManagementInterfaces.ExtensionAcquisitionRequest>;
|
||||
registerAuthorization(publisherName: string, extensionName: string, registrationId: string): Promise<ExtensionManagementInterfaces.ExtensionAuthorization>;
|
||||
createDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
deleteDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise<void>;
|
||||
getDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise<any>;
|
||||
getDocumentsByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any[]>;
|
||||
setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise<ExtensionManagementInterfaces.ExtensionDataCollection[]>;
|
||||
getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.ExtensionState[]>;
|
||||
queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
|
||||
getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
|
||||
updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise<ExtensionManagementInterfaces.InstalledExtension>;
|
||||
getInstalledExtensionByName(publisherName: string, extensionName: string, assetTypes?: string[]): Promise<ExtensionManagementInterfaces.InstalledExtension>;
|
||||
installExtensionByName(publisherName: string, extensionName: string, version?: string): Promise<ExtensionManagementInterfaces.InstalledExtension>;
|
||||
uninstallExtensionByName(publisherName: string, extensionName: string, reason?: string, reasonCode?: string): Promise<void>;
|
||||
getPolicies(userId: string): Promise<GalleryInterfaces.UserExtensionPolicy>;
|
||||
resolveRequest(rejectMessage: string, publisherName: string, extensionName: string, requesterId: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise<number>;
|
||||
getRequests(): Promise<ExtensionManagementInterfaces.RequestedExtension[]>;
|
||||
resolveAllRequests(rejectMessage: string, publisherName: string, extensionName: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise<number>;
|
||||
deleteRequest(publisherName: string, extensionName: string): Promise<void>;
|
||||
requestExtension(publisherName: string, extensionName: string, requestMessage: string): Promise<ExtensionManagementInterfaces.RequestedExtension>;
|
||||
getToken(): Promise<string>;
|
||||
}
|
||||
export declare class ExtensionManagementApi extends basem.ClientApiBase implements IExtensionManagementApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* @param {string} itemId
|
||||
* @param {boolean} testCommerce
|
||||
* @param {boolean} isFreeOrTrialInstall
|
||||
* @param {boolean} isAccountOwner
|
||||
* @param {boolean} isLinked
|
||||
* @param {boolean} isConnectedServer
|
||||
* @param {boolean} isBuyOperationValid
|
||||
*/
|
||||
getAcquisitionOptions(itemId: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean, isAccountOwner?: boolean, isLinked?: boolean, isConnectedServer?: boolean, isBuyOperationValid?: boolean): Promise<ExtensionManagementInterfaces.AcquisitionOptions>;
|
||||
/**
|
||||
* @param {ExtensionManagementInterfaces.ExtensionAcquisitionRequest} acquisitionRequest
|
||||
*/
|
||||
requestAcquisition(acquisitionRequest: ExtensionManagementInterfaces.ExtensionAcquisitionRequest): Promise<ExtensionManagementInterfaces.ExtensionAcquisitionRequest>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} registrationId
|
||||
*/
|
||||
registerAuthorization(publisherName: string, extensionName: string, registrationId: string): Promise<ExtensionManagementInterfaces.ExtensionAuthorization>;
|
||||
/**
|
||||
* @param {any} doc
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
createDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
* @param {string} documentId
|
||||
*/
|
||||
deleteDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
* @param {string} documentId
|
||||
*/
|
||||
getDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise<any>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
getDocumentsByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any[]>;
|
||||
/**
|
||||
* @param {any} doc
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
/**
|
||||
* @param {any} doc
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
|
||||
/**
|
||||
* Query for one or more data collections for the specified extension. Note: the token used for authorization must have been issued on behalf of the specified extension.
|
||||
*
|
||||
* @param {ExtensionManagementInterfaces.ExtensionDataCollectionQuery} collectionQuery
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
*/
|
||||
queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise<ExtensionManagementInterfaces.ExtensionDataCollection[]>;
|
||||
/**
|
||||
* List state and version information for all installed extensions.
|
||||
*
|
||||
* @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results.
|
||||
* @param {boolean} includeErrors - If true, include installed extensions in an error state in the results.
|
||||
* @param {boolean} includeInstallationIssues
|
||||
*/
|
||||
getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.ExtensionState[]>;
|
||||
/**
|
||||
* @param {ExtensionManagementInterfaces.InstalledExtensionQuery} query
|
||||
*/
|
||||
queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
|
||||
/**
|
||||
* List the installed extensions in the account / project collection.
|
||||
*
|
||||
* @param {boolean} includeDisabledExtensions - If true (the default), include disabled extensions in the results.
|
||||
* @param {boolean} includeErrors - If true, include installed extensions with errors.
|
||||
* @param {string[]} assetTypes
|
||||
* @param {boolean} includeInstallationIssues
|
||||
*/
|
||||
getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
|
||||
/**
|
||||
* Update an installed extension. Typically this API is used to enable or disable an extension.
|
||||
*
|
||||
* @param {ExtensionManagementInterfaces.InstalledExtension} extension
|
||||
*/
|
||||
updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise<ExtensionManagementInterfaces.InstalledExtension>;
|
||||
/**
|
||||
* Get an installed extension by its publisher and extension name.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
* @param {string[]} assetTypes
|
||||
*/
|
||||
getInstalledExtensionByName(publisherName: string, extensionName: string, assetTypes?: string[]): Promise<ExtensionManagementInterfaces.InstalledExtension>;
|
||||
/**
|
||||
* Install the specified extension into the account / project collection.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
* @param {string} version
|
||||
*/
|
||||
installExtensionByName(publisherName: string, extensionName: string, version?: string): Promise<ExtensionManagementInterfaces.InstalledExtension>;
|
||||
/**
|
||||
* Uninstall the specified extension from the account / project collection.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
* @param {string} reason
|
||||
* @param {string} reasonCode
|
||||
*/
|
||||
uninstallExtensionByName(publisherName: string, extensionName: string, reason?: string, reasonCode?: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} userId
|
||||
*/
|
||||
getPolicies(userId: string): Promise<GalleryInterfaces.UserExtensionPolicy>;
|
||||
/**
|
||||
* @param {string} rejectMessage
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} requesterId
|
||||
* @param {ExtensionManagementInterfaces.ExtensionRequestState} state
|
||||
*/
|
||||
resolveRequest(rejectMessage: string, publisherName: string, extensionName: string, requesterId: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise<number>;
|
||||
/**
|
||||
*/
|
||||
getRequests(): Promise<ExtensionManagementInterfaces.RequestedExtension[]>;
|
||||
/**
|
||||
* @param {string} rejectMessage
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {ExtensionManagementInterfaces.ExtensionRequestState} state
|
||||
*/
|
||||
resolveAllRequests(rejectMessage: string, publisherName: string, extensionName: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise<number>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
deleteRequest(publisherName: string, extensionName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} requestMessage
|
||||
*/
|
||||
requestExtension(publisherName: string, extensionName: string, requestMessage: string): Promise<ExtensionManagementInterfaces.RequestedExtension>;
|
||||
/**
|
||||
*/
|
||||
getToken(): Promise<string>;
|
||||
}
|
||||
+742
@@ -0,0 +1,742 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const ExtensionManagementInterfaces = require("./interfaces/ExtensionManagementInterfaces");
|
||||
const GalleryInterfaces = require("./interfaces/GalleryInterfaces");
|
||||
class ExtensionManagementApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-ExtensionManagement-api', options);
|
||||
}
|
||||
/**
|
||||
* @param {string} itemId
|
||||
* @param {boolean} testCommerce
|
||||
* @param {boolean} isFreeOrTrialInstall
|
||||
* @param {boolean} isAccountOwner
|
||||
* @param {boolean} isLinked
|
||||
* @param {boolean} isConnectedServer
|
||||
* @param {boolean} isBuyOperationValid
|
||||
*/
|
||||
getAcquisitionOptions(itemId, testCommerce, isFreeOrTrialInstall, isAccountOwner, isLinked, isConnectedServer, isBuyOperationValid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (itemId == null) {
|
||||
throw new TypeError('itemId can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
itemId: itemId,
|
||||
testCommerce: testCommerce,
|
||||
isFreeOrTrialInstall: isFreeOrTrialInstall,
|
||||
isAccountOwner: isAccountOwner,
|
||||
isLinked: isLinked,
|
||||
isConnectedServer: isConnectedServer,
|
||||
isBuyOperationValid: isBuyOperationValid,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "288dff58-d13b-468e-9671-0fb754e9398c", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.AcquisitionOptions, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {ExtensionManagementInterfaces.ExtensionAcquisitionRequest} acquisitionRequest
|
||||
*/
|
||||
requestAcquisition(acquisitionRequest) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "da616457-eed3-4672-92d7-18d21f5c1658", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, acquisitionRequest, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionAcquisitionRequest, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} registrationId
|
||||
*/
|
||||
registerAuthorization(publisherName, extensionName, registrationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
registrationId: registrationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "f21cfc80-d2d2-4248-98bb-7820c74c4606", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, null, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {any} doc
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
createDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
scopeType: scopeType,
|
||||
scopeValue: scopeValue,
|
||||
collectionName: collectionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, doc, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
* @param {string} documentId
|
||||
*/
|
||||
deleteDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
scopeType: scopeType,
|
||||
scopeValue: scopeValue,
|
||||
collectionName: collectionName,
|
||||
documentId: documentId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
* @param {string} documentId
|
||||
*/
|
||||
getDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
scopeType: scopeType,
|
||||
scopeValue: scopeValue,
|
||||
collectionName: collectionName,
|
||||
documentId: documentId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
getDocumentsByName(publisherName, extensionName, scopeType, scopeValue, collectionName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
scopeType: scopeType,
|
||||
scopeValue: scopeValue,
|
||||
collectionName: collectionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {any} doc
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
setDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
scopeType: scopeType,
|
||||
scopeValue: scopeValue,
|
||||
collectionName: collectionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, doc, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {any} doc
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} scopeType
|
||||
* @param {string} scopeValue
|
||||
* @param {string} collectionName
|
||||
*/
|
||||
updateDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
scopeType: scopeType,
|
||||
scopeValue: scopeValue,
|
||||
collectionName: collectionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, doc, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Query for one or more data collections for the specified extension. Note: the token used for authorization must have been issued on behalf of the specified extension.
|
||||
*
|
||||
* @param {ExtensionManagementInterfaces.ExtensionDataCollectionQuery} collectionQuery
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
*/
|
||||
queryCollectionsByName(collectionQuery, publisherName, extensionName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "56c331f1-ce53-4318-adfd-4db5c52a7a2e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, collectionQuery, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* List state and version information for all installed extensions.
|
||||
*
|
||||
* @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results.
|
||||
* @param {boolean} includeErrors - If true, include installed extensions in an error state in the results.
|
||||
* @param {boolean} includeInstallationIssues
|
||||
*/
|
||||
getStates(includeDisabled, includeErrors, includeInstallationIssues) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
includeDisabled: includeDisabled,
|
||||
includeErrors: includeErrors,
|
||||
includeInstallationIssues: includeInstallationIssues,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "92755d3d-9a8a-42b3-8a4d-87359fe5aa93", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionState, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {ExtensionManagementInterfaces.InstalledExtensionQuery} query
|
||||
*/
|
||||
queryExtensions(query) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "046c980f-1345-4ce2-bf85-b46d10ff4cfd", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, query, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* List the installed extensions in the account / project collection.
|
||||
*
|
||||
* @param {boolean} includeDisabledExtensions - If true (the default), include disabled extensions in the results.
|
||||
* @param {boolean} includeErrors - If true, include installed extensions with errors.
|
||||
* @param {string[]} assetTypes
|
||||
* @param {boolean} includeInstallationIssues
|
||||
*/
|
||||
getInstalledExtensions(includeDisabledExtensions, includeErrors, assetTypes, includeInstallationIssues) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
includeDisabledExtensions: includeDisabledExtensions,
|
||||
includeErrors: includeErrors,
|
||||
assetTypes: assetTypes && assetTypes.join(":"),
|
||||
includeInstallationIssues: includeInstallationIssues,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update an installed extension. Typically this API is used to enable or disable an extension.
|
||||
*
|
||||
* @param {ExtensionManagementInterfaces.InstalledExtension} extension
|
||||
*/
|
||||
updateInstalledExtension(extension) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, extension, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get an installed extension by its publisher and extension name.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
* @param {string[]} assetTypes
|
||||
*/
|
||||
getInstalledExtensionByName(publisherName, extensionName, assetTypes) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName
|
||||
};
|
||||
let queryValues = {
|
||||
assetTypes: assetTypes && assetTypes.join(":"),
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Install the specified extension into the account / project collection.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
* @param {string} version
|
||||
*/
|
||||
installExtensionByName(publisherName, extensionName, version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
version: version
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, null, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Uninstall the specified extension from the account / project collection.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher. Example: "fabrikam".
|
||||
* @param {string} extensionName - Name of the extension. Example: "ops-tools".
|
||||
* @param {string} reason
|
||||
* @param {string} reasonCode
|
||||
*/
|
||||
uninstallExtensionByName(publisherName, extensionName, reason, reasonCode) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName
|
||||
};
|
||||
let queryValues = {
|
||||
reason: reason,
|
||||
reasonCode: reasonCode,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} userId
|
||||
*/
|
||||
getPolicies(userId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
userId: userId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "e5cc8c09-407b-4867-8319-2ae3338cbf6f", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.UserExtensionPolicy, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} rejectMessage
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} requesterId
|
||||
* @param {ExtensionManagementInterfaces.ExtensionRequestState} state
|
||||
*/
|
||||
resolveRequest(rejectMessage, publisherName, extensionName, requesterId, state) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (state == null) {
|
||||
throw new TypeError('state can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName,
|
||||
requesterId: requesterId
|
||||
};
|
||||
let queryValues = {
|
||||
state: state,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "aa93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, rejectMessage, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
*/
|
||||
getRequests() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "216b978f-b164-424e-ada2-b77561e842b7", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} rejectMessage
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {ExtensionManagementInterfaces.ExtensionRequestState} state
|
||||
*/
|
||||
resolveAllRequests(rejectMessage, publisherName, extensionName, state) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (state == null) {
|
||||
throw new TypeError('state can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName
|
||||
};
|
||||
let queryValues = {
|
||||
state: state,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "ba93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, rejectMessage, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
deleteRequest(publisherName, extensionName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} requestMessage
|
||||
*/
|
||||
requestExtension(publisherName, extensionName, requestMessage) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, requestMessage, options);
|
||||
let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
*/
|
||||
getToken() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "ExtensionManagement", "3a2e24ed-1d6f-4cb2-9f3b-45a96bbfaf50", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
ExtensionManagementApi.RESOURCE_AREA_ID = "6c2b0933-3600-42ae-bf8b-93d4f7e83594";
|
||||
exports.ExtensionManagementApi = ExtensionManagementApi;
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import FeatureManagementInterfaces = require("./interfaces/FeatureManagementInterfaces");
|
||||
export interface IFeatureManagementApi extends basem.ClientApiBase {
|
||||
getFeature(featureId: string): Promise<FeatureManagementInterfaces.ContributedFeature>;
|
||||
getFeatures(targetContributionId?: string): Promise<FeatureManagementInterfaces.ContributedFeature[]>;
|
||||
getFeatureState(featureId: string, userScope: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
setFeatureState(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, reason?: string, reasonCode?: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
getFeatureStateForScope(featureId: string, userScope: string, scopeName: string, scopeValue: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
setFeatureStateForScope(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, scopeName: string, scopeValue: string, reason?: string, reasonCode?: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
queryFeatureStates(query: FeatureManagementInterfaces.ContributedFeatureStateQuery): Promise<FeatureManagementInterfaces.ContributedFeatureStateQuery>;
|
||||
queryFeatureStatesForDefaultScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string): Promise<FeatureManagementInterfaces.ContributedFeatureStateQuery>;
|
||||
queryFeatureStatesForNamedScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string, scopeName: string, scopeValue: string): Promise<FeatureManagementInterfaces.ContributedFeatureStateQuery>;
|
||||
}
|
||||
export declare class FeatureManagementApi extends basem.ClientApiBase implements IFeatureManagementApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* Get a specific feature by its id
|
||||
*
|
||||
* @param {string} featureId - The contribution id of the feature
|
||||
*/
|
||||
getFeature(featureId: string): Promise<FeatureManagementInterfaces.ContributedFeature>;
|
||||
/**
|
||||
* Get a list of all defined features
|
||||
*
|
||||
* @param {string} targetContributionId - Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution.
|
||||
*/
|
||||
getFeatures(targetContributionId?: string): Promise<FeatureManagementInterfaces.ContributedFeature[]>;
|
||||
/**
|
||||
* Get the state of the specified feature for the given user/all-users scope
|
||||
*
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
|
||||
*/
|
||||
getFeatureState(featureId: string, userScope: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
/**
|
||||
* Set the state of a feature
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value.
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.
|
||||
* @param {string} reason - Reason for changing the state
|
||||
* @param {string} reasonCode - Short reason code
|
||||
*/
|
||||
setFeatureState(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, reason?: string, reasonCode?: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
/**
|
||||
* Get the state of the specified feature for the given named scope
|
||||
*
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
|
||||
* @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team")
|
||||
* @param {string} scopeValue - Value of the scope (e.g. the project or team id)
|
||||
*/
|
||||
getFeatureStateForScope(featureId: string, userScope: string, scopeName: string, scopeValue: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
/**
|
||||
* Set the state of a feature at a specific scope
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value.
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.
|
||||
* @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team")
|
||||
* @param {string} scopeValue - Value of the scope (e.g. the project or team id)
|
||||
* @param {string} reason - Reason for changing the state
|
||||
* @param {string} reasonCode - Short reason code
|
||||
*/
|
||||
setFeatureStateForScope(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, scopeName: string, scopeValue: string, reason?: string, reasonCode?: string): Promise<FeatureManagementInterfaces.ContributedFeatureState>;
|
||||
/**
|
||||
* Get the effective state for a list of feature ids
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Features to query along with current scope values
|
||||
*/
|
||||
queryFeatureStates(query: FeatureManagementInterfaces.ContributedFeatureStateQuery): Promise<FeatureManagementInterfaces.ContributedFeatureStateQuery>;
|
||||
/**
|
||||
* Get the states of the specified features for the default scope
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query.
|
||||
* @param {string} userScope
|
||||
*/
|
||||
queryFeatureStatesForDefaultScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string): Promise<FeatureManagementInterfaces.ContributedFeatureStateQuery>;
|
||||
/**
|
||||
* Get the states of the specified features for the specific named scope
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query.
|
||||
* @param {string} userScope
|
||||
* @param {string} scopeName
|
||||
* @param {string} scopeValue
|
||||
*/
|
||||
queryFeatureStatesForNamedScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string, scopeName: string, scopeValue: string): Promise<FeatureManagementInterfaces.ContributedFeatureStateQuery>;
|
||||
}
|
||||
+296
@@ -0,0 +1,296 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const FeatureManagementInterfaces = require("./interfaces/FeatureManagementInterfaces");
|
||||
class FeatureManagementApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-FeatureManagement-api', options);
|
||||
}
|
||||
/**
|
||||
* Get a specific feature by its id
|
||||
*
|
||||
* @param {string} featureId - The contribution id of the feature
|
||||
*/
|
||||
getFeature(featureId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
featureId: featureId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of all defined features
|
||||
*
|
||||
* @param {string} targetContributionId - Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution.
|
||||
*/
|
||||
getFeatures(targetContributionId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
targetContributionId: targetContributionId,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the state of the specified feature for the given user/all-users scope
|
||||
*
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
|
||||
*/
|
||||
getFeatureState(featureId, userScope) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
featureId: featureId,
|
||||
userScope: userScope
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Set the state of a feature
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value.
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.
|
||||
* @param {string} reason - Reason for changing the state
|
||||
* @param {string} reasonCode - Short reason code
|
||||
*/
|
||||
setFeatureState(feature, featureId, userScope, reason, reasonCode) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
featureId: featureId,
|
||||
userScope: userScope
|
||||
};
|
||||
let queryValues = {
|
||||
reason: reason,
|
||||
reasonCode: reasonCode,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, feature, options);
|
||||
let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the state of the specified feature for the given named scope
|
||||
*
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
|
||||
* @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team")
|
||||
* @param {string} scopeValue - Value of the scope (e.g. the project or team id)
|
||||
*/
|
||||
getFeatureStateForScope(featureId, userScope, scopeName, scopeValue) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
featureId: featureId,
|
||||
userScope: userScope,
|
||||
scopeName: scopeName,
|
||||
scopeValue: scopeValue
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Set the state of a feature at a specific scope
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value.
|
||||
* @param {string} featureId - Contribution id of the feature
|
||||
* @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.
|
||||
* @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team")
|
||||
* @param {string} scopeValue - Value of the scope (e.g. the project or team id)
|
||||
* @param {string} reason - Reason for changing the state
|
||||
* @param {string} reasonCode - Short reason code
|
||||
*/
|
||||
setFeatureStateForScope(feature, featureId, userScope, scopeName, scopeValue, reason, reasonCode) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
featureId: featureId,
|
||||
userScope: userScope,
|
||||
scopeName: scopeName,
|
||||
scopeValue: scopeValue
|
||||
};
|
||||
let queryValues = {
|
||||
reason: reason,
|
||||
reasonCode: reasonCode,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, feature, options);
|
||||
let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the effective state for a list of feature ids
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Features to query along with current scope values
|
||||
*/
|
||||
queryFeatureStates(query) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "2b4486ad-122b-400c-ae65-17b6672c1f9d", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, query, options);
|
||||
let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the states of the specified features for the default scope
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query.
|
||||
* @param {string} userScope
|
||||
*/
|
||||
queryFeatureStatesForDefaultScope(query, userScope) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
userScope: userScope
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "3f810f28-03e2-4239-b0bc-788add3005e5", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, query, options);
|
||||
let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the states of the specified features for the specific named scope
|
||||
*
|
||||
* @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query.
|
||||
* @param {string} userScope
|
||||
* @param {string} scopeName
|
||||
* @param {string} scopeValue
|
||||
*/
|
||||
queryFeatureStatesForNamedScope(query, userScope, scopeName, scopeValue) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
userScope: userScope,
|
||||
scopeName: scopeName,
|
||||
scopeValue: scopeValue
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "FeatureManagement", "f29e997b-c2da-4d15-8380-765788a1a74c", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, query, options);
|
||||
let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.FeatureManagementApi = FeatureManagementApi;
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/// <reference types="node" />
|
||||
import * as restm from 'typed-rest-client/RestClient';
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import FileContainerApiBase = require("./FileContainerApiBase");
|
||||
import FileContainerInterfaces = require("./interfaces/FileContainerInterfaces");
|
||||
export interface IFileContainerApi extends FileContainerApiBase.IFileContainerApiBase {
|
||||
createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise<FileContainerInterfaces.FileContainerItem>;
|
||||
getItem(containerId: number, scope?: string, itemPath?: string, downloadFileName?: string): Promise<restm.IRestResponse<NodeJS.ReadableStream>>;
|
||||
}
|
||||
export declare class FileContainerApi extends FileContainerApiBase.FileContainerApiBase implements IFileContainerApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* @param {number} containerId
|
||||
* @param {string} scope
|
||||
* @param {string} itemPath
|
||||
* @param {string} downloadFileName
|
||||
*/
|
||||
getItem(containerId: number, scope?: string, itemPath?: string, downloadFileName?: string): Promise<restm.IRestResponse<NodeJS.ReadableStream>>;
|
||||
createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise<FileContainerInterfaces.FileContainerItem>;
|
||||
_createItem(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void;
|
||||
}
|
||||
+235
@@ -0,0 +1,235 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
const stream = require("stream");
|
||||
const zlib = require("zlib");
|
||||
const httpm = require("typed-rest-client//HttpClient");
|
||||
const FileContainerApiBase = require("./FileContainerApiBase");
|
||||
const FileContainerInterfaces = require("./interfaces/FileContainerInterfaces");
|
||||
class FileContainerApi extends FileContainerApiBase.FileContainerApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, options);
|
||||
}
|
||||
/**
|
||||
* @param {number} containerId
|
||||
* @param {string} scope
|
||||
* @param {string} itemPath
|
||||
* @param {string} downloadFileName
|
||||
*/
|
||||
getItem(containerId, scope, itemPath, downloadFileName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
containerId: containerId
|
||||
};
|
||||
let queryValues = {
|
||||
scope: scope,
|
||||
itemPath: itemPath,
|
||||
'$format': "OctetStream",
|
||||
downloadFileName: downloadFileName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/octet-stream', verData.apiVersion);
|
||||
let res = yield this.http.get(url);
|
||||
let rres = {};
|
||||
let statusCode = res.message.statusCode;
|
||||
rres.statusCode = statusCode;
|
||||
// not found leads to null obj returned
|
||||
if (statusCode == httpm.HttpCodes.NotFound) {
|
||||
resolve(rres);
|
||||
}
|
||||
if (statusCode > 299) {
|
||||
let msg;
|
||||
// if exception/error in body, attempt to get better error
|
||||
let contents = yield res.readBody();
|
||||
let obj;
|
||||
if (contents && contents.length > 0) {
|
||||
obj = JSON.parse(contents);
|
||||
if (options && options.responseProcessor) {
|
||||
rres.result = options.responseProcessor(obj);
|
||||
}
|
||||
else {
|
||||
rres.result = obj;
|
||||
}
|
||||
}
|
||||
if (obj && obj.message) {
|
||||
msg = obj.message;
|
||||
}
|
||||
else {
|
||||
msg = "Failed request: (" + statusCode + ") " + res.message.url;
|
||||
}
|
||||
reject(new Error(msg));
|
||||
}
|
||||
else {
|
||||
// if the response is gzipped, unzip it
|
||||
if (res.message.headers["content-encoding"] === "gzip") {
|
||||
let unzipStream = zlib.createGunzip();
|
||||
res.message.pipe(unzipStream);
|
||||
rres.result = unzipStream;
|
||||
}
|
||||
else {
|
||||
rres.result = res.message;
|
||||
}
|
||||
resolve(rres);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
createItem(contentStream, uncompressedLength, containerId, itemPath, scope, options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let chunkStream = new ChunkStream(this, uncompressedLength, containerId, itemPath, scope, options);
|
||||
chunkStream.on('finish', () => {
|
||||
resolve(chunkStream.getItem());
|
||||
});
|
||||
contentStream.pipe(chunkStream);
|
||||
});
|
||||
}
|
||||
// used by ChunkStream
|
||||
_createItem(customHeaders, contentStream, containerId, itemPath, scope, onResult) {
|
||||
var routeValues = {
|
||||
containerId: containerId
|
||||
};
|
||||
var queryValues = {
|
||||
itemPath: itemPath,
|
||||
scope: scope,
|
||||
};
|
||||
customHeaders = customHeaders || {};
|
||||
customHeaders["Content-Type"] = "";
|
||||
this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues)
|
||||
.then((versioningData) => {
|
||||
var url = versioningData.requestUrl;
|
||||
var serializationData = { responseTypeMetadata: FileContainerInterfaces.TypeInfo.FileContainerItem, responseIsCollection: false };
|
||||
let options = this.createRequestOptions('application/octet-stream', versioningData.apiVersion);
|
||||
options.additionalHeaders = customHeaders;
|
||||
this.rest.uploadStream('PUT', url, contentStream, options)
|
||||
.then((res) => {
|
||||
let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, false);
|
||||
onResult(null, res.statusCode, ret);
|
||||
})
|
||||
.catch((err) => {
|
||||
onResult(err, err.statusCode, null);
|
||||
});
|
||||
}, (error) => {
|
||||
onResult(error, error.statusCode, null);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.FileContainerApi = FileContainerApi;
|
||||
class ChunkStream extends stream.Writable {
|
||||
constructor(api, uncompressedLength, containerId, itemPath, scope, options) {
|
||||
super();
|
||||
this._buffer = new Buffer(ChunkStream.ChunkSize);
|
||||
this._length = 0;
|
||||
this._startRange = 0;
|
||||
this._bytesToSend = 0;
|
||||
this._totalReceived = 0;
|
||||
this._api = api;
|
||||
this._options = options || {};
|
||||
this._uncompressedLength = uncompressedLength;
|
||||
this._containerId = containerId;
|
||||
this._itemPath = itemPath;
|
||||
this._scope = scope;
|
||||
this._bytesToSend = this._options.isGzipped ? this._options.compressedLength : uncompressedLength;
|
||||
}
|
||||
_write(data, encoding, callback) {
|
||||
let chunk = data;
|
||||
if (!chunk) {
|
||||
if (this._length == 0) {
|
||||
callback();
|
||||
}
|
||||
else {
|
||||
// last chunk
|
||||
this._sendChunk(callback);
|
||||
}
|
||||
return;
|
||||
}
|
||||
let newBuffer = null;
|
||||
if (this._length + chunk.length > ChunkStream.ChunkSize) {
|
||||
// overflow
|
||||
let overflowPosition = chunk.length - (ChunkStream.ChunkSize - this._length);
|
||||
chunk.copy(this._buffer, this._length, 0, overflowPosition);
|
||||
this._length += overflowPosition;
|
||||
newBuffer = chunk.slice(overflowPosition);
|
||||
}
|
||||
else {
|
||||
chunk.copy(this._buffer, this._length, 0, chunk.length);
|
||||
this._length += chunk.length;
|
||||
}
|
||||
this._totalReceived += chunk.length;
|
||||
if (this._length >= ChunkStream.ChunkSize || this._totalReceived >= this._bytesToSend) {
|
||||
this._sendChunk(callback, newBuffer);
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
_sendChunk(callback, newBuffer) {
|
||||
let endRange = this._startRange + this._length;
|
||||
let headers = {
|
||||
"Content-Range": "bytes " + this._startRange + "-" + (endRange - 1) + "/" + this._bytesToSend,
|
||||
"Content-Length": this._length
|
||||
};
|
||||
if (this._options.isGzipped) {
|
||||
headers["Accept-Encoding"] = "gzip";
|
||||
headers["Content-Encoding"] = "gzip";
|
||||
headers["x-tfs-filelength"] = this._uncompressedLength;
|
||||
}
|
||||
this._startRange = endRange;
|
||||
this._api._createItem(headers, new BufferStream(this._buffer, this._length), this._containerId, this._itemPath, this._scope, (err, statusCode, item) => {
|
||||
if (newBuffer) {
|
||||
this._length = newBuffer.length;
|
||||
newBuffer.copy(this._buffer);
|
||||
}
|
||||
else {
|
||||
this._length = 0;
|
||||
}
|
||||
this._item = item;
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
getItem() {
|
||||
return this._item;
|
||||
}
|
||||
}
|
||||
ChunkStream.ChunkSize = (16 * 1024 * 1024);
|
||||
class BufferStream extends stream.Readable {
|
||||
constructor(buffer, length) {
|
||||
super();
|
||||
this._position = 0;
|
||||
this._length = 0;
|
||||
this._buffer = buffer;
|
||||
this._length = length;
|
||||
}
|
||||
_read(size) {
|
||||
if (this._position >= this._length) {
|
||||
this.push(null);
|
||||
return;
|
||||
}
|
||||
let end = Math.min(this._position + size, this._length);
|
||||
this.push(this._buffer.slice(this._position, end));
|
||||
this._position = end;
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import FileContainerInterfaces = require("./interfaces/FileContainerInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
export interface IFileContainerApiBase extends basem.ClientApiBase {
|
||||
createItems(items: VSSInterfaces.VssJsonCollectionWrapperV<FileContainerInterfaces.FileContainerItem[]>, containerId: number, scope?: string): Promise<FileContainerInterfaces.FileContainerItem[]>;
|
||||
deleteItem(containerId: number, itemPath: string, scope?: string): Promise<void>;
|
||||
getContainers(scope?: string, artifactUris?: string): Promise<FileContainerInterfaces.FileContainer[]>;
|
||||
getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise<FileContainerInterfaces.FileContainerItem[]>;
|
||||
}
|
||||
export declare class FileContainerApiBase extends basem.ClientApiBase implements IFileContainerApiBase {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* Creates the specified items in in the referenced container.
|
||||
*
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<FileContainerInterfaces.FileContainerItem[]>} items
|
||||
* @param {number} containerId
|
||||
* @param {string} scope - A guid representing the scope of the container. This is often the project id.
|
||||
*/
|
||||
createItems(items: VSSInterfaces.VssJsonCollectionWrapperV<FileContainerInterfaces.FileContainerItem[]>, containerId: number, scope?: string): Promise<FileContainerInterfaces.FileContainerItem[]>;
|
||||
/**
|
||||
* Deletes the specified items in a container.
|
||||
*
|
||||
* @param {number} containerId - Container Id.
|
||||
* @param {string} itemPath - Path to delete.
|
||||
* @param {string} scope - A guid representing the scope of the container. This is often the project id.
|
||||
*/
|
||||
deleteItem(containerId: number, itemPath: string, scope?: string): Promise<void>;
|
||||
/**
|
||||
* Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers
|
||||
*
|
||||
* @param {string} scope - A guid representing the scope of the container. This is often the project id.
|
||||
* @param {string} artifactUris
|
||||
*/
|
||||
getContainers(scope?: string, artifactUris?: string): Promise<FileContainerInterfaces.FileContainer[]>;
|
||||
/**
|
||||
* @param {number} containerId
|
||||
* @param {string} scope
|
||||
* @param {string} itemPath
|
||||
* @param {boolean} metadata
|
||||
* @param {string} format
|
||||
* @param {string} downloadFileName
|
||||
* @param {boolean} includeDownloadTickets
|
||||
* @param {boolean} isShallow
|
||||
*/
|
||||
getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise<FileContainerInterfaces.FileContainerItem[]>;
|
||||
}
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const FileContainerInterfaces = require("./interfaces/FileContainerInterfaces");
|
||||
class FileContainerApiBase extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-FileContainer-api', options);
|
||||
}
|
||||
/**
|
||||
* Creates the specified items in in the referenced container.
|
||||
*
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<FileContainerInterfaces.FileContainerItem[]>} items
|
||||
* @param {number} containerId
|
||||
* @param {string} scope - A guid representing the scope of the container. This is often the project id.
|
||||
*/
|
||||
createItems(items, containerId, scope) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
containerId: containerId
|
||||
};
|
||||
let queryValues = {
|
||||
scope: scope,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, items, options);
|
||||
let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Deletes the specified items in a container.
|
||||
*
|
||||
* @param {number} containerId - Container Id.
|
||||
* @param {string} itemPath - Path to delete.
|
||||
* @param {string} scope - A guid representing the scope of the container. This is often the project id.
|
||||
*/
|
||||
deleteItem(containerId, itemPath, scope) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (itemPath == null) {
|
||||
throw new TypeError('itemPath can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
containerId: containerId
|
||||
};
|
||||
let queryValues = {
|
||||
itemPath: itemPath,
|
||||
scope: scope,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers
|
||||
*
|
||||
* @param {string} scope - A guid representing the scope of the container. This is often the project id.
|
||||
* @param {string} artifactUris
|
||||
*/
|
||||
getContainers(scope, artifactUris) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
scope: scope,
|
||||
artifactUris: artifactUris,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainer, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {number} containerId
|
||||
* @param {string} scope
|
||||
* @param {string} itemPath
|
||||
* @param {boolean} metadata
|
||||
* @param {string} format
|
||||
* @param {string} downloadFileName
|
||||
* @param {boolean} includeDownloadTickets
|
||||
* @param {boolean} isShallow
|
||||
*/
|
||||
getItems(containerId, scope, itemPath, metadata, format, downloadFileName, includeDownloadTickets, isShallow) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
containerId: containerId
|
||||
};
|
||||
let queryValues = {
|
||||
scope: scope,
|
||||
itemPath: itemPath,
|
||||
metadata: metadata,
|
||||
'$format': format,
|
||||
downloadFileName: downloadFileName,
|
||||
includeDownloadTickets: includeDownloadTickets,
|
||||
isShallow: isShallow,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.FileContainerApiBase = FileContainerApiBase;
|
||||
+636
@@ -0,0 +1,636 @@
|
||||
/// <reference types="node" />
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import compatBase = require("././GalleryCompatHttpClientBase");
|
||||
import GalleryInterfaces = require("./interfaces/GalleryInterfaces");
|
||||
export interface IGalleryApi extends compatBase.GalleryCompatHttpClientBase {
|
||||
shareExtensionById(extensionId: string, accountName: string): Promise<void>;
|
||||
unshareExtensionById(extensionId: string, accountName: string): Promise<void>;
|
||||
shareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
|
||||
unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
|
||||
getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise<GalleryInterfaces.AcquisitionOptions>;
|
||||
requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise<GalleryInterfaces.ExtensionAcquisitionRequest>;
|
||||
getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise<GalleryInterfaces.AzurePublisher>;
|
||||
queryAssociatedAzurePublisher(publisherName: string): Promise<GalleryInterfaces.AzurePublisher>;
|
||||
getCategories(languages?: string): Promise<string[]>;
|
||||
getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise<GalleryInterfaces.CategoriesResult>;
|
||||
getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise<GalleryInterfaces.ProductCategory>;
|
||||
getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise<GalleryInterfaces.ProductCategoriesResult>;
|
||||
getCertificate(publisherName: string, extensionName: string, version?: string): Promise<NodeJS.ReadableStream>;
|
||||
getContentVerificationLog(publisherName: string, extensionName: string): Promise<NodeJS.ReadableStream>;
|
||||
createDraftForEditExtension(publisherName: string, extensionName: string): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
|
||||
createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
|
||||
getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise<NodeJS.ReadableStream>;
|
||||
getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise<NodeJS.ReadableStream>;
|
||||
getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise<GalleryInterfaces.ExtensionEvents>;
|
||||
publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise<void>;
|
||||
queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.ExtensionQueryResult>;
|
||||
createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
deleteExtensionById(extensionId: string, version?: string): Promise<void>;
|
||||
getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
updateExtensionById(extensionId: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
deleteExtension(publisherName: string, extensionName: string, version?: string): Promise<void>;
|
||||
getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, bypassScopeCheck?: boolean): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
|
||||
unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
|
||||
extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise<void>;
|
||||
sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise<void>;
|
||||
getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
deletePublisherAsset(publisherName: string, assetType?: string): Promise<void>;
|
||||
getPublisherAsset(publisherName: string, assetType?: string): Promise<NodeJS.ReadableStream>;
|
||||
updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{
|
||||
[key: string]: string;
|
||||
}>;
|
||||
queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise<GalleryInterfaces.PublisherQueryResult>;
|
||||
createPublisher(publisher: GalleryInterfaces.Publisher): Promise<GalleryInterfaces.Publisher>;
|
||||
deletePublisher(publisherName: string): Promise<void>;
|
||||
getPublisher(publisherName: string, flags?: number): Promise<GalleryInterfaces.Publisher>;
|
||||
updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise<GalleryInterfaces.Publisher>;
|
||||
getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise<GalleryInterfaces.QuestionsResult>;
|
||||
reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise<GalleryInterfaces.Concern>;
|
||||
createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise<GalleryInterfaces.Question>;
|
||||
deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise<void>;
|
||||
updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Question>;
|
||||
createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Response>;
|
||||
deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<void>;
|
||||
updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<GalleryInterfaces.Response>;
|
||||
getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise<any>;
|
||||
getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewsResult>;
|
||||
getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewSummary>;
|
||||
createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise<GalleryInterfaces.Review>;
|
||||
deleteReview(pubName: string, extName: string, reviewId: number): Promise<void>;
|
||||
updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise<GalleryInterfaces.ReviewPatch>;
|
||||
createCategory(category: GalleryInterfaces.ExtensionCategory): Promise<GalleryInterfaces.ExtensionCategory>;
|
||||
getGalleryUserSettings(userScope: string, key?: string): Promise<{
|
||||
[key: string]: any;
|
||||
}>;
|
||||
setGalleryUserSettings(entries: {
|
||||
[key: string]: any;
|
||||
}, userScope: string): Promise<void>;
|
||||
generateKey(keyType: string, expireCurrentSeconds?: number): Promise<void>;
|
||||
getSigningKey(keyType: string): Promise<string>;
|
||||
updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise<void>;
|
||||
getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise<GalleryInterfaces.ExtensionDailyStats>;
|
||||
getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise<GalleryInterfaces.ExtensionDailyStats>;
|
||||
incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string): Promise<void>;
|
||||
getVerificationLog(publisherName: string, extensionName: string, version: string): Promise<NodeJS.ReadableStream>;
|
||||
}
|
||||
export declare class GalleryApi extends compatBase.GalleryCompatHttpClientBase implements IGalleryApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* @param {string} extensionId
|
||||
* @param {string} accountName
|
||||
*/
|
||||
shareExtensionById(extensionId: string, accountName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} extensionId
|
||||
* @param {string} accountName
|
||||
*/
|
||||
unshareExtensionById(extensionId: string, accountName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} accountName
|
||||
*/
|
||||
shareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} accountName
|
||||
*/
|
||||
unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} itemId
|
||||
* @param {string} installationTarget
|
||||
* @param {boolean} testCommerce
|
||||
* @param {boolean} isFreeOrTrialInstall
|
||||
*/
|
||||
getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise<GalleryInterfaces.AcquisitionOptions>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest
|
||||
*/
|
||||
requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise<GalleryInterfaces.ExtensionAcquisitionRequest>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
* @param {string} assetType
|
||||
* @param {string} accountToken
|
||||
* @param {boolean} acceptDefault
|
||||
* @param {String} accountTokenHeader - Header to pass the account token
|
||||
*/
|
||||
getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} extensionId
|
||||
* @param {string} version
|
||||
* @param {string} assetType
|
||||
* @param {string} accountToken
|
||||
* @param {boolean} acceptDefault
|
||||
* @param {String} accountTokenHeader - Header to pass the account token
|
||||
*/
|
||||
getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
* @param {string} assetType
|
||||
* @param {string} accountToken
|
||||
* @param {String} accountTokenHeader - Header to pass the account token
|
||||
*/
|
||||
getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} azurePublisherId
|
||||
*/
|
||||
associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise<GalleryInterfaces.AzurePublisher>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
*/
|
||||
queryAssociatedAzurePublisher(publisherName: string): Promise<GalleryInterfaces.AzurePublisher>;
|
||||
/**
|
||||
* @param {string} languages
|
||||
*/
|
||||
getCategories(languages?: string): Promise<string[]>;
|
||||
/**
|
||||
* @param {string} categoryName
|
||||
* @param {string} languages
|
||||
* @param {string} product
|
||||
*/
|
||||
getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise<GalleryInterfaces.CategoriesResult>;
|
||||
/**
|
||||
* @param {string} product
|
||||
* @param {string} categoryId
|
||||
* @param {number} lcid
|
||||
* @param {string} source
|
||||
* @param {string} productVersion
|
||||
* @param {string} skus
|
||||
* @param {string} subSkus
|
||||
*/
|
||||
getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise<GalleryInterfaces.ProductCategory>;
|
||||
/**
|
||||
* @param {string} product
|
||||
* @param {number} lcid
|
||||
* @param {string} source
|
||||
* @param {string} productVersion
|
||||
* @param {string} skus
|
||||
* @param {string} subSkus
|
||||
*/
|
||||
getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise<GalleryInterfaces.ProductCategoriesResult>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
*/
|
||||
getCertificate(publisherName: string, extensionName: string, version?: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
getContentVerificationLog(publisherName: string, extensionName: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
createDraftForEditExtension(publisherName: string, extensionName: string): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} draftId
|
||||
*/
|
||||
performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} draftId
|
||||
* @param {String} fileName - Header to pass the filename of the uploaded data
|
||||
*/
|
||||
updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} draftId
|
||||
* @param {string} assetType
|
||||
*/
|
||||
addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName
|
||||
* @param {String} product - Header to pass the product type of the payload file
|
||||
* @param {String} fileName - Header to pass the filename of the uploaded data
|
||||
*/
|
||||
createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch
|
||||
* @param {string} publisherName
|
||||
* @param {string} draftId
|
||||
*/
|
||||
performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName
|
||||
* @param {string} draftId
|
||||
* @param {String} fileName - Header to pass the filename of the uploaded data
|
||||
*/
|
||||
updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName
|
||||
* @param {string} draftId
|
||||
* @param {string} assetType
|
||||
*/
|
||||
addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} draftId
|
||||
* @param {string} assetType
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} draftId
|
||||
* @param {string} assetType
|
||||
*/
|
||||
getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher
|
||||
* @param {string} extensionName - Name of the extension
|
||||
* @param {number} count - Count of events to fetch, applies to each event type.
|
||||
* @param {Date} afterDate - Fetch events that occurred on or after this date
|
||||
* @param {string} include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events
|
||||
* @param {string} includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events
|
||||
*/
|
||||
getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise<GalleryInterfaces.ExtensionEvents>;
|
||||
/**
|
||||
* API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension.
|
||||
*
|
||||
* @param {GalleryInterfaces.ExtensionEvents[]} extensionEvents
|
||||
*/
|
||||
publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise<void>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionQuery} extensionQuery
|
||||
* @param {string} accountToken
|
||||
* @param {String} accountTokenHeader - Header to pass the account token
|
||||
*/
|
||||
queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.ExtensionQueryResult>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
*/
|
||||
createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {string} extensionId
|
||||
* @param {string} version
|
||||
*/
|
||||
deleteExtensionById(extensionId: string, version?: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} extensionId
|
||||
* @param {string} version
|
||||
* @param {GalleryInterfaces.ExtensionQueryFlags} flags
|
||||
*/
|
||||
getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {string} extensionId
|
||||
*/
|
||||
updateExtensionById(extensionId: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName
|
||||
*/
|
||||
createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
*/
|
||||
deleteExtension(publisherName: string, extensionName: string, version?: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
* @param {GalleryInterfaces.ExtensionQueryFlags} flags
|
||||
* @param {string} accountToken
|
||||
* @param {String} accountTokenHeader - Header to pass the account token
|
||||
*/
|
||||
getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* REST endpoint to update an extension.
|
||||
*
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName - Name of the publisher
|
||||
* @param {string} extensionName - Name of the extension
|
||||
* @param {boolean} bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not
|
||||
*/
|
||||
updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, bypassScopeCheck?: boolean): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {GalleryInterfaces.PublishedExtensionFlags} flags
|
||||
*/
|
||||
updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} hostType
|
||||
* @param {string} hostName
|
||||
*/
|
||||
shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} hostType
|
||||
* @param {string} hostName
|
||||
*/
|
||||
unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel
|
||||
*/
|
||||
extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise<void>;
|
||||
/**
|
||||
* Send Notification
|
||||
*
|
||||
* @param {GalleryInterfaces.NotificationsData} notificationData - Denoting the data needed to send notification
|
||||
*/
|
||||
sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise<void>;
|
||||
/**
|
||||
* This endpoint gets hit when you download a VSTS extension from the Web UI
|
||||
*
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
* @param {string} accountToken
|
||||
* @param {boolean} acceptDefault
|
||||
* @param {String} accountTokenHeader - Header to pass the account token
|
||||
*/
|
||||
getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
* @param {string} assetType
|
||||
* @param {string} assetToken
|
||||
* @param {string} accountToken
|
||||
* @param {boolean} acceptDefault
|
||||
* @param {String} accountTokenHeader - Header to pass the account token
|
||||
*/
|
||||
getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Delete publisher asset like logo
|
||||
*
|
||||
* @param {string} publisherName - Internal name of the publisher
|
||||
* @param {string} assetType - Type of asset. Default value is 'logo'.
|
||||
*/
|
||||
deletePublisherAsset(publisherName: string, assetType?: string): Promise<void>;
|
||||
/**
|
||||
* Get publisher asset like logo as a stream
|
||||
*
|
||||
* @param {string} publisherName - Internal name of the publisher
|
||||
* @param {string} assetType - Type of asset. Default value is 'logo'.
|
||||
*/
|
||||
getPublisherAsset(publisherName: string, assetType?: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values.
|
||||
*
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} publisherName - Internal name of the publisher
|
||||
* @param {string} assetType - Type of asset. Default value is 'logo'.
|
||||
* @param {String} fileName - Header to pass the filename of the uploaded data
|
||||
*/
|
||||
updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{
|
||||
[key: string]: string;
|
||||
}>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.PublisherQuery} publisherQuery
|
||||
*/
|
||||
queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise<GalleryInterfaces.PublisherQueryResult>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.Publisher} publisher
|
||||
*/
|
||||
createPublisher(publisher: GalleryInterfaces.Publisher): Promise<GalleryInterfaces.Publisher>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
*/
|
||||
deletePublisher(publisherName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {number} flags
|
||||
*/
|
||||
getPublisher(publisherName: string, flags?: number): Promise<GalleryInterfaces.Publisher>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.Publisher} publisher
|
||||
* @param {string} publisherName
|
||||
*/
|
||||
updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise<GalleryInterfaces.Publisher>;
|
||||
/**
|
||||
* Returns a list of questions with their responses associated with an extension.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher who published the extension.
|
||||
* @param {string} extensionName - Name of the extension.
|
||||
* @param {number} count - Number of questions to retrieve (defaults to 10).
|
||||
* @param {number} page - Page number from which set of questions are to be retrieved.
|
||||
* @param {Date} afterDate - If provided, results questions are returned which were posted after this date
|
||||
*/
|
||||
getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise<GalleryInterfaces.QuestionsResult>;
|
||||
/**
|
||||
* Flags a concern with an existing question for an extension.
|
||||
*
|
||||
* @param {GalleryInterfaces.Concern} concern - User reported concern with a question for the extension.
|
||||
* @param {string} pubName - Name of the publisher who published the extension.
|
||||
* @param {string} extName - Name of the extension.
|
||||
* @param {number} questionId - Identifier of the question to be updated for the extension.
|
||||
*/
|
||||
reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise<GalleryInterfaces.Concern>;
|
||||
/**
|
||||
* Creates a new question for an extension.
|
||||
*
|
||||
* @param {GalleryInterfaces.Question} question - Question to be created for the extension.
|
||||
* @param {string} publisherName - Name of the publisher who published the extension.
|
||||
* @param {string} extensionName - Name of the extension.
|
||||
*/
|
||||
createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise<GalleryInterfaces.Question>;
|
||||
/**
|
||||
* Deletes an existing question and all its associated responses for an extension. (soft delete)
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher who published the extension.
|
||||
* @param {string} extensionName - Name of the extension.
|
||||
* @param {number} questionId - Identifier of the question to be deleted for the extension.
|
||||
*/
|
||||
deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise<void>;
|
||||
/**
|
||||
* Updates an existing question for an extension.
|
||||
*
|
||||
* @param {GalleryInterfaces.Question} question - Updated question to be set for the extension.
|
||||
* @param {string} publisherName - Name of the publisher who published the extension.
|
||||
* @param {string} extensionName - Name of the extension.
|
||||
* @param {number} questionId - Identifier of the question to be updated for the extension.
|
||||
*/
|
||||
updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Question>;
|
||||
/**
|
||||
* Creates a new response for a given question for an extension.
|
||||
*
|
||||
* @param {GalleryInterfaces.Response} response - Response to be created for the extension.
|
||||
* @param {string} publisherName - Name of the publisher who published the extension.
|
||||
* @param {string} extensionName - Name of the extension.
|
||||
* @param {number} questionId - Identifier of the question for which response is to be created for the extension.
|
||||
*/
|
||||
createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Response>;
|
||||
/**
|
||||
* Deletes a response for an extension. (soft delete)
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher who published the extension.
|
||||
* @param {string} extensionName - Name of the extension.
|
||||
* @param {number} questionId - Identifies the question whose response is to be deleted.
|
||||
* @param {number} responseId - Identifies the response to be deleted.
|
||||
*/
|
||||
deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<void>;
|
||||
/**
|
||||
* Updates an existing response for a given question for an extension.
|
||||
*
|
||||
* @param {GalleryInterfaces.Response} response - Updated response to be set for the extension.
|
||||
* @param {string} publisherName - Name of the publisher who published the extension.
|
||||
* @param {string} extensionName - Name of the extension.
|
||||
* @param {number} questionId - Identifier of the question for which response is to be updated for the extension.
|
||||
* @param {number} responseId - Identifier of the response which has to be updated.
|
||||
*/
|
||||
updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<GalleryInterfaces.Response>;
|
||||
/**
|
||||
* Returns extension reports
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher who published the extension
|
||||
* @param {string} extensionName - Name of the extension
|
||||
* @param {number} days - Last n days report. If afterDate and days are specified, days will take priority
|
||||
* @param {number} count - Number of events to be returned
|
||||
* @param {Date} afterDate - Use if you want to fetch events newer than the specified date
|
||||
*/
|
||||
getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise<any>;
|
||||
/**
|
||||
* Returns a list of reviews associated with an extension
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher who published the extension
|
||||
* @param {string} extensionName - Name of the extension
|
||||
* @param {number} count - Number of reviews to retrieve (defaults to 5)
|
||||
* @param {GalleryInterfaces.ReviewFilterOptions} filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none
|
||||
* @param {Date} beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null
|
||||
* @param {Date} afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null
|
||||
*/
|
||||
getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewsResult>;
|
||||
/**
|
||||
* Returns a summary of the reviews
|
||||
*
|
||||
* @param {string} pubName - Name of the publisher who published the extension
|
||||
* @param {string} extName - Name of the extension
|
||||
* @param {Date} beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null
|
||||
* @param {Date} afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null
|
||||
*/
|
||||
getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewSummary>;
|
||||
/**
|
||||
* Creates a new review for an extension
|
||||
*
|
||||
* @param {GalleryInterfaces.Review} review - Review to be created for the extension
|
||||
* @param {string} pubName - Name of the publisher who published the extension
|
||||
* @param {string} extName - Name of the extension
|
||||
*/
|
||||
createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise<GalleryInterfaces.Review>;
|
||||
/**
|
||||
* Deletes a review
|
||||
*
|
||||
* @param {string} pubName - Name of the pubilsher who published the extension
|
||||
* @param {string} extName - Name of the extension
|
||||
* @param {number} reviewId - Id of the review which needs to be updated
|
||||
*/
|
||||
deleteReview(pubName: string, extName: string, reviewId: number): Promise<void>;
|
||||
/**
|
||||
* Updates or Flags a review
|
||||
*
|
||||
* @param {GalleryInterfaces.ReviewPatch} reviewPatch - ReviewPatch object which contains the changes to be applied to the review
|
||||
* @param {string} pubName - Name of the pubilsher who published the extension
|
||||
* @param {string} extName - Name of the extension
|
||||
* @param {number} reviewId - Id of the review which needs to be updated
|
||||
*/
|
||||
updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise<GalleryInterfaces.ReviewPatch>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionCategory} category
|
||||
*/
|
||||
createCategory(category: GalleryInterfaces.ExtensionCategory): Promise<GalleryInterfaces.ExtensionCategory>;
|
||||
/**
|
||||
* Get all setting entries for the given user/all-users scope
|
||||
*
|
||||
* @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
|
||||
* @param {string} key - Optional key under which to filter all the entries
|
||||
*/
|
||||
getGalleryUserSettings(userScope: string, key?: string): Promise<{
|
||||
[key: string]: any;
|
||||
}>;
|
||||
/**
|
||||
* Set all setting entries for the given user/all-users scope
|
||||
*
|
||||
* @param {{ [key: string] : any; }} entries - A key-value pair of all settings that need to be set
|
||||
* @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
|
||||
*/
|
||||
setGalleryUserSettings(entries: {
|
||||
[key: string]: any;
|
||||
}, userScope: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} keyType
|
||||
* @param {number} expireCurrentSeconds
|
||||
*/
|
||||
generateKey(keyType: string, expireCurrentSeconds?: number): Promise<void>;
|
||||
/**
|
||||
* @param {string} keyType
|
||||
*/
|
||||
getSigningKey(keyType: string): Promise<string>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionStatisticUpdate} extensionStatisticsUpdate
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {number} days
|
||||
* @param {GalleryInterfaces.ExtensionStatsAggregateType} aggregate
|
||||
* @param {Date} afterDate
|
||||
*/
|
||||
getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise<GalleryInterfaces.ExtensionDailyStats>;
|
||||
/**
|
||||
* This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats.
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher
|
||||
* @param {string} extensionName - Name of the extension
|
||||
* @param {string} version - Version of the extension
|
||||
*/
|
||||
getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise<GalleryInterfaces.ExtensionDailyStats>;
|
||||
/**
|
||||
* Increments a daily statistic associated with the extension
|
||||
*
|
||||
* @param {string} publisherName - Name of the publisher
|
||||
* @param {string} extensionName - Name of the extension
|
||||
* @param {string} version - Version of the extension
|
||||
* @param {string} statType - Type of stat to increment
|
||||
*/
|
||||
incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
* @param {string} version
|
||||
*/
|
||||
getVerificationLog(publisherName: string, extensionName: string, version: string): Promise<NodeJS.ReadableStream>;
|
||||
}
|
||||
+2319
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import GalleryInterfaces = require("./interfaces/GalleryInterfaces");
|
||||
export interface IGalleryCompatHttpClientBase extends basem.ClientApiBase {
|
||||
createExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
updateExtensionByIdJson(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
createExtensionWithPublisherJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
updateExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
}
|
||||
export declare class GalleryCompatHttpClientBase extends basem.ClientApiBase implements IGalleryCompatHttpClientBase {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], userAgent?: string, options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
*/
|
||||
createExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
* @param {string} extensionId
|
||||
*/
|
||||
updateExtensionByIdJson(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
* @param {string} publisherName
|
||||
*/
|
||||
createExtensionWithPublisherJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
updateExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise<GalleryInterfaces.PublishedExtension>;
|
||||
}
|
||||
Generated
Vendored
+118
@@ -0,0 +1,118 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const GalleryInterfaces = require("./interfaces/GalleryInterfaces");
|
||||
class GalleryCompatHttpClientBase extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, userAgent, options) {
|
||||
super(baseUrl, handlers, userAgent, options);
|
||||
}
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
*/
|
||||
createExtensionJson(extensionPackage) {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, extensionPackage, options);
|
||||
let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
* @param {string} extensionId
|
||||
*/
|
||||
updateExtensionByIdJson(extensionPackage, extensionId) {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
extensionId: extensionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, extensionPackage, options);
|
||||
let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
* @param {string} publisherName
|
||||
*/
|
||||
createExtensionWithPublisherJson(extensionPackage, publisherName) {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, extensionPackage, options);
|
||||
let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* @param {GalleryInterfaces.ExtensionPackage} extensionPackage
|
||||
* @param {string} publisherName
|
||||
* @param {string} extensionName
|
||||
*/
|
||||
updateExtensionJson(extensionPackage, publisherName, extensionName) {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
publisherName: publisherName,
|
||||
extensionName: extensionName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, extensionPackage, options);
|
||||
let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
exports.GalleryCompatHttpClientBase = GalleryCompatHttpClientBase;
|
||||
+1251
File diff suppressed because it is too large
Load Diff
+4036
File diff suppressed because it is too large
Load Diff
+21
@@ -0,0 +1,21 @@
|
||||
Visual Studio Team Services Client for Node.js
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import LocationsInterfaces = require("./interfaces/LocationsInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
export interface ILocationsApi extends basem.ClientApiBase {
|
||||
getConnectionData(connectOptions?: VSSInterfaces.ConnectOptions, lastChangeId?: number, lastChangeId64?: number): Promise<LocationsInterfaces.ConnectionData>;
|
||||
getResourceArea(areaId: string, enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
|
||||
getResourceAreaByHost(areaId: string, hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
|
||||
getResourceAreas(enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
|
||||
getResourceAreasByHost(hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
|
||||
deleteServiceDefinition(serviceType: string, identifier: string): Promise<void>;
|
||||
getServiceDefinition(serviceType: string, identifier: string, allowFaultIn?: boolean, previewFaultIn?: boolean): Promise<LocationsInterfaces.ServiceDefinition>;
|
||||
getServiceDefinitions(serviceType?: string): Promise<LocationsInterfaces.ServiceDefinition[]>;
|
||||
updateServiceDefinitions(serviceDefinitions: VSSInterfaces.VssJsonCollectionWrapperV<LocationsInterfaces.ServiceDefinition[]>): Promise<void>;
|
||||
}
|
||||
export declare class LocationsApi extends basem.ClientApiBase implements ILocationsApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* This was copied and adapted from TeamFoundationConnectionService.Connect()
|
||||
*
|
||||
* @param {VSSInterfaces.ConnectOptions} connectOptions
|
||||
* @param {number} lastChangeId - Obsolete 32-bit LastChangeId
|
||||
* @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId
|
||||
*/
|
||||
getConnectionData(connectOptions?: VSSInterfaces.ConnectOptions, lastChangeId?: number, lastChangeId64?: number): Promise<LocationsInterfaces.ConnectionData>;
|
||||
/**
|
||||
* @param {string} areaId
|
||||
* @param {string} enterpriseName
|
||||
* @param {string} organizationName
|
||||
*/
|
||||
getResourceArea(areaId: string, enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
|
||||
/**
|
||||
* @param {string} areaId
|
||||
* @param {string} hostId
|
||||
*/
|
||||
getResourceAreaByHost(areaId: string, hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
|
||||
/**
|
||||
* @param {string} enterpriseName
|
||||
* @param {string} organizationName
|
||||
*/
|
||||
getResourceAreas(enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
|
||||
/**
|
||||
* @param {string} hostId
|
||||
*/
|
||||
getResourceAreasByHost(hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
|
||||
/**
|
||||
* @param {string} serviceType
|
||||
* @param {string} identifier
|
||||
*/
|
||||
deleteServiceDefinition(serviceType: string, identifier: string): Promise<void>;
|
||||
/**
|
||||
* Finds a given service definition.
|
||||
*
|
||||
* @param {string} serviceType
|
||||
* @param {string} identifier
|
||||
* @param {boolean} allowFaultIn - If true, we will attempt to fault in a host instance mapping if in SPS.
|
||||
* @param {boolean} previewFaultIn - If true, we will calculate and return a host instance mapping, but not persist it.
|
||||
*/
|
||||
getServiceDefinition(serviceType: string, identifier: string, allowFaultIn?: boolean, previewFaultIn?: boolean): Promise<LocationsInterfaces.ServiceDefinition>;
|
||||
/**
|
||||
* @param {string} serviceType
|
||||
*/
|
||||
getServiceDefinitions(serviceType?: string): Promise<LocationsInterfaces.ServiceDefinition[]>;
|
||||
/**
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<LocationsInterfaces.ServiceDefinition[]>} serviceDefinitions
|
||||
*/
|
||||
updateServiceDefinitions(serviceDefinitions: VSSInterfaces.VssJsonCollectionWrapperV<LocationsInterfaces.ServiceDefinition[]>): Promise<void>;
|
||||
}
|
||||
+280
@@ -0,0 +1,280 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const LocationsInterfaces = require("./interfaces/LocationsInterfaces");
|
||||
class LocationsApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Locations-api', options);
|
||||
}
|
||||
/**
|
||||
* This was copied and adapted from TeamFoundationConnectionService.Connect()
|
||||
*
|
||||
* @param {VSSInterfaces.ConnectOptions} connectOptions
|
||||
* @param {number} lastChangeId - Obsolete 32-bit LastChangeId
|
||||
* @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId
|
||||
*/
|
||||
getConnectionData(connectOptions, lastChangeId, lastChangeId64) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
connectOptions: connectOptions,
|
||||
lastChangeId: lastChangeId,
|
||||
lastChangeId64: lastChangeId64,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "00d9565f-ed9c-4a06-9a50-00e7896ccab4", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ConnectionData, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} areaId
|
||||
* @param {string} enterpriseName
|
||||
* @param {string} organizationName
|
||||
*/
|
||||
getResourceArea(areaId, enterpriseName, organizationName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
areaId: areaId
|
||||
};
|
||||
let queryValues = {
|
||||
enterpriseName: enterpriseName,
|
||||
organizationName: organizationName,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} areaId
|
||||
* @param {string} hostId
|
||||
*/
|
||||
getResourceAreaByHost(areaId, hostId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (hostId == null) {
|
||||
throw new TypeError('hostId can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
areaId: areaId
|
||||
};
|
||||
let queryValues = {
|
||||
hostId: hostId,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} enterpriseName
|
||||
* @param {string} organizationName
|
||||
*/
|
||||
getResourceAreas(enterpriseName, organizationName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
enterpriseName: enterpriseName,
|
||||
organizationName: organizationName,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} hostId
|
||||
*/
|
||||
getResourceAreasByHost(hostId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (hostId == null) {
|
||||
throw new TypeError('hostId can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
hostId: hostId,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} serviceType
|
||||
* @param {string} identifier
|
||||
*/
|
||||
deleteServiceDefinition(serviceType, identifier) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
serviceType: serviceType,
|
||||
identifier: identifier
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Finds a given service definition.
|
||||
*
|
||||
* @param {string} serviceType
|
||||
* @param {string} identifier
|
||||
* @param {boolean} allowFaultIn - If true, we will attempt to fault in a host instance mapping if in SPS.
|
||||
* @param {boolean} previewFaultIn - If true, we will calculate and return a host instance mapping, but not persist it.
|
||||
*/
|
||||
getServiceDefinition(serviceType, identifier, allowFaultIn, previewFaultIn) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
serviceType: serviceType,
|
||||
identifier: identifier
|
||||
};
|
||||
let queryValues = {
|
||||
allowFaultIn: allowFaultIn,
|
||||
previewFaultIn: previewFaultIn,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} serviceType
|
||||
*/
|
||||
getServiceDefinitions(serviceType) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
serviceType: serviceType
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<LocationsInterfaces.ServiceDefinition[]>} serviceDefinitions
|
||||
*/
|
||||
updateServiceDefinitions(serviceDefinitions) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, serviceDefinitions, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.LocationsApi = LocationsApi;
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import NotificationInterfaces = require("./interfaces/NotificationInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
export interface INotificationApi extends basem.ClientApiBase {
|
||||
performBatchNotificationOperations(operation: NotificationInterfaces.BatchNotificationOperation): Promise<void>;
|
||||
listLogs(source: string, entryId?: string, startTime?: Date, endTime?: Date): Promise<NotificationInterfaces.INotificationDiagnosticLog[]>;
|
||||
getSubscriptionDiagnostics(subscriptionId: string): Promise<NotificationInterfaces.SubscriptionDiagnostics>;
|
||||
updateSubscriptionDiagnostics(updateParameters: NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters, subscriptionId: string): Promise<NotificationInterfaces.SubscriptionDiagnostics>;
|
||||
publishEvent(notificationEvent: VSSInterfaces.VssNotificationEvent): Promise<VSSInterfaces.VssNotificationEvent>;
|
||||
transformEvent(transformRequest: NotificationInterfaces.EventTransformRequest): Promise<NotificationInterfaces.EventTransformResult>;
|
||||
queryEventTypes(inputValuesQuery: NotificationInterfaces.FieldValuesQuery, eventType: string): Promise<NotificationInterfaces.NotificationEventField[]>;
|
||||
getEventType(eventType: string): Promise<NotificationInterfaces.NotificationEventType>;
|
||||
listEventTypes(publisherId?: string): Promise<NotificationInterfaces.NotificationEventType[]>;
|
||||
getNotificationReasons(notificationId: number): Promise<NotificationInterfaces.NotificationReason>;
|
||||
listNotificationReasons(notificationIds?: number): Promise<NotificationInterfaces.NotificationReason[]>;
|
||||
getSettings(): Promise<NotificationInterfaces.NotificationAdminSettings>;
|
||||
updateSettings(updateParameters: NotificationInterfaces.NotificationAdminSettingsUpdateParameters): Promise<NotificationInterfaces.NotificationAdminSettings>;
|
||||
getSubscriber(subscriberId: string): Promise<NotificationInterfaces.NotificationSubscriber>;
|
||||
updateSubscriber(updateParameters: NotificationInterfaces.NotificationSubscriberUpdateParameters, subscriberId: string): Promise<NotificationInterfaces.NotificationSubscriber>;
|
||||
querySubscriptions(subscriptionQuery: NotificationInterfaces.SubscriptionQuery): Promise<NotificationInterfaces.NotificationSubscription[]>;
|
||||
createSubscription(createParameters: NotificationInterfaces.NotificationSubscriptionCreateParameters): Promise<NotificationInterfaces.NotificationSubscription>;
|
||||
deleteSubscription(subscriptionId: string): Promise<void>;
|
||||
getSubscription(subscriptionId: string, queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise<NotificationInterfaces.NotificationSubscription>;
|
||||
listSubscriptions(targetId?: string, ids?: string[], queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise<NotificationInterfaces.NotificationSubscription[]>;
|
||||
updateSubscription(updateParameters: NotificationInterfaces.NotificationSubscriptionUpdateParameters, subscriptionId: string): Promise<NotificationInterfaces.NotificationSubscription>;
|
||||
getSubscriptionTemplates(): Promise<NotificationInterfaces.NotificationSubscriptionTemplate[]>;
|
||||
updateSubscriptionUserSettings(userSettings: NotificationInterfaces.SubscriptionUserSettings, subscriptionId: string, userId: string): Promise<NotificationInterfaces.SubscriptionUserSettings>;
|
||||
}
|
||||
export declare class NotificationApi extends basem.ClientApiBase implements INotificationApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* @param {NotificationInterfaces.BatchNotificationOperation} operation
|
||||
*/
|
||||
performBatchNotificationOperations(operation: NotificationInterfaces.BatchNotificationOperation): Promise<void>;
|
||||
/**
|
||||
* List diagnostic logs this service.
|
||||
*
|
||||
* @param {string} source
|
||||
* @param {string} entryId
|
||||
* @param {Date} startTime
|
||||
* @param {Date} endTime
|
||||
*/
|
||||
listLogs(source: string, entryId?: string, startTime?: Date, endTime?: Date): Promise<NotificationInterfaces.INotificationDiagnosticLog[]>;
|
||||
/**
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
getSubscriptionDiagnostics(subscriptionId: string): Promise<NotificationInterfaces.SubscriptionDiagnostics>;
|
||||
/**
|
||||
* @param {NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters} updateParameters
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
updateSubscriptionDiagnostics(updateParameters: NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters, subscriptionId: string): Promise<NotificationInterfaces.SubscriptionDiagnostics>;
|
||||
/**
|
||||
* Publish an event.
|
||||
*
|
||||
* @param {VSSInterfaces.VssNotificationEvent} notificationEvent
|
||||
*/
|
||||
publishEvent(notificationEvent: VSSInterfaces.VssNotificationEvent): Promise<VSSInterfaces.VssNotificationEvent>;
|
||||
/**
|
||||
* Tranform a notification event.
|
||||
*
|
||||
* @param {NotificationInterfaces.EventTransformRequest} transformRequest - Object to be transformed.
|
||||
*/
|
||||
transformEvent(transformRequest: NotificationInterfaces.EventTransformRequest): Promise<NotificationInterfaces.EventTransformResult>;
|
||||
/**
|
||||
* @param {NotificationInterfaces.FieldValuesQuery} inputValuesQuery
|
||||
* @param {string} eventType
|
||||
*/
|
||||
queryEventTypes(inputValuesQuery: NotificationInterfaces.FieldValuesQuery, eventType: string): Promise<NotificationInterfaces.NotificationEventField[]>;
|
||||
/**
|
||||
* Get a specific event type.
|
||||
*
|
||||
* @param {string} eventType
|
||||
*/
|
||||
getEventType(eventType: string): Promise<NotificationInterfaces.NotificationEventType>;
|
||||
/**
|
||||
* List available event types for this service. Optionally filter by only event types for the specified publisher.
|
||||
*
|
||||
* @param {string} publisherId - Limit to event types for this publisher
|
||||
*/
|
||||
listEventTypes(publisherId?: string): Promise<NotificationInterfaces.NotificationEventType[]>;
|
||||
/**
|
||||
* @param {number} notificationId
|
||||
*/
|
||||
getNotificationReasons(notificationId: number): Promise<NotificationInterfaces.NotificationReason>;
|
||||
/**
|
||||
* @param {number} notificationIds
|
||||
*/
|
||||
listNotificationReasons(notificationIds?: number): Promise<NotificationInterfaces.NotificationReason[]>;
|
||||
/**
|
||||
*/
|
||||
getSettings(): Promise<NotificationInterfaces.NotificationAdminSettings>;
|
||||
/**
|
||||
* @param {NotificationInterfaces.NotificationAdminSettingsUpdateParameters} updateParameters
|
||||
*/
|
||||
updateSettings(updateParameters: NotificationInterfaces.NotificationAdminSettingsUpdateParameters): Promise<NotificationInterfaces.NotificationAdminSettings>;
|
||||
/**
|
||||
* @param {string} subscriberId
|
||||
*/
|
||||
getSubscriber(subscriberId: string): Promise<NotificationInterfaces.NotificationSubscriber>;
|
||||
/**
|
||||
* @param {NotificationInterfaces.NotificationSubscriberUpdateParameters} updateParameters
|
||||
* @param {string} subscriberId
|
||||
*/
|
||||
updateSubscriber(updateParameters: NotificationInterfaces.NotificationSubscriberUpdateParameters, subscriberId: string): Promise<NotificationInterfaces.NotificationSubscriber>;
|
||||
/**
|
||||
* Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions.
|
||||
*
|
||||
* @param {NotificationInterfaces.SubscriptionQuery} subscriptionQuery
|
||||
*/
|
||||
querySubscriptions(subscriptionQuery: NotificationInterfaces.SubscriptionQuery): Promise<NotificationInterfaces.NotificationSubscription[]>;
|
||||
/**
|
||||
* Create a new subscription.
|
||||
*
|
||||
* @param {NotificationInterfaces.NotificationSubscriptionCreateParameters} createParameters
|
||||
*/
|
||||
createSubscription(createParameters: NotificationInterfaces.NotificationSubscriptionCreateParameters): Promise<NotificationInterfaces.NotificationSubscription>;
|
||||
/**
|
||||
* Delete a subscription.
|
||||
*
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
deleteSubscription(subscriptionId: string): Promise<void>;
|
||||
/**
|
||||
* Get a notification subscription by its ID.
|
||||
*
|
||||
* @param {string} subscriptionId
|
||||
* @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags
|
||||
*/
|
||||
getSubscription(subscriptionId: string, queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise<NotificationInterfaces.NotificationSubscription>;
|
||||
/**
|
||||
* @param {string} targetId
|
||||
* @param {string[]} ids
|
||||
* @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags
|
||||
*/
|
||||
listSubscriptions(targetId?: string, ids?: string[], queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise<NotificationInterfaces.NotificationSubscription[]>;
|
||||
/**
|
||||
* Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more.
|
||||
*
|
||||
* @param {NotificationInterfaces.NotificationSubscriptionUpdateParameters} updateParameters
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
updateSubscription(updateParameters: NotificationInterfaces.NotificationSubscriptionUpdateParameters, subscriptionId: string): Promise<NotificationInterfaces.NotificationSubscription>;
|
||||
/**
|
||||
* Get available subscription templates.
|
||||
*
|
||||
*/
|
||||
getSubscriptionTemplates(): Promise<NotificationInterfaces.NotificationSubscriptionTemplate[]>;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param {NotificationInterfaces.SubscriptionUserSettings} userSettings
|
||||
* @param {string} subscriptionId
|
||||
* @param {string} userId - ID of the user
|
||||
*/
|
||||
updateSubscriptionUserSettings(userSettings: NotificationInterfaces.SubscriptionUserSettings, subscriptionId: string, userId: string): Promise<NotificationInterfaces.SubscriptionUserSettings>;
|
||||
}
|
||||
+612
@@ -0,0 +1,612 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const NotificationInterfaces = require("./interfaces/NotificationInterfaces");
|
||||
const VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
class NotificationApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Notification-api', options);
|
||||
}
|
||||
/**
|
||||
* @param {NotificationInterfaces.BatchNotificationOperation} operation
|
||||
*/
|
||||
performBatchNotificationOperations(operation) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "8f3c6ab2-5bae-4537-b16e-f84e0955599e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, operation, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* List diagnostic logs this service.
|
||||
*
|
||||
* @param {string} source
|
||||
* @param {string} entryId
|
||||
* @param {Date} startTime
|
||||
* @param {Date} endTime
|
||||
*/
|
||||
listLogs(source, entryId, startTime, endTime) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
source: source,
|
||||
entryId: entryId
|
||||
};
|
||||
let queryValues = {
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "991842f3-eb16-4aea-ac81-81353ef2b75c", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.INotificationDiagnosticLog, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
getSubscriptionDiagnostics(subscriptionId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriptionId: subscriptionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters} updateParameters
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
updateSubscriptionDiagnostics(updateParameters, subscriptionId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriptionId: subscriptionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, updateParameters, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Publish an event.
|
||||
*
|
||||
* @param {VSSInterfaces.VssNotificationEvent} notificationEvent
|
||||
*/
|
||||
publishEvent(notificationEvent) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "14c57b7a-c0e6-4555-9f51-e067188fdd8e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, notificationEvent, options);
|
||||
let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Tranform a notification event.
|
||||
*
|
||||
* @param {NotificationInterfaces.EventTransformRequest} transformRequest - Object to be transformed.
|
||||
*/
|
||||
transformEvent(transformRequest) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "9463a800-1b44-450e-9083-f948ea174b45", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, transformRequest, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {NotificationInterfaces.FieldValuesQuery} inputValuesQuery
|
||||
* @param {string} eventType
|
||||
*/
|
||||
queryEventTypes(inputValuesQuery, eventType) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
eventType: eventType
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "b5bbdd21-c178-4398-b6db-0166d910028a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, inputValuesQuery, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventField, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a specific event type.
|
||||
*
|
||||
* @param {string} eventType
|
||||
*/
|
||||
getEventType(eventType) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
eventType: eventType
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* List available event types for this service. Optionally filter by only event types for the specified publisher.
|
||||
*
|
||||
* @param {string} publisherId - Limit to event types for this publisher
|
||||
*/
|
||||
listEventTypes(publisherId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
publisherId: publisherId,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {number} notificationId
|
||||
*/
|
||||
getNotificationReasons(notificationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
notificationId: notificationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {number} notificationIds
|
||||
*/
|
||||
listNotificationReasons(notificationIds) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
notificationIds: notificationIds,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
*/
|
||||
getSettings() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {NotificationInterfaces.NotificationAdminSettingsUpdateParameters} updateParameters
|
||||
*/
|
||||
updateSettings(updateParameters) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, updateParameters, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} subscriberId
|
||||
*/
|
||||
getSubscriber(subscriberId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriberId: subscriberId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {NotificationInterfaces.NotificationSubscriberUpdateParameters} updateParameters
|
||||
* @param {string} subscriberId
|
||||
*/
|
||||
updateSubscriber(updateParameters, subscriberId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriberId: subscriberId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, updateParameters, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions.
|
||||
*
|
||||
* @param {NotificationInterfaces.SubscriptionQuery} subscriptionQuery
|
||||
*/
|
||||
querySubscriptions(subscriptionQuery) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "6864db85-08c0-4006-8e8e-cc1bebe31675", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, subscriptionQuery, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create a new subscription.
|
||||
*
|
||||
* @param {NotificationInterfaces.NotificationSubscriptionCreateParameters} createParameters
|
||||
*/
|
||||
createSubscription(createParameters) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, createParameters, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Delete a subscription.
|
||||
*
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
deleteSubscription(subscriptionId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriptionId: subscriptionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a notification subscription by its ID.
|
||||
*
|
||||
* @param {string} subscriptionId
|
||||
* @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags
|
||||
*/
|
||||
getSubscription(subscriptionId, queryFlags) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriptionId: subscriptionId
|
||||
};
|
||||
let queryValues = {
|
||||
queryFlags: queryFlags,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} targetId
|
||||
* @param {string[]} ids
|
||||
* @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags
|
||||
*/
|
||||
listSubscriptions(targetId, ids, queryFlags) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
targetId: targetId,
|
||||
ids: ids && ids.join(","),
|
||||
queryFlags: queryFlags,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more.
|
||||
*
|
||||
* @param {NotificationInterfaces.NotificationSubscriptionUpdateParameters} updateParameters
|
||||
* @param {string} subscriptionId
|
||||
*/
|
||||
updateSubscription(updateParameters, subscriptionId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriptionId: subscriptionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, updateParameters, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get available subscription templates.
|
||||
*
|
||||
*/
|
||||
getSubscriptionTemplates() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "fa5d24ba-7484-4f3d-888d-4ec6b1974082", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriptionTemplate, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param {NotificationInterfaces.SubscriptionUserSettings} userSettings
|
||||
* @param {string} subscriptionId
|
||||
* @param {string} userId - ID of the user
|
||||
*/
|
||||
updateSubscriptionUserSettings(userSettings, subscriptionId, userId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
subscriptionId: subscriptionId,
|
||||
userId: userId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "notification", "ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, userSettings, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.NotificationApi = NotificationApi;
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import PolicyInterfaces = require("./interfaces/PolicyInterfaces");
|
||||
export interface IPolicyApi extends basem.ClientApiBase {
|
||||
createPolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId?: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
deletePolicyConfiguration(project: string, configurationId: number): Promise<void>;
|
||||
getPolicyConfiguration(project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise<PolicyInterfaces.PolicyConfiguration[]>;
|
||||
updatePolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
getPolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
||||
requeuePolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
||||
getPolicyEvaluations(project: string, artifactId: string, includeNotApplicable?: boolean, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyEvaluationRecord[]>;
|
||||
getPolicyConfigurationRevision(project: string, configurationId: number, revisionId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
getPolicyConfigurationRevisions(project: string, configurationId: number, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyConfiguration[]>;
|
||||
getPolicyType(project: string, typeId: string): Promise<PolicyInterfaces.PolicyType>;
|
||||
getPolicyTypes(project: string): Promise<PolicyInterfaces.PolicyType[]>;
|
||||
}
|
||||
export declare class PolicyApi extends basem.ClientApiBase implements IPolicyApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Create a policy configuration of a given policy type.
|
||||
*
|
||||
* @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId
|
||||
*/
|
||||
createPolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId?: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
/**
|
||||
* Delete a policy configuration by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - ID of the policy configuration to delete.
|
||||
*/
|
||||
deletePolicyConfiguration(project: string, configurationId: number): Promise<void>;
|
||||
/**
|
||||
* Get a policy configuration by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - ID of the policy configuration
|
||||
*/
|
||||
getPolicyConfiguration(project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
/**
|
||||
* Get a list of policy configurations in a project.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scope - The scope on which a subset of policies is defined.
|
||||
* @param {string} policyType - Filter returned policies to only this type
|
||||
*/
|
||||
getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise<PolicyInterfaces.PolicyConfiguration[]>;
|
||||
/**
|
||||
* Update a policy configuration by its ID.
|
||||
*
|
||||
* @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - ID of the existing policy configuration to be updated.
|
||||
*/
|
||||
updatePolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
/**
|
||||
* Gets the present evaluation state of a policy.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} evaluationId - ID of the policy evaluation to be retrieved.
|
||||
*/
|
||||
getPolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
||||
/**
|
||||
* Requeue the policy evaluation.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} evaluationId - ID of the policy evaluation to be retrieved.
|
||||
*/
|
||||
requeuePolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
||||
/**
|
||||
* Retrieves a list of all the policy evaluation statuses for a specific pull request.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} artifactId - A string which uniquely identifies the target of a policy evaluation.
|
||||
* @param {boolean} includeNotApplicable - Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request.
|
||||
* @param {number} top - The number of policy evaluation records to retrieve.
|
||||
* @param {number} skip - The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
|
||||
*/
|
||||
getPolicyEvaluations(project: string, artifactId: string, includeNotApplicable?: boolean, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyEvaluationRecord[]>;
|
||||
/**
|
||||
* Retrieve a specific revision of a given policy by ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - The policy configuration ID.
|
||||
* @param {number} revisionId - The revision ID.
|
||||
*/
|
||||
getPolicyConfigurationRevision(project: string, configurationId: number, revisionId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
||||
/**
|
||||
* Retrieve all revisions for a given policy.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - The policy configuration ID.
|
||||
* @param {number} top - The number of revisions to retrieve.
|
||||
* @param {number} skip - The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
|
||||
*/
|
||||
getPolicyConfigurationRevisions(project: string, configurationId: number, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyConfiguration[]>;
|
||||
/**
|
||||
* Retrieve a specific policy type by ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} typeId - The policy ID.
|
||||
*/
|
||||
getPolicyType(project: string, typeId: string): Promise<PolicyInterfaces.PolicyType>;
|
||||
/**
|
||||
* Retrieve all available policy types.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getPolicyTypes(project: string): Promise<PolicyInterfaces.PolicyType[]>;
|
||||
}
|
||||
+387
@@ -0,0 +1,387 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const PolicyInterfaces = require("./interfaces/PolicyInterfaces");
|
||||
class PolicyApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Policy-api', options);
|
||||
}
|
||||
/**
|
||||
* Create a policy configuration of a given policy type.
|
||||
*
|
||||
* @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId
|
||||
*/
|
||||
createPolicyConfiguration(configuration, project, configurationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
configurationId: configurationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, configuration, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Delete a policy configuration by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - ID of the policy configuration to delete.
|
||||
*/
|
||||
deletePolicyConfiguration(project, configurationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
configurationId: configurationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a policy configuration by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - ID of the policy configuration
|
||||
*/
|
||||
getPolicyConfiguration(project, configurationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
configurationId: configurationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of policy configurations in a project.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scope - The scope on which a subset of policies is defined.
|
||||
* @param {string} policyType - Filter returned policies to only this type
|
||||
*/
|
||||
getPolicyConfigurations(project, scope, policyType) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
scope: scope,
|
||||
policyType: policyType,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update a policy configuration by its ID.
|
||||
*
|
||||
* @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - ID of the existing policy configuration to be updated.
|
||||
*/
|
||||
updatePolicyConfiguration(configuration, project, configurationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
configurationId: configurationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, configuration, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets the present evaluation state of a policy.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} evaluationId - ID of the policy evaluation to be retrieved.
|
||||
*/
|
||||
getPolicyEvaluation(project, evaluationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
evaluationId: evaluationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Requeue the policy evaluation.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} evaluationId - ID of the policy evaluation to be retrieved.
|
||||
*/
|
||||
requeuePolicyEvaluation(project, evaluationId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
evaluationId: evaluationId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, null, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves a list of all the policy evaluation statuses for a specific pull request.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} artifactId - A string which uniquely identifies the target of a policy evaluation.
|
||||
* @param {boolean} includeNotApplicable - Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request.
|
||||
* @param {number} top - The number of policy evaluation records to retrieve.
|
||||
* @param {number} skip - The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
|
||||
*/
|
||||
getPolicyEvaluations(project, artifactId, includeNotApplicable, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (artifactId == null) {
|
||||
throw new TypeError('artifactId can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
artifactId: artifactId,
|
||||
includeNotApplicable: includeNotApplicable,
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "c23ddff5-229c-4d04-a80b-0fdce9f360c8", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieve a specific revision of a given policy by ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - The policy configuration ID.
|
||||
* @param {number} revisionId - The revision ID.
|
||||
*/
|
||||
getPolicyConfigurationRevision(project, configurationId, revisionId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
configurationId: configurationId,
|
||||
revisionId: revisionId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieve all revisions for a given policy.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} configurationId - The policy configuration ID.
|
||||
* @param {number} top - The number of revisions to retrieve.
|
||||
* @param {number} skip - The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
|
||||
*/
|
||||
getPolicyConfigurationRevisions(project, configurationId, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
configurationId: configurationId
|
||||
};
|
||||
let queryValues = {
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieve a specific policy type by ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} typeId - The policy ID.
|
||||
*/
|
||||
getPolicyType(project, typeId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
typeId: typeId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieve all available policy types.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getPolicyTypes(project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
PolicyApi.RESOURCE_AREA_ID = "fb13a388-40dd-4a04-b530-013a739c72ef";
|
||||
exports.PolicyApi = PolicyApi;
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import ProfileInterfaces = require("./interfaces/ProfileInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
export interface IProfileApi extends basem.ClientApiBase {
|
||||
deleteProfileAttribute(id: string, descriptor: string): Promise<void>;
|
||||
getProfileAttribute(id: string, descriptor: string): Promise<ProfileInterfaces.ProfileAttribute>;
|
||||
getProfileAttributes(id: string, partition: string, modifiedSince?: string, modifiedAfterRevision?: string, withCoreAttributes?: boolean, coreAttributes?: string): Promise<ProfileInterfaces.ProfileAttribute[]>;
|
||||
setProfileAttribute(container: any, id: string, descriptor: string): Promise<void>;
|
||||
setProfileAttributes(attributesCollection: VSSInterfaces.VssJsonCollectionWrapperV<ProfileInterfaces.ProfileAttributeBase<any>[]>, id: string): Promise<void>;
|
||||
getAvatar(id: string, size?: string, format?: string): Promise<ProfileInterfaces.Avatar>;
|
||||
getAvatarPreview(container: any, id: string, size?: string, format?: string, displayName?: string): Promise<ProfileInterfaces.Avatar>;
|
||||
resetAvatar(id: string): Promise<void>;
|
||||
setAvatar(container: any, id: string): Promise<void>;
|
||||
getGeoRegion(ipaddress: string): Promise<ProfileInterfaces.GeoRegion>;
|
||||
createProfile(createProfileContext: ProfileInterfaces.CreateProfileContext, autoCreate?: boolean): Promise<ProfileInterfaces.Profile>;
|
||||
getProfile(id: string, details?: boolean, withAttributes?: boolean, partition?: string, coreAttributes?: string, forceRefresh?: boolean): Promise<ProfileInterfaces.Profile>;
|
||||
updateProfile(profile: ProfileInterfaces.Profile, id: string): Promise<void>;
|
||||
getRegions(): Promise<ProfileInterfaces.ProfileRegions>;
|
||||
getSupportedLcids(): Promise<string[]>;
|
||||
getUserDefaults(includeAvatar?: boolean): Promise<ProfileInterfaces.Profile>;
|
||||
refreshUserDefaults(id: string): Promise<ProfileInterfaces.Profile>;
|
||||
}
|
||||
export declare class ProfileApi extends basem.ClientApiBase implements IProfileApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} descriptor
|
||||
*/
|
||||
deleteProfileAttribute(id: string, descriptor: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} descriptor
|
||||
*/
|
||||
getProfileAttribute(id: string, descriptor: string): Promise<ProfileInterfaces.ProfileAttribute>;
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} partition
|
||||
* @param {string} modifiedSince
|
||||
* @param {string} modifiedAfterRevision
|
||||
* @param {boolean} withCoreAttributes
|
||||
* @param {string} coreAttributes
|
||||
*/
|
||||
getProfileAttributes(id: string, partition: string, modifiedSince?: string, modifiedAfterRevision?: string, withCoreAttributes?: boolean, coreAttributes?: string): Promise<ProfileInterfaces.ProfileAttribute[]>;
|
||||
/**
|
||||
* @param {any} container
|
||||
* @param {string} id
|
||||
* @param {string} descriptor
|
||||
*/
|
||||
setProfileAttribute(container: any, id: string, descriptor: string): Promise<void>;
|
||||
/**
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<ProfileInterfaces.ProfileAttributeBase<any>[]>} attributesCollection
|
||||
* @param {string} id
|
||||
*/
|
||||
setProfileAttributes(attributesCollection: VSSInterfaces.VssJsonCollectionWrapperV<ProfileInterfaces.ProfileAttributeBase<any>[]>, id: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} size
|
||||
* @param {string} format
|
||||
*/
|
||||
getAvatar(id: string, size?: string, format?: string): Promise<ProfileInterfaces.Avatar>;
|
||||
/**
|
||||
* @param {any} container
|
||||
* @param {string} id
|
||||
* @param {string} size
|
||||
* @param {string} format
|
||||
* @param {string} displayName
|
||||
*/
|
||||
getAvatarPreview(container: any, id: string, size?: string, format?: string, displayName?: string): Promise<ProfileInterfaces.Avatar>;
|
||||
/**
|
||||
* @param {string} id
|
||||
*/
|
||||
resetAvatar(id: string): Promise<void>;
|
||||
/**
|
||||
* @param {any} container
|
||||
* @param {string} id
|
||||
*/
|
||||
setAvatar(container: any, id: string): Promise<void>;
|
||||
/**
|
||||
* Lookup up country/region based on provided IPv4, null if using the remote IPv4 address.
|
||||
*
|
||||
* @param {string} ipaddress - IPv4 address to be used for reverse lookup, null if using RemoteIPAddress in request context
|
||||
*/
|
||||
getGeoRegion(ipaddress: string): Promise<ProfileInterfaces.GeoRegion>;
|
||||
/**
|
||||
* Create profile
|
||||
*
|
||||
* @param {ProfileInterfaces.CreateProfileContext} createProfileContext - Context for profile creation
|
||||
* @param {boolean} autoCreate - Create profile automatically
|
||||
*/
|
||||
createProfile(createProfileContext: ProfileInterfaces.CreateProfileContext, autoCreate?: boolean): Promise<ProfileInterfaces.Profile>;
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {boolean} details
|
||||
* @param {boolean} withAttributes
|
||||
* @param {string} partition
|
||||
* @param {string} coreAttributes
|
||||
* @param {boolean} forceRefresh
|
||||
*/
|
||||
getProfile(id: string, details?: boolean, withAttributes?: boolean, partition?: string, coreAttributes?: string, forceRefresh?: boolean): Promise<ProfileInterfaces.Profile>;
|
||||
/**
|
||||
* Update profile
|
||||
*
|
||||
* @param {ProfileInterfaces.Profile} profile - Update profile
|
||||
* @param {string} id - Profile ID
|
||||
*/
|
||||
updateProfile(profile: ProfileInterfaces.Profile, id: string): Promise<void>;
|
||||
/**
|
||||
*/
|
||||
getRegions(): Promise<ProfileInterfaces.ProfileRegions>;
|
||||
/**
|
||||
*/
|
||||
getSupportedLcids(): Promise<string[]>;
|
||||
/**
|
||||
* @param {boolean} includeAvatar
|
||||
*/
|
||||
getUserDefaults(includeAvatar?: boolean): Promise<ProfileInterfaces.Profile>;
|
||||
/**
|
||||
* @param {string} id
|
||||
*/
|
||||
refreshUserDefaults(id: string): Promise<ProfileInterfaces.Profile>;
|
||||
}
|
||||
+494
@@ -0,0 +1,494 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const ProfileInterfaces = require("./interfaces/ProfileInterfaces");
|
||||
class ProfileApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Profile-api', options);
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} descriptor
|
||||
*/
|
||||
deleteProfileAttribute(id, descriptor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
descriptor: descriptor,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} descriptor
|
||||
*/
|
||||
getProfileAttribute(id, descriptor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
descriptor: descriptor,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} partition
|
||||
* @param {string} modifiedSince
|
||||
* @param {string} modifiedAfterRevision
|
||||
* @param {boolean} withCoreAttributes
|
||||
* @param {string} coreAttributes
|
||||
*/
|
||||
getProfileAttributes(id, partition, modifiedSince, modifiedAfterRevision, withCoreAttributes, coreAttributes) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
partition: partition,
|
||||
modifiedSince: modifiedSince,
|
||||
modifiedAfterRevision: modifiedAfterRevision,
|
||||
withCoreAttributes: withCoreAttributes,
|
||||
coreAttributes: coreAttributes,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {any} container
|
||||
* @param {string} id
|
||||
* @param {string} descriptor
|
||||
*/
|
||||
setProfileAttribute(container, id, descriptor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
descriptor: descriptor,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, container, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<ProfileInterfaces.ProfileAttributeBase<any>[]>} attributesCollection
|
||||
* @param {string} id
|
||||
*/
|
||||
setProfileAttributes(attributesCollection, id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, attributesCollection, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} size
|
||||
* @param {string} format
|
||||
*/
|
||||
getAvatar(id, size, format) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
size: size,
|
||||
format: format,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {any} container
|
||||
* @param {string} id
|
||||
* @param {string} size
|
||||
* @param {string} format
|
||||
* @param {string} displayName
|
||||
*/
|
||||
getAvatarPreview(container, id, size, format, displayName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
size: size,
|
||||
format: format,
|
||||
displayName: displayName,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, container, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
*/
|
||||
resetAvatar(id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {any} container
|
||||
* @param {string} id
|
||||
*/
|
||||
setAvatar(container, id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, container, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Lookup up country/region based on provided IPv4, null if using the remote IPv4 address.
|
||||
*
|
||||
* @param {string} ipaddress - IPv4 address to be used for reverse lookup, null if using RemoteIPAddress in request context
|
||||
*/
|
||||
getGeoRegion(ipaddress) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
ipaddress: ipaddress,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "3bcda9c0-3078-48a5-a1e0-83bd05931ad0", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create profile
|
||||
*
|
||||
* @param {ProfileInterfaces.CreateProfileContext} createProfileContext - Context for profile creation
|
||||
* @param {boolean} autoCreate - Create profile automatically
|
||||
*/
|
||||
createProfile(createProfileContext, autoCreate) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
autoCreate: autoCreate,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, createProfileContext, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {boolean} details
|
||||
* @param {boolean} withAttributes
|
||||
* @param {string} partition
|
||||
* @param {string} coreAttributes
|
||||
* @param {boolean} forceRefresh
|
||||
*/
|
||||
getProfile(id, details, withAttributes, partition, coreAttributes, forceRefresh) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
details: details,
|
||||
withAttributes: withAttributes,
|
||||
partition: partition,
|
||||
coreAttributes: coreAttributes,
|
||||
forceRefresh: forceRefresh,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update profile
|
||||
*
|
||||
* @param {ProfileInterfaces.Profile} profile - Update profile
|
||||
* @param {string} id - Profile ID
|
||||
*/
|
||||
updateProfile(profile, id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, profile, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
*/
|
||||
getRegions() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "92d8d1c9-26b8-4774-a929-d640a73da524", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
*/
|
||||
getSupportedLcids() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "d5bd1aa6-c269-4bcd-ad32-75fa17475584", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {boolean} includeAvatar
|
||||
*/
|
||||
getUserDefaults(includeAvatar) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
includeAvatar: includeAvatar,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
*/
|
||||
refreshUserDefaults(id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, options);
|
||||
let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.ProfileApi = ProfileApi;
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import ProjectAnalysisInterfaces = require("./interfaces/ProjectAnalysisInterfaces");
|
||||
export interface IProjectAnalysisApi extends basem.ClientApiBase {
|
||||
getProjectLanguageAnalytics(project: string): Promise<ProjectAnalysisInterfaces.ProjectLanguageAnalytics>;
|
||||
getProjectActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.ProjectActivityMetrics>;
|
||||
getGitRepositoriesActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType, skip: number, top: number): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics[]>;
|
||||
getRepositoryActivityMetrics(project: string, repositoryId: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics>;
|
||||
}
|
||||
export declare class ProjectAnalysisApi extends basem.ClientApiBase implements IProjectAnalysisApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getProjectLanguageAnalytics(project: string): Promise<ProjectAnalysisInterfaces.ProjectLanguageAnalytics>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {Date} fromDate
|
||||
* @param {ProjectAnalysisInterfaces.AggregationType} aggregationType
|
||||
*/
|
||||
getProjectActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.ProjectActivityMetrics>;
|
||||
/**
|
||||
* Retrieves git activity metrics for repositories matching a specified criteria.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {Date} fromDate - Date from which, the trends are to be fetched.
|
||||
* @param {ProjectAnalysisInterfaces.AggregationType} aggregationType - Bucket size on which, trends are to be aggregated.
|
||||
* @param {number} skip - The number of repositories to ignore.
|
||||
* @param {number} top - The number of repositories for which activity metrics are to be retrieved.
|
||||
*/
|
||||
getGitRepositoriesActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType, skip: number, top: number): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} repositoryId
|
||||
* @param {Date} fromDate
|
||||
* @param {ProjectAnalysisInterfaces.AggregationType} aggregationType
|
||||
*/
|
||||
getRepositoryActivityMetrics(project: string, repositoryId: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics>;
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const ProjectAnalysisInterfaces = require("./interfaces/ProjectAnalysisInterfaces");
|
||||
class ProjectAnalysisApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-ProjectAnalysis-api', options);
|
||||
}
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getProjectLanguageAnalytics(project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "projectanalysis", "5b02a779-1867-433f-90b7-d23ed5e33e57", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectLanguageAnalytics, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {Date} fromDate
|
||||
* @param {ProjectAnalysisInterfaces.AggregationType} aggregationType
|
||||
*/
|
||||
getProjectActivityMetrics(project, fromDate, aggregationType) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (fromDate == null) {
|
||||
throw new TypeError('fromDate can not be null or undefined');
|
||||
}
|
||||
if (aggregationType == null) {
|
||||
throw new TypeError('aggregationType can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
fromDate: fromDate,
|
||||
aggregationType: aggregationType,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "projectanalysis", "e40ae584-9ea6-4f06-a7c7-6284651b466b", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectActivityMetrics, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves git activity metrics for repositories matching a specified criteria.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {Date} fromDate - Date from which, the trends are to be fetched.
|
||||
* @param {ProjectAnalysisInterfaces.AggregationType} aggregationType - Bucket size on which, trends are to be aggregated.
|
||||
* @param {number} skip - The number of repositories to ignore.
|
||||
* @param {number} top - The number of repositories for which activity metrics are to be retrieved.
|
||||
*/
|
||||
getGitRepositoriesActivityMetrics(project, fromDate, aggregationType, skip, top) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (fromDate == null) {
|
||||
throw new TypeError('fromDate can not be null or undefined');
|
||||
}
|
||||
if (aggregationType == null) {
|
||||
throw new TypeError('aggregationType can not be null or undefined');
|
||||
}
|
||||
if (skip == null) {
|
||||
throw new TypeError('skip can not be null or undefined');
|
||||
}
|
||||
if (top == null) {
|
||||
throw new TypeError('top can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
fromDate: fromDate,
|
||||
aggregationType: aggregationType,
|
||||
'$skip': skip,
|
||||
'$top': top,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} repositoryId
|
||||
* @param {Date} fromDate
|
||||
* @param {ProjectAnalysisInterfaces.AggregationType} aggregationType
|
||||
*/
|
||||
getRepositoryActivityMetrics(project, repositoryId, fromDate, aggregationType) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (fromDate == null) {
|
||||
throw new TypeError('fromDate can not be null or undefined');
|
||||
}
|
||||
if (aggregationType == null) {
|
||||
throw new TypeError('aggregationType can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
repositoryId: repositoryId
|
||||
};
|
||||
let queryValues = {
|
||||
fromDate: fromDate,
|
||||
aggregationType: aggregationType,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
ProjectAnalysisApi.RESOURCE_AREA_ID = "7658fa33-b1bf-4580-990f-fac5896773d3";
|
||||
exports.ProjectAnalysisApi = ProjectAnalysisApi;
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
[](https://dev.azure.com/ms/azure-devops-node-api/_build/latest?definitionId=89&branchName=master)
|
||||
|
||||
# Azure DevOps Client for Node.js
|
||||
|
||||
Integrate with Azure DevOps from your Node.js apps.
|
||||
|
||||
### Install the library
|
||||
```
|
||||
npm install azure-devops-node-api --save
|
||||
```
|
||||
|
||||
## News
|
||||
|
||||
vso-node-api has been renamed and released as azure-devops-node-api
|
||||
|
||||
## Get started
|
||||
|
||||
### Samples
|
||||
|
||||
See [samples](./samples) for complete coding examples
|
||||
|
||||
### Install the library
|
||||
```
|
||||
npm install azure-devops-node-api --save
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Create a connection
|
||||
```javascript
|
||||
import * as azdev from "azure-devops-node-api";
|
||||
|
||||
// your collection url
|
||||
let orgUrl = "https://dev.azure.com/yourorgname";
|
||||
|
||||
// ideally from config
|
||||
let token: string = "cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha";
|
||||
|
||||
let authHandler = azdev.getPersonalAccessTokenHandler(token);
|
||||
let connection = new azdev.WebApi(orgUrl, authHandler);
|
||||
```
|
||||
|
||||
### Get an instance of a client
|
||||
|
||||
```javascript
|
||||
import * as ba from "azure-devops-node-api/BuildApi";
|
||||
|
||||
let build: ba.IBuildApi = await connection.getBuildApi();
|
||||
```
|
||||
|
||||
#### Available clients
|
||||
|
||||
These clients are available:
|
||||
|
||||
* Build
|
||||
* Core
|
||||
* Dashboard
|
||||
* ExtensionManagement
|
||||
* FeatureManagement
|
||||
* FileContainer
|
||||
* Git
|
||||
* Locations
|
||||
* Notification
|
||||
* Policy
|
||||
* Profile
|
||||
* ProjectAnalysis
|
||||
* Release
|
||||
* SecurityRoles
|
||||
* TaskAgent
|
||||
* Task
|
||||
* Test
|
||||
* Tfvc
|
||||
* Wiki
|
||||
* Work
|
||||
* WorkItemTracking
|
||||
* WorkItemTrackingProcess
|
||||
* WorkItemTrackingProcessDefinitions
|
||||
|
||||
### Use the client
|
||||
|
||||
Coding is easy using linear coding with async/await in TypeScript
|
||||
|
||||
```javascript
|
||||
import * as bi from "azure-devops-node-api/interfaces/BuildInterfaces";
|
||||
|
||||
async function run() {
|
||||
let project: string = "myProject";
|
||||
let defs: bi.DefinitionReference[] = await build.getDefinitions(project);
|
||||
|
||||
defs.forEach((defRef: bi.DefinitionReference) => {
|
||||
console.log(`${defRef.name} (${defRef.id})`);
|
||||
});
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
## APIs
|
||||
|
||||
To see what APIs are available, see the appropriate client interface. For example, [GitApi.ts](https://github.com/Microsoft/azure-devops-node-api/blob/master/api/GitApi.ts)
|
||||
|
||||
More detailed information for the endpoints of each API can be found at https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1
|
||||
|
||||
## Running Samples
|
||||
|
||||
Pre-reqs: [Node >= 4.4.7 LTS](https://nodejs.org) and [typescript (tsc) >= 1.8](https://www.npmjs.com/package/typescript)
|
||||
|
||||
Run `npm install` first
|
||||
|
||||
Set environment variables using set or export:
|
||||
|
||||
```bash
|
||||
API_URL=https://dev.azure.com/yourorgname
|
||||
|
||||
// use your token
|
||||
API_TOKEN=cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha
|
||||
|
||||
API_PROJECT=myProject
|
||||
```
|
||||
|
||||
Run samples:
|
||||
|
||||
```bash
|
||||
$ npm run samples
|
||||
```
|
||||
|
||||
Run a specific sample:
|
||||
|
||||
```bash
|
||||
$ npm run samples -- http
|
||||
```
|
||||
|
||||
## API and TFS Mapping
|
||||
|
||||
Below you'll find a quick mapping of azure-devops-node-api versions and their corresponding TFS releases. All API versions will work on the server version mentioned as well as later versions.
|
||||
|
||||
|**TFS Version** | **Node API VERSION**|
|
||||
|-------------------|------------------|
|
||||
|TFS 2018 Update 2 | 6.6.2|
|
||||
|TFS 2017 Update 2 | 6.2.8-preview|
|
||||
|TFS 2017 Update 1 | 5.1.2|
|
||||
|TFS 2017 RTW | 5.0.0|
|
||||
|TFS 2015 Update 2 | 0.7.0|
|
||||
|
||||
## Contributing
|
||||
|
||||
To contribute to this repository, see the [contribution guide](./CONTRIBUTING.md)
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
+768
@@ -0,0 +1,768 @@
|
||||
/// <reference types="node" />
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import FormInputInterfaces = require("./interfaces/common/FormInputInterfaces");
|
||||
import ReleaseInterfaces = require("./interfaces/ReleaseInterfaces");
|
||||
export interface IReleaseApi extends basem.ClientApiBase {
|
||||
getAgentArtifactDefinitions(project: string, releaseId: number): Promise<ReleaseInterfaces.AgentArtifactDefinition[]>;
|
||||
getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[], typeFilter?: ReleaseInterfaces.ApprovalType, top?: number, continuationToken?: number, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, includeMyGroupApprovals?: boolean): Promise<ReleaseInterfaces.ReleaseApproval[]>;
|
||||
getApprovalHistory(project: string, approvalStepId: number): Promise<ReleaseInterfaces.ReleaseApproval>;
|
||||
getApproval(project: string, approvalId: number, includeHistory?: boolean): Promise<ReleaseInterfaces.ReleaseApproval>;
|
||||
updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise<ReleaseInterfaces.ReleaseApproval>;
|
||||
updateReleaseApprovals(approvals: ReleaseInterfaces.ReleaseApproval[], project: string): Promise<ReleaseInterfaces.ReleaseApproval[]>;
|
||||
getTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
getReleaseTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
getTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, type: string): Promise<ReleaseInterfaces.ReleaseTaskAttachment[]>;
|
||||
getReleaseTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, type: string): Promise<ReleaseInterfaces.ReleaseTaskAttachment[]>;
|
||||
getAutoTriggerIssues(artifactType: string, sourceId: string, artifactVersionId: string, project?: string): Promise<ReleaseInterfaces.AutoTriggerIssue[]>;
|
||||
getDeploymentBadge(projectId: string, releaseDefinitionId: number, environmentId: number, branchName?: string): Promise<string>;
|
||||
getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise<ReleaseInterfaces.Change[]>;
|
||||
getDefinitionEnvironments(project: string, taskGroupId?: string, propertyFilters?: string[]): Promise<ReleaseInterfaces.DefinitionEnvironmentReference[]>;
|
||||
createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
deleteReleaseDefinition(project: string, definitionId: number, comment?: string, forceDelete?: boolean): Promise<void>;
|
||||
getReleaseDefinition(project: string, definitionId: number, propertyFilters?: string[]): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise<NodeJS.ReadableStream>;
|
||||
getReleaseDefinitions(project: string, searchText?: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands, artifactType?: string, artifactSourceId?: string, top?: number, continuationToken?: string, queryOrder?: ReleaseInterfaces.ReleaseDefinitionQueryOrder, path?: string, isExactNameMatch?: boolean, tagFilter?: string[], propertyFilters?: string[], definitionIdFilter?: string[], isDeleted?: boolean): Promise<ReleaseInterfaces.ReleaseDefinition[]>;
|
||||
undeleteReleaseDefinition(releaseDefinitionUndeleteParameter: ReleaseInterfaces.ReleaseDefinitionUndeleteParameter, project: string, definitionId: number): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
getDeployments(project: string, definitionId?: number, definitionEnvironmentId?: number, createdBy?: string, minModifiedTime?: Date, maxModifiedTime?: Date, deploymentStatus?: ReleaseInterfaces.DeploymentStatus, operationStatus?: ReleaseInterfaces.DeploymentOperationStatus, latestAttemptsOnly?: boolean, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, createdFor?: string, minStartedTime?: Date, maxStartedTime?: Date, sourceBranch?: string): Promise<ReleaseInterfaces.Deployment[]>;
|
||||
getDeploymentsForMultipleEnvironments(queryParameters: ReleaseInterfaces.DeploymentQueryParameters, project: string): Promise<ReleaseInterfaces.Deployment[]>;
|
||||
getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise<ReleaseInterfaces.ReleaseEnvironment>;
|
||||
updateReleaseEnvironment(environmentUpdateData: ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata, project: string, releaseId: number, environmentId: number): Promise<ReleaseInterfaces.ReleaseEnvironment>;
|
||||
createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate>;
|
||||
deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<void>;
|
||||
getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate>;
|
||||
listDefinitionEnvironmentTemplates(project: string, isDeleted?: boolean): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]>;
|
||||
undeleteReleaseDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate>;
|
||||
createFavorites(favoriteItems: ReleaseInterfaces.FavoriteItem[], project: string, scope: string, identityId?: string): Promise<ReleaseInterfaces.FavoriteItem[]>;
|
||||
deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): Promise<void>;
|
||||
getFavorites(project: string, scope: string, identityId?: string): Promise<ReleaseInterfaces.FavoriteItem[]>;
|
||||
getFlightAssignments(flightName?: string): Promise<string[]>;
|
||||
createFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
|
||||
deleteFolder(project: string, path: string): Promise<void>;
|
||||
getFolders(project: string, path?: string, queryOrder?: ReleaseInterfaces.FolderPathQueryOrder): Promise<ReleaseInterfaces.Folder[]>;
|
||||
updateFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
|
||||
updateGates(gateUpdateMetadata: ReleaseInterfaces.GateUpdateMetadata, project: string, gateStepId: number): Promise<ReleaseInterfaces.ReleaseGates>;
|
||||
getReleaseHistory(project: string, releaseId: number): Promise<ReleaseInterfaces.ReleaseRevision[]>;
|
||||
getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise<FormInputInterfaces.InputValuesQuery>;
|
||||
getIssues(project: string, buildId: number, sourceId?: string): Promise<ReleaseInterfaces.AutoTriggerIssue[]>;
|
||||
getGateLog(project: string, releaseId: number, environmentId: number, gateId: number, taskId: number): Promise<NodeJS.ReadableStream>;
|
||||
getLogs(project: string, releaseId: number): Promise<NodeJS.ReadableStream>;
|
||||
getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise<NodeJS.ReadableStream>;
|
||||
getTaskLog2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, taskId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
getTaskLog(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number, taskId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
getManualIntervention(project: string, releaseId: number, manualInterventionId: number): Promise<ReleaseInterfaces.ManualIntervention>;
|
||||
getManualInterventions(project: string, releaseId: number): Promise<ReleaseInterfaces.ManualIntervention[]>;
|
||||
updateManualIntervention(manualInterventionUpdateMetadata: ReleaseInterfaces.ManualInterventionUpdateMetadata, project: string, releaseId: number, manualInterventionId: number): Promise<ReleaseInterfaces.ManualIntervention>;
|
||||
getMetrics(project: string, minMetricsTime?: Date): Promise<ReleaseInterfaces.Metric[]>;
|
||||
getReleaseProjects(artifactType: string, artifactSourceId: string): Promise<ReleaseInterfaces.ProjectReference[]>;
|
||||
getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean, tagFilter?: string[], propertyFilters?: string[], releaseIdFilter?: number[]): Promise<ReleaseInterfaces.Release[]>;
|
||||
createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise<ReleaseInterfaces.Release>;
|
||||
deleteRelease(project: string, releaseId: number, comment?: string): Promise<void>;
|
||||
getRelease(project: string, releaseId: number, approvalFilters?: ReleaseInterfaces.ApprovalFilters, propertyFilters?: string[], expand?: ReleaseInterfaces.SingleReleaseExpands, topGateRecords?: number): Promise<ReleaseInterfaces.Release>;
|
||||
getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean, definitionEnvironmentIdsFilter?: number[]): Promise<ReleaseInterfaces.ReleaseDefinitionSummary>;
|
||||
getReleaseRevision(project: string, releaseId: number, definitionSnapshotRevision: number): Promise<NodeJS.ReadableStream>;
|
||||
undeleteRelease(project: string, releaseId: number, comment: string): Promise<void>;
|
||||
updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise<ReleaseInterfaces.Release>;
|
||||
updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise<ReleaseInterfaces.Release>;
|
||||
getReleaseSettings(project: string): Promise<ReleaseInterfaces.ReleaseSettings>;
|
||||
updateReleaseSettings(releaseSettings: ReleaseInterfaces.ReleaseSettings, project: string): Promise<ReleaseInterfaces.ReleaseSettings>;
|
||||
getDefinitionRevision(project: string, definitionId: number, revision: number): Promise<NodeJS.ReadableStream>;
|
||||
getReleaseDefinitionHistory(project: string, definitionId: number): Promise<ReleaseInterfaces.ReleaseDefinitionRevision[]>;
|
||||
getSummaryMailSections(project: string, releaseId: number): Promise<ReleaseInterfaces.SummaryMailSection[]>;
|
||||
sendSummaryMail(mailMessage: ReleaseInterfaces.MailMessage, project: string, releaseId: number): Promise<void>;
|
||||
getSourceBranches(project: string, definitionId: number): Promise<string[]>;
|
||||
addDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise<string[]>;
|
||||
addDefinitionTags(tags: string[], project: string, releaseDefinitionId: number): Promise<string[]>;
|
||||
deleteDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise<string[]>;
|
||||
getDefinitionTags(project: string, releaseDefinitionId: number): Promise<string[]>;
|
||||
addReleaseTag(project: string, releaseId: number, tag: string): Promise<string[]>;
|
||||
addReleaseTags(tags: string[], project: string, releaseId: number): Promise<string[]>;
|
||||
deleteReleaseTag(project: string, releaseId: number, tag: string): Promise<string[]>;
|
||||
getReleaseTags(project: string, releaseId: number): Promise<string[]>;
|
||||
getTags(project: string): Promise<string[]>;
|
||||
getTasksForTaskGroup(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number): Promise<ReleaseInterfaces.ReleaseTask[]>;
|
||||
getTasks2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string): Promise<ReleaseInterfaces.ReleaseTask[]>;
|
||||
getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise<ReleaseInterfaces.ReleaseTask[]>;
|
||||
getArtifactTypeDefinitions(project: string): Promise<ReleaseInterfaces.ArtifactTypeDefinition[]>;
|
||||
getArtifactVersions(project: string, releaseDefinitionId: number): Promise<ReleaseInterfaces.ArtifactVersionQueryResult>;
|
||||
getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise<ReleaseInterfaces.ArtifactVersionQueryResult>;
|
||||
getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise<ReleaseInterfaces.ReleaseWorkItemRef[]>;
|
||||
}
|
||||
export declare class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Returns the artifact details that automation agent requires
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
*/
|
||||
getAgentArtifactDefinitions(project: string, releaseId: number): Promise<ReleaseInterfaces.AgentArtifactDefinition[]>;
|
||||
/**
|
||||
* Get a list of approvals
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} assignedToFilter - Approvals assigned to this user.
|
||||
* @param {ReleaseInterfaces.ApprovalStatus} statusFilter - Approvals with this status. Default is 'pending'.
|
||||
* @param {number[]} releaseIdsFilter - Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4.
|
||||
* @param {ReleaseInterfaces.ApprovalType} typeFilter - Approval with this type.
|
||||
* @param {number} top - Number of approvals to get. Default is 50.
|
||||
* @param {number} continuationToken - Gets the approvals after the continuation token provided.
|
||||
* @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created approvals. Default is 'descending'.
|
||||
* @param {boolean} includeMyGroupApprovals - 'true' to include my group approvals. Default is 'false'.
|
||||
*/
|
||||
getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[], typeFilter?: ReleaseInterfaces.ApprovalType, top?: number, continuationToken?: number, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, includeMyGroupApprovals?: boolean): Promise<ReleaseInterfaces.ReleaseApproval[]>;
|
||||
/**
|
||||
* Get approval history.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} approvalStepId - Id of the approval.
|
||||
*/
|
||||
getApprovalHistory(project: string, approvalStepId: number): Promise<ReleaseInterfaces.ReleaseApproval>;
|
||||
/**
|
||||
* Get an approval.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} approvalId - Id of the approval.
|
||||
* @param {boolean} includeHistory - 'true' to include history of the approval. Default is 'false'.
|
||||
*/
|
||||
getApproval(project: string, approvalId: number, includeHistory?: boolean): Promise<ReleaseInterfaces.ReleaseApproval>;
|
||||
/**
|
||||
* Update status of an approval
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseApproval} approval - ReleaseApproval object having status, approver and comments.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} approvalId - Id of the approval.
|
||||
*/
|
||||
updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise<ReleaseInterfaces.ReleaseApproval>;
|
||||
/**
|
||||
* @param {ReleaseInterfaces.ReleaseApproval[]} approvals
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateReleaseApprovals(approvals: ReleaseInterfaces.ReleaseApproval[], project: string): Promise<ReleaseInterfaces.ReleaseApproval[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
* @param {number} attemptId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
getTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
* @param {number} attemptId
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
getReleaseTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
* @param {number} attemptId
|
||||
* @param {string} timelineId
|
||||
* @param {string} type
|
||||
*/
|
||||
getTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, type: string): Promise<ReleaseInterfaces.ReleaseTaskAttachment[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
* @param {number} attemptId
|
||||
* @param {string} planId
|
||||
* @param {string} type
|
||||
*/
|
||||
getReleaseTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, type: string): Promise<ReleaseInterfaces.ReleaseTaskAttachment[]>;
|
||||
/**
|
||||
* @param {string} artifactType
|
||||
* @param {string} sourceId
|
||||
* @param {string} artifactVersionId
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getAutoTriggerIssues(artifactType: string, sourceId: string, artifactVersionId: string, project?: string): Promise<ReleaseInterfaces.AutoTriggerIssue[]>;
|
||||
/**
|
||||
* Gets a badge that indicates the status of the most recent deployment for an environment.
|
||||
*
|
||||
* @param {string} projectId - The ID of the Project.
|
||||
* @param {number} releaseDefinitionId - The ID of the Release Definition.
|
||||
* @param {number} environmentId - The ID of the Environment.
|
||||
* @param {string} branchName - The name of the branch.
|
||||
*/
|
||||
getDeploymentBadge(projectId: string, releaseDefinitionId: number, environmentId: number, branchName?: string): Promise<string>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} baseReleaseId
|
||||
* @param {number} top
|
||||
* @param {string} artifactAlias
|
||||
*/
|
||||
getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise<ReleaseInterfaces.Change[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} taskGroupId
|
||||
* @param {string[]} propertyFilters
|
||||
*/
|
||||
getDefinitionEnvironments(project: string, taskGroupId?: string, propertyFilters?: string[]): Promise<ReleaseInterfaces.DefinitionEnvironmentReference[]>;
|
||||
/**
|
||||
* Create a release definition
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - release definition object to create.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
/**
|
||||
* Delete a release definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Id of the release definition.
|
||||
* @param {string} comment - Comment for deleting a release definition.
|
||||
* @param {boolean} forceDelete - 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'.
|
||||
*/
|
||||
deleteReleaseDefinition(project: string, definitionId: number, comment?: string, forceDelete?: boolean): Promise<void>;
|
||||
/**
|
||||
* Get a release definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Id of the release definition.
|
||||
* @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included.
|
||||
*/
|
||||
getReleaseDefinition(project: string, definitionId: number, propertyFilters?: string[]): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
/**
|
||||
* Get release definition of a given revision.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Id of the release definition.
|
||||
* @param {number} revision - Revision number of the release definition.
|
||||
*/
|
||||
getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get a list of release definitions.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} searchText - Get release definitions with names containing searchText.
|
||||
* @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - The properties that should be expanded in the list of Release definitions.
|
||||
* @param {string} artifactType - Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
|
||||
* @param {string} artifactSourceId - Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
|
||||
* @param {number} top - Number of release definitions to get.
|
||||
* @param {string} continuationToken - Gets the release definitions after the continuation token provided.
|
||||
* @param {ReleaseInterfaces.ReleaseDefinitionQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdAscending'.
|
||||
* @param {string} path - Gets the release definitions under the specified path.
|
||||
* @param {boolean} isExactNameMatch - 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'.
|
||||
* @param {string[]} tagFilter - A comma-delimited list of tags. Only release definitions with these tags will be returned.
|
||||
* @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not.
|
||||
* @param {string[]} definitionIdFilter - A comma-delimited list of release definitions to retrieve.
|
||||
* @param {boolean} isDeleted - 'true' to get release definitions that has been deleted. Default is 'false'
|
||||
*/
|
||||
getReleaseDefinitions(project: string, searchText?: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands, artifactType?: string, artifactSourceId?: string, top?: number, continuationToken?: string, queryOrder?: ReleaseInterfaces.ReleaseDefinitionQueryOrder, path?: string, isExactNameMatch?: boolean, tagFilter?: string[], propertyFilters?: string[], definitionIdFilter?: string[], isDeleted?: boolean): Promise<ReleaseInterfaces.ReleaseDefinition[]>;
|
||||
/**
|
||||
* Undelete a release definition.
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseDefinitionUndeleteParameter} releaseDefinitionUndeleteParameter - Object for undelete release definition.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Id of the release definition to be undeleted
|
||||
*/
|
||||
undeleteReleaseDefinition(releaseDefinitionUndeleteParameter: ReleaseInterfaces.ReleaseDefinitionUndeleteParameter, project: string, definitionId: number): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
/**
|
||||
* Update a release definition.
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - Release definition object to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise<ReleaseInterfaces.ReleaseDefinition>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId
|
||||
* @param {number} definitionEnvironmentId
|
||||
* @param {string} createdBy
|
||||
* @param {Date} minModifiedTime
|
||||
* @param {Date} maxModifiedTime
|
||||
* @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus
|
||||
* @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus
|
||||
* @param {boolean} latestAttemptsOnly
|
||||
* @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder
|
||||
* @param {number} top
|
||||
* @param {number} continuationToken
|
||||
* @param {string} createdFor
|
||||
* @param {Date} minStartedTime
|
||||
* @param {Date} maxStartedTime
|
||||
* @param {string} sourceBranch
|
||||
*/
|
||||
getDeployments(project: string, definitionId?: number, definitionEnvironmentId?: number, createdBy?: string, minModifiedTime?: Date, maxModifiedTime?: Date, deploymentStatus?: ReleaseInterfaces.DeploymentStatus, operationStatus?: ReleaseInterfaces.DeploymentOperationStatus, latestAttemptsOnly?: boolean, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, createdFor?: string, minStartedTime?: Date, maxStartedTime?: Date, sourceBranch?: string): Promise<ReleaseInterfaces.Deployment[]>;
|
||||
/**
|
||||
* @param {ReleaseInterfaces.DeploymentQueryParameters} queryParameters
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getDeploymentsForMultipleEnvironments(queryParameters: ReleaseInterfaces.DeploymentQueryParameters, project: string): Promise<ReleaseInterfaces.Deployment[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
*/
|
||||
getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise<ReleaseInterfaces.ReleaseEnvironment>;
|
||||
/**
|
||||
* Update the status of a release environment
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata} environmentUpdateData - Environment update meta data.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} environmentId - Id of release environment.
|
||||
*/
|
||||
updateReleaseEnvironment(environmentUpdateData: ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata, project: string, releaseId: number, environmentId: number): Promise<ReleaseInterfaces.ReleaseEnvironment>;
|
||||
/**
|
||||
* Creates a definition environment template
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - Definition environment template to create
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate>;
|
||||
/**
|
||||
* Delete a definition environment template
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} templateId - Id of the definition environment template
|
||||
*/
|
||||
deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<void>;
|
||||
/**
|
||||
* Gets a definition environment template
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} templateId - Id of the definition environment template
|
||||
*/
|
||||
getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate>;
|
||||
/**
|
||||
* Gets a list of definition environment templates
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} isDeleted - 'true' to get definition environment templates that have been deleted. Default is 'false'
|
||||
*/
|
||||
listDefinitionEnvironmentTemplates(project: string, isDeleted?: boolean): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]>;
|
||||
/**
|
||||
* Undelete a release definition environment template.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} templateId - Id of the definition environment template to be undeleted
|
||||
*/
|
||||
undeleteReleaseDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate>;
|
||||
/**
|
||||
* @param {ReleaseInterfaces.FavoriteItem[]} favoriteItems
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scope
|
||||
* @param {string} identityId
|
||||
*/
|
||||
createFavorites(favoriteItems: ReleaseInterfaces.FavoriteItem[], project: string, scope: string, identityId?: string): Promise<ReleaseInterfaces.FavoriteItem[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scope
|
||||
* @param {string} identityId
|
||||
* @param {string} favoriteItemIds
|
||||
*/
|
||||
deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scope
|
||||
* @param {string} identityId
|
||||
*/
|
||||
getFavorites(project: string, scope: string, identityId?: string): Promise<ReleaseInterfaces.FavoriteItem[]>;
|
||||
/**
|
||||
* @param {string} flightName
|
||||
*/
|
||||
getFlightAssignments(flightName?: string): Promise<string[]>;
|
||||
/**
|
||||
* Creates a new folder
|
||||
*
|
||||
* @param {ReleaseInterfaces.Folder} folder
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
*/
|
||||
createFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
|
||||
/**
|
||||
* Deletes a definition folder for given folder name and path and all it's existing definitions
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
*/
|
||||
deleteFolder(project: string, path: string): Promise<void>;
|
||||
/**
|
||||
* Gets folders
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
* @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder
|
||||
*/
|
||||
getFolders(project: string, path?: string, queryOrder?: ReleaseInterfaces.FolderPathQueryOrder): Promise<ReleaseInterfaces.Folder[]>;
|
||||
/**
|
||||
* Updates an existing folder at given existing path
|
||||
*
|
||||
* @param {ReleaseInterfaces.Folder} folder
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} path
|
||||
*/
|
||||
updateFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
|
||||
/**
|
||||
* Updates the gate for a deployment.
|
||||
*
|
||||
* @param {ReleaseInterfaces.GateUpdateMetadata} gateUpdateMetadata - Metadata to patch the Release Gates.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} gateStepId - Gate step Id.
|
||||
*/
|
||||
updateGates(gateUpdateMetadata: ReleaseInterfaces.GateUpdateMetadata, project: string, gateStepId: number): Promise<ReleaseInterfaces.ReleaseGates>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
*/
|
||||
getReleaseHistory(project: string, releaseId: number): Promise<ReleaseInterfaces.ReleaseRevision[]>;
|
||||
/**
|
||||
* @param {FormInputInterfaces.InputValuesQuery} query
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise<FormInputInterfaces.InputValuesQuery>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
* @param {string} sourceId
|
||||
*/
|
||||
getIssues(project: string, buildId: number, sourceId?: string): Promise<ReleaseInterfaces.AutoTriggerIssue[]>;
|
||||
/**
|
||||
* Gets gate logs
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} environmentId - Id of release environment.
|
||||
* @param {number} gateId - Id of the gate.
|
||||
* @param {number} taskId - ReleaseTask Id for the log.
|
||||
*/
|
||||
getGateLog(project: string, releaseId: number, environmentId: number, gateId: number, taskId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get logs for a release Id.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
*/
|
||||
getLogs(project: string, releaseId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets logs
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} environmentId - Id of release environment.
|
||||
* @param {number} taskId - ReleaseTask Id for the log.
|
||||
* @param {number} attemptId - Id of the attempt.
|
||||
*/
|
||||
getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets the task log of a release as a plain text file.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} environmentId - Id of release environment.
|
||||
* @param {number} attemptId
|
||||
* @param {string} timelineId
|
||||
* @param {number} taskId - ReleaseTask Id for the log.
|
||||
* @param {number} startLine - Starting line number for logs
|
||||
* @param {number} endLine - Ending line number for logs
|
||||
*/
|
||||
getTaskLog2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, taskId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets the task log of a release as a plain text file.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} environmentId - Id of release environment.
|
||||
* @param {number} releaseDeployPhaseId - Release deploy phase Id.
|
||||
* @param {number} taskId - ReleaseTask Id for the log.
|
||||
* @param {number} startLine - Starting line number for logs
|
||||
* @param {number} endLine - Ending line number for logs
|
||||
*/
|
||||
getTaskLog(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number, taskId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get manual intervention for a given release and manual intervention id.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} manualInterventionId - Id of the manual intervention.
|
||||
*/
|
||||
getManualIntervention(project: string, releaseId: number, manualInterventionId: number): Promise<ReleaseInterfaces.ManualIntervention>;
|
||||
/**
|
||||
* List all manual interventions for a given release.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
*/
|
||||
getManualInterventions(project: string, releaseId: number): Promise<ReleaseInterfaces.ManualIntervention[]>;
|
||||
/**
|
||||
* Update manual intervention.
|
||||
*
|
||||
* @param {ReleaseInterfaces.ManualInterventionUpdateMetadata} manualInterventionUpdateMetadata - Meta data to update manual intervention.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} manualInterventionId - Id of the manual intervention.
|
||||
*/
|
||||
updateManualIntervention(manualInterventionUpdateMetadata: ReleaseInterfaces.ManualInterventionUpdateMetadata, project: string, releaseId: number, manualInterventionId: number): Promise<ReleaseInterfaces.ManualIntervention>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {Date} minMetricsTime
|
||||
*/
|
||||
getMetrics(project: string, minMetricsTime?: Date): Promise<ReleaseInterfaces.Metric[]>;
|
||||
/**
|
||||
* @param {string} artifactType
|
||||
* @param {string} artifactSourceId
|
||||
*/
|
||||
getReleaseProjects(artifactType: string, artifactSourceId: string): Promise<ReleaseInterfaces.ProjectReference[]>;
|
||||
/**
|
||||
* Get a list of releases
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Releases from this release definition Id.
|
||||
* @param {number} definitionEnvironmentId
|
||||
* @param {string} searchText - Releases with names containing searchText.
|
||||
* @param {string} createdBy - Releases created by this user.
|
||||
* @param {ReleaseInterfaces.ReleaseStatus} statusFilter - Releases that have this status.
|
||||
* @param {number} environmentStatusFilter
|
||||
* @param {Date} minCreatedTime - Releases that were created after this time.
|
||||
* @param {Date} maxCreatedTime - Releases that were created before this time.
|
||||
* @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created date for releases. Default is descending.
|
||||
* @param {number} top - Number of releases to get. Default is 50.
|
||||
* @param {number} continuationToken - Gets the releases after the continuation token provided.
|
||||
* @param {ReleaseInterfaces.ReleaseExpands} expand - The property that should be expanded in the list of releases.
|
||||
* @param {string} artifactTypeId - Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
|
||||
* @param {string} sourceId - Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
|
||||
* @param {string} artifactVersionId - Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId.
|
||||
* @param {string} sourceBranchFilter - Releases with given sourceBranchFilter will be returned.
|
||||
* @param {boolean} isDeleted - Gets the soft deleted releases, if true.
|
||||
* @param {string[]} tagFilter - A comma-delimited list of tags. Only releases with these tags will be returned.
|
||||
* @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not.
|
||||
* @param {number[]} releaseIdFilter - A comma-delimited list of releases Ids. Only releases with these Ids will be returned.
|
||||
*/
|
||||
getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean, tagFilter?: string[], propertyFilters?: string[], releaseIdFilter?: number[]): Promise<ReleaseInterfaces.Release[]>;
|
||||
/**
|
||||
* Create a release.
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - Metadata to create a release.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise<ReleaseInterfaces.Release>;
|
||||
/**
|
||||
* Soft delete a release
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {string} comment - Comment for deleting a release.
|
||||
*/
|
||||
deleteRelease(project: string, releaseId: number, comment?: string): Promise<void>;
|
||||
/**
|
||||
* Get a Release
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {ReleaseInterfaces.ApprovalFilters} approvalFilters - A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default
|
||||
* @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included.
|
||||
* @param {ReleaseInterfaces.SingleReleaseExpands} expand - A property that should be expanded in the release.
|
||||
* @param {number} topGateRecords - Number of release gate records to get. Default is 5.
|
||||
*/
|
||||
getRelease(project: string, releaseId: number, approvalFilters?: ReleaseInterfaces.ApprovalFilters, propertyFilters?: string[], expand?: ReleaseInterfaces.SingleReleaseExpands, topGateRecords?: number): Promise<ReleaseInterfaces.Release>;
|
||||
/**
|
||||
* Get release summary of a given definition Id.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Id of the definition to get release summary.
|
||||
* @param {number} releaseCount - Count of releases to be included in summary.
|
||||
* @param {boolean} includeArtifact - Include artifact details.Default is 'false'.
|
||||
* @param {number[]} definitionEnvironmentIdsFilter
|
||||
*/
|
||||
getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean, definitionEnvironmentIdsFilter?: number[]): Promise<ReleaseInterfaces.ReleaseDefinitionSummary>;
|
||||
/**
|
||||
* Get release for a given revision number.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release.
|
||||
* @param {number} definitionSnapshotRevision - Definition snapshot revision number.
|
||||
*/
|
||||
getReleaseRevision(project: string, releaseId: number, definitionSnapshotRevision: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Undelete a soft deleted release.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of release to be undeleted.
|
||||
* @param {string} comment - Any comment for undeleting.
|
||||
*/
|
||||
undeleteRelease(project: string, releaseId: number, comment: string): Promise<void>;
|
||||
/**
|
||||
* Update a complete release object.
|
||||
*
|
||||
* @param {ReleaseInterfaces.Release} release - Release object for update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release to update.
|
||||
*/
|
||||
updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise<ReleaseInterfaces.Release>;
|
||||
/**
|
||||
* Update few properties of a release.
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - Properties of release to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId - Id of the release to update.
|
||||
*/
|
||||
updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise<ReleaseInterfaces.Release>;
|
||||
/**
|
||||
* Gets the release settings
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getReleaseSettings(project: string): Promise<ReleaseInterfaces.ReleaseSettings>;
|
||||
/**
|
||||
* Updates the release settings
|
||||
*
|
||||
* @param {ReleaseInterfaces.ReleaseSettings} releaseSettings
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateReleaseSettings(releaseSettings: ReleaseInterfaces.ReleaseSettings, project: string): Promise<ReleaseInterfaces.ReleaseSettings>;
|
||||
/**
|
||||
* Get release definition for a given definitionId and revision
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Id of the definition.
|
||||
* @param {number} revision - Id of the revision.
|
||||
*/
|
||||
getDefinitionRevision(project: string, definitionId: number, revision: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get revision history for a release definition
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId - Id of the definition.
|
||||
*/
|
||||
getReleaseDefinitionHistory(project: string, definitionId: number): Promise<ReleaseInterfaces.ReleaseDefinitionRevision[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
*/
|
||||
getSummaryMailSections(project: string, releaseId: number): Promise<ReleaseInterfaces.SummaryMailSection[]>;
|
||||
/**
|
||||
* @param {ReleaseInterfaces.MailMessage} mailMessage
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
*/
|
||||
sendSummaryMail(mailMessage: ReleaseInterfaces.MailMessage, project: string, releaseId: number): Promise<void>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} definitionId
|
||||
*/
|
||||
getSourceBranches(project: string, definitionId: number): Promise<string[]>;
|
||||
/**
|
||||
* Adds a tag to a definition
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseDefinitionId
|
||||
* @param {string} tag
|
||||
*/
|
||||
addDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Adds multiple tags to a definition
|
||||
*
|
||||
* @param {string[]} tags
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseDefinitionId
|
||||
*/
|
||||
addDefinitionTags(tags: string[], project: string, releaseDefinitionId: number): Promise<string[]>;
|
||||
/**
|
||||
* Deletes a tag from a definition
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseDefinitionId
|
||||
* @param {string} tag
|
||||
*/
|
||||
deleteDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Gets the tags for a definition
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseDefinitionId
|
||||
*/
|
||||
getDefinitionTags(project: string, releaseDefinitionId: number): Promise<string[]>;
|
||||
/**
|
||||
* Adds a tag to a releaseId
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {string} tag
|
||||
*/
|
||||
addReleaseTag(project: string, releaseId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Adds tag to a release
|
||||
*
|
||||
* @param {string[]} tags
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
*/
|
||||
addReleaseTags(tags: string[], project: string, releaseId: number): Promise<string[]>;
|
||||
/**
|
||||
* Deletes a tag from a release
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {string} tag
|
||||
*/
|
||||
deleteReleaseTag(project: string, releaseId: number, tag: string): Promise<string[]>;
|
||||
/**
|
||||
* Gets the tags for a release
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
*/
|
||||
getReleaseTags(project: string, releaseId: number): Promise<string[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getTags(project: string): Promise<string[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
* @param {number} releaseDeployPhaseId
|
||||
*/
|
||||
getTasksForTaskGroup(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number): Promise<ReleaseInterfaces.ReleaseTask[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
* @param {number} attemptId
|
||||
* @param {string} timelineId
|
||||
*/
|
||||
getTasks2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string): Promise<ReleaseInterfaces.ReleaseTask[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} environmentId
|
||||
* @param {number} attemptId
|
||||
*/
|
||||
getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise<ReleaseInterfaces.ReleaseTask[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getArtifactTypeDefinitions(project: string): Promise<ReleaseInterfaces.ArtifactTypeDefinition[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseDefinitionId
|
||||
*/
|
||||
getArtifactVersions(project: string, releaseDefinitionId: number): Promise<ReleaseInterfaces.ArtifactVersionQueryResult>;
|
||||
/**
|
||||
* @param {ReleaseInterfaces.Artifact[]} artifacts
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise<ReleaseInterfaces.ArtifactVersionQueryResult>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} baseReleaseId
|
||||
* @param {number} top
|
||||
* @param {string} artifactAlias
|
||||
*/
|
||||
getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise<ReleaseInterfaces.ReleaseWorkItemRef[]>;
|
||||
}
|
||||
+2678
File diff suppressed because it is too large
Load Diff
+48
@@ -0,0 +1,48 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import SecurityRolesInterfaces = require("./interfaces/SecurityRolesInterfaces");
|
||||
export interface ISecurityRolesApi extends basem.ClientApiBase {
|
||||
getRoleAssignments(scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
|
||||
removeRoleAssignment(scopeId: string, resourceId: string, identityId: string): Promise<void>;
|
||||
removeRoleAssignments(identityIds: string[], scopeId: string, resourceId: string): Promise<void>;
|
||||
setRoleAssignment(roleAssignment: SecurityRolesInterfaces.UserRoleAssignmentRef, scopeId: string, resourceId: string, identityId: string): Promise<SecurityRolesInterfaces.RoleAssignment>;
|
||||
setRoleAssignments(roleAssignments: SecurityRolesInterfaces.UserRoleAssignmentRef[], scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
|
||||
getRoleDefinitions(scopeId: string): Promise<SecurityRolesInterfaces.SecurityRole[]>;
|
||||
}
|
||||
export declare class SecurityRolesApi extends basem.ClientApiBase implements ISecurityRolesApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
*/
|
||||
getRoleAssignments(scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
|
||||
/**
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
* @param {string} identityId
|
||||
*/
|
||||
removeRoleAssignment(scopeId: string, resourceId: string, identityId: string): Promise<void>;
|
||||
/**
|
||||
* @param {string[]} identityIds
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
*/
|
||||
removeRoleAssignments(identityIds: string[], scopeId: string, resourceId: string): Promise<void>;
|
||||
/**
|
||||
* @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
* @param {string} identityId
|
||||
*/
|
||||
setRoleAssignment(roleAssignment: SecurityRolesInterfaces.UserRoleAssignmentRef, scopeId: string, resourceId: string, identityId: string): Promise<SecurityRolesInterfaces.RoleAssignment>;
|
||||
/**
|
||||
* @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
*/
|
||||
setRoleAssignments(roleAssignments: SecurityRolesInterfaces.UserRoleAssignmentRef[], scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
|
||||
/**
|
||||
* @param {string} scopeId
|
||||
*/
|
||||
getRoleDefinitions(scopeId: string): Promise<SecurityRolesInterfaces.SecurityRole[]>;
|
||||
}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const SecurityRolesInterfaces = require("./interfaces/SecurityRolesInterfaces");
|
||||
class SecurityRolesApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-SecurityRoles-api', options);
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
*/
|
||||
getRoleAssignments(scopeId, resourceId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeId: scopeId,
|
||||
resourceId: resourceId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
* @param {string} identityId
|
||||
*/
|
||||
removeRoleAssignment(scopeId, resourceId, identityId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeId: scopeId,
|
||||
resourceId: resourceId,
|
||||
identityId: identityId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string[]} identityIds
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
*/
|
||||
removeRoleAssignments(identityIds, scopeId, resourceId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeId: scopeId,
|
||||
resourceId: resourceId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, identityIds, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
* @param {string} identityId
|
||||
*/
|
||||
setRoleAssignment(roleAssignment, scopeId, resourceId, identityId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeId: scopeId,
|
||||
resourceId: resourceId,
|
||||
identityId: identityId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, roleAssignment, options);
|
||||
let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments
|
||||
* @param {string} scopeId
|
||||
* @param {string} resourceId
|
||||
*/
|
||||
setRoleAssignments(roleAssignments, scopeId, resourceId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeId: scopeId,
|
||||
resourceId: resourceId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.replace(url, roleAssignments, options);
|
||||
let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeId
|
||||
*/
|
||||
getRoleDefinitions(scopeId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeId: scopeId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "f4cc9a86-453c-48d2-b44d-d3bd5c105f4f", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.SecurityRolesApi = SecurityRolesApi;
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Metadata for deserializing an enum field on a contract/type
|
||||
*/
|
||||
export interface ContractEnumMetadata {
|
||||
enumValues?: {
|
||||
[name: string]: number;
|
||||
};
|
||||
}
|
||||
export interface SerializationData {
|
||||
requestTypeMetadata?: ContractMetadata;
|
||||
responseTypeMetadata?: ContractMetadata;
|
||||
responseIsCollection: boolean;
|
||||
}
|
||||
/**
|
||||
* Metadata for deserializing a particular field on a contract/type
|
||||
*/
|
||||
export interface ContractFieldMetadata {
|
||||
isArray?: boolean;
|
||||
isDate?: boolean;
|
||||
enumType?: ContractEnumMetadata;
|
||||
typeInfo?: ContractMetadata;
|
||||
isDictionary?: boolean;
|
||||
dictionaryKeyIsDate?: boolean;
|
||||
dictionaryValueIsDate?: boolean;
|
||||
dictionaryKeyEnumType?: ContractEnumMetadata;
|
||||
dictionaryValueEnumType?: ContractEnumMetadata;
|
||||
dictionaryValueTypeInfo?: ContractMetadata;
|
||||
dictionaryValueFieldInfo?: ContractFieldMetadata;
|
||||
}
|
||||
/**
|
||||
* Metadata required for deserializing a given type
|
||||
*/
|
||||
export interface ContractMetadata {
|
||||
fields?: {
|
||||
[fieldName: string]: ContractFieldMetadata;
|
||||
};
|
||||
}
|
||||
export interface IWebApiArrayResult {
|
||||
count: number;
|
||||
value: any[];
|
||||
}
|
||||
/**
|
||||
* Module for handling serialization and deserialization of data contracts
|
||||
* (contracts sent from the server using the VSO default REST api serialization settings)
|
||||
*/
|
||||
export declare module ContractSerializer {
|
||||
/**
|
||||
* Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and
|
||||
* return a pure JSON object that can be posted to REST endpoint.
|
||||
*
|
||||
* @param data The object to serialize
|
||||
* @param contractMetadata The type info/metadata for the contract type being serialized
|
||||
* @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument).
|
||||
*/
|
||||
function serialize(data: any, contractMetadata: ContractMetadata, preserveOriginal: boolean): any;
|
||||
/**
|
||||
* Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object
|
||||
* where date strings are converted to Date objects and enum values are converted from strings into
|
||||
* their numerical value.
|
||||
*
|
||||
* @param data The object to deserialize
|
||||
* @param contractMetadata The type info/metadata for the contract type being deserialize
|
||||
* @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument).
|
||||
* @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object.
|
||||
*/
|
||||
function deserialize(data: any, contractMetadata: ContractMetadata, preserveOriginal: boolean, unwrapWrappedCollections: boolean): any;
|
||||
}
|
||||
+271
@@ -0,0 +1,271 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Module for handling serialization and deserialization of data contracts
|
||||
* (contracts sent from the server using the VSO default REST api serialization settings)
|
||||
*/
|
||||
var ContractSerializer;
|
||||
(function (ContractSerializer) {
|
||||
var _legacyDateRegExp;
|
||||
/**
|
||||
* Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and
|
||||
* return a pure JSON object that can be posted to REST endpoint.
|
||||
*
|
||||
* @param data The object to serialize
|
||||
* @param contractMetadata The type info/metadata for the contract type being serialized
|
||||
* @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument).
|
||||
*/
|
||||
function serialize(data, contractMetadata, preserveOriginal) {
|
||||
if (data && contractMetadata) {
|
||||
if (Array.isArray(data)) {
|
||||
return _getTranslatedArray(data, contractMetadata, true, preserveOriginal);
|
||||
}
|
||||
else {
|
||||
return _getTranslatedObject(data, contractMetadata, true, preserveOriginal);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
ContractSerializer.serialize = serialize;
|
||||
/**
|
||||
* Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object
|
||||
* where date strings are converted to Date objects and enum values are converted from strings into
|
||||
* their numerical value.
|
||||
*
|
||||
* @param data The object to deserialize
|
||||
* @param contractMetadata The type info/metadata for the contract type being deserialize
|
||||
* @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument).
|
||||
* @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object.
|
||||
*/
|
||||
function deserialize(data, contractMetadata, preserveOriginal, unwrapWrappedCollections) {
|
||||
if (data) {
|
||||
if (unwrapWrappedCollections && Array.isArray(data.value)) {
|
||||
// Wrapped json array - unwrap it and send the array as the result
|
||||
data = data.value;
|
||||
}
|
||||
if (contractMetadata) {
|
||||
if (Array.isArray(data)) {
|
||||
data = _getTranslatedArray(data, contractMetadata, false, preserveOriginal);
|
||||
}
|
||||
else {
|
||||
data = _getTranslatedObject(data, contractMetadata, false, preserveOriginal);
|
||||
}
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
ContractSerializer.deserialize = deserialize;
|
||||
function _getTranslatedArray(array, typeMetadata, serialize, preserveOriginal) {
|
||||
var resultArray = array;
|
||||
var arrayCopy = [];
|
||||
var i;
|
||||
for (i = 0; i < array.length; i++) {
|
||||
var item = array[i];
|
||||
var processedItem;
|
||||
// handle arrays of arrays
|
||||
if (Array.isArray(item)) {
|
||||
processedItem = _getTranslatedArray(item, typeMetadata, serialize, preserveOriginal);
|
||||
}
|
||||
else {
|
||||
processedItem = _getTranslatedObject(item, typeMetadata, serialize, preserveOriginal);
|
||||
}
|
||||
if (preserveOriginal) {
|
||||
arrayCopy.push(processedItem);
|
||||
if (processedItem !== item) {
|
||||
resultArray = arrayCopy;
|
||||
}
|
||||
}
|
||||
else {
|
||||
array[i] = processedItem;
|
||||
}
|
||||
}
|
||||
return resultArray;
|
||||
}
|
||||
function _getTranslatedObject(typeObject, typeMetadata, serialize, preserveOriginal) {
|
||||
var processedItem = typeObject, copiedItem = false;
|
||||
if (typeObject && typeMetadata.fields) {
|
||||
for (var fieldName in typeMetadata.fields) {
|
||||
var fieldMetadata = typeMetadata.fields[fieldName];
|
||||
var fieldValue = typeObject[fieldName];
|
||||
var translatedValue = _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal);
|
||||
if (fieldValue !== translatedValue) {
|
||||
if (preserveOriginal && !copiedItem) {
|
||||
processedItem = this._extend({}, typeObject);
|
||||
copiedItem = true;
|
||||
}
|
||||
processedItem[fieldName] = translatedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return processedItem;
|
||||
}
|
||||
function _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal) {
|
||||
if (!fieldValue) {
|
||||
return fieldValue;
|
||||
}
|
||||
if (fieldMetadata.isArray) {
|
||||
if (Array.isArray(fieldValue)) {
|
||||
var newArray = [], processedArray = fieldValue;
|
||||
for (var index = 0; index < fieldValue.length; index++) {
|
||||
var arrayValue = fieldValue[index];
|
||||
var processedValue = arrayValue;
|
||||
if (fieldMetadata.isDate) {
|
||||
processedValue = _getTranslatedDateValue(arrayValue, serialize);
|
||||
}
|
||||
else if (fieldMetadata.enumType) {
|
||||
processedValue = _getTranslatedEnumValue(fieldMetadata.enumType, arrayValue, serialize);
|
||||
}
|
||||
else if (fieldMetadata.typeInfo) {
|
||||
if (Array.isArray(arrayValue)) {
|
||||
processedValue = _getTranslatedArray(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal);
|
||||
}
|
||||
else {
|
||||
processedValue = _getTranslatedObject(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal);
|
||||
}
|
||||
}
|
||||
if (preserveOriginal) {
|
||||
newArray.push(processedValue);
|
||||
if (processedValue !== arrayValue) {
|
||||
processedArray = newArray;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fieldValue[index] = processedValue;
|
||||
}
|
||||
}
|
||||
return processedArray;
|
||||
}
|
||||
else {
|
||||
return fieldValue;
|
||||
}
|
||||
}
|
||||
else if (fieldMetadata.isDictionary) {
|
||||
var dictionaryModified = false;
|
||||
var newDictionary = {};
|
||||
for (var key in fieldValue) {
|
||||
var dictionaryValue = fieldValue[key];
|
||||
var newKey = key, newValue = dictionaryValue;
|
||||
if (fieldMetadata.dictionaryKeyIsDate) {
|
||||
newKey = _getTranslatedDateValue(key, serialize);
|
||||
}
|
||||
else if (fieldMetadata.dictionaryKeyEnumType) {
|
||||
newKey = _getTranslatedEnumValue(fieldMetadata.dictionaryKeyEnumType, key, serialize);
|
||||
}
|
||||
if (fieldMetadata.dictionaryValueIsDate) {
|
||||
newValue = _getTranslatedDateValue(dictionaryValue, serialize);
|
||||
}
|
||||
else if (fieldMetadata.dictionaryValueEnumType) {
|
||||
newValue = _getTranslatedEnumValue(fieldMetadata.dictionaryValueEnumType, dictionaryValue, serialize);
|
||||
}
|
||||
else if (fieldMetadata.dictionaryValueTypeInfo) {
|
||||
newValue = _getTranslatedObject(newValue, fieldMetadata.dictionaryValueTypeInfo, serialize, preserveOriginal);
|
||||
}
|
||||
else if (fieldMetadata.dictionaryValueFieldInfo) {
|
||||
newValue = _getTranslatedField(dictionaryValue, fieldMetadata.dictionaryValueFieldInfo, serialize, preserveOriginal);
|
||||
}
|
||||
newDictionary[newKey] = newValue;
|
||||
if (key !== newKey || dictionaryValue !== newValue) {
|
||||
dictionaryModified = true;
|
||||
}
|
||||
}
|
||||
return dictionaryModified ? newDictionary : fieldValue;
|
||||
}
|
||||
else {
|
||||
if (fieldMetadata.isDate) {
|
||||
return _getTranslatedDateValue(fieldValue, serialize);
|
||||
}
|
||||
else if (fieldMetadata.enumType) {
|
||||
return _getTranslatedEnumValue(fieldMetadata.enumType, fieldValue, serialize);
|
||||
}
|
||||
else if (fieldMetadata.typeInfo) {
|
||||
return _getTranslatedObject(fieldValue, fieldMetadata.typeInfo, serialize, preserveOriginal);
|
||||
}
|
||||
else {
|
||||
return fieldValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
function _getTranslatedEnumValue(enumType, valueToConvert, serialize) {
|
||||
if (serialize && typeof valueToConvert === "number") {
|
||||
// Serialize: number --> String
|
||||
// Because webapi handles the numerical value for enums, there is no need to convert to string.
|
||||
// Let this fall through to return the numerical value.
|
||||
}
|
||||
else if (!serialize && typeof valueToConvert === "string") {
|
||||
// Deserialize: String --> number
|
||||
var result = 0;
|
||||
if (valueToConvert) {
|
||||
var splitValue = valueToConvert.split(",");
|
||||
for (var i = 0; i < splitValue.length; i++) {
|
||||
var valuePart = splitValue[i];
|
||||
//equivalent to jquery trim
|
||||
//copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/trim/ie8.js
|
||||
var enumName = valuePart.replace(/^\s+|\s+$/g, '') || "";
|
||||
if (enumName) {
|
||||
var resultPart = enumType.enumValues[enumName];
|
||||
if (!resultPart) {
|
||||
// No matching enum value. Try again but case insensitive
|
||||
var lowerCaseEnumName = enumName.toLowerCase();
|
||||
if (lowerCaseEnumName !== enumName) {
|
||||
for (var name in enumType.enumValues) {
|
||||
var value = enumType.enumValues[name];
|
||||
if (name.toLowerCase() === lowerCaseEnumName) {
|
||||
resultPart = value;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (resultPart) {
|
||||
result |= resultPart;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return valueToConvert;
|
||||
}
|
||||
function _getTranslatedDateValue(valueToConvert, serialize) {
|
||||
if (!serialize && typeof valueToConvert === "string") {
|
||||
// Deserialize: String --> Date
|
||||
var dateValue = new Date(valueToConvert);
|
||||
if (isNaN(dateValue) && navigator.userAgent && /msie/i.test(navigator.userAgent)) {
|
||||
dateValue = _convertLegacyIEDate(valueToConvert);
|
||||
}
|
||||
return dateValue;
|
||||
}
|
||||
return valueToConvert;
|
||||
}
|
||||
function _convertLegacyIEDate(dateStringValue) {
|
||||
// IE 8/9 does not handle parsing dates in ISO form like:
|
||||
// 2013-05-13T14:26:54.397Z
|
||||
var match;
|
||||
if (!_legacyDateRegExp) {
|
||||
_legacyDateRegExp = new RegExp("(\\d+)-(\\d+)-(\\d+)T(\\d+):(\\d+):(\\d+).(\\d+)Z");
|
||||
}
|
||||
match = _legacyDateRegExp.exec(dateStringValue);
|
||||
if (match) {
|
||||
return new Date(Date.UTC(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]), parseInt(match[4]), parseInt(match[5]), parseInt(match[6]), parseInt(match[7])));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// jquery extend method in native javascript (used to clone objects)
|
||||
// copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/extend/ie8.js
|
||||
var _extend = function (out) {
|
||||
out = out || {};
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
if (!arguments[i])
|
||||
continue;
|
||||
for (var key in arguments[i]) {
|
||||
if (arguments[i].hasOwnProperty(key))
|
||||
out[key] = arguments[i][key];
|
||||
}
|
||||
}
|
||||
return out;
|
||||
};
|
||||
})(ContractSerializer = exports.ContractSerializer || (exports.ContractSerializer = {}));
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/// <reference types="node" />
|
||||
import taskagentbasem = require('./TaskAgentApiBase');
|
||||
import TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces");
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
export interface ITaskAgentApi extends taskagentbasem.ITaskAgentApiBase {
|
||||
uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise<void>;
|
||||
}
|
||||
export declare class TaskAgentApi extends taskagentbasem.TaskAgentApiBase implements ITaskAgentApi {
|
||||
private _handlers;
|
||||
private _options;
|
||||
private _fallbackClient;
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param onResult callback function
|
||||
*/
|
||||
deleteTaskDefinition(taskId: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param {string} versionString
|
||||
* @param {string[]} visibility
|
||||
* @param {boolean} scopeLocal
|
||||
* @param onResult callback function with the resulting ArrayBuffer
|
||||
*/
|
||||
getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param {string} versionString
|
||||
* @param {string[]} visibility
|
||||
* @param {boolean} scopeLocal
|
||||
* @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition
|
||||
*/
|
||||
getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean): Promise<TaskAgentInterfaces.TaskDefinition>;
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param {string[]} visibility
|
||||
* @param {boolean} scopeLocal
|
||||
* @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[]
|
||||
*/
|
||||
getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean): Promise<TaskAgentInterfaces.TaskDefinition[]>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream
|
||||
* @param {string} taskId
|
||||
* @param {boolean} overwrite
|
||||
* @param onResult callback function
|
||||
*/
|
||||
uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise<void>;
|
||||
private _getFallbackClient(baseUrl);
|
||||
private _getAccountUrl(collectionUrl);
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const taskagentbasem = require("./TaskAgentApiBase");
|
||||
const url = require("url");
|
||||
class TaskAgentApi extends taskagentbasem.TaskAgentApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, options);
|
||||
// hang on to the handlers in case we need to fall back to an account-level client
|
||||
this._handlers = handlers;
|
||||
this._options = options;
|
||||
}
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param onResult callback function
|
||||
*/
|
||||
deleteTaskDefinition(taskId) {
|
||||
let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd")
|
||||
.then((location) => {
|
||||
if (location) {
|
||||
// the resource exists at the url we were given. go!
|
||||
return super.deleteTaskDefinition(taskId);
|
||||
}
|
||||
else {
|
||||
// this is the case when the server doesn't support collection-level task definitions
|
||||
var fallbackClient = this._getFallbackClient(this.baseUrl);
|
||||
if (!fallbackClient) {
|
||||
// couldn't convert
|
||||
throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd");
|
||||
}
|
||||
else {
|
||||
// use the fallback client
|
||||
return fallbackClient.deleteTaskDefinition(taskId);
|
||||
}
|
||||
}
|
||||
});
|
||||
return promise;
|
||||
}
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param {string} versionString
|
||||
* @param {string[]} visibility
|
||||
* @param {boolean} scopeLocal
|
||||
* @param onResult callback function with the resulting ArrayBuffer
|
||||
*/
|
||||
getTaskContentZip(taskId, versionString, visibility, scopeLocal) {
|
||||
let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd")
|
||||
.then((location) => {
|
||||
if (location) {
|
||||
// the resource exists at the url we were given. go!
|
||||
return super.getTaskContentZip(taskId, versionString, visibility, scopeLocal);
|
||||
}
|
||||
else {
|
||||
// this is the case when the server doesn't support collection-level task definitions
|
||||
var fallbackClient = this._getFallbackClient(this.baseUrl);
|
||||
if (!fallbackClient) {
|
||||
// couldn't convert
|
||||
throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd");
|
||||
}
|
||||
else {
|
||||
// use the fallback client
|
||||
return fallbackClient.getTaskContentZip(taskId, versionString, visibility, scopeLocal);
|
||||
}
|
||||
}
|
||||
});
|
||||
return promise;
|
||||
}
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param {string} versionString
|
||||
* @param {string[]} visibility
|
||||
* @param {boolean} scopeLocal
|
||||
* @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition
|
||||
*/
|
||||
getTaskDefinition(taskId, versionString, visibility, scopeLocal) {
|
||||
let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd")
|
||||
.then((location) => {
|
||||
if (location) {
|
||||
// the resource exists at the url we were given. go!
|
||||
return super.getTaskDefinition(taskId, versionString, visibility, scopeLocal);
|
||||
}
|
||||
else {
|
||||
// this is the case when the server doesn't support collection-level task definitions
|
||||
var fallbackClient = this._getFallbackClient(this.baseUrl);
|
||||
if (!fallbackClient) {
|
||||
// couldn't convert
|
||||
throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd");
|
||||
}
|
||||
else {
|
||||
// use the fallback client
|
||||
return fallbackClient.getTaskDefinition(taskId, versionString, visibility, scopeLocal);
|
||||
}
|
||||
}
|
||||
});
|
||||
return promise;
|
||||
}
|
||||
/**
|
||||
* @param {string} taskId
|
||||
* @param {string[]} visibility
|
||||
* @param {boolean} scopeLocal
|
||||
* @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[]
|
||||
*/
|
||||
getTaskDefinitions(taskId, visibility, scopeLocal) {
|
||||
let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd")
|
||||
.then((location) => {
|
||||
if (location) {
|
||||
// the resource exists at the url we were given. go!
|
||||
return super.getTaskDefinitions(taskId, visibility, scopeLocal);
|
||||
}
|
||||
else {
|
||||
// this is the case when the server doesn't support collection-level task definitions
|
||||
var fallbackClient = this._getFallbackClient(this.baseUrl);
|
||||
if (!fallbackClient) {
|
||||
// couldn't convert
|
||||
throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd");
|
||||
}
|
||||
else {
|
||||
// use the fallback client
|
||||
return fallbackClient.getTaskDefinitions(taskId, visibility, scopeLocal);
|
||||
}
|
||||
}
|
||||
});
|
||||
return promise;
|
||||
}
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream
|
||||
* @param {string} taskId
|
||||
* @param {boolean} overwrite
|
||||
* @param onResult callback function
|
||||
*/
|
||||
uploadTaskDefinition(customHeaders, contentStream, taskId, overwrite) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
taskId: taskId
|
||||
};
|
||||
let queryValues = {
|
||||
overwrite: overwrite,
|
||||
};
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
customHeaders = customHeaders || {};
|
||||
customHeaders["Content-Type"] = "application/octet-stream";
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("3.0-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
options.additionalHeaders = customHeaders;
|
||||
let res;
|
||||
res = yield this.rest.uploadStream("POST", url, contentStream, options);
|
||||
resolve(res.result);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
_getFallbackClient(baseUrl) {
|
||||
if (!this._fallbackClient) {
|
||||
var accountUrl = this._getAccountUrl(baseUrl);
|
||||
if (accountUrl) {
|
||||
this._fallbackClient = new TaskAgentApi(accountUrl, this._handlers, this._options);
|
||||
}
|
||||
}
|
||||
return this._fallbackClient;
|
||||
}
|
||||
_getAccountUrl(collectionUrl) {
|
||||
// converts a collection URL to an account URL
|
||||
// returns null if the conversion can't be made
|
||||
var purl = url.parse(collectionUrl);
|
||||
if (!purl.protocol || !purl.host) {
|
||||
return null;
|
||||
}
|
||||
var accountUrl = purl.protocol + '//' + purl.host;
|
||||
// purl.path is something like /DefaultCollection or /tfs/DefaultCollection or /DefaultCollection/
|
||||
var splitPath = purl.path.split('/').slice(1);
|
||||
if (splitPath.length === 0 || (splitPath.length === 1 && splitPath[0] === '')) {
|
||||
return null;
|
||||
}
|
||||
// if the first segment of the path is tfs, the second is the collection. if the url ends in / there will be a third, empty entry
|
||||
if (splitPath[0] === 'tfs' && (splitPath.length === 2 || (splitPath.length === 3 && splitPath[2].length === 0))) {
|
||||
//on prem
|
||||
accountUrl += '/' + 'tfs';
|
||||
}
|
||||
else if (splitPath.length === 2 && splitPath[0] === '') {
|
||||
// /DefaultCollection/
|
||||
return accountUrl;
|
||||
}
|
||||
else if (splitPath.length > 1) {
|
||||
return null;
|
||||
}
|
||||
return accountUrl;
|
||||
}
|
||||
}
|
||||
exports.TaskAgentApi = TaskAgentApi;
|
||||
+1086
File diff suppressed because it is too large
Load Diff
+4237
File diff suppressed because it is too large
Load Diff
+185
@@ -0,0 +1,185 @@
|
||||
/// <reference types="node" />
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
export interface ITaskApi extends basem.ClientApiBase {
|
||||
getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise<TaskAgentInterfaces.TaskAttachment[]>;
|
||||
createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<TaskAgentInterfaces.TaskAttachment>;
|
||||
getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<TaskAgentInterfaces.TaskAttachment>;
|
||||
getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise<TaskAgentInterfaces.TaskAttachment[]>;
|
||||
appendTimelineRecordFeed(lines: TaskAgentInterfaces.TimelineRecordFeedLinesWrapper, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise<void>;
|
||||
appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise<TaskAgentInterfaces.TaskLog>;
|
||||
createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.TaskLog>;
|
||||
getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise<string[]>;
|
||||
getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.TaskLog[]>;
|
||||
getPlanGroupsQueueMetrics(scopeIdentifier: string, hubName: string): Promise<TaskAgentInterfaces.TaskOrchestrationPlanGroupsQueueMetrics[]>;
|
||||
getQueuedPlanGroups(scopeIdentifier: string, hubName: string, statusFilter?: TaskAgentInterfaces.PlanGroupStatus, count?: number): Promise<TaskAgentInterfaces.TaskOrchestrationQueuedPlanGroup[]>;
|
||||
getQueuedPlanGroup(scopeIdentifier: string, hubName: string, planGroup: string): Promise<TaskAgentInterfaces.TaskOrchestrationQueuedPlanGroup>;
|
||||
getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.TaskOrchestrationPlan>;
|
||||
getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise<TaskAgentInterfaces.TimelineRecord[]>;
|
||||
updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV<TaskAgentInterfaces.TimelineRecord[]>, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise<TaskAgentInterfaces.TimelineRecord[]>;
|
||||
createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.Timeline>;
|
||||
deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise<void>;
|
||||
getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise<TaskAgentInterfaces.Timeline>;
|
||||
getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.Timeline[]>;
|
||||
}
|
||||
export declare class TaskApi extends basem.ClientApiBase implements ITaskApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} type
|
||||
*/
|
||||
getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise<TaskAgentInterfaces.TaskAttachment[]>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<TaskAgentInterfaces.TaskAttachment>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<TaskAgentInterfaces.TaskAttachment>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
*/
|
||||
getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise<TaskAgentInterfaces.TaskAttachment[]>;
|
||||
/**
|
||||
* @param {TaskAgentInterfaces.TimelineRecordFeedLinesWrapper} lines
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
*/
|
||||
appendTimelineRecordFeed(lines: TaskAgentInterfaces.TimelineRecordFeedLinesWrapper, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise<void>;
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {number} logId
|
||||
*/
|
||||
appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise<TaskAgentInterfaces.TaskLog>;
|
||||
/**
|
||||
* @param {TaskAgentInterfaces.TaskLog} log
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.TaskLog>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {number} logId
|
||||
* @param {number} startLine
|
||||
* @param {number} endLine
|
||||
*/
|
||||
getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise<string[]>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.TaskLog[]>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
*/
|
||||
getPlanGroupsQueueMetrics(scopeIdentifier: string, hubName: string): Promise<TaskAgentInterfaces.TaskOrchestrationPlanGroupsQueueMetrics[]>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {TaskAgentInterfaces.PlanGroupStatus} statusFilter
|
||||
* @param {number} count
|
||||
*/
|
||||
getQueuedPlanGroups(scopeIdentifier: string, hubName: string, statusFilter?: TaskAgentInterfaces.PlanGroupStatus, count?: number): Promise<TaskAgentInterfaces.TaskOrchestrationQueuedPlanGroup[]>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planGroup
|
||||
*/
|
||||
getQueuedPlanGroup(scopeIdentifier: string, hubName: string, planGroup: string): Promise<TaskAgentInterfaces.TaskOrchestrationQueuedPlanGroup>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.TaskOrchestrationPlan>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {number} changeId
|
||||
*/
|
||||
getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise<TaskAgentInterfaces.TimelineRecord[]>;
|
||||
/**
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<TaskAgentInterfaces.TimelineRecord[]>} records
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
*/
|
||||
updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV<TaskAgentInterfaces.TimelineRecord[]>, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise<TaskAgentInterfaces.TimelineRecord[]>;
|
||||
/**
|
||||
* @param {TaskAgentInterfaces.Timeline} timeline
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.Timeline>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
*/
|
||||
deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise<void>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {number} changeId
|
||||
* @param {boolean} includeRecords
|
||||
*/
|
||||
getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise<TaskAgentInterfaces.Timeline>;
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise<TaskAgentInterfaces.Timeline[]>;
|
||||
}
|
||||
+663
@@ -0,0 +1,663 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces");
|
||||
class TaskApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Task-api', options);
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} type
|
||||
*/
|
||||
getPlanAttachments(scopeIdentifier, hubName, planId, type) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
type: type
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "eb55e5d6-2f30-4295-b5ed-38da50b1fc52", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
createAttachment(customHeaders, contentStream, scopeIdentifier, hubName, planId, timelineId, recordId, type, name) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId,
|
||||
recordId: recordId,
|
||||
type: type,
|
||||
name: name
|
||||
};
|
||||
customHeaders = customHeaders || {};
|
||||
customHeaders["Content-Type"] = "application/octet-stream";
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
options.additionalHeaders = customHeaders;
|
||||
let res;
|
||||
res = yield this.rest.uploadStream("PUT", url, contentStream, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
getAttachment(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId,
|
||||
recordId: recordId,
|
||||
type: type,
|
||||
name: name
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
* @param {string} name
|
||||
*/
|
||||
getAttachmentContent(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId,
|
||||
recordId: recordId,
|
||||
type: type,
|
||||
name: name
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let apiVersion = verData.apiVersion;
|
||||
let accept = this.createAcceptHeader("application/octet-stream", apiVersion);
|
||||
resolve((yield this.http.get(url, { "Accept": accept })).message);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
* @param {string} type
|
||||
*/
|
||||
getAttachments(scopeIdentifier, hubName, planId, timelineId, recordId, type) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId,
|
||||
recordId: recordId,
|
||||
type: type
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {TaskAgentInterfaces.TimelineRecordFeedLinesWrapper} lines
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {string} recordId
|
||||
*/
|
||||
appendTimelineRecordFeed(lines, scopeIdentifier, hubName, planId, timelineId, recordId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId,
|
||||
recordId: recordId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "858983e4-19bd-4c5e-864c-507b59b58b12", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, lines, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {number} logId
|
||||
*/
|
||||
appendLogContent(customHeaders, contentStream, scopeIdentifier, hubName, planId, logId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
logId: logId
|
||||
};
|
||||
customHeaders = customHeaders || {};
|
||||
customHeaders["Content-Type"] = "application/octet-stream";
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
options.additionalHeaders = customHeaders;
|
||||
let res;
|
||||
res = yield this.rest.uploadStream("POST", url, contentStream, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {TaskAgentInterfaces.TaskLog} log
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
createLog(log, scopeIdentifier, hubName, planId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, log, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {number} logId
|
||||
* @param {number} startLine
|
||||
* @param {number} endLine
|
||||
*/
|
||||
getLog(scopeIdentifier, hubName, planId, logId, startLine, endLine) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
logId: logId
|
||||
};
|
||||
let queryValues = {
|
||||
startLine: startLine,
|
||||
endLine: endLine,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
getLogs(scopeIdentifier, hubName, planId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
*/
|
||||
getPlanGroupsQueueMetrics(scopeIdentifier, hubName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "038fd4d5-cda7-44ca-92c0-935843fee1a7", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {TaskAgentInterfaces.PlanGroupStatus} statusFilter
|
||||
* @param {number} count
|
||||
*/
|
||||
getQueuedPlanGroups(scopeIdentifier, hubName, statusFilter, count) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName
|
||||
};
|
||||
let queryValues = {
|
||||
statusFilter: statusFilter,
|
||||
count: count,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "0dd73091-3e36-4f43-b443-1b76dd426d84", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planGroup
|
||||
*/
|
||||
getQueuedPlanGroup(scopeIdentifier, hubName, planGroup) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planGroup: planGroup
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "65fd0708-bc1e-447b-a731-0587c5464e5b", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
getPlan(scopeIdentifier, hubName, planId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "5cecd946-d704-471e-a45f-3b4064fcfaba", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlan, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {number} changeId
|
||||
*/
|
||||
getRecords(scopeIdentifier, hubName, planId, timelineId, changeId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId
|
||||
};
|
||||
let queryValues = {
|
||||
changeId: changeId,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {VSSInterfaces.VssJsonCollectionWrapperV<TaskAgentInterfaces.TimelineRecord[]>} records
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
*/
|
||||
updateRecords(records, scopeIdentifier, hubName, planId, timelineId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, records, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {TaskAgentInterfaces.Timeline} timeline
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
createTimeline(timeline, scopeIdentifier, hubName, planId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, timeline, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
*/
|
||||
deleteTimeline(scopeIdentifier, hubName, planId, timelineId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
* @param {string} timelineId
|
||||
* @param {number} changeId
|
||||
* @param {boolean} includeRecords
|
||||
*/
|
||||
getTimeline(scopeIdentifier, hubName, planId, timelineId, changeId, includeRecords) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId,
|
||||
timelineId: timelineId
|
||||
};
|
||||
let queryValues = {
|
||||
changeId: changeId,
|
||||
includeRecords: includeRecords,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {string} scopeIdentifier - The project GUID to scope the request
|
||||
* @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server
|
||||
* @param {string} planId
|
||||
*/
|
||||
getTimelines(scopeIdentifier, hubName, planId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
scopeIdentifier: scopeIdentifier,
|
||||
hubName: hubName,
|
||||
planId: planId
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.TaskApi = TaskApi;
|
||||
+975
@@ -0,0 +1,975 @@
|
||||
/// <reference types="node" />
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import TestInterfaces = require("./interfaces/TestInterfaces");
|
||||
import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
|
||||
export interface ITestApi extends basem.ClientApiBase {
|
||||
getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<TestInterfaces.TestActionResultModel[]>;
|
||||
createAfnStrip(afnStrip: TestInterfaces.AfnStrip, project: string): Promise<TestInterfaces.AfnStrip>;
|
||||
getAfnStrips(project: string, testCaseIds?: number[]): Promise<TestInterfaces.AfnStrip[]>;
|
||||
createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachment[]>;
|
||||
getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
|
||||
getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachment[]>;
|
||||
getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
|
||||
createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
getTestRunAttachments(project: string, runId: number): Promise<TestInterfaces.TestAttachment[]>;
|
||||
getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.WorkItemReference[]>;
|
||||
getCloneInformation(project: string, cloneOperationId: number, includeDetails?: boolean): Promise<TestInterfaces.CloneOperationInformation>;
|
||||
cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, planId: number): Promise<TestInterfaces.CloneOperationInformation>;
|
||||
cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, planId: number, sourceSuiteId: number): Promise<TestInterfaces.CloneOperationInformation>;
|
||||
getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise<TestInterfaces.BuildCoverage[]>;
|
||||
getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise<TestInterfaces.CodeCoverageSummary>;
|
||||
updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise<void>;
|
||||
getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<TestInterfaces.TestRunCoverage[]>;
|
||||
createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise<TestInterfaces.TestConfiguration>;
|
||||
deleteTestConfiguration(project: string, testConfigurationId: number): Promise<void>;
|
||||
getTestConfigurationById(project: string, testConfigurationId: number): Promise<TestInterfaces.TestConfiguration>;
|
||||
getTestConfigurations(project: string, skip?: number, top?: number, continuationToken?: string, includeAllProperties?: boolean): Promise<TestInterfaces.TestConfiguration[]>;
|
||||
updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise<TestInterfaces.TestConfiguration>;
|
||||
addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
|
||||
queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
|
||||
queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise<TestInterfaces.TestResultHistory>;
|
||||
getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel>;
|
||||
getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel[]>;
|
||||
getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise<TestInterfaces.LinkedWorkItemsQueryResult[]>;
|
||||
getTestRunLogs(project: string, runId: number): Promise<TestInterfaces.TestMessageLogDetails[]>;
|
||||
getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise<TestInterfaces.TestResultParameterModel[]>;
|
||||
createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise<TestInterfaces.TestPlan>;
|
||||
deleteTestPlan(project: string, planId: number): Promise<void>;
|
||||
getPlanById(project: string, planId: number): Promise<TestInterfaces.TestPlan>;
|
||||
getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise<TestInterfaces.TestPlan[]>;
|
||||
updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise<TestInterfaces.TestPlan>;
|
||||
getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise<TestInterfaces.TestPoint>;
|
||||
getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestPoint[]>;
|
||||
updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise<TestInterfaces.TestPoint[]>;
|
||||
getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise<TestInterfaces.TestPointsQuery>;
|
||||
getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
|
||||
getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
|
||||
publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise<TestInterfaces.TestResultDocument>;
|
||||
getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise<TestInterfaces.FieldDetailsForTestResults[]>;
|
||||
getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise<TestInterfaces.FieldDetailsForTestResults[]>;
|
||||
getTestResultsMetaData(project: string, testReferenceIds: number[]): Promise<TestInterfaces.TestResultMetaData[]>;
|
||||
getResultRetentionSettings(project: string): Promise<TestInterfaces.ResultRetentionSettings>;
|
||||
updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise<TestInterfaces.ResultRetentionSettings>;
|
||||
addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
|
||||
getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise<TestInterfaces.TestCaseResult>;
|
||||
getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise<TestInterfaces.TestCaseResult[]>;
|
||||
updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
|
||||
getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise<TestInterfaces.TestResultsQuery>;
|
||||
getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<TestInterfaces.ShallowTestCaseResult[]>;
|
||||
getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<TestInterfaces.ShallowTestCaseResult[]>;
|
||||
queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise<TestInterfaces.TestResultSummary>;
|
||||
queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise<TestInterfaces.TestResultSummary>;
|
||||
queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise<TestInterfaces.TestResultSummary[]>;
|
||||
queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise<TestInterfaces.TestSummaryForWorkItem[]>;
|
||||
queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
|
||||
queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
|
||||
getTestRunStatistics(project: string, runId: number): Promise<TestInterfaces.TestRunStatistic>;
|
||||
createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise<TestInterfaces.TestRun>;
|
||||
deleteTestRun(project: string, runId: number): Promise<void>;
|
||||
getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise<TestInterfaces.TestRun>;
|
||||
getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestRun[]>;
|
||||
queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: TestInterfaces.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: TestInterfaces.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise<TestInterfaces.TestRun[]>;
|
||||
updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise<TestInterfaces.TestRun>;
|
||||
createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
|
||||
getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise<TestInterfaces.TestSession[]>;
|
||||
updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
|
||||
deleteSharedParameter(project: string, sharedParameterId: number): Promise<void>;
|
||||
deleteSharedStep(project: string, sharedStepId: number): Promise<void>;
|
||||
getSuiteEntries(project: string, suiteId: number): Promise<TestInterfaces.SuiteEntry[]>;
|
||||
reorderSuiteEntries(suiteEntries: TestInterfaces.SuiteEntryUpdateModel[], project: string, suiteId: number): Promise<TestInterfaces.SuiteEntry[]>;
|
||||
addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
|
||||
getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise<TestInterfaces.SuiteTestCase>;
|
||||
getTestCases(project: string, planId: number, suiteId: number): Promise<TestInterfaces.SuiteTestCase[]>;
|
||||
removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<void>;
|
||||
updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
|
||||
createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise<TestInterfaces.TestSuite[]>;
|
||||
deleteTestSuite(project: string, planId: number, suiteId: number): Promise<void>;
|
||||
getTestSuiteById(project: string, planId: number, suiteId: number, expand?: number): Promise<TestInterfaces.TestSuite>;
|
||||
getTestSuitesForPlan(project: string, planId: number, expand?: number, skip?: number, top?: number, asTreeView?: boolean): Promise<TestInterfaces.TestSuite[]>;
|
||||
updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise<TestInterfaces.TestSuite>;
|
||||
getSuitesByTestCaseId(testCaseId: number): Promise<TestInterfaces.TestSuite[]>;
|
||||
deleteTestCase(project: string, testCaseId: number): Promise<void>;
|
||||
queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise<TestInterfaces.TestHistoryQuery>;
|
||||
createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise<number>;
|
||||
deleteTestSettings(project: string, testSettingsId: number): Promise<void>;
|
||||
getTestSettingsById(project: string, testSettingsId: number): Promise<TestInterfaces.TestSettings>;
|
||||
createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise<TestInterfaces.TestVariable>;
|
||||
deleteTestVariable(project: string, testVariableId: number): Promise<void>;
|
||||
getTestVariableById(project: string, testVariableId: number): Promise<TestInterfaces.TestVariable>;
|
||||
getTestVariables(project: string, skip?: number, top?: number): Promise<TestInterfaces.TestVariable[]>;
|
||||
updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise<TestInterfaces.TestVariable>;
|
||||
addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise<TestInterfaces.WorkItemToTestLinks>;
|
||||
deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise<boolean>;
|
||||
queryTestMethodLinkedWorkItems(project: string, testName: string): Promise<TestInterfaces.TestToWorkItemLinks>;
|
||||
queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise<TestInterfaces.WorkItemReference[]>;
|
||||
}
|
||||
export declare class TestApi extends basem.ClientApiBase implements ITestApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Gets the action results for an iteration in a test result.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test result that contains the iterations.
|
||||
* @param {number} iterationId - ID of the iteration that contains the actions.
|
||||
* @param {string} actionPath - Path of a specific action, used to get just that action.
|
||||
*/
|
||||
getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<TestInterfaces.TestActionResultModel[]>;
|
||||
/**
|
||||
* Create AfnStrip
|
||||
*
|
||||
* @param {TestInterfaces.AfnStrip} afnStrip - AfnStrip request payload
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createAfnStrip(afnStrip: TestInterfaces.AfnStrip, project: string): Promise<TestInterfaces.AfnStrip>;
|
||||
/**
|
||||
* Get list of afnStrips by testcaseid
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number[]} testCaseIds - Ids of testcases
|
||||
*/
|
||||
getAfnStrips(project: string, testCaseIds?: number[]): Promise<TestInterfaces.AfnStrip[]>;
|
||||
/**
|
||||
* Attach a file to test step result
|
||||
*
|
||||
* @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test result that contains the iteration
|
||||
* @param {number} iterationId - ID of the test result iteration.
|
||||
* @param {string} actionPath - Hex value of test result action path.
|
||||
*/
|
||||
createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
/**
|
||||
* Attach a file to a test result.
|
||||
*
|
||||
* @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test result against which attachment has to be uploaded.
|
||||
*/
|
||||
createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
/**
|
||||
* Attach a file to a test result
|
||||
*
|
||||
* @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment Request Model.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test results that contains sub result.
|
||||
* @param {number} testSubResultId - ID of the test sub results against which attachment has to be uploaded.
|
||||
*/
|
||||
createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
/**
|
||||
* Download a test result attachment by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the testCaseResultId.
|
||||
* @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded.
|
||||
* @param {number} attachmentId - ID of the test result attachment to be downloaded.
|
||||
*/
|
||||
getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get list of test result attachments reference.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test result.
|
||||
*/
|
||||
getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.TestAttachment[]>;
|
||||
/**
|
||||
* Download a test result attachment by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the testCaseResultId.
|
||||
* @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded.
|
||||
* @param {number} attachmentId - ID of the test result attachment to be downloaded.
|
||||
*/
|
||||
getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Download a test sub result attachment
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test results that contains sub result.
|
||||
* @param {number} attachmentId - ID of the test result attachment to be downloaded
|
||||
* @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded
|
||||
*/
|
||||
getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get list of test sub result attachments
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test results that contains sub result.
|
||||
* @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded
|
||||
*/
|
||||
getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<TestInterfaces.TestAttachment[]>;
|
||||
/**
|
||||
* Download a test sub result attachment
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test results that contains sub result.
|
||||
* @param {number} attachmentId - ID of the test result attachment to be downloaded
|
||||
* @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded
|
||||
*/
|
||||
getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Attach a file to a test run.
|
||||
*
|
||||
* @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run against which attachment has to be uploaded.
|
||||
*/
|
||||
createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise<TestInterfaces.TestAttachmentReference>;
|
||||
/**
|
||||
* Download a test run attachment by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run whose attachment has to be downloaded.
|
||||
* @param {number} attachmentId - ID of the test run attachment to be downloaded.
|
||||
*/
|
||||
getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get list of test run attachments reference.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run.
|
||||
*/
|
||||
getTestRunAttachments(project: string, runId: number): Promise<TestInterfaces.TestAttachment[]>;
|
||||
/**
|
||||
* Download a test run attachment by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run whose attachment has to be downloaded.
|
||||
* @param {number} attachmentId - ID of the test run attachment to be downloaded.
|
||||
*/
|
||||
getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId
|
||||
* @param {number} testCaseResultId
|
||||
*/
|
||||
getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise<TestInterfaces.WorkItemReference[]>;
|
||||
/**
|
||||
* Get clone information.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} cloneOperationId - Operation ID returned when we queue a clone operation
|
||||
* @param {boolean} includeDetails - If false returns only status of the clone operation information, if true returns complete clone information
|
||||
*/
|
||||
getCloneInformation(project: string, cloneOperationId: number, includeDetails?: boolean): Promise<TestInterfaces.CloneOperationInformation>;
|
||||
/**
|
||||
* Clone test plan
|
||||
*
|
||||
* @param {TestInterfaces.TestPlanCloneRequest} cloneRequestBody - Plan Clone Request Body detail TestPlanCloneRequest
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan to be cloned.
|
||||
*/
|
||||
cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, planId: number): Promise<TestInterfaces.CloneOperationInformation>;
|
||||
/**
|
||||
* Clone test suite
|
||||
*
|
||||
* @param {TestInterfaces.TestSuiteCloneRequest} cloneRequestBody - Suite Clone Request Body detail TestSuiteCloneRequest
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan in which suite to be cloned is present
|
||||
* @param {number} sourceSuiteId - ID of the test suite to be cloned
|
||||
*/
|
||||
cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, planId: number, sourceSuiteId: number): Promise<TestInterfaces.CloneOperationInformation>;
|
||||
/**
|
||||
* Get code coverage data for a build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - ID of the build for which code coverage data needs to be fetched.
|
||||
* @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
|
||||
*/
|
||||
getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise<TestInterfaces.BuildCoverage[]>;
|
||||
/**
|
||||
* Get Code Coverage Summary for Build.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId - ID of the build for which code coverage data needs to be fetched.
|
||||
* @param {number} deltaBuildId - Delta Build id (optional)
|
||||
*/
|
||||
getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise<TestInterfaces.CodeCoverageSummary>;
|
||||
/**
|
||||
* http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary
|
||||
*
|
||||
* @param {TestInterfaces.CodeCoverageData} coverageData
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
*/
|
||||
updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise<void>;
|
||||
/**
|
||||
* Get code coverage data for a test run
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run for which code coverage data needs to be fetched.
|
||||
* @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
|
||||
*/
|
||||
getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<TestInterfaces.TestRunCoverage[]>;
|
||||
/**
|
||||
* Create a test configuration
|
||||
*
|
||||
* @param {TestInterfaces.TestConfiguration} testConfiguration - Test configuration
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise<TestInterfaces.TestConfiguration>;
|
||||
/**
|
||||
* Delete a test configuration
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testConfigurationId - ID of the test configuration to get.
|
||||
*/
|
||||
deleteTestConfiguration(project: string, testConfigurationId: number): Promise<void>;
|
||||
/**
|
||||
* Get a test configuration
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testConfigurationId - ID of the test configuration to get.
|
||||
*/
|
||||
getTestConfigurationById(project: string, testConfigurationId: number): Promise<TestInterfaces.TestConfiguration>;
|
||||
/**
|
||||
* Get a list of test configurations
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} skip - Number of test configurations to skip.
|
||||
* @param {number} top - Number of test configurations to return.
|
||||
* @param {string} continuationToken - If the list of configurations returned is not complete, a continuation token to query next batch of configurations is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test configurations.
|
||||
* @param {boolean} includeAllProperties - If true, it returns all properties of the test configurations. Otherwise, it returns the skinny version.
|
||||
*/
|
||||
getTestConfigurations(project: string, skip?: number, top?: number, continuationToken?: string, includeAllProperties?: boolean): Promise<TestInterfaces.TestConfiguration[]>;
|
||||
/**
|
||||
* Update a test configuration
|
||||
*
|
||||
* @param {TestInterfaces.TestConfiguration} testConfiguration - Test configuration
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testConfigurationId - ID of the test configuration to update.
|
||||
*/
|
||||
updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise<TestInterfaces.TestConfiguration>;
|
||||
/**
|
||||
* @param {TestInterfaces.CustomTestFieldDefinition[]} newFields
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {TestInterfaces.CustomTestFieldScope} scopeFilter
|
||||
*/
|
||||
queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise<TestInterfaces.CustomTestFieldDefinition[]>;
|
||||
/**
|
||||
* @param {TestInterfaces.ResultsFilter} filter
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise<TestInterfaces.TestResultHistory>;
|
||||
/**
|
||||
* Get iteration for a result
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test result that contains the iterations.
|
||||
* @param {number} iterationId - Id of the test results Iteration.
|
||||
* @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
|
||||
*/
|
||||
getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel>;
|
||||
/**
|
||||
* Get iterations for a result
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test result that contains the iterations.
|
||||
* @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
|
||||
*/
|
||||
getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise<TestInterfaces.TestIterationDetailsModel[]>;
|
||||
/**
|
||||
* @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise<TestInterfaces.LinkedWorkItemsQueryResult[]>;
|
||||
/**
|
||||
* Get test run message logs
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the run to get.
|
||||
*/
|
||||
getTestRunLogs(project: string, runId: number): Promise<TestInterfaces.TestMessageLogDetails[]>;
|
||||
/**
|
||||
* Get a list of parameterized results
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the test run that contains the result.
|
||||
* @param {number} testCaseResultId - ID of the test result that contains the iterations.
|
||||
* @param {number} iterationId - ID of the iteration that contains the parameterized results.
|
||||
* @param {string} paramName - Name of the parameter.
|
||||
*/
|
||||
getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise<TestInterfaces.TestResultParameterModel[]>;
|
||||
/**
|
||||
* Create a test plan.
|
||||
*
|
||||
* @param {TestInterfaces.PlanUpdateModel} testPlan - A test plan object.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise<TestInterfaces.TestPlan>;
|
||||
/**
|
||||
* Delete a test plan.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan to be deleted.
|
||||
*/
|
||||
deleteTestPlan(project: string, planId: number): Promise<void>;
|
||||
/**
|
||||
* Get test plan by ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan to return.
|
||||
*/
|
||||
getPlanById(project: string, planId: number): Promise<TestInterfaces.TestPlan>;
|
||||
/**
|
||||
* Get a list of test plans.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} owner - Filter for test plan by owner ID or name.
|
||||
* @param {number} skip - Number of test plans to skip.
|
||||
* @param {number} top - Number of test plans to return.
|
||||
* @param {boolean} includePlanDetails - Get all properties of the test plan.
|
||||
* @param {boolean} filterActivePlans - Get just the active plans.
|
||||
*/
|
||||
getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise<TestInterfaces.TestPlan[]>;
|
||||
/**
|
||||
* Update a test plan.
|
||||
*
|
||||
* @param {TestInterfaces.PlanUpdateModel} planUpdateModel
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan to be updated.
|
||||
*/
|
||||
updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise<TestInterfaces.TestPlan>;
|
||||
/**
|
||||
* Get a test point.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan.
|
||||
* @param {number} suiteId - ID of the suite that contains the point.
|
||||
* @param {number} pointIds - ID of the test point to get.
|
||||
* @param {string} witFields - Comma-separated list of work item field names.
|
||||
*/
|
||||
getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise<TestInterfaces.TestPoint>;
|
||||
/**
|
||||
* Get a list of test points.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan.
|
||||
* @param {number} suiteId - ID of the suite that contains the points.
|
||||
* @param {string} witFields - Comma-separated list of work item field names.
|
||||
* @param {string} configurationId - Get test points for specific configuration.
|
||||
* @param {string} testCaseId - Get test points for a specific test case, valid when configurationId is not set.
|
||||
* @param {string} testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set.
|
||||
* @param {boolean} includePointDetails - Include all properties for the test point.
|
||||
* @param {number} skip - Number of test points to skip..
|
||||
* @param {number} top - Number of test points to return.
|
||||
*/
|
||||
getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestPoint[]>;
|
||||
/**
|
||||
* Update test points.
|
||||
*
|
||||
* @param {TestInterfaces.PointUpdateModel} pointUpdateModel - Data to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan.
|
||||
* @param {number} suiteId - ID of the suite that contains the points.
|
||||
* @param {string} pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points.
|
||||
*/
|
||||
updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise<TestInterfaces.TestPoint[]>;
|
||||
/**
|
||||
* Get test points using query.
|
||||
*
|
||||
* @param {TestInterfaces.TestPointsQuery} query - TestPointsQuery to get test points.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} skip - Number of test points to skip..
|
||||
* @param {number} top - Number of test points to return.
|
||||
*/
|
||||
getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise<TestInterfaces.TestPointsQuery>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
* @param {string} publishContext
|
||||
* @param {string} groupBy
|
||||
* @param {string} filter
|
||||
* @param {string} orderby
|
||||
* @param {boolean} shouldIncludeResults
|
||||
* @param {boolean} queryRunSummaryForInProgress
|
||||
*/
|
||||
getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} releaseEnvId
|
||||
* @param {string} publishContext
|
||||
* @param {string} groupBy
|
||||
* @param {string} filter
|
||||
* @param {string} orderby
|
||||
* @param {boolean} shouldIncludeResults
|
||||
* @param {boolean} queryRunSummaryForInProgress
|
||||
*/
|
||||
getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise<TestInterfaces.TestResultsDetails>;
|
||||
/**
|
||||
* @param {TestInterfaces.TestResultDocument} document
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId
|
||||
*/
|
||||
publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise<TestInterfaces.TestResultDocument>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
* @param {string} publishContext
|
||||
* @param {string[]} fields
|
||||
* @param {string} continuationToken
|
||||
*/
|
||||
getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise<TestInterfaces.FieldDetailsForTestResults[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {string} publishContext
|
||||
* @param {number} releaseEnvId
|
||||
* @param {string[]} fields
|
||||
* @param {string} continuationToken
|
||||
*/
|
||||
getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise<TestInterfaces.FieldDetailsForTestResults[]>;
|
||||
/**
|
||||
* Get list of test Result meta data details for corresponding testcasereferenceId
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number[]} testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma seperated list of valid ids (limit no. of ids 100).
|
||||
*/
|
||||
getTestResultsMetaData(project: string, testReferenceIds: number[]): Promise<TestInterfaces.TestResultMetaData[]>;
|
||||
/**
|
||||
* Get test result retention settings
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getResultRetentionSettings(project: string): Promise<TestInterfaces.ResultRetentionSettings>;
|
||||
/**
|
||||
* Update test result retention settings
|
||||
*
|
||||
* @param {TestInterfaces.ResultRetentionSettings} retentionSettings - Test result retention settings details to be updated
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise<TestInterfaces.ResultRetentionSettings>;
|
||||
/**
|
||||
* Add test results to a test run.
|
||||
*
|
||||
* @param {TestInterfaces.TestCaseResult[]} results - List of test results to add.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - Test run ID into which test results to add.
|
||||
*/
|
||||
addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
|
||||
/**
|
||||
* Get a test result for a test run.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - Test run ID of a test result to fetch.
|
||||
* @param {number} testCaseResultId - Test result ID.
|
||||
* @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults.
|
||||
*/
|
||||
getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise<TestInterfaces.TestCaseResult>;
|
||||
/**
|
||||
* Get test results for a test run.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - Test run ID of test results to fetch.
|
||||
* @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems.
|
||||
* @param {number} skip - Number of test results to skip from beginning.
|
||||
* @param {number} top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise.
|
||||
* @param {TestInterfaces.TestOutcome[]} outcomes - Comma separated list of test outcomes to filter test results.
|
||||
*/
|
||||
getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise<TestInterfaces.TestCaseResult[]>;
|
||||
/**
|
||||
* Update test results in a test run.
|
||||
*
|
||||
* @param {TestInterfaces.TestCaseResult[]} results - List of test results to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - Test run ID whose test results to update.
|
||||
*/
|
||||
updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise<TestInterfaces.TestCaseResult[]>;
|
||||
/**
|
||||
* @param {TestInterfaces.TestResultsQuery} query
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise<TestInterfaces.TestResultsQuery>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
* @param {string} publishContext
|
||||
* @param {TestInterfaces.TestOutcome[]} outcomes
|
||||
* @param {number} top
|
||||
* @param {string} continuationToken
|
||||
*/
|
||||
getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<TestInterfaces.ShallowTestCaseResult[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} releaseEnvid
|
||||
* @param {string} publishContext
|
||||
* @param {TestInterfaces.TestOutcome[]} outcomes
|
||||
* @param {number} top
|
||||
* @param {string} continuationToken
|
||||
*/
|
||||
getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise<TestInterfaces.ShallowTestCaseResult[]>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} buildId
|
||||
* @param {string} publishContext
|
||||
* @param {boolean} includeFailureDetails
|
||||
* @param {TestInterfaces.BuildReference} buildToCompare
|
||||
*/
|
||||
queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise<TestInterfaces.TestResultSummary>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} releaseId
|
||||
* @param {number} releaseEnvId
|
||||
* @param {string} publishContext
|
||||
* @param {boolean} includeFailureDetails
|
||||
* @param {TestInterfaces.ReleaseReference} releaseToCompare
|
||||
*/
|
||||
queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise<TestInterfaces.TestResultSummary>;
|
||||
/**
|
||||
* @param {TestInterfaces.ReleaseReference[]} releases
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise<TestInterfaces.TestResultSummary[]>;
|
||||
/**
|
||||
* @param {TestInterfaces.TestResultsContext} resultsContext
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number[]} workItemIds
|
||||
*/
|
||||
queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise<TestInterfaces.TestSummaryForWorkItem[]>;
|
||||
/**
|
||||
* @param {TestInterfaces.TestResultTrendFilter} filter
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
|
||||
/**
|
||||
* @param {TestInterfaces.TestResultTrendFilter} filter
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise<TestInterfaces.AggregatedDataForResultTrend[]>;
|
||||
/**
|
||||
* Get test run statistics
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the run to get.
|
||||
*/
|
||||
getTestRunStatistics(project: string, runId: number): Promise<TestInterfaces.TestRunStatistic>;
|
||||
/**
|
||||
* Create new test run.
|
||||
*
|
||||
* @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise<TestInterfaces.TestRun>;
|
||||
/**
|
||||
* Delete a test run by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the run to delete.
|
||||
*/
|
||||
deleteTestRun(project: string, runId: number): Promise<void>;
|
||||
/**
|
||||
* Get a test run by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the run to get.
|
||||
* @param {boolean} includeDetails - Defualt value is true. It includes details like run statistics,release,build,Test enviornment,Post process state and more
|
||||
*/
|
||||
getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise<TestInterfaces.TestRun>;
|
||||
/**
|
||||
* Get a list of test runs.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} buildUri - URI of the build that the runs used.
|
||||
* @param {string} owner - Team foundation ID of the owner of the runs.
|
||||
* @param {string} tmiRunId
|
||||
* @param {number} planId - ID of the test plan that the runs are a part of.
|
||||
* @param {boolean} includeRunDetails - If true, include all the properties of the runs.
|
||||
* @param {boolean} automated - If true, only returns automated runs.
|
||||
* @param {number} skip - Number of test runs to skip.
|
||||
* @param {number} top - Number of test runs to return.
|
||||
*/
|
||||
getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise<TestInterfaces.TestRun[]>;
|
||||
/**
|
||||
* Query Test Runs based on filters.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory).
|
||||
* @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
|
||||
* @param {TestInterfaces.TestRunState} state - Current state of the Runs to be queried.
|
||||
* @param {number[]} planIds - Plan Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
|
||||
* @param {boolean} isAutomated - Automation type of the Runs to be queried.
|
||||
* @param {TestInterfaces.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried.
|
||||
* @param {number[]} buildIds - Build Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
|
||||
* @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
|
||||
* @param {string} branchName - Source Branch name of the Runs to be queried.
|
||||
* @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
|
||||
* @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
|
||||
* @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
|
||||
* @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
|
||||
* @param {string} runTitle - Run Title of the Runs to be queried.
|
||||
* @param {number} top - Number of runs to be queried. Limit is 100
|
||||
* @param {string} continuationToken - continuationToken received from previous batch or null for first batch.
|
||||
*/
|
||||
queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: TestInterfaces.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: TestInterfaces.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise<TestInterfaces.TestRun[]>;
|
||||
/**
|
||||
* Update test run by its ID.
|
||||
*
|
||||
* @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} runId - ID of the run to update.
|
||||
*/
|
||||
updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise<TestInterfaces.TestRun>;
|
||||
/**
|
||||
* Create a test session
|
||||
*
|
||||
* @param {TestInterfaces.TestSession} testSession - Test session details for creation
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
|
||||
/**
|
||||
* Get a list of test sessions
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {number} period - Period in days from now, for which test sessions are fetched.
|
||||
* @param {boolean} allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users
|
||||
* @param {boolean} includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version.
|
||||
* @param {TestInterfaces.TestSessionSource} source - Source of the test session.
|
||||
* @param {boolean} includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states
|
||||
*/
|
||||
getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise<TestInterfaces.TestSession[]>;
|
||||
/**
|
||||
* Update a test session
|
||||
*
|
||||
* @param {TestInterfaces.TestSession} testSession - Test session details for update
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise<TestInterfaces.TestSession>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} sharedParameterId
|
||||
*/
|
||||
deleteSharedParameter(project: string, sharedParameterId: number): Promise<void>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} sharedStepId
|
||||
*/
|
||||
deleteSharedStep(project: string, sharedStepId: number): Promise<void>;
|
||||
/**
|
||||
* Get a list of test suite entries in the test suite.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} suiteId - Id of the parent suite.
|
||||
*/
|
||||
getSuiteEntries(project: string, suiteId: number): Promise<TestInterfaces.SuiteEntry[]>;
|
||||
/**
|
||||
* Reorder test suite entries in the test suite.
|
||||
*
|
||||
* @param {TestInterfaces.SuiteEntryUpdateModel[]} suiteEntries - List of SuiteEntryUpdateModel to reorder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} suiteId - Id of the parent test suite.
|
||||
*/
|
||||
reorderSuiteEntries(suiteEntries: TestInterfaces.SuiteEntryUpdateModel[], project: string, suiteId: number): Promise<TestInterfaces.SuiteEntry[]>;
|
||||
/**
|
||||
* Add test cases to suite.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suite.
|
||||
* @param {number} suiteId - ID of the test suite to which the test cases must be added.
|
||||
* @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format.
|
||||
*/
|
||||
addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
|
||||
/**
|
||||
* Get a specific test case in a test suite with test case id.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suites.
|
||||
* @param {number} suiteId - ID of the suite that contains the test case.
|
||||
* @param {number} testCaseIds - ID of the test case to get.
|
||||
*/
|
||||
getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise<TestInterfaces.SuiteTestCase>;
|
||||
/**
|
||||
* Get all test cases in a suite.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suites.
|
||||
* @param {number} suiteId - ID of the suite to get.
|
||||
*/
|
||||
getTestCases(project: string, planId: number, suiteId: number): Promise<TestInterfaces.SuiteTestCase[]>;
|
||||
/**
|
||||
* The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suite.
|
||||
* @param {number} suiteId - ID of the suite to get.
|
||||
* @param {string} testCaseIds - IDs of the test cases to remove from the suite.
|
||||
*/
|
||||
removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise<void>;
|
||||
/**
|
||||
* Updates the properties of the test case association in a suite.
|
||||
*
|
||||
* @param {TestInterfaces.SuiteTestCaseUpdateModel} suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suite.
|
||||
* @param {number} suiteId - ID of the test suite to which the test cases must be added.
|
||||
* @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format.
|
||||
*/
|
||||
updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise<TestInterfaces.SuiteTestCase[]>;
|
||||
/**
|
||||
* Create a test suite.
|
||||
*
|
||||
* @param {TestInterfaces.SuiteCreateModel} testSuite - Test suite data.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suite.
|
||||
* @param {number} suiteId - ID of the parent suite.
|
||||
*/
|
||||
createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise<TestInterfaces.TestSuite[]>;
|
||||
/**
|
||||
* Delete test suite.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suite.
|
||||
* @param {number} suiteId - ID of the test suite to delete.
|
||||
*/
|
||||
deleteTestSuite(project: string, planId: number, suiteId: number): Promise<void>;
|
||||
/**
|
||||
* Get test suite by suite id.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suites.
|
||||
* @param {number} suiteId - ID of the suite to get.
|
||||
* @param {number} expand - Include the children suites and testers details
|
||||
*/
|
||||
getTestSuiteById(project: string, planId: number, suiteId: number, expand?: number): Promise<TestInterfaces.TestSuite>;
|
||||
/**
|
||||
* Get test suites for plan.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan for which suites are requested.
|
||||
* @param {number} expand - Include the children suites and testers details.
|
||||
* @param {number} skip - Number of suites to skip from the result.
|
||||
* @param {number} top - Number of Suites to be return after skipping the suites from the result.
|
||||
* @param {boolean} asTreeView - If the suites returned should be in a tree structure.
|
||||
*/
|
||||
getTestSuitesForPlan(project: string, planId: number, expand?: number, skip?: number, top?: number, asTreeView?: boolean): Promise<TestInterfaces.TestSuite[]>;
|
||||
/**
|
||||
* Update a test suite.
|
||||
*
|
||||
* @param {TestInterfaces.SuiteUpdateModel} suiteUpdateModel - Suite Model to update
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} planId - ID of the test plan that contains the suites.
|
||||
* @param {number} suiteId - ID of the suite to update.
|
||||
*/
|
||||
updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise<TestInterfaces.TestSuite>;
|
||||
/**
|
||||
* Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case.
|
||||
*
|
||||
* @param {number} testCaseId - ID of the test case for which suites need to be fetched.
|
||||
*/
|
||||
getSuitesByTestCaseId(testCaseId: number): Promise<TestInterfaces.TestSuite[]>;
|
||||
/**
|
||||
* Delete a test case.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testCaseId - Id of test case to delete.
|
||||
*/
|
||||
deleteTestCase(project: string, testCaseId: number): Promise<void>;
|
||||
/**
|
||||
* Get history of a test method using TestHistoryQuery
|
||||
*
|
||||
* @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise<TestInterfaces.TestHistoryQuery>;
|
||||
/**
|
||||
* @param {TestInterfaces.TestSettings} testSettings
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise<number>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testSettingsId
|
||||
*/
|
||||
deleteTestSettings(project: string, testSettingsId: number): Promise<void>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testSettingsId
|
||||
*/
|
||||
getTestSettingsById(project: string, testSettingsId: number): Promise<TestInterfaces.TestSettings>;
|
||||
/**
|
||||
* Create a test variable.
|
||||
*
|
||||
* @param {TestInterfaces.TestVariable} testVariable - TestVariable
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise<TestInterfaces.TestVariable>;
|
||||
/**
|
||||
* Delete a test variable by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testVariableId - ID of the test variable to delete.
|
||||
*/
|
||||
deleteTestVariable(project: string, testVariableId: number): Promise<void>;
|
||||
/**
|
||||
* Get a test variable by its ID.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testVariableId - ID of the test variable to get.
|
||||
*/
|
||||
getTestVariableById(project: string, testVariableId: number): Promise<TestInterfaces.TestVariable>;
|
||||
/**
|
||||
* Get a list of test variables.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} skip - Number of test variables to skip.
|
||||
* @param {number} top - Number of test variables to return.
|
||||
*/
|
||||
getTestVariables(project: string, skip?: number, top?: number): Promise<TestInterfaces.TestVariable[]>;
|
||||
/**
|
||||
* Update a test variable by its ID.
|
||||
*
|
||||
* @param {TestInterfaces.TestVariable} testVariable - TestVariable
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} testVariableId - ID of the test variable to update.
|
||||
*/
|
||||
updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise<TestInterfaces.TestVariable>;
|
||||
/**
|
||||
* @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise<TestInterfaces.WorkItemToTestLinks>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} testName
|
||||
* @param {number} workItemId
|
||||
*/
|
||||
deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise<boolean>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} testName
|
||||
*/
|
||||
queryTestMethodLinkedWorkItems(project: string, testName: string): Promise<TestInterfaces.TestToWorkItemLinks>;
|
||||
/**
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} workItemCategory
|
||||
* @param {string} automatedTestName
|
||||
* @param {number} testCaseId
|
||||
* @param {Date} maxCompleteDate
|
||||
* @param {number} days
|
||||
* @param {number} workItemCount
|
||||
*/
|
||||
queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise<TestInterfaces.WorkItemReference[]>;
|
||||
}
|
||||
+3437
File diff suppressed because it is too large
Load Diff
+253
@@ -0,0 +1,253 @@
|
||||
/// <reference types="node" />
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import TfvcInterfaces = require("./interfaces/TfvcInterfaces");
|
||||
export interface ITfvcApi extends basem.ClientApiBase {
|
||||
getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise<TfvcInterfaces.TfvcBranch>;
|
||||
getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise<TfvcInterfaces.TfvcBranch[]>;
|
||||
getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise<TfvcInterfaces.TfvcBranchRef[]>;
|
||||
getChangesetChanges(id?: number, skip?: number, top?: number): Promise<TfvcInterfaces.TfvcChange[]>;
|
||||
createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise<TfvcInterfaces.TfvcChangesetRef>;
|
||||
getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise<TfvcInterfaces.TfvcChangeset>;
|
||||
getChangesets(project?: string, maxCommentLength?: number, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise<TfvcInterfaces.TfvcChangesetRef[]>;
|
||||
getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise<TfvcInterfaces.TfvcChangesetRef[]>;
|
||||
getChangesetWorkItems(id?: number): Promise<TfvcInterfaces.AssociatedWorkItem[]>;
|
||||
getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise<TfvcInterfaces.TfvcItem[][]>;
|
||||
getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise<NodeJS.ReadableStream>;
|
||||
getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<TfvcInterfaces.TfvcItem>;
|
||||
getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise<TfvcInterfaces.TfvcItem[]>;
|
||||
getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
getLabelItems(labelId: string, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcItem[]>;
|
||||
getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise<TfvcInterfaces.TfvcLabel>;
|
||||
getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcLabelRef[]>;
|
||||
getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcChange[]>;
|
||||
getShelveset(shelvesetId: string, requestData?: TfvcInterfaces.TfvcShelvesetRequestData): Promise<TfvcInterfaces.TfvcShelveset>;
|
||||
getShelvesets(requestData?: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcShelvesetRef[]>;
|
||||
getShelvesetWorkItems(shelvesetId: string): Promise<TfvcInterfaces.AssociatedWorkItem[]>;
|
||||
getTfvcStatistics(project?: string, scopePath?: string): Promise<TfvcInterfaces.TfvcStatistics>;
|
||||
}
|
||||
export declare class TfvcApi extends basem.ClientApiBase implements ITfvcApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Get a single branch hierarchy at the given path with parents or children as specified.
|
||||
*
|
||||
* @param {string} path - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} includeParent - Return the parent branch, if there is one. Default: False
|
||||
* @param {boolean} includeChildren - Return child branches, if there are any. Default: False
|
||||
*/
|
||||
getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise<TfvcInterfaces.TfvcBranch>;
|
||||
/**
|
||||
* Get a collection of branch roots -- first-level children, branches with no parents.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} includeParent - Return the parent branch, if there is one. Default: False
|
||||
* @param {boolean} includeChildren - Return the child branches for each root branch. Default: False
|
||||
* @param {boolean} includeDeleted - Return deleted branches. Default: False
|
||||
* @param {boolean} includeLinks - Return links. Default: False
|
||||
*/
|
||||
getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise<TfvcInterfaces.TfvcBranch[]>;
|
||||
/**
|
||||
* Get branch hierarchies below the specified scopePath
|
||||
*
|
||||
* @param {string} scopePath - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} includeDeleted - Return deleted branches. Default: False
|
||||
* @param {boolean} includeLinks - Return links. Default: False
|
||||
*/
|
||||
getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise<TfvcInterfaces.TfvcBranchRef[]>;
|
||||
/**
|
||||
* Retrieve Tfvc changes for a given changeset.
|
||||
*
|
||||
* @param {number} id - ID of the changeset. Default: null
|
||||
* @param {number} skip - Number of results to skip. Default: null
|
||||
* @param {number} top - The maximum number of results to return. Default: null
|
||||
*/
|
||||
getChangesetChanges(id?: number, skip?: number, top?: number): Promise<TfvcInterfaces.TfvcChange[]>;
|
||||
/**
|
||||
* Create a new changeset.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcChangeset} changeset
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise<TfvcInterfaces.TfvcChangesetRef>;
|
||||
/**
|
||||
* Retrieve a Tfvc Changeset
|
||||
*
|
||||
* @param {number} id - Changeset Id to retrieve.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} maxChangeCount - Number of changes to return (maximum 100 changes) Default: 0
|
||||
* @param {boolean} includeDetails - Include policy details and check-in notes in the response. Default: false
|
||||
* @param {boolean} includeWorkItems - Include workitems. Default: false
|
||||
* @param {number} maxCommentLength - Include details about associated work items in the response. Default: null
|
||||
* @param {boolean} includeSourceRename - Include renames. Default: false
|
||||
* @param {number} skip - Number of results to skip. Default: null
|
||||
* @param {number} top - The maximum number of results to return. Default: null
|
||||
* @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.
|
||||
* @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null
|
||||
*/
|
||||
getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise<TfvcInterfaces.TfvcChangeset>;
|
||||
/**
|
||||
* Retrieve Tfvc Changesets
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} maxCommentLength - Include details about associated work items in the response. Default: null
|
||||
* @param {number} skip - Number of results to skip. Default: null
|
||||
* @param {number} top - The maximum number of results to return. Default: null
|
||||
* @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.
|
||||
* @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null
|
||||
*/
|
||||
getChangesets(project?: string, maxCommentLength?: number, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise<TfvcInterfaces.TfvcChangesetRef[]>;
|
||||
/**
|
||||
* Returns changesets for a given list of changeset Ids.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - List of changeset IDs.
|
||||
*/
|
||||
getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise<TfvcInterfaces.TfvcChangesetRef[]>;
|
||||
/**
|
||||
* Retrieves the work items associated with a particular changeset.
|
||||
*
|
||||
* @param {number} id - ID of the changeset. Default: null
|
||||
*/
|
||||
getChangesetWorkItems(id?: number): Promise<TfvcInterfaces.AssociatedWorkItem[]>;
|
||||
/**
|
||||
* Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise<TfvcInterfaces.TfvcItem[][]>;
|
||||
/**
|
||||
* Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<TfvcInterfaces.TfvcItem>;
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get a list of Tfvc items
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {boolean} includeLinks - True to include links.
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor
|
||||
*/
|
||||
getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise<TfvcInterfaces.TfvcItem[]>;
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get items under a label.
|
||||
*
|
||||
* @param {string} labelId - Unique identifier of label
|
||||
* @param {number} top - Max number of items to return
|
||||
* @param {number} skip - Number of items to skip
|
||||
*/
|
||||
getLabelItems(labelId: string, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcItem[]>;
|
||||
/**
|
||||
* Get a single deep label.
|
||||
*
|
||||
* @param {string} labelId - Unique identifier of label
|
||||
* @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise<TfvcInterfaces.TfvcLabel>;
|
||||
/**
|
||||
* Get a collection of shallow label references.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} top - Max number of labels to return
|
||||
* @param {number} skip - Number of labels to skip
|
||||
*/
|
||||
getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcLabelRef[]>;
|
||||
/**
|
||||
* Get changes included in a shelveset.
|
||||
*
|
||||
* @param {string} shelvesetId - Shelveset's unique ID
|
||||
* @param {number} top - Max number of changes to return
|
||||
* @param {number} skip - Number of changes to skip
|
||||
*/
|
||||
getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcChange[]>;
|
||||
/**
|
||||
* Get a single deep shelveset.
|
||||
*
|
||||
* @param {string} shelvesetId - Shelveset's unique ID
|
||||
* @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength
|
||||
*/
|
||||
getShelveset(shelvesetId: string, requestData?: TfvcInterfaces.TfvcShelvesetRequestData): Promise<TfvcInterfaces.TfvcShelveset>;
|
||||
/**
|
||||
* Return a collection of shallow shelveset references.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength
|
||||
* @param {number} top - Max number of shelvesets to return
|
||||
* @param {number} skip - Number of shelvesets to skip
|
||||
*/
|
||||
getShelvesets(requestData?: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise<TfvcInterfaces.TfvcShelvesetRef[]>;
|
||||
/**
|
||||
* Get work items associated with a shelveset.
|
||||
*
|
||||
* @param {string} shelvesetId - Shelveset's unique ID
|
||||
*/
|
||||
getShelvesetWorkItems(shelvesetId: string): Promise<TfvcInterfaces.AssociatedWorkItem[]>;
|
||||
/**
|
||||
* Provides File Count and Uncompressed Bytes for a Collection/Project at a particular scope for TFVC.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scopePath - '$/' for collection, '$/project' for specific project
|
||||
*/
|
||||
getTfvcStatistics(project?: string, scopePath?: string): Promise<TfvcInterfaces.TfvcStatistics>;
|
||||
}
|
||||
+856
@@ -0,0 +1,856 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const TfvcInterfaces = require("./interfaces/TfvcInterfaces");
|
||||
class TfvcApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Tfvc-api', options);
|
||||
}
|
||||
/**
|
||||
* Get a single branch hierarchy at the given path with parents or children as specified.
|
||||
*
|
||||
* @param {string} path - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} includeParent - Return the parent branch, if there is one. Default: False
|
||||
* @param {boolean} includeChildren - Return child branches, if there are any. Default: False
|
||||
*/
|
||||
getBranch(path, project, includeParent, includeChildren) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
path: path,
|
||||
includeParent: includeParent,
|
||||
includeChildren: includeChildren,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a collection of branch roots -- first-level children, branches with no parents.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} includeParent - Return the parent branch, if there is one. Default: False
|
||||
* @param {boolean} includeChildren - Return the child branches for each root branch. Default: False
|
||||
* @param {boolean} includeDeleted - Return deleted branches. Default: False
|
||||
* @param {boolean} includeLinks - Return links. Default: False
|
||||
*/
|
||||
getBranches(project, includeParent, includeChildren, includeDeleted, includeLinks) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
includeParent: includeParent,
|
||||
includeChildren: includeChildren,
|
||||
includeDeleted: includeDeleted,
|
||||
includeLinks: includeLinks,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get branch hierarchies below the specified scopePath
|
||||
*
|
||||
* @param {string} scopePath - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} includeDeleted - Return deleted branches. Default: False
|
||||
* @param {boolean} includeLinks - Return links. Default: False
|
||||
*/
|
||||
getBranchRefs(scopePath, project, includeDeleted, includeLinks) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (scopePath == null) {
|
||||
throw new TypeError('scopePath can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
scopePath: scopePath,
|
||||
includeDeleted: includeDeleted,
|
||||
includeLinks: includeLinks,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranchRef, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieve Tfvc changes for a given changeset.
|
||||
*
|
||||
* @param {number} id - ID of the changeset. Default: null
|
||||
* @param {number} skip - Number of results to skip. Default: null
|
||||
* @param {number} top - The maximum number of results to return. Default: null
|
||||
*/
|
||||
getChangesetChanges(id, skip, top) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
'$skip': skip,
|
||||
'$top': top,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "f32b86f2-15b9-4fe6-81b1-6f8938617ee5", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create a new changeset.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcChangeset} changeset
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createChangeset(changeset, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, changeset, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieve a Tfvc Changeset
|
||||
*
|
||||
* @param {number} id - Changeset Id to retrieve.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} maxChangeCount - Number of changes to return (maximum 100 changes) Default: 0
|
||||
* @param {boolean} includeDetails - Include policy details and check-in notes in the response. Default: false
|
||||
* @param {boolean} includeWorkItems - Include workitems. Default: false
|
||||
* @param {number} maxCommentLength - Include details about associated work items in the response. Default: null
|
||||
* @param {boolean} includeSourceRename - Include renames. Default: false
|
||||
* @param {number} skip - Number of results to skip. Default: null
|
||||
* @param {number} top - The maximum number of results to return. Default: null
|
||||
* @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.
|
||||
* @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null
|
||||
*/
|
||||
getChangeset(id, project, maxChangeCount, includeDetails, includeWorkItems, maxCommentLength, includeSourceRename, skip, top, orderby, searchCriteria) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
id: id
|
||||
};
|
||||
let queryValues = {
|
||||
maxChangeCount: maxChangeCount,
|
||||
includeDetails: includeDetails,
|
||||
includeWorkItems: includeWorkItems,
|
||||
maxCommentLength: maxCommentLength,
|
||||
includeSourceRename: includeSourceRename,
|
||||
'$skip': skip,
|
||||
'$top': top,
|
||||
'$orderby': orderby,
|
||||
searchCriteria: searchCriteria,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangeset, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieve Tfvc Changesets
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} maxCommentLength - Include details about associated work items in the response. Default: null
|
||||
* @param {number} skip - Number of results to skip. Default: null
|
||||
* @param {number} top - The maximum number of results to return. Default: null
|
||||
* @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.
|
||||
* @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null
|
||||
*/
|
||||
getChangesets(project, maxCommentLength, skip, top, orderby, searchCriteria) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
maxCommentLength: maxCommentLength,
|
||||
'$skip': skip,
|
||||
'$top': top,
|
||||
'$orderby': orderby,
|
||||
searchCriteria: searchCriteria,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Returns changesets for a given list of changeset Ids.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - List of changeset IDs.
|
||||
*/
|
||||
getBatchedChangesets(changesetsRequestData) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "b7e7c173-803c-4fea-9ec8-31ee35c5502a", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, changesetsRequestData, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves the work items associated with a particular changeset.
|
||||
*
|
||||
* @param {number} id - ID of the changeset. Default: null
|
||||
*/
|
||||
getChangesetWorkItems(id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
id: id
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getItemsBatch(itemRequestData, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, itemRequestData, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getItemsBatchZip(itemRequestData, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let apiVersion = verData.apiVersion;
|
||||
let accept = this.createAcceptHeader("application/zip", apiVersion);
|
||||
resolve((yield this.http.get(url, { "Accept": accept })).message);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItem(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
path: path,
|
||||
fileName: fileName,
|
||||
download: download,
|
||||
scopePath: scopePath,
|
||||
recursionLevel: recursionLevel,
|
||||
versionDescriptor: versionDescriptor,
|
||||
includeContent: includeContent,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItemContent(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
path: path,
|
||||
fileName: fileName,
|
||||
download: download,
|
||||
scopePath: scopePath,
|
||||
recursionLevel: recursionLevel,
|
||||
versionDescriptor: versionDescriptor,
|
||||
includeContent: includeContent,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let apiVersion = verData.apiVersion;
|
||||
let accept = this.createAcceptHeader("application/octet-stream", apiVersion);
|
||||
resolve((yield this.http.get(url, { "Accept": accept })).message);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a list of Tfvc items
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {boolean} includeLinks - True to include links.
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor
|
||||
*/
|
||||
getItems(project, scopePath, recursionLevel, includeLinks, versionDescriptor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
scopePath: scopePath,
|
||||
recursionLevel: recursionLevel,
|
||||
includeLinks: includeLinks,
|
||||
versionDescriptor: versionDescriptor,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItemText(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
path: path,
|
||||
fileName: fileName,
|
||||
download: download,
|
||||
scopePath: scopePath,
|
||||
recursionLevel: recursionLevel,
|
||||
versionDescriptor: versionDescriptor,
|
||||
includeContent: includeContent,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let apiVersion = verData.apiVersion;
|
||||
let accept = this.createAcceptHeader("text/plain", apiVersion);
|
||||
resolve((yield this.http.get(url, { "Accept": accept })).message);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
||||
*
|
||||
* @param {string} path - Version control path of an individual item to return.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} fileName - file name of item returned.
|
||||
* @param {boolean} download - If true, create a downloadable attachment.
|
||||
* @param {string} scopePath - Version control path of a folder to return multiple items.
|
||||
* @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder).
|
||||
* @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null.
|
||||
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
|
||||
*/
|
||||
getItemZip(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
path: path,
|
||||
fileName: fileName,
|
||||
download: download,
|
||||
scopePath: scopePath,
|
||||
recursionLevel: recursionLevel,
|
||||
versionDescriptor: versionDescriptor,
|
||||
includeContent: includeContent,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let apiVersion = verData.apiVersion;
|
||||
let accept = this.createAcceptHeader("application/zip", apiVersion);
|
||||
resolve((yield this.http.get(url, { "Accept": accept })).message);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get items under a label.
|
||||
*
|
||||
* @param {string} labelId - Unique identifier of label
|
||||
* @param {number} top - Max number of items to return
|
||||
* @param {number} skip - Number of items to skip
|
||||
*/
|
||||
getLabelItems(labelId, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
labelId: labelId
|
||||
};
|
||||
let queryValues = {
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "06166e34-de17-4b60-8cd1-23182a346fda", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a single deep label.
|
||||
*
|
||||
* @param {string} labelId - Unique identifier of label
|
||||
* @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getLabel(labelId, requestData, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestData == null) {
|
||||
throw new TypeError('requestData can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
labelId: labelId
|
||||
};
|
||||
let queryValues = {
|
||||
requestData: requestData,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabel, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a collection of shallow label references.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} top - Max number of labels to return
|
||||
* @param {number} skip - Number of labels to skip
|
||||
*/
|
||||
getLabels(requestData, project, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (requestData == null) {
|
||||
throw new TypeError('requestData can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
requestData: requestData,
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabelRef, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get changes included in a shelveset.
|
||||
*
|
||||
* @param {string} shelvesetId - Shelveset's unique ID
|
||||
* @param {number} top - Max number of changes to return
|
||||
* @param {number} skip - Number of changes to skip
|
||||
*/
|
||||
getShelvesetChanges(shelvesetId, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (shelvesetId == null) {
|
||||
throw new TypeError('shelvesetId can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
shelvesetId: shelvesetId,
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "dbaf075b-0445-4c34-9e5b-82292f856522", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get a single deep shelveset.
|
||||
*
|
||||
* @param {string} shelvesetId - Shelveset's unique ID
|
||||
* @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength
|
||||
*/
|
||||
getShelveset(shelvesetId, requestData) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (shelvesetId == null) {
|
||||
throw new TypeError('shelvesetId can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
shelvesetId: shelvesetId,
|
||||
requestData: requestData,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelveset, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Return a collection of shallow shelveset references.
|
||||
*
|
||||
* @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength
|
||||
* @param {number} top - Max number of shelvesets to return
|
||||
* @param {number} skip - Number of shelvesets to skip
|
||||
*/
|
||||
getShelvesets(requestData, top, skip) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
requestData: requestData,
|
||||
'$top': top,
|
||||
'$skip': skip,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelvesetRef, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get work items associated with a shelveset.
|
||||
*
|
||||
* @param {string} shelvesetId - Shelveset's unique ID
|
||||
*/
|
||||
getShelvesetWorkItems(shelvesetId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (shelvesetId == null) {
|
||||
throw new TypeError('shelvesetId can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {};
|
||||
let queryValues = {
|
||||
shelvesetId: shelvesetId,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "a7a0c1c1-373e-425a-b031-a519474d743d", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Provides File Count and Uncompressed Bytes for a Collection/Project at a particular scope for TFVC.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} scopePath - '$/' for collection, '$/project' for specific project
|
||||
*/
|
||||
getTfvcStatistics(project, scopePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
let queryValues = {
|
||||
scopePath: scopePath,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "tfvc", "e15c74c0-3605-40e0-aed4-4cc61e549ed8", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, null, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
TfvcApi.RESOURCE_AREA_ID = "8aa40520-446d-40e6-89f6-9c9f9ce44c48";
|
||||
exports.TfvcApi = TfvcApi;
|
||||
+686
@@ -0,0 +1,686 @@
|
||||
|
||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
||||
Do Not Translate or Localize
|
||||
|
||||
This Visual Studio Team Services extension (vsts-task-lib) is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Visual Studio Team Services extension. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
|
||||
|
||||
1. @types/events (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
|
||||
2. @types/glob (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
|
||||
3. @types/minimatch (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
|
||||
4. @types/node (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
|
||||
5. @types/shelljs (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
|
||||
6. balanced-match (git://github.com/juliangruber/balanced-match.git)
|
||||
7. brace-expansion (git://github.com/juliangruber/brace-expansion.git)
|
||||
8. concat-map (git://github.com/substack/node-concat-map.git)
|
||||
9. fs.realpath (git+https://github.com/isaacs/fs.realpath.git)
|
||||
10. glob (git://github.com/isaacs/node-glob.git)
|
||||
11. inflight (git+https://github.com/npm/inflight.git)
|
||||
12. inherits (git://github.com/isaacs/inherits.git)
|
||||
13. interpret (git://github.com/tkellen/node-interpret.git)
|
||||
14. minimatch (git://github.com/isaacs/minimatch.git)
|
||||
15. once (git://github.com/isaacs/once.git)
|
||||
16. path-is-absolute (git+https://github.com/sindresorhus/path-is-absolute.git)
|
||||
17. path-parse (git+https://github.com/jbgutierrez/path-parse.git)
|
||||
18. rechoir (git://github.com/tkellen/node-rechoir.git)
|
||||
19. resolve (git://github.com/browserify/node-resolve.git)
|
||||
20. shelljs (git://github.com/shelljs/shelljs.git)
|
||||
21. tunnel (git+https://github.com/koichik/node-tunnel.git)
|
||||
22. typed-rest-client (git+https://github.com/Microsoft/typed-rest-client.git)
|
||||
23. typescript (git+https://github.com/Microsoft/TypeScript.git)
|
||||
24. underscore (git://github.com/jashkenas/underscore.git)
|
||||
25. wrappy (git+https://github.com/npm/wrappy.git)
|
||||
|
||||
|
||||
%% @types/events NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
=========================================
|
||||
END OF @types/events NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% @types/glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
=========================================
|
||||
END OF @types/glob NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% @types/minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
=========================================
|
||||
END OF @types/minimatch NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% @types/node NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
=========================================
|
||||
END OF @types/node NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% @types/shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
=========================================
|
||||
END OF @types/shelljs NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% balanced-match NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
=========================================
|
||||
END OF balanced-match NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% brace-expansion NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
=========================================
|
||||
END OF brace-expansion NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% concat-map NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
This software is released under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF concat-map NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% fs.realpath NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
----
|
||||
|
||||
This library bundles a version of the `fs.realpath` and `fs.realpathSync`
|
||||
methods from Node.js v0.10 under the terms of the Node.js MIT license.
|
||||
|
||||
Node's license follows, also included at the header of `old.js` which contains
|
||||
the licensed code:
|
||||
|
||||
Copyright Joyent, Inc. and other Node contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF fs.realpath NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
=========================================
|
||||
END OF glob NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% inflight NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
=========================================
|
||||
END OF inflight NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% inherits NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
=========================================
|
||||
END OF inherits NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% interpret NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2014 Tyler Kellen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF interpret NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
=========================================
|
||||
END OF minimatch NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% once NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
=========================================
|
||||
END OF once NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% path-is-absolute NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
=========================================
|
||||
END OF path-is-absolute NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% path-parse NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
No license text available.
|
||||
=========================================
|
||||
END OF path-parse NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% rechoir NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2015 Tyler Kellen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF rechoir NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% resolve NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
This software is released under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF resolve NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2012, Artur Adib <arturadib@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
You may use this project under the terms of the New BSD license as follows:
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Artur Adib nor the
|
||||
names of the contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
=========================================
|
||||
END OF shelljs NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% tunnel NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012 Koichi Kobayashi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
=========================================
|
||||
END OF tunnel NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% typed-rest-client NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
Visual Studio Team Services Client for Node.js
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF typed-rest-client NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% typescript NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
Apache License
|
||||
|
||||
Version 2.0, January 2004
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
|
||||
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
|
||||
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
=========================================
|
||||
END OF typescript NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% underscore NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative
|
||||
Reporters & Editors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF underscore NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
%% wrappy NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
=========================================
|
||||
END OF wrappy NOTICES, INFORMATION, AND LICENSE
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
import * as restm from 'typed-rest-client/RestClient';
|
||||
import ifm = require("./interfaces/common/VsoBaseInterfaces");
|
||||
export interface ClientVersioningData {
|
||||
/**
|
||||
* The api version string to send in the request (e.g. "1.0" or "2.0-preview.2")
|
||||
*/
|
||||
apiVersion?: string;
|
||||
/**
|
||||
* The request path string to send the request to. Looked up via an options request with the location id.
|
||||
*/
|
||||
requestUrl?: string;
|
||||
}
|
||||
export declare class InvalidApiResourceVersionError implements Error {
|
||||
name: string;
|
||||
message: string;
|
||||
constructor(message?: string);
|
||||
}
|
||||
/**
|
||||
* Base class that should be used (derived from) to make requests to VSS REST apis
|
||||
*/
|
||||
export declare class VsoClient {
|
||||
private static APIS_RELATIVE_PATH;
|
||||
private static PREVIEW_INDICATOR;
|
||||
private _locationsByAreaPromises;
|
||||
private _initializationPromise;
|
||||
restClient: restm.RestClient;
|
||||
baseUrl: string;
|
||||
basePath: string;
|
||||
constructor(baseUrl: string, restClient: restm.RestClient);
|
||||
protected autoNegotiateApiVersion(location: ifm.ApiResourceLocation, requestedVersion: string): string;
|
||||
/**
|
||||
* Gets the route template for a resource based on its location ID and negotiates the api version
|
||||
*/
|
||||
getVersioningData(apiVersion: string, area: string, locationId: string, routeValues: any, queryParams?: any): Promise<ClientVersioningData>;
|
||||
/**
|
||||
* Sets a promise that is waited on before any requests are issued. Can be used to asynchronously
|
||||
* set the request url and auth token manager.
|
||||
*/
|
||||
_setInitializationPromise(promise: Promise<any>): void;
|
||||
/**
|
||||
* Gets information about an API resource location (route template, supported versions, etc.)
|
||||
*
|
||||
* @param area resource area name
|
||||
* @param locationId Guid of the location to get
|
||||
*/
|
||||
beginGetLocation(area: string, locationId: string): Promise<ifm.ApiResourceLocation>;
|
||||
private beginGetAreaLocations(area);
|
||||
resolveUrl(relativeUrl: string): string;
|
||||
private queryParamsToStringHelper(queryParams, prefix);
|
||||
private queryParamsToString(queryParams);
|
||||
protected getRequestUrl(routeTemplate: string, area: string, resource: string, routeValues: any, queryParams?: any): string;
|
||||
private replaceRouteValues(routeTemplate, routeValues);
|
||||
}
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
"use strict";
|
||||
//*******************************************************************************************************
|
||||
// significant portions of this file copied from: VSO\src\Vssf\WebPlatform\Platform\Scripts\VSS\WebApi\RestClient.ts
|
||||
//*******************************************************************************************************
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/// Imports of 3rd Party ///
|
||||
const url = require("url");
|
||||
const path = require("path");
|
||||
class InvalidApiResourceVersionError {
|
||||
constructor(message) {
|
||||
this.name = "Invalid resource version";
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
exports.InvalidApiResourceVersionError = InvalidApiResourceVersionError;
|
||||
/**
|
||||
* Base class that should be used (derived from) to make requests to VSS REST apis
|
||||
*/
|
||||
class VsoClient {
|
||||
constructor(baseUrl, restClient) {
|
||||
this.baseUrl = baseUrl;
|
||||
this.basePath = url.parse(baseUrl).pathname;
|
||||
this.restClient = restClient;
|
||||
this._locationsByAreaPromises = {};
|
||||
this._initializationPromise = Promise.resolve(true);
|
||||
}
|
||||
autoNegotiateApiVersion(location, requestedVersion) {
|
||||
let negotiatedVersion;
|
||||
let apiVersion;
|
||||
let apiVersionString;
|
||||
if (requestedVersion) {
|
||||
let apiVersionRegEx = new RegExp('(\\d+(\\.\\d+)?)(-preview(\\.(\\d+))?)?');
|
||||
// Need to handle 3 types of api versions + invalid apiversion
|
||||
// '2.1-preview.1' = ["2.1-preview.1", "2.1", ".1", -preview.1", ".1", "1"]
|
||||
// '2.1-preview' = ["2.1-preview", "2.1", ".1", "-preview", undefined, undefined]
|
||||
// '2.1' = ["2.1", "2.1", ".1", undefined, undefined, undefined]
|
||||
let isPreview = false;
|
||||
let resourceVersion;
|
||||
let regExExecArray = apiVersionRegEx.exec(requestedVersion);
|
||||
if (regExExecArray) {
|
||||
if (regExExecArray[1]) {
|
||||
// we have an api version
|
||||
apiVersion = +regExExecArray[1];
|
||||
apiVersionString = regExExecArray[1];
|
||||
if (regExExecArray[3]) {
|
||||
// requesting preview
|
||||
isPreview = true;
|
||||
if (regExExecArray[5]) {
|
||||
// we have a resource version
|
||||
resourceVersion = +regExExecArray[5];
|
||||
}
|
||||
}
|
||||
// compare the location version and requestedversion
|
||||
if (apiVersion <= +location.releasedVersion
|
||||
|| (!resourceVersion && apiVersion <= +location.maxVersion && isPreview)
|
||||
|| (resourceVersion && apiVersion <= +location.maxVersion && resourceVersion <= +location.resourceVersion)) {
|
||||
negotiatedVersion = requestedVersion;
|
||||
}
|
||||
// else fall back to latest version of the resource from location
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!negotiatedVersion) {
|
||||
// Use the latest version of the resource if the api version was not specified in the request or if the requested version is higher then the location's supported version
|
||||
if (apiVersion < +location.maxVersion) {
|
||||
negotiatedVersion = apiVersionString + "-preview";
|
||||
}
|
||||
else if (location.maxVersion === location.releasedVersion) {
|
||||
negotiatedVersion = location.maxVersion;
|
||||
}
|
||||
else {
|
||||
negotiatedVersion = location.maxVersion + "-preview." + location.resourceVersion;
|
||||
}
|
||||
}
|
||||
return negotiatedVersion;
|
||||
}
|
||||
/**
|
||||
* Gets the route template for a resource based on its location ID and negotiates the api version
|
||||
*/
|
||||
getVersioningData(apiVersion, area, locationId, routeValues, queryParams) {
|
||||
let requestUrl;
|
||||
return this.beginGetLocation(area, locationId)
|
||||
.then((location) => {
|
||||
if (!location) {
|
||||
throw new Error("Failed to find api location for area: " + area + " id: " + locationId);
|
||||
}
|
||||
apiVersion = this.autoNegotiateApiVersion(location, apiVersion);
|
||||
requestUrl = this.getRequestUrl(location.routeTemplate, location.area, location.resourceName, routeValues, queryParams);
|
||||
return {
|
||||
apiVersion: apiVersion,
|
||||
requestUrl: requestUrl
|
||||
};
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Sets a promise that is waited on before any requests are issued. Can be used to asynchronously
|
||||
* set the request url and auth token manager.
|
||||
*/
|
||||
_setInitializationPromise(promise) {
|
||||
if (promise) {
|
||||
this._initializationPromise = promise;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Gets information about an API resource location (route template, supported versions, etc.)
|
||||
*
|
||||
* @param area resource area name
|
||||
* @param locationId Guid of the location to get
|
||||
*/
|
||||
beginGetLocation(area, locationId) {
|
||||
return this._initializationPromise.then(() => {
|
||||
return this.beginGetAreaLocations(area);
|
||||
}).then((areaLocations) => {
|
||||
return areaLocations[(locationId || "").toLowerCase()];
|
||||
});
|
||||
}
|
||||
beginGetAreaLocations(area) {
|
||||
let areaLocationsPromise = this._locationsByAreaPromises[area];
|
||||
if (!areaLocationsPromise) {
|
||||
let requestUrl = this.resolveUrl(VsoClient.APIS_RELATIVE_PATH + "/" + area);
|
||||
areaLocationsPromise = this.restClient.options(requestUrl)
|
||||
.then((res) => {
|
||||
let locationsLookup = {};
|
||||
let resourceLocations = res.result.value;
|
||||
let i;
|
||||
for (i = 0; i < resourceLocations.length; i++) {
|
||||
let resourceLocation = resourceLocations[i];
|
||||
locationsLookup[resourceLocation.id.toLowerCase()] = resourceLocation;
|
||||
}
|
||||
// If we have completed successfully, cache the response.
|
||||
this._locationsByAreaPromises[area] = areaLocationsPromise;
|
||||
return locationsLookup;
|
||||
});
|
||||
}
|
||||
return areaLocationsPromise;
|
||||
}
|
||||
resolveUrl(relativeUrl) {
|
||||
return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl));
|
||||
}
|
||||
queryParamsToStringHelper(queryParams, prefix) {
|
||||
if (!queryParams) {
|
||||
return '';
|
||||
}
|
||||
let queryString = '';
|
||||
if (typeof (queryParams) !== 'string') {
|
||||
for (let property in queryParams) {
|
||||
if (queryParams.hasOwnProperty(property)) {
|
||||
const prop = queryParams[property];
|
||||
const newPrefix = prefix + encodeURIComponent(property.toString()) + '.';
|
||||
queryString += this.queryParamsToStringHelper(prop, newPrefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (queryString === '' && prefix.length > 0) {
|
||||
// Date.prototype.toString() returns a string that is not valid for the REST API.
|
||||
// Need to specially call `toUTCString()` instead for such cases
|
||||
const queryValue = typeof queryParams === 'object' && 'toUTCString' in queryParams ? queryParams.toUTCString() : queryParams.toString();
|
||||
// Will always need to chop period off of end of prefix
|
||||
queryString = prefix.slice(0, -1) + '=' + encodeURIComponent(queryValue) + '&';
|
||||
}
|
||||
return queryString;
|
||||
}
|
||||
queryParamsToString(queryParams) {
|
||||
const queryString = '?' + this.queryParamsToStringHelper(queryParams, '');
|
||||
// Will always need to slice either a ? or & off of the end
|
||||
return queryString.slice(0, -1);
|
||||
}
|
||||
getRequestUrl(routeTemplate, area, resource, routeValues, queryParams) {
|
||||
// Add area/resource route values (based on the location)
|
||||
routeValues = routeValues || {};
|
||||
if (!routeValues.area) {
|
||||
routeValues.area = area;
|
||||
}
|
||||
if (!routeValues.resource) {
|
||||
routeValues.resource = resource;
|
||||
}
|
||||
// Replace templated route values
|
||||
let relativeUrl = this.replaceRouteValues(routeTemplate, routeValues);
|
||||
// Append query parameters to the end
|
||||
if (queryParams) {
|
||||
relativeUrl += this.queryParamsToString(queryParams);
|
||||
}
|
||||
// Resolve the relative url with the base
|
||||
return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl));
|
||||
}
|
||||
// helper method copied directly from VSS\WebAPI\restclient.ts
|
||||
replaceRouteValues(routeTemplate, routeValues) {
|
||||
let result = "", currentPathPart = "", paramName = "", insideParam = false, charIndex, routeTemplateLength = routeTemplate.length, c;
|
||||
for (charIndex = 0; charIndex < routeTemplateLength; charIndex++) {
|
||||
c = routeTemplate[charIndex];
|
||||
if (insideParam) {
|
||||
if (c == "}") {
|
||||
insideParam = false;
|
||||
if (routeValues[paramName]) {
|
||||
currentPathPart += encodeURIComponent(routeValues[paramName]);
|
||||
}
|
||||
else {
|
||||
// Normalize param name in order to capture wild-card routes
|
||||
let strippedParamName = paramName.replace(/[^a-z0-9]/ig, '');
|
||||
if (routeValues[strippedParamName]) {
|
||||
currentPathPart += encodeURIComponent(routeValues[strippedParamName]);
|
||||
}
|
||||
}
|
||||
paramName = "";
|
||||
}
|
||||
else {
|
||||
paramName += c;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (c == "/") {
|
||||
if (currentPathPart) {
|
||||
if (result) {
|
||||
result += "/";
|
||||
}
|
||||
result += currentPathPart;
|
||||
currentPathPart = "";
|
||||
}
|
||||
}
|
||||
else if (c == "{") {
|
||||
if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "{") {
|
||||
// Escaped '{'
|
||||
currentPathPart += c;
|
||||
charIndex++;
|
||||
}
|
||||
else {
|
||||
insideParam = true;
|
||||
}
|
||||
}
|
||||
else if (c == '}') {
|
||||
currentPathPart += c;
|
||||
if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "}") {
|
||||
// Escaped '}'
|
||||
charIndex++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
currentPathPart += c;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentPathPart) {
|
||||
if (result) {
|
||||
result += "/";
|
||||
}
|
||||
result += currentPathPart;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
VsoClient.APIS_RELATIVE_PATH = "_apis";
|
||||
VsoClient.PREVIEW_INDICATOR = "-preview.";
|
||||
exports.VsoClient = VsoClient;
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import buildm = require('./BuildApi');
|
||||
import corem = require('./CoreApi');
|
||||
import dashboardm = require('./DashboardApi');
|
||||
import extmgmtm = require("./ExtensionManagementApi");
|
||||
import featuremgmtm = require("./FeatureManagementApi");
|
||||
import filecontainerm = require('./FileContainerApi');
|
||||
import gallerym = require('./GalleryApi');
|
||||
import gitm = require('./GitApi');
|
||||
import locationsm = require('./LocationsApi');
|
||||
import notificationm = require('./NotificationApi');
|
||||
import policym = require('./PolicyApi');
|
||||
import profilem = require('./ProfileApi');
|
||||
import projectm = require('./ProjectAnalysisApi');
|
||||
import releasem = require('./ReleaseApi');
|
||||
import securityrolesm = require('./SecurityRolesApi');
|
||||
import taskagentm = require('./TaskAgentApi');
|
||||
import taskm = require('./TaskApi');
|
||||
import testm = require('./TestApi');
|
||||
import tfvcm = require('./TfvcApi');
|
||||
import wikim = require('./WikiApi');
|
||||
import workm = require('./WorkApi');
|
||||
import workitemtrackingm = require('./WorkItemTrackingApi');
|
||||
import workitemtrackingprocessm = require('./WorkItemTrackingProcessApi');
|
||||
import workitemtrackingprocessdefinitionm = require('./WorkItemTrackingProcessDefinitionsApi');
|
||||
import * as rm from 'typed-rest-client/RestClient';
|
||||
import vsom = require('./VsoClient');
|
||||
import lim = require("./interfaces/LocationsInterfaces");
|
||||
/**
|
||||
* Methods to return handler objects (see handlers folder)
|
||||
*/
|
||||
export declare function getBasicHandler(username: string, password: string): VsoBaseInterfaces.IRequestHandler;
|
||||
export declare function getNtlmHandler(username: string, password: string, workstation?: string, domain?: string): VsoBaseInterfaces.IRequestHandler;
|
||||
export declare function getBearerHandler(token: string): VsoBaseInterfaces.IRequestHandler;
|
||||
export declare function getPersonalAccessTokenHandler(token: string): VsoBaseInterfaces.IRequestHandler;
|
||||
export declare function getHandlerFromToken(token: string): VsoBaseInterfaces.IRequestHandler;
|
||||
export interface IWebApiRequestSettings {
|
||||
productName: string;
|
||||
productVersion: string;
|
||||
}
|
||||
export declare class WebApi {
|
||||
serverUrl: string;
|
||||
authHandler: VsoBaseInterfaces.IRequestHandler;
|
||||
rest: rm.RestClient;
|
||||
vsoClient: vsom.VsoClient;
|
||||
options: VsoBaseInterfaces.IRequestOptions;
|
||||
private _resourceAreas;
|
||||
constructor(defaultUrl: string, authHandler: VsoBaseInterfaces.IRequestHandler, options?: VsoBaseInterfaces.IRequestOptions, requestSettings?: IWebApiRequestSettings);
|
||||
/**
|
||||
* Convenience factory to create with a bearer token.
|
||||
* @param defaultServerUrl default server url to use when creating new apis from factory methods
|
||||
* @param defaultAuthHandler default authentication credentials to use when creating new apis from factory methods
|
||||
*/
|
||||
static createWithBearerToken(defaultUrl: string, token: string, options?: VsoBaseInterfaces.IRequestOptions): WebApi;
|
||||
connect(): Promise<lim.ConnectionData>;
|
||||
/**
|
||||
* Each factory method can take a serverUrl and a list of handlers
|
||||
* if these aren't provided, the default url and auth handler given to the constructor for this class will be used
|
||||
*/
|
||||
getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<buildm.IBuildApi>;
|
||||
getCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<corem.ICoreApi>;
|
||||
getDashboardApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<dashboardm.IDashboardApi>;
|
||||
getExtensionManagementApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<extmgmtm.IExtensionManagementApi>;
|
||||
getFeatureManagementApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<featuremgmtm.IFeatureManagementApi>;
|
||||
getFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<filecontainerm.IFileContainerApi>;
|
||||
getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<gallerym.IGalleryApi>;
|
||||
getGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<gitm.IGitApi>;
|
||||
getLocationsApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<locationsm.ILocationsApi>;
|
||||
getNotificationApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<notificationm.INotificationApi>;
|
||||
getPolicyApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<policym.IPolicyApi>;
|
||||
getProfileApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<profilem.IProfileApi>;
|
||||
getProjectAnalysisApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<projectm.IProjectAnalysisApi>;
|
||||
getSecurityRolesApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<securityrolesm.ISecurityRolesApi>;
|
||||
getReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<releasem.IReleaseApi>;
|
||||
getTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<taskm.ITaskApi>;
|
||||
getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<taskagentm.ITaskAgentApi>;
|
||||
getTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<testm.ITestApi>;
|
||||
getTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<tfvcm.ITfvcApi>;
|
||||
getWikiApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<wikim.IWikiApi>;
|
||||
getWorkApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workm.IWorkApi>;
|
||||
getWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workitemtrackingm.IWorkItemTrackingApi>;
|
||||
getWorkItemTrackingProcessApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workitemtrackingprocessm.IWorkItemTrackingProcessApi>;
|
||||
getWorkItemTrackingProcessDefinitionApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workitemtrackingprocessdefinitionm.IWorkItemTrackingProcessDefinitionsApi>;
|
||||
/**
|
||||
* Determines if the domain is exluded for proxy via the no_proxy env var
|
||||
* @param url: the server url
|
||||
*/
|
||||
isNoProxyHost: (_url: string) => boolean;
|
||||
private _getResourceAreaUrl(serverUrl, resourceId);
|
||||
private _getResourceAreas();
|
||||
private _readTaskLibSecrets(lookupKey);
|
||||
}
|
||||
+419
@@ -0,0 +1,419 @@
|
||||
"use strict";
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const buildm = require("./BuildApi");
|
||||
const corem = require("./CoreApi");
|
||||
const dashboardm = require("./DashboardApi");
|
||||
const extmgmtm = require("./ExtensionManagementApi");
|
||||
const featuremgmtm = require("./FeatureManagementApi");
|
||||
const filecontainerm = require("./FileContainerApi");
|
||||
const gallerym = require("./GalleryApi");
|
||||
const gitm = require("./GitApi");
|
||||
const locationsm = require("./LocationsApi");
|
||||
const notificationm = require("./NotificationApi");
|
||||
const policym = require("./PolicyApi");
|
||||
const profilem = require("./ProfileApi");
|
||||
const projectm = require("./ProjectAnalysisApi");
|
||||
const releasem = require("./ReleaseApi");
|
||||
const securityrolesm = require("./SecurityRolesApi");
|
||||
const taskagentm = require("./TaskAgentApi");
|
||||
const taskm = require("./TaskApi");
|
||||
const testm = require("./TestApi");
|
||||
const tfvcm = require("./TfvcApi");
|
||||
const wikim = require("./WikiApi");
|
||||
const workm = require("./WorkApi");
|
||||
const workitemtrackingm = require("./WorkItemTrackingApi");
|
||||
const workitemtrackingprocessm = require("./WorkItemTrackingProcessApi");
|
||||
const workitemtrackingprocessdefinitionm = require("./WorkItemTrackingProcessDefinitionsApi");
|
||||
const basicm = require("./handlers/basiccreds");
|
||||
const bearm = require("./handlers/bearertoken");
|
||||
const ntlmm = require("./handlers/ntlm");
|
||||
const patm = require("./handlers/personalaccesstoken");
|
||||
const rm = require("typed-rest-client/RestClient");
|
||||
const vsom = require("./VsoClient");
|
||||
const crypto = require("crypto");
|
||||
const fs = require("fs");
|
||||
const os = require("os");
|
||||
const url = require("url");
|
||||
const path = require("path");
|
||||
/**
|
||||
* Methods to return handler objects (see handlers folder)
|
||||
*/
|
||||
function getBasicHandler(username, password) {
|
||||
return new basicm.BasicCredentialHandler(username, password);
|
||||
}
|
||||
exports.getBasicHandler = getBasicHandler;
|
||||
function getNtlmHandler(username, password, workstation, domain) {
|
||||
return new ntlmm.NtlmCredentialHandler(username, password, workstation, domain);
|
||||
}
|
||||
exports.getNtlmHandler = getNtlmHandler;
|
||||
function getBearerHandler(token) {
|
||||
return new bearm.BearerCredentialHandler(token);
|
||||
}
|
||||
exports.getBearerHandler = getBearerHandler;
|
||||
function getPersonalAccessTokenHandler(token) {
|
||||
return new patm.PersonalAccessTokenCredentialHandler(token);
|
||||
}
|
||||
exports.getPersonalAccessTokenHandler = getPersonalAccessTokenHandler;
|
||||
function getHandlerFromToken(token) {
|
||||
if (token.length === 52) {
|
||||
return getPersonalAccessTokenHandler(token);
|
||||
}
|
||||
else {
|
||||
return getBearerHandler(token);
|
||||
}
|
||||
}
|
||||
exports.getHandlerFromToken = getHandlerFromToken;
|
||||
;
|
||||
// ---------------------------------------------------------------------------
|
||||
// Factory to return client apis
|
||||
// When new APIs are added, a method must be added here to instantiate the API
|
||||
//----------------------------------------------------------------------------
|
||||
class WebApi {
|
||||
/*
|
||||
* Factory to return client apis and handlers
|
||||
* @param defaultUrl default server url to use when creating new apis from factory methods
|
||||
* @param authHandler default authentication credentials to use when creating new apis from factory methods
|
||||
*/
|
||||
constructor(defaultUrl, authHandler, options, requestSettings) {
|
||||
/**
|
||||
* Determines if the domain is exluded for proxy via the no_proxy env var
|
||||
* @param url: the server url
|
||||
*/
|
||||
this.isNoProxyHost = function (_url) {
|
||||
if (!process.env.no_proxy) {
|
||||
return false;
|
||||
}
|
||||
const noProxyDomains = (process.env.no_proxy || '')
|
||||
.split(',')
|
||||
.map(v => v.toLowerCase());
|
||||
const serverUrl = url.parse(_url).host.toLowerCase();
|
||||
// return true if the no_proxy includes the host
|
||||
return noProxyDomains.indexOf(serverUrl) !== -1;
|
||||
};
|
||||
this.serverUrl = defaultUrl;
|
||||
this.authHandler = authHandler;
|
||||
this.options = options || {};
|
||||
if (!this.isNoProxyHost(this.serverUrl)) {
|
||||
// try to get proxy setting from environment variable set by VSTS-Task-Lib if there is no proxy setting in the options
|
||||
if (!this.options.proxy || !this.options.proxy.proxyUrl) {
|
||||
if (global['_vsts_task_lib_proxy']) {
|
||||
let proxyFromEnv = {
|
||||
proxyUrl: global['_vsts_task_lib_proxy_url'],
|
||||
proxyUsername: global['_vsts_task_lib_proxy_username'],
|
||||
proxyPassword: this._readTaskLibSecrets(global['_vsts_task_lib_proxy_password']),
|
||||
proxyBypassHosts: JSON.parse(global['_vsts_task_lib_proxy_bypass'] || "[]"),
|
||||
};
|
||||
this.options.proxy = proxyFromEnv;
|
||||
}
|
||||
}
|
||||
}
|
||||
// try get cert setting from environment variable set by VSTS-Task-Lib if there is no cert setting in the options
|
||||
if (!this.options.cert) {
|
||||
if (global['_vsts_task_lib_cert']) {
|
||||
let certFromEnv = {
|
||||
caFile: global['_vsts_task_lib_cert_ca'],
|
||||
certFile: global['_vsts_task_lib_cert_clientcert'],
|
||||
keyFile: global['_vsts_task_lib_cert_key'],
|
||||
passphrase: this._readTaskLibSecrets(global['_vsts_task_lib_cert_passphrase']),
|
||||
};
|
||||
this.options.cert = certFromEnv;
|
||||
}
|
||||
}
|
||||
// try get ignore SSL error setting from environment variable set by VSTS-Task-Lib if there is no ignore SSL error setting in the options
|
||||
if (!this.options.ignoreSslError) {
|
||||
this.options.ignoreSslError = !!global['_vsts_task_lib_skip_cert_validation'];
|
||||
}
|
||||
let userAgent;
|
||||
const nodeApiName = 'azure-devops-node-api';
|
||||
const nodeApiVersion = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json'), 'utf8')).version;
|
||||
const osName = os.platform();
|
||||
const osVersion = os.release();
|
||||
if (requestSettings) {
|
||||
userAgent = `${requestSettings.productName}/${requestSettings.productVersion} (${nodeApiName} ${nodeApiVersion}; ${osName} ${osVersion})`;
|
||||
}
|
||||
else {
|
||||
userAgent = `${nodeApiName}/${nodeApiVersion} (${osName} ${osVersion})`;
|
||||
}
|
||||
this.rest = new rm.RestClient(userAgent, null, [this.authHandler], this.options);
|
||||
this.vsoClient = new vsom.VsoClient(defaultUrl, this.rest);
|
||||
}
|
||||
/**
|
||||
* Convenience factory to create with a bearer token.
|
||||
* @param defaultServerUrl default server url to use when creating new apis from factory methods
|
||||
* @param defaultAuthHandler default authentication credentials to use when creating new apis from factory methods
|
||||
*/
|
||||
static createWithBearerToken(defaultUrl, token, options) {
|
||||
let bearerHandler = getBearerHandler(token);
|
||||
return new this(defaultUrl, bearerHandler, options);
|
||||
}
|
||||
connect() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
let res;
|
||||
res = yield this.rest.get(this.vsoClient.resolveUrl('/_apis/connectionData'));
|
||||
resolve(res.result);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Each factory method can take a serverUrl and a list of handlers
|
||||
* if these aren't provided, the default url and auth handler given to the constructor for this class will be used
|
||||
*/
|
||||
getBuildApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, buildm.BuildApi.RESOURCE_AREA_ID);
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new buildm.BuildApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getCoreApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "79134c72-4a58-4b42-976c-04e7115f32bf");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new corem.CoreApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getDashboardApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "31c84e0a-3ece-48fd-a29d-100849af99ba");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new dashboardm.DashboardApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getExtensionManagementApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "6c2b0933-3600-42ae-bf8b-93d4f7e83594");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new extmgmtm.ExtensionManagementApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getFeatureManagementApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new featuremgmtm.FeatureManagementApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getFileContainerApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new filecontainerm.FileContainerApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getGalleryApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gallerym.GalleryApi.RESOURCE_AREA_ID);
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new gallerym.GalleryApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getGitApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gitm.GitApi.RESOURCE_AREA_ID);
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new gitm.GitApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
// TODO: Don't call resource area here? Will cause infinite loop?
|
||||
getLocationsApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let optionsClone = Object.assign({}, this.options);
|
||||
optionsClone.allowRetries = true;
|
||||
optionsClone.maxRetries = 5;
|
||||
serverUrl = (yield serverUrl) || this.serverUrl;
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new locationsm.LocationsApi(serverUrl, handlers, optionsClone);
|
||||
});
|
||||
}
|
||||
getNotificationApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new notificationm.NotificationApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getPolicyApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "fb13a388-40dd-4a04-b530-013a739c72ef");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new policym.PolicyApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getProfileApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8ccfef3d-2b87-4e99-8ccb-66e343d2daa8");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new profilem.ProfileApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getProjectAnalysisApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "7658fa33-b1bf-4580-990f-fac5896773d3");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new projectm.ProjectAnalysisApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getSecurityRolesApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new securityrolesm.SecurityRolesApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getReleaseApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "efc2f575-36ef-48e9-b672-0c6fb4a48ac5");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new releasem.ReleaseApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getTaskApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new taskm.TaskApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getTaskAgentApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new taskagentm.TaskAgentApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getTestApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new testm.TestApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getTfvcApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8aa40520-446d-40e6-89f6-9c9f9ce44c48");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new tfvcm.TfvcApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getWikiApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new wikim.WikiApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getWorkApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new workm.WorkApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getWorkItemTrackingApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, workitemtrackingm.WorkItemTrackingApi.RESOURCE_AREA_ID);
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new workitemtrackingm.WorkItemTrackingApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getWorkItemTrackingProcessApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new workitemtrackingprocessm.WorkItemTrackingProcessApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
getWorkItemTrackingProcessDefinitionApi(serverUrl, handlers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// TODO: Load RESOURCE_AREA_ID correctly.
|
||||
serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5");
|
||||
handlers = handlers || [this.authHandler];
|
||||
return new workitemtrackingprocessdefinitionm.WorkItemTrackingProcessDefinitionsApi(serverUrl, handlers, this.options);
|
||||
});
|
||||
}
|
||||
_getResourceAreaUrl(serverUrl, resourceId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!resourceId) {
|
||||
return serverUrl;
|
||||
}
|
||||
// This must be of type any, see comment just below.
|
||||
const resourceAreas = yield this._getResourceAreas();
|
||||
if (resourceAreas === undefined) {
|
||||
throw new Error((`Failed to retrieve resource areas ' + 'from server: ${serverUrl}`));
|
||||
}
|
||||
// The response type differs based on whether or not there are resource areas. When we are on prem we get:
|
||||
// {"count":0,"value":null} and when we are on VSTS we get an array of resource areas.
|
||||
// Due to this strangeness the type of resourceAreas needs to be any and we need to check .count
|
||||
// When going against vsts count will be undefined. On prem it will be 0
|
||||
if (!resourceAreas || resourceAreas.length === 0 || resourceAreas.count === 0) {
|
||||
// For on prem environments we get an empty list
|
||||
return serverUrl;
|
||||
}
|
||||
for (var resourceArea of resourceAreas) {
|
||||
if (resourceArea.id.toLowerCase() === resourceId.toLowerCase()) {
|
||||
return resourceArea.locationUrl;
|
||||
}
|
||||
}
|
||||
throw new Error((`Could not find information for resource area ${resourceId} ' + 'from server: ${serverUrl}`));
|
||||
});
|
||||
}
|
||||
_getResourceAreas() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!this._resourceAreas) {
|
||||
const locationClient = yield this.getLocationsApi();
|
||||
this._resourceAreas = yield locationClient.getResourceAreas();
|
||||
}
|
||||
return this._resourceAreas;
|
||||
});
|
||||
}
|
||||
_readTaskLibSecrets(lookupKey) {
|
||||
// the lookupKey should has following format
|
||||
// base64encoded<keyFilePath>:base64encoded<encryptedContent>
|
||||
if (lookupKey && lookupKey.indexOf(':') > 0) {
|
||||
let lookupInfo = lookupKey.split(':', 2);
|
||||
// file contains encryption key
|
||||
let keyFile = new Buffer(lookupInfo[0], 'base64').toString('utf8');
|
||||
let encryptKey = new Buffer(fs.readFileSync(keyFile, 'utf8'), 'base64');
|
||||
let encryptedContent = new Buffer(lookupInfo[1], 'base64').toString('utf8');
|
||||
let decipher = crypto.createDecipher("aes-256-ctr", encryptKey);
|
||||
let decryptedContent = decipher.update(encryptedContent, 'hex', 'utf8');
|
||||
decryptedContent += decipher.final('utf8');
|
||||
return decryptedContent;
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.WebApi = WebApi;
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
/// <reference types="node" />
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import GitInterfaces = require("./interfaces/GitInterfaces");
|
||||
import WikiInterfaces = require("./interfaces/WikiInterfaces");
|
||||
export interface IWikiApi extends basem.ClientApiBase {
|
||||
getPageText(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
getPageZip(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
createOrUpdatePageViewStats(project: string, wikiIdentifier: string, wikiVersion: GitInterfaces.GitVersionDescriptor, path: string, oldPath?: string): Promise<WikiInterfaces.WikiPageViewStats>;
|
||||
createWiki(wikiCreateParams: WikiInterfaces.WikiCreateParametersV2, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
deleteWiki(wikiIdentifier: string, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
getAllWikis(project?: string): Promise<WikiInterfaces.WikiV2[]>;
|
||||
getWiki(wikiIdentifier: string, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
updateWiki(updateParameters: WikiInterfaces.WikiUpdateParameters, wikiIdentifier: string, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
}
|
||||
export declare class WikiApi extends basem.ClientApiBase implements IWikiApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} wikiIdentifier - Wiki Id or name.
|
||||
* @param {string} path - Wiki page path.
|
||||
* @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional).
|
||||
* @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional).
|
||||
* @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional)
|
||||
*/
|
||||
getPageText(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} wikiIdentifier - Wiki Id or name.
|
||||
* @param {string} path - Wiki page path.
|
||||
* @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional).
|
||||
* @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional).
|
||||
* @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional)
|
||||
*/
|
||||
getPageZip(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Creates a new page view stats resource or updates an existing page view stats resource.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} wikiIdentifier - Wiki name or Id.
|
||||
* @param {GitInterfaces.GitVersionDescriptor} wikiVersion - Wiki version.
|
||||
* @param {string} path - Wiki page path.
|
||||
* @param {string} oldPath - Old page path. This is optional and required to rename path in existing page view stats.
|
||||
*/
|
||||
createOrUpdatePageViewStats(project: string, wikiIdentifier: string, wikiVersion: GitInterfaces.GitVersionDescriptor, path: string, oldPath?: string): Promise<WikiInterfaces.WikiPageViewStats>;
|
||||
/**
|
||||
* Creates the wiki resource.
|
||||
*
|
||||
* @param {WikiInterfaces.WikiCreateParametersV2} wikiCreateParams - Parameters for the wiki creation.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createWiki(wikiCreateParams: WikiInterfaces.WikiCreateParametersV2, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
/**
|
||||
* Deletes the wiki corresponding to the wiki name or Id provided.
|
||||
*
|
||||
* @param {string} wikiIdentifier - Wiki name or Id.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
deleteWiki(wikiIdentifier: string, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
/**
|
||||
* Gets all wikis in a project or collection.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getAllWikis(project?: string): Promise<WikiInterfaces.WikiV2[]>;
|
||||
/**
|
||||
* Gets the wiki corresponding to the wiki name or Id provided.
|
||||
*
|
||||
* @param {string} wikiIdentifier - Wiki name or id.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWiki(wikiIdentifier: string, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
/**
|
||||
* Updates the wiki corresponding to the wiki Id or name provided using the update parameters.
|
||||
*
|
||||
* @param {WikiInterfaces.WikiUpdateParameters} updateParameters - Update parameters.
|
||||
* @param {string} wikiIdentifier - Wiki name or Id.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateWiki(updateParameters: WikiInterfaces.WikiUpdateParameters, wikiIdentifier: string, project?: string): Promise<WikiInterfaces.WikiV2>;
|
||||
}
|
||||
+280
@@ -0,0 +1,280 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const basem = require("./ClientApiBases");
|
||||
const WikiInterfaces = require("./interfaces/WikiInterfaces");
|
||||
class WikiApi extends basem.ClientApiBase {
|
||||
constructor(baseUrl, handlers, options) {
|
||||
super(baseUrl, handlers, 'node-Wiki-api', options);
|
||||
}
|
||||
/**
|
||||
* Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} wikiIdentifier - Wiki Id or name.
|
||||
* @param {string} path - Wiki page path.
|
||||
* @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional).
|
||||
* @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional).
|
||||
* @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional)
|
||||
*/
|
||||
getPageText(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
wikiIdentifier: wikiIdentifier
|
||||
};
|
||||
let queryValues = {
|
||||
path: path,
|
||||
recursionLevel: recursionLevel,
|
||||
versionDescriptor: versionDescriptor,
|
||||
includeContent: includeContent,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let apiVersion = verData.apiVersion;
|
||||
let accept = this.createAcceptHeader("text/plain", apiVersion);
|
||||
resolve((yield this.http.get(url, { "Accept": accept })).message);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} wikiIdentifier - Wiki Id or name.
|
||||
* @param {string} path - Wiki page path.
|
||||
* @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional).
|
||||
* @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional).
|
||||
* @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional)
|
||||
*/
|
||||
getPageZip(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
wikiIdentifier: wikiIdentifier
|
||||
};
|
||||
let queryValues = {
|
||||
path: path,
|
||||
recursionLevel: recursionLevel,
|
||||
versionDescriptor: versionDescriptor,
|
||||
includeContent: includeContent,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let apiVersion = verData.apiVersion;
|
||||
let accept = this.createAcceptHeader("application/zip", apiVersion);
|
||||
resolve((yield this.http.get(url, { "Accept": accept })).message);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Creates a new page view stats resource or updates an existing page view stats resource.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} wikiIdentifier - Wiki name or Id.
|
||||
* @param {GitInterfaces.GitVersionDescriptor} wikiVersion - Wiki version.
|
||||
* @param {string} path - Wiki page path.
|
||||
* @param {string} oldPath - Old page path. This is optional and required to rename path in existing page view stats.
|
||||
*/
|
||||
createOrUpdatePageViewStats(project, wikiIdentifier, wikiVersion, path, oldPath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (wikiVersion == null) {
|
||||
throw new TypeError('wikiVersion can not be null or undefined');
|
||||
}
|
||||
if (path == null) {
|
||||
throw new TypeError('path can not be null or undefined');
|
||||
}
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
wikiIdentifier: wikiIdentifier
|
||||
};
|
||||
let queryValues = {
|
||||
wikiVersion: wikiVersion,
|
||||
path: path,
|
||||
oldPath: oldPath,
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.1", "wiki", "1087b746-5d15-41b9-bea6-14e325e7f880", routeValues, queryValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, null, options);
|
||||
let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageViewStats, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Creates the wiki resource.
|
||||
*
|
||||
* @param {WikiInterfaces.WikiCreateParametersV2} wikiCreateParams - Parameters for the wiki creation.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createWiki(wikiCreateParams, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.create(url, wikiCreateParams, options);
|
||||
let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Deletes the wiki corresponding to the wiki name or Id provided.
|
||||
*
|
||||
* @param {string} wikiIdentifier - Wiki name or Id.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
deleteWiki(wikiIdentifier, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
wikiIdentifier: wikiIdentifier
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.del(url, options);
|
||||
let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets all wikis in a project or collection.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getAllWikis(project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, true);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets the wiki corresponding to the wiki name or Id provided.
|
||||
*
|
||||
* @param {string} wikiIdentifier - Wiki name or id.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWiki(wikiIdentifier, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
wikiIdentifier: wikiIdentifier
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.get(url, options);
|
||||
let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Updates the wiki corresponding to the wiki Id or name provided using the update parameters.
|
||||
*
|
||||
* @param {WikiInterfaces.WikiUpdateParameters} updateParameters - Update parameters.
|
||||
* @param {string} wikiIdentifier - Wiki name or Id.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateWiki(updateParameters, wikiIdentifier, project) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||
let routeValues = {
|
||||
project: project,
|
||||
wikiIdentifier: wikiIdentifier
|
||||
};
|
||||
try {
|
||||
let verData = yield this.vsoClient.getVersioningData("5.0-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues);
|
||||
let url = verData.requestUrl;
|
||||
let options = this.createRequestOptions('application/json', verData.apiVersion);
|
||||
let res;
|
||||
res = yield this.rest.update(url, updateParameters, options);
|
||||
let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false);
|
||||
resolve(ret);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
WikiApi.RESOURCE_AREA_ID = "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3";
|
||||
exports.WikiApi = WikiApi;
|
||||
+392
@@ -0,0 +1,392 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
|
||||
import WorkInterfaces = require("./interfaces/WorkInterfaces");
|
||||
export interface IWorkApi extends basem.ClientApiBase {
|
||||
getBacklogConfigurations(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.BacklogConfiguration>;
|
||||
getBacklogLevelWorkItems(teamContext: TfsCoreInterfaces.TeamContext, backlogId: string): Promise<WorkInterfaces.BacklogLevelWorkItems>;
|
||||
getBacklog(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<WorkInterfaces.BacklogLevelConfiguration>;
|
||||
getBacklogs(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.BacklogLevelConfiguration[]>;
|
||||
getColumnSuggestedValues(project?: string): Promise<WorkInterfaces.BoardSuggestedValue[]>;
|
||||
getBoardMappingParentItems(teamContext: TfsCoreInterfaces.TeamContext, childBacklogContextCategoryRefName: string, workitemIds: number[]): Promise<WorkInterfaces.ParentChildWIMap[]>;
|
||||
getRowSuggestedValues(project?: string): Promise<WorkInterfaces.BoardSuggestedValue[]>;
|
||||
getBoard(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<WorkInterfaces.Board>;
|
||||
getBoards(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.BoardReference[]>;
|
||||
setBoardOptions(options: {
|
||||
[key: string]: string;
|
||||
}, teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<{
|
||||
[key: string]: string;
|
||||
}>;
|
||||
getBoardUserSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardUserSettings>;
|
||||
updateBoardUserSettings(boardUserSettings: {
|
||||
[key: string]: string;
|
||||
}, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardUserSettings>;
|
||||
getCapacities(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamMemberCapacity[]>;
|
||||
getCapacity(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise<WorkInterfaces.TeamMemberCapacity>;
|
||||
replaceCapacities(capacities: WorkInterfaces.TeamMemberCapacity[], teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamMemberCapacity[]>;
|
||||
updateCapacity(patch: WorkInterfaces.CapacityPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise<WorkInterfaces.TeamMemberCapacity>;
|
||||
getBoardCardRuleSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardRuleSettings>;
|
||||
updateBoardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardRuleSettings>;
|
||||
getBoardCardSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardSettings>;
|
||||
updateBoardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardSettings>;
|
||||
getBoardChart(teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise<WorkInterfaces.BoardChart>;
|
||||
getBoardCharts(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardChartReference[]>;
|
||||
updateBoardChart(chart: WorkInterfaces.BoardChart, teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise<WorkInterfaces.BoardChart>;
|
||||
getBoardColumns(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardColumn[]>;
|
||||
updateBoardColumns(boardColumns: WorkInterfaces.BoardColumn[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardColumn[]>;
|
||||
getDeliveryTimelineData(project: string, id: string, revision?: number, startDate?: Date, endDate?: Date): Promise<WorkInterfaces.DeliveryViewData>;
|
||||
deleteTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<void>;
|
||||
getTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<WorkInterfaces.TeamSettingsIteration>;
|
||||
getTeamIterations(teamContext: TfsCoreInterfaces.TeamContext, timeframe?: string): Promise<WorkInterfaces.TeamSettingsIteration[]>;
|
||||
postTeamIteration(iteration: WorkInterfaces.TeamSettingsIteration, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSettingsIteration>;
|
||||
createPlan(postedPlan: WorkInterfaces.CreatePlan, project: string): Promise<WorkInterfaces.Plan>;
|
||||
deletePlan(project: string, id: string): Promise<void>;
|
||||
getPlan(project: string, id: string): Promise<WorkInterfaces.Plan>;
|
||||
getPlans(project: string): Promise<WorkInterfaces.Plan[]>;
|
||||
updatePlan(updatedPlan: WorkInterfaces.UpdatePlan, project: string, id: string): Promise<WorkInterfaces.Plan>;
|
||||
getProcessConfiguration(project: string): Promise<WorkInterfaces.ProcessConfiguration>;
|
||||
getBoardRows(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardRow[]>;
|
||||
updateBoardRows(boardRows: WorkInterfaces.BoardRow[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardRow[]>;
|
||||
getTeamDaysOff(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamSettingsDaysOff>;
|
||||
updateTeamDaysOff(daysOffPatch: WorkInterfaces.TeamSettingsDaysOffPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamSettingsDaysOff>;
|
||||
getTeamFieldValues(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamFieldValues>;
|
||||
updateTeamFieldValues(patch: WorkInterfaces.TeamFieldValuesPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamFieldValues>;
|
||||
getTeamSettings(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSetting>;
|
||||
updateTeamSettings(teamSettingsPatch: WorkInterfaces.TeamSettingsPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSetting>;
|
||||
getIterationWorkItems(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.IterationWorkItems>;
|
||||
}
|
||||
export declare class WorkApi extends basem.ClientApiBase implements IWorkApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Gets backlog configuration for a team
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
getBacklogConfigurations(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.BacklogConfiguration>;
|
||||
/**
|
||||
* Get a list of work items within a backlog level
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} backlogId
|
||||
*/
|
||||
getBacklogLevelWorkItems(teamContext: TfsCoreInterfaces.TeamContext, backlogId: string): Promise<WorkInterfaces.BacklogLevelWorkItems>;
|
||||
/**
|
||||
* Get a backlog level
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} id - The id of the backlog level
|
||||
*/
|
||||
getBacklog(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<WorkInterfaces.BacklogLevelConfiguration>;
|
||||
/**
|
||||
* List all backlog levels
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
getBacklogs(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.BacklogLevelConfiguration[]>;
|
||||
/**
|
||||
* Get available board columns in a project
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getColumnSuggestedValues(project?: string): Promise<WorkInterfaces.BoardSuggestedValue[]>;
|
||||
/**
|
||||
* Returns the list of parent field filter model for the given list of workitem ids
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} childBacklogContextCategoryRefName
|
||||
* @param {number[]} workitemIds
|
||||
*/
|
||||
getBoardMappingParentItems(teamContext: TfsCoreInterfaces.TeamContext, childBacklogContextCategoryRefName: string, workitemIds: number[]): Promise<WorkInterfaces.ParentChildWIMap[]>;
|
||||
/**
|
||||
* Get available board rows in a project
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getRowSuggestedValues(project?: string): Promise<WorkInterfaces.BoardSuggestedValue[]>;
|
||||
/**
|
||||
* Get board
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} id - identifier for board, either board's backlog level name (Eg:"Stories") or Id
|
||||
*/
|
||||
getBoard(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<WorkInterfaces.Board>;
|
||||
/**
|
||||
* Get boards
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
getBoards(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.BoardReference[]>;
|
||||
/**
|
||||
* Update board options
|
||||
*
|
||||
* @param {{ [key: string] : string; }} options - options to updated
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} id - identifier for board, either category plural name (Eg:"Stories") or guid
|
||||
*/
|
||||
setBoardOptions(options: {
|
||||
[key: string]: string;
|
||||
}, teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<{
|
||||
[key: string]: string;
|
||||
}>;
|
||||
/**
|
||||
* Get board user settings for a board id
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Board ID or Name
|
||||
*/
|
||||
getBoardUserSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardUserSettings>;
|
||||
/**
|
||||
* Update board user settings for the board id
|
||||
*
|
||||
* @param {{ [key: string] : string; }} boardUserSettings
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board
|
||||
*/
|
||||
updateBoardUserSettings(boardUserSettings: {
|
||||
[key: string]: string;
|
||||
}, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardUserSettings>;
|
||||
/**
|
||||
* Get a team's capacity
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - ID of the iteration
|
||||
*/
|
||||
getCapacities(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamMemberCapacity[]>;
|
||||
/**
|
||||
* Get a team member's capacity
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - ID of the iteration
|
||||
* @param {string} teamMemberId - ID of the team member
|
||||
*/
|
||||
getCapacity(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise<WorkInterfaces.TeamMemberCapacity>;
|
||||
/**
|
||||
* Replace a team's capacity
|
||||
*
|
||||
* @param {WorkInterfaces.TeamMemberCapacity[]} capacities - Team capacity to replace
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - ID of the iteration
|
||||
*/
|
||||
replaceCapacities(capacities: WorkInterfaces.TeamMemberCapacity[], teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamMemberCapacity[]>;
|
||||
/**
|
||||
* Update a team member's capacity
|
||||
*
|
||||
* @param {WorkInterfaces.CapacityPatch} patch - Updated capacity
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - ID of the iteration
|
||||
* @param {string} teamMemberId - ID of the team member
|
||||
*/
|
||||
updateCapacity(patch: WorkInterfaces.CapacityPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise<WorkInterfaces.TeamMemberCapacity>;
|
||||
/**
|
||||
* Get board card Rule settings for the board id or board by name
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board
|
||||
*/
|
||||
getBoardCardRuleSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardRuleSettings>;
|
||||
/**
|
||||
* Update board card Rule settings for the board id or board by name
|
||||
*
|
||||
* @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board
|
||||
*/
|
||||
updateBoardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardRuleSettings>;
|
||||
/**
|
||||
* Get board card settings for the board id or board by name
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board
|
||||
*/
|
||||
getBoardCardSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardSettings>;
|
||||
/**
|
||||
* Update board card settings for the board id or board by name
|
||||
*
|
||||
* @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board
|
||||
*/
|
||||
updateBoardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardCardSettings>;
|
||||
/**
|
||||
* Get a board chart
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id
|
||||
* @param {string} name - The chart name
|
||||
*/
|
||||
getBoardChart(teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise<WorkInterfaces.BoardChart>;
|
||||
/**
|
||||
* Get board charts
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id
|
||||
*/
|
||||
getBoardCharts(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardChartReference[]>;
|
||||
/**
|
||||
* Update a board chart
|
||||
*
|
||||
* @param {WorkInterfaces.BoardChart} chart
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id
|
||||
* @param {string} name - The chart name
|
||||
*/
|
||||
updateBoardChart(chart: WorkInterfaces.BoardChart, teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise<WorkInterfaces.BoardChart>;
|
||||
/**
|
||||
* Get columns on a board
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Name or ID of the specific board
|
||||
*/
|
||||
getBoardColumns(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardColumn[]>;
|
||||
/**
|
||||
* Update columns on a board
|
||||
*
|
||||
* @param {WorkInterfaces.BoardColumn[]} boardColumns - List of board columns to update
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Name or ID of the specific board
|
||||
*/
|
||||
updateBoardColumns(boardColumns: WorkInterfaces.BoardColumn[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardColumn[]>;
|
||||
/**
|
||||
* Get Delivery View Data
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} id - Identifier for delivery view
|
||||
* @param {number} revision - Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision.
|
||||
* @param {Date} startDate - The start date of timeline
|
||||
* @param {Date} endDate - The end date of timeline
|
||||
*/
|
||||
getDeliveryTimelineData(project: string, id: string, revision?: number, startDate?: Date, endDate?: Date): Promise<WorkInterfaces.DeliveryViewData>;
|
||||
/**
|
||||
* Delete a team's iteration by iterationId
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} id - ID of the iteration
|
||||
*/
|
||||
deleteTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<void>;
|
||||
/**
|
||||
* Get team's iteration by iterationId
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} id - ID of the iteration
|
||||
*/
|
||||
getTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<WorkInterfaces.TeamSettingsIteration>;
|
||||
/**
|
||||
* Get a team's iterations using timeframe filter
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} timeframe - A filter for which iterations are returned based on relative time. Only Current is supported currently.
|
||||
*/
|
||||
getTeamIterations(teamContext: TfsCoreInterfaces.TeamContext, timeframe?: string): Promise<WorkInterfaces.TeamSettingsIteration[]>;
|
||||
/**
|
||||
* Add an iteration to the team
|
||||
*
|
||||
* @param {WorkInterfaces.TeamSettingsIteration} iteration - Iteration to add
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
postTeamIteration(iteration: WorkInterfaces.TeamSettingsIteration, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSettingsIteration>;
|
||||
/**
|
||||
* Add a new plan for the team
|
||||
*
|
||||
* @param {WorkInterfaces.CreatePlan} postedPlan - Plan definition
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createPlan(postedPlan: WorkInterfaces.CreatePlan, project: string): Promise<WorkInterfaces.Plan>;
|
||||
/**
|
||||
* Delete the specified plan
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} id - Identifier of the plan
|
||||
*/
|
||||
deletePlan(project: string, id: string): Promise<void>;
|
||||
/**
|
||||
* Get the information for the specified plan
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} id - Identifier of the plan
|
||||
*/
|
||||
getPlan(project: string, id: string): Promise<WorkInterfaces.Plan>;
|
||||
/**
|
||||
* Get the information for all the plans configured for the given team
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getPlans(project: string): Promise<WorkInterfaces.Plan[]>;
|
||||
/**
|
||||
* Update the information for the specified plan
|
||||
*
|
||||
* @param {WorkInterfaces.UpdatePlan} updatedPlan - Plan definition to be updated
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} id - Identifier of the plan
|
||||
*/
|
||||
updatePlan(updatedPlan: WorkInterfaces.UpdatePlan, project: string, id: string): Promise<WorkInterfaces.Plan>;
|
||||
/**
|
||||
* Get process configuration
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getProcessConfiguration(project: string): Promise<WorkInterfaces.ProcessConfiguration>;
|
||||
/**
|
||||
* Get rows on a board
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Name or ID of the specific board
|
||||
*/
|
||||
getBoardRows(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardRow[]>;
|
||||
/**
|
||||
* Update rows on a board
|
||||
*
|
||||
* @param {WorkInterfaces.BoardRow[]} boardRows - List of board rows to update
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} board - Name or ID of the specific board
|
||||
*/
|
||||
updateBoardRows(boardRows: WorkInterfaces.BoardRow[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise<WorkInterfaces.BoardRow[]>;
|
||||
/**
|
||||
* Get team's days off for an iteration
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - ID of the iteration
|
||||
*/
|
||||
getTeamDaysOff(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamSettingsDaysOff>;
|
||||
/**
|
||||
* Set a team's days off for an iteration
|
||||
*
|
||||
* @param {WorkInterfaces.TeamSettingsDaysOffPatch} daysOffPatch - Team's days off patch containting a list of start and end dates
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - ID of the iteration
|
||||
*/
|
||||
updateTeamDaysOff(daysOffPatch: WorkInterfaces.TeamSettingsDaysOffPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.TeamSettingsDaysOff>;
|
||||
/**
|
||||
* Get a collection of team field values
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
getTeamFieldValues(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamFieldValues>;
|
||||
/**
|
||||
* Update team field values
|
||||
*
|
||||
* @param {WorkInterfaces.TeamFieldValuesPatch} patch
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
updateTeamFieldValues(patch: WorkInterfaces.TeamFieldValuesPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamFieldValues>;
|
||||
/**
|
||||
* Get a team's settings
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
getTeamSettings(teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSetting>;
|
||||
/**
|
||||
* Update a team's settings
|
||||
*
|
||||
* @param {WorkInterfaces.TeamSettingsPatch} teamSettingsPatch - TeamSettings changes
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
updateTeamSettings(teamSettingsPatch: WorkInterfaces.TeamSettingsPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkInterfaces.TeamSetting>;
|
||||
/**
|
||||
* Get work items for iteration
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} iterationId - ID of the iteration
|
||||
*/
|
||||
getIterationWorkItems(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise<WorkInterfaces.IterationWorkItems>;
|
||||
}
|
||||
+1557
File diff suppressed because it is too large
Load Diff
+668
@@ -0,0 +1,668 @@
|
||||
/// <reference types="node" />
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
|
||||
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
||||
import WorkItemTrackingInterfaces = require("./interfaces/WorkItemTrackingInterfaces");
|
||||
export interface IWorkItemTrackingApi extends basem.ClientApiBase {
|
||||
getAccountMyWorkData(queryOption?: WorkItemTrackingInterfaces.QueryOption): Promise<WorkItemTrackingInterfaces.AccountMyWorkResult>;
|
||||
getRecentActivityData(): Promise<WorkItemTrackingInterfaces.AccountRecentActivityWorkItemModel[]>;
|
||||
getRecentMentions(): Promise<WorkItemTrackingInterfaces.AccountRecentMentionWorkItemModel[]>;
|
||||
getWorkArtifactLinkTypes(): Promise<WorkItemTrackingInterfaces.WorkArtifactLink[]>;
|
||||
queryWorkItemsForArtifactUris(artifactUriQuery: WorkItemTrackingInterfaces.ArtifactUriQuery, project?: string): Promise<WorkItemTrackingInterfaces.ArtifactUriQueryResult>;
|
||||
createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string, project?: string, areaPath?: string): Promise<WorkItemTrackingInterfaces.AttachmentReference>;
|
||||
getAttachmentContent(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
getAttachmentZip(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
getClassificationNodes(project: string, ids: number[], depth?: number, errorPolicy?: WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
|
||||
getRootNodes(project: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
|
||||
createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise<void>;
|
||||
getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
getComment(id: number, revision: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemComment>;
|
||||
getComments(id: number, fromRevision?: number, top?: number, order?: WorkItemTrackingInterfaces.CommentSortOrder, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemComments>;
|
||||
createField(workItemField: WorkItemTrackingInterfaces.WorkItemField, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
|
||||
deleteField(fieldNameOrRefName: string, project?: string): Promise<void>;
|
||||
getField(fieldNameOrRefName: string, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
|
||||
getFields(project?: string, expand?: WorkItemTrackingInterfaces.GetFieldsExpand): Promise<WorkItemTrackingInterfaces.WorkItemField[]>;
|
||||
createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
|
||||
deleteQuery(project: string, query: string): Promise<void>;
|
||||
getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem[]>;
|
||||
getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
|
||||
searchQueries(project: string, filter: string, top?: number, expand?: WorkItemTrackingInterfaces.QueryExpand, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItemsResult>;
|
||||
updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
|
||||
destroyWorkItem(id: number, project?: string): Promise<void>;
|
||||
getDeletedWorkItem(id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
|
||||
getDeletedWorkItems(ids: number[], project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteReference[]>;
|
||||
getDeletedWorkItemShallowReferences(project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteShallowReference[]>;
|
||||
restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
|
||||
getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
|
||||
evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise<void>;
|
||||
createTemplate(template: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
|
||||
getTemplates(teamContext: TfsCoreInterfaces.TeamContext, workitemtypename?: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplateReference[]>;
|
||||
deleteTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<void>;
|
||||
getTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
|
||||
replaceTemplate(templateContent: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
|
||||
getUpdate(id: number, updateNumber: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate>;
|
||||
getUpdates(id: number, top?: number, skip?: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate[]>;
|
||||
queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
|
||||
queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
|
||||
getWorkItemIconJson(icon: string, color?: string, v?: number): Promise<WorkItemTrackingInterfaces.WorkItemIcon>;
|
||||
getWorkItemIcons(): Promise<WorkItemTrackingInterfaces.WorkItemIcon[]>;
|
||||
getWorkItemIconSvg(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
|
||||
getWorkItemIconXaml(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
|
||||
getReportingLinksByLinkType(project?: string, linkTypes?: string[], types?: string[], continuationToken?: string, startDateTime?: Date): Promise<WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch>;
|
||||
getRelationType(relation: string): Promise<WorkItemTrackingInterfaces.WorkItemRelationType>;
|
||||
getRelationTypes(): Promise<WorkItemTrackingInterfaces.WorkItemRelationType[]>;
|
||||
readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean, includeLatestOnly?: boolean, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand, includeDiscussionChangesOnly?: boolean, maxPageSize?: number): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
|
||||
readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
|
||||
createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
deleteWorkItem(id: number, project?: string, destroy?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
|
||||
getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, errorPolicy?: WorkItemTrackingInterfaces.WorkItemErrorPolicy, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
|
||||
updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, project?: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
getWorkItemsBatch(workItemGetRequest: WorkItemTrackingInterfaces.WorkItemBatchGetRequest, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
|
||||
getWorkItemStateColors(projectNames: string[]): Promise<WorkItemTrackingInterfaces.ProjectWorkItemStateColors[]>;
|
||||
getWorkItemNextStatesOnCheckinAction(ids: number[], action?: string): Promise<WorkItemTrackingInterfaces.WorkItemNextStateOnTransition[]>;
|
||||
getWorkItemTypeCategories(project: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory[]>;
|
||||
getWorkItemTypeCategory(project: string, category: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory>;
|
||||
getWorkItemTypeColors(projectNames: string[]): Promise<{
|
||||
key: string;
|
||||
value: WorkItemTrackingInterfaces.WorkItemTypeColor[];
|
||||
}[]>;
|
||||
getWorkItemTypeColorAndIcons(projectNames: string[]): Promise<{
|
||||
key: string;
|
||||
value: WorkItemTrackingInterfaces.WorkItemTypeColorAndIcon[];
|
||||
}[]>;
|
||||
getWorkItemType(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemType>;
|
||||
getWorkItemTypes(project: string): Promise<WorkItemTrackingInterfaces.WorkItemType[]>;
|
||||
getWorkItemTypeFieldsWithReferences(project: string, type: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences[]>;
|
||||
getWorkItemTypeFieldWithReferences(project: string, type: string, field: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences>;
|
||||
getWorkItemTypeStates(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemStateColor[]>;
|
||||
exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemTypeTemplate>;
|
||||
updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise<WorkItemTrackingInterfaces.ProvisioningResult>;
|
||||
}
|
||||
export declare class WorkItemTrackingApi extends basem.ClientApiBase implements IWorkItemTrackingApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.QueryOption} queryOption
|
||||
*/
|
||||
getAccountMyWorkData(queryOption?: WorkItemTrackingInterfaces.QueryOption): Promise<WorkItemTrackingInterfaces.AccountMyWorkResult>;
|
||||
/**
|
||||
* INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details.
|
||||
*
|
||||
*/
|
||||
getRecentActivityData(): Promise<WorkItemTrackingInterfaces.AccountRecentActivityWorkItemModel[]>;
|
||||
/**
|
||||
* INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE.
|
||||
*
|
||||
*/
|
||||
getRecentMentions(): Promise<WorkItemTrackingInterfaces.AccountRecentMentionWorkItemModel[]>;
|
||||
/**
|
||||
* Get the list of work item tracking outbound artifact link types.
|
||||
*
|
||||
*/
|
||||
getWorkArtifactLinkTypes(): Promise<WorkItemTrackingInterfaces.WorkArtifactLink[]>;
|
||||
/**
|
||||
* Queries work items linked to a given list of artifact URI.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.ArtifactUriQuery} artifactUriQuery - Defines a list of artifact URI for querying work items.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
queryWorkItemsForArtifactUris(artifactUriQuery: WorkItemTrackingInterfaces.ArtifactUriQuery, project?: string): Promise<WorkItemTrackingInterfaces.ArtifactUriQueryResult>;
|
||||
/**
|
||||
* Uploads an attachment.
|
||||
*
|
||||
* @param {NodeJS.ReadableStream} contentStream - Content to upload
|
||||
* @param {string} fileName - The name of the file
|
||||
* @param {string} uploadType - Attachment upload type: Simple or Chunked
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} areaPath - Target project Area Path
|
||||
*/
|
||||
createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string, project?: string, areaPath?: string): Promise<WorkItemTrackingInterfaces.AttachmentReference>;
|
||||
/**
|
||||
* Downloads an attachment.
|
||||
*
|
||||
* @param {string} id - Attachment ID
|
||||
* @param {string} fileName - Name of the file
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} download - If set to <c>true</c> always download attachment
|
||||
*/
|
||||
getAttachmentContent(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Downloads an attachment.
|
||||
*
|
||||
* @param {string} id - Attachment ID
|
||||
* @param {string} fileName - Name of the file
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} download - If set to <c>true</c> always download attachment
|
||||
*/
|
||||
getAttachmentZip(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number[]} ids - Comma seperated integer classification nodes ids. It's not required, if you want root nodes.
|
||||
* @param {number} depth - Depth of children to fetch.
|
||||
* @param {WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy} errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit.
|
||||
*/
|
||||
getClassificationNodes(project: string, ids: number[], depth?: number, errorPolicy?: WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
|
||||
/**
|
||||
* Gets root classification nodes under the project.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {number} depth - Depth of children to fetch.
|
||||
*/
|
||||
getRootNodes(project: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
|
||||
/**
|
||||
* Create new or update an existing classification node.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
|
||||
* @param {string} path - Path of the classification node.
|
||||
*/
|
||||
createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
/**
|
||||
* Delete an existing classification node.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
|
||||
* @param {string} path - Path of the classification node.
|
||||
* @param {number} reclassifyId - Id of the target classification node for reclassification.
|
||||
*/
|
||||
deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise<void>;
|
||||
/**
|
||||
* Gets the classification node for a given node path.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
|
||||
* @param {string} path - Path of the classification node.
|
||||
* @param {number} depth - Depth of children to fetch.
|
||||
*/
|
||||
getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
/**
|
||||
* Update an existing classification node.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
|
||||
* @param {string} path - Path of the classification node.
|
||||
*/
|
||||
updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
|
||||
/**
|
||||
* Gets a comment for a work item at the specified revision.
|
||||
*
|
||||
* @param {number} id - Work item id
|
||||
* @param {number} revision - Revision for which the comment need to be fetched
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getComment(id: number, revision: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemComment>;
|
||||
/**
|
||||
* Gets the specified number of comments for a work item from the specified revision.
|
||||
*
|
||||
* @param {number} id - Work item id
|
||||
* @param {number} fromRevision - Revision from which comments are to be fetched (default is 1)
|
||||
* @param {number} top - The number of comments to return (default is 200)
|
||||
* @param {WorkItemTrackingInterfaces.CommentSortOrder} order - Ascending or descending by revision id (default is ascending)
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getComments(id: number, fromRevision?: number, top?: number, order?: WorkItemTrackingInterfaces.CommentSortOrder, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemComments>;
|
||||
/**
|
||||
* Create a new field.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemField} workItemField - New field definition
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
createField(workItemField: WorkItemTrackingInterfaces.WorkItemField, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
|
||||
/**
|
||||
* Deletes the field.
|
||||
*
|
||||
* @param {string} fieldNameOrRefName - Field simple name or reference name
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
deleteField(fieldNameOrRefName: string, project?: string): Promise<void>;
|
||||
/**
|
||||
* Gets information on a specific field.
|
||||
*
|
||||
* @param {string} fieldNameOrRefName - Field simple name or reference name
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getField(fieldNameOrRefName: string, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
|
||||
/**
|
||||
* Returns information for all fields.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {WorkItemTrackingInterfaces.GetFieldsExpand} expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included.
|
||||
*/
|
||||
getFields(project?: string, expand?: WorkItemTrackingInterfaces.GetFieldsExpand): Promise<WorkItemTrackingInterfaces.WorkItemField[]>;
|
||||
/**
|
||||
* Creates a query, or moves a query.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} query - The parent id or path under which the query is to be created.
|
||||
*/
|
||||
createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
|
||||
/**
|
||||
* Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} query - ID or path of the query or folder to delete.
|
||||
*/
|
||||
deleteQuery(project: string, query: string): Promise<void>;
|
||||
/**
|
||||
* Gets the root queries and their children
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.
|
||||
* @param {number} depth - In the folder of queries, return child queries and folders to this depth.
|
||||
* @param {boolean} includeDeleted - Include deleted queries and folders
|
||||
*/
|
||||
getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem[]>;
|
||||
/**
|
||||
* Retrieves an individual query and its children
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} query - ID or path of the query.
|
||||
* @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.
|
||||
* @param {number} depth - In the folder of queries, return child queries and folders to this depth.
|
||||
* @param {boolean} includeDeleted - Include deleted queries and folders
|
||||
*/
|
||||
getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
|
||||
/**
|
||||
* Searches all queries the user has access to in the current project
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} filter - The text to filter the queries with.
|
||||
* @param {number} top - The number of queries to return (Default is 50 and maximum is 200).
|
||||
* @param {WorkItemTrackingInterfaces.QueryExpand} expand
|
||||
* @param {boolean} includeDeleted - Include deleted queries and folders
|
||||
*/
|
||||
searchQueries(project: string, filter: string, top?: number, expand?: WorkItemTrackingInterfaces.QueryExpand, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItemsResult>;
|
||||
/**
|
||||
* Update a query or a folder. This allows you to update, rename and move queries and folders.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - The query to update.
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} query - The ID or path for the query to update.
|
||||
* @param {boolean} undeleteDescendants - Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants.
|
||||
*/
|
||||
updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
|
||||
/**
|
||||
* Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.
|
||||
*
|
||||
* @param {number} id - ID of the work item to be destroyed permanently
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
destroyWorkItem(id: number, project?: string): Promise<void>;
|
||||
/**
|
||||
* Gets a deleted work item from Recycle Bin.
|
||||
*
|
||||
* @param {number} id - ID of the work item to be returned
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getDeletedWorkItem(id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
|
||||
/**
|
||||
* Gets the work items from the recycle bin, whose IDs have been specified in the parameters
|
||||
*
|
||||
* @param {number[]} ids - Comma separated list of IDs of the deleted work items to be returned
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getDeletedWorkItems(ids: number[], project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteReference[]>;
|
||||
/**
|
||||
* Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getDeletedWorkItemShallowReferences(project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteShallowReference[]>;
|
||||
/**
|
||||
* Restores the deleted work item from Recycle Bin.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - Paylod with instructions to update the IsDeleted flag to false
|
||||
* @param {number} id - ID of the work item to be restored
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
|
||||
/**
|
||||
* Returns a fully hydrated work item for the requested revision
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {number} revisionNumber
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemExpand} expand
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
/**
|
||||
* Returns the list of fully hydrated work item revisions, paged.
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemExpand} expand
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
|
||||
/**
|
||||
* Validates the fields values.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.FieldsToEvaluate} ruleEngineInput
|
||||
*/
|
||||
evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise<void>;
|
||||
/**
|
||||
* Creates a template
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemTemplate} template - Template contents
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
*/
|
||||
createTemplate(template: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
|
||||
/**
|
||||
* Gets template
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} workitemtypename - Optional, When specified returns templates for given Work item type.
|
||||
*/
|
||||
getTemplates(teamContext: TfsCoreInterfaces.TeamContext, workitemtypename?: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplateReference[]>;
|
||||
/**
|
||||
* Deletes the template with given id
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} templateId - Template id
|
||||
*/
|
||||
deleteTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<void>;
|
||||
/**
|
||||
* Gets the template with specified id
|
||||
*
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} templateId - Template Id
|
||||
*/
|
||||
getTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
|
||||
/**
|
||||
* Replace template contents
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemTemplate} templateContent - Template contents to replace with
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {string} templateId - Template id
|
||||
*/
|
||||
replaceTemplate(templateContent: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
|
||||
/**
|
||||
* Returns a single update for a work item
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {number} updateNumber
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getUpdate(id: number, updateNumber: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate>;
|
||||
/**
|
||||
* Returns a the deltas between work item revisions
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {number} top
|
||||
* @param {number} skip
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getUpdates(id: number, top?: number, skip?: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate[]>;
|
||||
/**
|
||||
* Gets the results of the query given its WIQL.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the WIQL.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {boolean} timePrecision - Whether or not to use time precision.
|
||||
* @param {number} top - The max number of results to return.
|
||||
*/
|
||||
queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
|
||||
/**
|
||||
* Gets the results of the query given the query ID.
|
||||
*
|
||||
* @param {string} id - The query ID.
|
||||
* @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
|
||||
* @param {boolean} timePrecision - Whether or not to use time precision.
|
||||
*/
|
||||
queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
|
||||
/**
|
||||
* Get a work item icon given the friendly name and icon color.
|
||||
*
|
||||
* @param {string} icon - The name of the icon
|
||||
* @param {string} color - The 6-digit hex color for the icon
|
||||
* @param {number} v - The version of the icon (used only for cache invalidation)
|
||||
*/
|
||||
getWorkItemIconJson(icon: string, color?: string, v?: number): Promise<WorkItemTrackingInterfaces.WorkItemIcon>;
|
||||
/**
|
||||
* Get a list of all work item icons.
|
||||
*
|
||||
*/
|
||||
getWorkItemIcons(): Promise<WorkItemTrackingInterfaces.WorkItemIcon[]>;
|
||||
/**
|
||||
* Get a work item icon given the friendly name and icon color.
|
||||
*
|
||||
* @param {string} icon - The name of the icon
|
||||
* @param {string} color - The 6-digit hex color for the icon
|
||||
* @param {number} v - The version of the icon (used only for cache invalidation)
|
||||
*/
|
||||
getWorkItemIconSvg(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get a work item icon given the friendly name and icon color.
|
||||
*
|
||||
* @param {string} icon - The name of the icon
|
||||
* @param {string} color - The 6-digit hex color for the icon
|
||||
* @param {number} v - The version of the icon (used only for cache invalidation)
|
||||
*/
|
||||
getWorkItemIconXaml(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
|
||||
/**
|
||||
* Get a batch of work item links
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string[]} linkTypes - A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types.
|
||||
* @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types.
|
||||
* @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links.
|
||||
* @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter.
|
||||
*/
|
||||
getReportingLinksByLinkType(project?: string, linkTypes?: string[], types?: string[], continuationToken?: string, startDateTime?: Date): Promise<WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch>;
|
||||
/**
|
||||
* Gets the work item relation type definition.
|
||||
*
|
||||
* @param {string} relation - The relation name
|
||||
*/
|
||||
getRelationType(relation: string): Promise<WorkItemTrackingInterfaces.WorkItemRelationType>;
|
||||
/**
|
||||
* Gets the work item relation types.
|
||||
*
|
||||
*/
|
||||
getRelationTypes(): Promise<WorkItemTrackingInterfaces.WorkItemRelationType[]>;
|
||||
/**
|
||||
* Get a batch of work item revisions with the option of including deleted items
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.
|
||||
* @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types.
|
||||
* @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
|
||||
* @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
|
||||
* @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields.
|
||||
* @param {boolean} includeDeleted - Specify if the deleted item should be returned.
|
||||
* @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field.
|
||||
* @param {boolean} includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions
|
||||
* @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand - Return all the fields in work item revisions, including long text fields which are not returned by default
|
||||
* @param {boolean} includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed
|
||||
* @param {number} maxPageSize - The maximum number of results to return in this batch
|
||||
*/
|
||||
readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean, includeLatestOnly?: boolean, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand, includeDiscussionChangesOnly?: boolean, maxPageSize?: number): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
|
||||
/**
|
||||
* Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit.
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
|
||||
* @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
|
||||
* @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand
|
||||
*/
|
||||
readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
|
||||
/**
|
||||
* Creates a single work item.
|
||||
*
|
||||
* @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the work item
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} type - The work item type of the work item to create
|
||||
* @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item
|
||||
* @param {boolean} bypassRules - Do not enforce the work item type rules on this update
|
||||
* @param {boolean} suppressNotifications - Do not fire any notifications for this change
|
||||
*/
|
||||
createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
/**
|
||||
* Returns a single work item from a template.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} type - The work item type name
|
||||
* @param {string} fields - Comma-separated list of requested fields
|
||||
* @param {Date} asOf - AsOf UTC date time string
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
|
||||
*/
|
||||
getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
/**
|
||||
* Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently.
|
||||
*
|
||||
* @param {number} id - ID of the work item to be deleted
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} destroy - Optional parameter, if set to true, the work item is deleted permanently
|
||||
*/
|
||||
deleteWorkItem(id: number, project?: string, destroy?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
|
||||
/**
|
||||
* Returns a single work item.
|
||||
*
|
||||
* @param {number} id - The work item id
|
||||
* @param {string[]} fields - Comma-separated list of requested fields
|
||||
* @param {Date} asOf - AsOf UTC date time string
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
/**
|
||||
* Returns a list of work items.
|
||||
*
|
||||
* @param {number[]} ids - The comma-separated list of requested work item ids
|
||||
* @param {string[]} fields - Comma-separated list of requested fields
|
||||
* @param {Date} asOf - AsOf UTC date time string
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemErrorPolicy} errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}.
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, errorPolicy?: WorkItemTrackingInterfaces.WorkItemErrorPolicy, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
|
||||
/**
|
||||
* Updates a single work item.
|
||||
*
|
||||
* @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the update
|
||||
* @param {number} id - The id of the work item to update
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item
|
||||
* @param {boolean} bypassRules - Do not enforce the work item type rules on this update
|
||||
* @param {boolean} suppressNotifications - Do not fire any notifications for this change
|
||||
*/
|
||||
updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, project?: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean): Promise<WorkItemTrackingInterfaces.WorkItem>;
|
||||
/**
|
||||
* Gets work items for a list of work item ids
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemBatchGetRequest} workItemGetRequest
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWorkItemsBatch(workItemGetRequest: WorkItemTrackingInterfaces.WorkItemBatchGetRequest, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
|
||||
/**
|
||||
* INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects
|
||||
*
|
||||
* @param {string[]} projectNames
|
||||
*/
|
||||
getWorkItemStateColors(projectNames: string[]): Promise<WorkItemTrackingInterfaces.ProjectWorkItemStateColors[]>;
|
||||
/**
|
||||
* Returns the next state on the given work item IDs.
|
||||
*
|
||||
* @param {number[]} ids - list of work item ids
|
||||
* @param {string} action - possible actions. Currently only supports checkin
|
||||
*/
|
||||
getWorkItemNextStatesOnCheckinAction(ids: number[], action?: string): Promise<WorkItemTrackingInterfaces.WorkItemNextStateOnTransition[]>;
|
||||
/**
|
||||
* Get all work item type categories.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWorkItemTypeCategories(project: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory[]>;
|
||||
/**
|
||||
* Get specific work item type category by name.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} category - The category name
|
||||
*/
|
||||
getWorkItemTypeCategory(project: string, category: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory>;
|
||||
/**
|
||||
* INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects
|
||||
*
|
||||
* @param {string[]} projectNames
|
||||
*/
|
||||
getWorkItemTypeColors(projectNames: string[]): Promise<{
|
||||
key: string;
|
||||
value: WorkItemTrackingInterfaces.WorkItemTypeColor[];
|
||||
}[]>;
|
||||
/**
|
||||
* INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects
|
||||
*
|
||||
* @param {string[]} projectNames
|
||||
*/
|
||||
getWorkItemTypeColorAndIcons(projectNames: string[]): Promise<{
|
||||
key: string;
|
||||
value: WorkItemTrackingInterfaces.WorkItemTypeColorAndIcon[];
|
||||
}[]>;
|
||||
/**
|
||||
* Returns a work item type definition.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} type - Work item type name
|
||||
*/
|
||||
getWorkItemType(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemType>;
|
||||
/**
|
||||
* Returns the list of work item types
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
getWorkItemTypes(project: string): Promise<WorkItemTrackingInterfaces.WorkItemType[]>;
|
||||
/**
|
||||
* Get a list of fields for a work item type with detailed references.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} type - Work item type.
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.
|
||||
*/
|
||||
getWorkItemTypeFieldsWithReferences(project: string, type: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences[]>;
|
||||
/**
|
||||
* Get a field for a work item type with detailed references.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} type - Work item type.
|
||||
* @param {string} field
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.
|
||||
*/
|
||||
getWorkItemTypeFieldWithReferences(project: string, type: string, field: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences>;
|
||||
/**
|
||||
* Returns the state names and colors for a work item type.
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} type - The state name
|
||||
*/
|
||||
getWorkItemTypeStates(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemStateColor[]>;
|
||||
/**
|
||||
* Export work item type
|
||||
*
|
||||
* @param {string} project - Project ID or project name
|
||||
* @param {string} type
|
||||
* @param {boolean} exportGlobalLists
|
||||
*/
|
||||
exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemTypeTemplate>;
|
||||
/**
|
||||
* Add/updates a work item type
|
||||
*
|
||||
* @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel
|
||||
* @param {string} project - Project ID or project name
|
||||
*/
|
||||
updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise<WorkItemTrackingInterfaces.ProvisioningResult>;
|
||||
}
|
||||
+2288
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+492
@@ -0,0 +1,492 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import WorkItemTrackingProcessInterfaces = require("./interfaces/WorkItemTrackingProcessInterfaces");
|
||||
export interface IWorkItemTrackingProcessApi extends basem.ClientApiBase {
|
||||
createProcessBehavior(behavior: WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest, processId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior>;
|
||||
deleteProcessBehavior(processId: string, behaviorRefName: string): Promise<void>;
|
||||
getProcessBehavior(processId: string, behaviorRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior>;
|
||||
getProcessBehaviors(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior[]>;
|
||||
updateProcessBehavior(behaviorData: WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest, processId: string, behaviorRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior>;
|
||||
createControlInGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise<WorkItemTrackingProcessInterfaces.Control>;
|
||||
moveControlToGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise<WorkItemTrackingProcessInterfaces.Control>;
|
||||
removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise<void>;
|
||||
updateControl(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise<WorkItemTrackingProcessInterfaces.Control>;
|
||||
addFieldToWorkItemType(field: WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField>;
|
||||
getAllWorkItemTypeFields(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField[]>;
|
||||
getWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField>;
|
||||
removeWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string): Promise<void>;
|
||||
updateWorkItemTypeField(field: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest, processId: string, witRefName: string, fieldRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField>;
|
||||
addGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
moveGroupToPage(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
moveGroupToSection(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<void>;
|
||||
updateGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
getFormLayout(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.FormLayout>;
|
||||
createList(picklist: WorkItemTrackingProcessInterfaces.PickList): Promise<WorkItemTrackingProcessInterfaces.PickList>;
|
||||
deleteList(listId: string): Promise<void>;
|
||||
getList(listId: string): Promise<WorkItemTrackingProcessInterfaces.PickList>;
|
||||
getListsMetadata(): Promise<WorkItemTrackingProcessInterfaces.PickListMetadata[]>;
|
||||
updateList(picklist: WorkItemTrackingProcessInterfaces.PickList, listId: string): Promise<WorkItemTrackingProcessInterfaces.PickList>;
|
||||
addPage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.Page>;
|
||||
removePage(processId: string, witRefName: string, pageId: string): Promise<void>;
|
||||
updatePage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.Page>;
|
||||
createNewProcess(createRequest: WorkItemTrackingProcessInterfaces.CreateProcessModel): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo>;
|
||||
deleteProcessById(processTypeId: string): Promise<void>;
|
||||
editProcess(updateRequest: WorkItemTrackingProcessInterfaces.UpdateProcessModel, processTypeId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo>;
|
||||
getListOfProcesses(expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo[]>;
|
||||
getProcessByItsId(processTypeId: string, expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo>;
|
||||
addProcessWorkItemTypeRule(processRuleCreate: WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule>;
|
||||
deleteProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise<void>;
|
||||
getProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule>;
|
||||
getProcessWorkItemTypeRules(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule[]>;
|
||||
updateProcessWorkItemTypeRule(processRule: WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest, processId: string, witRefName: string, ruleId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule>;
|
||||
createStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise<void>;
|
||||
getStateDefinition(processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
getStateDefinitions(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel[]>;
|
||||
hideStateDefinition(hideStateModel: WorkItemTrackingProcessInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
updateStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
createProcessWorkItemType(workItemType: WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest, processId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType>;
|
||||
deleteProcessWorkItemType(processId: string, witRefName: string): Promise<void>;
|
||||
getProcessWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType>;
|
||||
getProcessWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType[]>;
|
||||
updateProcessWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType>;
|
||||
addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior>;
|
||||
getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior>;
|
||||
getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior[]>;
|
||||
removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<void>;
|
||||
updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior>;
|
||||
}
|
||||
export declare class WorkItemTrackingProcessApi extends basem.ClientApiBase implements IWorkItemTrackingProcessApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
/**
|
||||
* Creates a single behavior in the given process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest} behavior
|
||||
* @param {string} processId - The ID of the process
|
||||
*/
|
||||
createProcessBehavior(behavior: WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest, processId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior>;
|
||||
/**
|
||||
* Removes a behavior in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} behaviorRefName - The reference name of the behavior
|
||||
*/
|
||||
deleteProcessBehavior(processId: string, behaviorRefName: string): Promise<void>;
|
||||
/**
|
||||
* Returns a behavior of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} behaviorRefName - The reference name of the behavior
|
||||
* @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand
|
||||
*/
|
||||
getProcessBehavior(processId: string, behaviorRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior>;
|
||||
/**
|
||||
* Returns a list of all behaviors in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand
|
||||
*/
|
||||
getProcessBehaviors(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior[]>;
|
||||
/**
|
||||
* Replaces a behavior in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest} behaviorData
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} behaviorRefName - The reference name of the behavior
|
||||
*/
|
||||
updateProcessBehavior(behaviorData: WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest, processId: string, behaviorRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessBehavior>;
|
||||
/**
|
||||
* Creates a control in a group.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Control} control - The control.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} groupId - The ID of the group to add the control to.
|
||||
*/
|
||||
createControlInGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise<WorkItemTrackingProcessInterfaces.Control>;
|
||||
/**
|
||||
* Moves a control to a specified group.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Control} control - The control.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} groupId - The ID of the group to move the control to.
|
||||
* @param {string} controlId - The ID of the control.
|
||||
* @param {string} removeFromGroupId - The group ID to remove the control from.
|
||||
*/
|
||||
moveControlToGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise<WorkItemTrackingProcessInterfaces.Control>;
|
||||
/**
|
||||
* Removes a control from the work item form.
|
||||
*
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} groupId - The ID of the group.
|
||||
* @param {string} controlId - The ID of the control to remove.
|
||||
*/
|
||||
removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise<void>;
|
||||
/**
|
||||
* Updates a control on the work item form.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Control} control - The updated control.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} groupId - The ID of the group.
|
||||
* @param {string} controlId - The ID of the control.
|
||||
*/
|
||||
updateControl(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise<WorkItemTrackingProcessInterfaces.Control>;
|
||||
/**
|
||||
* Adds a field to a work item type.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest} field
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
*/
|
||||
addFieldToWorkItemType(field: WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField>;
|
||||
/**
|
||||
* Returns a list of all fields in a work item type.
|
||||
*
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
*/
|
||||
getAllWorkItemTypeFields(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField[]>;
|
||||
/**
|
||||
* Returns a field in a work item type.
|
||||
*
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} fieldRefName - The reference name of the field.
|
||||
*/
|
||||
getWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField>;
|
||||
/**
|
||||
* Removes a field from a work item type. Does not permanently delete the field.
|
||||
*
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} fieldRefName - The reference name of the field.
|
||||
*/
|
||||
removeWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string): Promise<void>;
|
||||
/**
|
||||
* Updates a field in a work item type.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest} field
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} fieldRefName - The reference name of the field.
|
||||
*/
|
||||
updateWorkItemTypeField(field: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest, processId: string, witRefName: string, fieldRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeField>;
|
||||
/**
|
||||
* Adds a group to the work item form.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Group} group - The group.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} pageId - The ID of the page to add the group to.
|
||||
* @param {string} sectionId - The ID of the section to add the group to.
|
||||
*/
|
||||
addGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
/**
|
||||
* Moves a group to a different page and section.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} pageId - The ID of the page the group is in.
|
||||
* @param {string} sectionId - The ID of the section the group is i.n
|
||||
* @param {string} groupId - The ID of the group.
|
||||
* @param {string} removeFromPageId - ID of the page to remove the group from.
|
||||
* @param {string} removeFromSectionId - ID of the section to remove the group from.
|
||||
*/
|
||||
moveGroupToPage(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
/**
|
||||
* Moves a group to a different section.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} pageId - The ID of the page the group is in.
|
||||
* @param {string} sectionId - The ID of the section the group is in.
|
||||
* @param {string} groupId - The ID of the group.
|
||||
* @param {string} removeFromSectionId - ID of the section to remove the group from.
|
||||
*/
|
||||
moveGroupToSection(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
/**
|
||||
* Removes a group from the work item form.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page the group is in
|
||||
* @param {string} sectionId - The ID of the section to the group is in
|
||||
* @param {string} groupId - The ID of the group
|
||||
*/
|
||||
removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<void>;
|
||||
/**
|
||||
* Updates a group in the work item form.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
* @param {string} pageId - The ID of the page the group is in.
|
||||
* @param {string} sectionId - The ID of the section the group is in.
|
||||
* @param {string} groupId - The ID of the group.
|
||||
*/
|
||||
updateGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<WorkItemTrackingProcessInterfaces.Group>;
|
||||
/**
|
||||
* Gets the form layout.
|
||||
*
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
*/
|
||||
getFormLayout(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.FormLayout>;
|
||||
/**
|
||||
* Creates a picklist.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.PickList} picklist - Picklist
|
||||
*/
|
||||
createList(picklist: WorkItemTrackingProcessInterfaces.PickList): Promise<WorkItemTrackingProcessInterfaces.PickList>;
|
||||
/**
|
||||
* Removes a picklist.
|
||||
*
|
||||
* @param {string} listId - The ID of the list
|
||||
*/
|
||||
deleteList(listId: string): Promise<void>;
|
||||
/**
|
||||
* Returns a picklist.
|
||||
*
|
||||
* @param {string} listId - The ID of the list
|
||||
*/
|
||||
getList(listId: string): Promise<WorkItemTrackingProcessInterfaces.PickList>;
|
||||
/**
|
||||
* Returns meta data of the picklist.
|
||||
*
|
||||
*/
|
||||
getListsMetadata(): Promise<WorkItemTrackingProcessInterfaces.PickListMetadata[]>;
|
||||
/**
|
||||
* Updates a list.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.PickList} picklist
|
||||
* @param {string} listId - The ID of the list
|
||||
*/
|
||||
updateList(picklist: WorkItemTrackingProcessInterfaces.PickList, listId: string): Promise<WorkItemTrackingProcessInterfaces.PickList>;
|
||||
/**
|
||||
* Adds a page to the work item form.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Page} page - The page.
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
*/
|
||||
addPage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.Page>;
|
||||
/**
|
||||
* Removes a page from the work item form
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page
|
||||
*/
|
||||
removePage(processId: string, witRefName: string, pageId: string): Promise<void>;
|
||||
/**
|
||||
* Updates a page on the work item form
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.Page} page - The page
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
updatePage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.Page>;
|
||||
/**
|
||||
* Creates a process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.CreateProcessModel} createRequest - CreateProcessModel.
|
||||
*/
|
||||
createNewProcess(createRequest: WorkItemTrackingProcessInterfaces.CreateProcessModel): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo>;
|
||||
/**
|
||||
* Removes a process of a specific ID.
|
||||
*
|
||||
* @param {string} processTypeId
|
||||
*/
|
||||
deleteProcessById(processTypeId: string): Promise<void>;
|
||||
/**
|
||||
* Edit a process of a specific ID.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.UpdateProcessModel} updateRequest
|
||||
* @param {string} processTypeId
|
||||
*/
|
||||
editProcess(updateRequest: WorkItemTrackingProcessInterfaces.UpdateProcessModel, processTypeId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo>;
|
||||
/**
|
||||
* Get list of all processes including system and inherited.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand
|
||||
*/
|
||||
getListOfProcesses(expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo[]>;
|
||||
/**
|
||||
* Get a single process of a specified ID.
|
||||
*
|
||||
* @param {string} processTypeId
|
||||
* @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand
|
||||
*/
|
||||
getProcessByItsId(processTypeId: string, expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise<WorkItemTrackingProcessInterfaces.ProcessInfo>;
|
||||
/**
|
||||
* Adds a rule to work item type in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest} processRuleCreate
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
addProcessWorkItemTypeRule(processRuleCreate: WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule>;
|
||||
/**
|
||||
* Removes a rule from the work item type in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} ruleId - The ID of the rule
|
||||
*/
|
||||
deleteProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise<void>;
|
||||
/**
|
||||
* Returns a single rule in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} ruleId - The ID of the rule
|
||||
*/
|
||||
getProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule>;
|
||||
/**
|
||||
* Returns a list of all rules in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
getProcessWorkItemTypeRules(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule[]>;
|
||||
/**
|
||||
* Updates a rule in the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest} processRule
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} ruleId - The ID of the rule
|
||||
*/
|
||||
updateProcessWorkItemTypeRule(processRule: WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest, processId: string, witRefName: string, ruleId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessRule>;
|
||||
/**
|
||||
* Creates a state definition in the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
createStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Removes a state definition in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - ID of the state
|
||||
*/
|
||||
deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise<void>;
|
||||
/**
|
||||
* Returns a single state definition in a work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - The ID of the state
|
||||
*/
|
||||
getStateDefinition(processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Returns a list of all state definitions in a work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
getStateDefinitions(processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel[]>;
|
||||
/**
|
||||
* Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.HideStateModel} hideStateModel
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - The ID of the state
|
||||
*/
|
||||
hideStateDefinition(hideStateModel: WorkItemTrackingProcessInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Updates a given state definition in the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel
|
||||
* @param {string} processId - ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - ID of the state
|
||||
*/
|
||||
updateStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Creates a work item type in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest} workItemType
|
||||
* @param {string} processId - The ID of the process on which to create work item type.
|
||||
*/
|
||||
createProcessWorkItemType(workItemType: WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest, processId: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType>;
|
||||
/**
|
||||
* Removes a work itewm type in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process.
|
||||
* @param {string} witRefName - The reference name of the work item type.
|
||||
*/
|
||||
deleteProcessWorkItemType(processId: string, witRefName: string): Promise<void>;
|
||||
/**
|
||||
* Returns a single work item type in a process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return
|
||||
*/
|
||||
getProcessWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType>;
|
||||
/**
|
||||
* Returns a list of all work item types in a process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return
|
||||
*/
|
||||
getProcessWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType[]>;
|
||||
/**
|
||||
* Updates a work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest} workItemTypeUpdate
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
updateProcessWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest, processId: string, witRefName: string): Promise<WorkItemTrackingProcessInterfaces.ProcessWorkItemType>;
|
||||
/**
|
||||
* Adds a behavior to the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
*/
|
||||
addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior>;
|
||||
/**
|
||||
* Returns a behavior for the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
* @param {string} behaviorRefName - The reference name of the behavior
|
||||
*/
|
||||
getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior>;
|
||||
/**
|
||||
* Returns a list of all behaviors for the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
*/
|
||||
getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior[]>;
|
||||
/**
|
||||
* Removes a behavior for the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
* @param {string} behaviorRefName - The reference name of the behavior
|
||||
*/
|
||||
removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<void>;
|
||||
/**
|
||||
* Updates a behavior for the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
*/
|
||||
updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior>;
|
||||
}
|
||||
Generated
Vendored
+1640
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+415
@@ -0,0 +1,415 @@
|
||||
import basem = require('./ClientApiBases');
|
||||
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
||||
import WorkItemTrackingProcessDefinitionsInterfaces = require("./interfaces/WorkItemTrackingProcessDefinitionsInterfaces");
|
||||
export interface IWorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase {
|
||||
createBehavior(behavior: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel>;
|
||||
deleteBehavior(processId: string, behaviorId: string): Promise<void>;
|
||||
getBehavior(processId: string, behaviorId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel>;
|
||||
getBehaviors(processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel[]>;
|
||||
replaceBehavior(behaviorData: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel, processId: string, behaviorId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel>;
|
||||
addControlToGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Control>;
|
||||
editControl(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Control>;
|
||||
removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise<void>;
|
||||
setControlInGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Control>;
|
||||
createField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldModel, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.FieldModel>;
|
||||
updateField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.FieldModel>;
|
||||
addGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
editGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<void>;
|
||||
setGroupInPage(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
setGroupInSection(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
getFormLayout(processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.FormLayout>;
|
||||
getListsMetadata(): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListMetadataModel[]>;
|
||||
createList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListModel>;
|
||||
deleteList(listId: string): Promise<void>;
|
||||
getList(listId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListModel>;
|
||||
updateList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel, listId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListModel>;
|
||||
addPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Page>;
|
||||
editPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Page>;
|
||||
removePage(processId: string, witRefName: string, pageId: string): Promise<void>;
|
||||
createStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise<void>;
|
||||
getStateDefinition(processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
getStateDefinitions(processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel[]>;
|
||||
hideStateDefinition(hideStateModel: WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
updateStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior>;
|
||||
getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior>;
|
||||
getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior[]>;
|
||||
removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<void>;
|
||||
updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior>;
|
||||
createWorkItemType(workItemType: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel>;
|
||||
deleteWorkItemType(processId: string, witRefName: string): Promise<void>;
|
||||
getWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel>;
|
||||
getWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel[]>;
|
||||
updateWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel>;
|
||||
addFieldToWorkItemType(field: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2>;
|
||||
getWorkItemTypeField(processId: string, witRefNameForFields: string, fieldRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2>;
|
||||
getWorkItemTypeFields(processId: string, witRefNameForFields: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2[]>;
|
||||
removeFieldFromWorkItemType(processId: string, witRefNameForFields: string, fieldRefName: string): Promise<void>;
|
||||
}
|
||||
export declare class WorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase implements IWorkItemTrackingProcessDefinitionsApi {
|
||||
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
||||
static readonly RESOURCE_AREA_ID: string;
|
||||
/**
|
||||
* Creates a single behavior in the given process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel} behavior
|
||||
* @param {string} processId - The ID of the process
|
||||
*/
|
||||
createBehavior(behavior: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel>;
|
||||
/**
|
||||
* Removes a behavior in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} behaviorId - The ID of the behavior
|
||||
*/
|
||||
deleteBehavior(processId: string, behaviorId: string): Promise<void>;
|
||||
/**
|
||||
* Returns a single behavior in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} behaviorId - The ID of the behavior
|
||||
*/
|
||||
getBehavior(processId: string, behaviorId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel>;
|
||||
/**
|
||||
* Returns a list of all behaviors in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
*/
|
||||
getBehaviors(processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel[]>;
|
||||
/**
|
||||
* Replaces a behavior in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel} behaviorData
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} behaviorId - The ID of the behavior
|
||||
*/
|
||||
replaceBehavior(behaviorData: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel, processId: string, behaviorId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.BehaviorModel>;
|
||||
/**
|
||||
* Creates a control in a group
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} groupId - The ID of the group to add the control to
|
||||
*/
|
||||
addControlToGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Control>;
|
||||
/**
|
||||
* Updates a control on the work item form
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The updated control
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} groupId - The ID of the group
|
||||
* @param {string} controlId - The ID of the control
|
||||
*/
|
||||
editControl(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Control>;
|
||||
/**
|
||||
* Removes a control from the work item form
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} groupId - The ID of the group
|
||||
* @param {string} controlId - The ID of the control to remove
|
||||
*/
|
||||
removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise<void>;
|
||||
/**
|
||||
* Moves a control to a new group
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} groupId - The ID of the group to move the control to
|
||||
* @param {string} controlId - The id of the control
|
||||
* @param {string} removeFromGroupId - The group to remove the control from
|
||||
*/
|
||||
setControlInGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Control>;
|
||||
/**
|
||||
* Creates a single field in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldModel} field
|
||||
* @param {string} processId - The ID of the process
|
||||
*/
|
||||
createField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldModel, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.FieldModel>;
|
||||
/**
|
||||
* Updates a given field in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate} field
|
||||
* @param {string} processId - The ID of the process
|
||||
*/
|
||||
updateField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.FieldModel>;
|
||||
/**
|
||||
* Adds a group to the work item form
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The group
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page to add the group to
|
||||
* @param {string} sectionId - The ID of the section to add the group to
|
||||
*/
|
||||
addGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
/**
|
||||
* Updates a group in the work item form
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page the group is in
|
||||
* @param {string} sectionId - The ID of the section the group is in
|
||||
* @param {string} groupId - The ID of the group
|
||||
*/
|
||||
editGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
/**
|
||||
* Removes a group from the work item form
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page the group is in
|
||||
* @param {string} sectionId - The ID of the section to the group is in
|
||||
* @param {string} groupId - The ID of the group
|
||||
*/
|
||||
removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<void>;
|
||||
/**
|
||||
* Moves a group to a different page and section
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page the group is in
|
||||
* @param {string} sectionId - The ID of the section the group is in
|
||||
* @param {string} groupId - The ID of the group
|
||||
* @param {string} removeFromPageId - ID of the page to remove the group from
|
||||
* @param {string} removeFromSectionId - ID of the section to remove the group from
|
||||
*/
|
||||
setGroupInPage(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
/**
|
||||
* Moves a group to a different section
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page the group is in
|
||||
* @param {string} sectionId - The ID of the section the group is in
|
||||
* @param {string} groupId - The ID of the group
|
||||
* @param {string} removeFromSectionId - ID of the section to remove the group from
|
||||
*/
|
||||
setGroupInSection(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Group>;
|
||||
/**
|
||||
* Gets the form layout
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
getFormLayout(processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.FormLayout>;
|
||||
/**
|
||||
* Returns meta data of the picklist.
|
||||
*
|
||||
*/
|
||||
getListsMetadata(): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListMetadataModel[]>;
|
||||
/**
|
||||
* Creates a picklist.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist
|
||||
*/
|
||||
createList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListModel>;
|
||||
/**
|
||||
* Removes a picklist.
|
||||
*
|
||||
* @param {string} listId - The ID of the list
|
||||
*/
|
||||
deleteList(listId: string): Promise<void>;
|
||||
/**
|
||||
* Returns a picklist.
|
||||
*
|
||||
* @param {string} listId - The ID of the list
|
||||
*/
|
||||
getList(listId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListModel>;
|
||||
/**
|
||||
* Updates a list.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist
|
||||
* @param {string} listId - The ID of the list
|
||||
*/
|
||||
updateList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel, listId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.PickListModel>;
|
||||
/**
|
||||
* Adds a page to the work item form
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
addPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Page>;
|
||||
/**
|
||||
* Updates a page on the work item form
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
editPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.Page>;
|
||||
/**
|
||||
* Removes a page from the work item form
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} pageId - The ID of the page
|
||||
*/
|
||||
removePage(processId: string, witRefName: string, pageId: string): Promise<void>;
|
||||
/**
|
||||
* Creates a state definition in the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
createStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Removes a state definition in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - ID of the state
|
||||
*/
|
||||
deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise<void>;
|
||||
/**
|
||||
* Returns a state definition in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - The ID of the state
|
||||
*/
|
||||
getStateDefinition(processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Returns a list of all state definitions in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
getStateDefinitions(processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel[]>;
|
||||
/**
|
||||
* Hides a state definition in the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel} hideStateModel
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - The ID of the state
|
||||
*/
|
||||
hideStateDefinition(hideStateModel: WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Updates a given state definition in the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel
|
||||
* @param {string} processId - ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {string} stateId - ID of the state
|
||||
*/
|
||||
updateStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateResultModel>;
|
||||
/**
|
||||
* Adds a behavior to the work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
*/
|
||||
addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior>;
|
||||
/**
|
||||
* Returns a behavior for the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
* @param {string} behaviorRefName - The reference name of the behavior
|
||||
*/
|
||||
getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior>;
|
||||
/**
|
||||
* Returns a list of all behaviors for the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
*/
|
||||
getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior[]>;
|
||||
/**
|
||||
* Removes a behavior for the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
* @param {string} behaviorRefName - The reference name of the behavior
|
||||
*/
|
||||
removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<void>;
|
||||
/**
|
||||
* Updates default work item type for the behavior of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForBehaviors - Work item type reference name for the behavior
|
||||
*/
|
||||
updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior>;
|
||||
/**
|
||||
* Creates a work item type in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel} workItemType
|
||||
* @param {string} processId - The ID of the process
|
||||
*/
|
||||
createWorkItemType(workItemType: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel, processId: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel>;
|
||||
/**
|
||||
* Removes a work itewm type in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
deleteWorkItemType(processId: string, witRefName: string): Promise<void>;
|
||||
/**
|
||||
* Returns a work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand
|
||||
*/
|
||||
getWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel>;
|
||||
/**
|
||||
* Returns a list of all work item types in the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand
|
||||
*/
|
||||
getWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel[]>;
|
||||
/**
|
||||
* Updates a work item type of the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel} workItemTypeUpdate
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefName - The reference name of the work item type
|
||||
*/
|
||||
updateWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel, processId: string, witRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel>;
|
||||
/**
|
||||
* Adds a field to the work item type in the process.
|
||||
*
|
||||
* @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForFields - Work item type reference name for the field
|
||||
*/
|
||||
addFieldToWorkItemType(field: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2>;
|
||||
/**
|
||||
* Returns a single field in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForFields - Work item type reference name for fields
|
||||
* @param {string} fieldRefName - The reference name of the field
|
||||
*/
|
||||
getWorkItemTypeField(processId: string, witRefNameForFields: string, fieldRefName: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2>;
|
||||
/**
|
||||
* Returns a list of all fields in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForFields - Work item type reference name for fields
|
||||
*/
|
||||
getWorkItemTypeFields(processId: string, witRefNameForFields: string): Promise<WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2[]>;
|
||||
/**
|
||||
* Removes a field in the work item type of the process.
|
||||
*
|
||||
* @param {string} processId - The ID of the process
|
||||
* @param {string} witRefNameForFields - Work item type reference name for fields
|
||||
* @param {string} fieldRefName - The reference name of the field
|
||||
*/
|
||||
removeFieldFromWorkItemType(processId: string, witRefNameForFields: string, fieldRefName: string): Promise<void>;
|
||||
}
|
||||
Generated
Vendored
+1374
File diff suppressed because it is too large
Load Diff
+5
@@ -0,0 +1,5 @@
|
||||
import ifm = require('../interfaces/common/VsoBaseInterfaces');
|
||||
import * as resthandlers from 'typed-rest-client/Handlers';
|
||||
export declare class BasicCredentialHandler extends resthandlers.BasicCredentialHandler implements ifm.IRequestHandler {
|
||||
constructor(username: string, password: string);
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const resthandlers = require("typed-rest-client/Handlers");
|
||||
class BasicCredentialHandler extends resthandlers.BasicCredentialHandler {
|
||||
constructor(username, password) {
|
||||
super(username, password);
|
||||
}
|
||||
}
|
||||
exports.BasicCredentialHandler = BasicCredentialHandler;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import ifm = require('../interfaces/common/VsoBaseInterfaces');
|
||||
import * as resthandlers from 'typed-rest-client/Handlers';
|
||||
export declare class BearerCredentialHandler extends resthandlers.BearerCredentialHandler implements ifm.IRequestHandler {
|
||||
constructor(token: string);
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const resthandlers = require("typed-rest-client/Handlers");
|
||||
class BearerCredentialHandler extends resthandlers.BearerCredentialHandler {
|
||||
constructor(token) {
|
||||
super(token);
|
||||
}
|
||||
}
|
||||
exports.BearerCredentialHandler = BearerCredentialHandler;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import ifm = require('../interfaces/common/VsoBaseInterfaces');
|
||||
import * as resthandlers from 'typed-rest-client/Handlers';
|
||||
export declare class NtlmCredentialHandler extends resthandlers.NtlmCredentialHandler implements ifm.IRequestHandler {
|
||||
constructor(username: string, password: string, workstation?: string, domain?: string);
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const resthandlers = require("typed-rest-client/Handlers");
|
||||
class NtlmCredentialHandler extends resthandlers.NtlmCredentialHandler {
|
||||
constructor(username, password, workstation, domain) {
|
||||
super(username, password, workstation, domain);
|
||||
}
|
||||
}
|
||||
exports.NtlmCredentialHandler = NtlmCredentialHandler;
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import ifm = require('../interfaces/common/VsoBaseInterfaces');
|
||||
import * as resthandlers from 'typed-rest-client/Handlers';
|
||||
export declare class PersonalAccessTokenCredentialHandler extends resthandlers.PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler {
|
||||
constructor(token: string);
|
||||
}
|
||||
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const resthandlers = require("typed-rest-client/Handlers");
|
||||
class PersonalAccessTokenCredentialHandler extends resthandlers.PersonalAccessTokenCredentialHandler {
|
||||
constructor(token) {
|
||||
super(token);
|
||||
}
|
||||
}
|
||||
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
|
||||
Generated
Vendored
+3190
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1452
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+451
@@ -0,0 +1,451 @@
|
||||
import IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces");
|
||||
import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
|
||||
export declare enum ConnectedServiceKind {
|
||||
/**
|
||||
* Custom or unknown service
|
||||
*/
|
||||
Custom = 0,
|
||||
/**
|
||||
* Azure Subscription
|
||||
*/
|
||||
AzureSubscription = 1,
|
||||
/**
|
||||
* Chef Connection
|
||||
*/
|
||||
Chef = 2,
|
||||
/**
|
||||
* Generic Connection
|
||||
*/
|
||||
Generic = 3,
|
||||
}
|
||||
export interface IdentityData {
|
||||
identityIds?: string[];
|
||||
}
|
||||
export interface Process extends ProcessReference {
|
||||
_links?: any;
|
||||
description?: string;
|
||||
id?: string;
|
||||
isDefault?: boolean;
|
||||
type?: ProcessType;
|
||||
}
|
||||
export interface ProcessReference {
|
||||
name?: string;
|
||||
url?: string;
|
||||
}
|
||||
export declare enum ProcessType {
|
||||
System = 0,
|
||||
Custom = 1,
|
||||
Inherited = 2,
|
||||
}
|
||||
export declare enum ProjectChangeType {
|
||||
Modified = 0,
|
||||
Deleted = 1,
|
||||
Added = 2,
|
||||
}
|
||||
/**
|
||||
* Contains information of the project
|
||||
*/
|
||||
export interface ProjectInfo {
|
||||
abbreviation?: string;
|
||||
description?: string;
|
||||
id?: string;
|
||||
lastUpdateTime?: Date;
|
||||
name?: string;
|
||||
properties?: ProjectProperty[];
|
||||
/**
|
||||
* Current revision of the project
|
||||
*/
|
||||
revision?: number;
|
||||
state?: any;
|
||||
uri?: string;
|
||||
version?: number;
|
||||
visibility?: ProjectVisibility;
|
||||
}
|
||||
export interface ProjectMessage {
|
||||
project?: ProjectInfo;
|
||||
projectChangeType?: ProjectChangeType;
|
||||
shouldInvalidateSystemStore?: boolean;
|
||||
}
|
||||
export interface ProjectProperty {
|
||||
name?: string;
|
||||
value?: any;
|
||||
}
|
||||
export declare enum ProjectVisibility {
|
||||
Unchanged = -1,
|
||||
Private = 0,
|
||||
Organization = 1,
|
||||
Public = 2,
|
||||
SystemPrivate = 3,
|
||||
}
|
||||
export interface Proxy {
|
||||
authorization?: ProxyAuthorization;
|
||||
/**
|
||||
* This is a description string
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The friendly name of the server
|
||||
*/
|
||||
friendlyName?: string;
|
||||
globalDefault?: boolean;
|
||||
/**
|
||||
* This is a string representation of the site that the proxy server is located in (e.g. "NA-WA-RED")
|
||||
*/
|
||||
site?: string;
|
||||
siteDefault?: boolean;
|
||||
/**
|
||||
* The URL of the proxy server
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
export interface ProxyAuthorization {
|
||||
/**
|
||||
* Gets or sets the endpoint used to obtain access tokens from the configured token service.
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
/**
|
||||
* Gets or sets the client identifier for this proxy.
|
||||
*/
|
||||
clientId?: string;
|
||||
/**
|
||||
* Gets or sets the user identity to authorize for on-prem.
|
||||
*/
|
||||
identity?: IdentitiesInterfaces.IdentityDescriptor;
|
||||
/**
|
||||
* Gets or sets the public key used to verify the identity of this proxy. Only specify on hosted.
|
||||
*/
|
||||
publicKey?: VSSInterfaces.PublicKey;
|
||||
}
|
||||
export declare enum SourceControlTypes {
|
||||
Tfvc = 1,
|
||||
Git = 2,
|
||||
}
|
||||
/**
|
||||
* The Team Context for an operation.
|
||||
*/
|
||||
export interface TeamContext {
|
||||
/**
|
||||
* The team project Id or name. Ignored if ProjectId is set.
|
||||
*/
|
||||
project?: string;
|
||||
/**
|
||||
* The Team Project ID. Required if Project is not set.
|
||||
*/
|
||||
projectId?: string;
|
||||
/**
|
||||
* The Team Id or name. Ignored if TeamId is set.
|
||||
*/
|
||||
team?: string;
|
||||
/**
|
||||
* The Team Id
|
||||
*/
|
||||
teamId?: string;
|
||||
}
|
||||
/**
|
||||
* Represents a Team Project object.
|
||||
*/
|
||||
export interface TeamProject extends TeamProjectReference {
|
||||
/**
|
||||
* The links to other objects related to this object.
|
||||
*/
|
||||
_links?: any;
|
||||
/**
|
||||
* Set of capabilities this project has (such as process template & version control).
|
||||
*/
|
||||
capabilities?: {
|
||||
[key: string]: {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* The shallow ref to the default team.
|
||||
*/
|
||||
defaultTeam?: WebApiTeamRef;
|
||||
}
|
||||
/**
|
||||
* Data contract for a TeamProjectCollection.
|
||||
*/
|
||||
export interface TeamProjectCollection extends TeamProjectCollectionReference {
|
||||
/**
|
||||
* The links to other objects related to this object.
|
||||
*/
|
||||
_links?: any;
|
||||
/**
|
||||
* Project collection description.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* True if collection supports inherited process customization model.
|
||||
*/
|
||||
enableInheritedProcessCustomization?: boolean;
|
||||
/**
|
||||
* Project collection state.
|
||||
*/
|
||||
state?: string;
|
||||
}
|
||||
/**
|
||||
* Reference object for a TeamProjectCollection.
|
||||
*/
|
||||
export interface TeamProjectCollectionReference {
|
||||
/**
|
||||
* Collection Id.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Collection Name.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Collection REST Url.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* Represents a shallow reference to a TeamProject.
|
||||
*/
|
||||
export interface TeamProjectReference {
|
||||
/**
|
||||
* Project abbreviation.
|
||||
*/
|
||||
abbreviation?: string;
|
||||
/**
|
||||
* The project's description (if any).
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Project identifier.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Project name.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Project revision.
|
||||
*/
|
||||
revision?: number;
|
||||
/**
|
||||
* Project state.
|
||||
*/
|
||||
state?: any;
|
||||
/**
|
||||
* Url to the full version of the object.
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* Project visibility.
|
||||
*/
|
||||
visibility?: ProjectVisibility;
|
||||
}
|
||||
/**
|
||||
* A data transfer object that stores the metadata associated with the creation of temporary data.
|
||||
*/
|
||||
export interface TemporaryDataCreatedDTO extends TemporaryDataDTO {
|
||||
expirationDate?: Date;
|
||||
id?: string;
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* A data transfer object that stores the metadata associated with the temporary data.
|
||||
*/
|
||||
export interface TemporaryDataDTO {
|
||||
expirationSeconds?: number;
|
||||
origin?: string;
|
||||
value?: any;
|
||||
}
|
||||
export interface WebApiConnectedService extends WebApiConnectedServiceRef {
|
||||
/**
|
||||
* The user who did the OAuth authentication to created this service
|
||||
*/
|
||||
authenticatedBy?: VSSInterfaces.IdentityRef;
|
||||
/**
|
||||
* Extra description on the service.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Friendly Name of service connection
|
||||
*/
|
||||
friendlyName?: string;
|
||||
/**
|
||||
* Id/Name of the connection service. For Ex: Subscription Id for Azure Connection
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The kind of service.
|
||||
*/
|
||||
kind?: string;
|
||||
/**
|
||||
* The project associated with this service
|
||||
*/
|
||||
project?: TeamProjectReference;
|
||||
/**
|
||||
* Optional uri to connect directly to the service such as https://windows.azure.com
|
||||
*/
|
||||
serviceUri?: string;
|
||||
}
|
||||
export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef {
|
||||
/**
|
||||
* Meta data for service connection
|
||||
*/
|
||||
connectedServiceMetaData?: WebApiConnectedService;
|
||||
/**
|
||||
* Credential info
|
||||
*/
|
||||
credentialsXml?: string;
|
||||
/**
|
||||
* Optional uri to connect directly to the service such as https://windows.azure.com
|
||||
*/
|
||||
endPoint?: string;
|
||||
}
|
||||
export interface WebApiConnectedServiceRef {
|
||||
id?: string;
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* The representation of data needed to create a tag definition which is sent across the wire.
|
||||
*/
|
||||
export interface WebApiCreateTagRequestData {
|
||||
/**
|
||||
* Name of the tag definition that will be created.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
export interface WebApiProject extends TeamProjectReference {
|
||||
/**
|
||||
* Set of capabilities this project has
|
||||
*/
|
||||
capabilities?: {
|
||||
[key: string]: {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Reference to collection which contains this project
|
||||
*/
|
||||
collection?: WebApiProjectCollectionRef;
|
||||
/**
|
||||
* Default team for this project
|
||||
*/
|
||||
defaultTeam?: WebApiTeamRef;
|
||||
}
|
||||
export interface WebApiProjectCollection extends WebApiProjectCollectionRef {
|
||||
/**
|
||||
* Project collection description
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Project collection state
|
||||
*/
|
||||
state?: string;
|
||||
}
|
||||
export interface WebApiProjectCollectionRef {
|
||||
/**
|
||||
* Collection Tfs Url (Host Url)
|
||||
*/
|
||||
collectionUrl?: string;
|
||||
/**
|
||||
* Collection Guid
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Collection Name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Collection REST Url
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* The representation of a tag definition which is sent across the wire.
|
||||
*/
|
||||
export interface WebApiTagDefinition {
|
||||
/**
|
||||
* Whether or not the tag definition is active.
|
||||
*/
|
||||
active?: boolean;
|
||||
/**
|
||||
* ID of the tag definition.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The name of the tag definition.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Resource URL for the Tag Definition.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
export interface WebApiTeam extends WebApiTeamRef {
|
||||
/**
|
||||
* Team description
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Identity REST API Url to this team
|
||||
*/
|
||||
identityUrl?: string;
|
||||
projectId?: string;
|
||||
projectName?: string;
|
||||
}
|
||||
export interface WebApiTeamRef {
|
||||
/**
|
||||
* Team (Identity) Guid. A Team Foundation ID.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Team name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Team REST API Url
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
ConnectedServiceKind: {
|
||||
enumValues: {
|
||||
"custom": number;
|
||||
"azureSubscription": number;
|
||||
"chef": number;
|
||||
"generic": number;
|
||||
};
|
||||
};
|
||||
Process: any;
|
||||
ProcessType: {
|
||||
enumValues: {
|
||||
"system": number;
|
||||
"custom": number;
|
||||
"inherited": number;
|
||||
};
|
||||
};
|
||||
ProjectChangeType: {
|
||||
enumValues: {
|
||||
"modified": number;
|
||||
"deleted": number;
|
||||
"added": number;
|
||||
};
|
||||
};
|
||||
ProjectInfo: any;
|
||||
ProjectMessage: any;
|
||||
ProjectVisibility: {
|
||||
enumValues: {
|
||||
"private": number;
|
||||
"organization": number;
|
||||
"public": number;
|
||||
};
|
||||
};
|
||||
SourceControlTypes: {
|
||||
enumValues: {
|
||||
"tfvc": number;
|
||||
"git": number;
|
||||
};
|
||||
};
|
||||
TeamProject: any;
|
||||
TeamProjectReference: any;
|
||||
TemporaryDataCreatedDTO: any;
|
||||
WebApiConnectedService: any;
|
||||
WebApiConnectedServiceDetails: any;
|
||||
WebApiProject: any;
|
||||
};
|
||||
Generated
Vendored
+152
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var ConnectedServiceKind;
|
||||
(function (ConnectedServiceKind) {
|
||||
/**
|
||||
* Custom or unknown service
|
||||
*/
|
||||
ConnectedServiceKind[ConnectedServiceKind["Custom"] = 0] = "Custom";
|
||||
/**
|
||||
* Azure Subscription
|
||||
*/
|
||||
ConnectedServiceKind[ConnectedServiceKind["AzureSubscription"] = 1] = "AzureSubscription";
|
||||
/**
|
||||
* Chef Connection
|
||||
*/
|
||||
ConnectedServiceKind[ConnectedServiceKind["Chef"] = 2] = "Chef";
|
||||
/**
|
||||
* Generic Connection
|
||||
*/
|
||||
ConnectedServiceKind[ConnectedServiceKind["Generic"] = 3] = "Generic";
|
||||
})(ConnectedServiceKind = exports.ConnectedServiceKind || (exports.ConnectedServiceKind = {}));
|
||||
var ProcessType;
|
||||
(function (ProcessType) {
|
||||
ProcessType[ProcessType["System"] = 0] = "System";
|
||||
ProcessType[ProcessType["Custom"] = 1] = "Custom";
|
||||
ProcessType[ProcessType["Inherited"] = 2] = "Inherited";
|
||||
})(ProcessType = exports.ProcessType || (exports.ProcessType = {}));
|
||||
var ProjectChangeType;
|
||||
(function (ProjectChangeType) {
|
||||
ProjectChangeType[ProjectChangeType["Modified"] = 0] = "Modified";
|
||||
ProjectChangeType[ProjectChangeType["Deleted"] = 1] = "Deleted";
|
||||
ProjectChangeType[ProjectChangeType["Added"] = 2] = "Added";
|
||||
})(ProjectChangeType = exports.ProjectChangeType || (exports.ProjectChangeType = {}));
|
||||
var ProjectVisibility;
|
||||
(function (ProjectVisibility) {
|
||||
ProjectVisibility[ProjectVisibility["Unchanged"] = -1] = "Unchanged";
|
||||
ProjectVisibility[ProjectVisibility["Private"] = 0] = "Private";
|
||||
ProjectVisibility[ProjectVisibility["Organization"] = 1] = "Organization";
|
||||
ProjectVisibility[ProjectVisibility["Public"] = 2] = "Public";
|
||||
ProjectVisibility[ProjectVisibility["SystemPrivate"] = 3] = "SystemPrivate";
|
||||
})(ProjectVisibility = exports.ProjectVisibility || (exports.ProjectVisibility = {}));
|
||||
var SourceControlTypes;
|
||||
(function (SourceControlTypes) {
|
||||
SourceControlTypes[SourceControlTypes["Tfvc"] = 1] = "Tfvc";
|
||||
SourceControlTypes[SourceControlTypes["Git"] = 2] = "Git";
|
||||
})(SourceControlTypes = exports.SourceControlTypes || (exports.SourceControlTypes = {}));
|
||||
exports.TypeInfo = {
|
||||
ConnectedServiceKind: {
|
||||
enumValues: {
|
||||
"custom": 0,
|
||||
"azureSubscription": 1,
|
||||
"chef": 2,
|
||||
"generic": 3
|
||||
}
|
||||
},
|
||||
Process: {},
|
||||
ProcessType: {
|
||||
enumValues: {
|
||||
"system": 0,
|
||||
"custom": 1,
|
||||
"inherited": 2
|
||||
}
|
||||
},
|
||||
ProjectChangeType: {
|
||||
enumValues: {
|
||||
"modified": 0,
|
||||
"deleted": 1,
|
||||
"added": 2
|
||||
}
|
||||
},
|
||||
ProjectInfo: {},
|
||||
ProjectMessage: {},
|
||||
ProjectVisibility: {
|
||||
enumValues: {
|
||||
"private": 0,
|
||||
"organization": 1,
|
||||
"public": 2
|
||||
}
|
||||
},
|
||||
SourceControlTypes: {
|
||||
enumValues: {
|
||||
"tfvc": 1,
|
||||
"git": 2
|
||||
}
|
||||
},
|
||||
TeamProject: {},
|
||||
TeamProjectReference: {},
|
||||
TemporaryDataCreatedDTO: {},
|
||||
WebApiConnectedService: {},
|
||||
WebApiConnectedServiceDetails: {},
|
||||
WebApiProject: {},
|
||||
};
|
||||
exports.TypeInfo.Process.fields = {
|
||||
type: {
|
||||
enumType: exports.TypeInfo.ProcessType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ProjectInfo.fields = {
|
||||
lastUpdateTime: {
|
||||
isDate: true,
|
||||
},
|
||||
visibility: {
|
||||
enumType: exports.TypeInfo.ProjectVisibility
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ProjectMessage.fields = {
|
||||
project: {
|
||||
typeInfo: exports.TypeInfo.ProjectInfo
|
||||
},
|
||||
projectChangeType: {
|
||||
enumType: exports.TypeInfo.ProjectChangeType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.TeamProject.fields = {
|
||||
visibility: {
|
||||
enumType: exports.TypeInfo.ProjectVisibility
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.TeamProjectReference.fields = {
|
||||
visibility: {
|
||||
enumType: exports.TypeInfo.ProjectVisibility
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.TemporaryDataCreatedDTO.fields = {
|
||||
expirationDate: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.WebApiConnectedService.fields = {
|
||||
project: {
|
||||
typeInfo: exports.TypeInfo.TeamProjectReference
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.WebApiConnectedServiceDetails.fields = {
|
||||
connectedServiceMetaData: {
|
||||
typeInfo: exports.TypeInfo.WebApiConnectedService
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.WebApiProject.fields = {
|
||||
visibility: {
|
||||
enumType: exports.TypeInfo.ProjectVisibility
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+334
@@ -0,0 +1,334 @@
|
||||
/**
|
||||
* Model of a Dashboard.
|
||||
*/
|
||||
export interface Dashboard {
|
||||
_links?: any;
|
||||
/**
|
||||
* Description of the dashboard.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Server defined version tracking value, used for edit collision detection.
|
||||
*/
|
||||
eTag?: string;
|
||||
/**
|
||||
* ID of the Dashboard. Provided by service at creation time.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Name of the 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.
|
||||
*/
|
||||
ownerId?: string;
|
||||
/**
|
||||
* Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service.
|
||||
*/
|
||||
position?: number;
|
||||
/**
|
||||
* Interval for client to automatically refresh the dashboard. Expressed in minutes.
|
||||
*/
|
||||
refreshInterval?: number;
|
||||
url?: string;
|
||||
/**
|
||||
* The set of Widgets on the dashboard.
|
||||
*/
|
||||
widgets?: Widget[];
|
||||
}
|
||||
/**
|
||||
* Describes a list of dashboards associated to an owner. Currently, teams own dashboard groups.
|
||||
*/
|
||||
export interface DashboardGroup {
|
||||
_links?: any;
|
||||
/**
|
||||
* A list of Dashboards held by the Dashboard Group
|
||||
*/
|
||||
dashboardEntries?: DashboardGroupEntry[];
|
||||
/**
|
||||
* Deprecated: The old permission model describing the level of permissions for the current team. Pre-M125.
|
||||
*/
|
||||
permission?: GroupMemberPermission;
|
||||
/**
|
||||
* A permissions bit mask describing the security permissions of the current team for dashboards. When this permission is the value None, use GroupMemberPermission. Permissions are evaluated based on the presence of a value other than None, else the GroupMemberPermission will be saved.
|
||||
*/
|
||||
teamDashboardPermission?: TeamDashboardPermission;
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* Dashboard group entry, wraping around Dashboard (needed?)
|
||||
*/
|
||||
export interface DashboardGroupEntry extends Dashboard {
|
||||
}
|
||||
/**
|
||||
* Response from RestAPI when saving and editing DashboardGroupEntry
|
||||
*/
|
||||
export interface DashboardGroupEntryResponse extends DashboardGroupEntry {
|
||||
}
|
||||
export interface DashboardResponse extends DashboardGroupEntry {
|
||||
}
|
||||
/**
|
||||
* identifies the scope of dashboard storage and permissions.
|
||||
*/
|
||||
export declare enum DashboardScope {
|
||||
Collection_User = 0,
|
||||
Project_Team = 1,
|
||||
}
|
||||
export declare enum GroupMemberPermission {
|
||||
None = 0,
|
||||
Edit = 1,
|
||||
Manage = 2,
|
||||
ManagePermissions = 3,
|
||||
}
|
||||
/**
|
||||
* Lightbox configuration
|
||||
*/
|
||||
export interface LightboxOptions {
|
||||
/**
|
||||
* Height of desired lightbox, in pixels
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* True to allow lightbox resizing, false to disallow lightbox resizing, defaults to false.
|
||||
*/
|
||||
resizable?: boolean;
|
||||
/**
|
||||
* Width of desired lightbox, in pixels
|
||||
*/
|
||||
width?: number;
|
||||
}
|
||||
/**
|
||||
* versioning for an artifact as described at: http://semver.org/, of the form major.minor.patch.
|
||||
*/
|
||||
export interface SemanticVersion {
|
||||
/**
|
||||
* Major version when you make incompatible API changes
|
||||
*/
|
||||
major?: number;
|
||||
/**
|
||||
* Minor version when you add functionality in a backwards-compatible manner
|
||||
*/
|
||||
minor?: number;
|
||||
/**
|
||||
* Patch version when you make backwards-compatible bug fixes
|
||||
*/
|
||||
patch?: number;
|
||||
}
|
||||
export declare enum TeamDashboardPermission {
|
||||
None = 0,
|
||||
Read = 1,
|
||||
Create = 2,
|
||||
Edit = 4,
|
||||
Delete = 8,
|
||||
ManagePermissions = 16,
|
||||
}
|
||||
/**
|
||||
* Widget data
|
||||
*/
|
||||
export interface Widget {
|
||||
_links?: any;
|
||||
/**
|
||||
* Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget
|
||||
*/
|
||||
allowedSizes?: WidgetSize[];
|
||||
/**
|
||||
* Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user.
|
||||
*/
|
||||
areSettingsBlockedForUser?: boolean;
|
||||
/**
|
||||
* Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact.
|
||||
*/
|
||||
artifactId?: string;
|
||||
configurationContributionId?: string;
|
||||
configurationContributionRelativeId?: string;
|
||||
contentUri?: string;
|
||||
/**
|
||||
* The id of the underlying contribution defining the supplied Widget Configuration.
|
||||
*/
|
||||
contributionId?: string;
|
||||
/**
|
||||
* Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs
|
||||
*/
|
||||
dashboard?: Dashboard;
|
||||
eTag?: string;
|
||||
id?: string;
|
||||
isEnabled?: boolean;
|
||||
isNameConfigurable?: boolean;
|
||||
lightboxOptions?: LightboxOptions;
|
||||
loadingImageUrl?: string;
|
||||
name?: string;
|
||||
position?: WidgetPosition;
|
||||
settings?: string;
|
||||
settingsVersion?: SemanticVersion;
|
||||
size?: WidgetSize;
|
||||
typeId?: string;
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* Contribution based information describing Dashboard Widgets.
|
||||
*/
|
||||
export interface WidgetMetadata {
|
||||
/**
|
||||
* Sizes supported by the Widget.
|
||||
*/
|
||||
allowedSizes?: WidgetSize[];
|
||||
/**
|
||||
* Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available.
|
||||
*/
|
||||
analyticsServiceRequired?: boolean;
|
||||
/**
|
||||
* Resource for an icon in the widget catalog.
|
||||
*/
|
||||
catalogIconUrl?: string;
|
||||
/**
|
||||
* Opt-in URL string pointing at widget information. Defaults to extension marketplace URL if omitted
|
||||
*/
|
||||
catalogInfoUrl?: string;
|
||||
/**
|
||||
* The id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available.
|
||||
*/
|
||||
configurationContributionId?: string;
|
||||
/**
|
||||
* The relative id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available.
|
||||
*/
|
||||
configurationContributionRelativeId?: string;
|
||||
/**
|
||||
* Indicates if the widget requires configuration before being added to dashboard.
|
||||
*/
|
||||
configurationRequired?: boolean;
|
||||
/**
|
||||
* Uri for the widget content to be loaded from .
|
||||
*/
|
||||
contentUri?: string;
|
||||
/**
|
||||
* The id of the underlying contribution defining the supplied Widget.
|
||||
*/
|
||||
contributionId?: string;
|
||||
/**
|
||||
* Optional default settings to be copied into widget settings.
|
||||
*/
|
||||
defaultSettings?: string;
|
||||
/**
|
||||
* Summary information describing the widget.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Widgets can be disabled by the app store. We'll need to gracefully handle for: - persistence (Allow) - Requests (Tag as disabled, and provide context)
|
||||
*/
|
||||
isEnabled?: boolean;
|
||||
/**
|
||||
* Opt-out boolean that indicates if the widget supports widget name/title configuration. Widgets ignoring the name should set it to false in the manifest.
|
||||
*/
|
||||
isNameConfigurable?: boolean;
|
||||
/**
|
||||
* Opt-out boolean indicating if the widget is hidden from the catalog. Commonly, this is used to allow developers to disable creation of a deprecated widget. A widget must have a functional default state, or have a configuration experience, in order to be visible from the catalog.
|
||||
*/
|
||||
isVisibleFromCatalog?: boolean;
|
||||
/**
|
||||
* Opt-in properties for customizing widget presentation in a "lightbox" dialog.
|
||||
*/
|
||||
lightboxOptions?: LightboxOptions;
|
||||
/**
|
||||
* Resource for a loading placeholder image on dashboard
|
||||
*/
|
||||
loadingImageUrl?: string;
|
||||
/**
|
||||
* User facing name of the widget type. Each widget must use a unique value here.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Publisher Name of this kind of widget.
|
||||
*/
|
||||
publisherName?: string;
|
||||
/**
|
||||
* Data contract required for the widget to function and to work in its container.
|
||||
*/
|
||||
supportedScopes?: WidgetScope[];
|
||||
/**
|
||||
* Contribution target IDs
|
||||
*/
|
||||
targets?: string[];
|
||||
/**
|
||||
* Deprecated: locally unique developer-facing id of this kind of widget. ContributionId provides a globally unique identifier for widget types.
|
||||
*/
|
||||
typeId?: string;
|
||||
}
|
||||
export interface WidgetMetadataResponse {
|
||||
uri?: string;
|
||||
widgetMetadata?: WidgetMetadata;
|
||||
}
|
||||
export interface WidgetPosition {
|
||||
column?: number;
|
||||
row?: number;
|
||||
}
|
||||
/**
|
||||
* Response from RestAPI when saving and editing Widget
|
||||
*/
|
||||
export interface WidgetResponse extends Widget {
|
||||
}
|
||||
/**
|
||||
* data contract required for the widget to function in a webaccess area or page.
|
||||
*/
|
||||
export declare enum WidgetScope {
|
||||
Collection_User = 0,
|
||||
Project_Team = 1,
|
||||
}
|
||||
export interface WidgetSize {
|
||||
/**
|
||||
* The Width of the widget, expressed in dashboard grid columns.
|
||||
*/
|
||||
columnSpan?: number;
|
||||
/**
|
||||
* The height of the widget, expressed in dashboard grid rows.
|
||||
*/
|
||||
rowSpan?: number;
|
||||
}
|
||||
/**
|
||||
* Wrapper class to support HTTP header generation using CreateResponse, ClientHeaderParameter and ClientResponseType in WidgetV2Controller
|
||||
*/
|
||||
export interface WidgetsVersionedList {
|
||||
eTag?: string[];
|
||||
widgets?: Widget[];
|
||||
}
|
||||
export interface WidgetTypesResponse {
|
||||
_links?: any;
|
||||
uri?: string;
|
||||
widgetTypes?: WidgetMetadata[];
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
DashboardGroup: any;
|
||||
DashboardScope: {
|
||||
enumValues: {
|
||||
"collection_User": number;
|
||||
"project_Team": number;
|
||||
};
|
||||
};
|
||||
GroupMemberPermission: {
|
||||
enumValues: {
|
||||
"none": number;
|
||||
"edit": number;
|
||||
"manage": number;
|
||||
"managePermissions": number;
|
||||
};
|
||||
};
|
||||
TeamDashboardPermission: {
|
||||
enumValues: {
|
||||
"none": number;
|
||||
"read": number;
|
||||
"create": number;
|
||||
"edit": number;
|
||||
"delete": number;
|
||||
"managePermissions": number;
|
||||
};
|
||||
};
|
||||
WidgetMetadata: any;
|
||||
WidgetMetadataResponse: any;
|
||||
WidgetScope: {
|
||||
enumValues: {
|
||||
"collection_User": number;
|
||||
"project_Team": number;
|
||||
};
|
||||
};
|
||||
WidgetTypesResponse: any;
|
||||
};
|
||||
Generated
Vendored
+104
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* identifies the scope of dashboard storage and permissions.
|
||||
*/
|
||||
var DashboardScope;
|
||||
(function (DashboardScope) {
|
||||
DashboardScope[DashboardScope["Collection_User"] = 0] = "Collection_User";
|
||||
DashboardScope[DashboardScope["Project_Team"] = 1] = "Project_Team";
|
||||
})(DashboardScope = exports.DashboardScope || (exports.DashboardScope = {}));
|
||||
var GroupMemberPermission;
|
||||
(function (GroupMemberPermission) {
|
||||
GroupMemberPermission[GroupMemberPermission["None"] = 0] = "None";
|
||||
GroupMemberPermission[GroupMemberPermission["Edit"] = 1] = "Edit";
|
||||
GroupMemberPermission[GroupMemberPermission["Manage"] = 2] = "Manage";
|
||||
GroupMemberPermission[GroupMemberPermission["ManagePermissions"] = 3] = "ManagePermissions";
|
||||
})(GroupMemberPermission = exports.GroupMemberPermission || (exports.GroupMemberPermission = {}));
|
||||
var TeamDashboardPermission;
|
||||
(function (TeamDashboardPermission) {
|
||||
TeamDashboardPermission[TeamDashboardPermission["None"] = 0] = "None";
|
||||
TeamDashboardPermission[TeamDashboardPermission["Read"] = 1] = "Read";
|
||||
TeamDashboardPermission[TeamDashboardPermission["Create"] = 2] = "Create";
|
||||
TeamDashboardPermission[TeamDashboardPermission["Edit"] = 4] = "Edit";
|
||||
TeamDashboardPermission[TeamDashboardPermission["Delete"] = 8] = "Delete";
|
||||
TeamDashboardPermission[TeamDashboardPermission["ManagePermissions"] = 16] = "ManagePermissions";
|
||||
})(TeamDashboardPermission = exports.TeamDashboardPermission || (exports.TeamDashboardPermission = {}));
|
||||
/**
|
||||
* data contract required for the widget to function in a webaccess area or page.
|
||||
*/
|
||||
var WidgetScope;
|
||||
(function (WidgetScope) {
|
||||
WidgetScope[WidgetScope["Collection_User"] = 0] = "Collection_User";
|
||||
WidgetScope[WidgetScope["Project_Team"] = 1] = "Project_Team";
|
||||
})(WidgetScope = exports.WidgetScope || (exports.WidgetScope = {}));
|
||||
exports.TypeInfo = {
|
||||
DashboardGroup: {},
|
||||
DashboardScope: {
|
||||
enumValues: {
|
||||
"collection_User": 0,
|
||||
"project_Team": 1
|
||||
}
|
||||
},
|
||||
GroupMemberPermission: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"edit": 1,
|
||||
"manage": 2,
|
||||
"managePermissions": 3
|
||||
}
|
||||
},
|
||||
TeamDashboardPermission: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"read": 1,
|
||||
"create": 2,
|
||||
"edit": 4,
|
||||
"delete": 8,
|
||||
"managePermissions": 16
|
||||
}
|
||||
},
|
||||
WidgetMetadata: {},
|
||||
WidgetMetadataResponse: {},
|
||||
WidgetScope: {
|
||||
enumValues: {
|
||||
"collection_User": 0,
|
||||
"project_Team": 1
|
||||
}
|
||||
},
|
||||
WidgetTypesResponse: {},
|
||||
};
|
||||
exports.TypeInfo.DashboardGroup.fields = {
|
||||
permission: {
|
||||
enumType: exports.TypeInfo.GroupMemberPermission
|
||||
},
|
||||
teamDashboardPermission: {
|
||||
enumType: exports.TypeInfo.TeamDashboardPermission
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.WidgetMetadata.fields = {
|
||||
supportedScopes: {
|
||||
isArray: true,
|
||||
enumType: exports.TypeInfo.WidgetScope
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.WidgetMetadataResponse.fields = {
|
||||
widgetMetadata: {
|
||||
typeInfo: exports.TypeInfo.WidgetMetadata
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.WidgetTypesResponse.fields = {
|
||||
widgetTypes: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.WidgetMetadata
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
export interface DataSourceBindingBase {
|
||||
dataSourceName: string;
|
||||
endpointId: string;
|
||||
endpointUrl: string;
|
||||
parameters: {
|
||||
[key: string]: string;
|
||||
};
|
||||
resultSelector: string;
|
||||
resultTemplate: string;
|
||||
target: string;
|
||||
}
|
||||
export interface ProcessParameters {
|
||||
dataSourceBindings: DataSourceBindingBase[];
|
||||
inputs: TaskInputDefinitionBase[];
|
||||
sourceDefinitions: TaskSourceDefinitionBase[];
|
||||
}
|
||||
export interface TaskInputDefinitionBase {
|
||||
defaultValue: string;
|
||||
groupName: string;
|
||||
helpMarkDown: string;
|
||||
label: string;
|
||||
name: string;
|
||||
options: {
|
||||
[key: string]: string;
|
||||
};
|
||||
properties: {
|
||||
[key: string]: string;
|
||||
};
|
||||
required: boolean;
|
||||
type: string;
|
||||
visibleRule: string;
|
||||
}
|
||||
export interface TaskSourceDefinitionBase {
|
||||
authKey: string;
|
||||
endpoint: string;
|
||||
keySelector: string;
|
||||
selector: string;
|
||||
target: string;
|
||||
}
|
||||
contrib/bake-vscode/node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.js
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
contrib/bake-vscode/node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.d.ts
Generated
Vendored
+1287
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+586
@@ -0,0 +1,586 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const GalleryInterfaces = require("../interfaces/GalleryInterfaces");
|
||||
/**
|
||||
* How the acquisition is assigned
|
||||
*/
|
||||
var AcquisitionAssignmentType;
|
||||
(function (AcquisitionAssignmentType) {
|
||||
AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None";
|
||||
/**
|
||||
* Just assign for me
|
||||
*/
|
||||
AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me";
|
||||
/**
|
||||
* Assign for all users in the account
|
||||
*/
|
||||
AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All";
|
||||
})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {}));
|
||||
var AcquisitionOperationState;
|
||||
(function (AcquisitionOperationState) {
|
||||
/**
|
||||
* Not allowed to use this AcquisitionOperation
|
||||
*/
|
||||
AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow";
|
||||
/**
|
||||
* Allowed to use this AcquisitionOperation
|
||||
*/
|
||||
AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow";
|
||||
/**
|
||||
* Operation has already been completed and is no longer available
|
||||
*/
|
||||
AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed";
|
||||
})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {}));
|
||||
/**
|
||||
* Set of different types of operations that can be requested.
|
||||
*/
|
||||
var AcquisitionOperationType;
|
||||
(function (AcquisitionOperationType) {
|
||||
/**
|
||||
* Not yet used
|
||||
*/
|
||||
AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get";
|
||||
/**
|
||||
* Install this extension into the host provided
|
||||
*/
|
||||
AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install";
|
||||
/**
|
||||
* Buy licenses for this extension and install into the host provided
|
||||
*/
|
||||
AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy";
|
||||
/**
|
||||
* Try this extension
|
||||
*/
|
||||
AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try";
|
||||
/**
|
||||
* Request this extension for installation
|
||||
*/
|
||||
AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request";
|
||||
/**
|
||||
* No action found
|
||||
*/
|
||||
AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None";
|
||||
/**
|
||||
* Request admins for purchasing extension
|
||||
*/
|
||||
AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest";
|
||||
})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {}));
|
||||
/**
|
||||
* Represents different ways of including contributions based on licensing
|
||||
*/
|
||||
var ContributionLicensingBehaviorType;
|
||||
(function (ContributionLicensingBehaviorType) {
|
||||
/**
|
||||
* Default value - only include the contribution if the user is licensed for the extension
|
||||
*/
|
||||
ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfLicensed"] = 0] = "OnlyIfLicensed";
|
||||
/**
|
||||
* Only include the contribution if the user is NOT licensed for the extension
|
||||
*/
|
||||
ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfUnlicensed"] = 1] = "OnlyIfUnlicensed";
|
||||
/**
|
||||
* Always include the contribution regardless of whether or not the user is licensed for the extension
|
||||
*/
|
||||
ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["AlwaysInclude"] = 2] = "AlwaysInclude";
|
||||
})(ContributionLicensingBehaviorType = exports.ContributionLicensingBehaviorType || (exports.ContributionLicensingBehaviorType = {}));
|
||||
/**
|
||||
* The type of value used for a property
|
||||
*/
|
||||
var ContributionPropertyType;
|
||||
(function (ContributionPropertyType) {
|
||||
/**
|
||||
* Contribution type is unknown (value may be anything)
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Unknown"] = 0] = "Unknown";
|
||||
/**
|
||||
* Value is a string
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["String"] = 1] = "String";
|
||||
/**
|
||||
* Value is a Uri
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Uri"] = 2] = "Uri";
|
||||
/**
|
||||
* Value is a GUID
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Guid"] = 4] = "Guid";
|
||||
/**
|
||||
* Value is True or False
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Boolean"] = 8] = "Boolean";
|
||||
/**
|
||||
* Value is an integer
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Integer"] = 16] = "Integer";
|
||||
/**
|
||||
* Value is a double
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Double"] = 32] = "Double";
|
||||
/**
|
||||
* Value is a DateTime object
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["DateTime"] = 64] = "DateTime";
|
||||
/**
|
||||
* Value is a generic Dictionary/JObject/property bag
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Dictionary"] = 128] = "Dictionary";
|
||||
/**
|
||||
* Value is an array
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Array"] = 256] = "Array";
|
||||
/**
|
||||
* Value is an arbitrary/custom object
|
||||
*/
|
||||
ContributionPropertyType[ContributionPropertyType["Object"] = 512] = "Object";
|
||||
})(ContributionPropertyType = exports.ContributionPropertyType || (exports.ContributionPropertyType = {}));
|
||||
/**
|
||||
* Options that control the contributions to include in a query
|
||||
*/
|
||||
var ContributionQueryOptions;
|
||||
(function (ContributionQueryOptions) {
|
||||
ContributionQueryOptions[ContributionQueryOptions["None"] = 0] = "None";
|
||||
/**
|
||||
* Include the direct contributions that have the ids queried.
|
||||
*/
|
||||
ContributionQueryOptions[ContributionQueryOptions["IncludeSelf"] = 16] = "IncludeSelf";
|
||||
/**
|
||||
* Include the contributions that directly target the contributions queried.
|
||||
*/
|
||||
ContributionQueryOptions[ContributionQueryOptions["IncludeChildren"] = 32] = "IncludeChildren";
|
||||
/**
|
||||
* Include the contributions from the entire sub-tree targetting the contributions queried.
|
||||
*/
|
||||
ContributionQueryOptions[ContributionQueryOptions["IncludeSubTree"] = 96] = "IncludeSubTree";
|
||||
/**
|
||||
* Include the contribution being queried as well as all contributions that target them recursively.
|
||||
*/
|
||||
ContributionQueryOptions[ContributionQueryOptions["IncludeAll"] = 112] = "IncludeAll";
|
||||
/**
|
||||
* Some callers may want the entire tree back without constraint evaluation being performed.
|
||||
*/
|
||||
ContributionQueryOptions[ContributionQueryOptions["IgnoreConstraints"] = 256] = "IgnoreConstraints";
|
||||
})(ContributionQueryOptions = exports.ContributionQueryOptions || (exports.ContributionQueryOptions = {}));
|
||||
/**
|
||||
* Set of flags applied to extensions that are relevant to contribution consumers
|
||||
*/
|
||||
var ExtensionFlags;
|
||||
(function (ExtensionFlags) {
|
||||
/**
|
||||
* A built-in extension is installed for all VSTS accounts by default
|
||||
*/
|
||||
ExtensionFlags[ExtensionFlags["BuiltIn"] = 1] = "BuiltIn";
|
||||
/**
|
||||
* The extension comes from a fully-trusted publisher
|
||||
*/
|
||||
ExtensionFlags[ExtensionFlags["Trusted"] = 2] = "Trusted";
|
||||
})(ExtensionFlags = exports.ExtensionFlags || (exports.ExtensionFlags = {}));
|
||||
/**
|
||||
* Represents the state of an extension request
|
||||
*/
|
||||
var ExtensionRequestState;
|
||||
(function (ExtensionRequestState) {
|
||||
/**
|
||||
* The request has been opened, but not yet responded to
|
||||
*/
|
||||
ExtensionRequestState[ExtensionRequestState["Open"] = 0] = "Open";
|
||||
/**
|
||||
* The request was accepted (extension installed or license assigned)
|
||||
*/
|
||||
ExtensionRequestState[ExtensionRequestState["Accepted"] = 1] = "Accepted";
|
||||
/**
|
||||
* The request was rejected (extension not installed or license not assigned)
|
||||
*/
|
||||
ExtensionRequestState[ExtensionRequestState["Rejected"] = 2] = "Rejected";
|
||||
})(ExtensionRequestState = exports.ExtensionRequestState || (exports.ExtensionRequestState = {}));
|
||||
var ExtensionRequestUpdateType;
|
||||
(function (ExtensionRequestUpdateType) {
|
||||
ExtensionRequestUpdateType[ExtensionRequestUpdateType["Created"] = 1] = "Created";
|
||||
ExtensionRequestUpdateType[ExtensionRequestUpdateType["Approved"] = 2] = "Approved";
|
||||
ExtensionRequestUpdateType[ExtensionRequestUpdateType["Rejected"] = 3] = "Rejected";
|
||||
ExtensionRequestUpdateType[ExtensionRequestUpdateType["Deleted"] = 4] = "Deleted";
|
||||
})(ExtensionRequestUpdateType = exports.ExtensionRequestUpdateType || (exports.ExtensionRequestUpdateType = {}));
|
||||
/**
|
||||
* States of an extension Note: If you add value to this enum, you need to do 2 other things. First add the back compat enum in value src\Vssf\Sdk\Server\Contributions\InstalledExtensionMessage.cs. Second, you can not send the new value on the message bus. You need to remove it from the message bus event prior to being sent.
|
||||
*/
|
||||
var ExtensionStateFlags;
|
||||
(function (ExtensionStateFlags) {
|
||||
/**
|
||||
* No flags set
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["None"] = 0] = "None";
|
||||
/**
|
||||
* Extension is disabled
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["Disabled"] = 1] = "Disabled";
|
||||
/**
|
||||
* Extension is a built in
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["BuiltIn"] = 2] = "BuiltIn";
|
||||
/**
|
||||
* Extension has multiple versions
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["MultiVersion"] = 4] = "MultiVersion";
|
||||
/**
|
||||
* Extension is not installed. This is for builtin extensions only and can not otherwise be set.
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["UnInstalled"] = 8] = "UnInstalled";
|
||||
/**
|
||||
* Error performing version check
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["VersionCheckError"] = 16] = "VersionCheckError";
|
||||
/**
|
||||
* Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted.
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["Trusted"] = 32] = "Trusted";
|
||||
/**
|
||||
* Extension is currently in an error state
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["Error"] = 64] = "Error";
|
||||
/**
|
||||
* Extension scopes have changed and the extension requires re-authorization
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["NeedsReauthorization"] = 128] = "NeedsReauthorization";
|
||||
/**
|
||||
* Error performing auto-upgrade. For example, if the new version has demands not supported the extension cannot be auto-upgraded.
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["AutoUpgradeError"] = 256] = "AutoUpgradeError";
|
||||
/**
|
||||
* Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported.
|
||||
*/
|
||||
ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning";
|
||||
})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {}));
|
||||
var ExtensionUpdateType;
|
||||
(function (ExtensionUpdateType) {
|
||||
ExtensionUpdateType[ExtensionUpdateType["Installed"] = 1] = "Installed";
|
||||
ExtensionUpdateType[ExtensionUpdateType["Uninstalled"] = 2] = "Uninstalled";
|
||||
ExtensionUpdateType[ExtensionUpdateType["Enabled"] = 3] = "Enabled";
|
||||
ExtensionUpdateType[ExtensionUpdateType["Disabled"] = 4] = "Disabled";
|
||||
ExtensionUpdateType[ExtensionUpdateType["VersionUpdated"] = 5] = "VersionUpdated";
|
||||
ExtensionUpdateType[ExtensionUpdateType["ActionRequired"] = 6] = "ActionRequired";
|
||||
ExtensionUpdateType[ExtensionUpdateType["ActionResolved"] = 7] = "ActionResolved";
|
||||
})(ExtensionUpdateType = exports.ExtensionUpdateType || (exports.ExtensionUpdateType = {}));
|
||||
/**
|
||||
* Installation issue type (Warning, Error)
|
||||
*/
|
||||
var InstalledExtensionStateIssueType;
|
||||
(function (InstalledExtensionStateIssueType) {
|
||||
/**
|
||||
* Represents an installation warning, for example an implicit demand not supported
|
||||
*/
|
||||
InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Warning"] = 0] = "Warning";
|
||||
/**
|
||||
* Represents an installation error, for example an explicit demand not supported
|
||||
*/
|
||||
InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Error"] = 1] = "Error";
|
||||
})(InstalledExtensionStateIssueType = exports.InstalledExtensionStateIssueType || (exports.InstalledExtensionStateIssueType = {}));
|
||||
exports.TypeInfo = {
|
||||
AcquisitionAssignmentType: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"me": 1,
|
||||
"all": 2
|
||||
}
|
||||
},
|
||||
AcquisitionOperation: {},
|
||||
AcquisitionOperationState: {
|
||||
enumValues: {
|
||||
"disallow": 0,
|
||||
"allow": 1,
|
||||
"completed": 3
|
||||
}
|
||||
},
|
||||
AcquisitionOperationType: {
|
||||
enumValues: {
|
||||
"get": 0,
|
||||
"install": 1,
|
||||
"buy": 2,
|
||||
"try": 3,
|
||||
"request": 4,
|
||||
"none": 5,
|
||||
"purchaseRequest": 6
|
||||
}
|
||||
},
|
||||
AcquisitionOptions: {},
|
||||
ContributionLicensingBehaviorType: {
|
||||
enumValues: {
|
||||
"onlyIfLicensed": 0,
|
||||
"onlyIfUnlicensed": 1,
|
||||
"alwaysInclude": 2
|
||||
}
|
||||
},
|
||||
ContributionNodeQuery: {},
|
||||
ContributionPropertyDescription: {},
|
||||
ContributionPropertyType: {
|
||||
enumValues: {
|
||||
"unknown": 0,
|
||||
"string": 1,
|
||||
"uri": 2,
|
||||
"guid": 4,
|
||||
"boolean": 8,
|
||||
"integer": 16,
|
||||
"double": 32,
|
||||
"dateTime": 64,
|
||||
"dictionary": 128,
|
||||
"array": 256,
|
||||
"object": 512
|
||||
}
|
||||
},
|
||||
ContributionQueryOptions: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"includeSelf": 16,
|
||||
"includeChildren": 32,
|
||||
"includeSubTree": 96,
|
||||
"includeAll": 112,
|
||||
"ignoreConstraints": 256
|
||||
}
|
||||
},
|
||||
ContributionType: {},
|
||||
ExtensionAcquisitionRequest: {},
|
||||
ExtensionAuditLog: {},
|
||||
ExtensionAuditLogEntry: {},
|
||||
ExtensionEvent: {},
|
||||
ExtensionFlags: {
|
||||
enumValues: {
|
||||
"builtIn": 1,
|
||||
"trusted": 2
|
||||
}
|
||||
},
|
||||
ExtensionLicensing: {},
|
||||
ExtensionManifest: {},
|
||||
ExtensionRequest: {},
|
||||
ExtensionRequestEvent: {},
|
||||
ExtensionRequestsEvent: {},
|
||||
ExtensionRequestState: {
|
||||
enumValues: {
|
||||
"open": 0,
|
||||
"accepted": 1,
|
||||
"rejected": 2
|
||||
}
|
||||
},
|
||||
ExtensionRequestUpdateType: {
|
||||
enumValues: {
|
||||
"created": 1,
|
||||
"approved": 2,
|
||||
"rejected": 3,
|
||||
"deleted": 4
|
||||
}
|
||||
},
|
||||
ExtensionState: {},
|
||||
ExtensionStateFlags: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"disabled": 1,
|
||||
"builtIn": 2,
|
||||
"multiVersion": 4,
|
||||
"unInstalled": 8,
|
||||
"versionCheckError": 16,
|
||||
"trusted": 32,
|
||||
"error": 64,
|
||||
"needsReauthorization": 128,
|
||||
"autoUpgradeError": 256,
|
||||
"warning": 512
|
||||
}
|
||||
},
|
||||
ExtensionUpdateType: {
|
||||
enumValues: {
|
||||
"installed": 1,
|
||||
"uninstalled": 2,
|
||||
"enabled": 3,
|
||||
"disabled": 4,
|
||||
"versionUpdated": 5,
|
||||
"actionRequired": 6,
|
||||
"actionResolved": 7
|
||||
}
|
||||
},
|
||||
InstalledExtension: {},
|
||||
InstalledExtensionState: {},
|
||||
InstalledExtensionStateIssue: {},
|
||||
InstalledExtensionStateIssueType: {
|
||||
enumValues: {
|
||||
"warning": 0,
|
||||
"error": 1
|
||||
}
|
||||
},
|
||||
LicensingOverride: {},
|
||||
RequestedExtension: {},
|
||||
};
|
||||
exports.TypeInfo.AcquisitionOperation.fields = {
|
||||
operationState: {
|
||||
enumType: exports.TypeInfo.AcquisitionOperationState
|
||||
},
|
||||
operationType: {
|
||||
enumType: exports.TypeInfo.AcquisitionOperationType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.AcquisitionOptions.fields = {
|
||||
defaultOperation: {
|
||||
typeInfo: exports.TypeInfo.AcquisitionOperation
|
||||
},
|
||||
operations: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.AcquisitionOperation
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ContributionNodeQuery.fields = {
|
||||
queryOptions: {
|
||||
enumType: exports.TypeInfo.ContributionQueryOptions
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ContributionPropertyDescription.fields = {
|
||||
type: {
|
||||
enumType: exports.TypeInfo.ContributionPropertyType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ContributionType.fields = {
|
||||
properties: {
|
||||
isDictionary: true,
|
||||
dictionaryValueTypeInfo: exports.TypeInfo.ContributionPropertyDescription
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionAcquisitionRequest.fields = {
|
||||
assignmentType: {
|
||||
enumType: exports.TypeInfo.AcquisitionAssignmentType
|
||||
},
|
||||
operationType: {
|
||||
enumType: exports.TypeInfo.AcquisitionOperationType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionAuditLog.fields = {
|
||||
entries: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.ExtensionAuditLogEntry
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionAuditLogEntry.fields = {
|
||||
auditDate: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionEvent.fields = {
|
||||
extension: {
|
||||
typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension
|
||||
},
|
||||
updateType: {
|
||||
enumType: exports.TypeInfo.ExtensionUpdateType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionLicensing.fields = {
|
||||
overrides: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.LicensingOverride
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionManifest.fields = {
|
||||
contributionTypes: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.ContributionType
|
||||
},
|
||||
licensing: {
|
||||
typeInfo: exports.TypeInfo.ExtensionLicensing
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionRequest.fields = {
|
||||
requestDate: {
|
||||
isDate: true,
|
||||
},
|
||||
requestState: {
|
||||
enumType: exports.TypeInfo.ExtensionRequestState
|
||||
},
|
||||
resolveDate: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionRequestEvent.fields = {
|
||||
extension: {
|
||||
typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension
|
||||
},
|
||||
request: {
|
||||
typeInfo: exports.TypeInfo.ExtensionRequest
|
||||
},
|
||||
updateType: {
|
||||
enumType: exports.TypeInfo.ExtensionRequestUpdateType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionRequestsEvent.fields = {
|
||||
extension: {
|
||||
typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension
|
||||
},
|
||||
requests: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.ExtensionRequest
|
||||
},
|
||||
updateType: {
|
||||
enumType: exports.TypeInfo.ExtensionRequestUpdateType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ExtensionState.fields = {
|
||||
flags: {
|
||||
enumType: exports.TypeInfo.ExtensionStateFlags
|
||||
},
|
||||
installationIssues: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.InstalledExtensionStateIssue
|
||||
},
|
||||
lastUpdated: {
|
||||
isDate: true,
|
||||
},
|
||||
lastVersionCheck: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.InstalledExtension.fields = {
|
||||
contributionTypes: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.ContributionType
|
||||
},
|
||||
flags: {
|
||||
enumType: exports.TypeInfo.ExtensionFlags
|
||||
},
|
||||
installState: {
|
||||
typeInfo: exports.TypeInfo.InstalledExtensionState
|
||||
},
|
||||
lastPublished: {
|
||||
isDate: true,
|
||||
},
|
||||
licensing: {
|
||||
typeInfo: exports.TypeInfo.ExtensionLicensing
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.InstalledExtensionState.fields = {
|
||||
flags: {
|
||||
enumType: exports.TypeInfo.ExtensionStateFlags
|
||||
},
|
||||
installationIssues: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.InstalledExtensionStateIssue
|
||||
},
|
||||
lastUpdated: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.InstalledExtensionStateIssue.fields = {
|
||||
type: {
|
||||
enumType: exports.TypeInfo.InstalledExtensionStateIssueType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.LicensingOverride.fields = {
|
||||
behavior: {
|
||||
enumType: exports.TypeInfo.ContributionLicensingBehaviorType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.RequestedExtension.fields = {
|
||||
extensionRequests: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.ExtensionRequest
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+172
@@ -0,0 +1,172 @@
|
||||
/**
|
||||
* A feature that can be enabled or disabled
|
||||
*/
|
||||
export interface ContributedFeature {
|
||||
/**
|
||||
* Named links describing the feature
|
||||
*/
|
||||
_links?: any;
|
||||
/**
|
||||
* If true, the feature is enabled unless overridden at some scope
|
||||
*/
|
||||
defaultState?: boolean;
|
||||
/**
|
||||
* Rules for setting the default value if not specified by any setting/scope. Evaluated in order until a rule returns an Enabled or Disabled state (not Undefined)
|
||||
*/
|
||||
defaultValueRules?: ContributedFeatureValueRule[];
|
||||
/**
|
||||
* The description of the feature
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Extra properties for the feature
|
||||
*/
|
||||
featureProperties?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
/**
|
||||
* Handler for listening to setter calls on feature value. These listeners are only invoked after a successful set has occured
|
||||
*/
|
||||
featureStateChangedListeners?: ContributedFeatureListener[];
|
||||
/**
|
||||
* The full contribution id of the feature
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* If this is set to true, then the id for this feature will be added to the list of claims for the request.
|
||||
*/
|
||||
includeAsClaim?: boolean;
|
||||
/**
|
||||
* The friendly name of the feature
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Suggested order to display feature in.
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
* Rules for overriding a feature value. These rules are run before explicit user/host state values are checked. They are evaluated in order until a rule returns an Enabled or Disabled state (not Undefined)
|
||||
*/
|
||||
overrideRules?: ContributedFeatureValueRule[];
|
||||
/**
|
||||
* The scopes/levels at which settings can set the enabled/disabled state of this feature
|
||||
*/
|
||||
scopes?: ContributedFeatureSettingScope[];
|
||||
/**
|
||||
* The service instance id of the service that owns this feature
|
||||
*/
|
||||
serviceInstanceType?: string;
|
||||
/**
|
||||
* Tags associated with the feature.
|
||||
*/
|
||||
tags?: string[];
|
||||
}
|
||||
/**
|
||||
* The current state of a feature within a given scope
|
||||
*/
|
||||
export declare enum ContributedFeatureEnabledValue {
|
||||
/**
|
||||
* The state of the feature is not set for the specified scope
|
||||
*/
|
||||
Undefined = -1,
|
||||
/**
|
||||
* The feature is disabled at the specified scope
|
||||
*/
|
||||
Disabled = 0,
|
||||
/**
|
||||
* The feature is enabled at the specified scope
|
||||
*/
|
||||
Enabled = 1,
|
||||
}
|
||||
export interface ContributedFeatureHandlerSettings {
|
||||
/**
|
||||
* Name of the handler to run
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Properties to feed to the handler
|
||||
*/
|
||||
properties?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* An identifier and properties used to pass into a handler for a listener or plugin
|
||||
*/
|
||||
export interface ContributedFeatureListener extends ContributedFeatureHandlerSettings {
|
||||
}
|
||||
/**
|
||||
* The scope to which a feature setting applies
|
||||
*/
|
||||
export interface ContributedFeatureSettingScope {
|
||||
/**
|
||||
* The name of the settings scope to use when reading/writing the setting
|
||||
*/
|
||||
settingScope?: string;
|
||||
/**
|
||||
* Whether this is a user-scope or this is a host-wide (all users) setting
|
||||
*/
|
||||
userScoped?: boolean;
|
||||
}
|
||||
/**
|
||||
* A contributed feature/state pair
|
||||
*/
|
||||
export interface ContributedFeatureState {
|
||||
/**
|
||||
* The full contribution id of the feature
|
||||
*/
|
||||
featureId?: string;
|
||||
/**
|
||||
* True if the effective state was set by an override rule (indicating that the state cannot be managed by the end user)
|
||||
*/
|
||||
overridden?: boolean;
|
||||
/**
|
||||
* Reason that the state was set (by a plugin/rule).
|
||||
*/
|
||||
reason?: string;
|
||||
/**
|
||||
* The scope at which this state applies
|
||||
*/
|
||||
scope?: ContributedFeatureSettingScope;
|
||||
/**
|
||||
* The current state of this feature
|
||||
*/
|
||||
state?: ContributedFeatureEnabledValue;
|
||||
}
|
||||
/**
|
||||
* A query for the effective contributed feature states for a list of feature ids
|
||||
*/
|
||||
export interface ContributedFeatureStateQuery {
|
||||
/**
|
||||
* The list of feature ids to query
|
||||
*/
|
||||
featureIds?: string[];
|
||||
/**
|
||||
* The query result containing the current feature states for each of the queried feature ids
|
||||
*/
|
||||
featureStates?: {
|
||||
[key: string]: ContributedFeatureState;
|
||||
};
|
||||
/**
|
||||
* A dictionary of scope values (project name, etc.) to use in the query (if querying across scopes)
|
||||
*/
|
||||
scopeValues?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* A rule for dynamically getting the enabled/disabled state of a feature
|
||||
*/
|
||||
export interface ContributedFeatureValueRule extends ContributedFeatureHandlerSettings {
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
ContributedFeatureEnabledValue: {
|
||||
enumValues: {
|
||||
"undefined": number;
|
||||
"disabled": number;
|
||||
"enabled": number;
|
||||
};
|
||||
};
|
||||
ContributedFeatureState: any;
|
||||
ContributedFeatureStateQuery: any;
|
||||
};
|
||||
Generated
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* The current state of a feature within a given scope
|
||||
*/
|
||||
var ContributedFeatureEnabledValue;
|
||||
(function (ContributedFeatureEnabledValue) {
|
||||
/**
|
||||
* The state of the feature is not set for the specified scope
|
||||
*/
|
||||
ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Undefined"] = -1] = "Undefined";
|
||||
/**
|
||||
* The feature is disabled at the specified scope
|
||||
*/
|
||||
ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Disabled"] = 0] = "Disabled";
|
||||
/**
|
||||
* The feature is enabled at the specified scope
|
||||
*/
|
||||
ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Enabled"] = 1] = "Enabled";
|
||||
})(ContributedFeatureEnabledValue = exports.ContributedFeatureEnabledValue || (exports.ContributedFeatureEnabledValue = {}));
|
||||
exports.TypeInfo = {
|
||||
ContributedFeatureEnabledValue: {
|
||||
enumValues: {
|
||||
"undefined": -1,
|
||||
"disabled": 0,
|
||||
"enabled": 1
|
||||
}
|
||||
},
|
||||
ContributedFeatureState: {},
|
||||
ContributedFeatureStateQuery: {},
|
||||
};
|
||||
exports.TypeInfo.ContributedFeatureState.fields = {
|
||||
state: {
|
||||
enumType: exports.TypeInfo.ContributedFeatureEnabledValue
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ContributedFeatureStateQuery.fields = {
|
||||
featureStates: {
|
||||
isDictionary: true,
|
||||
dictionaryValueTypeInfo: exports.TypeInfo.ContributedFeatureState
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+193
@@ -0,0 +1,193 @@
|
||||
/**
|
||||
* Status of a container item.
|
||||
*/
|
||||
export declare enum ContainerItemStatus {
|
||||
/**
|
||||
* Item is created.
|
||||
*/
|
||||
Created = 1,
|
||||
/**
|
||||
* Item is a file pending for upload.
|
||||
*/
|
||||
PendingUpload = 2,
|
||||
}
|
||||
/**
|
||||
* Type of a container item.
|
||||
*/
|
||||
export declare enum ContainerItemType {
|
||||
/**
|
||||
* Any item type.
|
||||
*/
|
||||
Any = 0,
|
||||
/**
|
||||
* Item is a folder which can have child items.
|
||||
*/
|
||||
Folder = 1,
|
||||
/**
|
||||
* Item is a file which is stored in the file service.
|
||||
*/
|
||||
File = 2,
|
||||
}
|
||||
/**
|
||||
* Options a container can have.
|
||||
*/
|
||||
export declare enum ContainerOptions {
|
||||
/**
|
||||
* No option.
|
||||
*/
|
||||
None = 0,
|
||||
}
|
||||
/**
|
||||
* Represents a container that encapsulates a hierarchical file system.
|
||||
*/
|
||||
export interface FileContainer {
|
||||
/**
|
||||
* Uri of the artifact associated with the container.
|
||||
*/
|
||||
artifactUri: string;
|
||||
/**
|
||||
* Download Url for the content of this item.
|
||||
*/
|
||||
contentLocation?: string;
|
||||
/**
|
||||
* Owner.
|
||||
*/
|
||||
createdBy?: string;
|
||||
/**
|
||||
* Creation date.
|
||||
*/
|
||||
dateCreated?: Date;
|
||||
/**
|
||||
* Description.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Id.
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Location of the item resource.
|
||||
*/
|
||||
itemLocation?: string;
|
||||
/**
|
||||
* ItemStore Locator for this container.
|
||||
*/
|
||||
locatorPath?: string;
|
||||
/**
|
||||
* Name.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Options the container can have.
|
||||
*/
|
||||
options?: ContainerOptions;
|
||||
/**
|
||||
* Project Id.
|
||||
*/
|
||||
scopeIdentifier?: string;
|
||||
/**
|
||||
* Security token of the artifact associated with the container.
|
||||
*/
|
||||
securityToken?: string;
|
||||
/**
|
||||
* Identifier of the optional encryption key.
|
||||
*/
|
||||
signingKeyId?: string;
|
||||
/**
|
||||
* Total size of the files in bytes.
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
/**
|
||||
* Represents an item in a container.
|
||||
*/
|
||||
export interface FileContainerItem {
|
||||
/**
|
||||
* Container Id.
|
||||
*/
|
||||
containerId: number;
|
||||
contentId?: number[];
|
||||
/**
|
||||
* Download Url for the content of this item.
|
||||
*/
|
||||
contentLocation?: string;
|
||||
/**
|
||||
* Creator.
|
||||
*/
|
||||
createdBy?: string;
|
||||
/**
|
||||
* Creation date.
|
||||
*/
|
||||
dateCreated?: Date;
|
||||
/**
|
||||
* Last modified date.
|
||||
*/
|
||||
dateLastModified?: Date;
|
||||
/**
|
||||
* Encoding of the file. Zero if not a file.
|
||||
*/
|
||||
fileEncoding?: number;
|
||||
/**
|
||||
* Hash value of the file. Null if not a file.
|
||||
*/
|
||||
fileHash?: number[];
|
||||
/**
|
||||
* Id of the file content.
|
||||
*/
|
||||
fileId?: number;
|
||||
/**
|
||||
* Length of the file. Zero if not of a file.
|
||||
*/
|
||||
fileLength?: number;
|
||||
/**
|
||||
* Type of the file. Zero if not a file.
|
||||
*/
|
||||
fileType?: number;
|
||||
/**
|
||||
* Location of the item resource.
|
||||
*/
|
||||
itemLocation?: string;
|
||||
/**
|
||||
* Type of the item: Folder, File or String.
|
||||
*/
|
||||
itemType: ContainerItemType;
|
||||
/**
|
||||
* Modifier.
|
||||
*/
|
||||
lastModifiedBy?: string;
|
||||
/**
|
||||
* Unique path that identifies the item.
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* Project Id.
|
||||
*/
|
||||
scopeIdentifier?: string;
|
||||
/**
|
||||
* Status of the item: Created or Pending Upload.
|
||||
*/
|
||||
status: ContainerItemStatus;
|
||||
ticket?: string;
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
ContainerItemStatus: {
|
||||
enumValues: {
|
||||
"created": number;
|
||||
"pendingUpload": number;
|
||||
};
|
||||
};
|
||||
ContainerItemType: {
|
||||
enumValues: {
|
||||
"any": number;
|
||||
"folder": number;
|
||||
"file": number;
|
||||
};
|
||||
};
|
||||
ContainerOptions: {
|
||||
enumValues: {
|
||||
"none": number;
|
||||
};
|
||||
};
|
||||
FileContainer: any;
|
||||
FileContainerItem: any;
|
||||
};
|
||||
Generated
Vendored
+97
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Status of a container item.
|
||||
*/
|
||||
var ContainerItemStatus;
|
||||
(function (ContainerItemStatus) {
|
||||
/**
|
||||
* Item is created.
|
||||
*/
|
||||
ContainerItemStatus[ContainerItemStatus["Created"] = 1] = "Created";
|
||||
/**
|
||||
* Item is a file pending for upload.
|
||||
*/
|
||||
ContainerItemStatus[ContainerItemStatus["PendingUpload"] = 2] = "PendingUpload";
|
||||
})(ContainerItemStatus = exports.ContainerItemStatus || (exports.ContainerItemStatus = {}));
|
||||
/**
|
||||
* Type of a container item.
|
||||
*/
|
||||
var ContainerItemType;
|
||||
(function (ContainerItemType) {
|
||||
/**
|
||||
* Any item type.
|
||||
*/
|
||||
ContainerItemType[ContainerItemType["Any"] = 0] = "Any";
|
||||
/**
|
||||
* Item is a folder which can have child items.
|
||||
*/
|
||||
ContainerItemType[ContainerItemType["Folder"] = 1] = "Folder";
|
||||
/**
|
||||
* Item is a file which is stored in the file service.
|
||||
*/
|
||||
ContainerItemType[ContainerItemType["File"] = 2] = "File";
|
||||
})(ContainerItemType = exports.ContainerItemType || (exports.ContainerItemType = {}));
|
||||
/**
|
||||
* Options a container can have.
|
||||
*/
|
||||
var ContainerOptions;
|
||||
(function (ContainerOptions) {
|
||||
/**
|
||||
* No option.
|
||||
*/
|
||||
ContainerOptions[ContainerOptions["None"] = 0] = "None";
|
||||
})(ContainerOptions = exports.ContainerOptions || (exports.ContainerOptions = {}));
|
||||
exports.TypeInfo = {
|
||||
ContainerItemStatus: {
|
||||
enumValues: {
|
||||
"created": 1,
|
||||
"pendingUpload": 2
|
||||
}
|
||||
},
|
||||
ContainerItemType: {
|
||||
enumValues: {
|
||||
"any": 0,
|
||||
"folder": 1,
|
||||
"file": 2
|
||||
}
|
||||
},
|
||||
ContainerOptions: {
|
||||
enumValues: {
|
||||
"none": 0
|
||||
}
|
||||
},
|
||||
FileContainer: {},
|
||||
FileContainerItem: {},
|
||||
};
|
||||
exports.TypeInfo.FileContainer.fields = {
|
||||
dateCreated: {
|
||||
isDate: true,
|
||||
},
|
||||
options: {
|
||||
enumType: exports.TypeInfo.ContainerOptions
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.FileContainerItem.fields = {
|
||||
dateCreated: {
|
||||
isDate: true,
|
||||
},
|
||||
dateLastModified: {
|
||||
isDate: true,
|
||||
},
|
||||
itemType: {
|
||||
enumType: exports.TypeInfo.ContainerItemType
|
||||
},
|
||||
status: {
|
||||
enumType: exports.TypeInfo.ContainerItemStatus
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+2043
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1400
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+3680
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+2292
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+423
@@ -0,0 +1,423 @@
|
||||
import IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces");
|
||||
export interface GraphCachePolicies {
|
||||
/**
|
||||
* Size of the cache
|
||||
*/
|
||||
cacheSize?: number;
|
||||
}
|
||||
export interface GraphDescriptorResult {
|
||||
/**
|
||||
* This field contains zero or more interesting links about the graph descriptor. These links may be invoked to obtain additional relationships or more detailed information about this graph descriptor.
|
||||
*/
|
||||
_links?: any;
|
||||
value?: string;
|
||||
}
|
||||
/**
|
||||
* Represents a set of data used to communicate with a federated provider on behalf of a particular user.
|
||||
*/
|
||||
export interface GraphFederatedProviderData {
|
||||
/**
|
||||
* The access token that can be used to communicated with the federated provider on behalf on the target identity, if we were able to successfully acquire one, otherwise <code>null</code>, if we were not.
|
||||
*/
|
||||
accessToken?: string;
|
||||
/**
|
||||
* Whether or not the immediate provider (i.e. AAD) has indicated that we can call them to attempt to get an access token to communicate with the federated provider on behalf of the target identity.
|
||||
*/
|
||||
canQueryAccessToken?: boolean;
|
||||
/**
|
||||
* The name of the federated provider, e.g. "github.com".
|
||||
*/
|
||||
providerName?: string;
|
||||
/**
|
||||
* The descriptor of the graph subject to which this federated provider data corresponds.
|
||||
*/
|
||||
subjectDescriptor?: string;
|
||||
/**
|
||||
* The version number of this federated provider data, which corresponds to when it was last updated. Can be used to prevent returning stale provider data from the cache when the caller is aware of a newer version, such as to prevent local cache poisoning from a remote cache or store. This is the app layer equivalent of the data layer sequence ID.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
export interface GraphGlobalExtendedPropertyBatch {
|
||||
propertyNameFilters?: string[];
|
||||
subjectDescriptors?: string[];
|
||||
}
|
||||
export interface GraphGroup extends GraphMember {
|
||||
/**
|
||||
* A short phrase to help human readers disambiguate groups with similar names
|
||||
*/
|
||||
description?: string;
|
||||
isCrossProject?: boolean;
|
||||
isDeleted?: boolean;
|
||||
isGlobalScope?: boolean;
|
||||
isRestrictedVisible?: boolean;
|
||||
localScopeId?: string;
|
||||
scopeId?: string;
|
||||
scopeName?: string;
|
||||
scopeType?: string;
|
||||
securingHostId?: string;
|
||||
specialType?: string;
|
||||
}
|
||||
/**
|
||||
* Do not attempt to use this type to create a new group. This type does not contain sufficient fields to create a new group.
|
||||
*/
|
||||
export interface GraphGroupCreationContext {
|
||||
/**
|
||||
* Optional: If provided, we will use this identifier for the storage key of the created group
|
||||
*/
|
||||
storageKey?: string;
|
||||
}
|
||||
/**
|
||||
* Use this type to create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AAD and AD use case.
|
||||
*/
|
||||
export interface GraphGroupMailAddressCreationContext extends GraphGroupCreationContext {
|
||||
/**
|
||||
* This should be the mail address or the group in the source AD or AAD provider. Example: jamal@contoso.com Team Services will communicate with the source provider to fill all other fields on creation.
|
||||
*/
|
||||
mailAddress: string;
|
||||
}
|
||||
/**
|
||||
* Use this type to create a new group using the OriginID as a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AD and AAD use case.
|
||||
*/
|
||||
export interface GraphGroupOriginIdCreationContext extends GraphGroupCreationContext {
|
||||
/**
|
||||
* This should be the object id or sid of the group from the source AD or AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Team Services will communicate with the source provider to fill all other fields on creation.
|
||||
*/
|
||||
originId: string;
|
||||
}
|
||||
/**
|
||||
* Use this type to create a new Vsts group that is not backed by an external provider.
|
||||
*/
|
||||
export interface GraphGroupVstsCreationContext extends GraphGroupCreationContext {
|
||||
/**
|
||||
* For internal use only in back compat scenarios.
|
||||
*/
|
||||
crossProject?: boolean;
|
||||
/**
|
||||
* Used by VSTS groups; if set this will be the group description, otherwise ignored
|
||||
*/
|
||||
description?: string;
|
||||
descriptor?: string;
|
||||
/**
|
||||
* Used by VSTS groups; if set this will be the group DisplayName, otherwise ignored
|
||||
*/
|
||||
displayName: string;
|
||||
/**
|
||||
* For internal use only in back compat scenarios.
|
||||
*/
|
||||
restrictedVisibility?: boolean;
|
||||
/**
|
||||
* For internal use only in back compat scenarios.
|
||||
*/
|
||||
specialGroupType?: string;
|
||||
}
|
||||
export interface GraphMember extends GraphSubject {
|
||||
/**
|
||||
* This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
* The email address of record for a given graph member. This may be different than the principal name.
|
||||
*/
|
||||
mailAddress?: string;
|
||||
/**
|
||||
* This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.
|
||||
*/
|
||||
principalName?: string;
|
||||
}
|
||||
export declare enum GraphMemberSearchFactor {
|
||||
/**
|
||||
* Domain qualified account name (domain\alias)
|
||||
*/
|
||||
PrincipalName = 0,
|
||||
/**
|
||||
* Display name
|
||||
*/
|
||||
DisplayName = 1,
|
||||
/**
|
||||
* Administrators group
|
||||
*/
|
||||
AdministratorsGroup = 2,
|
||||
/**
|
||||
* Find the identity using the identifier (SID)
|
||||
*/
|
||||
Identifier = 3,
|
||||
/**
|
||||
* Email address
|
||||
*/
|
||||
MailAddress = 4,
|
||||
/**
|
||||
* A general search for an identity.
|
||||
*/
|
||||
General = 5,
|
||||
/**
|
||||
* Alternate login username (Basic Auth Alias)
|
||||
*/
|
||||
Alias = 6,
|
||||
/**
|
||||
* Find identity using DirectoryAlias
|
||||
*/
|
||||
DirectoryAlias = 8,
|
||||
}
|
||||
export interface GraphMembership {
|
||||
/**
|
||||
* This field contains zero or more interesting links about the graph membership. These links may be invoked to obtain additional relationships or more detailed information about this graph membership.
|
||||
*/
|
||||
_links?: any;
|
||||
containerDescriptor?: string;
|
||||
memberDescriptor?: string;
|
||||
}
|
||||
export interface GraphMembershipState {
|
||||
/**
|
||||
* This field contains zero or more interesting links about the graph membership state. These links may be invoked to obtain additional relationships or more detailed information about this graph membership state.
|
||||
*/
|
||||
_links?: any;
|
||||
active?: boolean;
|
||||
}
|
||||
export interface GraphMembershipTraversal {
|
||||
/**
|
||||
* Reason why the subject could not be traversed completely
|
||||
*/
|
||||
incompletenessReason?: string;
|
||||
/**
|
||||
* When true, the subject is traversed completely
|
||||
*/
|
||||
isComplete?: boolean;
|
||||
/**
|
||||
* The traversed subject descriptor
|
||||
*/
|
||||
subjectDescriptor?: string;
|
||||
/**
|
||||
* Subject descriptor ids of the traversed members
|
||||
*/
|
||||
traversedSubjectIds?: string[];
|
||||
/**
|
||||
* Subject descriptors of the traversed members
|
||||
*/
|
||||
traversedSubjects?: string[];
|
||||
}
|
||||
/**
|
||||
* Who is the provider for this user and what is the identifier and domain that is used to uniquely identify the user.
|
||||
*/
|
||||
export interface GraphProviderInfo {
|
||||
/**
|
||||
* The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
|
||||
*/
|
||||
descriptor?: string;
|
||||
/**
|
||||
* This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AAD the tenantID of the directory.)
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
* The type of source provider for the origin identifier (ex: "aad", "msa")
|
||||
*/
|
||||
origin?: string;
|
||||
/**
|
||||
* The unique identifier from the system of origin. (For MSA this is the PUID in hex notation, for AAD this is the object id.)
|
||||
*/
|
||||
originId?: string;
|
||||
}
|
||||
export interface GraphScope extends GraphSubject {
|
||||
/**
|
||||
* The subject descriptor that references the administrators group for this scope. Only members of this group can change the contents of this scope or assign other users permissions to access this scope.
|
||||
*/
|
||||
administratorDescriptor?: string;
|
||||
/**
|
||||
* When true, this scope is also a securing host for one or more scopes.
|
||||
*/
|
||||
isGlobal?: boolean;
|
||||
/**
|
||||
* The subject descriptor for the closest account or organization in the ancestor tree of this scope.
|
||||
*/
|
||||
parentDescriptor?: string;
|
||||
/**
|
||||
* The type of this scope. Typically ServiceHost or TeamProject.
|
||||
*/
|
||||
scopeType?: IdentitiesInterfaces.GroupScopeType;
|
||||
/**
|
||||
* The subject descriptor for the containing organization in the ancestor tree of this scope.
|
||||
*/
|
||||
securingHostDescriptor?: string;
|
||||
}
|
||||
/**
|
||||
* This type is the subset of fields that can be provided by the user to create a Vsts scope. Scope creation is currently limited to internal back-compat scenarios. End users that attempt to create a scope with this API will fail.
|
||||
*/
|
||||
export interface GraphScopeCreationContext {
|
||||
/**
|
||||
* Set this field to override the default description of this scope's admin group.
|
||||
*/
|
||||
adminGroupDescription?: string;
|
||||
/**
|
||||
* All scopes have an Administrator Group that controls access to the contents of the scope. Set this field to use a non-default group name for that administrators group.
|
||||
*/
|
||||
adminGroupName?: string;
|
||||
/**
|
||||
* Set this optional field if this scope is created on behalf of a user other than the user making the request. This should be the Id of the user that is not the requester.
|
||||
*/
|
||||
creatorId?: string;
|
||||
/**
|
||||
* The scope must be provided with a unique name within the parent scope. This means the created scope can have a parent or child with the same name, but no siblings with the same name.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The type of scope being created.
|
||||
*/
|
||||
scopeType?: IdentitiesInterfaces.GroupScopeType;
|
||||
/**
|
||||
* An optional ID that uniquely represents the scope within it's parent scope. If this parameter is not provided, Vsts will generate on automatically.
|
||||
*/
|
||||
storageKey?: string;
|
||||
}
|
||||
export interface GraphStorageKeyResult {
|
||||
/**
|
||||
* This field contains zero or more interesting links about the graph storage key. These links may be invoked to obtain additional relationships or more detailed information about this graph storage key.
|
||||
*/
|
||||
_links?: any;
|
||||
value?: string;
|
||||
}
|
||||
export interface GraphSubject extends GraphSubjectBase {
|
||||
/**
|
||||
* [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor.
|
||||
*/
|
||||
legacyDescriptor?: string;
|
||||
/**
|
||||
* The type of source provider for the origin identifier (ex:AD, AAD, MSA)
|
||||
*/
|
||||
origin?: string;
|
||||
/**
|
||||
* The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
|
||||
*/
|
||||
originId?: string;
|
||||
/**
|
||||
* This field identifies the type of the graph subject (ex: Group, Scope, User).
|
||||
*/
|
||||
subjectKind?: string;
|
||||
}
|
||||
export interface GraphSubjectBase {
|
||||
/**
|
||||
* This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
|
||||
*/
|
||||
_links?: any;
|
||||
/**
|
||||
* The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
|
||||
*/
|
||||
descriptor?: string;
|
||||
/**
|
||||
* This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* This url is the full route to the source resource of this graph subject.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
export interface GraphSubjectLookup {
|
||||
lookupKeys?: GraphSubjectLookupKey[];
|
||||
}
|
||||
export interface GraphSubjectLookupKey {
|
||||
descriptor?: string;
|
||||
}
|
||||
export interface GraphSystemSubject extends GraphSubject {
|
||||
}
|
||||
export declare enum GraphTraversalDirection {
|
||||
Unknown = 0,
|
||||
Down = 1,
|
||||
Up = 2,
|
||||
}
|
||||
export interface GraphUser extends GraphMember {
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* Do not attempt to use this type to create a new user. Use one of the subclasses instead. This type does not contain sufficient fields to create a new user.
|
||||
*/
|
||||
export interface GraphUserCreationContext {
|
||||
/**
|
||||
* Optional: If provided, we will use this identifier for the storage key of the created user
|
||||
*/
|
||||
storageKey?: string;
|
||||
}
|
||||
/**
|
||||
* 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 {
|
||||
mailAddress: string;
|
||||
}
|
||||
/**
|
||||
* Use this type to create a new user using the OriginID as a reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its unique ID in the backing provider.
|
||||
*/
|
||||
export interface GraphUserOriginIdCreationContext extends GraphUserCreationContext {
|
||||
/**
|
||||
* This should be the object id or sid of the user from the source AD or AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Team Services will communicate with the source provider to fill all other fields on creation.
|
||||
*/
|
||||
originId: string;
|
||||
}
|
||||
/**
|
||||
* Use this type to create a new user using the principal name 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 principal name in the backing provider.
|
||||
*/
|
||||
export interface GraphUserPrincipalNameCreationContext extends GraphUserCreationContext {
|
||||
/**
|
||||
* This should be the principal name or upn of the user in the source AD or AAD provider. Example: jamal@contoso.com Team Services will communicate with the source provider to fill all other fields on creation.
|
||||
*/
|
||||
principalName: string;
|
||||
}
|
||||
export declare enum IdentityShardingState {
|
||||
Undefined = 0,
|
||||
Enabled = 1,
|
||||
Disabled = 2,
|
||||
}
|
||||
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.
|
||||
*/
|
||||
continuationToken?: string[];
|
||||
/**
|
||||
* The enumerable list of groups found within a page.
|
||||
*/
|
||||
graphGroups?: GraphGroup[];
|
||||
}
|
||||
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.
|
||||
*/
|
||||
continuationToken?: string[];
|
||||
/**
|
||||
* The enumerable set of users found within a page.
|
||||
*/
|
||||
graphUsers?: GraphUser[];
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
GraphMemberSearchFactor: {
|
||||
enumValues: {
|
||||
"principalName": number;
|
||||
"displayName": number;
|
||||
"administratorsGroup": number;
|
||||
"identifier": number;
|
||||
"mailAddress": number;
|
||||
"general": number;
|
||||
"alias": number;
|
||||
"directoryAlias": number;
|
||||
};
|
||||
};
|
||||
GraphScope: any;
|
||||
GraphScopeCreationContext: any;
|
||||
GraphTraversalDirection: {
|
||||
enumValues: {
|
||||
"unknown": number;
|
||||
"down": number;
|
||||
"up": number;
|
||||
};
|
||||
};
|
||||
GraphUser: any;
|
||||
IdentityShardingState: {
|
||||
enumValues: {
|
||||
"undefined": number;
|
||||
"enabled": number;
|
||||
"disabled": number;
|
||||
};
|
||||
};
|
||||
PagedGraphUsers: any;
|
||||
};
|
||||
Generated
Vendored
+112
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces");
|
||||
var GraphMemberSearchFactor;
|
||||
(function (GraphMemberSearchFactor) {
|
||||
/**
|
||||
* Domain qualified account name (domain\alias)
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["PrincipalName"] = 0] = "PrincipalName";
|
||||
/**
|
||||
* Display name
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["DisplayName"] = 1] = "DisplayName";
|
||||
/**
|
||||
* Administrators group
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["AdministratorsGroup"] = 2] = "AdministratorsGroup";
|
||||
/**
|
||||
* Find the identity using the identifier (SID)
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["Identifier"] = 3] = "Identifier";
|
||||
/**
|
||||
* Email address
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["MailAddress"] = 4] = "MailAddress";
|
||||
/**
|
||||
* A general search for an identity.
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["General"] = 5] = "General";
|
||||
/**
|
||||
* Alternate login username (Basic Auth Alias)
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["Alias"] = 6] = "Alias";
|
||||
/**
|
||||
* Find identity using DirectoryAlias
|
||||
*/
|
||||
GraphMemberSearchFactor[GraphMemberSearchFactor["DirectoryAlias"] = 8] = "DirectoryAlias";
|
||||
})(GraphMemberSearchFactor = exports.GraphMemberSearchFactor || (exports.GraphMemberSearchFactor = {}));
|
||||
var GraphTraversalDirection;
|
||||
(function (GraphTraversalDirection) {
|
||||
GraphTraversalDirection[GraphTraversalDirection["Unknown"] = 0] = "Unknown";
|
||||
GraphTraversalDirection[GraphTraversalDirection["Down"] = 1] = "Down";
|
||||
GraphTraversalDirection[GraphTraversalDirection["Up"] = 2] = "Up";
|
||||
})(GraphTraversalDirection = exports.GraphTraversalDirection || (exports.GraphTraversalDirection = {}));
|
||||
var IdentityShardingState;
|
||||
(function (IdentityShardingState) {
|
||||
IdentityShardingState[IdentityShardingState["Undefined"] = 0] = "Undefined";
|
||||
IdentityShardingState[IdentityShardingState["Enabled"] = 1] = "Enabled";
|
||||
IdentityShardingState[IdentityShardingState["Disabled"] = 2] = "Disabled";
|
||||
})(IdentityShardingState = exports.IdentityShardingState || (exports.IdentityShardingState = {}));
|
||||
exports.TypeInfo = {
|
||||
GraphMemberSearchFactor: {
|
||||
enumValues: {
|
||||
"principalName": 0,
|
||||
"displayName": 1,
|
||||
"administratorsGroup": 2,
|
||||
"identifier": 3,
|
||||
"mailAddress": 4,
|
||||
"general": 5,
|
||||
"alias": 6,
|
||||
"directoryAlias": 8
|
||||
}
|
||||
},
|
||||
GraphScope: {},
|
||||
GraphScopeCreationContext: {},
|
||||
GraphTraversalDirection: {
|
||||
enumValues: {
|
||||
"unknown": 0,
|
||||
"down": 1,
|
||||
"up": 2
|
||||
}
|
||||
},
|
||||
GraphUser: {},
|
||||
IdentityShardingState: {
|
||||
enumValues: {
|
||||
"undefined": 0,
|
||||
"enabled": 1,
|
||||
"disabled": 2
|
||||
}
|
||||
},
|
||||
PagedGraphUsers: {},
|
||||
};
|
||||
exports.TypeInfo.GraphScope.fields = {
|
||||
scopeType: {
|
||||
enumType: IdentitiesInterfaces.TypeInfo.GroupScopeType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.GraphScopeCreationContext.fields = {
|
||||
scopeType: {
|
||||
enumType: IdentitiesInterfaces.TypeInfo.GroupScopeType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.GraphUser.fields = {
|
||||
metadataUpdateDate: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.PagedGraphUsers.fields = {
|
||||
graphUsers: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.GraphUser
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+247
@@ -0,0 +1,247 @@
|
||||
/**
|
||||
* Container class for changed identities
|
||||
*/
|
||||
export interface ChangedIdentities {
|
||||
/**
|
||||
* Changed Identities
|
||||
*/
|
||||
identities?: Identity[];
|
||||
/**
|
||||
* More data available, set to true if pagesize is specified.
|
||||
*/
|
||||
moreData?: boolean;
|
||||
/**
|
||||
* Last Identity SequenceId
|
||||
*/
|
||||
sequenceContext?: ChangedIdentitiesContext;
|
||||
}
|
||||
/**
|
||||
* Context class for changed identities
|
||||
*/
|
||||
export interface ChangedIdentitiesContext {
|
||||
/**
|
||||
* Last Group SequenceId
|
||||
*/
|
||||
groupSequenceId?: number;
|
||||
/**
|
||||
* Last Identity SequenceId
|
||||
*/
|
||||
identitySequenceId?: number;
|
||||
/**
|
||||
* Last Group OrganizationIdentitySequenceId
|
||||
*/
|
||||
organizationIdentitySequenceId?: number;
|
||||
/**
|
||||
* Page size
|
||||
*/
|
||||
pageSize?: number;
|
||||
}
|
||||
export interface CreateScopeInfo {
|
||||
adminGroupDescription?: string;
|
||||
adminGroupName?: string;
|
||||
creatorId?: string;
|
||||
parentScopeId?: string;
|
||||
scopeName?: string;
|
||||
scopeType?: GroupScopeType;
|
||||
}
|
||||
export interface FrameworkIdentityInfo {
|
||||
displayName?: string;
|
||||
identifier?: string;
|
||||
identityType?: FrameworkIdentityType;
|
||||
role?: string;
|
||||
}
|
||||
export declare enum FrameworkIdentityType {
|
||||
None = 0,
|
||||
ServiceIdentity = 1,
|
||||
AggregateIdentity = 2,
|
||||
ImportedIdentity = 3,
|
||||
}
|
||||
export interface GroupMembership {
|
||||
active?: boolean;
|
||||
descriptor?: IdentityDescriptor;
|
||||
id?: string;
|
||||
queriedId?: string;
|
||||
}
|
||||
export declare enum GroupScopeType {
|
||||
Generic = 0,
|
||||
ServiceHost = 1,
|
||||
TeamProject = 2,
|
||||
}
|
||||
export interface Identity extends IdentityBase {
|
||||
}
|
||||
/**
|
||||
* Base Identity class to allow "trimmed" identity class in the GetConnectionData API Makes sure that on-the-wire representations of the derived classes are compatible with each other (e.g. Server responds with PublicIdentity object while client deserializes it as Identity object) Derived classes should not have additional [DataMember] properties
|
||||
*/
|
||||
export interface IdentityBase {
|
||||
/**
|
||||
* The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database)
|
||||
*/
|
||||
customDisplayName?: string;
|
||||
descriptor?: IdentityDescriptor;
|
||||
id?: string;
|
||||
isActive?: boolean;
|
||||
isContainer?: boolean;
|
||||
masterId?: string;
|
||||
memberIds?: string[];
|
||||
memberOf?: IdentityDescriptor[];
|
||||
members?: IdentityDescriptor[];
|
||||
metaTypeId?: number;
|
||||
properties?: any;
|
||||
/**
|
||||
* The display name for the identity as specified by the source identity provider.
|
||||
*/
|
||||
providerDisplayName?: string;
|
||||
resourceVersion?: number;
|
||||
subjectDescriptor?: string;
|
||||
uniqueUserId?: number;
|
||||
}
|
||||
export interface IdentityBatchInfo {
|
||||
descriptors?: IdentityDescriptor[];
|
||||
identityIds?: string[];
|
||||
includeRestrictedVisibility?: boolean;
|
||||
propertyNames?: string[];
|
||||
queryMembership?: QueryMembership;
|
||||
subjectDescriptors?: string[];
|
||||
}
|
||||
/**
|
||||
* An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID.
|
||||
*/
|
||||
export interface IdentityDescriptor {
|
||||
/**
|
||||
* The unique identifier for this identity, not exceeding 256 chars, which will be persisted.
|
||||
*/
|
||||
identifier?: string;
|
||||
/**
|
||||
* Type of descriptor (for example, Windows, Passport, etc.).
|
||||
*/
|
||||
identityType?: string;
|
||||
}
|
||||
export interface IdentityScope {
|
||||
administrators?: IdentityDescriptor;
|
||||
id: string;
|
||||
isActive?: boolean;
|
||||
isGlobal?: boolean;
|
||||
localScopeId?: string;
|
||||
name?: string;
|
||||
parentId?: string;
|
||||
scopeType?: GroupScopeType;
|
||||
securingHostId?: string;
|
||||
subjectDescriptor?: string;
|
||||
}
|
||||
/**
|
||||
* Identity information.
|
||||
*/
|
||||
export interface IdentitySelf {
|
||||
/**
|
||||
* The UserPrincipalName (UPN) of the account. This value comes from the source provider.
|
||||
*/
|
||||
accountName?: string;
|
||||
/**
|
||||
* The display name. For AAD accounts with multiple tenants this is the display name of the profile in the home tenant.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* This represents the name of the container of origin. For AAD accounts this is the tenantID of the home tenant. For MSA accounts this is the string "Windows Live ID".
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
* This is the VSID of the home tenant profile. If the profile is signed into the home tenant or if the profile has no tenants then this Id is the same as the Id returned by the profile/profiles/me endpoint. Going forward it is recommended that you use the combined values of Origin, OriginId and Domain to uniquely identify a user rather than this Id.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The type of source provider for the origin identifier. For MSA accounts this is "msa". For AAD accounts this is "aad".
|
||||
*/
|
||||
origin?: string;
|
||||
/**
|
||||
* The unique identifier from the system of origin. If there are multiple tenants this is the unique identifier of the account in the home tenant. (For MSA this is the PUID in hex notation, for AAD this is the object id.)
|
||||
*/
|
||||
originId?: string;
|
||||
/**
|
||||
* For AAD accounts this is all of the tenants that this account is a member of.
|
||||
*/
|
||||
tenants?: TenantInfo[];
|
||||
}
|
||||
export interface IdentitySnapshot {
|
||||
groups?: Identity[];
|
||||
identityIds?: string[];
|
||||
memberships?: GroupMembership[];
|
||||
scopeId?: string;
|
||||
scopes?: IdentityScope[];
|
||||
}
|
||||
export interface IdentityUpdateData {
|
||||
id?: string;
|
||||
index?: number;
|
||||
updated?: boolean;
|
||||
}
|
||||
export declare enum QueryMembership {
|
||||
/**
|
||||
* Query will not return any membership data
|
||||
*/
|
||||
None = 0,
|
||||
/**
|
||||
* Query will return only direct membership data
|
||||
*/
|
||||
Direct = 1,
|
||||
/**
|
||||
* Query will return expanded membership data
|
||||
*/
|
||||
Expanded = 2,
|
||||
/**
|
||||
* Query will return expanded up membership data (parents only)
|
||||
*/
|
||||
ExpandedUp = 3,
|
||||
/**
|
||||
* Query will return expanded down membership data (children only)
|
||||
*/
|
||||
ExpandedDown = 4,
|
||||
}
|
||||
export declare enum ReadIdentitiesOptions {
|
||||
None = 0,
|
||||
FilterIllegalMemberships = 1,
|
||||
}
|
||||
export interface SwapIdentityInfo {
|
||||
id1?: string;
|
||||
id2?: string;
|
||||
}
|
||||
export interface TenantInfo {
|
||||
homeTenant?: boolean;
|
||||
tenantId?: string;
|
||||
tenantName?: string;
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
CreateScopeInfo: any;
|
||||
FrameworkIdentityInfo: any;
|
||||
FrameworkIdentityType: {
|
||||
enumValues: {
|
||||
"none": number;
|
||||
"serviceIdentity": number;
|
||||
"aggregateIdentity": number;
|
||||
"importedIdentity": number;
|
||||
};
|
||||
};
|
||||
GroupScopeType: {
|
||||
enumValues: {
|
||||
"generic": number;
|
||||
"serviceHost": number;
|
||||
"teamProject": number;
|
||||
};
|
||||
};
|
||||
IdentityBatchInfo: any;
|
||||
IdentityScope: any;
|
||||
IdentitySnapshot: any;
|
||||
QueryMembership: {
|
||||
enumValues: {
|
||||
"none": number;
|
||||
"direct": number;
|
||||
"expanded": number;
|
||||
"expandedUp": number;
|
||||
"expandedDown": number;
|
||||
};
|
||||
};
|
||||
ReadIdentitiesOptions: {
|
||||
enumValues: {
|
||||
"none": number;
|
||||
"filterIllegalMemberships": number;
|
||||
};
|
||||
};
|
||||
};
|
||||
Generated
Vendored
+115
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var FrameworkIdentityType;
|
||||
(function (FrameworkIdentityType) {
|
||||
FrameworkIdentityType[FrameworkIdentityType["None"] = 0] = "None";
|
||||
FrameworkIdentityType[FrameworkIdentityType["ServiceIdentity"] = 1] = "ServiceIdentity";
|
||||
FrameworkIdentityType[FrameworkIdentityType["AggregateIdentity"] = 2] = "AggregateIdentity";
|
||||
FrameworkIdentityType[FrameworkIdentityType["ImportedIdentity"] = 3] = "ImportedIdentity";
|
||||
})(FrameworkIdentityType = exports.FrameworkIdentityType || (exports.FrameworkIdentityType = {}));
|
||||
var GroupScopeType;
|
||||
(function (GroupScopeType) {
|
||||
GroupScopeType[GroupScopeType["Generic"] = 0] = "Generic";
|
||||
GroupScopeType[GroupScopeType["ServiceHost"] = 1] = "ServiceHost";
|
||||
GroupScopeType[GroupScopeType["TeamProject"] = 2] = "TeamProject";
|
||||
})(GroupScopeType = exports.GroupScopeType || (exports.GroupScopeType = {}));
|
||||
var QueryMembership;
|
||||
(function (QueryMembership) {
|
||||
/**
|
||||
* Query will not return any membership data
|
||||
*/
|
||||
QueryMembership[QueryMembership["None"] = 0] = "None";
|
||||
/**
|
||||
* Query will return only direct membership data
|
||||
*/
|
||||
QueryMembership[QueryMembership["Direct"] = 1] = "Direct";
|
||||
/**
|
||||
* Query will return expanded membership data
|
||||
*/
|
||||
QueryMembership[QueryMembership["Expanded"] = 2] = "Expanded";
|
||||
/**
|
||||
* Query will return expanded up membership data (parents only)
|
||||
*/
|
||||
QueryMembership[QueryMembership["ExpandedUp"] = 3] = "ExpandedUp";
|
||||
/**
|
||||
* Query will return expanded down membership data (children only)
|
||||
*/
|
||||
QueryMembership[QueryMembership["ExpandedDown"] = 4] = "ExpandedDown";
|
||||
})(QueryMembership = exports.QueryMembership || (exports.QueryMembership = {}));
|
||||
var ReadIdentitiesOptions;
|
||||
(function (ReadIdentitiesOptions) {
|
||||
ReadIdentitiesOptions[ReadIdentitiesOptions["None"] = 0] = "None";
|
||||
ReadIdentitiesOptions[ReadIdentitiesOptions["FilterIllegalMemberships"] = 1] = "FilterIllegalMemberships";
|
||||
})(ReadIdentitiesOptions = exports.ReadIdentitiesOptions || (exports.ReadIdentitiesOptions = {}));
|
||||
exports.TypeInfo = {
|
||||
CreateScopeInfo: {},
|
||||
FrameworkIdentityInfo: {},
|
||||
FrameworkIdentityType: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"serviceIdentity": 1,
|
||||
"aggregateIdentity": 2,
|
||||
"importedIdentity": 3
|
||||
}
|
||||
},
|
||||
GroupScopeType: {
|
||||
enumValues: {
|
||||
"generic": 0,
|
||||
"serviceHost": 1,
|
||||
"teamProject": 2
|
||||
}
|
||||
},
|
||||
IdentityBatchInfo: {},
|
||||
IdentityScope: {},
|
||||
IdentitySnapshot: {},
|
||||
QueryMembership: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"direct": 1,
|
||||
"expanded": 2,
|
||||
"expandedUp": 3,
|
||||
"expandedDown": 4
|
||||
}
|
||||
},
|
||||
ReadIdentitiesOptions: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"filterIllegalMemberships": 1
|
||||
}
|
||||
},
|
||||
};
|
||||
exports.TypeInfo.CreateScopeInfo.fields = {
|
||||
scopeType: {
|
||||
enumType: exports.TypeInfo.GroupScopeType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.FrameworkIdentityInfo.fields = {
|
||||
identityType: {
|
||||
enumType: exports.TypeInfo.FrameworkIdentityType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.IdentityBatchInfo.fields = {
|
||||
queryMembership: {
|
||||
enumType: exports.TypeInfo.QueryMembership
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.IdentityScope.fields = {
|
||||
scopeType: {
|
||||
enumType: exports.TypeInfo.GroupScopeType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.IdentitySnapshot.fields = {
|
||||
scopes: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.IdentityScope
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+178
@@ -0,0 +1,178 @@
|
||||
import IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces");
|
||||
import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
|
||||
export interface AccessMapping {
|
||||
accessPoint?: string;
|
||||
displayName?: string;
|
||||
moniker?: string;
|
||||
/**
|
||||
* The service which owns this access mapping e.g. TFS, ELS, etc.
|
||||
*/
|
||||
serviceOwner?: string;
|
||||
/**
|
||||
* Part of the access mapping which applies context after the access point of the server.
|
||||
*/
|
||||
virtualDirectory?: string;
|
||||
}
|
||||
/**
|
||||
* Data transfer class that holds information needed to set up a connection with a VSS server.
|
||||
*/
|
||||
export interface ConnectionData {
|
||||
/**
|
||||
* The Id of the authenticated user who made this request. More information about the user can be obtained by passing this Id to the Identity service
|
||||
*/
|
||||
authenticatedUser?: IdentitiesInterfaces.Identity;
|
||||
/**
|
||||
* The Id of the authorized user who made this request. More information about the user can be obtained by passing this Id to the Identity service
|
||||
*/
|
||||
authorizedUser?: IdentitiesInterfaces.Identity;
|
||||
/**
|
||||
* The id for the server.
|
||||
*/
|
||||
deploymentId?: string;
|
||||
/**
|
||||
* The type for the server Hosted/OnPremises.
|
||||
*/
|
||||
deploymentType?: VSSInterfaces.DeploymentFlags;
|
||||
/**
|
||||
* The instance id for this host.
|
||||
*/
|
||||
instanceId?: string;
|
||||
/**
|
||||
* The last user access for this instance. Null if not requested specifically.
|
||||
*/
|
||||
lastUserAccess?: Date;
|
||||
/**
|
||||
* Data that the location service holds.
|
||||
*/
|
||||
locationServiceData?: LocationServiceData;
|
||||
/**
|
||||
* The virtual directory of the host we are talking to.
|
||||
*/
|
||||
webApplicationRelativeDirectory?: string;
|
||||
}
|
||||
export declare enum InheritLevel {
|
||||
None = 0,
|
||||
Deployment = 1,
|
||||
Account = 2,
|
||||
Collection = 4,
|
||||
All = 7,
|
||||
}
|
||||
export interface LocationMapping {
|
||||
accessMappingMoniker?: string;
|
||||
location?: string;
|
||||
}
|
||||
/**
|
||||
* Data transfer class used to transfer data about the location service data over the web service.
|
||||
*/
|
||||
export interface LocationServiceData {
|
||||
/**
|
||||
* Data about the access mappings contained by this location service.
|
||||
*/
|
||||
accessMappings?: AccessMapping[];
|
||||
/**
|
||||
* Data that the location service holds.
|
||||
*/
|
||||
clientCacheFresh?: boolean;
|
||||
/**
|
||||
* The time to live on the location service cache.
|
||||
*/
|
||||
clientCacheTimeToLive?: number;
|
||||
/**
|
||||
* The default access mapping moniker for the server.
|
||||
*/
|
||||
defaultAccessMappingMoniker?: string;
|
||||
/**
|
||||
* The obsolete id for the last change that took place on the server (use LastChangeId64).
|
||||
*/
|
||||
lastChangeId?: number;
|
||||
/**
|
||||
* The non-truncated 64-bit id for the last change that took place on the server.
|
||||
*/
|
||||
lastChangeId64?: number;
|
||||
/**
|
||||
* Data about the service definitions contained by this location service.
|
||||
*/
|
||||
serviceDefinitions?: ServiceDefinition[];
|
||||
/**
|
||||
* The identifier of the deployment which is hosting this location data (e.g. SPS, TFS, ELS, Napa, etc.)
|
||||
*/
|
||||
serviceOwner?: string;
|
||||
}
|
||||
export declare enum RelativeToSetting {
|
||||
Context = 0,
|
||||
WebApplication = 2,
|
||||
FullyQualified = 3,
|
||||
}
|
||||
export interface ResourceAreaInfo {
|
||||
id?: string;
|
||||
locationUrl?: string;
|
||||
name?: string;
|
||||
}
|
||||
export interface ServiceDefinition {
|
||||
description?: string;
|
||||
displayName?: string;
|
||||
identifier?: string;
|
||||
inheritLevel?: InheritLevel;
|
||||
locationMappings?: LocationMapping[];
|
||||
/**
|
||||
* Maximum api version that this resource supports (current server version for this resource). Copied from <c>ApiResourceLocation</c>.
|
||||
*/
|
||||
maxVersion?: string;
|
||||
/**
|
||||
* Minimum api version that this resource supports. Copied from <c>ApiResourceLocation</c>.
|
||||
*/
|
||||
minVersion?: string;
|
||||
parentIdentifier?: string;
|
||||
parentServiceType?: string;
|
||||
properties?: any;
|
||||
relativePath?: string;
|
||||
relativeToSetting?: RelativeToSetting;
|
||||
/**
|
||||
* The latest version of this resource location that is in "Release" (non-preview) mode. Copied from <c>ApiResourceLocation</c>.
|
||||
*/
|
||||
releasedVersion?: string;
|
||||
/**
|
||||
* The current resource version supported by this resource location. Copied from <c>ApiResourceLocation</c>.
|
||||
*/
|
||||
resourceVersion?: number;
|
||||
/**
|
||||
* The service which owns this definition e.g. TFS, ELS, etc.
|
||||
*/
|
||||
serviceOwner?: string;
|
||||
serviceType?: string;
|
||||
status?: ServiceStatus;
|
||||
toolId?: string;
|
||||
}
|
||||
export declare enum ServiceStatus {
|
||||
Assigned = 0,
|
||||
Active = 1,
|
||||
Moving = 2,
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
ConnectionData: any;
|
||||
InheritLevel: {
|
||||
enumValues: {
|
||||
"none": number;
|
||||
"deployment": number;
|
||||
"account": number;
|
||||
"collection": number;
|
||||
"all": number;
|
||||
};
|
||||
};
|
||||
LocationServiceData: any;
|
||||
RelativeToSetting: {
|
||||
enumValues: {
|
||||
"context": number;
|
||||
"webApplication": number;
|
||||
"fullyQualified": number;
|
||||
};
|
||||
};
|
||||
ServiceDefinition: any;
|
||||
ServiceStatus: {
|
||||
enumValues: {
|
||||
"assigned": number;
|
||||
"active": number;
|
||||
"moving": number;
|
||||
};
|
||||
};
|
||||
};
|
||||
Generated
Vendored
+88
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const VSSInterfaces = require("../interfaces/common/VSSInterfaces");
|
||||
var InheritLevel;
|
||||
(function (InheritLevel) {
|
||||
InheritLevel[InheritLevel["None"] = 0] = "None";
|
||||
InheritLevel[InheritLevel["Deployment"] = 1] = "Deployment";
|
||||
InheritLevel[InheritLevel["Account"] = 2] = "Account";
|
||||
InheritLevel[InheritLevel["Collection"] = 4] = "Collection";
|
||||
InheritLevel[InheritLevel["All"] = 7] = "All";
|
||||
})(InheritLevel = exports.InheritLevel || (exports.InheritLevel = {}));
|
||||
var RelativeToSetting;
|
||||
(function (RelativeToSetting) {
|
||||
RelativeToSetting[RelativeToSetting["Context"] = 0] = "Context";
|
||||
RelativeToSetting[RelativeToSetting["WebApplication"] = 2] = "WebApplication";
|
||||
RelativeToSetting[RelativeToSetting["FullyQualified"] = 3] = "FullyQualified";
|
||||
})(RelativeToSetting = exports.RelativeToSetting || (exports.RelativeToSetting = {}));
|
||||
var ServiceStatus;
|
||||
(function (ServiceStatus) {
|
||||
ServiceStatus[ServiceStatus["Assigned"] = 0] = "Assigned";
|
||||
ServiceStatus[ServiceStatus["Active"] = 1] = "Active";
|
||||
ServiceStatus[ServiceStatus["Moving"] = 2] = "Moving";
|
||||
})(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {}));
|
||||
exports.TypeInfo = {
|
||||
ConnectionData: {},
|
||||
InheritLevel: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"deployment": 1,
|
||||
"account": 2,
|
||||
"collection": 4,
|
||||
"all": 7
|
||||
}
|
||||
},
|
||||
LocationServiceData: {},
|
||||
RelativeToSetting: {
|
||||
enumValues: {
|
||||
"context": 0,
|
||||
"webApplication": 2,
|
||||
"fullyQualified": 3
|
||||
}
|
||||
},
|
||||
ServiceDefinition: {},
|
||||
ServiceStatus: {
|
||||
enumValues: {
|
||||
"assigned": 0,
|
||||
"active": 1,
|
||||
"moving": 2
|
||||
}
|
||||
},
|
||||
};
|
||||
exports.TypeInfo.ConnectionData.fields = {
|
||||
deploymentType: {
|
||||
enumType: VSSInterfaces.TypeInfo.DeploymentFlags
|
||||
},
|
||||
lastUserAccess: {
|
||||
isDate: true,
|
||||
},
|
||||
locationServiceData: {
|
||||
typeInfo: exports.TypeInfo.LocationServiceData
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.LocationServiceData.fields = {
|
||||
serviceDefinitions: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.ServiceDefinition
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.ServiceDefinition.fields = {
|
||||
inheritLevel: {
|
||||
enumType: exports.TypeInfo.InheritLevel
|
||||
},
|
||||
relativeToSetting: {
|
||||
enumType: exports.TypeInfo.RelativeToSetting
|
||||
},
|
||||
status: {
|
||||
enumType: exports.TypeInfo.ServiceStatus
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+1520
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+853
@@ -0,0 +1,853 @@
|
||||
/*
|
||||
* ---------------------------------------------------------
|
||||
* Copyright(C) Microsoft Corporation. All rights reserved.
|
||||
* ---------------------------------------------------------
|
||||
*
|
||||
* ---------------------------------------------------------
|
||||
* Generated file, DO NOT EDIT
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Default delivery preference for group subscribers. Indicates how the subscriber should be notified.
|
||||
*/
|
||||
var DefaultGroupDeliveryPreference;
|
||||
(function (DefaultGroupDeliveryPreference) {
|
||||
DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["NoDelivery"] = -1] = "NoDelivery";
|
||||
DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["EachMember"] = 2] = "EachMember";
|
||||
})(DefaultGroupDeliveryPreference = exports.DefaultGroupDeliveryPreference || (exports.DefaultGroupDeliveryPreference = {}));
|
||||
/**
|
||||
* Describes the subscription evaluation operation status.
|
||||
*/
|
||||
var EvaluationOperationStatus;
|
||||
(function (EvaluationOperationStatus) {
|
||||
/**
|
||||
* The operation object does not have the status set.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["NotSet"] = 0] = "NotSet";
|
||||
/**
|
||||
* The operation has been queued.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["Queued"] = 1] = "Queued";
|
||||
/**
|
||||
* The operation is in progress.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["InProgress"] = 2] = "InProgress";
|
||||
/**
|
||||
* The operation was cancelled by the user.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["Cancelled"] = 3] = "Cancelled";
|
||||
/**
|
||||
* The operation completed successfully.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["Succeeded"] = 4] = "Succeeded";
|
||||
/**
|
||||
* The operation completed with a failure.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["Failed"] = 5] = "Failed";
|
||||
/**
|
||||
* The operation timed out.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["TimedOut"] = 6] = "TimedOut";
|
||||
/**
|
||||
* The operation could not be found.
|
||||
*/
|
||||
EvaluationOperationStatus[EvaluationOperationStatus["NotFound"] = 7] = "NotFound";
|
||||
})(EvaluationOperationStatus = exports.EvaluationOperationStatus || (exports.EvaluationOperationStatus = {}));
|
||||
/**
|
||||
* Set of flags used to determine which set of information is retrieved when querying for event publishers
|
||||
*/
|
||||
var EventPublisherQueryFlags;
|
||||
(function (EventPublisherQueryFlags) {
|
||||
EventPublisherQueryFlags[EventPublisherQueryFlags["None"] = 0] = "None";
|
||||
/**
|
||||
* Include event types from the remote services too
|
||||
*/
|
||||
EventPublisherQueryFlags[EventPublisherQueryFlags["IncludeRemoteServices"] = 2] = "IncludeRemoteServices";
|
||||
})(EventPublisherQueryFlags = exports.EventPublisherQueryFlags || (exports.EventPublisherQueryFlags = {}));
|
||||
/**
|
||||
* Set of flags used to determine which set of information is retrieved when querying for eventtypes
|
||||
*/
|
||||
var EventTypeQueryFlags;
|
||||
(function (EventTypeQueryFlags) {
|
||||
EventTypeQueryFlags[EventTypeQueryFlags["None"] = 0] = "None";
|
||||
/**
|
||||
* IncludeFields will include all fields and their types
|
||||
*/
|
||||
EventTypeQueryFlags[EventTypeQueryFlags["IncludeFields"] = 1] = "IncludeFields";
|
||||
})(EventTypeQueryFlags = exports.EventTypeQueryFlags || (exports.EventTypeQueryFlags = {}));
|
||||
var NotificationOperation;
|
||||
(function (NotificationOperation) {
|
||||
NotificationOperation[NotificationOperation["None"] = 0] = "None";
|
||||
NotificationOperation[NotificationOperation["SuspendUnprocessed"] = 1] = "SuspendUnprocessed";
|
||||
})(NotificationOperation = exports.NotificationOperation || (exports.NotificationOperation = {}));
|
||||
var NotificationReasonType;
|
||||
(function (NotificationReasonType) {
|
||||
NotificationReasonType[NotificationReasonType["Unknown"] = 0] = "Unknown";
|
||||
NotificationReasonType[NotificationReasonType["Follows"] = 1] = "Follows";
|
||||
NotificationReasonType[NotificationReasonType["Personal"] = 2] = "Personal";
|
||||
NotificationReasonType[NotificationReasonType["PersonalAlias"] = 3] = "PersonalAlias";
|
||||
NotificationReasonType[NotificationReasonType["DirectMember"] = 4] = "DirectMember";
|
||||
NotificationReasonType[NotificationReasonType["IndirectMember"] = 5] = "IndirectMember";
|
||||
NotificationReasonType[NotificationReasonType["GroupAlias"] = 6] = "GroupAlias";
|
||||
NotificationReasonType[NotificationReasonType["SubscriptionAlias"] = 7] = "SubscriptionAlias";
|
||||
NotificationReasonType[NotificationReasonType["SingleRole"] = 8] = "SingleRole";
|
||||
NotificationReasonType[NotificationReasonType["DirectMemberGroupRole"] = 9] = "DirectMemberGroupRole";
|
||||
NotificationReasonType[NotificationReasonType["InDirectMemberGroupRole"] = 10] = "InDirectMemberGroupRole";
|
||||
NotificationReasonType[NotificationReasonType["AliasMemberGroupRole"] = 11] = "AliasMemberGroupRole";
|
||||
})(NotificationReasonType = exports.NotificationReasonType || (exports.NotificationReasonType = {}));
|
||||
var NotificationStatisticType;
|
||||
(function (NotificationStatisticType) {
|
||||
NotificationStatisticType[NotificationStatisticType["NotificationBySubscription"] = 0] = "NotificationBySubscription";
|
||||
NotificationStatisticType[NotificationStatisticType["EventsByEventType"] = 1] = "EventsByEventType";
|
||||
NotificationStatisticType[NotificationStatisticType["NotificationByEventType"] = 2] = "NotificationByEventType";
|
||||
NotificationStatisticType[NotificationStatisticType["EventsByEventTypePerUser"] = 3] = "EventsByEventTypePerUser";
|
||||
NotificationStatisticType[NotificationStatisticType["NotificationByEventTypePerUser"] = 4] = "NotificationByEventTypePerUser";
|
||||
NotificationStatisticType[NotificationStatisticType["Events"] = 5] = "Events";
|
||||
NotificationStatisticType[NotificationStatisticType["Notifications"] = 6] = "Notifications";
|
||||
NotificationStatisticType[NotificationStatisticType["NotificationFailureBySubscription"] = 7] = "NotificationFailureBySubscription";
|
||||
NotificationStatisticType[NotificationStatisticType["UnprocessedRangeStart"] = 100] = "UnprocessedRangeStart";
|
||||
NotificationStatisticType[NotificationStatisticType["UnprocessedEventsByPublisher"] = 101] = "UnprocessedEventsByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["UnprocessedEventDelayByPublisher"] = 102] = "UnprocessedEventDelayByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationsByChannelByPublisher"] = 103] = "UnprocessedNotificationsByChannelByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationDelayByChannelByPublisher"] = 104] = "UnprocessedNotificationDelayByChannelByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["DelayRangeStart"] = 200] = "DelayRangeStart";
|
||||
NotificationStatisticType[NotificationStatisticType["TotalPipelineTime"] = 201] = "TotalPipelineTime";
|
||||
NotificationStatisticType[NotificationStatisticType["NotificationPipelineTime"] = 202] = "NotificationPipelineTime";
|
||||
NotificationStatisticType[NotificationStatisticType["EventPipelineTime"] = 203] = "EventPipelineTime";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyRangeStart"] = 1000] = "HourlyRangeStart";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyNotificationBySubscription"] = 1001] = "HourlyNotificationBySubscription";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyEventsByEventTypePerUser"] = 1002] = "HourlyEventsByEventTypePerUser";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyEvents"] = 1003] = "HourlyEvents";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyNotifications"] = 1004] = "HourlyNotifications";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventsByPublisher"] = 1101] = "HourlyUnprocessedEventsByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventDelayByPublisher"] = 1102] = "HourlyUnprocessedEventDelayByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationsByChannelByPublisher"] = 1103] = "HourlyUnprocessedNotificationsByChannelByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationDelayByChannelByPublisher"] = 1104] = "HourlyUnprocessedNotificationDelayByChannelByPublisher";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyTotalPipelineTime"] = 1201] = "HourlyTotalPipelineTime";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyNotificationPipelineTime"] = 1202] = "HourlyNotificationPipelineTime";
|
||||
NotificationStatisticType[NotificationStatisticType["HourlyEventPipelineTime"] = 1203] = "HourlyEventPipelineTime";
|
||||
})(NotificationStatisticType = exports.NotificationStatisticType || (exports.NotificationStatisticType = {}));
|
||||
/**
|
||||
* Delivery preference for a subscriber. Indicates how the subscriber should be notified.
|
||||
*/
|
||||
var NotificationSubscriberDeliveryPreference;
|
||||
(function (NotificationSubscriberDeliveryPreference) {
|
||||
NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["NoDelivery"] = -1] = "NoDelivery";
|
||||
/**
|
||||
* Deliver notifications to the subscriber's preferred email address.
|
||||
*/
|
||||
NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["PreferredEmailAddress"] = 1] = "PreferredEmailAddress";
|
||||
NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["EachMember"] = 2] = "EachMember";
|
||||
NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["UseDefault"] = 3] = "UseDefault";
|
||||
})(NotificationSubscriberDeliveryPreference = exports.NotificationSubscriberDeliveryPreference || (exports.NotificationSubscriberDeliveryPreference = {}));
|
||||
var SubscriberFlags;
|
||||
(function (SubscriberFlags) {
|
||||
SubscriberFlags[SubscriberFlags["None"] = 0] = "None";
|
||||
/**
|
||||
* Subscriber's delivery preferences could be updated
|
||||
*/
|
||||
SubscriberFlags[SubscriberFlags["DeliveryPreferencesEditable"] = 2] = "DeliveryPreferencesEditable";
|
||||
/**
|
||||
* Subscriber's delivery preferences supports email delivery
|
||||
*/
|
||||
SubscriberFlags[SubscriberFlags["SupportsPreferredEmailAddressDelivery"] = 4] = "SupportsPreferredEmailAddressDelivery";
|
||||
/**
|
||||
* Subscriber's delivery preferences supports individual members delivery(group expansion)
|
||||
*/
|
||||
SubscriberFlags[SubscriberFlags["SupportsEachMemberDelivery"] = 8] = "SupportsEachMemberDelivery";
|
||||
/**
|
||||
* Subscriber's delivery preferences supports no delivery
|
||||
*/
|
||||
SubscriberFlags[SubscriberFlags["SupportsNoDelivery"] = 16] = "SupportsNoDelivery";
|
||||
/**
|
||||
* Subscriber is a user
|
||||
*/
|
||||
SubscriberFlags[SubscriberFlags["IsUser"] = 32] = "IsUser";
|
||||
/**
|
||||
* Subscriber is a group
|
||||
*/
|
||||
SubscriberFlags[SubscriberFlags["IsGroup"] = 64] = "IsGroup";
|
||||
/**
|
||||
* Subscriber is a team
|
||||
*/
|
||||
SubscriberFlags[SubscriberFlags["IsTeam"] = 128] = "IsTeam";
|
||||
})(SubscriberFlags = exports.SubscriberFlags || (exports.SubscriberFlags = {}));
|
||||
var SubscriptionFieldType;
|
||||
(function (SubscriptionFieldType) {
|
||||
SubscriptionFieldType[SubscriptionFieldType["String"] = 1] = "String";
|
||||
SubscriptionFieldType[SubscriptionFieldType["Integer"] = 2] = "Integer";
|
||||
SubscriptionFieldType[SubscriptionFieldType["DateTime"] = 3] = "DateTime";
|
||||
SubscriptionFieldType[SubscriptionFieldType["PlainText"] = 5] = "PlainText";
|
||||
SubscriptionFieldType[SubscriptionFieldType["Html"] = 7] = "Html";
|
||||
SubscriptionFieldType[SubscriptionFieldType["TreePath"] = 8] = "TreePath";
|
||||
SubscriptionFieldType[SubscriptionFieldType["History"] = 9] = "History";
|
||||
SubscriptionFieldType[SubscriptionFieldType["Double"] = 10] = "Double";
|
||||
SubscriptionFieldType[SubscriptionFieldType["Guid"] = 11] = "Guid";
|
||||
SubscriptionFieldType[SubscriptionFieldType["Boolean"] = 12] = "Boolean";
|
||||
SubscriptionFieldType[SubscriptionFieldType["Identity"] = 13] = "Identity";
|
||||
SubscriptionFieldType[SubscriptionFieldType["PicklistInteger"] = 14] = "PicklistInteger";
|
||||
SubscriptionFieldType[SubscriptionFieldType["PicklistString"] = 15] = "PicklistString";
|
||||
SubscriptionFieldType[SubscriptionFieldType["PicklistDouble"] = 16] = "PicklistDouble";
|
||||
SubscriptionFieldType[SubscriptionFieldType["TeamProject"] = 17] = "TeamProject";
|
||||
})(SubscriptionFieldType = exports.SubscriptionFieldType || (exports.SubscriptionFieldType = {}));
|
||||
/**
|
||||
* Read-only indicators that further describe the subscription.
|
||||
*/
|
||||
var SubscriptionFlags;
|
||||
(function (SubscriptionFlags) {
|
||||
/**
|
||||
* None
|
||||
*/
|
||||
SubscriptionFlags[SubscriptionFlags["None"] = 0] = "None";
|
||||
/**
|
||||
* Subscription's subscriber is a group, not a user
|
||||
*/
|
||||
SubscriptionFlags[SubscriptionFlags["GroupSubscription"] = 1] = "GroupSubscription";
|
||||
/**
|
||||
* Subscription is contributed and not persisted. This means certain fields of the subscription, like Filter, are read-only.
|
||||
*/
|
||||
SubscriptionFlags[SubscriptionFlags["ContributedSubscription"] = 2] = "ContributedSubscription";
|
||||
/**
|
||||
* A user that is member of the subscription's subscriber group can opt in/out of the subscription.
|
||||
*/
|
||||
SubscriptionFlags[SubscriptionFlags["CanOptOut"] = 4] = "CanOptOut";
|
||||
/**
|
||||
* If the subscriber is a group, is it a team.
|
||||
*/
|
||||
SubscriptionFlags[SubscriptionFlags["TeamSubscription"] = 8] = "TeamSubscription";
|
||||
})(SubscriptionFlags = exports.SubscriptionFlags || (exports.SubscriptionFlags = {}));
|
||||
/**
|
||||
* The permissions that a user has to a certain subscription
|
||||
*/
|
||||
var SubscriptionPermissions;
|
||||
(function (SubscriptionPermissions) {
|
||||
/**
|
||||
* None
|
||||
*/
|
||||
SubscriptionPermissions[SubscriptionPermissions["None"] = 0] = "None";
|
||||
/**
|
||||
* full view of description, filters, etc. Not limited.
|
||||
*/
|
||||
SubscriptionPermissions[SubscriptionPermissions["View"] = 1] = "View";
|
||||
/**
|
||||
* update subscription
|
||||
*/
|
||||
SubscriptionPermissions[SubscriptionPermissions["Edit"] = 2] = "Edit";
|
||||
/**
|
||||
* delete subscription
|
||||
*/
|
||||
SubscriptionPermissions[SubscriptionPermissions["Delete"] = 4] = "Delete";
|
||||
})(SubscriptionPermissions = exports.SubscriptionPermissions || (exports.SubscriptionPermissions = {}));
|
||||
/**
|
||||
* Flags that influence the result set of a subscription query.
|
||||
*/
|
||||
var SubscriptionQueryFlags;
|
||||
(function (SubscriptionQueryFlags) {
|
||||
SubscriptionQueryFlags[SubscriptionQueryFlags["None"] = 0] = "None";
|
||||
/**
|
||||
* Include subscriptions with invalid subscribers.
|
||||
*/
|
||||
SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeInvalidSubscriptions"] = 2] = "IncludeInvalidSubscriptions";
|
||||
/**
|
||||
* Include subscriptions marked for deletion.
|
||||
*/
|
||||
SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeDeletedSubscriptions"] = 4] = "IncludeDeletedSubscriptions";
|
||||
/**
|
||||
* Include the full filter details with each subscription.
|
||||
*/
|
||||
SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeFilterDetails"] = 8] = "IncludeFilterDetails";
|
||||
/**
|
||||
* For a subscription the caller does not have permission to view, return basic (non-confidential) information.
|
||||
*/
|
||||
SubscriptionQueryFlags[SubscriptionQueryFlags["AlwaysReturnBasicInformation"] = 16] = "AlwaysReturnBasicInformation";
|
||||
})(SubscriptionQueryFlags = exports.SubscriptionQueryFlags || (exports.SubscriptionQueryFlags = {}));
|
||||
/**
|
||||
* Subscription status values. A value greater than or equal to zero indicates the subscription is enabled. A negative value indicates the subscription is disabled.
|
||||
*/
|
||||
var SubscriptionStatus;
|
||||
(function (SubscriptionStatus) {
|
||||
/**
|
||||
* Subscription is disabled because it generated a high volume of notifications.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["JailedByNotificationsVolume"] = -200] = "JailedByNotificationsVolume";
|
||||
/**
|
||||
* Subscription is disabled and will be deleted.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["PendingDeletion"] = -100] = "PendingDeletion";
|
||||
/**
|
||||
* Subscription is disabled because of an Argument Exception while processing the subscription
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledArgumentException"] = -12] = "DisabledArgumentException";
|
||||
/**
|
||||
* Subscription is disabled because the project is invalid
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledProjectInvalid"] = -11] = "DisabledProjectInvalid";
|
||||
/**
|
||||
* Subscription is disabled because the identity does not have the appropriate permissions
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledMissingPermissions"] = -10] = "DisabledMissingPermissions";
|
||||
/**
|
||||
* Subscription is disabled service due to failures.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledFromProbation"] = -9] = "DisabledFromProbation";
|
||||
/**
|
||||
* Subscription is disabled because the identity is no longer active
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledInactiveIdentity"] = -8] = "DisabledInactiveIdentity";
|
||||
/**
|
||||
* Subscription is disabled because message queue is not supported.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledMessageQueueNotSupported"] = -7] = "DisabledMessageQueueNotSupported";
|
||||
/**
|
||||
* Subscription is disabled because its subscriber is unknown.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledMissingIdentity"] = -6] = "DisabledMissingIdentity";
|
||||
/**
|
||||
* Subscription is disabled because it has an invalid role expression.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledInvalidRoleExpression"] = -5] = "DisabledInvalidRoleExpression";
|
||||
/**
|
||||
* Subscription is disabled because it has an invalid filter expression.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledInvalidPathClause"] = -4] = "DisabledInvalidPathClause";
|
||||
/**
|
||||
* Subscription is disabled because it is a duplicate of a default subscription.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledAsDuplicateOfDefault"] = -3] = "DisabledAsDuplicateOfDefault";
|
||||
/**
|
||||
* Subscription is disabled by an administrator, not the subscription's subscriber.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["DisabledByAdmin"] = -2] = "DisabledByAdmin";
|
||||
/**
|
||||
* Subscription is disabled, typically by the owner of the subscription, and will not produce any notifications.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["Disabled"] = -1] = "Disabled";
|
||||
/**
|
||||
* Subscription is active.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["Enabled"] = 0] = "Enabled";
|
||||
/**
|
||||
* Subscription is active, but is on probation due to failed deliveries or other issues with the subscription.
|
||||
*/
|
||||
SubscriptionStatus[SubscriptionStatus["EnabledOnProbation"] = 1] = "EnabledOnProbation";
|
||||
})(SubscriptionStatus = exports.SubscriptionStatus || (exports.SubscriptionStatus = {}));
|
||||
/**
|
||||
* Set of flags used to determine which set of templates is retrieved when querying for subscription templates
|
||||
*/
|
||||
var SubscriptionTemplateQueryFlags;
|
||||
(function (SubscriptionTemplateQueryFlags) {
|
||||
SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["None"] = 0] = "None";
|
||||
/**
|
||||
* Include user templates
|
||||
*/
|
||||
SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUser"] = 1] = "IncludeUser";
|
||||
/**
|
||||
* Include group templates
|
||||
*/
|
||||
SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeGroup"] = 2] = "IncludeGroup";
|
||||
/**
|
||||
* Include user and group templates
|
||||
*/
|
||||
SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUserAndGroup"] = 4] = "IncludeUserAndGroup";
|
||||
/**
|
||||
* Include the event type details like the fields and operators
|
||||
*/
|
||||
SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeEventTypeInformation"] = 22] = "IncludeEventTypeInformation";
|
||||
})(SubscriptionTemplateQueryFlags = exports.SubscriptionTemplateQueryFlags || (exports.SubscriptionTemplateQueryFlags = {}));
|
||||
var SubscriptionTemplateType;
|
||||
(function (SubscriptionTemplateType) {
|
||||
SubscriptionTemplateType[SubscriptionTemplateType["User"] = 0] = "User";
|
||||
SubscriptionTemplateType[SubscriptionTemplateType["Team"] = 1] = "Team";
|
||||
SubscriptionTemplateType[SubscriptionTemplateType["Both"] = 2] = "Both";
|
||||
SubscriptionTemplateType[SubscriptionTemplateType["None"] = 3] = "None";
|
||||
})(SubscriptionTemplateType = exports.SubscriptionTemplateType || (exports.SubscriptionTemplateType = {}));
|
||||
exports.TypeInfo = {
|
||||
ActorNotificationReason: {},
|
||||
BatchNotificationOperation: {},
|
||||
DefaultGroupDeliveryPreference: {
|
||||
enumValues: {
|
||||
"noDelivery": -1,
|
||||
"eachMember": 2
|
||||
}
|
||||
},
|
||||
EvaluationOperationStatus: {
|
||||
enumValues: {
|
||||
"notSet": 0,
|
||||
"queued": 1,
|
||||
"inProgress": 2,
|
||||
"cancelled": 3,
|
||||
"succeeded": 4,
|
||||
"failed": 5,
|
||||
"timedOut": 6,
|
||||
"notFound": 7
|
||||
}
|
||||
},
|
||||
EventBacklogStatus: {},
|
||||
EventProcessingLog: {},
|
||||
EventPublisherQueryFlags: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"includeRemoteServices": 2
|
||||
}
|
||||
},
|
||||
EventTypeQueryFlags: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"includeFields": 1
|
||||
}
|
||||
},
|
||||
INotificationDiagnosticLog: {},
|
||||
NotificationAdminSettings: {},
|
||||
NotificationAdminSettingsUpdateParameters: {},
|
||||
NotificationBacklogStatus: {},
|
||||
NotificationDeliveryLog: {},
|
||||
NotificationDiagnosticLog: {},
|
||||
NotificationEventBacklogStatus: {},
|
||||
NotificationEventField: {},
|
||||
NotificationEventFieldType: {},
|
||||
NotificationEventType: {},
|
||||
NotificationJobDiagnosticLog: {},
|
||||
NotificationOperation: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"suspendUnprocessed": 1
|
||||
}
|
||||
},
|
||||
NotificationReason: {},
|
||||
NotificationReasonType: {
|
||||
enumValues: {
|
||||
"unknown": 0,
|
||||
"follows": 1,
|
||||
"personal": 2,
|
||||
"personalAlias": 3,
|
||||
"directMember": 4,
|
||||
"indirectMember": 5,
|
||||
"groupAlias": 6,
|
||||
"subscriptionAlias": 7,
|
||||
"singleRole": 8,
|
||||
"directMemberGroupRole": 9,
|
||||
"inDirectMemberGroupRole": 10,
|
||||
"aliasMemberGroupRole": 11
|
||||
}
|
||||
},
|
||||
NotificationStatistic: {},
|
||||
NotificationStatisticsQuery: {},
|
||||
NotificationStatisticsQueryConditions: {},
|
||||
NotificationStatisticType: {
|
||||
enumValues: {
|
||||
"notificationBySubscription": 0,
|
||||
"eventsByEventType": 1,
|
||||
"notificationByEventType": 2,
|
||||
"eventsByEventTypePerUser": 3,
|
||||
"notificationByEventTypePerUser": 4,
|
||||
"events": 5,
|
||||
"notifications": 6,
|
||||
"notificationFailureBySubscription": 7,
|
||||
"unprocessedRangeStart": 100,
|
||||
"unprocessedEventsByPublisher": 101,
|
||||
"unprocessedEventDelayByPublisher": 102,
|
||||
"unprocessedNotificationsByChannelByPublisher": 103,
|
||||
"unprocessedNotificationDelayByChannelByPublisher": 104,
|
||||
"delayRangeStart": 200,
|
||||
"totalPipelineTime": 201,
|
||||
"notificationPipelineTime": 202,
|
||||
"eventPipelineTime": 203,
|
||||
"hourlyRangeStart": 1000,
|
||||
"hourlyNotificationBySubscription": 1001,
|
||||
"hourlyEventsByEventTypePerUser": 1002,
|
||||
"hourlyEvents": 1003,
|
||||
"hourlyNotifications": 1004,
|
||||
"hourlyUnprocessedEventsByPublisher": 1101,
|
||||
"hourlyUnprocessedEventDelayByPublisher": 1102,
|
||||
"hourlyUnprocessedNotificationsByChannelByPublisher": 1103,
|
||||
"hourlyUnprocessedNotificationDelayByChannelByPublisher": 1104,
|
||||
"hourlyTotalPipelineTime": 1201,
|
||||
"hourlyNotificationPipelineTime": 1202,
|
||||
"hourlyEventPipelineTime": 1203
|
||||
}
|
||||
},
|
||||
NotificationSubscriber: {},
|
||||
NotificationSubscriberDeliveryPreference: {
|
||||
enumValues: {
|
||||
"noDelivery": -1,
|
||||
"preferredEmailAddress": 1,
|
||||
"eachMember": 2,
|
||||
"useDefault": 3
|
||||
}
|
||||
},
|
||||
NotificationSubscriberUpdateParameters: {},
|
||||
NotificationSubscription: {},
|
||||
NotificationSubscriptionTemplate: {},
|
||||
NotificationSubscriptionUpdateParameters: {},
|
||||
SubscriberFlags: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"deliveryPreferencesEditable": 2,
|
||||
"supportsPreferredEmailAddressDelivery": 4,
|
||||
"supportsEachMemberDelivery": 8,
|
||||
"supportsNoDelivery": 16,
|
||||
"isUser": 32,
|
||||
"isGroup": 64,
|
||||
"isTeam": 128
|
||||
}
|
||||
},
|
||||
SubscriptionDiagnostics: {},
|
||||
SubscriptionEvaluationRequest: {},
|
||||
SubscriptionEvaluationResult: {},
|
||||
SubscriptionFieldType: {
|
||||
enumValues: {
|
||||
"string": 1,
|
||||
"integer": 2,
|
||||
"dateTime": 3,
|
||||
"plainText": 5,
|
||||
"html": 7,
|
||||
"treePath": 8,
|
||||
"history": 9,
|
||||
"double": 10,
|
||||
"guid": 11,
|
||||
"boolean": 12,
|
||||
"identity": 13,
|
||||
"picklistInteger": 14,
|
||||
"picklistString": 15,
|
||||
"picklistDouble": 16,
|
||||
"teamProject": 17
|
||||
}
|
||||
},
|
||||
SubscriptionFlags: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"groupSubscription": 1,
|
||||
"contributedSubscription": 2,
|
||||
"canOptOut": 4,
|
||||
"teamSubscription": 8
|
||||
}
|
||||
},
|
||||
SubscriptionPermissions: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"view": 1,
|
||||
"edit": 2,
|
||||
"delete": 4
|
||||
}
|
||||
},
|
||||
SubscriptionQuery: {},
|
||||
SubscriptionQueryCondition: {},
|
||||
SubscriptionQueryFlags: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"includeInvalidSubscriptions": 2,
|
||||
"includeDeletedSubscriptions": 4,
|
||||
"includeFilterDetails": 8,
|
||||
"alwaysReturnBasicInformation": 16
|
||||
}
|
||||
},
|
||||
SubscriptionStatus: {
|
||||
enumValues: {
|
||||
"jailedByNotificationsVolume": -200,
|
||||
"pendingDeletion": -100,
|
||||
"disabledArgumentException": -12,
|
||||
"disabledProjectInvalid": -11,
|
||||
"disabledMissingPermissions": -10,
|
||||
"disabledFromProbation": -9,
|
||||
"disabledInactiveIdentity": -8,
|
||||
"disabledMessageQueueNotSupported": -7,
|
||||
"disabledMissingIdentity": -6,
|
||||
"disabledInvalidRoleExpression": -5,
|
||||
"disabledInvalidPathClause": -4,
|
||||
"disabledAsDuplicateOfDefault": -3,
|
||||
"disabledByAdmin": -2,
|
||||
"disabled": -1,
|
||||
"enabled": 0,
|
||||
"enabledOnProbation": 1
|
||||
}
|
||||
},
|
||||
SubscriptionTemplateQueryFlags: {
|
||||
enumValues: {
|
||||
"none": 0,
|
||||
"includeUser": 1,
|
||||
"includeGroup": 2,
|
||||
"includeUserAndGroup": 4,
|
||||
"includeEventTypeInformation": 22
|
||||
}
|
||||
},
|
||||
SubscriptionTemplateType: {
|
||||
enumValues: {
|
||||
"user": 0,
|
||||
"team": 1,
|
||||
"both": 2,
|
||||
"none": 3
|
||||
}
|
||||
},
|
||||
SubscriptionTraceDiagnosticLog: {},
|
||||
SubscriptionTraceEventProcessingLog: {},
|
||||
SubscriptionTraceNotificationDeliveryLog: {},
|
||||
SubscriptionTracing: {},
|
||||
};
|
||||
exports.TypeInfo.ActorNotificationReason.fields = {
|
||||
notificationReasonType: {
|
||||
enumType: exports.TypeInfo.NotificationReasonType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.BatchNotificationOperation.fields = {
|
||||
notificationOperation: {
|
||||
enumType: exports.TypeInfo.NotificationOperation
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.EventBacklogStatus.fields = {
|
||||
captureTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastEventBatchStartTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastEventProcessedTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastJobBatchStartTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastJobProcessedTime: {
|
||||
isDate: true,
|
||||
},
|
||||
oldestPendingEventTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.EventProcessingLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.INotificationDiagnosticLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationAdminSettings.fields = {
|
||||
defaultGroupDeliveryPreference: {
|
||||
enumType: exports.TypeInfo.DefaultGroupDeliveryPreference
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationAdminSettingsUpdateParameters.fields = {
|
||||
defaultGroupDeliveryPreference: {
|
||||
enumType: exports.TypeInfo.DefaultGroupDeliveryPreference
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationBacklogStatus.fields = {
|
||||
captureTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastJobBatchStartTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastJobProcessedTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastNotificationBatchStartTime: {
|
||||
isDate: true,
|
||||
},
|
||||
lastNotificationProcessedTime: {
|
||||
isDate: true,
|
||||
},
|
||||
oldestPendingNotificationTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationDeliveryLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationDiagnosticLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationEventBacklogStatus.fields = {
|
||||
eventBacklogStatus: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.EventBacklogStatus
|
||||
},
|
||||
notificationBacklogStatus: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.NotificationBacklogStatus
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationEventField.fields = {
|
||||
fieldType: {
|
||||
typeInfo: exports.TypeInfo.NotificationEventFieldType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationEventFieldType.fields = {
|
||||
subscriptionFieldType: {
|
||||
enumType: exports.TypeInfo.SubscriptionFieldType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationEventType.fields = {
|
||||
fields: {
|
||||
isDictionary: true,
|
||||
dictionaryValueTypeInfo: exports.TypeInfo.NotificationEventField
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationJobDiagnosticLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationReason.fields = {
|
||||
notificationReasonType: {
|
||||
enumType: exports.TypeInfo.NotificationReasonType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationStatistic.fields = {
|
||||
date: {
|
||||
isDate: true,
|
||||
},
|
||||
type: {
|
||||
enumType: exports.TypeInfo.NotificationStatisticType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationStatisticsQuery.fields = {
|
||||
conditions: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.NotificationStatisticsQueryConditions
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationStatisticsQueryConditions.fields = {
|
||||
endDate: {
|
||||
isDate: true,
|
||||
},
|
||||
startDate: {
|
||||
isDate: true,
|
||||
},
|
||||
type: {
|
||||
enumType: exports.TypeInfo.NotificationStatisticType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationSubscriber.fields = {
|
||||
deliveryPreference: {
|
||||
enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference
|
||||
},
|
||||
flags: {
|
||||
enumType: exports.TypeInfo.SubscriberFlags
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationSubscriberUpdateParameters.fields = {
|
||||
deliveryPreference: {
|
||||
enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationSubscription.fields = {
|
||||
diagnostics: {
|
||||
typeInfo: exports.TypeInfo.SubscriptionDiagnostics
|
||||
},
|
||||
flags: {
|
||||
enumType: exports.TypeInfo.SubscriptionFlags
|
||||
},
|
||||
modifiedDate: {
|
||||
isDate: true,
|
||||
},
|
||||
permissions: {
|
||||
enumType: exports.TypeInfo.SubscriptionPermissions
|
||||
},
|
||||
status: {
|
||||
enumType: exports.TypeInfo.SubscriptionStatus
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationSubscriptionTemplate.fields = {
|
||||
notificationEventInformation: {
|
||||
typeInfo: exports.TypeInfo.NotificationEventType
|
||||
},
|
||||
type: {
|
||||
enumType: exports.TypeInfo.SubscriptionTemplateType
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.NotificationSubscriptionUpdateParameters.fields = {
|
||||
status: {
|
||||
enumType: exports.TypeInfo.SubscriptionStatus
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionDiagnostics.fields = {
|
||||
deliveryResults: {
|
||||
typeInfo: exports.TypeInfo.SubscriptionTracing
|
||||
},
|
||||
deliveryTracing: {
|
||||
typeInfo: exports.TypeInfo.SubscriptionTracing
|
||||
},
|
||||
evaluationTracing: {
|
||||
typeInfo: exports.TypeInfo.SubscriptionTracing
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionEvaluationRequest.fields = {
|
||||
minEventsCreatedDate: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionEvaluationResult.fields = {
|
||||
evaluationJobStatus: {
|
||||
enumType: exports.TypeInfo.EvaluationOperationStatus
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionQuery.fields = {
|
||||
conditions: {
|
||||
isArray: true,
|
||||
typeInfo: exports.TypeInfo.SubscriptionQueryCondition
|
||||
},
|
||||
queryFlags: {
|
||||
enumType: exports.TypeInfo.SubscriptionQueryFlags
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionQueryCondition.fields = {
|
||||
flags: {
|
||||
enumType: exports.TypeInfo.SubscriptionFlags
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionTraceDiagnosticLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionTraceEventProcessingLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionTraceNotificationDeliveryLog.fields = {
|
||||
endTime: {
|
||||
isDate: true,
|
||||
},
|
||||
startTime: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
exports.TypeInfo.SubscriptionTracing.fields = {
|
||||
endDate: {
|
||||
isDate: true,
|
||||
},
|
||||
startDate: {
|
||||
isDate: true,
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+170
@@ -0,0 +1,170 @@
|
||||
import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
|
||||
/**
|
||||
* The full policy configuration with settings.
|
||||
*/
|
||||
export interface PolicyConfiguration extends VersionedPolicyConfigurationRef {
|
||||
/**
|
||||
* The links to other objects related to this object.
|
||||
*/
|
||||
_links?: any;
|
||||
/**
|
||||
* A reference to the identity that created the policy.
|
||||
*/
|
||||
createdBy?: VSSInterfaces.IdentityRef;
|
||||
/**
|
||||
* The date and time when the policy was created.
|
||||
*/
|
||||
createdDate?: Date;
|
||||
/**
|
||||
* Indicates whether the policy is blocking.
|
||||
*/
|
||||
isBlocking: boolean;
|
||||
/**
|
||||
* Indicates whether the policy has been (soft) deleted.
|
||||
*/
|
||||
isDeleted?: boolean;
|
||||
/**
|
||||
* Indicates whether the policy is enabled.
|
||||
*/
|
||||
isEnabled: boolean;
|
||||
/**
|
||||
* The policy configuration settings.
|
||||
*/
|
||||
settings: any;
|
||||
}
|
||||
/**
|
||||
* Policy configuration reference.
|
||||
*/
|
||||
export interface PolicyConfigurationRef {
|
||||
/**
|
||||
* The policy configuration ID.
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* The policy configuration type.
|
||||
*/
|
||||
type?: PolicyTypeRef;
|
||||
/**
|
||||
* The URL where the policy configuration can be retrieved.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* This record encapsulates the current state of a policy as it applies to one specific pull request. Each pull request has a unique PolicyEvaluationRecord for each pull request which the policy applies to.
|
||||
*/
|
||||
export interface PolicyEvaluationRecord {
|
||||
/**
|
||||
* Links to other related objects
|
||||
*/
|
||||
_links?: any;
|
||||
/**
|
||||
* A string which uniquely identifies the target of a policy evaluation.
|
||||
*/
|
||||
artifactId?: string;
|
||||
/**
|
||||
* Time when this policy finished evaluating on this pull request.
|
||||
*/
|
||||
completedDate?: Date;
|
||||
/**
|
||||
* Contains all configuration data for the policy which is being evaluated.
|
||||
*/
|
||||
configuration?: PolicyConfiguration;
|
||||
/**
|
||||
* Internal context data of this policy evaluation.
|
||||
*/
|
||||
context?: any;
|
||||
/**
|
||||
* Guid which uniquely identifies this evaluation record (one policy running on one pull request).
|
||||
*/
|
||||
evaluationId?: string;
|
||||
/**
|
||||
* Time when this policy was first evaluated on this pull request.
|
||||
*/
|
||||
startedDate?: Date;
|
||||
/**
|
||||
* Status of the policy (Running, Approved, Failed, etc.)
|
||||
*/
|
||||
status?: PolicyEvaluationStatus;
|
||||
}
|
||||
/**
|
||||
* Status of a policy which is running against a specific pull request.
|
||||
*/
|
||||
export declare enum PolicyEvaluationStatus {
|
||||
/**
|
||||
* The policy is either queued to run, or is waiting for some event before progressing.
|
||||
*/
|
||||
Queued = 0,
|
||||
/**
|
||||
* The policy is currently running.
|
||||
*/
|
||||
Running = 1,
|
||||
/**
|
||||
* The policy has been fulfilled for this pull request.
|
||||
*/
|
||||
Approved = 2,
|
||||
/**
|
||||
* The policy has rejected this pull request.
|
||||
*/
|
||||
Rejected = 3,
|
||||
/**
|
||||
* The policy does not apply to this pull request.
|
||||
*/
|
||||
NotApplicable = 4,
|
||||
/**
|
||||
* The policy has encountered an unexpected error.
|
||||
*/
|
||||
Broken = 5,
|
||||
}
|
||||
/**
|
||||
* User-friendly policy type with description (used for querying policy types).
|
||||
*/
|
||||
export interface PolicyType extends PolicyTypeRef {
|
||||
/**
|
||||
* The links to other objects related to this object.
|
||||
*/
|
||||
_links?: any;
|
||||
/**
|
||||
* Detailed description of the policy type.
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
/**
|
||||
* Policy type reference.
|
||||
*/
|
||||
export interface PolicyTypeRef {
|
||||
/**
|
||||
* Display name of the policy type.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* The policy type ID.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The URL where the policy type can be retrieved.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* A particular revision for a policy configuration.
|
||||
*/
|
||||
export interface VersionedPolicyConfigurationRef extends PolicyConfigurationRef {
|
||||
/**
|
||||
* The policy configuration revision ID.
|
||||
*/
|
||||
revision?: number;
|
||||
}
|
||||
export declare var TypeInfo: {
|
||||
PolicyConfiguration: any;
|
||||
PolicyEvaluationRecord: any;
|
||||
PolicyEvaluationStatus: {
|
||||
enumValues: {
|
||||
"queued": number;
|
||||
"running": number;
|
||||
"approved": number;
|
||||
"rejected": number;
|
||||
"notApplicable": number;
|
||||
"broken": number;
|
||||
};
|
||||
};
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user