azure-devops-extension-api 4.251.0 → 4.253.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.
@@ -130,6 +130,46 @@ export interface BilledCommitter {
130
130
  */
131
131
  userIdentity: WebApi.IdentityRef;
132
132
  }
133
+ /**
134
+ * A list of billed committers
135
+ */
136
+ export interface BilledCommittersList {
137
+ /**
138
+ * A list of BilledCommitter objects that contain the identityRef of committers.
139
+ */
140
+ billedUsers: BilledCommitter[];
141
+ /**
142
+ * Count of billed committers in BilledUsers
143
+ */
144
+ uniqueCommitterCount: number;
145
+ }
146
+ export interface CodeScanningFeatures {
147
+ /**
148
+ * CodeQL enablement status set to False when disabled and True when enabled; Null is never explicitly set.
149
+ */
150
+ codeQLEnabled: boolean;
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
+ /**
161
+ * Information related to Code Scanning meter usage
162
+ */
163
+ export interface CodeScanningMeterUsage {
164
+ /**
165
+ * The identityRef of committers that contributed to repositories with Code Scanning enabled
166
+ */
167
+ codeScanningBilledUsers: BilledCommittersList;
168
+ /**
169
+ * True when Code Scanning plan is enabled in this organization
170
+ */
171
+ isCodeScanningEnabled: boolean;
172
+ }
133
173
  /**
134
174
  * Information related to billing for Advanced Security services
135
175
  */
@@ -168,3 +208,163 @@ export interface MeterUsage {
168
208
  */
169
209
  uniqueCommitterCount: number;
170
210
  }
211
+ /**
212
+ * Information related to meter usage estimate for Code Scanning and Secret Scanning
213
+ */
214
+ export interface MeterUsageEstimate {
215
+ /**
216
+ * Meter usage estimate when enabling Code Scanning
217
+ */
218
+ codeScanningMeterUsageEstimate: BilledCommittersList;
219
+ /**
220
+ * Meter usage estimate when enabling Secret Scanning
221
+ */
222
+ secretScanningMeterUsageEstimate: BilledCommittersList;
223
+ }
224
+ /**
225
+ * Information related to billing for Advanced Security services
226
+ */
227
+ export interface MeterUsageSummary {
228
+ /**
229
+ * The Azure DevOps account
230
+ */
231
+ accountId: string;
232
+ azureSubscriptionId: string;
233
+ /**
234
+ * The date this billing information pertains to
235
+ */
236
+ billingDate: Date;
237
+ /**
238
+ * Billing Information of repositories where Code Scanning is enabled
239
+ */
240
+ codeScanningMeterUsage: CodeScanningMeterUsage;
241
+ /**
242
+ * Billing Information of repositories where Secret Scanning is enabled
243
+ */
244
+ secretScanningMeterUsage: SecretScanningMeterUsage;
245
+ /**
246
+ * The Azure subscription
247
+ */
248
+ tenantId: string;
249
+ }
250
+ export interface OrgEnablementSettings {
251
+ /**
252
+ * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
253
+ */
254
+ codeScanningEnabled: boolean;
255
+ /**
256
+ * Includes code scanning features that can be enabled.
257
+ */
258
+ codeScanningFeatures: CodeScanningFeatures;
259
+ /**
260
+ * Automatically enable Code Scanning on newly created repositories.
261
+ */
262
+ enableCodeScanningOnCreate: boolean;
263
+ /**
264
+ * Automatically enable Secret Scanning on newly created repositories.
265
+ */
266
+ enableSecretScanningOnCreate: boolean;
267
+ /**
268
+ * A list of enablement statuses for repositories within the specified organization.
269
+ */
270
+ reposEnablementStatus: RepoEnablementSettings[];
271
+ /**
272
+ * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
273
+ */
274
+ secretScanningEnabled: boolean;
275
+ /**
276
+ * Includes secret scanning features that can be enabled.
277
+ */
278
+ secretScanningFeatures: SecretScanningFeatures;
279
+ }
280
+ export interface ProjectEnablementSettings {
281
+ /**
282
+ * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
283
+ */
284
+ codeScanningEnabled: boolean;
285
+ /**
286
+ * Includes code scanning features that can be enabled.
287
+ */
288
+ codeScanningFeatures: CodeScanningFeatures;
289
+ /**
290
+ * Automatically enable Code Scanning on newly created repositories.
291
+ */
292
+ enableCodeScanningOnCreate: boolean;
293
+ /**
294
+ * Automatically enable Secret Scanning on newly created repositories.
295
+ */
296
+ enableSecretScanningOnCreate: boolean;
297
+ /**
298
+ * A list of enablement statuses for repositories within the specified project.
299
+ */
300
+ reposEnablementStatus: RepoEnablementSettings[];
301
+ /**
302
+ * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
303
+ */
304
+ secretScanningEnabled: boolean;
305
+ /**
306
+ * Includes secret scanning features that can be enabled.
307
+ */
308
+ secretScanningFeatures: SecretScanningFeatures;
309
+ }
310
+ export interface RepoEnablementSettings {
311
+ /**
312
+ * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
313
+ */
314
+ codeScanningEnabled: boolean;
315
+ /**
316
+ * The last time the status of Code Scanning for this repository was updated
317
+ */
318
+ codeScanningEnablementLastChangedDate: Date;
319
+ /**
320
+ * Includes code scanning features that can be enabled.
321
+ */
322
+ codeScanningFeatures: CodeScanningFeatures;
323
+ /**
324
+ * Indicates whether the repository is part of the bundled SKU (old billing plan) or unbundled SKUs (new billing plan).
325
+ */
326
+ isBundledSKU: boolean;
327
+ /**
328
+ * The project Id
329
+ */
330
+ projectId: string;
331
+ /**
332
+ * The repository Id
333
+ */
334
+ repositoryId: string;
335
+ /**
336
+ * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
337
+ */
338
+ secretScanningEnabled: boolean;
339
+ /**
340
+ * The last time the status of Secret Scanning for this repository was updated
341
+ */
342
+ secretScanningEnablementLastChangedDate: Date;
343
+ /**
344
+ * Includes secret scanning features that can be enabled.
345
+ */
346
+ secretScanningFeatures: SecretScanningFeatures;
347
+ }
348
+ export interface SecretScanningFeatures {
349
+ /**
350
+ * 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.
351
+ */
352
+ blockPushes: boolean;
353
+ /**
354
+ * 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.
355
+ */
356
+ forceRepoSecretScanning: boolean;
357
+ }
358
+ /**
359
+ * Information related to Secret Scanning meter usage
360
+ */
361
+ export interface SecretScanningMeterUsage {
362
+ /**
363
+ * True when Secret Scanning plan is enabled in this organization
364
+ */
365
+ isSecretScanningEnabled: boolean;
366
+ /**
367
+ * The identityRef of committers that contributed to repositories with Secret Scanning enabled
368
+ */
369
+ secretScanningBilledUsers: BilledCommittersList;
370
+ }
@@ -3,6 +3,22 @@ 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>;
6
22
  /**
7
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.
8
24
  *
@@ -24,6 +40,27 @@ export declare class ManagementRestClient extends RestClientBase {
24
40
  * @param billingDate - The date to query, or if not provided, today
25
41
  */
26
42
  getMeterUsage(billingDate?: Date): Promise<Management.MeterUsage>;
43
+ /**
44
+ * 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
+ *
46
+ * @param meterUsage -
47
+ */
48
+ createBillingSnapshot2(meterUsage: Management.MeterUsageSummary): Promise<void>;
49
+ /**
50
+ * Get all billable committers details, including those not matched with a VSID.
51
+ *
52
+ * @param billingDate - The date to query, or if not provided, today
53
+ */
54
+ getBillableCommitterDetails2(billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
55
+ /**
56
+ */
57
+ getLastMeterUsage2(): Promise<Management.MeterUsageSummary>;
58
+ /**
59
+ * Get commiters used when calculating billing information.
60
+ *
61
+ * @param billingDate - The date to query, or if not provided, today
62
+ */
63
+ getMeterUsage2(billingDate?: Date): Promise<Management.MeterUsageSummary>;
27
64
  /**
28
65
  * Get the current status of Advanced Security for the organization
29
66
  *
@@ -36,6 +73,18 @@ export declare class ManagementRestClient extends RestClientBase {
36
73
  * @param savedAdvSecEnablementStatus - The new status
37
74
  */
38
75
  updateOrgEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate): Promise<void>;
76
+ /**
77
+ * Get the current status of Advanced Security for the organization
78
+ *
79
+ * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
80
+ */
81
+ getOrgEnablementStatus2(includeAllProperties?: boolean): Promise<Management.OrgEnablementSettings>;
82
+ /**
83
+ * Update the status of Advanced Security for the organization
84
+ *
85
+ * @param savedAdvSecEnablementStatus - The new status
86
+ */
87
+ updateOrgEnablementStatus2(savedAdvSecEnablementStatus: Management.OrgEnablementSettings): Promise<void>;
39
88
  /**
40
89
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
41
90
  *
@@ -46,6 +95,16 @@ export declare class ManagementRestClient extends RestClientBase {
46
95
  *
47
96
  */
48
97
  getEstimatedOrgBillablePushers(): Promise<string[]>;
98
+ /**
99
+ * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
100
+ *
101
+ */
102
+ getEstimatedBillablePushersDetailsForOrg2(): Promise<Management.MeterUsageEstimate>;
103
+ /**
104
+ * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.
105
+ *
106
+ */
107
+ getEstimatedOrgBillablePushers2(): Promise<string[]>;
49
108
  /**
50
109
  * Get the current status of Advanced Security for a project
51
110
  *
@@ -60,6 +119,20 @@ export declare class ManagementRestClient extends RestClientBase {
60
119
  * @param project - Project ID or project name
61
120
  */
62
121
  updateProjectEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate, project: string): Promise<void>;
