azure-devops-extension-api 4.255.1 → 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.
@@ -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
  */
@@ -179,52 +122,6 @@ export interface EnablementOnCreateSettings {
179
122
  */
180
123
  enableSecretProtectionOnCreate: boolean;
181
124
  }
182
- /**
183
- * Information related to billing for Advanced Security services
184
- */
185
- export interface MeterUsage {
186
- /**
187
- * The Azure DevOps account
188
- */
189
- accountId: string;
190
- azureSubscriptionId: string;
191
- /**
192
- * Deprecated - use BilledCommittersIdentities instead A list of Cuids for the commiters to the repositories that have Advanced Security features enabled
193
- */
194
- billedCommitters: string[];
195
- /**
196
- * A list of BilledCommitter objects that contain the identityRef of committers that have AdvSec enabled
197
- */
198
- billedUsers: BilledCommitter[];
199
- /**
200
- * The date this billing information pertains to
201
- */
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[];
207
- /**
208
- * True when a bill is generated for Advanced Security feature usage in this organziation
209
- */
210
- isAdvSecBillable: boolean;
211
- /**
212
- * True when Advanced Security features are enabled in this organization
213
- */
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[];
219
- /**
220
- * The Azure subscription
221
- */
222
- tenantId: string;
223
- /**
224
- * The number of commiters to repositories that have Advanced Security features enabled
225
- */
226
- uniqueCommitterCount: number;
227
- }
228
125
  /**
229
126
  * Information related to meter usage estimate for Code Security plan and/or Secret Protection plan
230
127
  */
@@ -3,185 +3,86 @@ 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
- * Determines if Code Security, Secret Protection, and their features are enabled for the 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 status of Code Security and Secret Protection, along with their respective features, for a given 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
40
  * @param orgEnablementSettings - The new status
90
41
  */
91
- updateOrgEnablementStatus2(orgEnablementSettings: Management.OrgEnablementSettings): Promise<void>;
92
- /**
93
- * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
94
- *
95
- */
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[]>;
42
+ updateOrgEnablementStatus3(orgEnablementSettings: Management.OrgEnablementSettings): Promise<void>;
102
43
  /**
103
44
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
104
45
  *
105
46
  * @param plan - The plan to query.
106
47
  */
107
- getEstimatedBillablePushersDetailsForOrg2(plan: Management.Plan): Promise<Management.MeterUsageEstimate>;
108
- /**
109
- * Get the current status of Advanced Security for a project
110
- *
111
- * @param project - Project ID or project name
112
- * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
113
- */
114
- getProjectEnablementStatus(project: string, includeAllProperties?: boolean): Promise<Management.AdvSecEnablementSettings>;
115
- /**
116
- * Update the status of Advanced Security for the project
117
- *
118
- * @param savedAdvSecEnablementStatus - The new status
119
- * @param project - Project ID or project name
120
- */
121
- updateProjectEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate, project: string): Promise<void>;
48
+ getEstimatedBillablePushersDetailsForOrg3(plan: Management.Plan): Promise<Management.MeterUsageEstimate>;
122
49
  /**
123
50
  * Get the current status of Advanced Security for a project
124
51
  *
125
52
  * @param project - Project ID or project name
126
53
  * @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
127
54
  */
128
- getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
55
+ getProjectEnablementStatus3(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
129
56
  /**
130
57
  * Update the status of Advanced Security for the project
131
58
  *
132
59
  * @param projectEnablementSettings - The new status
133
60
  * @param project - Project ID or project name
134
61
  */
135
- updateProjectEnablementStatus2(projectEnablementSettings: Management.ProjectEnablementSettings, project: string): Promise<void>;
136
- /**
137
- * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
138
- *
139
- * @param project - Project ID or project name
140
- */
141
- getEstimatedBillablePushersDetailsForProject(project: string): Promise<Management.BilledCommitter[]>;
142
- /**
143
- * Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.
144
- *
145
- * @param project - Project ID or project name
146
- */
147
- getEstimatedBillablePushersForProject(project: string): Promise<string[]>;
62
+ updateProjectEnablementStatus3(projectEnablementSettings: Management.ProjectEnablementSettings, project: string): Promise<void>;
148
63
  /**
149
64
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
150
65
  *
151
66
  * @param project - Project ID or project name
152
67
  * @param plan -
153
68
  */
154
- getEstimatedBillablePushersDetailsForProject2(project: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
69
+ getEstimatedBillablePushersDetailsForProject3(project: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
155
70
  /**
156
- * Determine if Advanced Security is enabled for a repository
71
+ * Determines if Code Security, Secret Protection, and their features are enabled for the repository.
157
72
  *
158
73
  * @param project - Project ID or project name
159
74
  * @param repository - The name or ID of the repository
160
75
  * @param includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected
161
76
  */
162
- getRepoEnablementStatus(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.AdvSecEnablementStatus>;
77
+ getRepoEnablementStatus3(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.RepoEnablementSettings>;
163
78
  /**
164
- * 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.
165
80
  *
166
81
  * @param savedAdvSecEnablementStatus - new status
167
82
  * @param project - Project ID or project name
168
83
  * @param repository - Name or ID of the repository
169
84
  */
170
- updateRepoAdvSecEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementStatusUpdate, project: string, repository: string): Promise<void>;
171
- /**
172
- * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
173
- *
174
- * @param project - Project ID or project name
175
- * @param repository -
176
- */
177
- getEstimatedBillableCommitersDetailsForRepo(project: string, repository: string): Promise<Management.BilledCommitter[]>;
178
- /**
179
- * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
180
- *
181
- * @param project - Project ID or project name
182
- * @param repository - The name or ID of the repository
183
- */
184
- getEstimatedBillableCommittersForRepo(project: string, repository: string): Promise<string[]>;
85
+ updateRepoAdvSecEnablementStatus3(savedAdvSecEnablementStatus: Management.RepoEnablementSettings, project: string, repository: string): Promise<void>;
185
86
  /**
186
87
  * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
187
88
  *
@@ -189,5 +90,5 @@ export declare class ManagementRestClient extends RestClientBase {
189
90
  * @param repository - The name or ID of the repository
190
91
  * @param plan - The plan to query.
191
92
  */
192
- getEstimatedRepoBillableCommittersDetails2(project: string, repository: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
93
+ getEstimatedBillableCommittersDetailsForRepo3(project: string, repository: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
193
94
  }