azure-devops-extension-api 4.254.0 → 4.255.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 (43) hide show
  1. package/AdvancedSecurity.Reporting/Reporting.d.ts +8 -0
  2. package/Contributions/Contributions.d.ts +4 -0
  3. package/ExtensionManagement/ExtensionManagement.d.ts +4 -0
  4. package/Git/Git.d.ts +21 -0
  5. package/Git/Git.js +14 -0
  6. package/Git/Git.min.js +1 -1
  7. package/Git/GitClient.js +6 -6
  8. package/Git/GitClient.min.js +1 -1
  9. package/Locations/LocationsClient.d.ts +6 -0
  10. package/Locations/LocationsClient.js +24 -0
  11. package/Locations/LocationsClient.min.js +1 -1
  12. package/Management/Management.d.ts +86 -60
  13. package/Management/Management.js +10 -2
  14. package/Management/Management.min.js +1 -1
  15. package/Management/ManagementClient.d.ts +16 -31
  16. package/Management/ManagementClient.js +38 -77
  17. package/Management/ManagementClient.min.js +1 -1
  18. package/Pipelines/Pipelines.d.ts +1 -0
  19. package/Pipelines/Pipelines.js +1 -0
  20. package/Pipelines/Pipelines.min.js +1 -1
  21. package/Release/ReleaseClient.d.ts +2 -1
  22. package/Release/ReleaseClient.js +7 -1
  23. package/Release/ReleaseClient.min.js +1 -1
  24. package/ServiceEndpoint/ServiceEndpoint.d.ts +1 -1
  25. package/ServiceEndpoint/ServiceEndpointClient.d.ts +7 -0
  26. package/ServiceEndpoint/ServiceEndpointClient.js +22 -0
  27. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
  28. package/TaskAgent/TaskAgent.d.ts +13 -0
  29. package/TaskAgent/TaskAgentClient.js +4 -4
  30. package/TaskAgent/TaskAgentClient.min.js +1 -1
  31. package/TestPlan/TestPlan.d.ts +31 -4
  32. package/Tfvc/Tfvc.d.ts +4 -0
  33. package/WebApi/WebApi.d.ts +0 -13
  34. package/WebApi/WebApi.js +0 -15
  35. package/WebApi/WebApi.min.js +1 -1
  36. package/_manifest/spdx_2.2/ESRPClientLogs0703003127834.json +1 -0
  37. package/_manifest/spdx_2.2/bsi.cose +0 -0
  38. package/_manifest/spdx_2.2/bsi.json +1 -0
  39. package/_manifest/spdx_2.2/manifest.cat +0 -0
  40. package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
  41. package/_manifest/spdx_2.2/manifest.spdx.json +9799 -0
  42. package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -0
  43. package/package.json +1 -1
