azure-devops-extension-api 4.227.0 → 4.229.0
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.
- package/Alert/Alert.d.ts +721 -0
- package/Alert/Alert.js +171 -0
- package/Alert/Alert.min.js +1 -0
- package/Alert/AlertClient.d.ts +72 -0
- package/Alert/AlertClient.js +282 -0
- package/Alert/AlertClient.min.js +1 -0
- package/FileContainer/FileContainerClient.d.ts +2 -1
- package/FileContainer/FileContainerClient.js +4 -2
- package/FileContainer/FileContainerClient.min.js +1 -1
- package/Git/Git.d.ts +16 -0
- package/Git/GitClient.d.ts +7 -4
- package/Git/GitClient.js +25 -7
- package/Git/GitClient.min.js +1 -1
- package/Management/Management.d.ts +97 -0
- package/Management/Management.js +24 -0
- package/Management/Management.min.js +1 -0
- package/Management/ManagementClient.d.ts +98 -0
- package/Management/ManagementClient.js +376 -0
- package/Management/ManagementClient.min.js +1 -0
- package/TaskAgent/TaskAgent.d.ts +17 -0
- package/Work/Work.d.ts +6 -0
- package/Work/WorkClient.d.ts +7 -0
- package/Work/WorkClient.js +25 -0
- package/Work/WorkClient.min.js +1 -1
- package/package.json +1 -1
package/Alert/Alert.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ---------------------------------------------------------
|
|
3
|
+
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* ---------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
define(["require", "exports"], function (require, exports) {
|
|
7
|
+
"use strict";
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
var AlertType;
|
|
10
|
+
(function (AlertType) {
|
|
11
|
+
/**
|
|
12
|
+
* The code has an unspecified vulnerability type
|
|
13
|
+
*/
|
|
14
|
+
AlertType[AlertType["Unknown"] = 0] = "Unknown";
|
|
15
|
+
/**
|
|
16
|
+
* The code uses a dependency with a known vulnerability.
|
|
17
|
+
*/
|
|
18
|
+
AlertType[AlertType["Dependency"] = 1] = "Dependency";
|
|
19
|
+
/**
|
|
20
|
+
* The code contains a secret that has now been compromised and must be revoked.
|
|
21
|
+
*/
|
|
22
|
+
AlertType[AlertType["Secret"] = 2] = "Secret";
|
|
23
|
+
/**
|
|
24
|
+
* The code contains a weakness determined by static analysis.
|
|
25
|
+
*/
|
|
26
|
+
AlertType[AlertType["Code"] = 3] = "Code";
|
|
27
|
+
})(AlertType = exports.AlertType || (exports.AlertType = {}));
|
|
28
|
+
var AnalysisConfigurationType;
|
|
29
|
+
(function (AnalysisConfigurationType) {
|
|
30
|
+
/**
|
|
31
|
+
* Default analysis configuration that is not attached to any other configuration data
|
|
32
|
+
*/
|
|
33
|
+
AnalysisConfigurationType[AnalysisConfigurationType["Default"] = 0] = "Default";
|
|
34
|
+
/**
|
|
35
|
+
* Ado Pipeline, contains branch, pipeline, phase, and ADOPipelineId
|
|
36
|
+
*/
|
|
37
|
+
AnalysisConfigurationType[AnalysisConfigurationType["AdoPipeline"] = 1] = "AdoPipeline";
|
|
38
|
+
})(AnalysisConfigurationType = exports.AnalysisConfigurationType || (exports.AnalysisConfigurationType = {}));
|
|
39
|
+
/**
|
|
40
|
+
* This enum defines the dependency components.
|
|
41
|
+
*/
|
|
42
|
+
var ComponentType;
|
|
43
|
+
(function (ComponentType) {
|
|
44
|
+
ComponentType[ComponentType["Unknown"] = 0] = "Unknown";
|
|
45
|
+
ComponentType[ComponentType["NuGet"] = 1] = "NuGet";
|
|
46
|
+
/**
|
|
47
|
+
* Indicates the component is an Npm package.
|
|
48
|
+
*/
|
|
49
|
+
ComponentType[ComponentType["Npm"] = 2] = "Npm";
|
|
50
|
+
/**
|
|
51
|
+
* Indicates the component is a Maven artifact.
|
|
52
|
+
*/
|
|
53
|
+
ComponentType[ComponentType["Maven"] = 3] = "Maven";
|
|
54
|
+
/**
|
|
55
|
+
* Indicates the component is a Git repository.
|
|
56
|
+
*/
|
|
57
|
+
ComponentType[ComponentType["Git"] = 4] = "Git";
|
|
58
|
+
/**
|
|
59
|
+
* Indicates the component is not any of the supported component types by Governance.
|
|
60
|
+
*/
|
|
61
|
+
ComponentType[ComponentType["Other"] = 5] = "Other";
|
|
62
|
+
/**
|
|
63
|
+
* Indicates the component is a Ruby gem.
|
|
64
|
+
*/
|
|
65
|
+
ComponentType[ComponentType["RubyGems"] = 6] = "RubyGems";
|
|
66
|
+
/**
|
|
67
|
+
* Indicates the component is a Cargo package.
|
|
68
|
+
*/
|
|
69
|
+
ComponentType[ComponentType["Cargo"] = 7] = "Cargo";
|
|
70
|
+
/**
|
|
71
|
+
* Indicates the component is a Pip package.
|
|
72
|
+
*/
|
|
73
|
+
ComponentType[ComponentType["Pip"] = 8] = "Pip";
|
|
74
|
+
/**
|
|
75
|
+
* Indicates the component is a loose file. Not a package as understood by different package managers.
|
|
76
|
+
*/
|
|
77
|
+
ComponentType[ComponentType["File"] = 9] = "File";
|
|
78
|
+
ComponentType[ComponentType["Go"] = 10] = "Go";
|
|
79
|
+
/**
|
|
80
|
+
* Indicates the component is a Docker Image
|
|
81
|
+
*/
|
|
82
|
+
ComponentType[ComponentType["DockerImage"] = 11] = "DockerImage";
|
|
83
|
+
/**
|
|
84
|
+
* Indicates the component is a CocoaPods pod.
|
|
85
|
+
*/
|
|
86
|
+
ComponentType[ComponentType["Pod"] = 12] = "Pod";
|
|
87
|
+
/**
|
|
88
|
+
* Indicates the component is found in a linux environment. A package understood by linux based package managers like apt and rpm.
|
|
89
|
+
*/
|
|
90
|
+
ComponentType[ComponentType["Linux"] = 13] = "Linux";
|
|
91
|
+
/**
|
|
92
|
+
* Indicates the component is a Conda package.
|
|
93
|
+
*/
|
|
94
|
+
ComponentType[ComponentType["Conda"] = 14] = "Conda";
|
|
95
|
+
/**
|
|
96
|
+
* Indicates the component is a Docker Reference.
|
|
97
|
+
*/
|
|
98
|
+
ComponentType[ComponentType["DockerReference"] = 15] = "DockerReference";
|
|
99
|
+
/**
|
|
100
|
+
* Indicates the component is a Vcpkg Package.
|
|
101
|
+
*/
|
|
102
|
+
ComponentType[ComponentType["Vcpkg"] = 16] = "Vcpkg";
|
|
103
|
+
})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
|
|
104
|
+
var DismissalType;
|
|
105
|
+
(function (DismissalType) {
|
|
106
|
+
/**
|
|
107
|
+
* Dismissal type unknown
|
|
108
|
+
*/
|
|
109
|
+
DismissalType[DismissalType["Unknown"] = 0] = "Unknown";
|
|
110
|
+
/**
|
|
111
|
+
* Dismissal indicating alert has been fixed
|
|
112
|
+
*/
|
|
113
|
+
DismissalType[DismissalType["Fixed"] = 1] = "Fixed";
|
|
114
|
+
/**
|
|
115
|
+
* Dismissal indicating user is accepting a risk for the alert
|
|
116
|
+
*/
|
|
117
|
+
DismissalType[DismissalType["AcceptedRisk"] = 2] = "AcceptedRisk";
|
|
118
|
+
/**
|
|
119
|
+
* Dismissal indicating alert is a false positive and will likely not be fixed.
|
|
120
|
+
*/
|
|
121
|
+
DismissalType[DismissalType["FalsePositive"] = 3] = "FalsePositive";
|
|
122
|
+
})(DismissalType = exports.DismissalType || (exports.DismissalType = {}));
|
|
123
|
+
/**
|
|
124
|
+
* This enum defines the different result types.
|
|
125
|
+
*/
|
|
126
|
+
var ResultType;
|
|
127
|
+
(function (ResultType) {
|
|
128
|
+
/**
|
|
129
|
+
* The result was found from an unspecified analysis type
|
|
130
|
+
*/
|
|
131
|
+
ResultType[ResultType["Unknown"] = 0] = "Unknown";
|
|
132
|
+
/**
|
|
133
|
+
* The result was found from dependency analysis
|
|
134
|
+
*/
|
|
135
|
+
ResultType[ResultType["Dependency"] = 1] = "Dependency";
|
|
136
|
+
/**
|
|
137
|
+
* The result was found from static code analysis
|
|
138
|
+
*/
|
|
139
|
+
ResultType[ResultType["VersionControl"] = 2] = "VersionControl";
|
|
140
|
+
})(ResultType = exports.ResultType || (exports.ResultType = {}));
|
|
141
|
+
var Severity;
|
|
142
|
+
(function (Severity) {
|
|
143
|
+
Severity[Severity["Low"] = 0] = "Low";
|
|
144
|
+
Severity[Severity["Medium"] = 1] = "Medium";
|
|
145
|
+
Severity[Severity["High"] = 2] = "High";
|
|
146
|
+
Severity[Severity["Critical"] = 3] = "Critical";
|
|
147
|
+
})(Severity = exports.Severity || (exports.Severity = {}));
|
|
148
|
+
var State;
|
|
149
|
+
(function (State) {
|
|
150
|
+
/**
|
|
151
|
+
* Alert is in an indeterminate state
|
|
152
|
+
*/
|
|
153
|
+
State[State["Unknown"] = 0] = "Unknown";
|
|
154
|
+
/**
|
|
155
|
+
* Alert has been detected in the code
|
|
156
|
+
*/
|
|
157
|
+
State[State["Active"] = 1] = "Active";
|
|
158
|
+
/**
|
|
159
|
+
* Alert was dismissed by a user
|
|
160
|
+
*/
|
|
161
|
+
State[State["Dismissed"] = 2] = "Dismissed";
|
|
162
|
+
/**
|
|
163
|
+
* The issue is no longer detected in the code
|
|
164
|
+
*/
|
|
165
|
+
State[State["Fixed"] = 4] = "Fixed";
|
|
166
|
+
/**
|
|
167
|
+
* The tool has determined that the issue is no longer a risk
|
|
168
|
+
*/
|
|
169
|
+
State[State["AutoDismissed"] = 8] = "AutoDismissed";
|
|
170
|
+
})(State = exports.State || (exports.State = {}));
|
|
171
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code"}(n.AlertType||(n.AlertType={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!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"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical"}(n.Severity||(n.Severity={}));!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"}(n.State||(n.State={}))});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { IVssRestClientOptions } from "../Common/Context";
|
|
2
|
+
import { RestClientBase } from "../Common/RestClientBase";
|
|
3
|
+
import * as Alert from "../Alert/Alert";
|
|
4
|
+
import * as WebApi from "../WebApi/WebApi";
|
|
5
|
+
export declare class AlertRestClient extends RestClientBase {
|
|
6
|
+
constructor(options: IVssRestClientOptions);
|
|
7
|
+
/**
|
|
8
|
+
* Get an alert.
|
|
9
|
+
*
|
|
10
|
+
* @param project - Project ID or project name
|
|
11
|
+
* @param alertId - ID of alert to retrieve
|
|
12
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
13
|
+
* @param ref -
|
|
14
|
+
*/
|
|
15
|
+
getAlert(project: string, alertId: number, repository: string, ref?: string): Promise<Alert.Alert>;
|
|
16
|
+
/**
|
|
17
|
+
* Get alerts for a repository
|
|
18
|
+
*
|
|
19
|
+
* @param project - Project ID or project name
|
|
20
|
+
* @param repository - The name or ID of the repository
|
|
21
|
+
* @param top - The maximum number of alerts to return
|
|
22
|
+
* @param orderBy - Must be "id" "firstSeen" "lastSeen" "fixedOn" or "severity" Defaults to "id"
|
|
23
|
+
* @param criteria - Options to limit the alerts returned
|
|
24
|
+
* @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
|
|
25
|
+
*/
|
|
26
|
+
getAlerts(project: string, repository: string, top?: number, orderBy?: string, criteria?: Alert.SearchCriteria, continuationToken?: string): Promise<WebApi.PagedList<Alert.Alert>>;
|
|
27
|
+
/**
|
|
28
|
+
* Get an alert.
|
|
29
|
+
*
|
|
30
|
+
* @param project - Project ID or project name
|
|
31
|
+
* @param alertId - ID of alert to retrieve
|
|
32
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
33
|
+
* @param ref -
|
|
34
|
+
*/
|
|
35
|
+
getAlertSarif(project: string, alertId: number, repository: string, ref?: string): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Update the status of an alert
|
|
38
|
+
*
|
|
39
|
+
* @param stateUpdate - The new status of the alert
|
|
40
|
+
* @param project - Project ID or project name
|
|
41
|
+
* @param alertId - The ID of the alert
|
|
42
|
+
* @param repository - The name or ID of the repository
|
|
43
|
+
*/
|
|
44
|
+
updateAlert(stateUpdate: Alert.AlertStateUpdate, project: string, alertId: number, repository: string): Promise<Alert.Alert>;
|
|
45
|
+
/**
|
|
46
|
+
* @param project - Project ID or project name
|
|
47
|
+
* @param alertId -
|
|
48
|
+
* @param repository -
|
|
49
|
+
* @param ref -
|
|
50
|
+
*/
|
|
51
|
+
getAlertInstances(project: string, alertId: number, repository: string, ref?: string): Promise<Alert.AlertAnalysisInstance[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Upload a Sarif containing security alerts
|
|
54
|
+
*
|
|
55
|
+
* @param content - Content to upload
|
|
56
|
+
* @param project - Project ID or project name
|
|
57
|
+
* @param repository - The name or ID of a repository
|
|
58
|
+
*/
|
|
59
|
+
uploadSarif(content: string, project: string, repository: string): Promise<number>;
|
|
60
|
+
/**
|
|
61
|
+
* @param project - Project ID or project name
|
|
62
|
+
* @param repository -
|
|
63
|
+
* @param alertType -
|
|
64
|
+
*/
|
|
65
|
+
getUxFilters(project: string, repository: string, alertType: Alert.AlertType): Promise<Alert.UxFilters>;
|
|
66
|
+
/**
|
|
67
|
+
* Get the status of the Sarif processing job
|
|
68
|
+
*
|
|
69
|
+
* @param sarifId - Sarif ID returned when the Sarif was uploaded
|
|
70
|
+
*/
|
|
71
|
+
getSarif(sarifId: number): Promise<boolean>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ---------------------------------------------------------
|
|
3
|
+
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* ---------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
var __extends = (this && this.__extends) || (function () {
|
|
7
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
10
|
+
return function (d, b) {
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
|
+
function step(op) {
|
|
29
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
30
|
+
while (_) try {
|
|
31
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
32
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
33
|
+
switch (op[0]) {
|
|
34
|
+
case 0: case 1: t = op; break;
|
|
35
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
36
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
37
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
38
|
+
default:
|
|
39
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
40
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
41
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
42
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
43
|
+
if (t[2]) _.ops.pop();
|
|
44
|
+
_.trys.pop(); continue;
|
|
45
|
+
}
|
|
46
|
+
op = body.call(thisArg, _);
|
|
47
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
48
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serialization"], function (require, exports, RestClientBase_1, Serialization_1) {
|
|
52
|
+
"use strict";
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var AlertRestClient = /** @class */ (function (_super) {
|
|
55
|
+
__extends(AlertRestClient, _super);
|
|
56
|
+
function AlertRestClient(options) {
|
|
57
|
+
return _super.call(this, options) || this;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get an alert.
|
|
61
|
+
*
|
|
62
|
+
* @param project - Project ID or project name
|
|
63
|
+
* @param alertId - ID of alert to retrieve
|
|
64
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
65
|
+
* @param ref -
|
|
66
|
+
*/
|
|
67
|
+
AlertRestClient.prototype.getAlert = function (project, alertId, repository, ref) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
var queryValues;
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
queryValues = {
|
|
72
|
+
ref: ref
|
|
73
|
+
};
|
|
74
|
+
return [2 /*return*/, this.beginRequest({
|
|
75
|
+
apiVersion: "7.2-preview.1",
|
|
76
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",
|
|
77
|
+
routeValues: {
|
|
78
|
+
project: project,
|
|
79
|
+
alertId: alertId,
|
|
80
|
+
repository: repository
|
|
81
|
+
},
|
|
82
|
+
queryParams: queryValues
|
|
83
|
+
})];
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Get alerts for a repository
|
|
89
|
+
*
|
|
90
|
+
* @param project - Project ID or project name
|
|
91
|
+
* @param repository - The name or ID of the repository
|
|
92
|
+
* @param top - The maximum number of alerts to return
|
|
93
|
+
* @param orderBy - Must be "id" "firstSeen" "lastSeen" "fixedOn" or "severity" Defaults to "id"
|
|
94
|
+
* @param criteria - Options to limit the alerts returned
|
|
95
|
+
* @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
|
|
96
|
+
*/
|
|
97
|
+
AlertRestClient.prototype.getAlerts = function (project, repository, top, orderBy, criteria, continuationToken) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
+
var queryValues;
|
|
100
|
+
var _this = this;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
queryValues = {
|
|
103
|
+
top: top,
|
|
104
|
+
orderBy: orderBy,
|
|
105
|
+
criteria: criteria,
|
|
106
|
+
continuationToken: continuationToken
|
|
107
|
+
};
|
|
108
|
+
return [2 /*return*/, this.beginRequest({
|
|
109
|
+
apiVersion: "7.2-preview.1",
|
|
110
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",
|
|
111
|
+
routeValues: {
|
|
112
|
+
project: project,
|
|
113
|
+
repository: repository
|
|
114
|
+
},
|
|
115
|
+
queryParams: queryValues,
|
|
116
|
+
returnRawResponse: true
|
|
117
|
+
}).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
118
|
+
var body;
|
|
119
|
+
return __generator(this, function (_a) {
|
|
120
|
+
switch (_a.label) {
|
|
121
|
+
case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
|
|
122
|
+
case 1:
|
|
123
|
+
body = _a.sent();
|
|
124
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
125
|
+
return [2 /*return*/, body];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}); })];
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Get an alert.
|
|
134
|
+
*
|
|
135
|
+
* @param project - Project ID or project name
|
|
136
|
+
* @param alertId - ID of alert to retrieve
|
|
137
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
138
|
+
* @param ref -
|
|
139
|
+
*/
|
|
140
|
+
AlertRestClient.prototype.getAlertSarif = function (project, alertId, repository, ref) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
+
var queryValues;
|
|
143
|
+
return __generator(this, function (_a) {
|
|
144
|
+
queryValues = {
|
|
145
|
+
ref: ref
|
|
146
|
+
};
|
|
147
|
+
return [2 /*return*/, this.beginRequest({
|
|
148
|
+
apiVersion: "7.2-preview.1",
|
|
149
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",
|
|
150
|
+
routeValues: {
|
|
151
|
+
project: project,
|
|
152
|
+
alertId: alertId,
|
|
153
|
+
repository: repository
|
|
154
|
+
},
|
|
155
|
+
queryParams: queryValues
|
|
156
|
+
})];
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Update the status of an alert
|
|
162
|
+
*
|
|
163
|
+
* @param stateUpdate - The new status of the alert
|
|
164
|
+
* @param project - Project ID or project name
|
|
165
|
+
* @param alertId - The ID of the alert
|
|
166
|
+
* @param repository - The name or ID of the repository
|
|
167
|
+
*/
|
|
168
|
+
AlertRestClient.prototype.updateAlert = function (stateUpdate, project, alertId, repository) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
+
return __generator(this, function (_a) {
|
|
171
|
+
return [2 /*return*/, this.beginRequest({
|
|
172
|
+
apiVersion: "7.2-preview.1",
|
|
173
|
+
method: "PATCH",
|
|
174
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",
|
|
175
|
+
routeValues: {
|
|
176
|
+
project: project,
|
|
177
|
+
alertId: alertId,
|
|
178
|
+
repository: repository
|
|
179
|
+
},
|
|
180
|
+
body: stateUpdate
|
|
181
|
+
})];
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* @param project - Project ID or project name
|
|
187
|
+
* @param alertId -
|
|
188
|
+
* @param repository -
|
|
189
|
+
* @param ref -
|
|
190
|
+
*/
|
|
191
|
+
AlertRestClient.prototype.getAlertInstances = function (project, alertId, repository, ref) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
193
|
+
var queryValues;
|
|
194
|
+
return __generator(this, function (_a) {
|
|
195
|
+
queryValues = {
|
|
196
|
+
ref: ref
|
|
197
|
+
};
|
|
198
|
+
return [2 /*return*/, this.beginRequest({
|
|
199
|
+
apiVersion: "7.2-preview.1",
|
|
200
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",
|
|
201
|
+
routeValues: {
|
|
202
|
+
project: project,
|
|
203
|
+
alertId: alertId,
|
|
204
|
+
repository: repository
|
|
205
|
+
},
|
|
206
|
+
queryParams: queryValues
|
|
207
|
+
})];
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Upload a Sarif containing security alerts
|
|
213
|
+
*
|
|
214
|
+
* @param content - Content to upload
|
|
215
|
+
* @param project - Project ID or project name
|
|
216
|
+
* @param repository - The name or ID of a repository
|
|
217
|
+
*/
|
|
218
|
+
AlertRestClient.prototype.uploadSarif = function (content, project, repository) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
220
|
+
return __generator(this, function (_a) {
|
|
221
|
+
return [2 /*return*/, this.beginRequest({
|
|
222
|
+
apiVersion: "7.2-preview.1",
|
|
223
|
+
method: "POST",
|
|
224
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/sarifs",
|
|
225
|
+
routeValues: {
|
|
226
|
+
project: project,
|
|
227
|
+
repository: repository
|
|
228
|
+
},
|
|
229
|
+
customHeaders: {
|
|
230
|
+
"Content-Type": "application/octet-stream",
|
|
231
|
+
},
|
|
232
|
+
body: content
|
|
233
|
+
})];
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* @param project - Project ID or project name
|
|
239
|
+
* @param repository -
|
|
240
|
+
* @param alertType -
|
|
241
|
+
*/
|
|
242
|
+
AlertRestClient.prototype.getUxFilters = function (project, repository, alertType) {
|
|
243
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
244
|
+
var queryValues;
|
|
245
|
+
return __generator(this, function (_a) {
|
|
246
|
+
queryValues = {
|
|
247
|
+
alertType: alertType
|
|
248
|
+
};
|
|
249
|
+
return [2 /*return*/, this.beginRequest({
|
|
250
|
+
apiVersion: "7.2-preview.1",
|
|
251
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/filters",
|
|
252
|
+
routeValues: {
|
|
253
|
+
project: project,
|
|
254
|
+
repository: repository
|
|
255
|
+
},
|
|
256
|
+
queryParams: queryValues
|
|
257
|
+
})];
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Get the status of the Sarif processing job
|
|
263
|
+
*
|
|
264
|
+
* @param sarifId - Sarif ID returned when the Sarif was uploaded
|
|
265
|
+
*/
|
|
266
|
+
AlertRestClient.prototype.getSarif = function (sarifId) {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
268
|
+
return __generator(this, function (_a) {
|
|
269
|
+
return [2 /*return*/, this.beginRequest({
|
|
270
|
+
apiVersion: "7.2-preview.1",
|
|
271
|
+
routeTemplate: "_apis/Alert/Sarifs/{sarifId}",
|
|
272
|
+
routeValues: {
|
|
273
|
+
sarifId: sarifId
|
|
274
|
+
}
|
|
275
|
+
})];
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
return AlertRestClient;
|
|
280
|
+
}(RestClientBase_1.RestClientBase));
|
|
281
|
+
exports.AlertRestClient = AlertRestClient;
|
|
282
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{u(o.next(e))}catch(e){n(e)}}function s(e){try{u(o.throw(e))}catch(e){n(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(n=2&r[0]?i.return:r[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,r[1])).done)return n;switch(i=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){s.label=r[1];break}if(6===r[0]&&s.label<n[1]){s.label=n[1],n=r;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(r);break}n[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],i=0}finally{o=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.getAlerts=function(e,t,r,i,n,a){return __awaiter(this,void 0,void 0,function(){var s,u=this;return __generator(this,function(p){return s={top:r,orderBy:i,criteria:n,continuationToken:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(u,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(o.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getAlertSarif=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:t,alertId:r,repository:o},body:e})]})})},t.prototype.getAlertInstances=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.uploadSarif=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:t,repository:r},customHeaders:{"Content-Type":"application/octet-stream"},body:e})]})})},t.prototype.getUxFilters=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={alertType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters",routeValues:{project:e,repository:t},queryParams:o})]})})},t.prototype.getSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t}(r.RestClientBase);t.AlertRestClient=i});
|
|
@@ -39,6 +39,7 @@ export declare class FileContainerRestClient extends RestClientBase {
|
|
|
39
39
|
* @param ignoreRequestedMediaType -
|
|
40
40
|
* @param includeBlobMetadata -
|
|
41
41
|
* @param saveAbsolutePath -
|
|
42
|
+
* @param preferRedirect -
|
|
42
43
|
*/
|
|
43
|
-
getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean, ignoreRequestedMediaType?: boolean, includeBlobMetadata?: boolean, saveAbsolutePath?: boolean): Promise<FileContainer.FileContainerItem[]>;
|
|
44
|
+
getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean, ignoreRequestedMediaType?: boolean, includeBlobMetadata?: boolean, saveAbsolutePath?: boolean, preferRedirect?: boolean): Promise<FileContainer.FileContainerItem[]>;
|
|
44
45
|
}
|
|
@@ -144,8 +144,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
144
144
|
* @param ignoreRequestedMediaType -
|
|
145
145
|
* @param includeBlobMetadata -
|
|
146
146
|
* @param saveAbsolutePath -
|
|
147
|
+
* @param preferRedirect -
|
|
147
148
|
*/
|
|
148
|
-
FileContainerRestClient.prototype.getItems = function (containerId, scope, itemPath, metadata, format, downloadFileName, includeDownloadTickets, isShallow, ignoreRequestedMediaType, includeBlobMetadata, saveAbsolutePath) {
|
|
149
|
+
FileContainerRestClient.prototype.getItems = function (containerId, scope, itemPath, metadata, format, downloadFileName, includeDownloadTickets, isShallow, ignoreRequestedMediaType, includeBlobMetadata, saveAbsolutePath, preferRedirect) {
|
|
149
150
|
return __awaiter(this, void 0, void 0, function () {
|
|
150
151
|
var queryValues;
|
|
151
152
|
return __generator(this, function (_a) {
|
|
@@ -159,7 +160,8 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
159
160
|
isShallow: isShallow,
|
|
160
161
|
ignoreRequestedMediaType: ignoreRequestedMediaType,
|
|
161
162
|
includeBlobMetadata: includeBlobMetadata,
|
|
162
|
-
saveAbsolutePath: saveAbsolutePath
|
|
163
|
+
saveAbsolutePath: saveAbsolutePath,
|
|
164
|
+
preferRedirect: preferRedirect
|
|
163
165
|
};
|
|
164
166
|
return [2 /*return*/, this.beginRequest({
|
|
165
167
|
apiVersion: "7.2-preview.4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(a,u)}s((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createItems=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={scope:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"_apis/resources/Containers/{containerId}/{*itemPath}",routeValues:{containerId:t},queryParams:n,body:e})]})})},t.prototype.deleteItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={itemPath:t,scope:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"DELETE",routeTemplate:"_apis/resources/Containers/{containerId}/{*itemPath}",routeValues:{containerId:e},queryParams:n})]})})},t.prototype.getContainers=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={scope:e,artifactUris:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"_apis/resources/Containers/{containerId}/{*itemPath}",queryParams:r})]})})},t.prototype.getItems=function(e,t,r,n,o,i,a,u,s,c,l){return __awaiter(this,void 0,void 0,function(){var
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(a,u)}s((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createItems=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={scope:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"_apis/resources/Containers/{containerId}/{*itemPath}",routeValues:{containerId:t},queryParams:n,body:e})]})})},t.prototype.deleteItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={itemPath:t,scope:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"DELETE",routeTemplate:"_apis/resources/Containers/{containerId}/{*itemPath}",routeValues:{containerId:e},queryParams:n})]})})},t.prototype.getContainers=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={scope:e,artifactUris:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"_apis/resources/Containers/{containerId}/{*itemPath}",queryParams:r})]})})},t.prototype.getItems=function(e,t,r,n,o,i,a,u,s,c,l,p){return __awaiter(this,void 0,void 0,function(){var f;return __generator(this,function(h){return f={scope:t,itemPath:r,metadata:n,$format:o,downloadFileName:i,includeDownloadTickets:a,isShallow:u,ignoreRequestedMediaType:s,includeBlobMetadata:c,saveAbsolutePath:l,preferRedirect:p},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"_apis/resources/Containers/{containerId}/{*itemPath}",routeValues:{containerId:e},queryParams:f})]})})},t}(r.RestClientBase);t.FileContainerRestClient=n});
|
package/Git/Git.d.ts
CHANGED
|
@@ -146,6 +146,14 @@ export interface BillableCommitterDetail extends BillableCommitter {
|
|
|
146
146
|
* Time reported by the commit.
|
|
147
147
|
*/
|
|
148
148
|
commitTime: Date;
|
|
149
|
+
/**
|
|
150
|
+
* DisplayName of the Pusher.
|
|
151
|
+
*/
|
|
152
|
+
displayName: string;
|
|
153
|
+
/**
|
|
154
|
+
* MailNickName of the Pusher.
|
|
155
|
+
*/
|
|
156
|
+
mailNickName: string;
|
|
149
157
|
/**
|
|
150
158
|
* Project Id commit was pushed to.
|
|
151
159
|
*/
|
|
@@ -158,6 +166,10 @@ export interface BillableCommitterDetail extends BillableCommitter {
|
|
|
158
166
|
* Time of the push that contained the commit.
|
|
159
167
|
*/
|
|
160
168
|
pushedTime: Date;
|
|
169
|
+
/**
|
|
170
|
+
* Pusher Id for the push.
|
|
171
|
+
*/
|
|
172
|
+
pusherId: string;
|
|
161
173
|
/**
|
|
162
174
|
* Push Id that contained the commit.
|
|
163
175
|
*/
|
|
@@ -166,6 +178,10 @@ export interface BillableCommitterDetail extends BillableCommitter {
|
|
|
166
178
|
* Repository name commit was pushed to.
|
|
167
179
|
*/
|
|
168
180
|
repoName: string;
|
|
181
|
+
/**
|
|
182
|
+
* SamAccountName of the Pusher.
|
|
183
|
+
*/
|
|
184
|
+
samAccountName: string;
|
|
169
185
|
}
|
|
170
186
|
/**
|
|
171
187
|
* Used by AdvSec to estimate billable pushers for a Host or Project.
|