UNPKG

59.4 kBTypeScriptView Raw
1/// <reference types="node" />
2import basem = require('./ClientApiBases');
3import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
4import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
5import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
6import WorkItemTrackingInterfaces = require("./interfaces/WorkItemTrackingInterfaces");
7export interface IWorkItemTrackingApi extends basem.ClientApiBase {
8 getAccountMyWorkData(queryOption?: WorkItemTrackingInterfaces.QueryOption): Promise<WorkItemTrackingInterfaces.AccountMyWorkResult>;
9 getRecentActivityData(): Promise<WorkItemTrackingInterfaces.AccountRecentActivityWorkItemModel2[]>;
10 getRecentMentions(): Promise<WorkItemTrackingInterfaces.AccountRecentMentionWorkItemModel[]>;
11 getWorkArtifactLinkTypes(): Promise<WorkItemTrackingInterfaces.WorkArtifactLink[]>;
12 queryWorkItemsForArtifactUris(artifactUriQuery: WorkItemTrackingInterfaces.ArtifactUriQuery, project?: string): Promise<WorkItemTrackingInterfaces.ArtifactUriQueryResult>;
13 createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string, project?: string, areaPath?: string): Promise<WorkItemTrackingInterfaces.AttachmentReference>;
14 getAttachmentContent(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
15 getAttachmentZip(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
16 getClassificationNodes(project: string, ids: number[], depth?: number, errorPolicy?: WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
17 getRootNodes(project: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
18 createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
19 deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise<void>;
20 getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
21 updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
22 getEngagedUsers(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType, top?: number, skip?: number): Promise<VSSInterfaces.IdentityRef[]>;
23 addComment(request: WorkItemTrackingInterfaces.CommentCreate, project: string, workItemId: number): Promise<WorkItemTrackingInterfaces.Comment>;
24 deleteComment(project: string, workItemId: number, commentId: number): Promise<void>;
25 getComment(project: string, workItemId: number, commentId: number, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise<WorkItemTrackingInterfaces.Comment>;
26 getComments(project: string, workItemId: number, top?: number, continuationToken?: string, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions, order?: WorkItemTrackingInterfaces.CommentSortOrder): Promise<WorkItemTrackingInterfaces.CommentList>;
27 getCommentsBatch(project: string, workItemId: number, ids: number[], includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise<WorkItemTrackingInterfaces.CommentList>;
28 updateComment(request: WorkItemTrackingInterfaces.CommentUpdate, project: string, workItemId: number, commentId: number): Promise<WorkItemTrackingInterfaces.Comment>;
29 createCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise<WorkItemTrackingInterfaces.CommentReaction>;
30 deleteCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise<WorkItemTrackingInterfaces.CommentReaction>;
31 getCommentReactions(project: string, workItemId: number, commentId: number): Promise<WorkItemTrackingInterfaces.CommentReaction[]>;
32 getCommentVersion(project: string, workItemId: number, commentId: number, version: number): Promise<WorkItemTrackingInterfaces.CommentVersion>;
33 getCommentVersions(project: string, workItemId: number, commentId: number): Promise<WorkItemTrackingInterfaces.CommentVersion[]>;
34 createField(workItemField: WorkItemTrackingInterfaces.WorkItemField, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
35 deleteField(fieldNameOrRefName: string, project?: string): Promise<void>;
36 getField(fieldNameOrRefName: string, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
37 getFields(project?: string, expand?: WorkItemTrackingInterfaces.GetFieldsExpand): Promise<WorkItemTrackingInterfaces.WorkItemField[]>;
38 updateField(payload: WorkItemTrackingInterfaces.UpdateWorkItemField, fieldNameOrRefName: string, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
39 migrateProjectsProcess(newProcess: WorkItemTrackingInterfaces.ProcessIdModel, project: string): Promise<WorkItemTrackingInterfaces.ProcessMigrationResultModel>;
40 createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, validateWiqlOnly?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
41 deleteQuery(project: string, query: string): Promise<void>;
42 getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem[]>;
43 getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean, useIsoDateFormat?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
44 searchQueries(project: string, filter: string, top?: number, expand?: WorkItemTrackingInterfaces.QueryExpand, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItemsResult>;
45 updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
46 getQueriesBatch(queryGetRequest: WorkItemTrackingInterfaces.QueryBatchGetRequest, project: string): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem[]>;
47 destroyWorkItem(id: number, project?: string): Promise<void>;
48 getDeletedWorkItem(id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
49 getDeletedWorkItems(ids: number[], project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteReference[]>;
50 getDeletedWorkItemShallowReferences(project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteShallowReference[]>;
51 restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
52 getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
53 getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
54 sendMail(body: WorkItemTrackingInterfaces.SendMailBody, project?: string): Promise<void>;
55 deleteTag(project: string, tagIdOrName: string): Promise<void>;
56 getTag(project: string, tagIdOrName: string): Promise<WorkItemTrackingInterfaces.WorkItemTagDefinition>;
57 getTags(project: string): Promise<WorkItemTrackingInterfaces.WorkItemTagDefinition[]>;
58 updateTag(tagData: WorkItemTrackingInterfaces.WorkItemTagDefinition, project: string, tagIdOrName: string): Promise<WorkItemTrackingInterfaces.WorkItemTagDefinition>;
59 createTemplate(template: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
60 getTemplates(teamContext: TfsCoreInterfaces.TeamContext, workitemtypename?: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplateReference[]>;
61 deleteTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<void>;
62 getTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
63 replaceTemplate(templateContent: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
64 getUpdate(id: number, updateNumber: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate>;
65 getUpdates(id: number, top?: number, skip?: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate[]>;
66 queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
67 queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
68 getWorkItemIconJson(icon: string, color?: string, v?: number): Promise<WorkItemTrackingInterfaces.WorkItemIcon>;
69 getWorkItemIcons(): Promise<WorkItemTrackingInterfaces.WorkItemIcon[]>;
70 getWorkItemIconSvg(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
71 getWorkItemIconXaml(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
72 getReportingLinksByLinkType(project?: string, linkTypes?: string[], types?: string[], continuationToken?: string, startDateTime?: Date): Promise<WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch>;
73 getRelationType(relation: string): Promise<WorkItemTrackingInterfaces.WorkItemRelationType>;
74 getRelationTypes(): Promise<WorkItemTrackingInterfaces.WorkItemRelationType[]>;
75 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>;
76 readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
77 readReportingDiscussions(project?: string, continuationToken?: string, maxPageSize?: number): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
78 createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
79 getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
80 deleteWorkItem(id: number, project?: string, destroy?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
81 getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
82 getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, errorPolicy?: WorkItemTrackingInterfaces.WorkItemErrorPolicy, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
83 updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, project?: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
84 getWorkItemsBatch(workItemGetRequest: WorkItemTrackingInterfaces.WorkItemBatchGetRequest, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
85 getWorkItemStateColors(projectNames: string[]): Promise<WorkItemTrackingInterfaces.ProjectWorkItemStateColors[]>;
86 getWorkItemNextStatesOnCheckinAction(ids: number[], action?: string): Promise<WorkItemTrackingInterfaces.WorkItemNextStateOnTransition[]>;
87 getWorkItemTypeCategories(project: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory[]>;
88 getWorkItemTypeCategory(project: string, category: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory>;
89 getWorkItemTypeColors(projectNames: string[]): Promise<{
90 key: string;
91 value: WorkItemTrackingInterfaces.WorkItemTypeColor[];
92 }[]>;
93 getWorkItemTypeColorAndIcons(projectNames: string[]): Promise<{
94 key: string;
95 value: WorkItemTrackingInterfaces.WorkItemTypeColorAndIcon[];
96 }[]>;
97 getWorkItemType(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemType>;
98 getWorkItemTypes(project: string): Promise<WorkItemTrackingInterfaces.WorkItemType[]>;
99 getWorkItemTypeFieldsWithReferences(project: string, type: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences[]>;
100 getWorkItemTypeFieldWithReferences(project: string, type: string, field: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences>;
101 getWorkItemTypeStates(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemStateColor[]>;
102 exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemTypeTemplate>;
103 updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise<WorkItemTrackingInterfaces.ProvisioningResult>;
104}
105export declare class WorkItemTrackingApi extends basem.ClientApiBase implements IWorkItemTrackingApi {
106 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
107 static readonly RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5";
108 /**
109 * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details.
110 *
111 * @param {WorkItemTrackingInterfaces.QueryOption} queryOption
112 */
113 getAccountMyWorkData(queryOption?: WorkItemTrackingInterfaces.QueryOption): Promise<WorkItemTrackingInterfaces.AccountMyWorkResult>;
114 /**
115 * Gets recent work item activities
116 *
117 */
118 getRecentActivityData(): Promise<WorkItemTrackingInterfaces.AccountRecentActivityWorkItemModel2[]>;
119 /**
120 * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE.
121 *
122 */
123 getRecentMentions(): Promise<WorkItemTrackingInterfaces.AccountRecentMentionWorkItemModel[]>;
124 /**
125 * Get the list of work item tracking outbound artifact link types.
126 *
127 */
128 getWorkArtifactLinkTypes(): Promise<WorkItemTrackingInterfaces.WorkArtifactLink[]>;
129 /**
130 * Queries work items linked to a given list of artifact URI.
131 *
132 * @param {WorkItemTrackingInterfaces.ArtifactUriQuery} artifactUriQuery - Defines a list of artifact URI for querying work items.
133 * @param {string} project - Project ID or project name
134 */
135 queryWorkItemsForArtifactUris(artifactUriQuery: WorkItemTrackingInterfaces.ArtifactUriQuery, project?: string): Promise<WorkItemTrackingInterfaces.ArtifactUriQueryResult>;
136 /**
137 * Uploads an attachment.
138 *
139 * @param {NodeJS.ReadableStream} contentStream - Content to upload
140 * @param {string} fileName - The name of the file
141 * @param {string} uploadType - Attachment upload type: Simple or Chunked
142 * @param {string} project - Project ID or project name
143 * @param {string} areaPath - Target project Area Path
144 */
145 createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string, project?: string, areaPath?: string): Promise<WorkItemTrackingInterfaces.AttachmentReference>;
146 /**
147 * Downloads an attachment.
148 *
149 * @param {string} id - Attachment ID
150 * @param {string} fileName - Name of the file
151 * @param {string} project - Project ID or project name
152 * @param {boolean} download - If set to <c>true</c> always download attachment
153 */
154 getAttachmentContent(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
155 /**
156 * Downloads an attachment.
157 *
158 * @param {string} id - Attachment ID
159 * @param {string} fileName - Name of the file
160 * @param {string} project - Project ID or project name
161 * @param {boolean} download - If set to <c>true</c> always download attachment
162 */
163 getAttachmentZip(id: string, fileName?: string, project?: string, download?: boolean): Promise<NodeJS.ReadableStream>;
164 /**
165 * 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.
166 *
167 * @param {string} project - Project ID or project name
168 * @param {number[]} ids - Comma separated integer classification nodes ids. It's not required, if you want root nodes.
169 * @param {number} depth - Depth of children to fetch.
170 * @param {WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy} errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit.
171 */
172 getClassificationNodes(project: string, ids: number[], depth?: number, errorPolicy?: WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
173 /**
174 * Gets root classification nodes under the project.
175 *
176 * @param {string} project - Project ID or project name
177 * @param {number} depth - Depth of children to fetch.
178 */
179 getRootNodes(project: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode[]>;
180 /**
181 * Create new or update an existing classification node.
182 *
183 * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update.
184 * @param {string} project - Project ID or project name
185 * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
186 * @param {string} path - Path of the classification node.
187 */
188 createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
189 /**
190 * Delete an existing classification node.
191 *
192 * @param {string} project - Project ID or project name
193 * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
194 * @param {string} path - Path of the classification node.
195 * @param {number} reclassifyId - Id of the target classification node for reclassification.
196 */
197 deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise<void>;
198 /**
199 * Gets the classification node for a given node path.
200 *
201 * @param {string} project - Project ID or project name
202 * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
203 * @param {string} path - Path of the classification node.
204 * @param {number} depth - Depth of children to fetch.
205 */
206 getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
207 /**
208 * Update an existing classification node.
209 *
210 * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update.
211 * @param {string} project - Project ID or project name
212 * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration.
213 * @param {string} path - Path of the classification node.
214 */
215 updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise<WorkItemTrackingInterfaces.WorkItemClassificationNode>;
216 /**
217 * Get users who reacted on the comment.
218 *
219 * @param {string} project - Project ID or project name
220 * @param {number} workItemId - WorkItem ID.
221 * @param {number} commentId - Comment ID.
222 * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction.
223 * @param {number} top
224 * @param {number} skip
225 */
226 getEngagedUsers(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType, top?: number, skip?: number): Promise<VSSInterfaces.IdentityRef[]>;
227 /**
228 * Add a comment on a work item.
229 *
230 * @param {WorkItemTrackingInterfaces.CommentCreate} request - Comment create request.
231 * @param {string} project - Project ID or project name
232 * @param {number} workItemId - Id of a work item.
233 */
234 addComment(request: WorkItemTrackingInterfaces.CommentCreate, project: string, workItemId: number): Promise<WorkItemTrackingInterfaces.Comment>;
235 /**
236 * Delete a comment on a work item.
237 *
238 * @param {string} project - Project ID or project name
239 * @param {number} workItemId - Id of a work item.
240 * @param {number} commentId
241 */
242 deleteComment(project: string, workItemId: number, commentId: number): Promise<void>;
243 /**
244 * Returns a work item comment.
245 *
246 * @param {string} project - Project ID or project name
247 * @param {number} workItemId - Id of a work item to get the comment.
248 * @param {number} commentId - Id of the comment to return.
249 * @param {boolean} includeDeleted - Specify if the deleted comment should be retrieved.
250 * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments.
251 */
252 getComment(project: string, workItemId: number, commentId: number, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise<WorkItemTrackingInterfaces.Comment>;
253 /**
254 * Returns a list of work item comments, pageable.
255 *
256 * @param {string} project - Project ID or project name
257 * @param {number} workItemId - Id of a work item to get comments for.
258 * @param {number} top - Max number of comments to return.
259 * @param {string} continuationToken - Used to query for the next page of comments.
260 * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved.
261 * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments.
262 * @param {WorkItemTrackingInterfaces.CommentSortOrder} order - Order in which the comments should be returned.
263 */
264 getComments(project: string, workItemId: number, top?: number, continuationToken?: string, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions, order?: WorkItemTrackingInterfaces.CommentSortOrder): Promise<WorkItemTrackingInterfaces.CommentList>;
265 /**
266 * Returns a list of work item comments by ids.
267 *
268 * @param {string} project - Project ID or project name
269 * @param {number} workItemId - Id of a work item to get comments for.
270 * @param {number[]} ids - Comma-separated list of comment ids to return.
271 * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved.
272 * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments.
273 */
274 getCommentsBatch(project: string, workItemId: number, ids: number[], includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise<WorkItemTrackingInterfaces.CommentList>;
275 /**
276 * Update a comment on a work item.
277 *
278 * @param {WorkItemTrackingInterfaces.CommentUpdate} request - Comment update request.
279 * @param {string} project - Project ID or project name
280 * @param {number} workItemId - Id of a work item.
281 * @param {number} commentId
282 */
283 updateComment(request: WorkItemTrackingInterfaces.CommentUpdate, project: string, workItemId: number, commentId: number): Promise<WorkItemTrackingInterfaces.Comment>;
284 /**
285 * Adds a new reaction to a comment.
286 *
287 * @param {string} project - Project ID or project name
288 * @param {number} workItemId - WorkItem ID
289 * @param {number} commentId - Comment ID
290 * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction
291 */
292 createCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise<WorkItemTrackingInterfaces.CommentReaction>;
293 /**
294 * Deletes an existing reaction on a comment.
295 *
296 * @param {string} project - Project ID or project name
297 * @param {number} workItemId - WorkItem ID
298 * @param {number} commentId - Comment ID
299 * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction
300 */
301 deleteCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise<WorkItemTrackingInterfaces.CommentReaction>;
302 /**
303 * Gets reactions of a comment.
304 *
305 * @param {string} project - Project ID or project name
306 * @param {number} workItemId - WorkItem ID
307 * @param {number} commentId - Comment ID
308 */
309 getCommentReactions(project: string, workItemId: number, commentId: number): Promise<WorkItemTrackingInterfaces.CommentReaction[]>;
310 /**
311 * @param {string} project - Project ID or project name
312 * @param {number} workItemId
313 * @param {number} commentId
314 * @param {number} version
315 */
316 getCommentVersion(project: string, workItemId: number, commentId: number, version: number): Promise<WorkItemTrackingInterfaces.CommentVersion>;
317 /**
318 * @param {string} project - Project ID or project name
319 * @param {number} workItemId
320 * @param {number} commentId
321 */
322 getCommentVersions(project: string, workItemId: number, commentId: number): Promise<WorkItemTrackingInterfaces.CommentVersion[]>;
323 /**
324 * Create a new field.
325 *
326 * @param {WorkItemTrackingInterfaces.WorkItemField} workItemField - New field definition
327 * @param {string} project - Project ID or project name
328 */
329 createField(workItemField: WorkItemTrackingInterfaces.WorkItemField, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
330 /**
331 * Deletes the field. To undelete a filed, see "Update Field" API.
332 *
333 * @param {string} fieldNameOrRefName - Field simple name or reference name
334 * @param {string} project - Project ID or project name
335 */
336 deleteField(fieldNameOrRefName: string, project?: string): Promise<void>;
337 /**
338 * Gets information on a specific field.
339 *
340 * @param {string} fieldNameOrRefName - Field simple name or reference name
341 * @param {string} project - Project ID or project name
342 */
343 getField(fieldNameOrRefName: string, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
344 /**
345 * Returns information for all fields. The project ID/name parameter is optional.
346 *
347 * @param {string} project - Project ID or project name
348 * @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.
349 */
350 getFields(project?: string, expand?: WorkItemTrackingInterfaces.GetFieldsExpand): Promise<WorkItemTrackingInterfaces.WorkItemField[]>;
351 /**
352 * Update a field.
353 *
354 * @param {WorkItemTrackingInterfaces.UpdateWorkItemField} payload - Payload contains desired value of the field's properties
355 * @param {string} fieldNameOrRefName - Name/reference name of the field to be updated
356 * @param {string} project - Project ID or project name
357 */
358 updateField(payload: WorkItemTrackingInterfaces.UpdateWorkItemField, fieldNameOrRefName: string, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemField>;
359 /**
360 * Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile.
361 *
362 * @param {WorkItemTrackingInterfaces.ProcessIdModel} newProcess
363 * @param {string} project - Project ID or project name
364 */
365 migrateProjectsProcess(newProcess: WorkItemTrackingInterfaces.ProcessIdModel, project: string): Promise<WorkItemTrackingInterfaces.ProcessMigrationResultModel>;
366 /**
367 * Creates a query, or moves a query.
368 *
369 * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create.
370 * @param {string} project - Project ID or project name
371 * @param {string} query - The parent id or path under which the query is to be created.
372 * @param {boolean} validateWiqlOnly - If you only want to validate your WIQL query without actually creating one, set it to true. Default is false.
373 */
374 createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, validateWiqlOnly?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
375 /**
376 * 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.
377 *
378 * @param {string} project - Project ID or project name
379 * @param {string} query - ID or path of the query or folder to delete.
380 */
381 deleteQuery(project: string, query: string): Promise<void>;
382 /**
383 * Gets the root queries and their children
384 *
385 * @param {string} project - Project ID or project name
386 * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.
387 * @param {number} depth - In the folder of queries, return child queries and folders to this depth.
388 * @param {boolean} includeDeleted - Include deleted queries and folders
389 */
390 getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem[]>;
391 /**
392 * Retrieves an individual query and its children
393 *
394 * @param {string} project - Project ID or project name
395 * @param {string} query - ID or path of the query.
396 * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.
397 * @param {number} depth - In the folder of queries, return child queries and folders to this depth.
398 * @param {boolean} includeDeleted - Include deleted queries and folders
399 * @param {boolean} useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format
400 */
401 getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean, useIsoDateFormat?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
402 /**
403 * Searches all queries the user has access to in the current project
404 *
405 * @param {string} project - Project ID or project name
406 * @param {string} filter - The text to filter the queries with.
407 * @param {number} top - The number of queries to return (Default is 50 and maximum is 200).
408 * @param {WorkItemTrackingInterfaces.QueryExpand} expand
409 * @param {boolean} includeDeleted - Include deleted queries and folders
410 */
411 searchQueries(project: string, filter: string, top?: number, expand?: WorkItemTrackingInterfaces.QueryExpand, includeDeleted?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItemsResult>;
412 /**
413 * Update a query or a folder. This allows you to update, rename and move queries and folders.
414 *
415 * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - The query to update.
416 * @param {string} project - Project ID or project name
417 * @param {string} query - The ID or path for the query to update.
418 * @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.
419 */
420 updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem>;
421 /**
422 * Gets a list of queries by ids (Maximum 1000)
423 *
424 * @param {WorkItemTrackingInterfaces.QueryBatchGetRequest} queryGetRequest
425 * @param {string} project - Project ID or project name
426 */
427 getQueriesBatch(queryGetRequest: WorkItemTrackingInterfaces.QueryBatchGetRequest, project: string): Promise<WorkItemTrackingInterfaces.QueryHierarchyItem[]>;
428 /**
429 * Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.
430 *
431 * @param {number} id - ID of the work item to be destroyed permanently
432 * @param {string} project - Project ID or project name
433 */
434 destroyWorkItem(id: number, project?: string): Promise<void>;
435 /**
436 * Gets a deleted work item from Recycle Bin.
437 *
438 * @param {number} id - ID of the work item to be returned
439 * @param {string} project - Project ID or project name
440 */
441 getDeletedWorkItem(id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
442 /**
443 * Gets the work items from the recycle bin, whose IDs have been specified in the parameters
444 *
445 * @param {number[]} ids - Comma separated list of IDs of the deleted work items to be returned
446 * @param {string} project - Project ID or project name
447 */
448 getDeletedWorkItems(ids: number[], project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteReference[]>;
449 /**
450 * Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.
451 *
452 * @param {string} project - Project ID or project name
453 */
454 getDeletedWorkItemShallowReferences(project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDeleteShallowReference[]>;
455 /**
456 * Restores the deleted work item from Recycle Bin.
457 *
458 * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - Paylod with instructions to update the IsDeleted flag to false
459 * @param {number} id - ID of the work item to be restored
460 * @param {string} project - Project ID or project name
461 */
462 restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
463 /**
464 * Returns a fully hydrated work item for the requested revision
465 *
466 * @param {number} id
467 * @param {number} revisionNumber
468 * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand
469 * @param {string} project - Project ID or project name
470 */
471 getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
472 /**
473 * Returns the list of fully hydrated work item revisions, paged.
474 *
475 * @param {number} id
476 * @param {number} top
477 * @param {number} skip
478 * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand
479 * @param {string} project - Project ID or project name
480 */
481 getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
482 /**
483 * RESTful method to send mail for selected/queried work items.
484 *
485 * @param {WorkItemTrackingInterfaces.SendMailBody} body
486 * @param {string} project - Project ID or project name
487 */
488 sendMail(body: WorkItemTrackingInterfaces.SendMailBody, project?: string): Promise<void>;
489 /**
490 * @param {string} project - Project ID or project name
491 * @param {string} tagIdOrName
492 */
493 deleteTag(project: string, tagIdOrName: string): Promise<void>;
494 /**
495 * @param {string} project - Project ID or project name
496 * @param {string} tagIdOrName
497 */
498 getTag(project: string, tagIdOrName: string): Promise<WorkItemTrackingInterfaces.WorkItemTagDefinition>;
499 /**
500 * @param {string} project - Project ID or project name
501 */
502 getTags(project: string): Promise<WorkItemTrackingInterfaces.WorkItemTagDefinition[]>;
503 /**
504 * @param {WorkItemTrackingInterfaces.WorkItemTagDefinition} tagData
505 * @param {string} project - Project ID or project name
506 * @param {string} tagIdOrName
507 */
508 updateTag(tagData: WorkItemTrackingInterfaces.WorkItemTagDefinition, project: string, tagIdOrName: string): Promise<WorkItemTrackingInterfaces.WorkItemTagDefinition>;
509 /**
510 * Creates a template
511 *
512 * @param {WorkItemTrackingInterfaces.WorkItemTemplate} template - Template contents
513 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
514 */
515 createTemplate(template: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
516 /**
517 * Gets template
518 *
519 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
520 * @param {string} workitemtypename - Optional, When specified returns templates for given Work item type.
521 */
522 getTemplates(teamContext: TfsCoreInterfaces.TeamContext, workitemtypename?: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplateReference[]>;
523 /**
524 * Deletes the template with given id
525 *
526 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
527 * @param {string} templateId - Template id
528 */
529 deleteTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<void>;
530 /**
531 * Gets the template with specified id
532 *
533 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
534 * @param {string} templateId - Template Id
535 */
536 getTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
537 /**
538 * Replace template contents
539 *
540 * @param {WorkItemTrackingInterfaces.WorkItemTemplate} templateContent - Template contents to replace with
541 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
542 * @param {string} templateId - Template id
543 */
544 replaceTemplate(templateContent: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise<WorkItemTrackingInterfaces.WorkItemTemplate>;
545 /**
546 * Returns a single update for a work item
547 *
548 * @param {number} id
549 * @param {number} updateNumber
550 * @param {string} project - Project ID or project name
551 */
552 getUpdate(id: number, updateNumber: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate>;
553 /**
554 * Returns a the deltas between work item revisions
555 *
556 * @param {number} id
557 * @param {number} top
558 * @param {number} skip
559 * @param {string} project - Project ID or project name
560 */
561 getUpdates(id: number, top?: number, skip?: number, project?: string): Promise<WorkItemTrackingInterfaces.WorkItemUpdate[]>;
562 /**
563 * Gets the results of the query given its WIQL.
564 *
565 * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the WIQL.
566 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
567 * @param {boolean} timePrecision - Whether or not to use time precision.
568 * @param {number} top - The max number of results to return.
569 */
570 queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
571 /**
572 * Gets the results of the query given the query ID.
573 *
574 * @param {string} id - The query ID.
575 * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation
576 * @param {boolean} timePrecision - Whether or not to use time precision.
577 * @param {number} top - The max number of results to return.
578 */
579 queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise<WorkItemTrackingInterfaces.WorkItemQueryResult>;
580 /**
581 * Get a work item icon given the friendly name and icon color.
582 *
583 * @param {string} icon - The name of the icon
584 * @param {string} color - The 6-digit hex color for the icon
585 * @param {number} v - The version of the icon (used only for cache invalidation)
586 */
587 getWorkItemIconJson(icon: string, color?: string, v?: number): Promise<WorkItemTrackingInterfaces.WorkItemIcon>;
588 /**
589 * Get a list of all work item icons.
590 *
591 */
592 getWorkItemIcons(): Promise<WorkItemTrackingInterfaces.WorkItemIcon[]>;
593 /**
594 * Get a work item icon given the friendly name and icon color.
595 *
596 * @param {string} icon - The name of the icon
597 * @param {string} color - The 6-digit hex color for the icon
598 * @param {number} v - The version of the icon (used only for cache invalidation)
599 */
600 getWorkItemIconSvg(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
601 /**
602 * Get a work item icon given the friendly name and icon color.
603 *
604 * @param {string} icon - The name of the icon
605 * @param {string} color - The 6-digit hex color for the icon
606 * @param {number} v - The version of the icon (used only for cache invalidation)
607 */
608 getWorkItemIconXaml(icon: string, color?: string, v?: number): Promise<NodeJS.ReadableStream>;
609 /**
610 * Get a batch of work item links
611 *
612 * @param {string} project - Project ID or project name
613 * @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.
614 * @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.
615 * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links.
616 * @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.
617 */
618 getReportingLinksByLinkType(project?: string, linkTypes?: string[], types?: string[], continuationToken?: string, startDateTime?: Date): Promise<WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch>;
619 /**
620 * Gets the work item relation type definition.
621 *
622 * @param {string} relation - The relation name
623 */
624 getRelationType(relation: string): Promise<WorkItemTrackingInterfaces.WorkItemRelationType>;
625 /**
626 * Gets the work item relation types.
627 *
628 */
629 getRelationTypes(): Promise<WorkItemTrackingInterfaces.WorkItemRelationType[]>;
630 /**
631 * Get a batch of work item revisions with the option of including deleted items
632 *
633 * @param {string} project - Project ID or project name
634 * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.
635 * @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.
636 * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
637 * @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.
638 * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields.
639 * @param {boolean} includeDeleted - Specify if the deleted item should be returned.
640 * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field.
641 * @param {boolean} includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions
642 * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand - Return all the fields in work item revisions, including long text fields which are not returned by default
643 * @param {boolean} includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed
644 * @param {number} maxPageSize - The maximum number of results to return in this batch
645 */
646 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>;
647 /**
648 * 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.
649 *
650 * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format
651 * @param {string} project - Project ID or project name
652 * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
653 * @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.
654 * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand
655 */
656 readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
657 /**
658 * @param {string} project - Project ID or project name
659 * @param {string} continuationToken
660 * @param {number} maxPageSize
661 */
662 readReportingDiscussions(project?: string, continuationToken?: string, maxPageSize?: number): Promise<WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch>;
663 /**
664 * Creates a single work item.
665 *
666 * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the work item
667 * @param {string} project - Project ID or project name
668 * @param {string} type - The work item type of the work item to create
669 * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item
670 * @param {boolean} bypassRules - Do not enforce the work item type rules on this update
671 * @param {boolean} suppressNotifications - Do not fire any notifications for this change
672 * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
673 */
674 createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
675 /**
676 * Returns a single work item from a template.
677 *
678 * @param {string} project - Project ID or project name
679 * @param {string} type - The work item type name
680 * @param {string} fields - Comma-separated list of requested fields
681 * @param {Date} asOf - AsOf UTC date time string
682 * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
683 */
684 getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
685 /**
686 * 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. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
687 *
688 * @param {number} id - ID of the work item to be deleted
689 * @param {string} project - Project ID or project name
690 * @param {boolean} destroy - Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
691 */
692 deleteWorkItem(id: number, project?: string, destroy?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemDelete>;
693 /**
694 * Returns a single work item.
695 *
696 * @param {number} id - The work item id
697 * @param {string[]} fields - Comma-separated list of requested fields
698 * @param {Date} asOf - AsOf UTC date time string
699 * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
700 * @param {string} project - Project ID or project name
701 */
702 getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem>;
703 /**
704 * Returns a list of work items (Maximum 200)
705 *
706 * @param {number[]} ids - The comma-separated list of requested work item ids. (Maximum 200 ids allowed).
707 * @param {string[]} fields - Comma-separated list of requested fields
708 * @param {Date} asOf - AsOf UTC date time string
709 * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
710 * @param {WorkItemTrackingInterfaces.WorkItemErrorPolicy} errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}.
711 * @param {string} project - Project ID or project name
712 */
713 getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, errorPolicy?: WorkItemTrackingInterfaces.WorkItemErrorPolicy, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
714 /**
715 * Updates a single work item.
716 *
717 * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the update
718 * @param {number} id - The id of the work item to update
719 * @param {string} project - Project ID or project name
720 * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item
721 * @param {boolean} bypassRules - Do not enforce the work item type rules on this update
722 * @param {boolean} suppressNotifications - Do not fire any notifications for this change
723 * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
724 */
725 updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, project?: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise<WorkItemTrackingInterfaces.WorkItem>;
726 /**
727 * Gets work items for a list of work item ids (Maximum 200)
728 *
729 * @param {WorkItemTrackingInterfaces.WorkItemBatchGetRequest} workItemGetRequest
730 * @param {string} project - Project ID or project name
731 */
732 getWorkItemsBatch(workItemGetRequest: WorkItemTrackingInterfaces.WorkItemBatchGetRequest, project?: string): Promise<WorkItemTrackingInterfaces.WorkItem[]>;
733 /**
734 * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects
735 *
736 * @param {string[]} projectNames
737 */
738 getWorkItemStateColors(projectNames: string[]): Promise<WorkItemTrackingInterfaces.ProjectWorkItemStateColors[]>;
739 /**
740 * Returns the next state on the given work item IDs.
741 *
742 * @param {number[]} ids - list of work item ids
743 * @param {string} action - possible actions. Currently only supports checkin
744 */
745 getWorkItemNextStatesOnCheckinAction(ids: number[], action?: string): Promise<WorkItemTrackingInterfaces.WorkItemNextStateOnTransition[]>;
746 /**
747 * Get all work item type categories.
748 *
749 * @param {string} project - Project ID or project name
750 */
751 getWorkItemTypeCategories(project: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory[]>;
752 /**
753 * Get specific work item type category by name.
754 *
755 * @param {string} project - Project ID or project name
756 * @param {string} category - The category name
757 */
758 getWorkItemTypeCategory(project: string, category: string): Promise<WorkItemTrackingInterfaces.WorkItemTypeCategory>;
759 /**
760 * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects
761 *
762 * @param {string[]} projectNames
763 */
764 getWorkItemTypeColors(projectNames: string[]): Promise<{
765 key: string;
766 value: WorkItemTrackingInterfaces.WorkItemTypeColor[];
767 }[]>;
768 /**
769 * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects
770 *
771 * @param {string[]} projectNames
772 */
773 getWorkItemTypeColorAndIcons(projectNames: string[]): Promise<{
774 key: string;
775 value: WorkItemTrackingInterfaces.WorkItemTypeColorAndIcon[];
776 }[]>;
777 /**
778 * Returns a work item type definition.
779 *
780 * @param {string} project - Project ID or project name
781 * @param {string} type - Work item type name
782 */
783 getWorkItemType(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemType>;
784 /**
785 * Returns the list of work item types
786 *
787 * @param {string} project - Project ID or project name
788 */
789 getWorkItemTypes(project: string): Promise<WorkItemTrackingInterfaces.WorkItemType[]>;
790 /**
791 * Get a list of fields for a work item type with detailed references.
792 *
793 * @param {string} project - Project ID or project name
794 * @param {string} type - Work item type.
795 * @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.
796 */
797 getWorkItemTypeFieldsWithReferences(project: string, type: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences[]>;
798 /**
799 * Get a field for a work item type with detailed references.
800 *
801 * @param {string} project - Project ID or project name
802 * @param {string} type - Work item type.
803 * @param {string} field
804 * @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.
805 */
806 getWorkItemTypeFieldWithReferences(project: string, type: string, field: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise<WorkItemTrackingInterfaces.WorkItemTypeFieldWithReferences>;
807 /**
808 * Returns the state names and colors for a work item type.
809 *
810 * @param {string} project - Project ID or project name
811 * @param {string} type - The state name
812 */
813 getWorkItemTypeStates(project: string, type: string): Promise<WorkItemTrackingInterfaces.WorkItemStateColor[]>;
814 /**
815 * Export work item type
816 *
817 * @param {string} project - Project ID or project name
818 * @param {string} type
819 * @param {boolean} exportGlobalLists
820 */
821 exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise<WorkItemTrackingInterfaces.WorkItemTypeTemplate>;
822 /**
823 * Add/updates a work item type
824 *
825 * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel
826 * @param {string} project - Project ID or project name
827 */
828 updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise<WorkItemTrackingInterfaces.ProvisioningResult>;
829}