@@ -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 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 a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,u)}s((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){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,a])}}var i,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[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 i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getConnectionData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={connectOptions:e,lastChangeId:t,lastChangeId64:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ConnectionData",queryParams:i})]})})},t.prototype.getResourceArea=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={enterpriseName:t,organizationName:r,accessMapping:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",routeValues:{areaId:e},queryParams:n})]})})},t.prototype.getResourceAreaByHost=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={hostId:t,accessMapping:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",routeValues:{areaId:e},queryParams:i})]})})},t.prototype.getResourceAreas=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={enterpriseName:e,organizationName:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",queryParams:r})]})})},t.prototype.getResourceAreasByHost=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={hostId:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",queryParams:t})]})})},t.prototype.deleteServiceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"_apis/ServiceDefinitions/{serviceType}/{identifier}",routeValues:{serviceType:e,identifier:t}})]})})},t.prototype.getServiceDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={allowFaultIn:r,previewFaultIn:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ServiceDefinitions/{serviceType}/{identifier}",routeValues:{serviceType:e,identifier:t},queryParams:n})]})})},t.prototype.getServiceDefinitions=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/ServiceDefinitions/{serviceType}/{identifier}",routeValues:{serviceType:e}})]})})},t.prototype.updateServiceDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ServiceDefinitions/{serviceType}/{identifier}",body:e})]})})},t}(r.RestClientBase);t.LocationsRestClient=i});
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 a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,u)}s((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){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,a])}}var i,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[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 i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getConnectionData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={connectOptions:e,lastChangeId:t,lastChangeId64:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ConnectionData",queryParams:i})]})})},t.prototype.getResourceArea=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={enterpriseName:t,organizationName:r,accessMapping:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",routeValues:{areaId:e},queryParams:n})]})})},t.prototype.getResourceAreaByHost=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={hostId:t,accessMapping:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",routeValues:{areaId:e},queryParams:i})]})})},t.prototype.getResourceAreaByInstanceId=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={instanceId:t,accessMapping:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",routeValues:{areaId:e},queryParams:i})]})})},t.prototype.getResourceAreas=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={enterpriseName:e,organizationName:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",queryParams:r})]})})},t.prototype.getResourceAreasByHost=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={hostId:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ResourceAreas/{areaId}",queryParams:t})]})})},t.prototype.deleteServiceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"_apis/ServiceDefinitions/{serviceType}/{identifier}",routeValues:{serviceType:e,identifier:t}})]})})},t.prototype.getServiceDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={allowFaultIn:r,previewFaultIn:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ServiceDefinitions/{serviceType}/{identifier}",routeValues:{serviceType:e,identifier:t},queryParams:n})]})})},t.prototype.getServiceDefinitions=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/ServiceDefinitions/{serviceType}/{identifier}",routeValues:{serviceType:e}})]})})},t.prototype.updateServiceDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ServiceDefinitions/{serviceType}/{identifier}",body:e})]})})},t}(r.RestClientBase);t.LocationsRestClient=i});
@@ -143,55 +143,41 @@ export interface BilledCommittersList {
143
143
  */
144
144
  uniqueCommitterCount: number;
145
145
  }
