WorkItemTrackingProcessDefinitionsRestClient class

Base class that should be used (derived from) to make requests to VSS REST apis

Extends

Constructors

WorkItemTrackingProcessDefinitionsRestClient(IVssRestClientOptions)

Properties

RESOURCE_AREA_ID

Methods

addBehaviorToWorkItemType(WorkItemTypeBehavior, string, string)

Adds a behavior to the work item type of the process.

addControlToGroup(Control, string, string, string)

Creates a control in a group

addFieldToWorkItemType(WorkItemTypeFieldModel2, string, string)

Adds a field to the work item type in the process.

addGroup(Group, string, string, string, string)

Adds a group to the work item form

addPage(Page, string, string)

Adds a page to the work item form

createBehavior(BehaviorCreateModel, string)

Creates a single behavior in the given process.

createField(FieldModel, string)

Creates a single field in the process.

createList(PickListModel)

Creates a picklist.

createStateDefinition(WorkItemStateInputModel, string, string)

Creates a state definition in the work item type of the process.

createWorkItemType(WorkItemTypeModel, string)

Creates a work item type in the process.

deleteBehavior(string, string)

Removes a behavior in the process.

deleteList(string)

Removes a picklist.

deleteStateDefinition(string, string, string)

Removes a state definition in the work item type of the process.

deleteWorkItemType(string, string)

Removes a work item type in the process.

editControl(Control, string, string, string, string)

Updates a control on the work item form

editGroup(Group, string, string, string, string, string)

Updates a group in the work item form

editPage(Page, string, string)

Updates a page on the work item form

getBehavior(string, string)

Returns a single behavior in the process.

getBehaviorForWorkItemType(string, string, string)

Returns a behavior for the work item type of the process.

getBehaviors(string)

Returns a list of all behaviors in the process.

getBehaviorsForWorkItemType(string, string)

Returns a list of all behaviors for the work item type of the process.

getFormLayout(string, string)

Gets the form layout

getList(string)

Returns a picklist.

getListsMetadata()

Returns meta data of the picklist.

getStateDefinition(string, string, string)

Returns a state definition in the work item type of the process.

getStateDefinitions(string, string)

Returns a list of all state definitions in the work item type of the process.

getWorkItemType(string, string, GetWorkItemTypeExpand)

Returns a work item type of the process.

getWorkItemTypeField(string, string, string)

Returns a single field in the work item type of the process.

getWorkItemTypeFields(string, string)

Returns a list of all fields in the work item type of the process.

getWorkItemTypes(string, GetWorkItemTypeExpand)

Returns a list of all work item types in the process.

hideStateDefinition(HideStateModel, string, string, string)

Hides a state definition in the work item type of the process.

removeBehaviorFromWorkItemType(string, string, string)

Removes a behavior for the work item type of the process.

removeControlFromGroup(string, string, string, string)

Removes a control from the work item form

removeFieldFromWorkItemType(string, string, string)

Removes a field in the work item type of the process.

removeGroup(string, string, string, string, string)

Removes a group from the work item form

removePage(string, string, string)

Removes a page from the work item form

replaceBehavior(BehaviorReplaceModel, string, string)

Replaces a behavior in the process.

setControlInGroup(Control, string, string, string, string, string)

Moves a control to a new group

setGroupInPage(Group, string, string, string, string, string, string, string)

Moves a group to a different page and section

setGroupInSection(Group, string, string, string, string, string, string)

Moves a group to a different section

updateBehaviorToWorkItemType(WorkItemTypeBehavior, string, string)

Updates default work item type for the behavior of the process.

updateField(FieldUpdate, string)

Updates a given field in the process.

updateList(PickListModel, string)

Updates a list.

updateStateDefinition(WorkItemStateInputModel, string, string, string)

Updates a given state definition in the work item type of the process.

updateWorkItemType(WorkItemTypeUpdateModel, string, string)

Updates a work item type of the process.

updateWorkItemTypeField(WorkItemTypeFieldModel2, string, string)

Updates a single field in the scope of the given process and work item type.

Constructor Details

WorkItemTrackingProcessDefinitionsRestClient(IVssRestClientOptions)

new WorkItemTrackingProcessDefinitionsRestClient(options: IVssRestClientOptions)

Parameters

Property Details