122
+ /**
123
+ * Get the current status of Advanced Security for a project
124
+ *
125
+ * @param project - Project ID or project name
126
+ * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
127
+ */
128
+ getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
129
+ /**
130
+ * Update the status of Advanced Security for the project
131
+ *
132
+ * @param savedAdvSecEnablementStatus - The new status
133
+ * @param project - Project ID or project name
134
+ */
135
+ updateProjectEnablementStatus2(savedAdvSecEnablementStatus: Management.ProjectEnablementSettings, project: string): Promise<void>;
63
136
  /**
64
137
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
65
138
  *
@@ -72,6 +145,18 @@ export declare class ManagementRestClient extends RestClientBase {
72
145
  * @param project - Project ID or project name
73
146
  */
74
147
  getEstimatedProjectBillablePushers(project: string): Promise<string[]>;
148
+ /**
149
+ * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
150
+ *
151
+ * @param project - Project ID or project name
152
+ */
153
+ getEstimatedBillablePushersDetailsForProject2(project: string): Promise<Management.MeterUsageEstimate>;
154
+ /**
155
+ * Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.
156
+ *
157
+ * @param project - Project ID or project name
158
+ */
159
+ getEstimatedProjectBillablePushers2(project: string): Promise<string[]>;
75
160
  /**
76
161
  * Determine if Advanced Security is enabled for a repository
77
162
  *
@@ -102,4 +187,18 @@ export declare class ManagementRestClient extends RestClientBase {
102
187
  * @param repository -
103
188
  */
104
189
  getEstimatedRepoBillablePushersDetails(project: string, repository: string): Promise<Management.BilledCommitter[]>;
190
+ /**
191
+ * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
192
+ *
193
+ * @param project - Project ID or project name
194
+ * @param repository - The name or ID of the repository
195
+ */
196
+ getEstimatedRepoBillableCommitters2(project: string, repository: string): Promise<string[]>;
197
+ /**
198
+ * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
199
+ *
200
+ * @param project - Project ID or project name
201
+ * @param repository -
202
+ */
203
+ getEstimatedRepoBillableCommittersDetails2(project: string, repository: string): Promise<Management.MeterUsageEstimate>;
105
204
  }