diff --git a/package.json b/package.json index abe82bb..6e1b4b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vss-web-extension-sdk", - "version": "2.116.1", + "version": "2.117.0", "description": "Visual Studio Team Services web extension JavaScript library and types.", "repository": { "type": "git", diff --git a/typings/rmo.d.ts b/typings/rmo.d.ts index 7a5ca93..1c8cbbb 100644 --- a/typings/rmo.d.ts +++ b/typings/rmo.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Microsoft Visual Studio Services v116.20170509.1601 +// Type definitions for Microsoft Visual Studio Services v117.20170531.1430 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft diff --git a/typings/tfs.d.ts b/typings/tfs.d.ts index 0947825..9d8db41 100644 --- a/typings/tfs.d.ts +++ b/typings/tfs.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Microsoft Visual Studio Services v116.20170509.1548 +// Type definitions for Microsoft Visual Studio Services v117.20170531.1430 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft @@ -1759,6 +1759,7 @@ export var TypeInfo: { BuildTrigger: any; BuildUpdatedEvent: any; Change: any; + ContinuousDeploymentDefinition: any; ContinuousIntegrationTrigger: any; ControllerStatus: { enumValues: { @@ -3918,6 +3919,7 @@ export interface ProjectInfo { state: any; uri: string; version: number; + visibility: ProjectVisibility; } export interface ProjectMessage { project: ProjectInfo; @@ -3927,6 +3929,12 @@ export interface ProjectProperty { name: string; value: any; } +export enum ProjectVisibility { + Unchanged = -1, + Private = 0, + Organization = 1, + Public = 2, +} export interface Proxy { authorization: ProxyAuthorization; /** @@ -4078,6 +4086,10 @@ export interface TeamProjectReference { * 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. @@ -4254,13 +4266,26 @@ export var TypeInfo: { }; ProjectInfo: any; ProjectMessage: any; + ProjectVisibility: { + enumValues: { + "unchanged": number; + "private": number; + "organization": number; + "public": number; + }; + }; SourceControlTypes: { enumValues: { "tfvc": number; "git": number; }; }; + TeamProject: any; + TeamProjectReference: any; TemporaryDataCreatedDTO: any; + WebApiConnectedService: any; + WebApiConnectedServiceDetails: any; + WebApiProject: any; }; } declare module "TFS/Core/RestClient" { @@ -5316,7 +5341,7 @@ export interface IWidgetHostService { * Provides means for widget authors to track and understand usage/performance of at context of individual of widgets. * Identification should not be relied upon to be present for all widgets. In particular, new unsaved widgets in preview mode do not have an identity yet. */ - getWidgetId: () => string; + getWidgetId: () => IPromise; } export module WidgetHostService { /** @@ -5580,11 +5605,11 @@ export class WidgetStatusHelper { * method to encapsulate a failed result for a widget loading operation (load, reload, openLightbox etc) * @param message message to display as part within the widget error experience. * @param isUserVisible indicates whether the message should be displayed to the user or a generic error message displayed. Defaults to true. - * @param isRichtText indicates whether the message is an html that can be rendered as a rich experience. Defaults to false. Only trusted extensions are + * @param isRichText indicates whether the message is an html that can be rendered as a rich experience. Defaults to false. Only trusted extensions are * allowed to set this to true. For any 3rd party widgets passing this value as true, it will be ignored. * @returns promise encapsulating the status of the widget loading operations. */ - static Failure(message: string, isUserVisible?: boolean, isRichtText?: boolean): IPromise; + static Failure(message: string, isUserVisible?: boolean, isRichText?: boolean): IPromise; /** * method to encapsulate a result for a widget loading operation that results in the widget being in an unconfigured state. * @returns promise encapsulating the status of the widget loading operations. @@ -6071,6 +6096,11 @@ export interface PlanEnvironment { [key: string]: string; }; } +export enum PlanGroupStatus { + Running = 1, + Queued = 2, + All = 3, +} export enum PlanGroupStatusFilter { Running = 1, Queued = 2, @@ -6872,7 +6902,7 @@ export interface TaskOrchestrationPlan extends TaskOrchestrationPlanReference { } export interface TaskOrchestrationPlanGroupsQueueMetrics { count: number; - status: PlanGroupStatusFilter; + status: PlanGroupStatus; } export interface TaskOrchestrationPlanReference { artifactLocation: string; @@ -7083,6 +7113,13 @@ export var TypeInfo: { }; PackageMetadata: any; PlanEnvironment: any; + PlanGroupStatus: { + enumValues: { + "running": number; + "queued": number; + "all": number; + }; + }; PlanGroupStatusFilter: { enumValues: { "running": number; @@ -7593,15 +7630,6 @@ export class CommonMethods3To3_2 extends CommonMethods2_1To3_2 { * @return IPromise */ addTaskGroup(taskGroup: Contracts.TaskGroup, project: string): IPromise; - /** - * @exemptedapi - * [Preview API] - * - * @param {Contracts.ServiceEndpoint[]} endpoints - * @param {string} project - Project ID or project name - * @return IPromise - */ - updateServiceEndpoints(endpoints: Contracts.ServiceEndpoint[], project: string): IPromise; /** * @exemptedapi * [Preview API] @@ -7949,6 +7977,14 @@ export class TaskAgentHttpClient3_2 extends CommonMethods3_1To3_2 { * @return IPromise */ getAgentRequestsForDeploymentMachines(project: string, deploymentGroupId: number, machineIds?: number[], completedRequestCount?: number): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @return IPromise + */ + refreshDeploymentMachines(project: string, deploymentGroupId: number): IPromise; /** * [Preview API] * @@ -8188,12 +8224,20 @@ export class TaskAgentHttpClient3_2 extends CommonMethods3_1To3_2 { /** * [Preview API] Upload a secure file, include the file stream in the request body * - * @param {string} content - Content to upload + * @param {any} content - Content to upload * @param {string} project - Project ID or project name * @param {string} name - Name of the file to upload * @return IPromise */ - uploadSecureFile(content: string, project: string, name: string): IPromise; + uploadSecureFile(content: any, project: string, name: string): IPromise; + /** + * [Preview API] + * + * @param {Contracts.ServiceEndpoint[]} endpoints + * @param {string} project - Project ID or project name + * @return IPromise + */ + updateServiceEndpoints(endpoints: Contracts.ServiceEndpoint[], project: string): IPromise; /** * [Preview API] * @@ -8767,11 +8811,11 @@ export class CommonMethods3_1To3_2 extends CommonMethods2_1To3_2 { * * @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 {TFS_DistributedTask_Contracts.PlanGroupStatusFilter} statusFilter + * @param {TFS_DistributedTask_Contracts.PlanGroupStatus} statusFilter * @param {number} count * @return IPromise */ - getQueuedPlanGroups(scopeIdentifier: string, hubName: string, statusFilter?: TFS_DistributedTask_Contracts.PlanGroupStatusFilter, count?: number): IPromise; + getQueuedPlanGroups(scopeIdentifier: string, hubName: string, statusFilter?: TFS_DistributedTask_Contracts.PlanGroupStatus, count?: number): IPromise; } /** * @exemptedapi @@ -9458,6 +9502,7 @@ export interface PlanUpdateModel { automatedTestEnvironment: TestEnvironment; automatedTestSettings: TestSettings; build: ShallowReference; + buildDefinition: ShallowReference; configurationIds: number[]; description: string; endDate: string; @@ -9466,6 +9511,7 @@ export interface PlanUpdateModel { manualTestSettings: TestSettings; name: string; owner: VSS_Common_Contracts.IdentityRef; + releaseEnvironmentDefinition: ReleaseEnvironmentDefinitionReference; startDate: string; state: string; status: string; @@ -9501,6 +9547,10 @@ export interface PropertyBag { export interface QueryModel { query: string; } +export interface ReleaseEnvironmentDefinitionReference { + definitionId: number; + environmentDefinitionId: number; +} export interface ReleaseReference { definitionId: number; environmentDefinitionId: number; @@ -9984,6 +10034,7 @@ export interface TestPlan { automatedTestEnvironment: TestEnvironment; automatedTestSettings: TestSettings; build: ShallowReference; + buildDefinition: ShallowReference; clientUrl: string; description: string; endDate: Date; @@ -9995,6 +10046,7 @@ export interface TestPlan { owner: VSS_Common_Contracts.IdentityRef; previousBuild: ShallowReference; project: ShallowReference; + releaseEnvironmentDefinition: ReleaseEnvironmentDefinitionReference; revision: number; rootSuite: ShallowReference; startDate: Date; @@ -12472,9 +12524,53 @@ export interface GitAsyncRefOperation { export interface GitAsyncRefOperationDetail { conflict: boolean; currentCommitId: string; + failureMessage: string; progress: number; + status: GitAsyncRefOperationFailureStatus; timedout: boolean; } +export enum GitAsyncRefOperationFailureStatus { + /** + * No status + */ + None = 0, + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + InvalidRefName = 1, + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + RefNameConflict = 2, + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + CreateBranchPermissionRequired = 3, + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + WritePermissionRequired = 4, + /** + * Target branch was deleted after Git async operation started + */ + TargetBranchDeleted = 5, + /** + * Git object is too large to materialize into memory + */ + GitObjectTooLarge = 6, + /** + * Identity who authorized the operation was not found + */ + OperationIndentityNotFound = 7, + /** + * Async operation was not found + */ + AsyncOperationNotFound = 8, + /** + * Unexpected failure + */ + Other = 9, +} export interface GitAsyncRefOperationParameters { generatedRefName: string; ontoRefName: string; @@ -14204,6 +14300,21 @@ export var TypeInfo: { }; }; GitAsyncRefOperation: any; + GitAsyncRefOperationDetail: any; + GitAsyncRefOperationFailureStatus: { + enumValues: { + "none": number; + "invalidRefName": number; + "refNameConflict": number; + "createBranchPermissionRequired": number; + "writePermissionRequired": number; + "targetBranchDeleted": number; + "gitObjectTooLarge": number; + "operationIndentityNotFound": number; + "asyncOperationNotFound": number; + "other": number; + }; + }; GitAsyncRefOperationParameters: any; GitAsyncRefOperationSource: any; GitBaseVersionDescriptor: any; @@ -14257,7 +14368,9 @@ export var TypeInfo: { "fullHistorySimplifyMerges": number; }; }; + GitImportFailedEvent: any; GitImportRequest: any; + GitImportSucceededEvent: any; GitItem: any; GitItemDescriptor: any; GitItemRequestData: any; @@ -14350,6 +14463,7 @@ export var TypeInfo: { "succeededCorruptRef": number; }; }; + GitRepository: any; GitResolutionError: { enumValues: { "none": number; @@ -14597,6 +14711,33 @@ export module HistoryList { /** * Configuration options when creating the GitHistoryList extension control. */ +export interface ITfvcHistoryListOptions { + /** ItemPath for control to search history */ + itemPaths?: string[]; + /** Callback to be invoked when the scenario is completed */ + onScenarioComplete?: () => void; + /** From commit id for control to search history */ + fromVersion?: string; + /** To commit id for control to search history */ + toVersion?: string; +} +/** +* Control showing the Git history list +*/ +export module TfvcHistoryList { + var contributionId: string; + /** + * Create an instance of the new history list control + * + * @param $container Container element to create the history list control in + * @param options GitHistoryList control options + * @param webContext Optional web context to scope the control to + */ + function create($container: JQuery, options?: ITfvcHistoryListOptions, webContext?: Contracts_Platform.WebContext): IPromise; +} +/** +* Configuration options when creating the GitHistoryList extension control. +*/ export interface IGitHistoryListOptions { /** From commit id for control to search history */ fromVersion?: string; @@ -16360,6 +16501,7 @@ export var TypeInfo: { }; }; WikiPageChange: any; + WikiRepository: any; WikiUpdate: any; }; } @@ -16617,6 +16759,14 @@ export interface AccountWorkWorkItemModel { title: string; workItemType: string; } +export interface ArtifactUriQuery { + artifactUris: string[]; +} +export interface ArtifactUriQueryResult { + artifactUrisQueryResult: { + [key: string]: WorkItemReference[]; + }; +} export interface AttachmentReference { id: string; url: string; @@ -16823,6 +16973,11 @@ export enum TreeStructureGroup { export interface Wiql { query: string; } +export interface WorkArtifactLink { + artifactType: string; + linkType: string; + toolType: string; +} export interface WorkItem extends WorkItemTrackingResource { fields: { [key: string]: any; @@ -17369,11 +17524,9 @@ export interface FieldModel { export interface FieldRuleModel { action: RuleActionModel; conditions: RuleConditionModel[]; - description: string; - friendlyName: string; id: string; isDisabled: boolean; - isInherited: boolean; + isSystem: boolean; } export enum FieldType { String = 1, @@ -17841,15 +17994,6 @@ export interface FieldModel { type: FieldType; url: string; } -export interface FieldRuleModel { - action: RuleActionModel; - conditions: RuleConditionModel[]; - description: string; - friendlyName: string; - id: string; - isDisabled: boolean; - isInherited: boolean; -} export enum FieldType { String = 1, Integer = 2, @@ -18004,16 +18148,6 @@ export interface PickListMetadataModel { export interface PickListModel extends PickListMetadataModel { items: PickListItemModel[]; } -export interface RuleActionModel { - actionType: string; - targetField: string; - value: string; -} -export interface RuleConditionModel { - conditionType: string; - field: string; - value: string; -} export interface Section { groups: Group[]; /** @@ -18170,9 +18304,7 @@ export class CommonMethods2_1To3_2 extends VSS_WebApi.VssHttpClient { protected pagesApiVersion: string; protected statesApiVersion: string; protected workItemTypesApiVersion: string; - protected workItemTypesApiVersion_8b13e121: string; protected workItemTypesApiVersion_921dfb88: string; - protected workItemTypesApiVersion_afd8a636: string; protected workItemTypesFieldsApiVersion: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** @@ -18252,74 +18384,6 @@ export class CommonMethods2_1To3_2 extends VSS_WebApi.VssHttpClient { * @return IPromise */ createWorkItemType(workitemType: ProcessDefinitionsContracts.WorkItemTypeModel, processId: string): IPromise; - /** - * [Preview API] - * - * @param {ProcessDefinitionsContracts.FieldRuleModel} fieldRule - * @param {string} processId - * @param {string} witRefNameForRules - * @param {string} fieldRefName - * @param {string} ruleId - * @return IPromise - */ - updateWorkItemTypeFieldRule(fieldRule: ProcessDefinitionsContracts.FieldRuleModel, processId: string, witRefNameForRules: string, fieldRefName: string, ruleId: string): IPromise; - /** - * [Preview API] - * - * @param {string} processId - * @param {string} witRefNameForRules - * @param {string} fieldRefName - * @return IPromise - */ - getWorkItemTypeFieldRules(processId: string, witRefNameForRules: string, fieldRefName: string): IPromise; - /** - * [Preview API] - * - * @param {string} processId - * @param {string} witRefNameForRules - * @param {string} fieldRefName - * @param {string} ruleId - * @return IPromise - */ - getWorkItemTypeFieldRule(processId: string, witRefNameForRules: string, fieldRefName: string, ruleId: string): IPromise; - /** - * [Preview API] - * - * @param {string} processId - * @param {string} witRefNameForRules - * @param {string} fieldRefName - * @param {string} ruleId - * @return IPromise - */ - deleteWorkItemTypeFieldRule(processId: string, witRefNameForRules: string, fieldRefName: string, ruleId: string): IPromise; - /** - * [Preview API] - * - * @param {ProcessDefinitionsContracts.FieldRuleModel} fieldRule - * @param {string} processId - * @param {string} witRefNameForRules - * @param {string} fieldRefName - * @return IPromise - */ - addWorkItemTypeFieldRule(fieldRule: ProcessDefinitionsContracts.FieldRuleModel, processId: string, witRefNameForRules: string, fieldRefName: string): IPromise; - /** - * [Preview API] - * - * @param {string} processId - * @param {string} witRefName - * @param {string} field - * @return IPromise - */ - removeWorkItemTypeField(processId: string, witRefName: string, field: string): IPromise; - /** - * [Preview API] - * - * @param {ProcessDefinitionsContracts.WorkItemTypeFieldModel} field - * @param {string} processId - * @param {string} witRefName - * @return IPromise - */ - addWorkItemTypeField(field: ProcessDefinitionsContracts.WorkItemTypeFieldModel, processId: string, witRefName: string): IPromise; /** * [Preview API] * @@ -18706,6 +18770,7 @@ export class CommonMethods2_1To3_2 extends VSS_WebApi.VssHttpClient { protected fieldsApiVersion_7a0e7a1a: string; protected processesApiVersion: string; protected rulesApiVersion: string; + protected rulesApiVersion_76fe3432: string; protected workItemTypesApiVersion: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** @@ -18725,6 +18790,25 @@ export class CommonMethods2_1To3_2 extends VSS_WebApi.VssHttpClient { * @return IPromise */ getWorkItemType(processId: string, witRefName: string, expand?: ProcessContracts.GetWorkItemTypeExpand): IPromise; + /** + * [Preview API] + * + * @param {string} processId + * @param {string} witRefName + * @param {string} fieldRefName + * @return IPromise + */ + getWorkItemTypeFieldRules(processId: string, witRefName: string, fieldRefName: string): IPromise; + /** + * [Preview API] + * + * @param {ProcessContracts.FieldRuleModel} fieldRule + * @param {string} processId + * @param {string} witRefName + * @param {string} ruleId + * @return IPromise + */ + updateWorkItemTypeRule(fieldRule: ProcessContracts.FieldRuleModel, processId: string, witRefName: string, ruleId: string): IPromise; /** * [Preview API] * @@ -18733,6 +18817,33 @@ export class CommonMethods2_1To3_2 extends VSS_WebApi.VssHttpClient { * @return IPromise */ getWorkItemTypeRules(processId: string, witRefName: string): IPromise; + /** + * [Preview API] + * + * @param {string} processId + * @param {string} witRefName + * @param {string} ruleId + * @return IPromise + */ + getWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): IPromise; + /** + * [Preview API] + * + * @param {string} processId + * @param {string} witRefName + * @param {string} ruleId + * @return IPromise + */ + deleteWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): IPromise; + /** + * [Preview API] + * + * @param {ProcessContracts.FieldRuleModel} fieldRule + * @param {string} processId + * @param {string} witRefName + * @return IPromise + */ + addWorkItemTypeRule(fieldRule: ProcessContracts.FieldRuleModel, processId: string, witRefName: string): IPromise; /** * [Preview API] * @@ -19094,22 +19205,28 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: Contracts.WorkItemExpand): IPromise; /** - * @param {VSS_Common_Contracts.JsonPatchDocument} document + * Creates a single work item + * + * @param {VSS_Common_Contracts.JsonPatchDocument} document - The JSON Patch document representing the work item * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} validateOnly - * @param {boolean} bypassRules + * @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 * @return IPromise */ - createWorkItem(document: VSS_Common_Contracts.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): IPromise; + createWorkItem(document: VSS_Common_Contracts.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean): IPromise; /** - * @param {VSS_Common_Contracts.JsonPatchDocument} document - * @param {number} id - * @param {boolean} validateOnly - * @param {boolean} bypassRules + * Updates a single work item + * + * @param {VSS_Common_Contracts.JsonPatchDocument} document - The JSON Patch document representing the update + * @param {number} id - The id of the work item to update + * @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 * @return IPromise */ - updateWorkItem(document: VSS_Common_Contracts.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): IPromise; + updateWorkItem(document: VSS_Common_Contracts.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean): IPromise; /** * Returns a list of work items * @@ -19349,9 +19466,10 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { * @param {any} content - Content to upload * @param {string} fileName * @param {string} uploadType + * @param {string} areaPath * @return IPromise */ - createAttachment(content: any, fileName?: string, uploadType?: string): IPromise; + createAttachment(content: any, fileName?: string, uploadType?: string, areaPath?: string): IPromise; } export class CommonMethods2_1To3_2 extends CommonMethods2To3_2 { protected recyclebinApiVersion: string; @@ -19515,6 +19633,19 @@ export class CommonMethods3To3_2 extends CommonMethods2_2To3_2 { */ export class WorkItemTrackingHttpClient3_2 extends CommonMethods3To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * [Preview API] + * + * @return IPromise + */ + getWorkArtifactLinkTypes(): IPromise; + /** + * [Preview API] Gets the results of the work item ids linked to the artifact uri + * + * @param {Contracts.ArtifactUriQuery} artifactUriQuery - List of artifact uris. + * @return IPromise + */ + getWorkItemIdsForArtifactUris(artifactUriQuery: Contracts.ArtifactUriQuery): IPromise; } /** * @exemptedapi diff --git a/typings/vss.d.ts b/typings/vss.d.ts index c9644e5..3fd8f81 100644 --- a/typings/vss.d.ts +++ b/typings/vss.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Microsoft Visual Studio Services v116.20170509.1547 +// Type definitions for Microsoft Visual Studio Services v117.20170531.1429 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft @@ -5392,6 +5392,12 @@ export module WebAccessCustomerIntelligenceConstants { var InvalidLicenseExceptionFeature: string; } /** +* Constants used for mobile +*/ +export module WebAccessMobileConstants { + var BypassMobileCookieName: string; +} +/** * Constants used for VSSF\WebPlatform Feature Availability flags Note: This should only be flags consumed in platform-level typescript code or controllers. */ export module WebPlatformFeatureFlags { @@ -8080,6 +8086,11 @@ export interface IContributionHostBehavior { * If unspecified, The default timeout period is used. */ slowWarningDurationMs?: number; + /** + * Time to wait in milliseconds (ms) before erroring when waiting for loaded event handshake + * If unspecified, the default timeout period is used. + */ + maxHandshakeDurationMs?: number; /** * The resize options for the host. By default both height and width and be resized but this can be changed to only allow one direction of resizing */ @@ -8696,6 +8707,8 @@ export class ExtensionHelper { } } declare module "VSS/Controls" { +import "jQueryUI/core"; +import "jQueryUI/widget"; export function getId(): number; export type TrueOrFalse = "true" | "false" | boolean; export interface AriaAttributes { @@ -9141,6 +9154,9 @@ export interface ICheckboxListItem { cssClass?: string; } export interface ICheckboxListOptions extends Controls.EnhancementOptions { + /** + * List of items to be displayed. + */ items?: ICheckboxListItem[]; /** * Css class applied to all items. @@ -9161,7 +9177,6 @@ export class CheckboxListO extends Contro private _checkedItems; private _idMap; private _inputHasTabIndex; - constructor(options?: any); /** * @param options */ @@ -9169,12 +9184,13 @@ export class CheckboxListO extends Contro initialize(): void; enableElement(enabled: boolean): void; setItems(items: any[]): void; - getCheckedValues(): any[]; getCheckedItems(): any[]; - getUncheckedValues(): any[]; getUncheckedItems(): any[]; + getCheckedValues(): any[]; + getUncheckedValues(): any[]; setCheckedValues(values: any[]): void; _initializeElement(): void; + private _getItemValue(item); private _checkItemState(item, state); private _draw(); /** @@ -9472,6 +9488,10 @@ export interface IComboOptions { * Obsolete. No effect. */ setTitleOnlyOnOverflow?: boolean; + /** + * Aria attributes + */ + ariaAttributes?: Controls.AriaAttributes; } /** * Constant for Combo type options @@ -10238,6 +10258,7 @@ export class DialogO extends Panels.AjaxPanelO< private _onWindowResizeDelegate; private _onHubNavigateDelegate; private _secondOverlay; + private _closeTooltip; private static RESIZE_STEP; /** * Creates a new dialog with the provided options @@ -10370,6 +10391,7 @@ export class DialogO extends Panels.AjaxPanelO< * @param ui */ private _onDialogMove(e?, ui?); + private _onDialogResizeStart(e?, ui?); private _ensureDialogContentHeight(); /** * Set the css maximum height of the dialog. @@ -10379,6 +10401,7 @@ export class DialogO extends Panels.AjaxPanelO< * Set the maximum size jQueryUI will allow the dialog to be. */ private _setMaxSize(); + private _hideCloseButtonTooltip(); } export class Dialog extends DialogO { } @@ -11271,6 +11294,8 @@ export class FilterControlO extends Cont * @return */ private _ungroupClick(e?, clauseInfo?); + private _createTableAndFocus(focusRow, focusColumn); + private _createTableAndFocusDelete(focusRow); private _handleFilterModified(); private _onControlBlurred(); } @@ -11376,6 +11401,7 @@ export class FormInputControl extends Controls.Control getInputFieldById(id: string): JQuery; createRowBeforeInput(id: string): JQuery; createRowAfterInput(id: string): JQuery; + private _addDescriptionIcon(description, $target); private _createInputField(inputViewModel, $parent, comboControlMap); private _textInputValueChanged(combo, inputViewModel); private _radioInputValueChanged($radio, radioValue, inputViewModel); @@ -12552,7 +12578,7 @@ export class GridO extends Controls.Control { private getSearchableColumns(); } export interface ITableFormatter { + /** + * Gets the formatted items as string. + */ getTableFromSelectedItems(): string; + /** + * Determines whether the formatted string includes html or not. + */ + includesHtml?: boolean; } export class TabDelimitedTableFormatter implements ITableFormatter { _options: any; @@ -12749,6 +12782,7 @@ export class HtmlTableFormatter implements ITableFormatter { private static ROW_ALT_BACKGROUND_COLOR; _options: any; _grid: Grid; + includesHtml: boolean; constructor(grid: Grid, options?: any); processColumns(columns: any[]): any[]; getTableFromSelectedItems(): string; @@ -13065,11 +13099,28 @@ export enum MenuItemState { Hidden = 2, Toggled = 4, } +export enum MenuSelectionMode { + /** + * No selection available. + */ + None = 0, + /** + * Single item can be selected. + */ + SingleSelect = 1, + /** + * Multiple items can be selected. + */ + MultiSelect = 2, +} export interface IMenuItemSpec extends IContributedMenuItem { /** * Id of the menu item. Used to distinguish the menu item when action is executed or when changing command state of a menu item */ id?: string; + /** + * The id of the contribution that defines the menu item. + */ contributionId?: string; rank?: number; /** @@ -13289,6 +13340,11 @@ export interface MenuBaseOptions { useBowtieStyle?: boolean; cssClass?: string; cssCoreClass?: string; + /** + * Determines the selection mode of the menu. + * @default None + */ + selectionMode?: MenuSelectionMode | ((item: IMenuItemSpec) => MenuSelectionMode); } export class MenuBase extends Controls.Control { _type: any; @@ -13299,7 +13355,7 @@ export class MenuBase extends Controls.Control /** * @param options */ - constructor(options?: any); + constructor(options?: TOptions); /** * Get the root menu of this object. (Not the immediate parent) */ @@ -13346,7 +13402,11 @@ export class MenuItem extends MenuBase { private _isPinned; private _pinElement; private _isPinFocused; + /** + * The
  • that represents this MenuItem or the tag inside of it. + */ private _$menuItemElement; + private _tooltip; private _closeSubmenuOnMouseLeave; /** * ID of pointer event that was handled by the pointer down event. @@ -13378,6 +13438,8 @@ export class MenuItem extends MenuBase { _align: any; private static PinnedIconClass; private static UnpinnedIconClass; + private static _pinDescribedById; + private static _unpinDescribedById; /** * @param options */ @@ -13422,6 +13484,7 @@ export class MenuItem extends MenuBase { isToggled(): boolean; isPinnable(): any; isPinned(): boolean; + private getSelectionMode(); initialize(): void; update(item: any): void; updateItems(items: any): void; @@ -13434,7 +13497,10 @@ export class MenuItem extends MenuBase { /** * @param options */ - execute(options?: any): any; + execute(options?: { + e: JQueryEventObject; + keepHighlight?: boolean; + }): any; executeAction(args?: any, e?: JQueryEventObject): any; collapse(options?: any): void; setFocus(setKeyboardFocus?: boolean): void; @@ -13461,7 +13527,8 @@ export class MenuItem extends MenuBase { * * @param text New title to be displayed */ - updateTitle(text: string): void; + updateTitle(title: string): void; + private _setTooltip(title, tooltipOptions?); /** * Updates the text of a menu item using either the specified text or * the function provided in the options @@ -13469,7 +13536,7 @@ export class MenuItem extends MenuBase { * @param text New text to be displayed */ updateText(text: string): void; - getSubMenu(): Menu; + getSubMenu(create?: boolean): Menu; tryShowSubMenu(options?: any): boolean; showSubMenu(options?: any): void; hideSubMenu(options?: any): void; @@ -13508,7 +13575,7 @@ export interface MenuContributionProviderOptions { export class MenuContributionProvider { private static readonly ACTION_TYPE; private static readonly HYPERLINK_ACTION_TYPE; - private static _contributionSourceTimeout; + private static DEFAULT_CONTRIBUTION_SOURCE_TIMEOUT; private static _contributionGetItemsTimeout; private _webContext; private _contributionIds; @@ -13542,12 +13609,20 @@ export class MenuContributionProvider { */ private _updateContributedMenuItems(items, contributionWithSource); getContributedMenuItems(context: any): IPromise; + /** + * Gets the time in ms to wait to get actions from action provider or for the actions to run + */ + getContributionSourceTimeout(): number; } export interface MenuOptions extends MenuBaseOptions { suppressInitContributions?: boolean; contributionIds?: string[]; contributionType?: string; contributionQueryOptions?: Contributions_Services.ContributionQueryOptions; + /** + * Time to wait in milliseconds for contribution iframes to be loaded. + */ + contributionSourceTimeoutMs?: number; /** * Items to be displayed in the menu */ @@ -13604,7 +13679,6 @@ export class Menu extends MenuBase { _selectedItem: MenuItem; _visible: boolean; _active: boolean; - _blockBlur: boolean; _focusItem: MenuItem; openSubMenuOnHover: boolean; /** @@ -13819,7 +13893,6 @@ export class Menu extends MenuBase { _onParentScroll(e: Event): void; private _onMouseDown(e); private _onMenuKeyDown(e); - private _blockBlurUntilTimeout(); /** * Change the contribution options for this menu and reload the contributed menu items * @@ -13920,7 +13993,6 @@ export class MenuOwner extends Menu private _isOwned(element); private _onChildFocus(e?); private _onChildBlur(e?); - private _startBlurTimeout(); private _clearBlurTimeout(); _onParentScroll(e?: any): void; private _onResize(e?); @@ -14806,6 +14878,10 @@ export interface ICollapsiblePanelOptions extends Controls.EnhancementOptions { iconExpandCss?: string; onToggleCallback?: Function; customToggleIcon?: JQuery; + /** + * Set headerNotFocusable to true if you need multiple focusable element in headers, screen reader does not work well with nested focusable element. + */ + headerNotFocusable?: boolean; } export class CollapsiblePanel extends Controls.Control { static EVENT_CONTENT_EXPANDED: string; @@ -15010,7 +15086,7 @@ export interface IPositionOptions { } export class PopupContentControlO extends Controls.Control { private _$dropElement; - private _$contentContainer; + protected _$contentContainer: JQuery; private _contentSet; protected _visible: boolean; private _hasFocus; @@ -15020,8 +15096,7 @@ export class PopupContentControlO private _enabled; private _documentEventDelegate; private _onForceHideDropPopupDelegate; - private _mouseMoveDelegate; - private _mouseupHideDelegate; + private _handlers; private _delayedShow; private _delayedHide; protected _mousePosition: Utils_UI.Positioning.ILocation; @@ -15044,16 +15119,26 @@ export class PopupContentControlO * This method displays raw HTML. Do not use to display user-provided content without properly * escaping. Prefer to use setTextContent(), which escapes HTML content, or setHtmlContent(), * which does not. - * - * This method has been deprecated and remains for back compatability only. Replace existing - * uses. */ - private setContent(content); + private _setContent(content); resetContent(): void; show(): void; toggle(): void; _enhance($dropElement: any): void; private _decorate(); + /** + * Add an event listener on the drop element. + * + * Doing it this way is faster than through JQuery and still makes it convenient to clean up event listeners. + * @param event + * @param handler + */ + private _listen(event, handler); + /** + * Remove an event listener on the drop element. + * @param event + */ + private _stopListening(event); private _onInteract(e); private _onFocus(e); private _onBlur(e); @@ -15112,20 +15197,6 @@ export class RichContentTooltipO ex * @param options */ static add(content: string | JQuery, target: HTMLElement | JQuery, options?: IRichContentTooltipOptions): RichContentTooltip; - /** - * Add a tooltip to the target with common default settings. - * - * This function has been deprecated and remains for back compatability only. Use add() - * instead and replace existing uses. - * - * This method displays raw HTML. Do not use to display user-provided content without properly - * escaping. Prefer to use add(), which escapes HTML for you. - * - * @param content Content to place in the tooltip (UNESCAPED HTML) - * @param target - * @param options - */ - private static addTooltip(content, target, options?); /** * Add a tooltip to the target with common default settings. Only display the tooltip if the * content in target is overflowing. @@ -15135,21 +15206,6 @@ export class RichContentTooltipO ex * @param options */ static addIfOverflow(content: string | JQuery, target: HTMLElement | JQuery, options?: IRichContentTooltipOptions): RichContentTooltip; - /** - * Add a tooltip to the target with common default settings. Only display the tooltip if the - * content in overflowingElement is overflowing. - * - * This function has been deprecated and remains for back compatability only. Use - * addIfOverflow() instead and replace existing uses. - * - * This method displays raw HTML. Do not use to display user-provided content without properly - * escaping. Prefer to use addIfOverflow(), which escapes HTML for you. - * - * @param content Content to place in the tooltip (UNESCAPED HTML) - * @param overflowingElement - * @param options - */ - private static addTooltipIfOverflow(content, overflowingElement, options?); } export class RichContentTooltip extends RichContentTooltipO { } @@ -15388,7 +15444,13 @@ export class RichEditor extends Controls.Control { * @return */ private _onMouseDown(e?); - private _reTriggerEvent(e?); + private _reTriggerKeyboardEvent(e?); + /** + * Create a synthetic keyboard event. This is needed to dispatch + * an event in IE11 since it doesn't allow re-dispatching of existing events + * @param domEvent A dom keyboard event + */ + private _buildSyntheticKeyboardEvent(domEvent); /** * @param e * @return @@ -16868,6 +16930,11 @@ export interface ITreeOptions { * @defaultvalue true */ showIcons?: boolean; + /** + * Optional custom icon render, overriding node's icon + * @defaultvalue undefined + */ + onRenderIcon?: (node: TreeNode) => Element; /** * Determines whether clicking a node expands/collapses the node or not (if the node has children). * @defaultvalue false @@ -18006,6 +18073,26 @@ export class DelegatedAuthorizationHttpClient extends DelegatedAuthorizationHttp */ export function getClient(options?: VSS_WebApi.IVssHttpClientOptions): DelegatedAuthorizationHttpClient3; } +declare module "VSS/DeviceTypeService" { +import Service = require("VSS/Service"); +/** + * This is a client side wrapper for server side data provider contribution, device-type-data. + */ +export class DeviceTypeService extends Service.VssService { + /** + * Return true if the current device is mobile. Return false otherwise. + */ + isMobileDevice(): boolean; + /** + * Return true if the current device is tablet. Return false otherwise. + */ + isTabletDevice(): boolean; + /** + * Return true if the current device is mobile and not tablet. Return false otherwise. + */ + isMobile(): boolean; +} +} declare module "VSS/Diag" { export var perfCollector: PerfTracePointCollector; export var logLevel: number; @@ -18740,8 +18827,8 @@ export interface IPageEventCallback { export function getService(): IPageEventService; } declare module "VSS/Events/Services" { -import Service = require("VSS/Service"); -export class EventService implements Service.ILocalService { +import { ILocalService } from "VSS/Service"; +export class EventService implements ILocalService { private _events; fire(eventName: string, sender?: any, eventArgs?: any): boolean; /** @@ -20875,6 +20962,19 @@ export enum ConcernCategory { Abusive = 2, Spam = 4, } +/** + * Stores Last Contact Date + */ +export interface CustomerLastContact { + /** + * account for which customer was last contacted + */ + account: string; + /** + * Date on which the custoemr was last contacted + */ + lastContactDate: Date; +} export interface EventCounts { /** * Average rating on the day for extension @@ -22225,6 +22325,7 @@ export var TypeInfo: { "spam": number; }; }; + CustomerLastContact: any; ExtensionAcquisitionRequest: any; ExtensionDailyStat: any; ExtensionDailyStats: any; @@ -22870,9 +22971,10 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { * @param {string} extensionName * @param {number} days * @param {Contracts.ExtensionStatsAggregateType} aggregate + * @param {Date} afterDate * @return IPromise */ - getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: Contracts.ExtensionStatsAggregateType): IPromise; + getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: Contracts.ExtensionStatsAggregateType, afterDate?: Date): IPromise; /** * [Preview API] Set all setting entries for the given user/all-users scope * @@ -22898,7 +23000,7 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { * * @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 + * @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 * @return IPromise @@ -22919,9 +23021,10 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { * @param {number} count - Count of events to fetch, applies to each event type. * @param {Date} afterDate - Fetch events that occured on or after this value * @param {string} include - Filter options. Supported values: includeInstall, includeUninstall. Default is to fetch all types of events + * @param {string} includeProperty * @return IPromise */ - getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string): IPromise; + getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): IPromise; /** * [Preview API] * @@ -22998,9 +23101,10 @@ export class GalleryHttpClient3_2 extends CommonMethods3_1To3_2 { * @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 * @return IPromise */ - getQuestions(publisherName: string, extensionName: string, count?: number, page?: number): IPromise; + getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): IPromise; /** * [Preview API] Flags a concern with an existing question for an extension. * @@ -23435,6 +23539,10 @@ export enum GraphMemberSearchFactor { * Alternate login username (Basic Auth Alias) */ Alias = 6, + /** + * Find identity using DirectoryAlias + */ + DirectoryAlias = 8, } export interface GraphMembership { containerDescriptor: string; @@ -23500,10 +23608,6 @@ export interface GraphSubject { * 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; - /** - * If this value is true, the graph subject is not active within the current Vsts scope. This graph subject can be used reliably for presenting historical data but may not be valid for other operations. - */ - disabled: boolean; /** * This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. */ @@ -23571,6 +23675,11 @@ export interface GraphUserOriginIdCreationContext extends GraphUserCreationConte export interface GraphUserPrincipalNameCreationContext extends GraphUserCreationContext { principalName: string; } +export 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. @@ -23612,6 +23721,7 @@ export var TypeInfo: { "mailAddress": number; "general": number; "alias": number; + "directoryAlias": number; }; }; GraphScope: any; @@ -23623,6 +23733,13 @@ export var TypeInfo: { "up": number; }; }; + IdentityShardingState: { + enumValues: { + "undefined": number; + "enabled": number; + "disabled": number; + }; + }; }; } declare module "VSS/Graph/RestClient" { @@ -23669,7 +23786,16 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { */ deleteGroup(groupDescriptor: string): IPromise; /** - * [Preview API] This endpoint returns a result for any descriptor that has ever been valid in the system, even if the group has since been deleted or has had all their memberships deleted. The current validity of the group is indicated through its disabled property, which is omitted when false. + * [Preview API] This endpoint returns a result for any group that has ever been valid in the system, even if the group has since been deleted or has had all their memberships deleted. The current validity of the group is indicated through its disabled property, which is omitted when false. + * + * @param {Contracts.GraphMemberSearchFactor} searchFactor - The search factor for what it is that you are searching for + * @param {string} searchValue - The value of the search factor + * @param {boolean} forceDomainQualification - In cases that you are searching for principle name, this parameter will specify that system should force the principle name being domain qualified + * @return IPromise + */ + findGroupsBySearchFactor(searchFactor: Contracts.GraphMemberSearchFactor, searchValue?: string, forceDomainQualification?: boolean): IPromise; + /** + * [Preview API] This endpoint returns a result for any group that has ever been valid in the system, even if the group has since been deleted or has had all their memberships deleted. The current validity of the group is indicated through its disabled property, which is omitted when false. * * @param {string} groupDescriptor - The descriptor of the desired graph group. * @return IPromise @@ -23692,6 +23818,14 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { * @return IPromise */ updateGroup(groupDescriptor: string, patchDocument: VSS_Common_Contracts.JsonPatchDocument): IPromise; + /** + * [Preview API] + * + * @param {string} id + * @param {boolean} isCuid + * @return IPromise + */ + getIds(id: string, isCuid: boolean): IPromise; /** * [Preview API] * @@ -23702,13 +23836,14 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { [key: string]: Contracts.GraphMember; }>; /** - * [Preview API] + * [Preview API] This endpoint returns a result for any member that has ever been valid in the system, even if the member has since been deleted or has had all their memberships deleted. The current validity of the member is indicated through its disabled property, which is omitted when false. * - * @param {Contracts.GraphMemberSearchFactor} searchFactor - * @param {string} searchValue + * @param {Contracts.GraphMemberSearchFactor} searchFactor - The search factor for what it is that you are searching for + * @param {string} searchValue - The value of the search factor + * @param {boolean} forceDomainQualification - In cases that you are searching for principle name, this parameter will specify that system should force the principle name being domain qualified * @return IPromise */ - findMembersBySearchFactor(searchFactor: Contracts.GraphMemberSearchFactor, searchValue: string): IPromise; + findMembersBySearchFactor(searchFactor: Contracts.GraphMemberSearchFactor, searchValue?: string, forceDomainQualification?: boolean): IPromise; /** * [Preview API] This endpoint returns a result for any member that has ever been valid in the system, even if the member has since been deleted or has had all their memberships deleted. The current validity of the member is indicated through its disabled property, which is omitted when false. * @@ -23736,9 +23871,9 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { * * @param {string} subjectDescriptor - The group or user that is a child of the relationship. * @param {string} containerDescriptor - The group that is the parent in the relationship. - * @return IPromise + * @return IPromise */ - checkMembership(subjectDescriptor: string, containerDescriptor: string): IPromise; + checkMembershipExistence(subjectDescriptor: string, containerDescriptor: string): IPromise; /** * [Preview API] This method will search for a requested membership and return the membership if found. * @@ -23793,6 +23928,12 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { * @return IPromise */ updateScope(scopeDescriptor: string, patchDocument: VSS_Common_Contracts.JsonPatchDocument): IPromise; + /** + * [Preview API] + * + * @return IPromise + */ + getIdentityShardingState(): IPromise; /** * [Preview API] * @@ -23824,6 +23965,15 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { * @return IPromise */ deleteUser(userDescriptor: string): IPromise; + /** + * [Preview API] This endpoint returns a result for any user that has ever been valid in the system, even if the user has since been deleted or has had all their memberships deleted. The current validity of the user is indicated through its disabled property, which is omitted when false. + * + * @param {Contracts.GraphMemberSearchFactor} searchFactor - The search factor for what it is that you are searching for + * @param {string} searchValue - The value of the search factor + * @param {boolean} forceDomainQualification - In cases that you are searching for principle name, this parameter will specify that system should force the principle name being domain qualified + * @return IPromise + */ + findUsersBySearchFactor(searchFactor: Contracts.GraphMemberSearchFactor, searchValue?: string, forceDomainQualification?: boolean): IPromise; /** * [Preview API] This endpoint returns a result for any user that has ever been valid in the system, even if the user has since been deleted or has had all their memberships deleted. The current validity of the user is indicated through its disabled property, which is omitted when false. * @@ -24502,6 +24652,7 @@ export class IdentityPickerDropdownControl extends Controls.Control void; } declare module "VSS/Utils/Url" { export const MAX_URL_PATH_LENGTH = 2000; @@ -32523,8 +32683,12 @@ export class GlobalProgressIndicator { getPendingActions(): string[]; } export function hasUnloadRequest(): boolean; +export enum GlobalMessagePosition { + default = 0, + top = 1, +} export class GlobalMessageIndicator { - updateGlobalMessageIfEmpty(message: string, messageLevel?: string, customIcon?: string, onDismiss?: () => void): HTMLElement; + updateGlobalMessageIfEmpty(message: string, messageLevel?: string, customIcon?: string, onDismiss?: () => void, position?: GlobalMessagePosition): HTMLElement; clearGlobalMessages(): void; } export function classExtend(ctor: any, members: any): any; @@ -32849,6 +33013,7 @@ export interface EventScope { type: string; } export interface IdentityRef { + directoryAlias: string; displayName: string; id: string; imageUrl: string;