azure-devops-extension-api 5.276.0 → 5.279.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/AdvancedSecurity.Reporting/Reporting.d.ts +81 -2
  2. package/AdvancedSecurity.Reporting/Reporting.js +4 -0
  3. package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  4. package/Alert/Alert.d.ts +161 -9
  5. package/Alert/Alert.js +73 -1
  6. package/Alert/Alert.min.js +1 -1
  7. package/Alert/AlertClient.d.ts +68 -12
  8. package/Alert/AlertClient.js +185 -23
  9. package/Alert/AlertClient.min.js +1 -1
  10. package/Build/Build.d.ts +29 -0
  11. package/Build/Build.js +19 -1
  12. package/Build/Build.min.js +1 -1
  13. package/Gallery/Gallery.d.ts +46 -0
  14. package/Gallery/Gallery.js +11 -1
  15. package/Gallery/Gallery.min.js +1 -1
  16. package/Gallery/GalleryClient.d.ts +14 -0
  17. package/Gallery/GalleryClient.js +48 -0
  18. package/Gallery/GalleryClient.min.js +1 -1
  19. package/Git/Git.d.ts +2 -22
  20. package/Management/Management.d.ts +25 -1
  21. package/Management/Management.js +4 -0
  22. package/Management/Management.min.js +1 -1
  23. package/ServiceHooks/ServiceHooks.d.ts +1 -1
  24. package/Test/Test.d.ts +76 -56
  25. package/TestResults/TestResultsClient.d.ts +51 -22
  26. package/TestResults/TestResultsClient.js +131 -57
  27. package/TestResults/TestResultsClient.min.js +1 -1
  28. package/Tfvc/Tfvc.d.ts +54 -0
  29. package/Tfvc/Tfvc.js +57 -1
  30. package/Tfvc/Tfvc.min.js +1 -1
  31. package/Wiki/Wiki.d.ts +17 -0
  32. package/Wiki/WikiClient.d.ts +8 -0
  33. package/Wiki/WikiClient.js +23 -0
  34. package/Wiki/WikiClient.min.js +1 -1
  35. package/WorkItemTracking/WorkItemTracking.d.ts +48 -0
  36. package/WorkItemTracking/WorkItemTracking.js +11 -1
  37. package/WorkItemTracking/WorkItemTracking.min.js +1 -1
  38. package/esm/AdvancedSecurity.Reporting/Reporting.js +4 -0
  39. package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  40. package/esm/Alert/Alert.js +72 -0
  41. package/esm/Alert/Alert.min.js +1 -1
  42. package/esm/Alert/AlertClient.js +172 -22
  43. package/esm/Alert/AlertClient.min.js +1 -1
  44. package/esm/Build/Build.js +18 -0
  45. package/esm/Build/Build.min.js +1 -1
  46. package/esm/Gallery/Gallery.js +10 -0
  47. package/esm/Gallery/Gallery.min.js +1 -1
  48. package/esm/Gallery/GalleryClient.js +42 -0
  49. package/esm/Gallery/GalleryClient.min.js +1 -1
  50. package/esm/Management/Management.js +4 -0
  51. package/esm/Management/Management.min.js +1 -1
  52. package/esm/TestResults/TestResultsClient.js +121 -51
  53. package/esm/TestResults/TestResultsClient.min.js +1 -1
  54. package/esm/Tfvc/Tfvc.js +56 -0
  55. package/esm/Tfvc/Tfvc.min.js +1 -1
  56. package/esm/Wiki/WikiClient.js +21 -0
  57. package/esm/Wiki/WikiClient.min.js +1 -1
  58. package/esm/WorkItemTracking/WorkItemTracking.js +10 -0
  59. package/esm/WorkItemTracking/WorkItemTracking.min.js +1 -1
  60. package/package.json +1 -1
