azure-devops-extension-api 1.158.0 → 2.218.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/Accounts/AccountsClient.d.ts +1 -1
- package/Accounts/AccountsClient.js +4 -4
- package/Accounts/AccountsClient.min.js +1 -1
- package/Build/Build.d.ts +201 -3
- package/Build/Build.js +6 -2
- package/Build/Build.min.js +1 -1
- package/Build/BuildClient.d.ts +121 -13
- package/Build/BuildClient.js +468 -101
- package/Build/BuildClient.min.js +1 -1
- package/Contributions/Contributions.d.ts +1 -1
- package/Contributions/ContributionsClient.js +4 -4
- package/Contributions/ContributionsClient.min.js +1 -1
- package/Core/CoreClient.d.ts +2 -2
- package/Core/CoreClient.js +49 -36
- package/Core/CoreClient.min.js +1 -1
- package/Dashboard/Dashboard.d.ts +79 -2
- package/Dashboard/Dashboard.js +10 -0
- package/Dashboard/Dashboard.min.js +1 -1
- package/Dashboard/DashboardClient.d.ts +2 -2
- package/Dashboard/DashboardClient.js +15 -15
- package/Dashboard/DashboardClient.min.js +1 -1
- package/ExtensionManagement/ExtensionManagement.d.ts +2 -2
- package/ExtensionManagement/ExtensionManagementClient.d.ts +2 -2
- package/ExtensionManagement/ExtensionManagementClient.js +27 -27
- package/ExtensionManagement/ExtensionManagementClient.min.js +1 -1
- package/FeatureAvailability/FeatureAvailabilityClient.js +5 -5
- package/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -1
- package/FeatureManagement/FeatureManagementClient.js +9 -9
- package/FeatureManagement/FeatureManagementClient.min.js +1 -1
- package/FileContainer/FileContainer.d.ts +22 -0
- package/FileContainer/FileContainer.js +8 -0
- package/FileContainer/FileContainer.min.js +1 -1
- package/FileContainer/FileContainerClient.d.ts +5 -2
- package/FileContainer/FileContainerClient.js +13 -7
- package/FileContainer/FileContainerClient.min.js +1 -1
- package/FormInput/FormInput.d.ts +1 -1
- package/Gallery/Gallery.d.ts +92 -7
- package/Gallery/Gallery.js +25 -3
- package/Gallery/Gallery.min.js +1 -1
- package/Gallery/GalleryClient.d.ts +41 -9
- package/Gallery/GalleryClient.js +211 -90
- package/Gallery/GalleryClient.min.js +1 -1
- package/Git/Git.d.ts +121 -7
- package/Git/Git.js +2 -1
- package/Git/Git.min.js +1 -1
- package/Git/GitClient.d.ts +173 -28
- package/Git/GitClient.js +630 -162
- package/Git/GitClient.min.js +1 -1
- package/Graph/Graph.d.ts +107 -17
- package/Graph/GraphClient.d.ts +41 -2
- package/Graph/GraphClient.js +158 -37
- package/Graph/GraphClient.min.js +1 -1
- package/Identities/Identities.d.ts +15 -0
- package/Locations/LocationsClient.js +9 -9
- package/Locations/LocationsClient.min.js +1 -1
- package/Notification/Notification.d.ts +3 -3
- package/Notification/NotificationClient.d.ts +6 -0
- package/Notification/NotificationClient.js +40 -23
- package/Notification/NotificationClient.min.js +1 -1
- package/Operations/OperationsClient.d.ts +1 -1
- package/Operations/OperationsClient.js +2 -2
- package/Operations/OperationsClient.min.js +1 -1
- package/Pipelines/Pipelines.d.ts +318 -0
- package/Pipelines/Pipelines.js +82 -0
- package/Pipelines/Pipelines.min.js +1 -0
- package/Pipelines/PipelinesClient.d.ts +92 -0
- package/Pipelines/PipelinesClient.js +325 -0
- package/Pipelines/PipelinesClient.min.js +1 -0
- package/Policy/Policy.d.ts +4 -0
- package/Policy/PolicyClient.d.ts +3 -3
- package/Policy/PolicyClient.js +30 -19
- package/Policy/PolicyClient.min.js +1 -1
- package/Profile/ProfileClient.js +12 -12
- package/Profile/ProfileClient.min.js +1 -1
- package/ProjectAnalysis/ProjectAnalysisClient.js +4 -4
- package/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -1
- package/Release/Release.d.ts +81 -7
- package/Release/Release.js +11 -0
- package/Release/Release.min.js +1 -1
- package/Release/ReleaseClient.d.ts +31 -5
- package/Release/ReleaseClient.js +223 -95
- package/Release/ReleaseClient.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpoint.d.ts +11 -2
- package/ServiceEndpoint/ServiceEndpoint.js +1 -0
- package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpointClient.d.ts +33 -31
- package/ServiceEndpoint/ServiceEndpointClient.js +122 -107
- package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
- package/ServiceHooks/ServiceHooks.d.ts +2 -1
- package/ServiceHooks/ServiceHooksClient.js +23 -23
- package/ServiceHooks/ServiceHooksClient.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +737 -17
- package/TaskAgent/TaskAgent.js +133 -0
- package/TaskAgent/TaskAgent.min.js +1 -1
- package/TaskAgent/TaskAgentClient.d.ts +28 -16
- package/TaskAgent/TaskAgentClient.js +336 -195
- package/TaskAgent/TaskAgentClient.min.js +1 -1
- package/Test/Test.d.ts +96 -25
- package/Test/Test.js +8 -0
- package/Test/Test.min.js +1 -1
- package/Test/TestClient.d.ts +17 -34
- package/Test/TestClient.js +163 -152
- package/Test/TestClient.min.js +1 -1
- package/TestPlan/TestPlan.d.ts +215 -18
- package/TestPlan/TestPlan.js +47 -1
- package/TestPlan/TestPlan.min.js +1 -1
- package/TestPlan/TestPlanClient.d.ts +48 -14
- package/TestPlan/TestPlanClient.js +255 -74
- package/TestPlan/TestPlanClient.min.js +1 -1
- package/TestResults/TestResultsClient.d.ts +112 -27
- package/TestResults/TestResultsClient.js +518 -134
- package/TestResults/TestResultsClient.min.js +1 -1
- package/Tfvc/Tfvc.d.ts +9 -1
- package/Tfvc/TfvcClient.d.ts +3 -2
- package/Tfvc/TfvcClient.js +41 -28
- package/Tfvc/TfvcClient.min.js +1 -1
- package/WebApi/WebApi.d.ts +22 -3
- package/Wiki/Wiki.d.ts +51 -0
- package/Wiki/WikiClient.d.ts +18 -0
- package/Wiki/WikiClient.js +71 -1
- package/Wiki/WikiClient.min.js +1 -1
- package/Work/Work.d.ts +68 -1
- package/Work/WorkClient.d.ts +10 -3
- package/Work/WorkClient.js +78 -58
- package/Work/WorkClient.min.js +1 -1
- package/WorkItemTracking/WorkItemTracking.d.ts +170 -1
- package/WorkItemTracking/WorkItemTrackingClient.d.ts +18 -2
- package/WorkItemTracking/WorkItemTrackingClient.js +107 -60
- package/WorkItemTracking/WorkItemTrackingClient.min.js +1 -1
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +15 -2
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +4 -0
- package/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -1
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.d.ts +1 -1
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +58 -58
- package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -1
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +3 -1
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.d.ts +9 -1
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +69 -46
- package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,325 @@
|
|
|
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"], function (require, exports, RestClientBase_1) {
|
|
52
|
+
"use strict";
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var PipelinesRestClient = /** @class */ (function (_super) {
|
|
55
|
+
__extends(PipelinesRestClient, _super);
|
|
56
|
+
function PipelinesRestClient(options) {
|
|
57
|
+
return _super.call(this, options) || this;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get a specific artifact from a pipeline run
|
|
61
|
+
*
|
|
62
|
+
* @param project - Project ID or project name
|
|
63
|
+
* @param pipelineId - ID of the pipeline.
|
|
64
|
+
* @param runId - ID of the run of that pipeline.
|
|
65
|
+
* @param artifactName - Name of the artifact.
|
|
66
|
+
* @param expand - Expand options. Default is None.
|
|
67
|
+
*/
|
|
68
|
+
PipelinesRestClient.prototype.getArtifact = function (project, pipelineId, runId, artifactName, expand) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var queryValues;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
queryValues = {
|
|
73
|
+
artifactName: artifactName,
|
|
74
|
+
'$expand': expand
|
|
75
|
+
};
|
|
76
|
+
return [2 /*return*/, this.beginRequest({
|
|
77
|
+
apiVersion: "7.1-preview.1",
|
|
78
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}/artifacts",
|
|
79
|
+
routeValues: {
|
|
80
|
+
project: project,
|
|
81
|
+
pipelineId: pipelineId,
|
|
82
|
+
runId: runId
|
|
83
|
+
},
|
|
84
|
+
queryParams: queryValues
|
|
85
|
+
})];
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Get a specific log from a pipeline run
|
|
91
|
+
*
|
|
92
|
+
* @param project - Project ID or project name
|
|
93
|
+
* @param pipelineId - ID of the pipeline.
|
|
94
|
+
* @param runId - ID of the run of that pipeline.
|
|
95
|
+
* @param logId - ID of the log.
|
|
96
|
+
* @param expand - Expand options. Default is None.
|
|
97
|
+
*/
|
|
98
|
+
PipelinesRestClient.prototype.getLog = function (project, pipelineId, runId, logId, expand) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var queryValues;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
queryValues = {
|
|
103
|
+
'$expand': expand
|
|
104
|
+
};
|
|
105
|
+
return [2 /*return*/, this.beginRequest({
|
|
106
|
+
apiVersion: "7.1-preview.1",
|
|
107
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}/logs/{logId}",
|
|
108
|
+
routeValues: {
|
|
109
|
+
project: project,
|
|
110
|
+
pipelineId: pipelineId,
|
|
111
|
+
runId: runId,
|
|
112
|
+
logId: logId
|
|
113
|
+
},
|
|
114
|
+
queryParams: queryValues
|
|
115
|
+
})];
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Get a list of logs from a pipeline run.
|
|
121
|
+
*
|
|
122
|
+
* @param project - Project ID or project name
|
|
123
|
+
* @param pipelineId - ID of the pipeline.
|
|
124
|
+
* @param runId - ID of the run of that pipeline.
|
|
125
|
+
* @param expand - Expand options. Default is None.
|
|
126
|
+
*/
|
|
127
|
+
PipelinesRestClient.prototype.listLogs = function (project, pipelineId, runId, expand) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
+
var queryValues;
|
|
130
|
+
return __generator(this, function (_a) {
|
|
131
|
+
queryValues = {
|
|
132
|
+
'$expand': expand
|
|
133
|
+
};
|
|
134
|
+
return [2 /*return*/, this.beginRequest({
|
|
135
|
+
apiVersion: "7.1-preview.1",
|
|
136
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}/logs/{logId}",
|
|
137
|
+
routeValues: {
|
|
138
|
+
project: project,
|
|
139
|
+
pipelineId: pipelineId,
|
|
140
|
+
runId: runId
|
|
141
|
+
},
|
|
142
|
+
queryParams: queryValues
|
|
143
|
+
})];
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Create a pipeline.
|
|
149
|
+
*
|
|
150
|
+
* @param inputParameters - Input parameters.
|
|
151
|
+
* @param project - Project ID or project name
|
|
152
|
+
*/
|
|
153
|
+
PipelinesRestClient.prototype.createPipeline = function (inputParameters, project) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
155
|
+
return __generator(this, function (_a) {
|
|
156
|
+
return [2 /*return*/, this.beginRequest({
|
|
157
|
+
apiVersion: "7.1-preview.1",
|
|
158
|
+
method: "POST",
|
|
159
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}",
|
|
160
|
+
routeValues: {
|
|
161
|
+
project: project
|
|
162
|
+
},
|
|
163
|
+
body: inputParameters
|
|
164
|
+
})];
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Gets a pipeline, optionally at the specified version
|
|
170
|
+
*
|
|
171
|
+
* @param project - Project ID or project name
|
|
172
|
+
* @param pipelineId - The pipeline ID
|
|
173
|
+
* @param pipelineVersion - The pipeline version
|
|
174
|
+
*/
|
|
175
|
+
PipelinesRestClient.prototype.getPipeline = function (project, pipelineId, pipelineVersion) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
177
|
+
var queryValues;
|
|
178
|
+
return __generator(this, function (_a) {
|
|
179
|
+
queryValues = {
|
|
180
|
+
pipelineVersion: pipelineVersion
|
|
181
|
+
};
|
|
182
|
+
return [2 /*return*/, this.beginRequest({
|
|
183
|
+
apiVersion: "7.1-preview.1",
|
|
184
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}",
|
|
185
|
+
routeValues: {
|
|
186
|
+
project: project,
|
|
187
|
+
pipelineId: pipelineId
|
|
188
|
+
},
|
|
189
|
+
queryParams: queryValues
|
|
190
|
+
})];
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Get a list of pipelines.
|
|
196
|
+
*
|
|
197
|
+
* @param project - Project ID or project name
|
|
198
|
+
* @param orderBy - A sort expression. Defaults to "name asc"
|
|
199
|
+
* @param top - The maximum number of pipelines to return
|
|
200
|
+
* @param continuationToken - A continuation token from a previous request, to retrieve the next page of results
|
|
201
|
+
*/
|
|
202
|
+
PipelinesRestClient.prototype.listPipelines = function (project, orderBy, top, continuationToken) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
204
|
+
var queryValues;
|
|
205
|
+
return __generator(this, function (_a) {
|
|
206
|
+
queryValues = {
|
|
207
|
+
orderBy: orderBy,
|
|
208
|
+
'$top': top,
|
|
209
|
+
continuationToken: continuationToken
|
|
210
|
+
};
|
|
211
|
+
return [2 /*return*/, this.beginRequest({
|
|
212
|
+
apiVersion: "7.1-preview.1",
|
|
213
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}",
|
|
214
|
+
routeValues: {
|
|
215
|
+
project: project
|
|
216
|
+
},
|
|
217
|
+
queryParams: queryValues
|
|
218
|
+
})];
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Queues a dry run of the pipeline and returns an object containing the final yaml.
|
|
224
|
+
*
|
|
225
|
+
* @param runParameters - Optional additional parameters for this run.
|
|
226
|
+
* @param project - Project ID or project name
|
|
227
|
+
* @param pipelineId - The pipeline ID.
|
|
228
|
+
* @param pipelineVersion - The pipeline version.
|
|
229
|
+
*/
|
|
230
|
+
PipelinesRestClient.prototype.preview = function (runParameters, project, pipelineId, pipelineVersion) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
232
|
+
var queryValues;
|
|
233
|
+
return __generator(this, function (_a) {
|
|
234
|
+
queryValues = {
|
|
235
|
+
pipelineVersion: pipelineVersion
|
|
236
|
+
};
|
|
237
|
+
return [2 /*return*/, this.beginRequest({
|
|
238
|
+
apiVersion: "7.1-preview.1",
|
|
239
|
+
method: "POST",
|
|
240
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/preview",
|
|
241
|
+
routeValues: {
|
|
242
|
+
project: project,
|
|
243
|
+
pipelineId: pipelineId
|
|
244
|
+
},
|
|
245
|
+
queryParams: queryValues,
|
|
246
|
+
body: runParameters
|
|
247
|
+
})];
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Gets a run for a particular pipeline.
|
|
253
|
+
*
|
|
254
|
+
* @param project - Project ID or project name
|
|
255
|
+
* @param pipelineId - The pipeline id
|
|
256
|
+
* @param runId - The run id
|
|
257
|
+
*/
|
|
258
|
+
PipelinesRestClient.prototype.getRun = function (project, pipelineId, runId) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
260
|
+
return __generator(this, function (_a) {
|
|
261
|
+
return [2 /*return*/, this.beginRequest({
|
|
262
|
+
apiVersion: "7.1-preview.1",
|
|
263
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}",
|
|
264
|
+
routeValues: {
|
|
265
|
+
project: project,
|
|
266
|
+
pipelineId: pipelineId,
|
|
267
|
+
runId: runId
|
|
268
|
+
}
|
|
269
|
+
})];
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Gets top 10000 runs for a particular pipeline.
|
|
275
|
+
*
|
|
276
|
+
* @param project - Project ID or project name
|
|
277
|
+
* @param pipelineId - The pipeline id
|
|
278
|
+
*/
|
|
279
|
+
PipelinesRestClient.prototype.listRuns = function (project, pipelineId) {
|
|
280
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281
|
+
return __generator(this, function (_a) {
|
|
282
|
+
return [2 /*return*/, this.beginRequest({
|
|
283
|
+
apiVersion: "7.1-preview.1",
|
|
284
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}",
|
|
285
|
+
routeValues: {
|
|
286
|
+
project: project,
|
|
287
|
+
pipelineId: pipelineId
|
|
288
|
+
}
|
|
289
|
+
})];
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* Runs a pipeline.
|
|
295
|
+
*
|
|
296
|
+
* @param runParameters - Optional additional parameters for this run.
|
|
297
|
+
* @param project - Project ID or project name
|
|
298
|
+
* @param pipelineId - The pipeline ID.
|
|
299
|
+
* @param pipelineVersion - The pipeline version.
|
|
300
|
+
*/
|
|
301
|
+
PipelinesRestClient.prototype.runPipeline = function (runParameters, project, pipelineId, pipelineVersion) {
|
|
302
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
303
|
+
var queryValues;
|
|
304
|
+
return __generator(this, function (_a) {
|
|
305
|
+
queryValues = {
|
|
306
|
+
pipelineVersion: pipelineVersion
|
|
307
|
+
};
|
|
308
|
+
return [2 /*return*/, this.beginRequest({
|
|
309
|
+
apiVersion: "7.1-preview.1",
|
|
310
|
+
method: "POST",
|
|
311
|
+
routeTemplate: "{project}/_apis/pipelines/{pipelineId}/runs/{runId}",
|
|
312
|
+
routeValues: {
|
|
313
|
+
project: project,
|
|
314
|
+
pipelineId: pipelineId
|
|
315
|
+
},
|
|
316
|
+
queryParams: queryValues,
|
|
317
|
+
body: runParameters
|
|
318
|
+
})];
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
};
|
|
322
|
+
return PipelinesRestClient;
|
|
323
|
+
}(RestClientBase_1.RestClientBase));
|
|
324
|
+
exports.PipelinesRestClient = PipelinesRestClient;
|
|
325
|
+
});
|
|
@@ -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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function p(e){try{a(i.next(e))}catch(e){o(e)}}function u(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(p,u)}a((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(p){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,n=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,p])}}var i,n,o,p,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return p={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"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.getArtifact=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(p){return o={artifactName:i,$expand:n},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/pipelines/{pipelineId}/runs/{runId}/artifacts",routeValues:{project:e,pipelineId:t,runId:r},queryParams:o})]})})},t.prototype.getLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(p){return o={$expand:n},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/pipelines/{pipelineId}/runs/{runId}/logs/{logId}",routeValues:{project:e,pipelineId:t,runId:r,logId:i},queryParams:o})]})})},t.prototype.listLogs=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={$expand:i},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/pipelines/{pipelineId}/runs/{runId}/logs/{logId}",routeValues:{project:e,pipelineId:t,runId:r},queryParams:n})]})})},t.prototype.createPipeline=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.1-preview.1",method:"POST",routeTemplate:"{project}/_apis/pipelines/{pipelineId}",routeValues:{project:t},body:e})]})})},t.prototype.getPipeline=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={pipelineVersion:r},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/pipelines/{pipelineId}",routeValues:{project:e,pipelineId:t},queryParams:i})]})})},t.prototype.listPipelines=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={orderBy:t,$top:r,continuationToken:i},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/pipelines/{pipelineId}",routeValues:{project:e},queryParams:n})]})})},t.prototype.preview=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={pipelineVersion:i},[2,this.beginRequest({apiVersion:"7.1-preview.1",method:"POST",routeTemplate:"{project}/_apis/pipelines/{pipelineId}/preview",routeValues:{project:t,pipelineId:r},queryParams:n,body:e})]})})},t.prototype.getRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/pipelines/{pipelineId}/runs/{runId}",routeValues:{project:e,pipelineId:t,runId:r}})]})})},t.prototype.listRuns=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/pipelines/{pipelineId}/runs/{runId}",routeValues:{project:e,pipelineId:t}})]})})},t.prototype.runPipeline=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={pipelineVersion:i},[2,this.beginRequest({apiVersion:"7.1-preview.1",method:"POST",routeTemplate:"{project}/_apis/pipelines/{pipelineId}/runs/{runId}",routeValues:{project:t,pipelineId:r},queryParams:n,body:e})]})})},t}(r.RestClientBase);t.PipelinesRestClient=i});
|
package/Policy/Policy.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ export interface PolicyConfiguration extends VersionedPolicyConfigurationRef {
|
|
|
27
27
|
* Indicates whether the policy is enabled.
|
|
28
28
|
*/
|
|
29
29
|
isEnabled: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* If set, this policy requires "Manage Enterprise Policies" permission to create, edit, or delete.
|
|
32
|
+
*/
|
|
33
|
+
isEnterpriseManaged: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* The policy configuration settings.
|
|
32
36
|
*/
|
package/Policy/PolicyClient.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IVssRestClientOptions } from "../Common/Context";
|
|
2
2
|
import { RestClientBase } from "../Common/RestClientBase";
|
|
3
3
|
import * as Policy from "../Policy/Policy";
|
|
4
|
+
import * as WebApi from "../WebApi/WebApi";
|
|
4
5
|
export declare class PolicyRestClient extends RestClientBase {
|
|
5
6
|
constructor(options: IVssRestClientOptions);
|
|
6
7
|
static readonly RESOURCE_AREA_ID: string;
|
|
@@ -9,9 +10,8 @@ export declare class PolicyRestClient extends RestClientBase {
|
|
|
9
10
|
*
|
|
10
11
|
* @param configuration - The policy configuration to create.
|
|
11
12
|
* @param project - Project ID or project name
|
|
12
|
-
* @param configurationId -
|
|
13
13
|
*/
|
|
14
|
-
createPolicyConfiguration(configuration: Policy.PolicyConfiguration, project: string
|
|
14
|
+
createPolicyConfiguration(configuration: Policy.PolicyConfiguration, project: string): Promise<Policy.PolicyConfiguration>;
|
|
15
15
|
/**
|
|
16
16
|
* Delete a policy configuration by its ID.
|
|
17
17
|
*
|
|
@@ -33,7 +33,7 @@ export declare class PolicyRestClient extends RestClientBase {
|
|
|
33
33
|
* @param scope - [Provided for legacy reasons] The scope on which a subset of policies is defined.
|
|
34
34
|
* @param policyType - Filter returned policies to only this type
|
|
35
35
|
*/
|
|
36
|
-
getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise<Policy.PolicyConfiguration
|
|
36
|
+
getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise<WebApi.PagedList<Policy.PolicyConfiguration>>;
|
|
37
37
|
/**
|
|
38
38
|
* Update a policy configuration by its ID.
|
|
39
39
|
*
|
package/Policy/PolicyClient.js
CHANGED
|
@@ -48,7 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
define(["require", "exports", "../Common/RestClientBase"], function (require, exports, RestClientBase_1) {
|
|
51
|
+
define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serialization"], function (require, exports, RestClientBase_1, Serialization_1) {
|
|
52
52
|
"use strict";
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
54
|
var PolicyRestClient = /** @class */ (function (_super) {
|
|
@@ -61,18 +61,16 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
61
61
|
*
|
|
62
62
|
* @param configuration - The policy configuration to create.
|
|
63
63
|
* @param project - Project ID or project name
|
|
64
|
-
* @param configurationId -
|
|
65
64
|
*/
|
|
66
|
-
PolicyRestClient.prototype.createPolicyConfiguration = function (configuration, project
|
|
65
|
+
PolicyRestClient.prototype.createPolicyConfiguration = function (configuration, project) {
|
|
67
66
|
return __awaiter(this, void 0, void 0, function () {
|
|
68
67
|
return __generator(this, function (_a) {
|
|
69
68
|
return [2 /*return*/, this.beginRequest({
|
|
70
|
-
apiVersion: "
|
|
69
|
+
apiVersion: "7.1-preview.1",
|
|
71
70
|
method: "POST",
|
|
72
71
|
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
|
|
73
72
|
routeValues: {
|
|
74
|
-
project: project
|
|
75
|
-
configurationId: configurationId
|
|
73
|
+
project: project
|
|
76
74
|
},
|
|
77
75
|
body: configuration
|
|
78
76
|
})];
|
|
@@ -89,7 +87,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
89
87
|
return __awaiter(this, void 0, void 0, function () {
|
|
90
88
|
return __generator(this, function (_a) {
|
|
91
89
|
return [2 /*return*/, this.beginRequest({
|
|
92
|
-
apiVersion: "
|
|
90
|
+
apiVersion: "7.1-preview.1",
|
|
93
91
|
method: "DELETE",
|
|
94
92
|
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
|
|
95
93
|
routeValues: {
|
|
@@ -110,7 +108,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
110
108
|
return __awaiter(this, void 0, void 0, function () {
|
|
111
109
|
return __generator(this, function (_a) {
|
|
112
110
|
return [2 /*return*/, this.beginRequest({
|
|
113
|
-
apiVersion: "
|
|
111
|
+
apiVersion: "7.1-preview.1",
|
|
114
112
|
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
|
|
115
113
|
routeValues: {
|
|
116
114
|
project: project,
|
|
@@ -130,19 +128,32 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
130
128
|
PolicyRestClient.prototype.getPolicyConfigurations = function (project, scope, policyType) {
|
|
131
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
132
130
|
var queryValues;
|
|
131
|
+
var _this = this;
|
|
133
132
|
return __generator(this, function (_a) {
|
|
134
133
|
queryValues = {
|
|
135
134
|
scope: scope,
|
|
136
135
|
policyType: policyType
|
|
137
136
|
};
|
|
138
137
|
return [2 /*return*/, this.beginRequest({
|
|
139
|
-
apiVersion: "
|
|
138
|
+
apiVersion: "7.1-preview.1",
|
|
140
139
|
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
|
|
141
140
|
routeValues: {
|
|
142
141
|
project: project
|
|
143
142
|
},
|
|
144
|
-
queryParams: queryValues
|
|
145
|
-
|
|
143
|
+
queryParams: queryValues,
|
|
144
|
+
returnRawResponse: true
|
|
145
|
+
}).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
146
|
+
var body;
|
|
147
|
+
return __generator(this, function (_a) {
|
|
148
|
+
switch (_a.label) {
|
|
149
|
+
case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
|
|
150
|
+
case 1:
|
|
151
|
+
body = _a.sent();
|
|
152
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
153
|
+
return [2 /*return*/, body];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}); })];
|
|
146
157
|
});
|
|
147
158
|
});
|
|
148
159
|
};
|
|
@@ -157,7 +168,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
157
168
|
return __awaiter(this, void 0, void 0, function () {
|
|
158
169
|
return __generator(this, function (_a) {
|
|
159
170
|
return [2 /*return*/, this.beginRequest({
|
|
160
|
-
apiVersion: "
|
|
171
|
+
apiVersion: "7.1-preview.1",
|
|
161
172
|
method: "PUT",
|
|
162
173
|
routeTemplate: "{project}/_apis/policy/Configurations/{configurationId}",
|
|
163
174
|
routeValues: {
|
|
@@ -179,7 +190,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
179
190
|
return __awaiter(this, void 0, void 0, function () {
|
|
180
191
|
return __generator(this, function (_a) {
|
|
181
192
|
return [2 /*return*/, this.beginRequest({
|
|
182
|
-
apiVersion: "
|
|
193
|
+
apiVersion: "7.1-preview.1",
|
|
183
194
|
routeTemplate: "{project}/_apis/policy/Evaluations/{evaluationId}",
|
|
184
195
|
routeValues: {
|
|
185
196
|
project: project,
|
|
@@ -199,7 +210,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
199
210
|
return __awaiter(this, void 0, void 0, function () {
|
|
200
211
|
return __generator(this, function (_a) {
|
|
201
212
|
return [2 /*return*/, this.beginRequest({
|
|
202
|
-
apiVersion: "
|
|
213
|
+
apiVersion: "7.1-preview.1",
|
|
203
214
|
method: "PATCH",
|
|
204
215
|
routeTemplate: "{project}/_apis/policy/Evaluations/{evaluationId}",
|
|
205
216
|
routeValues: {
|
|
@@ -230,7 +241,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
230
241
|
'$skip': skip
|
|
231
242
|
};
|
|
232
243
|
return [2 /*return*/, this.beginRequest({
|
|
233
|
-
apiVersion: "
|
|
244
|
+
apiVersion: "7.1-preview.1",
|
|
234
245
|
routeTemplate: "{project}/_apis/policy/Evaluations",
|
|
235
246
|
routeValues: {
|
|
236
247
|
project: project
|
|
@@ -251,7 +262,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
251
262
|
return __awaiter(this, void 0, void 0, function () {
|
|
252
263
|
return __generator(this, function (_a) {
|
|
253
264
|
return [2 /*return*/, this.beginRequest({
|
|
254
|
-
apiVersion: "
|
|
265
|
+
apiVersion: "7.1-preview.1",
|
|
255
266
|
routeTemplate: "{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",
|
|
256
267
|
routeValues: {
|
|
257
268
|
project: project,
|
|
@@ -279,7 +290,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
279
290
|
'$skip': skip
|
|
280
291
|
};
|
|
281
292
|
return [2 /*return*/, this.beginRequest({
|
|
282
|
-
apiVersion: "
|
|
293
|
+
apiVersion: "7.1-preview.1",
|
|
283
294
|
routeTemplate: "{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",
|
|
284
295
|
routeValues: {
|
|
285
296
|
project: project,
|
|
@@ -300,7 +311,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
300
311
|
return __awaiter(this, void 0, void 0, function () {
|
|
301
312
|
return __generator(this, function (_a) {
|
|
302
313
|
return [2 /*return*/, this.beginRequest({
|
|
303
|
-
apiVersion: "
|
|
314
|
+
apiVersion: "7.1-preview.1",
|
|
304
315
|
routeTemplate: "{project}/_apis/policy/Types/{typeId}",
|
|
305
316
|
routeValues: {
|
|
306
317
|
project: project,
|
|
@@ -319,7 +330,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
319
330
|
return __awaiter(this, void 0, void 0, function () {
|
|
320
331
|
return __generator(this, function (_a) {
|
|
321
332
|
return [2 /*return*/, this.beginRequest({
|
|
322
|
-
apiVersion: "
|
|
333
|
+
apiVersion: "7.1-preview.1",
|
|
323
334
|
routeTemplate: "{project}/_apis/policy/Types/{typeId}",
|
|
324
335
|
routeValues: {
|
|
325
336
|
project: project
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(t,e,i,o){return new(i||(i=Promise))(function(n,r){function u(t){try{s(o.next(t))}catch(t){r(t)}}function a(t){try{s(o.throw(t))}catch(t){r(t)}}function s(t){t.done?n(t.value):new i(function(e){e(t.value)}).then(u,a)}s((o=o.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function i(i){return function(u){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!(r=r.length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{o=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}var o,n,r,u,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(t,e,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.createPolicyConfiguration=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.1-preview.1",method:"POST",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:e},body:t})]})})},e.prototype.deletePolicyConfiguration=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.1-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t,configurationId:e}})]})})},e.prototype.getPolicyConfiguration=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t,configurationId:e}})]})})},e.prototype.getPolicyConfigurations=function(t,e,i){return __awaiter(this,void 0,void 0,function(){var n,r=this;return __generator(this,function(u){return n={scope:e,policyType:i},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t},queryParams:n,returnRawResponse:!0}).then(function(t){return __awaiter(r,void 0,void 0,function(){var e;return __generator(this,function(i){switch(i.label){case 0:return[4,t.text().then(o.deserializeVssJsonObject)];case 1:return e=i.sent(),e.continuationToken=t.headers.get("x-ms-continuationtoken"),[2,e]}})})})]})})},e.prototype.updatePolicyConfiguration=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.1-preview.1",method:"PUT",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:e,configurationId:i},body:t})]})})},e.prototype.getPolicyEvaluation=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/Evaluations/{evaluationId}",routeValues:{project:t,evaluationId:e}})]})})},e.prototype.requeuePolicyEvaluation=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.1-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/policy/Evaluations/{evaluationId}",routeValues:{project:t,evaluationId:e}})]})})},e.prototype.getPolicyEvaluations=function(t,e,i,o,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(u){return r={artifactId:e,includeNotApplicable:i,$top:o,$skip:n},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/Evaluations",routeValues:{project:t},queryParams:r})]})})},e.prototype.getPolicyConfigurationRevision=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",routeValues:{project:t,configurationId:e,revisionId:i}})]})})},e.prototype.getPolicyConfigurationRevisions=function(t,e,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){return n={$top:i,$skip:o},[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",routeValues:{project:t,configurationId:e},queryParams:n})]})})},e.prototype.getPolicyType=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/Types/{typeId}",routeValues:{project:t,typeId:e}})]})})},e.prototype.getPolicyTypes=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/policy/Types/{typeId}",routeValues:{project:t}})]})})},e.RESOURCE_AREA_ID="fb13a388-40dd-4a04-b530-013a739c72ef",e}(i.RestClientBase);e.PolicyRestClient=n});
|