RESOURCE_AREA_ID

static RESOURCE_AREA_ID: string

Property Value

string

Method Details

addBehaviorToWorkItemType(WorkItemTypeBehavior, string, string)

Adds a behavior to the work item type of the process.

function addBehaviorToWorkItemType(behavior: WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTypeBehavior>

Parameters

processId

string

The ID of the process

witRefNameForBehaviors

string

Work item type reference name for the behavior

Returns

addControlToGroup(Control, string, string, string)

Creates a control in a group

function addControlToGroup(control: Control, processId: string, witRefName: string, groupId: string): Promise<Control>

Parameters

control
Control

The control

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

groupId

string

The ID of the group to add the control to

Returns

Promise<Control>

addFieldToWorkItemType(WorkItemTypeFieldModel2, string, string)

Adds a field to the work item type in the process.

function addFieldToWorkItemType(field: WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise<WorkItemTypeFieldModel2>

Parameters

processId

string

The ID of the process

witRefNameForFields

string

Work item type reference name for the field

Returns

addGroup(Group, string, string, string, string)

Adds a group to the work item form

function addGroup(group: Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise<Group>

Parameters

group
Group

The group

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

pageId

string

The ID of the page to add the group to

sectionId

string

The ID of the section to add the group to

Returns

Promise<Group>

addPage(Page, string, string)

Adds a page to the work item form

function addPage(page: Page, processId: string, witRefName: string): Promise<Page>

Parameters

page
Page

The page

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

Promise<Page>

createBehavior(BehaviorCreateModel, string)

Creates a single behavior in the given process.

function createBehavior(behavior: BehaviorCreateModel, processId: string): Promise<BehaviorModel>

Parameters

processId

string

The ID of the process

Returns

Promise<BehaviorModel>

createField(FieldModel, string)

Creates a single field in the process.

function createField(field: FieldModel, processId: string): Promise<FieldModel>

Parameters

field
FieldModel
processId

string

The ID of the process

Returns

Promise<FieldModel>

createList(PickListModel)

Creates a picklist.

function createList(picklist: PickListModel): Promise<PickListModel>

Parameters

picklist
PickListModel

Returns

Promise<PickListModel>

createStateDefinition(WorkItemStateInputModel, string, string)

Creates a state definition in the work item type of the process.

function createStateDefinition(stateModel: WorkItemStateInputModel, processId: string, witRefName: string): Promise<WorkItemStateResultModel>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

createWorkItemType(WorkItemTypeModel, string)

Creates a work item type in the process.

function createWorkItemType(workItemType: WorkItemTypeModel, processId: string): Promise<WorkItemTypeModel>

Parameters

workItemType
WorkItemTypeModel
processId

string

The ID of the process

Returns

deleteBehavior(string, string)

Removes a behavior in the process.

function deleteBehavior(processId: string, behaviorId: string): Promise<void>

Parameters

processId

string

The ID of the process

behaviorId

string

The ID of the behavior

Returns

Promise<void>

deleteList(string)

Removes a picklist.

function deleteList(listId: string): Promise<void>

Parameters

listId

string

The ID of the list

Returns

Promise<void>

deleteStateDefinition(string, string, string)

Removes a state definition in the work item type of the process.

function deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise<void>

Parameters

processId

string

ID of the process

witRefName

string

The reference name of the work item type

stateId

string

ID of the state

Returns

Promise<void>

deleteWorkItemType(string, string)

Removes a work item type in the process.

function deleteWorkItemType(processId: string, witRefName: string): Promise<void>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

Promise<void>

editControl(Control, string, string, string, string)

Updates a control on the work item form

function editControl(control: Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise<Control>

Parameters

control
Control

The updated control

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

groupId

string

The ID of the group

controlId

string

The ID of the control

Returns

Promise<Control>

editGroup(Group, string, string, string, string, string)

Updates a group in the work item form

function editGroup(group: Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<Group>

Parameters

group
Group

The updated group

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

pageId

string

The ID of the page the group is in

sectionId

string

The ID of the section the group is in

groupId

string

The ID of the group

Returns

Promise<Group>

editPage(Page, string, string)

Updates a page on the work item form

function editPage(page: Page, processId: string, witRefName: string): Promise<Page>

Parameters

page
Page

The page

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

Promise<Page>

getBehavior(string, string)

Returns a single behavior in the process.

function getBehavior(processId: string, behaviorId: string): Promise<BehaviorModel>

Parameters

processId

string

The ID of the process

behaviorId

string

The ID of the behavior

Returns

Promise<BehaviorModel>

getBehaviorForWorkItemType(string, string, string)

Returns a behavior for the work item type of the process.

function getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<WorkItemTypeBehavior>

Parameters

processId

string

The ID of the process

witRefNameForBehaviors

string

Work item type reference name for the behavior

behaviorRefName

string

The reference name of the behavior

Returns

getBehaviors(string)

Returns a list of all behaviors in the process.

function getBehaviors(processId: string): Promise<BehaviorModel[]>

Parameters

processId

string

The ID of the process

Returns

Promise<BehaviorModel[]>

getBehaviorsForWorkItemType(string, string)

Returns a list of all behaviors for the work item type of the process.

function getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise<WorkItemTypeBehavior[]>

Parameters

processId

string

The ID of the process

witRefNameForBehaviors

string

Work item type reference name for the behavior

Returns

getFormLayout(string, string)

Gets the form layout

function getFormLayout(processId: string, witRefName: string): Promise<FormLayout>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

Promise<FormLayout>

getList(string)

Returns a picklist.

function getList(listId: string): Promise<PickListModel>

Parameters

listId

string

The ID of the list

Returns

Promise<PickListModel>

getListsMetadata()

Returns meta data of the picklist.

function getListsMetadata(): Promise<PickListMetadataModel[]>

Returns

getStateDefinition(string, string, string)

Returns a state definition in the work item type of the process.

function getStateDefinition(processId: string, witRefName: string, stateId: string): Promise<WorkItemStateResultModel>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

stateId

string

The ID of the state

Returns

getStateDefinitions(string, string)

Returns a list of all state definitions in the work item type of the process.

function getStateDefinitions(processId: string, witRefName: string): Promise<WorkItemStateResultModel[]>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

getWorkItemType(string, string, GetWorkItemTypeExpand)

Returns a work item type of the process.

function getWorkItemType(processId: string, witRefName: string, expand?: GetWorkItemTypeExpand): Promise<WorkItemTypeModel>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

getWorkItemTypeField(string, string, string)

Returns a single field in the work item type of the process.

function getWorkItemTypeField(processId: string, witRefNameForFields: string, fieldRefName: string): Promise<WorkItemTypeFieldModel2>

Parameters

processId

string

The ID of the process

witRefNameForFields

string

Work item type reference name for fields

fieldRefName

string

The reference name of the field

Returns

getWorkItemTypeFields(string, string)

Returns a list of all fields in the work item type of the process.

function getWorkItemTypeFields(processId: string, witRefNameForFields: string): Promise<WorkItemTypeFieldModel2[]>

Parameters

processId

string

The ID of the process

witRefNameForFields

string

Work item type reference name for fields

Returns

getWorkItemTypes(string, GetWorkItemTypeExpand)

Returns a list of all work item types in the process.

function getWorkItemTypes(processId: string, expand?: GetWorkItemTypeExpand): Promise<WorkItemTypeModel[]>

Parameters

processId

string

The ID of the process

Returns

Promise<WorkItemTypeModel[]>

hideStateDefinition(HideStateModel, string, string, string)

Hides a state definition in the work item type of the process.

function hideStateDefinition(hideStateModel: HideStateModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemStateResultModel>

Parameters

hideStateModel
HideStateModel
processId

string

The ID of the process

witRefName

string

The reference name of the work item type

stateId

string

The ID of the state

Returns

removeBehaviorFromWorkItemType(string, string, string)

Removes a behavior for the work item type of the process.

function removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise<void>

Parameters

processId

string

The ID of the process

witRefNameForBehaviors

string

Work item type reference name for the behavior

behaviorRefName

string

The reference name of the behavior

Returns

Promise<void>

removeControlFromGroup(string, string, string, string)

Removes a control from the work item form

function removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise<void>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

groupId

string

The ID of the group

controlId

string

The ID of the control to remove

Returns

Promise<void>

removeFieldFromWorkItemType(string, string, string)

Removes a field in the work item type of the process.

function removeFieldFromWorkItemType(processId: string, witRefNameForFields: string, fieldRefName: string): Promise<void>

Parameters

processId

string

The ID of the process

witRefNameForFields

string

Work item type reference name for fields

fieldRefName

string

The reference name of the field

Returns

Promise<void>

removeGroup(string, string, string, string, string)

Removes a group from the work item form

function removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise<void>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

pageId

string

The ID of the page the group is in

sectionId

string

The ID of the section to the group is in

groupId

string

The ID of the group

Returns

Promise<void>

removePage(string, string, string)

Removes a page from the work item form

function removePage(processId: string, witRefName: string, pageId: string): Promise<void>

Parameters

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

pageId

string

The ID of the page

Returns

Promise<void>

replaceBehavior(BehaviorReplaceModel, string, string)

Replaces a behavior in the process.

function replaceBehavior(behaviorData: BehaviorReplaceModel, processId: string, behaviorId: string): Promise<BehaviorModel>

Parameters

behaviorData
BehaviorReplaceModel
processId

string

The ID of the process

behaviorId

string

The ID of the behavior

Returns

Promise<BehaviorModel>

setControlInGroup(Control, string, string, string, string, string)

Moves a control to a new group

function setControlInGroup(control: Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise<Control>

Parameters

control
Control

The control

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

groupId

string

The ID of the group to move the control to

controlId

string

The id of the control

removeFromGroupId

string

The group to remove the control from

Returns

Promise<Control>

setGroupInPage(Group, string, string, string, string, string, string, string)

Moves a group to a different page and section

function setGroupInPage(group: Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise<Group>

Parameters

group
Group

The updated group

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

pageId

string

The ID of the page the group is in

sectionId

string

The ID of the section the group is in

groupId

string

The ID of the group

removeFromPageId

string

ID of the page to remove the group from

removeFromSectionId

string

ID of the section to remove the group from

Returns

Promise<Group>

setGroupInSection(Group, string, string, string, string, string, string)

Moves a group to a different section

function setGroupInSection(group: Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise<Group>

Parameters

group
Group

The updated group

processId

string

The ID of the process

witRefName

string

The reference name of the work item type

pageId

string

The ID of the page the group is in

sectionId

string

The ID of the section the group is in

groupId

string

The ID of the group

removeFromSectionId

string

ID of the section to remove the group from

Returns

Promise<Group>

updateBehaviorToWorkItemType(WorkItemTypeBehavior, string, string)

Updates default work item type for the behavior of the process.

function updateBehaviorToWorkItemType(behavior: WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise<WorkItemTypeBehavior>

Parameters

processId

string

The ID of the process

witRefNameForBehaviors

string

Work item type reference name for the behavior

Returns

updateField(FieldUpdate, string)

Updates a given field in the process.

function updateField(field: FieldUpdate, processId: string): Promise<FieldModel>

Parameters

field
FieldUpdate
processId

string

The ID of the process

Returns

Promise<FieldModel>

updateList(PickListModel, string)

Updates a list.

function updateList(picklist: PickListModel, listId: string): Promise<PickListModel>

Parameters

picklist
PickListModel
listId

string

The ID of the list

Returns

Promise<PickListModel>

updateStateDefinition(WorkItemStateInputModel, string, string, string)

Updates a given state definition in the work item type of the process.

function updateStateDefinition(stateModel: WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise<WorkItemStateResultModel>

Parameters

processId

string

ID of the process

witRefName

string

The reference name of the work item type

stateId

string

ID of the state

Returns

updateWorkItemType(WorkItemTypeUpdateModel, string, string)

Updates a work item type of the process.

function updateWorkItemType(workItemTypeUpdate: WorkItemTypeUpdateModel, processId: string, witRefName: string): Promise<WorkItemTypeModel>

Parameters

workItemTypeUpdate
WorkItemTypeUpdateModel
processId

string

The ID of the process

witRefName

string

The reference name of the work item type

Returns

updateWorkItemTypeField(WorkItemTypeFieldModel2, string, string)

Updates a single field in the scope of the given process and work item type.

function updateWorkItemTypeField(field: WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise<WorkItemTypeFieldModel2>

Parameters

field
WorkItemTypeFieldModel2

The model with which to update the field

processId

string

The ID of the process

witRefNameForFields

string

Work item type reference name for fields

Returns