@@ -110,6 +110,14 @@ export declare class WikiRestClient extends RestClientBase {
110
110
  * @param id - Comment ID.
111
111
  */
112
112
  updateComment(comment: Comments_Contracts.CommentUpdateParameters, project: string, wikiIdentifier: string, pageId: number, id: number): Promise<Comments_Contracts.Comment>;
113
+ /**
114
+ * Gets the list of page paths for all pages in the specified wiki version.
115
+ *
116
+ * @param project - Project ID or project name
117
+ * @param wikiIdentifier - Wiki ID or wiki name.
118
+ * @param versionDescriptor - GitVersionDescriptor for the wiki branch. Defaults to the default branch for ProjectWiki. Required for CodeWiki.
119
+ */
120
+ getPagePaths(project: string, wikiIdentifier: string, versionDescriptor?: Git.GitVersionDescriptor): Promise<Wiki.WikiPageRef[]>;
113
121
  /**
114
122
  * Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the \`Accept\` header sent in the request.
115
123
  *
@@ -287,6 +287,29 @@ class WikiRestClient extends RestClientBase_1.RestClientBase {
287
287
  });
288
288
  });
289
289
  }
290
+ /**
291
+ * Gets the list of page paths for all pages in the specified wiki version.
292
+ *
293
+ * @param project - Project ID or project name
294
+ * @param wikiIdentifier - Wiki ID or wiki name.
295
+ * @param versionDescriptor - GitVersionDescriptor for the wiki branch. Defaults to the default branch for ProjectWiki. Required for CodeWiki.
296
+ */
297
+ getPagePaths(project, wikiIdentifier, versionDescriptor) {
298
+ return __awaiter(this, void 0, void 0, function* () {
299
+ const queryValues = {
300
+ versionDescriptor: versionDescriptor
301
+ };
302
+ return this.beginRequest({
303
+ apiVersion: "5.2-preview.1",
304
+ routeTemplate: "{project}/_apis/wiki/wikis/{wikiIdentifier}/pagePaths",
305
+ routeValues: {
306
+ project: project,
307
+ wikiIdentifier: wikiIdentifier
308
+ },
309
+ queryParams: queryValues
310
+ });
311
+ });
312
+ }
290
313
  /**
291
314
  * Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the \`Accept\` header sent in the request.
292
315
  *
@@ -1 +1 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(e,i,t,r){return new(t||(t=Promise))(function(n,o){function a(e){try{p(r.next(e))}catch(e){o(e)}}function s(e){try{p(r.throw(e))}catch(e){o(e)}}function p(e){e.done?n(e.value):function(e){return e instanceof t?e:new t(function(i){i(e)})}(e.value).then(a,s)}p((r=r.apply(e,i||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.WikiRestClient=void 0;const RestClientBase_1=require("../Common/RestClientBase"),Serialization_1=require("../Common/Util/Serialization");class WikiRestClient extends RestClientBase_1.RestClientBase{constructor(e){super(e)}createCommentAttachment(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/attachments/{attachmentId}",routeValues:{project:i,wikiIdentifier:t,pageId:r},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})})}getAttachmentContent(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/attachments/{attachmentId}",routeValues:{project:e,wikiIdentifier:i,pageId:t,attachmentId:r}})})}addCommentReaction(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"PUT",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{commentId}/reactions/{type}",routeValues:{project:e,wikiIdentifier:i,pageId:t,commentId:r,type:n}})})}deleteCommentReaction(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{commentId}/reactions/{type}",routeValues:{project:e,wikiIdentifier:i,pageId:t,commentId:r,type:n}})})}getEngagedUsers(e,i,t,r,n,o,a){return __awaiter(this,void 0,void 0,function*(){const s={$top:o,$skip:a};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{commentId}/reactions/{type}/users",routeValues:{project:e,wikiIdentifier:i,pageId:t,commentId:r,type:n},queryParams:s})})}addComment(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:i,wikiIdentifier:t,pageId:r},body:e})})}deleteComment(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:e,wikiIdentifier:i,pageId:t,id:r}})})}getComment(e,i,t,r,n,o){return __awaiter(this,void 0,void 0,function*(){const a={excludeDeleted:n,$expand:o};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:e,wikiIdentifier:i,pageId:t,id:r},queryParams:a})})}listComments(e,i,t,r,n,o,a,s,p){return __awaiter(this,void 0,void 0,function*(){const u={$top:r,continuationToken:n,excludeDeleted:o,$expand:a,order:s,parentId:p};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:e,wikiIdentifier:i,pageId:t},queryParams:u})})}updateComment(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:i,wikiIdentifier:t,pageId:r,id:n},body:e})})}getPageText(e,i,t,r,n,o){return __awaiter(this,void 0,void 0,function*(){const a={path:t,recursionLevel:r,versionDescriptor:n,includeContent:o};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:i},queryParams:a})})}getPageZip(e,i,t,r,n,o){return __awaiter(this,void 0,void 0,function*(){const a={path:t,recursionLevel:r,versionDescriptor:n,includeContent:o};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:i},queryParams:a})})}getPageByIdText(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){const o={recursionLevel:r,includeContent:n};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{id}",routeValues:{project:e,wikiIdentifier:i,id:t},queryParams:o})})}getPageByIdZip(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){const o={recursionLevel:r,includeContent:n};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{id}",routeValues:{project:e,wikiIdentifier:i,id:t},queryParams:o})})}getPagesBatch(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){const n={versionDescriptor:r};return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pagesBatch",routeValues:{project:i,wikiIdentifier:t},queryParams:n,body:e,returnRawResponse:!0}).then(e=>__awaiter(this,void 0,void 0,function*(){const i=yield e.text().then(Serialization_1.deserializeVssJsonObject);return i.continuationToken=e.headers.get("x-ms-continuationtoken"),i}))})}getPageData(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){const n={pageViewsForDays:r};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/stats",routeValues:{project:e,wikiIdentifier:i,pageId:t},queryParams:n})})}createOrUpdatePageViewStats(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){const o={wikiVersion:t,path:r,oldPath:n};return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pageViewStats/{*path}",routeValues:{project:e,wikiIdentifier:i},queryParams:o})})}createWiki(e,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i},body:e})})}deleteWiki(e,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i,wikiIdentifier:e}})})}getAllWikis(e){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:e}})})}getWiki(e,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i,wikiIdentifier:e}})})}updateWiki(e,i,t){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t,wikiIdentifier:i},body:e})})}}exports.WikiRestClient=WikiRestClient,WikiRestClient.RESOURCE_AREA_ID="bf7d82a0-8aa5-4613-94ef-6172a5ea01f3";
1
+ "use strict";var __awaiter=this&&this.__awaiter||function(e,i,t,r){return new(t||(t=Promise))(function(n,o){function a(e){try{p(r.next(e))}catch(e){o(e)}}function s(e){try{p(r.throw(e))}catch(e){o(e)}}function p(e){e.done?n(e.value):function(e){return e instanceof t?e:new t(function(i){i(e)})}(e.value).then(a,s)}p((r=r.apply(e,i||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.WikiRestClient=void 0;const RestClientBase_1=require("../Common/RestClientBase"),Serialization_1=require("../Common/Util/Serialization");class WikiRestClient extends RestClientBase_1.RestClientBase{constructor(e){super(e)}createCommentAttachment(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/attachments/{attachmentId}",routeValues:{project:i,wikiIdentifier:t,pageId:r},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})})}getAttachmentContent(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/attachments/{attachmentId}",routeValues:{project:e,wikiIdentifier:i,pageId:t,attachmentId:r}})})}addCommentReaction(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"PUT",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{commentId}/reactions/{type}",routeValues:{project:e,wikiIdentifier:i,pageId:t,commentId:r,type:n}})})}deleteCommentReaction(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{commentId}/reactions/{type}",routeValues:{project:e,wikiIdentifier:i,pageId:t,commentId:r,type:n}})})}getEngagedUsers(e,i,t,r,n,o,a){return __awaiter(this,void 0,void 0,function*(){const s={$top:o,$skip:a};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{commentId}/reactions/{type}/users",routeValues:{project:e,wikiIdentifier:i,pageId:t,commentId:r,type:n},queryParams:s})})}addComment(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:i,wikiIdentifier:t,pageId:r},body:e})})}deleteComment(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:e,wikiIdentifier:i,pageId:t,id:r}})})}getComment(e,i,t,r,n,o){return __awaiter(this,void 0,void 0,function*(){const a={excludeDeleted:n,$expand:o};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:e,wikiIdentifier:i,pageId:t,id:r},queryParams:a})})}listComments(e,i,t,r,n,o,a,s,p){return __awaiter(this,void 0,void 0,function*(){const u={$top:r,continuationToken:n,excludeDeleted:o,$expand:a,order:s,parentId:p};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:e,wikiIdentifier:i,pageId:t},queryParams:u})})}updateComment(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/comments/{id}",routeValues:{project:i,wikiIdentifier:t,pageId:r,id:n},body:e})})}getPagePaths(e,i,t){return __awaiter(this,void 0,void 0,function*(){const r={versionDescriptor:t};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pagePaths",routeValues:{project:e,wikiIdentifier:i},queryParams:r})})}getPageText(e,i,t,r,n,o){return __awaiter(this,void 0,void 0,function*(){const a={path:t,recursionLevel:r,versionDescriptor:n,includeContent:o};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:i},queryParams:a})})}getPageZip(e,i,t,r,n,o){return __awaiter(this,void 0,void 0,function*(){const a={path:t,recursionLevel:r,versionDescriptor:n,includeContent:o};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:i},queryParams:a})})}getPageByIdText(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){const o={recursionLevel:r,includeContent:n};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{id}",routeValues:{project:e,wikiIdentifier:i,id:t},queryParams:o})})}getPageByIdZip(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){const o={recursionLevel:r,includeContent:n};return this.beginRequest({apiVersion:"5.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{id}",routeValues:{project:e,wikiIdentifier:i,id:t},queryParams:o})})}getPagesBatch(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){const n={versionDescriptor:r};return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pagesBatch",routeValues:{project:i,wikiIdentifier:t},queryParams:n,body:e,returnRawResponse:!0}).then(e=>__awaiter(this,void 0,void 0,function*(){const i=yield e.text().then(Serialization_1.deserializeVssJsonObject);return i.continuationToken=e.headers.get("x-ms-continuationtoken"),i}))})}getPageData(e,i,t,r){return __awaiter(this,void 0,void 0,function*(){const n={pageViewsForDays:r};return this.beginRequest({apiVersion:"5.2-preview.1",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/stats",routeValues:{project:e,wikiIdentifier:i,pageId:t},queryParams:n})})}createOrUpdatePageViewStats(e,i,t,r,n){return __awaiter(this,void 0,void 0,function*(){const o={wikiVersion:t,path:r,oldPath:n};return this.beginRequest({apiVersion:"5.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pageViewStats/{*path}",routeValues:{project:e,wikiIdentifier:i},queryParams:o})})}createWiki(e,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i},body:e})})}deleteWiki(e,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i,wikiIdentifier:e}})})}getAllWikis(e){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:e}})})}getWiki(e,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i,wikiIdentifier:e}})})}updateWiki(e,i,t){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"5.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t,wikiIdentifier:i},body:e})})}}exports.WikiRestClient=WikiRestClient,WikiRestClient.RESOURCE_AREA_ID="bf7d82a0-8aa5-4613-94ef-6172a5ea01f3";
@@ -134,6 +134,28 @@ export interface AttachmentReference {
134
134
  id: string;
135
135
  url: string;
136
136
  }
137
+ /**
138
+ * Describes a request to download a set of a work item's attachments as a single bundle.
139
+ */
140
+ export interface AttachmentsBundleRequest {
141
+ /**
142
+ * The ids of the attachments to include in the bundle. Each must reference an attachment on the target work item's Attachments tab. The maximum number allowed per request is enforced by the server.
143
+ */
144
+ attachmentIds: string[];
145
+ /**
146
+ * The format of the bundle.
147
+ */
148
+ format: BundleFormat;
149
+ }
150
+ /**
151
+ * The format used to bundle a set of work item attachments for download.
152
+ */
153
+ export declare enum BundleFormat {
154
+ /**
155
+ * A ZIP archive (application/zip). This is the default when no format is specified.
156
+ */
157
+ Zip = 0
158
+ }
137
159
  /**
138
160
  * Flag to control error policy in a batch classification nodes get request.
139
161
  */
@@ -595,6 +617,28 @@ export interface GitHubConnectionCreateResponse {
595
617
  */
596
618
  serviceEndpointId: string;
597
619
  }
620
+ /**
621
+ * Request model for replacing the personal access token of an existing GitHub connection, so that a rotated token does not require deleting and recreating the connection.
622
+ */
623
+ export interface GitHubConnectionCredentialUpdateRequest {
624
+ /**
625
+ * The replacement personal access token. It must belong to the same GitHub account the connection was created with.
626
+ */
627
+ accessToken: string;
628
+ }
629
+ /**
630
+ * Result of replacing the credentials of an existing GitHub connection.
631
+ */
632
+ export interface GitHubConnectionCredentialUpdateResponse {
633
+ /**
634
+ * The connection after its credentials were replaced.
635
+ */
636
+ connection: GitHubConnectionModel;
637
+ /**
638
+ * Set when the token was replaced but something about the rotation is worth telling the user, such as the connection's status not being refreshed afterwards. Null when there is nothing to report. The rotation succeeded either way.
639
+ */
640
+ warningMessage: string;
641
+ }
598
642
  /**
599
643
  * Describes Github connection.
600
644
  */
@@ -641,6 +685,10 @@ export interface GitHubConnectionReposBatchRequest {
641
685
  * Requested repos urls
642
686
  */
643
687
  gitHubRepositoryUrls: GitHubConnectionRepoModel[];
688
+ /**
689
+ * Optional GitHub access token used to authenticate provisioning for the add and remove operations. Add also requires admin access to the repos.
690
+ */
691
+ gitHubUserToken: string;
644
692
  /**
645
693
  * Operation type (f. e. add, remove)
646
694
  */
@@ -5,7 +5,17 @@
5
5
  * ---------------------------------------------------------
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.WorkItemTypeFieldsExpandLevel = exports.WorkItemRecentActivityType = exports.WorkItemExpand = exports.WorkItemErrorPolicy = exports.TreeStructureGroup = exports.TreeNodeStructureType = exports.TemplateType = exports.ReportingRevisionsExpand = exports.QueryType = exports.QueryResultType = exports.QueryRecursionOption = exports.QueryOption = exports.QueryExpand = exports.QueryErrorPolicy = exports.ProvisioningActionType = exports.LogicalOperation = exports.LinkQueryMode = exports.LargeTextCustomHtmlFormat = exports.GetFieldsExpand = exports.FieldUsage = exports.FieldType = exports.CommentSortOrder = exports.CommentReactionType = exports.CommentFormat = exports.CommentExpandOptions = exports.ClassificationNodesErrorPolicy = void 0;
8
+ exports.WorkItemTypeFieldsExpandLevel = exports.WorkItemRecentActivityType = exports.WorkItemExpand = exports.WorkItemErrorPolicy = exports.TreeStructureGroup = exports.TreeNodeStructureType = exports.TemplateType = exports.ReportingRevisionsExpand = exports.QueryType = exports.QueryResultType = exports.QueryRecursionOption = exports.QueryOption = exports.QueryExpand = exports.QueryErrorPolicy = exports.ProvisioningActionType = exports.LogicalOperation = exports.LinkQueryMode = exports.LargeTextCustomHtmlFormat = exports.GetFieldsExpand = exports.FieldUsage = exports.FieldType = exports.CommentSortOrder = exports.CommentReactionType = exports.CommentFormat = exports.CommentExpandOptions = exports.ClassificationNodesErrorPolicy = exports.BundleFormat = void 0;
9
+ /**
10
+ * The format used to bundle a set of work item attachments for download.
11
+ */
12
+ var BundleFormat;
13
+ (function (BundleFormat) {
14
+ /**
15
+ * A ZIP archive (application/zip). This is the default when no format is specified.
16
+ */
17
+ BundleFormat[BundleFormat["Zip"] = 0] = "Zip";
18
+ })(BundleFormat || (exports.BundleFormat = BundleFormat = {}));
9
19
  /**
10
20
  * Flag to control error policy in a batch classification nodes get request.
11
21
  */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WorkItemTypeFieldsExpandLevel=exports.WorkItemRecentActivityType=exports.WorkItemExpand=exports.WorkItemErrorPolicy=exports.TreeStructureGroup=exports.TreeNodeStructureType=exports.TemplateType=exports.ReportingRevisionsExpand=exports.QueryType=exports.QueryResultType=exports.QueryRecursionOption=exports.QueryOption=exports.QueryExpand=exports.QueryErrorPolicy=exports.ProvisioningActionType=exports.LogicalOperation=exports.LinkQueryMode=exports.LargeTextCustomHtmlFormat=exports.GetFieldsExpand=exports.FieldUsage=exports.FieldType=exports.CommentSortOrder=exports.CommentReactionType=exports.CommentFormat=exports.CommentExpandOptions=exports.ClassificationNodesErrorPolicy=void 0;var ClassificationNodesErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(ClassificationNodesErrorPolicy||(exports.ClassificationNodesErrorPolicy=ClassificationNodesErrorPolicy={}));var CommentExpandOptions;!function(e){e[e.None=0]="None",e[e.Reactions=1]="Reactions",e[e.RenderedText=8]="RenderedText",e[e.RenderedTextOnly=16]="RenderedTextOnly",e[e.All=-17]="All"}(CommentExpandOptions||(exports.CommentExpandOptions=CommentExpandOptions={}));var CommentFormat;!function(e){e[e.Markdown=0]="Markdown",e[e.Html=1]="Html"}(CommentFormat||(exports.CommentFormat=CommentFormat={}));var CommentReactionType;!function(e){e[e.Like=0]="Like",e[e.Dislike=1]="Dislike",e[e.Heart=2]="Heart",e[e.Hooray=3]="Hooray",e[e.Smile=4]="Smile",e[e.Confused=5]="Confused"}(CommentReactionType||(exports.CommentReactionType=CommentReactionType={}));var CommentSortOrder;!function(e){e[e.Asc=1]="Asc",e[e.Desc=2]="Desc"}(CommentSortOrder||(exports.CommentSortOrder=CommentSortOrder={}));var FieldType;!function(e){e[e.String=0]="String",e[e.Integer=1]="Integer",e[e.DateTime=2]="DateTime",e[e.PlainText=3]="PlainText",e[e.Html=4]="Html",e[e.TreePath=5]="TreePath",e[e.History=6]="History",e[e.Double=7]="Double",e[e.Guid=8]="Guid",e[e.Boolean=9]="Boolean",e[e.Identity=10]="Identity",e[e.PicklistString=11]="PicklistString",e[e.PicklistInteger=12]="PicklistInteger",e[e.PicklistDouble=13]="PicklistDouble"}(FieldType||(exports.FieldType=FieldType={}));var FieldUsage;!function(e){e[e.None=0]="None",e[e.WorkItem=1]="WorkItem",e[e.WorkItemLink=2]="WorkItemLink",e[e.Tree=3]="Tree",e[e.WorkItemTypeExtension=4]="WorkItemTypeExtension"}(FieldUsage||(exports.FieldUsage=FieldUsage={}));var GetFieldsExpand;!function(e){e[e.None=0]="None",e[e.ExtensionFields=1]="ExtensionFields",e[e.IncludeDeleted=2]="IncludeDeleted"}(GetFieldsExpand||(exports.GetFieldsExpand=GetFieldsExpand={}));var LargeTextCustomHtmlFormat;!function(e){e[e.Markdown=0]="Markdown",e[e.Html=1]="Html"}(LargeTextCustomHtmlFormat||(exports.LargeTextCustomHtmlFormat=LargeTextCustomHtmlFormat={}));var LinkQueryMode;!function(e){e[e.WorkItems=0]="WorkItems",e[e.LinksOneHopMustContain=1]="LinksOneHopMustContain",e[e.LinksOneHopMayContain=2]="LinksOneHopMayContain",e[e.LinksOneHopDoesNotContain=3]="LinksOneHopDoesNotContain",e[e.LinksRecursiveMustContain=4]="LinksRecursiveMustContain",e[e.LinksRecursiveMayContain=5]="LinksRecursiveMayContain",e[e.LinksRecursiveDoesNotContain=6]="LinksRecursiveDoesNotContain"}(LinkQueryMode||(exports.LinkQueryMode=LinkQueryMode={}));var LogicalOperation;!function(e){e[e.NONE=0]="NONE",e[e.AND=1]="AND",e[e.OR=2]="OR"}(LogicalOperation||(exports.LogicalOperation=LogicalOperation={}));var ProvisioningActionType;!function(e){e[e.Import=0]="Import",e[e.Validate=1]="Validate"}(ProvisioningActionType||(exports.ProvisioningActionType=ProvisioningActionType={}));var QueryErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(QueryErrorPolicy||(exports.QueryErrorPolicy=QueryErrorPolicy={}));var QueryExpand;!function(e){e[e.None=0]="None",e[e.Wiql=1]="Wiql",e[e.Clauses=2]="Clauses",e[e.All=3]="All",e[e.Minimal=4]="Minimal"}(QueryExpand||(exports.QueryExpand=QueryExpand={}));var QueryOption;!function(e){e[e.Doing=1]="Doing",e[e.Done=2]="Done",e[e.Followed=3]="Followed"}(QueryOption||(exports.QueryOption=QueryOption={}));var QueryRecursionOption;!function(e){e[e.ParentFirst=0]="ParentFirst",e[e.ChildFirst=1]="ChildFirst"}(QueryRecursionOption||(exports.QueryRecursionOption=QueryRecursionOption={}));var QueryResultType;!function(e){e[e.WorkItem=1]="WorkItem",e[e.WorkItemLink=2]="WorkItemLink"}(QueryResultType||(exports.QueryResultType=QueryResultType={}));var QueryType;!function(e){e[e.Flat=1]="Flat",e[e.Tree=2]="Tree",e[e.OneHop=3]="OneHop"}(QueryType||(exports.QueryType=QueryType={}));var ReportingRevisionsExpand;!function(e){e[e.None=0]="None",e[e.Fields=1]="Fields"}(ReportingRevisionsExpand||(exports.ReportingRevisionsExpand=ReportingRevisionsExpand={}));var TemplateType;!function(e){e[e.WorkItemType=0]="WorkItemType",e[e.GlobalWorkflow=1]="GlobalWorkflow"}(TemplateType||(exports.TemplateType=TemplateType={}));var TreeNodeStructureType;!function(e){e[e.Area=0]="Area",e[e.Iteration=1]="Iteration"}(TreeNodeStructureType||(exports.TreeNodeStructureType=TreeNodeStructureType={}));var TreeStructureGroup;!function(e){e[e.Areas=0]="Areas",e[e.Iterations=1]="Iterations"}(TreeStructureGroup||(exports.TreeStructureGroup=TreeStructureGroup={}));var WorkItemErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(WorkItemErrorPolicy||(exports.WorkItemErrorPolicy=WorkItemErrorPolicy={}));var WorkItemExpand;!function(e){e[e.None=0]="None",e[e.Relations=1]="Relations",e[e.Fields=2]="Fields",e[e.Links=3]="Links",e[e.All=4]="All"}(WorkItemExpand||(exports.WorkItemExpand=WorkItemExpand={}));var WorkItemRecentActivityType;!function(e){e[e.Visited=0]="Visited",e[e.Edited=1]="Edited",e[e.Deleted=2]="Deleted",e[e.Restored=3]="Restored"}(WorkItemRecentActivityType||(exports.WorkItemRecentActivityType=WorkItemRecentActivityType={}));var WorkItemTypeFieldsExpandLevel;!function(e){e[e.None=0]="None",e[e.AllowedValues=1]="AllowedValues",e[e.DependentFields=2]="DependentFields",e[e.All=3]="All"}(WorkItemTypeFieldsExpandLevel||(exports.WorkItemTypeFieldsExpandLevel=WorkItemTypeFieldsExpandLevel={}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WorkItemTypeFieldsExpandLevel=exports.WorkItemRecentActivityType=exports.WorkItemExpand=exports.WorkItemErrorPolicy=exports.TreeStructureGroup=exports.TreeNodeStructureType=exports.TemplateType=exports.ReportingRevisionsExpand=exports.QueryType=exports.QueryResultType=exports.QueryRecursionOption=exports.QueryOption=exports.QueryExpand=exports.QueryErrorPolicy=exports.ProvisioningActionType=exports.LogicalOperation=exports.LinkQueryMode=exports.LargeTextCustomHtmlFormat=exports.GetFieldsExpand=exports.FieldUsage=exports.FieldType=exports.CommentSortOrder=exports.CommentReactionType=exports.CommentFormat=exports.CommentExpandOptions=exports.ClassificationNodesErrorPolicy=exports.BundleFormat=void 0;var BundleFormat;!function(e){e[e.Zip=0]="Zip"}(BundleFormat||(exports.BundleFormat=BundleFormat={}));var ClassificationNodesErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(ClassificationNodesErrorPolicy||(exports.ClassificationNodesErrorPolicy=ClassificationNodesErrorPolicy={}));var CommentExpandOptions;!function(e){e[e.None=0]="None",e[e.Reactions=1]="Reactions",e[e.RenderedText=8]="RenderedText",e[e.RenderedTextOnly=16]="RenderedTextOnly",e[e.All=-17]="All"}(CommentExpandOptions||(exports.CommentExpandOptions=CommentExpandOptions={}));var CommentFormat;!function(e){e[e.Markdown=0]="Markdown",e[e.Html=1]="Html"}(CommentFormat||(exports.CommentFormat=CommentFormat={}));var CommentReactionType;!function(e){e[e.Like=0]="Like",e[e.Dislike=1]="Dislike",e[e.Heart=2]="Heart",e[e.Hooray=3]="Hooray",e[e.Smile=4]="Smile",e[e.Confused=5]="Confused"}(CommentReactionType||(exports.CommentReactionType=CommentReactionType={}));var CommentSortOrder;!function(e){e[e.Asc=1]="Asc",e[e.Desc=2]="Desc"}(CommentSortOrder||(exports.CommentSortOrder=CommentSortOrder={}));var FieldType;!function(e){e[e.String=0]="String",e[e.Integer=1]="Integer",e[e.DateTime=2]="DateTime",e[e.PlainText=3]="PlainText",e[e.Html=4]="Html",e[e.TreePath=5]="TreePath",e[e.History=6]="History",e[e.Double=7]="Double",e[e.Guid=8]="Guid",e[e.Boolean=9]="Boolean",e[e.Identity=10]="Identity",e[e.PicklistString=11]="PicklistString",e[e.PicklistInteger=12]="PicklistInteger",e[e.PicklistDouble=13]="PicklistDouble"}(FieldType||(exports.FieldType=FieldType={}));var FieldUsage;!function(e){e[e.None=0]="None",e[e.WorkItem=1]="WorkItem",e[e.WorkItemLink=2]="WorkItemLink",e[e.Tree=3]="Tree",e[e.WorkItemTypeExtension=4]="WorkItemTypeExtension"}(FieldUsage||(exports.FieldUsage=FieldUsage={}));var GetFieldsExpand;!function(e){e[e.None=0]="None",e[e.ExtensionFields=1]="ExtensionFields",e[e.IncludeDeleted=2]="IncludeDeleted"}(GetFieldsExpand||(exports.GetFieldsExpand=GetFieldsExpand={}));var LargeTextCustomHtmlFormat;!function(e){e[e.Markdown=0]="Markdown",e[e.Html=1]="Html"}(LargeTextCustomHtmlFormat||(exports.LargeTextCustomHtmlFormat=LargeTextCustomHtmlFormat={}));var LinkQueryMode;!function(e){e[e.WorkItems=0]="WorkItems",e[e.LinksOneHopMustContain=1]="LinksOneHopMustContain",e[e.LinksOneHopMayContain=2]="LinksOneHopMayContain",e[e.LinksOneHopDoesNotContain=3]="LinksOneHopDoesNotContain",e[e.LinksRecursiveMustContain=4]="LinksRecursiveMustContain",e[e.LinksRecursiveMayContain=5]="LinksRecursiveMayContain",e[e.LinksRecursiveDoesNotContain=6]="LinksRecursiveDoesNotContain"}(LinkQueryMode||(exports.LinkQueryMode=LinkQueryMode={}));var LogicalOperation;!function(e){e[e.NONE=0]="NONE",e[e.AND=1]="AND",e[e.OR=2]="OR"}(LogicalOperation||(exports.LogicalOperation=LogicalOperation={}));var ProvisioningActionType;!function(e){e[e.Import=0]="Import",e[e.Validate=1]="Validate"}(ProvisioningActionType||(exports.ProvisioningActionType=ProvisioningActionType={}));var QueryErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(QueryErrorPolicy||(exports.QueryErrorPolicy=QueryErrorPolicy={}));var QueryExpand;!function(e){e[e.None=0]="None",e[e.Wiql=1]="Wiql",e[e.Clauses=2]="Clauses",e[e.All=3]="All",e[e.Minimal=4]="Minimal"}(QueryExpand||(exports.QueryExpand=QueryExpand={}));var QueryOption;!function(e){e[e.Doing=1]="Doing",e[e.Done=2]="Done",e[e.Followed=3]="Followed"}(QueryOption||(exports.QueryOption=QueryOption={}));var QueryRecursionOption;!function(e){e[e.ParentFirst=0]="ParentFirst",e[e.ChildFirst=1]="ChildFirst"}(QueryRecursionOption||(exports.QueryRecursionOption=QueryRecursionOption={}));var QueryResultType;!function(e){e[e.WorkItem=1]="WorkItem",e[e.WorkItemLink=2]="WorkItemLink"}(QueryResultType||(exports.QueryResultType=QueryResultType={}));var QueryType;!function(e){e[e.Flat=1]="Flat",e[e.Tree=2]="Tree",e[e.OneHop=3]="OneHop"}(QueryType||(exports.QueryType=QueryType={}));var ReportingRevisionsExpand;!function(e){e[e.None=0]="None",e[e.Fields=1]="Fields"}(ReportingRevisionsExpand||(exports.ReportingRevisionsExpand=ReportingRevisionsExpand={}));var TemplateType;!function(e){e[e.WorkItemType=0]="WorkItemType",e[e.GlobalWorkflow=1]="GlobalWorkflow"}(TemplateType||(exports.TemplateType=TemplateType={}));var TreeNodeStructureType;!function(e){e[e.Area=0]="Area",e[e.Iteration=1]="Iteration"}(TreeNodeStructureType||(exports.TreeNodeStructureType=TreeNodeStructureType={}));var TreeStructureGroup;!function(e){e[e.Areas=0]="Areas",e[e.Iterations=1]="Iterations"}(TreeStructureGroup||(exports.TreeStructureGroup=TreeStructureGroup={}));var WorkItemErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(WorkItemErrorPolicy||(exports.WorkItemErrorPolicy=WorkItemErrorPolicy={}));var WorkItemExpand;!function(e){e[e.None=0]="None",e[e.Relations=1]="Relations",e[e.Fields=2]="Fields",e[e.Links=3]="Links",e[e.All=4]="All"}(WorkItemExpand||(exports.WorkItemExpand=WorkItemExpand={}));var WorkItemRecentActivityType;!function(e){e[e.Visited=0]="Visited",e[e.Edited=1]="Edited",e[e.Deleted=2]="Deleted",e[e.Restored=3]="Restored"}(WorkItemRecentActivityType||(exports.WorkItemRecentActivityType=WorkItemRecentActivityType={}));var WorkItemTypeFieldsExpandLevel;!function(e){e[e.None=0]="None",e[e.AllowedValues=1]="AllowedValues",e[e.DependentFields=2]="DependentFields",e[e.All=3]="All"}(WorkItemTypeFieldsExpandLevel||(exports.WorkItemTypeFieldsExpandLevel=WorkItemTypeFieldsExpandLevel={}));
@@ -29,6 +29,10 @@ export var AlertType;
29
29
  * The code contains a weakness determined by AI-powered analysis.
30
30
  */
31
31
  AlertType[AlertType["AICode"] = 5] = "AICode";
32
+ /**
33
+ * The code uses a dependency flagged as malware by the GitHub Advisory Database.
34
+ */
35
+ AlertType[AlertType["Malware"] = 6] = "Malware";
32
36
  })(AlertType || (AlertType = {}));
33
37
  export var AlertValidityStatus;
34
38
  (function (AlertValidityStatus) {
@@ -1 +1 @@
1
- export var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode"}(AlertType||(AlertType={}));export var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(AlertValidityStatus={}));export var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(ComponentType={}));export var DashboardAlertState;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(DashboardAlertState||(DashboardAlertState={}));export var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(DismissalType={}));export var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(Severity={}));export var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(State={}));export var TimePeriod;!function(e){e[e.Undefined=0]="Undefined",e[e.Last24Hours=5]="Last24Hours",e[e.Last7Days=6]="Last7Days",e[e.Last14Days=7]="Last14Days",e[e.Last30Days=8]="Last30Days",e[e.Last90Days=9]="Last90Days"}(TimePeriod||(TimePeriod={}));
1
+ export var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode",e[e.Malware=6]="Malware"}(AlertType||(AlertType={}));export var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(AlertValidityStatus={}));export var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(ComponentType={}));export var DashboardAlertState;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(DashboardAlertState||(DashboardAlertState={}));export var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(DismissalType={}));export var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(Severity={}));export var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(State={}));export var TimePeriod;!function(e){e[e.Undefined=0]="Undefined",e[e.Last24Hours=5]="Last24Hours",e[e.Last7Days=6]="Last7Days",e[e.Last14Days=7]="Last14Days",e[e.Last30Days=8]="Last30Days",e[e.Last90Days=9]="Last90Days"}(TimePeriod||(TimePeriod={}));
@@ -3,6 +3,38 @@
3
3
  * Copyright(C) Microsoft Corporation. All rights reserved.
4
4
  * ---------------------------------------------------------
5
5
  */
6
+ /**
7
+ * Identifies the supported artifact types produced by an alert job.
8
+ */
9
+ export var AlertJobArtifactType;
10
+ (function (AlertJobArtifactType) {
11
+ /**
12
+ * An artifact type not recognized by this client version.
13
+ */
14
+ AlertJobArtifactType[AlertJobArtifactType["Unknown"] = 0] = "Unknown";
15
+ /**
16
+ * An Azure Repos pull request.
17
+ */
18
+ AlertJobArtifactType[AlertJobArtifactType["PullRequest"] = 1] = "PullRequest";
19
+ })(AlertJobArtifactType || (AlertJobArtifactType = {}));
20
+ /**
21
+ * Identifies the supported alert job workflows.
22
+ */
23
+ export var AlertJobType;
24
+ (function (AlertJobType) {
25
+ /**
26
+ * An alert job type not recognized by this client version.
27
+ */
28
+ AlertJobType[AlertJobType["Unknown"] = 0] = "Unknown";
29
+ /**
30
+ * A WIM workflow that creates a pull request.
31
+ */
32
+ AlertJobType[AlertJobType["WIMAutoPR"] = 1] = "WIMAutoPR";
33
+ /**
34
+ * An AI alert consolidation workflow.
35
+ */
36
+ AlertJobType[AlertJobType["AIAlertConsolidation"] = 2] = "AIAlertConsolidation";
37
+ })(AlertJobType || (AlertJobType = {}));
6
38
  export var AlertListExpandOption;
7
39
  (function (AlertListExpandOption) {
8
40
  /**
@@ -17,6 +49,10 @@ export var AlertListExpandOption;
17
49
  * Return only the count of active alerts grouped by alert type.
18
50
  */
19
51
  AlertListExpandOption[AlertListExpandOption["Count"] = 2] = "Count";
52
+ /**
53
+ * Return the AI metadata blob reference in AI code alerts.
54
+ */
55
+ AlertListExpandOption[AlertListExpandOption["AIMetadataBlobReference"] = 3] = "AIMetadataBlobReference";
20
56
  })(AlertListExpandOption || (AlertListExpandOption = {}));
21
57
  /**
22
58
  * Enum to control error policy in a bulk get alert metadata items request.
@@ -58,6 +94,10 @@ export var AlertType;
58
94
  * The code contains a weakness determined by AI-powered analysis.
59
95
  */
60
96
  AlertType[AlertType["AICode"] = 5] = "AICode";
97
+ /**
98
+ * The code uses a dependency flagged as malware by the GitHub Advisory Database.
99
+ */
100
+ AlertType[AlertType["Malware"] = 6] = "Malware";
61
101
  })(AlertType || (AlertType = {}));
62
102
  export var AlertValidationRequestStatus;
63
103
  (function (AlertValidationRequestStatus) {
@@ -126,6 +166,18 @@ export var AutofixCallbackStatus;
126
166
  * The pipeline completed successfully but the autofix binary produced no changes, so no pull request was created.
127
167
  */
128
168
  AutofixCallbackStatus[AutofixCallbackStatus["NoChangesProduced"] = 2] = "NoChangesProduced";
169
+ /**
170
+ * The pipeline completed successfully and determined that the alert is a false positive, so no pull request was created.
171
+ */
172
+ AutofixCallbackStatus[AutofixCallbackStatus["FalsePositive"] = 3] = "FalsePositive";
173
+ /**
174
+ * The target file referenced by the analysis could not be found.
175
+ */
176
+ AutofixCallbackStatus[AutofixCallbackStatus["TargetFileNotFound"] = 4] = "TargetFileNotFound";
177
+ /**
178
+ * The push was rejected by the commit author email validation policy.
179
+ */
180
+ AutofixCallbackStatus[AutofixCallbackStatus["CommitAuthorEmailValidationFailed"] = 5] = "CommitAuthorEmailValidationFailed";
129
181
  })(AutofixCallbackStatus || (AutofixCallbackStatus = {}));
130
182
  /**
131
183
  * Indicates the reason an autofix request failed. Maps to TINYINT (nullable) in the database.
@@ -156,6 +208,26 @@ export var AutofixRequestFailedReason;
156
208
  * The pipeline completed successfully but produced no changes, so no pull request was created. A valid terminal outcome surfaced as a failure with this distinct reason.
157
209
  */
158
210
  AutofixRequestFailedReason[AutofixRequestFailedReason["NoChanges"] = 5] = "NoChanges";
211
+ /**
212
+ * The target project's agent pool could not be found or has not been authorized for use, so the validation pipeline could not be queued. This is a user/configuration error.
213
+ */
214
+ AutofixRequestFailedReason[AutofixRequestFailedReason["AgentPoolUnavailable"] = 6] = "AgentPoolUnavailable";
215
+ /**
216
+ * The alert ref cannot be resolved to an existing branch because the pull request or merge ref, source branch, or normal branch no longer exists.
217
+ */
218
+ AutofixRequestFailedReason[AutofixRequestFailedReason["BranchNotResolvable"] = 7] = "BranchNotResolvable";
219
+ /**
220
+ * The pipeline completed successfully and determined that the alert is a false positive, so no pull request was created. This is a terminal non-PR result, not an operational pipeline failure.
221
+ */
222
+ AutofixRequestFailedReason[AutofixRequestFailedReason["FalsePositive"] = 8] = "FalsePositive";
223
+ /**
224
+ * The target file referenced by the analysis could not be found.
225
+ */
226
+ AutofixRequestFailedReason[AutofixRequestFailedReason["TargetFileNotFound"] = 9] = "TargetFileNotFound";
227
+ /**
228
+ * The push was rejected by the commit author email validation policy.
229
+ */
230
+ AutofixRequestFailedReason[AutofixRequestFailedReason["CommitAuthorEmailValidationFailed"] = 10] = "CommitAuthorEmailValidationFailed";
159
231
  })(AutofixRequestFailedReason || (AutofixRequestFailedReason = {}));
