azure-devops-extension-api 4.254.0 → 4.256.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.
Files changed (45) 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 +76 -153
  13. package/Management/Management.js +10 -2
  14. package/Management/Management.min.js +1 -1
  15. package/Management/ManagementClient.d.ts +20 -134
  16. package/Management/ManagementClient.js +54 -419
  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 +18 -1
  29. package/TaskAgent/TaskAgent.js +1 -0
  30. package/TaskAgent/TaskAgent.min.js +1 -1
  31. package/TaskAgent/TaskAgentClient.js +4 -4
  32. package/TaskAgent/TaskAgentClient.min.js +1 -1
  33. package/TestPlan/TestPlan.d.ts +41 -6
  34. package/Tfvc/Tfvc.d.ts +4 -0
  35. package/WebApi/WebApi.d.ts +0 -13
  36. package/WebApi/WebApi.js +0 -15
  37. package/WebApi/WebApi.min.js +1 -1
  38. package/_manifest/spdx_2.2/ESRPClientLogs0712000053233.json +1 -0
  39. package/_manifest/spdx_2.2/bsi.cose +0 -0
  40. package/_manifest/spdx_2.2/bsi.json +1 -0
  41. package/_manifest/spdx_2.2/manifest.cat +0 -0
  42. package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
  43. package/_manifest/spdx_2.2/manifest.spdx.json +9799 -0
  44. package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -0
  45. 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});
@@ -1,61 +1,4 @@
1
1
  import * as WebApi from "../WebApi/WebApi";
2
- export interface AdvSecEnablementFeatures {
3
- /**
4
- * Auto enablement of AdvSec for new projects or repos will be enabled when set to true and will be unchanged when set to false.
5
- */
6
- autoEnableNewProjectOrRepos: boolean;
7
- /**
8
- * CodeQL enablement status set to False when disabled and True when enabled; Null is never explicitly set.
9
- */
10
- codeQLEnabled: boolean;
11
- /**
12
- * 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.
13
- */
14
- dependabotEnabled: boolean;
15
- /**
16
- * 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.
17
- */
18
- dependencyScanningInjectionEnabled: boolean;
19
- /**
20
- * 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.
21
- */
22
- forceRepoSecretScanning: boolean;
23
- }
24
- export interface AdvSecEnablementSettings {
25
- /**
26
- * Automatically enable Advanced Security on newly created repositories.
27
- */
28
- enableOnCreate: boolean;
29
- reposEnablementStatus: AdvSecEnablementStatus[];
30
- }
31
- export interface AdvSecEnablementSettingsUpdate extends AdvSecEnablementStatusUpdate {
32
- /**
33
- * Automatically enable Advanced Security on newly created repositories.
34
- */
35
- enableOnCreate: boolean;
36
- }
37
- export interface AdvSecEnablementStatus extends AdvSecEnablementStatusUpdate {
38
- /**
39
- * The last time the status of Advanced Security for this repository was updated
40
- */
41
- advSecEnablementLastChangedDate: Date;
42
- projectId: string;
43
- repositoryId: string;
44
- }
45
- export interface AdvSecEnablementStatusUpdate {
46
- /**
47
- * Advanced Security enablement status set to False when disabled and True when enabled; Null is never explicitly set.
48
- */
49
- advSecEnabled: boolean;
50
- /**
51
- * Includes additional features that can be enabled alongside Advanced Security.
52
- */
53
- advSecEnablementFeatures: AdvSecEnablementFeatures;
54
- /**
55
- * 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.
56
- */
57
- blockPushes: boolean;
58
- }
59
2
  /**
60
3
  * Billable Committers Details for Advanced Security Services
61
4
  */
@@ -143,11 +86,23 @@ export interface BilledCommittersList {
143
86
  */
144
87
  uniqueCommitterCount: number;
145
88
  }
