azure-devops-extension-api 4.252.0 → 4.254.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdvancedSecurity.Reporting/Reporting.d.ts +79 -0
- package/AdvancedSecurity.Reporting/Reporting.js +20 -0
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +5 -1
- package/AdvancedSecurity.Reporting/ReportingClient.js +23 -2
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
- package/Alert/Alert.d.ts +68 -11
- package/Alert/Alert.js +62 -10
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +9 -1
- package/Alert/AlertClient.js +22 -0
- package/Alert/AlertClient.min.js +1 -1
- package/Build/Build.d.ts +1 -1
- package/Management/Management.d.ts +164 -0
- package/Management/Management.js +11 -0
- package/Management/Management.min.js +1 -1
- package/Management/ManagementClient.d.ts +103 -0
- package/Management/ManagementClient.js +342 -0
- package/Management/ManagementClient.min.js +1 -1
- package/package.json +1 -1
|
@@ -130,6 +130,69 @@ 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
|
+
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.
|
|
167
|
+
*/
|
|
168
|
+
enableSecretScanningOnCreate: boolean;
|
|
169
|
+
}
|
|
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[];
|
|
187
|
+
/**
|
|
188
|
+
* Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
|
|
189
|
+
*/
|
|
190
|
+
secretScanningEnabled: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Includes secret scanning features that can be enabled.
|
|
193
|
+
*/
|
|
194
|
+
secretScanningFeatures: SecretScanningFeatures;
|
|
195
|
+
}
|
|
133
196
|
/**
|
|
134
197
|
* Information related to billing for Advanced Security services
|
|
135
198
|
*/
|
|
@@ -168,3 +231,104 @@ export interface MeterUsage {
|
|
|
168
231
|
*/
|
|
169
232
|
uniqueCommitterCount: number;
|
|
170
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Information related to meter usage estimate for Code Scanning and Secret Scanning
|
|
236
|
+
*/
|
|
237
|
+
export interface MeterUsageEstimate {
|
|
238
|
+
/**
|
|
239
|
+
* Meter usage estimate when enabling Code Scanning
|
|
240
|
+
*/
|
|
241
|
+
codeScanningMeterUsageEstimate: BilledCommittersList;
|
|
242
|
+
/**
|
|
243
|
+
* Meter usage estimate when enabling Secret Scanning
|
|
244
|
+
*/
|
|
245
|
+
secretScanningMeterUsageEstimate: BilledCommittersList;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Information related to meter usage for a Scanning plan
|
|
249
|
+
*/
|
|
250
|
+
export interface MeterUsageForPlan {
|
|
251
|
+
/**
|
|
252
|
+
* The Azure DevOps account
|
|
253
|
+
*/
|
|
254
|
+
accountId: string;
|
|
255
|
+
azureSubscriptionId: string;
|
|
256
|
+
/**
|
|
257
|
+
* The identityRef of committers that contributed to repositories with Scanning plan enabled
|
|
258
|
+
*/
|
|
259
|
+
billedUsers: BilledCommittersList;
|
|
260
|
+
/**
|
|
261
|
+
* The date this billing information pertains to
|
|
262
|
+
*/
|
|
263
|
+
billingDate: Date;
|
|
264
|
+
/**
|
|
265
|
+
* True when the Scanning plan is enabled in this organization
|
|
266
|
+
*/
|
|
267
|
+
isPlanEnabled: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* The Azure subscription
|
|
270
|
+
*/
|
|
271
|
+
tenantId: string;
|
|
272
|
+
}
|
|
273
|
+
export interface OrgEnablementSettings extends EnablementSettings {
|
|
274
|
+
}
|
|
275
|
+
export declare enum Plan {
|
|
276
|
+
/**
|
|
277
|
+
* The Code Security plan
|
|
278
|
+
*/
|
|
279
|
+
CodeSecurity = 0,
|
|
280
|
+
/**
|
|
281
|
+
* The Secret Protection plan
|
|
282
|
+
*/
|
|
283
|
+
SecretProtection = 1
|
|
284
|
+
}
|
|
285
|
+
export interface ProjectEnablementSettings extends EnablementSettings {
|
|
286
|
+
}
|
|
287
|
+
export interface RepoEnablementSettings {
|
|
288
|
+
/**
|
|
289
|
+
* Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
|
|
290
|
+
*/
|
|
291
|
+
codeScanningEnabled: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* The last time the status of Code Scanning for this repository was updated
|
|
294
|
+
*/
|
|
295
|
+
codeScanningEnablementLastChangedDate: Date;
|
|
296
|
+
/**
|
|
297
|
+
* Includes code scanning features that can be enabled.
|
|
298
|
+
*/
|
|
299
|
+
codeScanningFeatures: CodeScanningFeatures;
|
|
300
|
+
/**
|
|
301
|
+
* Indicates whether the repository is part of the bundled SKU (old billing plan) or unbundled SKUs (new billing plan).
|
|
302
|
+
*/
|
|
303
|
+
isBundledSKU: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* The project Id
|
|
306
|
+
*/
|
|
307
|
+
projectId: string;
|
|
308
|
+
/**
|
|
309
|
+
* The repository Id
|
|
310
|
+
*/
|
|
311
|
+
repositoryId: string;
|
|
312
|
+
/**
|
|
313
|
+
* Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
|
|
314
|
+
*/
|
|
315
|
+
secretScanningEnabled: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* The last time the status of Secret Scanning for this repository was updated
|
|
318
|
+
*/
|
|
319
|
+
secretScanningEnablementLastChangedDate: Date;
|
|
320
|
+
/**
|
|
321
|
+
* Includes secret scanning features that can be enabled.
|
|
322
|
+
*/
|
|
323
|
+
secretScanningFeatures: SecretScanningFeatures;
|
|
324
|
+
}
|
|
325
|
+
export interface SecretScanningFeatures {
|
|
326
|
+
/**
|
|
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.
|
|
328
|
+
*/
|
|
329
|
+
blockPushes: boolean;
|
|
330
|
+
/**
|
|
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.
|
|
332
|
+
*/
|
|
333
|
+
forceRepoSecretScanning: boolean;
|
|
334
|
+
}
|
package/Management/Management.js
CHANGED
|
@@ -6,4 +6,15 @@
|
|
|
6
6
|
define(["require", "exports"], function (require, exports) {
|
|
7
7
|
"use strict";
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
var Plan;
|
|
10
|
+
(function (Plan) {
|
|
11
|
+
/**
|
|
12
|
+
* The Code Security plan
|
|
13
|
+
*/
|
|
14
|
+
Plan[Plan["CodeSecurity"] = 0] = "CodeSecurity";
|
|
15
|
+
/**
|
|
16
|
+
* The Secret Protection plan
|
|
17
|
+
*/
|
|
18
|
+
Plan[Plan["SecretProtection"] = 1] = "SecretProtection";
|
|
19
|
+
})(Plan = exports.Plan || (exports.Plan = {}));
|
|
9
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports"],function(e,
|
|
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={}))});
|
|
@@ -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,31 @@ 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
|
+
* @param plan -
|
|
48
|
+
*/
|
|
49
|
+
createBillingSnapshot2(meterUsage: Management.MeterUsageForPlan, plan: Management.Plan): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Get all billable committers details, including those not matched with a VSID.
|
|
52
|
+
*
|
|
53
|
+
* @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
|
|
54
|
+
* @param billingDate - The date to query, or if not provided, today
|
|
55
|
+
*/
|
|
56
|
+
getBillableCommitterDetails2(plan: Management.Plan, billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
|
|
57
|
+
/**
|
|
58
|
+
* @param plan -
|
|
59
|
+
*/
|
|
60
|
+
getLastMeterUsage2(plan: Management.Plan): Promise<Management.MeterUsageForPlan>;
|
|
61
|
+
/**
|
|
62
|
+
* Get commiters used when calculating billing information.
|
|
63
|
+
*
|
|
64
|
+
* @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
|
|
65
|
+
* @param billingDate - The date to query, or if not provided, today
|
|
66
|
+
*/
|
|
67
|
+
getMeterUsage2(plan: Management.Plan, billingDate?: Date): Promise<Management.MeterUsageForPlan>;
|
|
27
68
|
/**
|
|
28
69
|
* Get the current status of Advanced Security for the organization
|
|
29
70
|
*
|
|
@@ -36,6 +77,18 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
36
77
|
* @param savedAdvSecEnablementStatus - The new status
|
|
37
78
|
*/
|
|
38
79
|
updateOrgEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Get the current status of Advanced Security for the organization
|
|
82
|
+
*
|
|
83
|
+
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
84
|
+
*/
|
|
85
|
+
getOrgEnablementStatus2(includeAllProperties?: boolean): Promise<Management.OrgEnablementSettings>;
|
|
86
|
+
/**
|
|
87
|
+
* Update the status of Advanced Security for the organization
|
|
88
|
+
*
|
|
89
|
+
* @param savedAdvSecEnablementStatus - The new status
|
|
90
|
+
*/
|
|
91
|
+
updateOrgEnablementStatus2(savedAdvSecEnablementStatus: Management.OrgEnablementSettings): Promise<void>;
|
|
39
92
|
/**
|
|
40
93
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
41
94
|
*
|
|
@@ -46,6 +99,16 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
46
99
|
*
|
|
47
100
|
*/
|
|
48
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[]>;
|
|
49
112
|
/**
|
|
50
113
|
* Get the current status of Advanced Security for a project
|
|
51
114
|
*
|
|
@@ -60,6 +123,20 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
60
123
|
* @param project - Project ID or project name
|
|
61
124
|
*/
|
|
62
125
|
updateProjectEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate, project: string): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Get the current status of Advanced Security for a project
|
|
128
|
+
*
|
|
129
|
+
* @param project - Project ID or project name
|
|
130
|
+
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
131
|
+
*/
|
|
132
|
+
getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
|
|
133
|
+
/**
|
|
134
|
+
* Update the status of Advanced Security for the project
|
|
135
|
+
*
|
|
136
|
+
* @param savedAdvSecEnablementStatus - The new status
|
|
137
|
+
* @param project - Project ID or project name
|
|
138
|
+
*/
|
|
139
|
+
updateProjectEnablementStatus2(savedAdvSecEnablementStatus: Management.ProjectEnablementSettings, project: string): Promise<void>;
|
|
63
140
|
/**
|
|
64
141
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
65
142
|
*
|
|
@@ -72,6 +149,18 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
72
149
|
* @param project - Project ID or project name
|
|
73
150
|
*/
|
|
74
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[]>;
|
|
75
164
|
/**
|
|
76
165
|
* Determine if Advanced Security is enabled for a repository
|
|
77
166
|
*
|
|
@@ -102,4 +191,18 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
102
191
|
* @param repository -
|
|
103
192
|
*/
|
|
104
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
|
+
* @param repository - The name or ID of the repository
|
|
199
|
+
*/
|
|
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>;
|
|
105
208
|
}
|