160
232
  /**
161
233
  * Indicates the lifecycle status of an autofix request. Maps to TINYINT in the database.
@@ -1 +1 @@
1
- export var AlertListExpandOption;!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal",e[e.Count=2]="Count"}(AlertListExpandOption||(AlertListExpandOption={}));export var AlertMetadataErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(AlertMetadataErrorPolicy||(AlertMetadataErrorPolicy={}));export var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode"}(AlertType||(AlertType={}));export var AlertValidationRequestStatus;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(AlertValidationRequestStatus||(AlertValidationRequestStatus={}));export var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(AlertValidityStatus={}));export var AnalysisConfigurationType;!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(AnalysisConfigurationType||(AnalysisConfigurationType={}));export var AutofixCallbackStatus;!function(e){e[e.Done=0]="Done",e[e.Failed=1]="Failed",e[e.NoChangesProduced=2]="NoChangesProduced"}(AutofixCallbackStatus||(AutofixCallbackStatus={}));export var AutofixRequestFailedReason;!function(e){e[e.None=0]="None",e[e.PipelineFailed=1]="PipelineFailed",e[e.PipelineTimedOut=2]="PipelineTimedOut",e[e.CallbackNotReceived=3]="CallbackNotReceived",e[e.ProcessorJobFailed=4]="ProcessorJobFailed",e[e.NoChanges=5]="NoChanges"}(AutofixRequestFailedReason||(AutofixRequestFailedReason={}));export var AutofixRequestStatus;!function(e){e[e.None=0]="None",e[e.Pending=1]="Pending",e[e.PipelineRunning=2]="PipelineRunning",e[e.Done=3]="Done",e[e.Failed=4]="Failed"}(AutofixRequestStatus||(AutofixRequestStatus={}));export var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(ComponentType={}));export var Confidence;!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(Confidence||(Confidence={}));export var DependencyKind;!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(DependencyKind||(DependencyKind={}));export var DependencyScope;!function(e){e[e.Runtime=0]="Runtime",e[e.Development=1]="Development"}(DependencyScope||(DependencyScope={}));export var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(DismissalType={}));export var ExpandOption;!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint",e[e.AIMetadataBlobReference=2]="AIMetadataBlobReference"}(ExpandOption||(ExpandOption={}));export var LicenseState;!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(LicenseState||(LicenseState={}));export var LicenseType;!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(LicenseType||(LicenseType={}));export var MetadataChangeType;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(MetadataChangeType||(MetadataChangeType={}));export var MetadataOperation;!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(MetadataOperation||(MetadataOperation={}));export var ResultType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(ResultType||(ResultType={}));export var SarifJobStatus;!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued",e[e.ConcurrentProcessing=5]="ConcurrentProcessing",e[e.Consolidated=6]="Consolidated",e[e.WaitingConsolidation=7]="WaitingConsolidation"}(SarifJobStatus||(SarifJobStatus={}));export var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(Severity={}));export var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(State={}));export var ValidationResult;!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported",e[e.TransientError=5]="TransientError"}(ValidationResult||(ValidationResult={}));
1
+ export var AlertJobArtifactType;!function(e){e[e.Unknown=0]="Unknown",e[e.PullRequest=1]="PullRequest"}(AlertJobArtifactType||(AlertJobArtifactType={}));export var AlertJobType;!function(e){e[e.Unknown=0]="Unknown",e[e.WIMAutoPR=1]="WIMAutoPR",e[e.AIAlertConsolidation=2]="AIAlertConsolidation"}(AlertJobType||(AlertJobType={}));export var AlertListExpandOption;!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal",e[e.Count=2]="Count",e[e.AIMetadataBlobReference=3]="AIMetadataBlobReference"}(AlertListExpandOption||(AlertListExpandOption={}));export var AlertMetadataErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(AlertMetadataErrorPolicy||(AlertMetadataErrorPolicy={}));export var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode",e[e.Malware=6]="Malware"}(AlertType||(AlertType={}));export var AlertValidationRequestStatus;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(AlertValidationRequestStatus||(AlertValidationRequestStatus={}));export var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(AlertValidityStatus={}));export var AnalysisConfigurationType;!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(AnalysisConfigurationType||(AnalysisConfigurationType={}));export var AutofixCallbackStatus;!function(e){e[e.Done=0]="Done",e[e.Failed=1]="Failed",e[e.NoChangesProduced=2]="NoChangesProduced",e[e.FalsePositive=3]="FalsePositive",e[e.TargetFileNotFound=4]="TargetFileNotFound",e[e.CommitAuthorEmailValidationFailed=5]="CommitAuthorEmailValidationFailed"}(AutofixCallbackStatus||(AutofixCallbackStatus={}));export var AutofixRequestFailedReason;!function(e){e[e.None=0]="None",e[e.PipelineFailed=1]="PipelineFailed",e[e.PipelineTimedOut=2]="PipelineTimedOut",e[e.CallbackNotReceived=3]="CallbackNotReceived",e[e.ProcessorJobFailed=4]="ProcessorJobFailed",e[e.NoChanges=5]="NoChanges",e[e.AgentPoolUnavailable=6]="AgentPoolUnavailable",e[e.BranchNotResolvable=7]="BranchNotResolvable",e[e.FalsePositive=8]="FalsePositive",e[e.TargetFileNotFound=9]="TargetFileNotFound",e[e.CommitAuthorEmailValidationFailed=10]="CommitAuthorEmailValidationFailed"}(AutofixRequestFailedReason||(AutofixRequestFailedReason={}));export var AutofixRequestStatus;!function(e){e[e.None=0]="None",e[e.Pending=1]="Pending",e[e.PipelineRunning=2]="PipelineRunning",e[e.Done=3]="Done",e[e.Failed=4]="Failed"}(AutofixRequestStatus||(AutofixRequestStatus={}));export var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(ComponentType={}));export var Confidence;!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(Confidence||(Confidence={}));export var DependencyKind;!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(DependencyKind||(DependencyKind={}));export var DependencyScope;!function(e){e[e.Runtime=0]="Runtime",e[e.Development=1]="Development"}(DependencyScope||(DependencyScope={}));export var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(DismissalType={}));export var ExpandOption;!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint",e[e.AIMetadataBlobReference=2]="AIMetadataBlobReference"}(ExpandOption||(ExpandOption={}));export var LicenseState;!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(LicenseState||(LicenseState={}));export var LicenseType;!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(LicenseType||(LicenseType={}));export var MetadataChangeType;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(MetadataChangeType||(MetadataChangeType={}));export var MetadataOperation;!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(MetadataOperation||(MetadataOperation={}));export var ResultType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(ResultType||(ResultType={}));export var SarifJobStatus;!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued",e[e.ConcurrentProcessing=5]="ConcurrentProcessing",e[e.Consolidated=6]="Consolidated",e[e.WaitingConsolidation=7]="WaitingConsolidation"}(SarifJobStatus||(SarifJobStatus={}));export var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(Severity={}));export var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(State={}));export var ValidationResult;!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported",e[e.TransientError=5]="TransientError"}(ValidationResult||(ValidationResult={}));
@@ -39,6 +39,36 @@ export class AlertRestClient extends RestClientBase {
39
39
  }
40
40
  });
41
41
  }
42
+ /**
43
+ * Get the alert jobs associated with an alert.
44
+ *
45
+ * @param project - Project ID or project name
46
+ * @param repository - The name or ID of the repository
47
+ * @param alertId - The ID of the alert
48
+ * @param top - The maximum number of jobs to return
49
+ * @param continuationToken - If there are more jobs than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of jobs
50
+ */
51
+ async getJobsForAlert(project, repository, alertId, top, continuationToken) {
52
+ const queryValues = {
53
+ top: top,
54
+ continuationToken: continuationToken
55
+ };
56
+ return this.beginRequest({
57
+ apiVersion: "7.2-preview.1",
58
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/jobs",
59
+ routeValues: {
60
+ project: project,
61
+ repository: repository,
62
+ alertId: alertId
63
+ },
64
+ queryParams: queryValues,
65
+ returnRawResponse: true
66
+ }).then(async (response) => {
67
+ const body = await response.text().then(deserializeVssJsonObject);
68
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
69
+ return body;
70
+ });
71
+ }
42
72
  /**
43
73
  * Get an alert.
44
74
  *
@@ -187,6 +217,41 @@ export class AlertRestClient extends RestClientBase {
187
217
  body: request
188
218
  });
189
219
  }
220
+ /**
221
+ * Query alerts for a repository by metadata type linkage.
222
+ *
223
+ * @param criteria - Metadata type filters to limit the alerts returned
224
+ * @param project - Project ID or project name
225
+ * @param repository - The name or ID of the repository
226
+ * @param top - The maximum number of alerts to return
227
+ * @param orderBy - Must be "id" "firstSeen" "lastSeen" "fixedOn" or "severity" Defaults to "id"
228
+ * @param expand - Options to expand the response, e.g. returning alert counts instead of alerts
229
+ * @param continuationToken - If there are more alerts than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of alerts
230
+ */
231
+ async queryAlerts(criteria, project, repository, top, orderBy, expand, continuationToken) {
232
+ const queryValues = {
233
+ top: top,
234
+ orderBy: orderBy,
235
+ expand: expand,
236
+ continuationToken: continuationToken
237
+ };
238
+ return this.beginRequest({
239
+ apiVersion: "7.2-preview.1",
240
+ method: "POST",
241
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alertsquery",
242
+ routeValues: {
243
+ project: project,
244
+ repository: repository
245
+ },
246
+ queryParams: queryValues,
247
+ body: criteria,
248
+ returnRawResponse: true
249
+ }).then(async (response) => {
250
+ const body = await response.text().then(deserializeVssJsonObject);
251
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
252
+ return body;
253
+ });
254
+ }
190
255
  /**
191
256
  * Returns the branches for which analysis results were submitted.
192
257
  *
@@ -238,42 +303,44 @@ export class AlertRestClient extends RestClientBase {
238
303
  });
239
304
  }
240
305
  /**
241
- * Receives a callback from the autofix pipeline with the outcome of the run. Idempotent: repeated calls for a request already in a terminal state return 200 without changes.
306
+ * Create an autofix request for the specified alert.
242
307
  *
243
- * @param callbackRequest - The callback payload containing requestId, status, and optional pullRequestId.
244
308
  * @param project - Project ID or project name
245
- * @param repository - The name or ID of the repository.
246
309
  * @param alertId - The ID of the alert to create an autofix for.
310
+ * @param repository - The name or ID of the repository.
311
+ * @param ref - The Git ref (e.g. refs/heads/feature/x) the autofix should target.
247
312
  */