146
- export interface CodeScanningFeatures {
146
+ export interface CodeSecurityFeatures {
147
147
  /**
148
148
  * CodeQL enablement status set to False when disabled and True when enabled; Null is never explicitly set.
149
149
  */
150
150
  codeQLEnabled: boolean;
151
151
  /**
152
- * Dependabot enablement status set to False when disabled and True when enabled; Null is never explicitly set. \<br /\>When true, Dependabot will open PRs to support security updates for outdated dependencies. \<br /\>Setting Dependabot enablement state is only supported for repo enablement and not org or project enablement at this time.
153
- */
154
- dependabotEnabled: boolean;
155
- /**
156
- * Dependency Scanning Injection enablement status set to False when disabled and True when enabled; Null is never explicitly set. \<br /\> If Advanced Security is NOT already enabled, behavior will depend on if Advanced Security is to be enabled/disabled. DependencyScanningInjectionEnabled will not affect anything in this scenario. \<br /\> If Advanced Security is to be disabled, the value of DependencyScanningInjectionEnabled will have no effect. \<br /\> Setting Dependency Scanning enablement state is only supported for repo enablement and not org or project enablement at this time.
157
- */
158
- dependencyScanningInjectionEnabled: boolean;
159
- }
160
- export interface EnablementOnCreateSettings {
161
- /**
162
- * Automatically enable Code Scanning on newly created repositories.
163
- */
164
- enableCodeScanningOnCreate: boolean;
165
- /**
166
- * Automatically enable Secret Scanning on newly created repositories.
152
+ * The VSID of the last user who modified the enablement status of Code Security.
167
153
  */
168
- enableSecretScanningOnCreate: boolean;
169
- }
170
- export interface EnablementSettings {
154
+ codeSecurityChangedBy: string;
171
155
  /**
172
- * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
156
+ * Code Security enablement status set to False when disabled and True when enabled; Null is never explicitly set.
173
157
  */
174
- codeScanningEnabled: boolean;
158
+ codeSecurityEnabled: boolean;
175
159
  /**
176
- * Includes code scanning features that can be enabled.
160
+ * The last time the status of Code Security for this repository was updated
177
161
  */
178
- codeScanningFeatures: CodeScanningFeatures;
162
+ codeSecurityEnablementLastChangedDate: Date;
179
163
  /**
180
- * Auto enablement setting for newly created repositories.
164
+ * Dependabot enablement status set to False when disabled and True when enabled; Null is never explicitly set. \<br /\>When true, Dependabot will open PRs to support security updates for outdated dependencies. \<br /\>Setting Dependabot enablement state is only supported for repo enablement and not org or project enablement at this time.
181
165
  */
182
- enablementOnCreateSettings: EnablementOnCreateSettings;
166
+ dependabotEnabled: boolean;
183
167
  /**
184
- * A list of enablement statuses for repositories within the specified organization or project.
168
+ * Dependency Scanning Injection enablement status set to False when disabled and True when enabled; Null is never explicitly set. \<br /\> If Advanced Security is NOT already enabled, behavior will depend on if Advanced Security is to be enabled/disabled. DependencyScanningInjectionEnabled will not affect anything in this scenario. \<br /\> If Advanced Security is to be disabled, the value of DependencyScanningInjectionEnabled will have no effect. \<br /\> Setting Dependency Scanning enablement state is only supported for repo enablement and not org or project enablement at this time.
185
169
  */
186
- reposEnablementStatus: RepoEnablementSettings[];
170
+ dependencyScanningInjectionEnabled: boolean;
171
+ }
172
+ export interface EnablementOnCreateSettings {
187
173
  /**
188
- * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
174
+ * Automatically enable Code Security on newly created repositories.
189
175
  */
190
- secretScanningEnabled: boolean;
176
+ enableCodeSecurityOnCreate: boolean;
191
177
  /**
192
- * Includes secret scanning features that can be enabled.
178
+ * Automatically enable Secret Protection on newly created repositories.
193
179
  */
194
- secretScanningFeatures: SecretScanningFeatures;
180
+ enableSecretProtectionOnCreate: boolean;
195
181
  }
196
182
  /**
197
183
  * Information related to billing for Advanced Security services
@@ -214,6 +200,10 @@ export interface MeterUsage {
214
200
  * The date this billing information pertains to
215
201
  */
216
202
  billingDate: Date;
203
+ /**
204
+ * A list of BilledCommitter objects that contain the identityRef of committers that have Code Security Plan enabled. This list is populated only for organizations that can enable or disable the Code Security Plan.
205
+ */
206
+ codeSecurityBilledUsers: BilledCommitter[];
217
207
  /**
218
208
  * True when a bill is generated for Advanced Security feature usage in this organziation
219
209
  */
@@ -222,6 +212,10 @@ export interface MeterUsage {
222
212
  * True when Advanced Security features are enabled in this organization
223
213
  */
224
214
  isAdvSecEnabled: boolean;
215
+ /**
216
+ * A list of BilledCommitter objects that contain the identityRef of committers that have Secret Protection Plan enabled. This list is populated only for organizations that can enable or disable the Secret Protection Plan.
217
+ */
218
+ secretProtectionBilledUsers: BilledCommitter[];
225
219
  /**
226
220
  * The Azure subscription
227
221
  */
@@ -232,17 +226,17 @@ export interface MeterUsage {
232
226
  uniqueCommitterCount: number;
233
227
  }
234
228
  /**
235
- * Information related to meter usage estimate for Code Scanning and Secret Scanning
229
+ * Information related to meter usage estimate for Code Security plan and/or Secret Protection plan
236
230
  */
237
231
  export interface MeterUsageEstimate {
238
232
  /**
239
- * Meter usage estimate when enabling Code Scanning
233
+ * Meter usage estimate when enabling Code Security plan
240
234
  */
241
- codeScanningMeterUsageEstimate: BilledCommittersList;
235
+ codeSecurityMeterUsageEstimate: BilledCommittersList;
242
236
  /**
243
- * Meter usage estimate when enabling Secret Scanning
237
+ * Meter usage estimate when enabling Secret Protection plan
244
238
  */
245
- secretScanningMeterUsageEstimate: BilledCommittersList;
239
+ secretProtectionMeterUsageEstimate: BilledCommittersList;
246
240
  }
247
241
  /**
248
242
  * Information related to meter usage for a Scanning plan
@@ -270,33 +264,65 @@ export interface MeterUsageForPlan {
270
264
  */
271
265
  tenantId: string;
272
266
  }
273
- export interface OrgEnablementSettings extends EnablementSettings {
267
+ export interface OrgEnablementSettings {
268
+ /**
269
+ * Includes code security features that can be enabled.
270
+ */
271
+ codeSecurityFeatures: CodeSecurityFeatures;
272
+ /**
273
+ * Auto enablement setting for newly created repositories.
274
+ */
275
+ enablementOnCreateSettings: EnablementOnCreateSettings;
276
+ /**
277
+ * A list of enablement statuses for repositories within the specified organization or project.
278
+ */
279
+ reposEnablementStatus: RepoEnablementSettings[];
280
+ /**
281
+ * Includes secret protection features that can be enabled.
282
+ */
283
+ secretProtectionFeatures: SecretProtectionFeatures;
274
284
  }
275
285
  export declare enum Plan {
286
+ /**
287
+ * No plan is indicated
288
+ */
289
+ None = 0,
276
290
  /**
277
291
  * The Code Security plan
278
292
  */
279
- CodeSecurity = 0,
293
+ CodeSecurity = 1,
280
294
  /**
281
295
  * The Secret Protection plan
282
296
  */
283
- SecretProtection = 1
284
- }
285
- export interface ProjectEnablementSettings extends EnablementSettings {
297
+ SecretProtection = 2,
298
+ /**
299
+ * Include all plans
300
+ */
301
+ All = 3
286
302
  }
287
- export interface RepoEnablementSettings {
303
+ export interface ProjectEnablementSettings {
288
304
  /**
289
- * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
305
+ * Includes code security features that can be enabled.
290
306
  */
291
- codeScanningEnabled: boolean;
307
+ codeSecurityFeatures: CodeSecurityFeatures;
292
308
  /**
293
- * The last time the status of Code Scanning for this repository was updated
309
+ * Auto enablement setting for newly created repositories.
294
310
  */
295
- codeScanningEnablementLastChangedDate: Date;
311
+ enablementOnCreateSettings: EnablementOnCreateSettings;
296
312
  /**
297
- * Includes code scanning features that can be enabled.
313
+ * A list of enablement statuses for repositories within the specified organization or project.
298
314
  */
299
- codeScanningFeatures: CodeScanningFeatures;
315
+ reposEnablementStatus: RepoEnablementSettings[];
316
+ /**
317
+ * Includes secret protection features that can be enabled.
318
+ */
319
+ secretProtectionFeatures: SecretProtectionFeatures;
320
+ }
321
+ export interface RepoEnablementSettings {
322
+ /**
323
+ * Includes Code Security features that can be enabled.
324
+ */
325
+ codeSecurityFeatures: CodeSecurityFeatures;
300
326
  /**
301
327
  * Indicates whether the repository is part of the bundled SKU (old billing plan) or unbundled SKUs (new billing plan).
302
328
  */
@@ -310,25 +336,25 @@ export interface RepoEnablementSettings {
310
336
  */
311
337
  repositoryId: string;
312
338
  /**
313
- * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
339
+ * Includes Secret Protection features that can be enabled.
314
340
  */
315
- secretScanningEnabled: boolean;
341
+ secretProtectionFeatures: SecretProtectionFeatures;
342
+ }
343
+ export interface SecretProtectionFeatures {
316
344
  /**
317
- * The last time the status of Secret Scanning for this repository was updated
345
+ * When true, pushes containing secrets will be blocked. \<br /\>When false, pushes are scanned for secrets and are not blocked. \<br /\>If includeAllProperties in the request is false, this value will be null.
318
346
  */
319
- secretScanningEnablementLastChangedDate: Date;
347
+ blockPushes: boolean;
320
348
  /**
321
- * Includes secret scanning features that can be enabled.
349
+ * The VSID of the last user who modified the enablement status of Secret Protection.
322
350
  */
323
- secretScanningFeatures: SecretScanningFeatures;
324
- }
325
- export interface SecretScanningFeatures {
351
+ secretProtectionChangedBy: string;
326
352
  /**
327
- * When true, pushes containing secrets will be blocked. \<br /\>When false, pushes are scanned for secrets and are not blocked. \<br /\>If includeAllProperties in the request is false, this value will be null.
353
+ * Secret Protection enablement status set to False when disabled and True when enabled; Null is never explicitly set.
328
354
  */
329
- blockPushes: boolean;
355
+ secretProtectionEnabled: boolean;
330
356
  /**
331
- * ForceRepoSecretScanning will be set to true when Enabled, false when Disabled, and null when not set. \<br /\> If GHAzDO is NOT already enabled, behavior will depend on if GHAzDO is to be enabled/disabled. ForceRepoSecretScanning will not affect anything in this scenario. \<br /\> If GHAzDO is to be disabled, the value of ForceRepoSecretScan will have no effect. \<br /\> If GHAzDO is to be enabled for the first time on a repo, then ForceRepoSecretScanning will have no effect. \<br /\> If GHAzDO is to be enabled and the repo is already enabled, then ForceRepoSecretScanning will force the secret scanning job to be run if it is set to true. \<br /\> In all cases where ForceRepoSecretScanning is not expected to affect behavior, it will be set to false before being sent to Tfs.
357
+ * The last time the status of Secret Protection for this repository was updated
332
358
  */
333
- forceRepoSecretScanning: boolean;
359
+ secretProtectionEnablementLastChangedDate: Date;
334
360
  }
@@ -8,13 +8,21 @@ define(["require", "exports"], function (require, exports) {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  var Plan;
10
10
  (function (Plan) {
11
+ /**
12
+ * No plan is indicated
13
+ */
14
+ Plan[Plan["None"] = 0] = "None";
11
15
  /**
12
16
  * The Code Security plan
13
17
  */
14
- Plan[Plan["CodeSecurity"] = 0] = "CodeSecurity";
18
+ Plan[Plan["CodeSecurity"] = 1] = "CodeSecurity";
15
19
  /**
16
20
  * The Secret Protection plan
17
21
  */
18
- Plan[Plan["SecretProtection"] = 1] = "SecretProtection";
22
+ Plan[Plan["SecretProtection"] = 2] = "SecretProtection";
23
+ /**
24
+ * Include all plans
25
+ */
26
+ Plan[Plan["All"] = 3] = "All";
19
27
  })(Plan = exports.Plan || (exports.Plan = {}));
20
28
  });
@@ -1 +1 @@
1
- define(["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.CodeSecurity=0]="CodeSecurity",e[e.SecretProtection=1]="SecretProtection"}(t.Plan||(t.Plan={}))});
1
+ define(["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.CodeSecurity=1]="CodeSecurity",e[e.SecretProtection=2]="SecretProtection",e[e.All=3]="All"}(t.Plan||(t.Plan={}))});
@@ -4,7 +4,7 @@ import * as Management from "../Management/Management";
4
4
  export declare class ManagementRestClient extends RestClientBase {
5
5
  constructor(options: IVssRestClientOptions);
6
6
  /**
7
- * Determine if Advanced Security is enabled for a repository
7
+ * Determines if Code Security, Secret Protection, and their features are enabled for the repository.
8
8
  *
9
9
  * @param project - Project ID or project name
10
10
  * @param repository - The name or ID of the repository
@@ -12,7 +12,7 @@ export declare class ManagementRestClient extends RestClientBase {
12
12
  */
13
13
  getRepoEnablementStatus2(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.RepoEnablementSettings>;
14
14
  /**
15
- * Update the enablement of Advanced Security for a repository
15
+ * Update the enablement status of Code Security and Secret Protection, along with their respective features, for a given repository.
16
16
  *
17
17
  * @param savedAdvSecEnablementStatus - new status
18
18
  * @param project - Project ID or project name
@@ -86,9 +86,9 @@ export declare class ManagementRestClient extends RestClientBase {
86
86
  /**
87
87
  * Update the status of Advanced Security for the organization
88
88
  *
89
- * @param savedAdvSecEnablementStatus - The new status
89
+ * @param orgEnablementSettings - The new status
90
90
  */
91
- updateOrgEnablementStatus2(savedAdvSecEnablementStatus: Management.OrgEnablementSettings): Promise<void>;
91
+ updateOrgEnablementStatus2(orgEnablementSettings: Management.OrgEnablementSettings): Promise<void>;
92
92
  /**
93
93
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
94
94
  *
@@ -102,13 +102,9 @@ export declare class ManagementRestClient extends RestClientBase {
102
102
  /**
103
103
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
104
104
  *
105
+ * @param plan - The plan to query.
105
106
  */
106
- getEstimatedBillablePushersDetailsForOrg2(): Promise<Management.MeterUsageEstimate>;
107
- /**
108
- * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.
109
- *
110
- */
111
- getEstimatedOrgBillablePushers2(): Promise<string[]>;
107
+ getEstimatedBillablePushersDetailsForOrg2(plan: Management.Plan): Promise<Management.MeterUsageEstimate>;
112
108
  /**
113
109
  * Get the current status of Advanced Security for a project
114
110
  *
@@ -133,10 +129,10 @@ export declare class ManagementRestClient extends RestClientBase {
133
129
  /**
134
130
  * Update the status of Advanced Security for the project
135
131
  *
136
- * @param savedAdvSecEnablementStatus - The new status
132
+ * @param projectEnablementSettings - The new status
137
133
  * @param project - Project ID or project name
138
134
  */
139
- updateProjectEnablementStatus2(savedAdvSecEnablementStatus: Management.ProjectEnablementSettings, project: string): Promise<void>;
135
+ updateProjectEnablementStatus2(projectEnablementSettings: Management.ProjectEnablementSettings, project: string): Promise<void>;
140
136
  /**
141
137
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
142
138
  *
@@ -148,19 +144,14 @@ export declare class ManagementRestClient extends RestClientBase {
148
144
  *
149
145
  * @param project - Project ID or project name
150
146
  */
151
- getEstimatedProjectBillablePushers(project: string): Promise<string[]>;
147
+ getEstimatedBillablePushersForProject(project: string): Promise<string[]>;
152
148
  /**
153
149
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
154
150
  *
155
151
  * @param project - Project ID or project name
152
+ * @param plan -
156
153
  */
157
- getEstimatedBillablePushersDetailsForProject2(project: string): Promise<Management.MeterUsageEstimate>;
158
- /**
159
- * Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.
160
- *
161
- * @param project - Project ID or project name
162
- */
163
- getEstimatedProjectBillablePushers2(project: string): Promise<string[]>;
154
+ getEstimatedBillablePushersDetailsForProject2(project: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
164
155
  /**
165
156
  * Determine if Advanced Security is enabled for a repository
166
157
  *
@@ -181,28 +172,22 @@ export declare class ManagementRestClient extends RestClientBase {
181
172
  * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
182
173
  *
183
174
  * @param project - Project ID or project name
184
- * @param repository - The name or ID of the repository
185
- */
186
- getEstimatedRepoBillableCommitters(project: string, repository: string): Promise<string[]>;
187
- /**
188
- * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
189
- *
190
- * @param project - Project ID or project name
191
175
  * @param repository -
192
176
  */
193
- getEstimatedRepoBillablePushersDetails(project: string, repository: string): Promise<Management.BilledCommitter[]>;
177
+ getEstimatedBillableCommitersDetailsForRepo(project: string, repository: string): Promise<Management.BilledCommitter[]>;
194
178
  /**
195
179
  * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
196
180
  *
197
181
  * @param project - Project ID or project name
198
182
  * @param repository - The name or ID of the repository
199
183
  */
200
- getEstimatedRepoBillableCommitters2(project: string, repository: string): Promise<string[]>;
184
+ getEstimatedBillableCommittersForRepo(project: string, repository: string): Promise<string[]>;
201
185
  /**
202
186
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
203
187
  *
204
188
  * @param project - Project ID or project name
205
- * @param repository -
189
+ * @param repository - The name or ID of the repository
190
+ * @param plan - The plan to query.
206
191
  */
207
- getEstimatedRepoBillableCommittersDetails2(project: string, repository: string): Promise<Management.MeterUsageEstimate>;
192
+ getEstimatedRepoBillableCommittersDetails2(project: string, repository: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
208
193
  }
@@ -57,7 +57,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
57
57
  return _super.call(this, options) || this;
58
58
  }
59
59
  /**
60
- * Determine if Advanced Security is enabled for a repository
60
+ * Determines if Code Security, Secret Protection, and their features are enabled for the repository.
61
61
  *
62
62
  * @param project - Project ID or project name
63
63
  * @param repository - The name or ID of the repository
@@ -83,7 +83,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
83
83
  });
84
84
  };
85
85
  /**
86
- * Update the enablement of Advanced Security for a repository
86
+ * Update the enablement status of Code Security and Secret Protection, along with their respective features, for a given repository.
87
87
  *
88
88
  * @param savedAdvSecEnablementStatus - new status
89
89
  * @param project - Project ID or project name
@@ -343,16 +343,16 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
343
343
  /**
344
344
  * Update the status of Advanced Security for the organization
345
345
  *
346
- * @param savedAdvSecEnablementStatus - The new status
346
+ * @param orgEnablementSettings - The new status
347
347
  */
348
- ManagementRestClient.prototype.updateOrgEnablementStatus2 = function (savedAdvSecEnablementStatus) {
348
+ ManagementRestClient.prototype.updateOrgEnablementStatus2 = function (orgEnablementSettings) {
349
349
  return __awaiter(this, void 0, void 0, function () {
350
350
  return __generator(this, function (_a) {
351
351
  return [2 /*return*/, this.beginRequest({
352
352
  apiVersion: "7.2-preview.1",
353
353
  method: "PATCH",
354
354
  routeTemplate: "_apis/Management/enablement2",
355
- body: savedAdvSecEnablementStatus
355
+ body: orgEnablementSettings
356
356
  })];
357
357
  });
358
358
  });
@@ -394,33 +394,22 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
394
394
  /**
395
395
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
396
396
  *
397
+ * @param plan - The plan to query.
397
398
  */
398
- ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForOrg2 = function () {
399
- return __awaiter(this, void 0, void 0, function () {
400
- return __generator(this, function (_a) {
401
- return [2 /*return*/, this.beginRequest({
402
- apiVersion: "7.2-preview.1",
403
- routeTemplate: "_apis/Management/meterUsageEstimate2/{action}",
404
- routeValues: {
405
- action: "Details"
406
- }
407
- })];
408
- });
409
- });
410
- };
411
- /**
412
- * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.
413
- *
414
- */
415
- ManagementRestClient.prototype.getEstimatedOrgBillablePushers2 = function () {
399
+ ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForOrg2 = function (plan) {
416
400
  return __awaiter(this, void 0, void 0, function () {
401
+ var queryValues;
417
402
  return __generator(this, function (_a) {
403
+ queryValues = {
404
+ plan: plan
405
+ };
418
406
  return [2 /*return*/, this.beginRequest({
419
407
  apiVersion: "7.2-preview.1",
420
408
  routeTemplate: "_apis/Management/meterUsageEstimate2/{action}",
421
409
  routeValues: {
422
410
  action: "Default"
423
- }
411
+ },
412
+ queryParams: queryValues
424
413
  })];
425
414
  });
426
415
  });
@@ -497,10 +486,10 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
497
486
  /**
498
487
  * Update the status of Advanced Security for the project
499
488
  *
500
- * @param savedAdvSecEnablementStatus - The new status
489
+ * @param projectEnablementSettings - The new status
501
490
  * @param project - Project ID or project name
502
491
  */
503
- ManagementRestClient.prototype.updateProjectEnablementStatus2 = function (savedAdvSecEnablementStatus, project) {
492
+ ManagementRestClient.prototype.updateProjectEnablementStatus2 = function (projectEnablementSettings, project) {
504
493
  return __awaiter(this, void 0, void 0, function () {
505
494
  return __generator(this, function (_a) {
506
495
  return [2 /*return*/, this.beginRequest({
@@ -510,7 +499,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
510
499
  routeValues: {
511
500
  project: project
512
501
  },
513
- body: savedAdvSecEnablementStatus
502
+ body: projectEnablementSettings
514
503
  })];
515
504
  });
516
505
  });
@@ -539,7 +528,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
539
528
  *
540
529
  * @param project - Project ID or project name
541
530
  */
542
- ManagementRestClient.prototype.getEstimatedProjectBillablePushers = function (project) {
531
+ ManagementRestClient.prototype.getEstimatedBillablePushersForProject = function (project) {
543
532
  return __awaiter(this, void 0, void 0, function () {
544
533
  return __generator(this, function (_a) {
545
534
  return [2 /*return*/, this.beginRequest({
@@ -557,36 +546,23 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
557
546
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
558
547
  *
559
548
  * @param project - Project ID or project name
549
+ * @param plan -
560
550
  */
561
- ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForProject2 = function (project) {
562
- return __awaiter(this, void 0, void 0, function () {
563
- return __generator(this, function (_a) {
564
- return [2 /*return*/, this.beginRequest({
565
- apiVersion: "7.2-preview.1",
566
- routeTemplate: "{project}/_apis/Management/meterUsageEstimate2/{action}",
567
- routeValues: {
568
- project: project,
569
- action: "Details"
570
- }
571
- })];
572
- });
573
- });
574
- };
575
- /**
576
- * Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.
577
- *
578
- * @param project - Project ID or project name
579
- */
580
- ManagementRestClient.prototype.getEstimatedProjectBillablePushers2 = function (project) {
551
+ ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForProject2 = function (project, plan) {
581
552
  return __awaiter(this, void 0, void 0, function () {
553
+ var queryValues;
582
554
  return __generator(this, function (_a) {
555
+ queryValues = {
556
+ plan: plan
557
+ };
583
558
  return [2 /*return*/, this.beginRequest({
584
559
  apiVersion: "7.2-preview.1",
585
560
  routeTemplate: "{project}/_apis/Management/meterUsageEstimate2/{action}",
586
561
  routeValues: {
587
562
  project: project,
588
563
  action: "Default"
589
- }
564
+ },
565
+ queryParams: queryValues
590
566
  })];
591
567
  });
592
568
  });
@@ -644,30 +620,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
644
620
  * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
645
621
  *
646
622
  * @param project - Project ID or project name
647
- * @param repository - The name or ID of the repository
648
- */
649
- ManagementRestClient.prototype.getEstimatedRepoBillableCommitters = function (project, repository) {
650
- return __awaiter(this, void 0, void 0, function () {
651
- return __generator(this, function (_a) {
652
- return [2 /*return*/, this.beginRequest({
653
- apiVersion: "7.2-preview.1",
654
- routeTemplate: "{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",
655
- routeValues: {
656
- project: project,
657
- repository: repository,
658
- action: "Default"
659
- }
660
- })];
661
- });
662
- });
663
- };
664
- /**
665
- * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
666
- *
667
- * @param project - Project ID or project name
668
623
  * @param repository -
669
624
  */
670
- ManagementRestClient.prototype.getEstimatedRepoBillablePushersDetails = function (project, repository) {
625
+ ManagementRestClient.prototype.getEstimatedBillableCommitersDetailsForRepo = function (project, repository) {
671
626
  return __awaiter(this, void 0, void 0, function () {
672
627
  return __generator(this, function (_a) {
673
628
  return [2 /*return*/, this.beginRequest({
@@ -688,12 +643,12 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
688
643
  * @param project - Project ID or project name
689
644
  * @param repository - The name or ID of the repository
690
645
  */
691
- ManagementRestClient.prototype.getEstimatedRepoBillableCommitters2 = function (project, repository) {
646
+ ManagementRestClient.prototype.getEstimatedBillableCommittersForRepo = function (project, repository) {
692
647
  return __awaiter(this, void 0, void 0, function () {
693
648
  return __generator(this, function (_a) {
694
649
  return [2 /*return*/, this.beginRequest({
695
650
  apiVersion: "7.2-preview.1",
696
- routeTemplate: "{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",
651
+ routeTemplate: "{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",
697
652
  routeValues: {
698
653
  project: project,
699
654
  repository: repository,
@@ -707,19 +662,25 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
707
662
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
708
663
  *
709
664
  * @param project - Project ID or project name
710
- * @param repository -
665
+ * @param repository - The name or ID of the repository
666
+ * @param plan - The plan to query.
711
667
  */
712
- ManagementRestClient.prototype.getEstimatedRepoBillableCommittersDetails2 = function (project, repository) {
668
+ ManagementRestClient.prototype.getEstimatedRepoBillableCommittersDetails2 = function (project, repository, plan) {
713
669
  return __awaiter(this, void 0, void 0, function () {
670
+ var queryValues;
714
671
  return __generator(this, function (_a) {
672
+ queryValues = {
673
+ plan: plan
674
+ };
715
675
  return [2 /*return*/, this.beginRequest({
716
676
  apiVersion: "7.2-preview.1",
717
677
  routeTemplate: "{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",
718
678
  routeValues: {
719
679
  project: project,
720
680
  repository: repository,
721
- action: "Details"
722
- }
681
+ action: "Default"
682
+ },
683
+ queryParams: queryValues
723
684
  })];
724
685
  });
725
686
  });