146
- export interface CodeScanningFeatures {
89
+ export interface CodeSecurityFeatures {
147
90
  /**
148
91
  * CodeQL enablement status set to False when disabled and True when enabled; Null is never explicitly set.
149
92
  */
150
93
  codeQLEnabled: boolean;
94
+ /**
95
+ * The VSID of the last user who modified the enablement status of Code Security.
96
+ */
97
+ codeSecurityChangedBy: string;
98
+ /**
99
+ * Code Security enablement status set to False when disabled and True when enabled; Null is never explicitly set.
100
+ */
101
+ codeSecurityEnabled: boolean;
102
+ /**
103
+ * The last time the status of Code Security for this repository was updated
104
+ */
105
+ codeSecurityEnablementLastChangedDate: Date;
151
106
  /**
152
107
  * 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
108
  */
@@ -159,144 +114,112 @@ export interface CodeScanningFeatures {
159
114
  }
160
115
  export interface EnablementOnCreateSettings {
161
116
  /**
162
- * Automatically enable Code Scanning on newly created repositories.
117
+ * Automatically enable Code Security on newly created repositories.
163
118
  */
164
- enableCodeScanningOnCreate: boolean;
119
+ enableCodeSecurityOnCreate: boolean;
165
120
  /**
166
- * Automatically enable Secret Scanning on newly created repositories.
121
+ * Automatically enable Secret Protection on newly created repositories.
167
122
  */
168
- enableSecretScanningOnCreate: boolean;
123
+ enableSecretProtectionOnCreate: boolean;
169
124
  }
170
- export interface EnablementSettings {
171
- /**
172
- * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
173
- */
174
- codeScanningEnabled: boolean;
175
- /**
176
- * Includes code scanning features that can be enabled.
177
- */
178
- codeScanningFeatures: CodeScanningFeatures;
179
- /**
180
- * Auto enablement setting for newly created repositories.
181
- */
182
- enablementOnCreateSettings: EnablementOnCreateSettings;
183
- /**
184
- * A list of enablement statuses for repositories within the specified organization or project.
185
- */
186
- reposEnablementStatus: RepoEnablementSettings[];
125
+ /**
126
+ * Information related to meter usage estimate for Code Security plan and/or Secret Protection plan
127
+ */
128
+ export interface MeterUsageEstimate {
187
129
  /**
188
- * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
130
+ * Meter usage estimate when enabling Code Security plan
189
131
  */
190
- secretScanningEnabled: boolean;
132
+ codeSecurityMeterUsageEstimate: BilledCommittersList;
191
133
  /**
192
- * Includes secret scanning features that can be enabled.
134
+ * Meter usage estimate when enabling Secret Protection plan
193
135
  */
194
- secretScanningFeatures: SecretScanningFeatures;
136
+ secretProtectionMeterUsageEstimate: BilledCommittersList;
195
137
  }
196
138
  /**
197
- * Information related to billing for Advanced Security services
139
+ * Information related to meter usage for a Scanning plan
198
140
  */
199
- export interface MeterUsage {
141
+ export interface MeterUsageForPlan {
200
142
  /**
201
143
  * The Azure DevOps account
202
144
  */
203
145
  accountId: string;
204
146
  azureSubscriptionId: string;
205
147
  /**
206
- * Deprecated - use BilledCommittersIdentities instead A list of Cuids for the commiters to the repositories that have Advanced Security features enabled
207
- */
208
- billedCommitters: string[];
209
- /**
210
- * A list of BilledCommitter objects that contain the identityRef of committers that have AdvSec enabled
148
+ * The identityRef of committers that contributed to repositories with Scanning plan enabled
211
149
  */
212
- billedUsers: BilledCommitter[];
150
+ billedUsers: BilledCommittersList;
213
151
  /**
214
152
  * The date this billing information pertains to
215
153
  */
216
154
  billingDate: Date;
217
155
  /**
218
- * True when a bill is generated for Advanced Security feature usage in this organziation
219
- */
220
- isAdvSecBillable: boolean;
221
- /**
222
- * True when Advanced Security features are enabled in this organization
156
+ * True when the Scanning plan is enabled in this organization
223
157
  */
224
- isAdvSecEnabled: boolean;
158
+ isPlanEnabled: boolean;
225
159
  /**
226
160
  * The Azure subscription
227
161
  */
228
162
  tenantId: string;
163
+ }
164
+ export interface OrgEnablementSettings {
229
165
  /**
230
- * The number of commiters to repositories that have Advanced Security features enabled
166
+ * Includes code security features that can be enabled.
231
167
  */
232
- uniqueCommitterCount: number;
233
- }
234
- /**
235
- * Information related to meter usage estimate for Code Scanning and Secret Scanning
236
- */
237
- export interface MeterUsageEstimate {
168
+ codeSecurityFeatures: CodeSecurityFeatures;
238
169
  /**
239
- * Meter usage estimate when enabling Code Scanning
170
+ * Auto enablement setting for newly created repositories.
240
171
  */
241
- codeScanningMeterUsageEstimate: BilledCommittersList;
172
+ enablementOnCreateSettings: EnablementOnCreateSettings;
242
173
  /**
243
- * Meter usage estimate when enabling Secret Scanning
174
+ * A list of enablement statuses for repositories within the specified organization or project.
244
175
  */
245
- secretScanningMeterUsageEstimate: BilledCommittersList;
246
- }
247
- /**
248
- * Information related to meter usage for a Scanning plan
249
- */
250
- export interface MeterUsageForPlan {
176
+ reposEnablementStatus: RepoEnablementSettings[];
251
177
  /**
252
- * The Azure DevOps account
178
+ * Includes secret protection features that can be enabled.
253
179
  */
254
- accountId: string;
255
- azureSubscriptionId: string;
180
+ secretProtectionFeatures: SecretProtectionFeatures;
181
+ }
182
+ export declare enum Plan {
256
183
  /**
257
- * The identityRef of committers that contributed to repositories with Scanning plan enabled
184
+ * No plan is indicated
258
185
  */
259
- billedUsers: BilledCommittersList;
186
+ None = 0,
260
187
  /**
261
- * The date this billing information pertains to
188
+ * The Code Security plan
262
189
  */
263
- billingDate: Date;
190
+ CodeSecurity = 1,
264
191
  /**
265
- * True when the Scanning plan is enabled in this organization
192
+ * The Secret Protection plan
266
193
  */
267
- isPlanEnabled: boolean;
194
+ SecretProtection = 2,
268
195
  /**
269
- * The Azure subscription
196
+ * Include all plans
270
197
  */
271
- tenantId: string;
198
+ All = 3
272
199
  }
273
- export interface OrgEnablementSettings extends EnablementSettings {
274
- }
275
- export declare enum Plan {
200
+ export interface ProjectEnablementSettings {
276
201
  /**
277
- * The Code Security plan
202
+ * Includes code security features that can be enabled.
278
203
  */
279
- CodeSecurity = 0,
204
+ codeSecurityFeatures: CodeSecurityFeatures;
280
205
  /**
281
- * The Secret Protection plan
206
+ * Auto enablement setting for newly created repositories.
282
207
  */
283
- SecretProtection = 1
284
- }
285
- export interface ProjectEnablementSettings extends EnablementSettings {
286
- }
287
- export interface RepoEnablementSettings {
208
+ enablementOnCreateSettings: EnablementOnCreateSettings;
288
209
  /**
289
- * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
210
+ * A list of enablement statuses for repositories within the specified organization or project.
290
211
  */
291
- codeScanningEnabled: boolean;
212
+ reposEnablementStatus: RepoEnablementSettings[];
292
213
  /**
293
- * The last time the status of Code Scanning for this repository was updated
214
+ * Includes secret protection features that can be enabled.
294
215
  */
295
- codeScanningEnablementLastChangedDate: Date;
216
+ secretProtectionFeatures: SecretProtectionFeatures;
217
+ }
218
+ export interface RepoEnablementSettings {
296
219
  /**
297
- * Includes code scanning features that can be enabled.
220
+ * Includes Code Security features that can be enabled.
298
221
  */
299
- codeScanningFeatures: CodeScanningFeatures;
222
+ codeSecurityFeatures: CodeSecurityFeatures;
300
223
  /**
301
224
  * Indicates whether the repository is part of the bundled SKU (old billing plan) or unbundled SKUs (new billing plan).
302
225
  */
@@ -310,25 +233,25 @@ export interface RepoEnablementSettings {
310
233
  */
311
234
  repositoryId: string;
312
235
  /**
313
- * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
236
+ * Includes Secret Protection features that can be enabled.
314
237
  */
315
- secretScanningEnabled: boolean;
238
+ secretProtectionFeatures: SecretProtectionFeatures;
239
+ }
240
+ export interface SecretProtectionFeatures {
316
241
  /**
317
- * The last time the status of Secret Scanning for this repository was updated
242
+ * 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
243
  */
319
- secretScanningEnablementLastChangedDate: Date;
244
+ blockPushes: boolean;
320
245
  /**
321
- * Includes secret scanning features that can be enabled.
246
+ * The VSID of the last user who modified the enablement status of Secret Protection.
322
247
  */
323
- secretScanningFeatures: SecretScanningFeatures;
324
- }
325
- export interface SecretScanningFeatures {
248
+ secretProtectionChangedBy: string;
326
249
  /**
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.
250
+ * Secret Protection enablement status set to False when disabled and True when enabled; Null is never explicitly set.
328
251
  */
329
- blockPushes: boolean;
252
+ secretProtectionEnabled: boolean;
330
253
  /**
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.
254
+ * The last time the status of Secret Protection for this repository was updated
332
255
  */
333
- forceRepoSecretScanning: boolean;
256
+ secretProtectionEnablementLastChangedDate: Date;
334
257
  }
@@ -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={}))});
@@ -3,206 +3,92 @@ import { RestClientBase } from "../Common/RestClientBase";
3
3
  import * as Management from "../Management/Management";
4
4
  export declare class ManagementRestClient extends RestClientBase {
5
5
  constructor(options: IVssRestClientOptions);
6
- /**
7
- * Determine if Advanced Security is enabled for a repository
8
- *
9
- * @param project - Project ID or project name
10
- * @param repository - The name or ID of the repository
11
- * @param includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected
12
- */
13
- getRepoEnablementStatus2(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.RepoEnablementSettings>;
14
- /**
15
- * Update the enablement of Advanced Security for a repository
16
- *
17
- * @param savedAdvSecEnablementStatus - new status
18
- * @param project - Project ID or project name
19
- * @param repository - Name or ID of the repository
20
- */
21
- updateRepoAdvSecEnablementStatus2(savedAdvSecEnablementStatus: Management.RepoEnablementSettings, project: string, repository: string): Promise<void>;
22
- /**
23
- * During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -\> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.
24
- *
25
- * @param meterUsage -
26
- */
27
- createBillingSnapshot(meterUsage: Management.MeterUsage): Promise<void>;
28
- /**
29
- * Get all billable committers details, including those not matched with a VSID.
30
- *
31
- * @param billingDate - The date to query, or if not provided, today
32
- */
33
- getBillableCommitterDetails(billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
34
- /**
35
- */
36
- getLastMeterUsage(): Promise<Management.MeterUsage>;
37
- /**
38
- * Get commiters used when calculating billing information.
39
- *
40
- * @param billingDate - The date to query, or if not provided, today
41
- */
42
- getMeterUsage(billingDate?: Date): Promise<Management.MeterUsage>;
43
6
  /**
44
7
  * During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -\> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.
45
8
  *
46
9
  * @param meterUsage -
47
10
  * @param plan -
48
11
  */
49
- createBillingSnapshot2(meterUsage: Management.MeterUsageForPlan, plan: Management.Plan): Promise<void>;
12
+ createBillingSnapshot3(meterUsage: Management.MeterUsageForPlan, plan: Management.Plan): Promise<void>;
50
13
  /**
51
14
  * Get all billable committers details, including those not matched with a VSID.
52
15
  *
53
16
  * @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
54
17
  * @param billingDate - The date to query, or if not provided, today
55
18
  */
56
- getBillableCommitterDetails2(plan: Management.Plan, billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
19
+ getBillableCommitterDetails3(plan: Management.Plan, billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
57
20
  /**
58
21
  * @param plan -
59
22
  */
60
- getLastMeterUsage2(plan: Management.Plan): Promise<Management.MeterUsageForPlan>;
23
+ getLastMeterUsage3(plan: Management.Plan): Promise<Management.MeterUsageForPlan>;
61
24
  /**
62
25
  * Get commiters used when calculating billing information.
63
26
  *
64
27
  * @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
65
28
  * @param billingDate - The date to query, or if not provided, today
66
29
  */
67
- getMeterUsage2(plan: Management.Plan, billingDate?: Date): Promise<Management.MeterUsageForPlan>;
68
- /**
69
- * Get the current status of Advanced Security for the organization
70
- *
71
- * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
72
- */
73
- getOrgEnablementStatus(includeAllProperties?: boolean): Promise<Management.AdvSecEnablementSettings>;
74
- /**
75
- * Update the status of Advanced Security for the organization
76
- *
77
- * @param savedAdvSecEnablementStatus - The new status
78
- */
79
- updateOrgEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate): Promise<void>;
30
+ getMeterUsage3(plan: Management.Plan, billingDate?: Date): Promise<Management.MeterUsageForPlan>;
80
31
  /**
81
32
  * Get the current status of Advanced Security for the organization
82
33
  *
83
34
  * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
84
35
  */
85
- getOrgEnablementStatus2(includeAllProperties?: boolean): Promise<Management.OrgEnablementSettings>;
36
+ getOrgEnablementStatus3(includeAllProperties?: boolean): Promise<Management.OrgEnablementSettings>;
86
37
  /**
87
38
  * Update the status of Advanced Security for the organization
88
39
  *
89
- * @param savedAdvSecEnablementStatus - The new status
40
+ * @param orgEnablementSettings - The new status
90
41
  */
91
- updateOrgEnablementStatus2(savedAdvSecEnablementStatus: Management.OrgEnablementSettings): Promise<void>;
42
+ updateOrgEnablementStatus3(orgEnablementSettings: Management.OrgEnablementSettings): Promise<void>;
92
43
  /**
93
44
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
94
45
  *
46
+ * @param plan - The plan to query.
95
47
  */
96
- getEstimatedBillablePushersDetailsForOrg(): Promise<Management.BilledCommitter[]>;
97
- /**
98
- * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.
99
- *
100
- */
101
- getEstimatedOrgBillablePushers(): Promise<string[]>;
102
- /**
103
- * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
104
- *
105
- */
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[]>;
112
- /**
113
- * Get the current status of Advanced Security for a project
114
- *
115
- * @param project - Project ID or project name
116
- * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
117
- */
118
- getProjectEnablementStatus(project: string, includeAllProperties?: boolean): Promise<Management.AdvSecEnablementSettings>;
119
- /**
120
- * Update the status of Advanced Security for the project
121
- *
122
- * @param savedAdvSecEnablementStatus - The new status
123
- * @param project - Project ID or project name
124
- */
125
- updateProjectEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate, project: string): Promise<void>;
48
+ getEstimatedBillablePushersDetailsForOrg3(plan: Management.Plan): Promise<Management.MeterUsageEstimate>;
126
49
  /**
127
50
  * Get the current status of Advanced Security for a project
128
51
  *
129
52
  * @param project - Project ID or project name
130
53
  * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
131
54
  */
132
- getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
55
+ getProjectEnablementStatus3(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
133
56
  /**
134
57
  * Update the status of Advanced Security for the project
135
58
  *
136
- * @param savedAdvSecEnablementStatus - The new status
59
+ * @param projectEnablementSettings - The new status
137
60
  * @param project - Project ID or project name
138
61
  */
139
- updateProjectEnablementStatus2(savedAdvSecEnablementStatus: Management.ProjectEnablementSettings, project: string): Promise<void>;
62
+ updateProjectEnablementStatus3(projectEnablementSettings: Management.ProjectEnablementSettings, project: string): Promise<void>;
140
63
  /**
141
64
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
142
65
  *
143
66
  * @param project - Project ID or project name
67
+ * @param plan -
144
68
  */
145
- getEstimatedBillablePushersDetailsForProject(project: string): Promise<Management.BilledCommitter[]>;
146
- /**
147
- * Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.
148
- *
149
- * @param project - Project ID or project name
150
- */
151
- getEstimatedProjectBillablePushers(project: string): Promise<string[]>;
152
- /**
153
- * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
154
- *
155
- * @param project - Project ID or project name
156
- */
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[]>;
69
+ getEstimatedBillablePushersDetailsForProject3(project: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
164
70
  /**
165
- * Determine if Advanced Security is enabled for a repository
71
+ * Determines if Code Security, Secret Protection, and their features are enabled for the repository.
166
72
  *
167
73
  * @param project - Project ID or project name
168
74
  * @param repository - The name or ID of the repository
169
75
  * @param includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected
170
76
  */
171
- getRepoEnablementStatus(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.AdvSecEnablementStatus>;
77
+ getRepoEnablementStatus3(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.RepoEnablementSettings>;
172
78
  /**
173
- * Update the enablement of Advanced Security for a repository
79
+ * Update the enablement status of Code Security and Secret Protection, along with their respective features, for a given repository.
174
80
  *
175
81
  * @param savedAdvSecEnablementStatus - new status
176
82
  * @param project - Project ID or project name
177
83
  * @param repository - Name or ID of the repository
178
84
  */
179
- updateRepoAdvSecEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementStatusUpdate, project: string, repository: string): Promise<void>;
180
- /**
181
- * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
182
- *
183
- * @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[]>;
85
+ updateRepoAdvSecEnablementStatus3(savedAdvSecEnablementStatus: Management.RepoEnablementSettings, project: string, repository: string): Promise<void>;
187
86
  /**
188
87
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
189
88
  *
190
89
  * @param project - Project ID or project name
191
- * @param repository -
192
- */
193
- getEstimatedRepoBillablePushersDetails(project: string, repository: string): Promise<Management.BilledCommitter[]>;
194
- /**
195
- * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
196
- *
197
- * @param project - Project ID or project name
198
90
  * @param repository - The name or ID of the repository
91
+ * @param plan - The plan to query.
199
92
  */
200
- getEstimatedRepoBillableCommitters2(project: string, repository: string): Promise<string[]>;
201
- /**
202
- * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
203
- *
204
- * @param project - Project ID or project name
205
- * @param repository -
206
- */
207
- getEstimatedRepoBillableCommittersDetails2(project: string, repository: string): Promise<Management.MeterUsageEstimate>;
93
+ getEstimatedBillableCommittersDetailsForRepo3(project: string, repository: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
208
94
  }