248
- async autofixCallback(callbackRequest, project, repository, alertId) {
313
+ async createAutofixRequest(project, alertId, repository, ref) {
314
+ const queryValues = {
315
+ ref: ref
316
+ };
249
317
  return this.beginRequest({
250
318
  apiVersion: "7.2-preview.1",
251
319
  method: "POST",
252
320
  routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",
253
321
  routeValues: {
254
322
  project: project,
255
- repository: repository,
256
323
  alertId: alertId,
257
- action: "Callback"
324
+ repository: repository,
325
+ action: "Default"
258
326
  },
259
- body: callbackRequest
327
+ queryParams: queryValues
260
328
  });
261
329
  }
262
330
  /**
263
- * Create an autofix request for the specified alert.
331
+ * Get all autofix requests for the specified alert.
264
332
  *
265
333
  * @param project - Project ID or project name
266
- * @param alertId - The ID of the alert to create an autofix for.
334
+ * @param alertId - The ID of the alert.
267
335
  * @param repository - The name or ID of the repository.
268
- * @param ref - Optional Git ref (e.g. refs/heads/feature/x) the autofix should target. When omitted, the repository's default branch is used.
336
+ * @param ref - The Git ref (e.g. refs/heads/feature/x) the autofix should target.
269
337
  */
270
- async createAutofixRequest(project, alertId, repository, ref) {
338
+ async getAutofixRequestsByAlertId(project, alertId, repository, ref) {
271
339
  const queryValues = {
272
340
  ref: ref
273
341
  };
274
342
  return this.beginRequest({
275
343
  apiVersion: "7.2-preview.1",
276
- method: "POST",
277
344
  routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",
278
345
  routeValues: {
279
346
  project: project,
@@ -285,27 +352,52 @@ export class AlertRestClient extends RestClientBase {
285
352
  });
286
353
  }
287
354
  /**
288
- * Get all autofix requests for the specified alert.
355
+ * Receives a callback from the autofix pipeline with the outcome of the run. Idempotent: repeated calls for a request already in a terminal state return 200 without changes.
289
356
  *
357
+ * @param callbackRequest - The callback payload containing requestId, status, and optional pullRequestId.
290
358
  * @param project - Project ID or project name
291
- * @param alertId - The ID of the alert.
292
359
  * @param repository - The name or ID of the repository.
293
- * @param ref - Optional Git ref (e.g. refs/heads/feature/x) the autofix should target. When omitted, the repository's default branch is used.
294
360
  */
295
- async getAutofixRequestsByAlertId(project, alertId, repository, ref) {
361
+ async autofixCallback(callbackRequest, project, repository) {
362
+ return this.beginRequest({
363
+ apiVersion: "7.2-preview.1",
364
+ method: "POST",
365
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/autofix/callback",
366
+ routeValues: {
367
+ project: project,
368
+ repository: repository
369
+ },
370
+ body: callbackRequest
371
+ });
372
+ }
373
+ /**
374
+ * Get Draft alerts for a repository.
375
+ *
376
+ * @param project - Project ID or project name
377
+ * @param repository - The name or ID of the repository
378
+ * @param top - The maximum number of alerts to return
379
+ * @param orderBy - Must be "id", "firstSeen", "lastSeen", "fixedOn", or "severity". Defaults to "id"
380
+ * @param continuationToken - If there are more alerts than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of alerts
381
+ */
382
+ async getDraftAlerts(project, repository, top, orderBy, continuationToken) {
296
383
  const queryValues = {
297
- ref: ref
384
+ top: top,
385
+ orderBy: orderBy,
386
+ continuationToken: continuationToken
298
387
  };
299
388
  return this.beginRequest({
300
389
  apiVersion: "7.2-preview.1",
301
- routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",
390
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/draftAlerts",
302
391
  routeValues: {
303
392
  project: project,
304
- alertId: alertId,
305
- repository: repository,
306
- action: "Default"
393
+ repository: repository
307
394
  },
308
- queryParams: queryValues
395
+ queryParams: queryValues,
396
+ returnRawResponse: true
397
+ }).then(async (response) => {
398
+ const body = await response.text().then(deserializeVssJsonObject);
399
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
400
+ return body;
309
401
  });
310
402
  }
311
403
  /**
@@ -357,6 +449,64 @@ export class AlertRestClient extends RestClientBase {
357
449
  queryParams: queryValues
358
450
  });
359
451
  }
452
+ /**
453
+ * Create an alert job.
454
+ *
455
+ * @param body -
456
+ * @param project - Project ID or project name
457
+ * @param repository - The name or ID of the repository
458
+ */
459
+ async createJob(body, project, repository) {
460
+ return this.beginRequest({
461
+ apiVersion: "7.2-preview.1",
462
+ method: "POST",
463
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/jobs/{jobId}",
464
+ routeValues: {
465
+ project: project,
466
+ repository: repository
467
+ },
468
+ body: body
469
+ });
470
+ }
471
+ /**
472
+ * Get an alert job by ID.
473
+ *
474
+ * @param project - Project ID or project name
475
+ * @param repository - The name or ID of the repository
476
+ * @param jobId - The provider-assigned job identifier
477
+ */
478
+ async getJob(project, repository, jobId) {
479
+ return this.beginRequest({
480
+ apiVersion: "7.2-preview.1",
481
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/jobs/{jobId}",
482
+ routeValues: {
483
+ project: project,
484
+ repository: repository,
485
+ jobId: jobId
486
+ }
487
+ });
488
+ }
489
+ /**
490
+ * Update an alert job.
491
+ *
492
+ * @param patch - The patch describing the fields to update
493
+ * @param project - Project ID or project name
494
+ * @param repository - The name or ID of the repository
495
+ * @param jobId - The provider-assigned job identifier
496
+ */
497
+ async updateJob(patch, project, repository, jobId) {
498
+ return this.beginRequest({
499
+ apiVersion: "7.2-preview.1",
500
+ method: "PATCH",
501
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/jobs/{jobId}",
502
+ routeValues: {
503
+ project: project,
504
+ repository: repository,
505
+ jobId: jobId
506
+ },
507
+ body: patch
508
+ });
509
+ }
360
510
  /**
361
511
  * Create legal review. This creates the legal review associated with the alert. It include the review work item url.
362
512
  *