azure-devops-extension-api 4.261.0 → 4.263.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 +40 -2
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +1 -1
- package/AdvancedSecurity.Reporting/ReportingClient.js +2 -2
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
- package/Alert/Alert.d.ts +16 -2
- package/Alert/Alert.js +5 -1
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +6 -0
- package/Alert/AlertClient.js +20 -0
- package/Alert/AlertClient.min.js +1 -1
- package/ExtensionManagement/ExtensionManagementClient.d.ts +6 -0
- package/ExtensionManagement/ExtensionManagementClient.js +20 -0
- package/ExtensionManagement/ExtensionManagementClient.min.js +1 -1
- package/Identities/Identities.d.ts +4 -0
- package/Management/Management.d.ts +2 -2
- package/Management/ManagementClient.d.ts +13 -13
- package/Management/ManagementClient.js +13 -13
- package/Management/ManagementClient.min.js +1 -1
- package/Release/ReleaseClient.d.ts +0 -4
- package/Release/ReleaseClient.js +0 -18
- package/Release/ReleaseClient.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +4 -3
- package/Test/Test.d.ts +73 -0
- package/Test/Test.js +33 -0
- package/Test/Test.min.js +1 -1
- package/TestResults/TestResultsClient.d.ts +21 -1
- package/TestResults/TestResultsClient.js +70 -1
- package/TestResults/TestResultsClient.min.js +1 -1
- package/_manifest/spdx_2.2/ESRPClientLogs1031210409732.json +1 -0
- package/_manifest/spdx_2.2/bsi.cose +0 -0
- package/_manifest/spdx_2.2/bsi.json +1 -1
- package/_manifest/spdx_2.2/manifest.cat +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.json +2162 -2162
- package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
- package/package.json +1 -1
- package/_manifest/spdx_2.2/ESRPClientLogs1009203852923.json +0 -1
|
@@ -67,6 +67,44 @@ export interface EnablementFilterCriteria {
|
|
|
67
67
|
* If provided, only return repos whose titles match this pattern.
|
|
68
68
|
*/
|
|
69
69
|
keywords: string;
|
|
70
|
+
/**
|
|
71
|
+
* If provided, only return summary data for these projects. Otherwise, return summary data for all projects.
|
|
72
|
+
*/
|
|
73
|
+
projects: string[];
|
|
74
|
+
/**
|
|
75
|
+
* If provided, only return summary data for these enablement states. Otherwise, return summary data at any state.
|
|
76
|
+
*/
|
|
77
|
+
states: EnablementStateTypes;
|
|
78
|
+
}
|
|
79
|
+
export interface EnablementStateTypes {
|
|
80
|
+
/**
|
|
81
|
+
* True if any tool is enabled for the repository, false if any tool is disabled.
|
|
82
|
+
*/
|
|
83
|
+
anyTool: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* True if code scanning alerts are enabled for the repository, false if disabled.
|
|
86
|
+
*/
|
|
87
|
+
codeAlerts: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* True if code scanning pull request alerts are enabled for the repository, false if disabled.
|
|
90
|
+
*/
|
|
91
|
+
codePRAlerts: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* True if dependency alerts are enabled for the repository, false if disabled.
|
|
94
|
+
*/
|
|
95
|
+
dependencyAlerts: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* True if dependency pull request alerts are enabled for the repository, false if disabled.
|
|
98
|
+
*/
|
|
99
|
+
dependencyPRAlerts: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* True if pushes containing secrets will be blocked, false if they will not.
|
|
102
|
+
*/
|
|
103
|
+
pushProtection: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* True if secret scanning is enabled for the repository, false if disabled.
|
|
106
|
+
*/
|
|
107
|
+
secretAlerts: boolean;
|
|
70
108
|
}
|
|
71
109
|
export interface FilterCriteria {
|
|
72
110
|
/**
|
|
@@ -214,9 +252,9 @@ export interface RepoEnablementSummary {
|
|
|
214
252
|
*/
|
|
215
253
|
secretProtectionEnabled: boolean;
|
|
216
254
|
}
|
|
217
|
-
export interface
|
|
255
|
+
export interface ReportingUXComputedFilters {
|
|
218
256
|
/**
|
|
219
|
-
* Display
|
|
257
|
+
* Display reporting for specified projects. Show reporting for all projects if none are specified.
|
|
220
258
|
*/
|
|
221
259
|
projects: Project[];
|
|
222
260
|
}
|
|
@@ -5,7 +5,7 @@ export declare class ReportingRestClient extends RestClientBase {
|
|
|
5
5
|
constructor(options: IVssRestClientOptions);
|
|
6
6
|
/**
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
getUXComputedFilters(): Promise<Reporting.ReportingUXComputedFilters>;
|
|
9
9
|
/**
|
|
10
10
|
* Get Alert summary by severity for the org
|
|
11
11
|
*
|
|
@@ -58,14 +58,14 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
*/
|
|
61
|
-
ReportingRestClient.prototype.
|
|
61
|
+
ReportingRestClient.prototype.getUXComputedFilters = function () {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function () {
|
|
63
63
|
return __generator(this, function (_a) {
|
|
64
64
|
return [2 /*return*/, this.beginRequest({
|
|
65
65
|
apiVersion: "7.2-preview.1",
|
|
66
66
|
routeTemplate: "_apis/Reporting/filters/{action}",
|
|
67
67
|
routeValues: {
|
|
68
|
-
action: "
|
|
68
|
+
action: "Default"
|
|
69
69
|
}
|
|
70
70
|
})];
|
|
71
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}s((n=n.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=e.call(t,u)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[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(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}s((n=n.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=e.call(t,u)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[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(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getUXComputedFilters=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/filters/{action}",routeValues:{action:"Default"}})]})})},e.prototype.getAlertSummaryForOrg=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(r){return e={criteria:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Alerts"},queryParams:e})]})})},e.prototype.getEnablementSummaryForOrg=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(r){return e={criteria:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Enablement"},queryParams:e})]})})},e}(r.RestClientBase);e.ReportingRestClient=n});
|
package/Alert/Alert.d.ts
CHANGED
|
@@ -227,7 +227,7 @@ export declare enum AlertValidityStatus {
|
|
|
227
227
|
*/
|
|
228
228
|
Unknown = 1,
|
|
229
229
|
/**
|
|
230
|
-
* When
|
|
230
|
+
* When at least one validation fingerprint associated to the alert is exploitable.
|
|
231
231
|
*/
|
|
232
232
|
Active = 2,
|
|
233
233
|
/**
|
|
@@ -918,6 +918,10 @@ export interface SearchCriteria {
|
|
|
918
918
|
* If provided, only return alerts last seen after this date. \<br /\>Otherwise return all alerts.
|
|
919
919
|
*/
|
|
920
920
|
fromDate: Date;
|
|
921
|
+
/**
|
|
922
|
+
* If provided, filters alerts based on whether they have linked work items. \<br /\>Set to "true" to return only alerts with linked work items. \<br /\>Set to "false" to return only alerts without linked work items. \<br /\>If not provided, returns all alerts regardless of linked work items. \<br /\>Not applicable for secret and dependency scanning alerts.
|
|
923
|
+
*/
|
|
924
|
+
hasLinkedWorkItems: boolean;
|
|
921
925
|
/**
|
|
922
926
|
* If provided, only return alerts whose titles match this pattern.
|
|
923
927
|
*/
|
|
@@ -1072,6 +1076,12 @@ export interface UxFilters {
|
|
|
1072
1076
|
validity: AlertValidityStatus[];
|
|
1073
1077
|
}
|
|
1074
1078
|
export interface ValidationFingerprint {
|
|
1079
|
+
/**
|
|
1080
|
+
* The key value representation of the asset fingerprint.
|
|
1081
|
+
*/
|
|
1082
|
+
assetFingerprint: {
|
|
1083
|
+
[key: string]: string;
|
|
1084
|
+
};
|
|
1075
1085
|
/**
|
|
1076
1086
|
* The hash associated to the secret.
|
|
1077
1087
|
*/
|
|
@@ -1115,7 +1125,11 @@ export declare enum ValidationResult {
|
|
|
1115
1125
|
/**
|
|
1116
1126
|
* Represents a secret where we are unable to validate, e.g. dynamic validator missing.
|
|
1117
1127
|
*/
|
|
1118
|
-
ValidationNotSupported = 4
|
|
1128
|
+
ValidationNotSupported = 4,
|
|
1129
|
+
/**
|
|
1130
|
+
* Represents a secret where the validation process failed due to a transient error, e.g. network issue. This result indicates that the validation process should be retried.
|
|
1131
|
+
*/
|
|
1132
|
+
TransientError = 5
|
|
1119
1133
|
}
|
|
1120
1134
|
/**
|
|
1121
1135
|
* Information for locating files in a source control system
|
package/Alert/Alert.js
CHANGED
|
@@ -74,7 +74,7 @@ define(["require", "exports"], function (require, exports) {
|
|
|
74
74
|
*/
|
|
75
75
|
AlertValidityStatus[AlertValidityStatus["Unknown"] = 1] = "Unknown";
|
|
76
76
|
/**
|
|
77
|
-
* When
|
|
77
|
+
* When at least one validation fingerprint associated to the alert is exploitable.
|
|
78
78
|
*/
|
|
79
79
|
AlertValidityStatus[AlertValidityStatus["Active"] = 2] = "Active";
|
|
80
80
|
/**
|
|
@@ -404,5 +404,9 @@ define(["require", "exports"], function (require, exports) {
|
|
|
404
404
|
* Represents a secret where we are unable to validate, e.g. dynamic validator missing.
|
|
405
405
|
*/
|
|
406
406
|
ValidationResult[ValidationResult["ValidationNotSupported"] = 4] = "ValidationNotSupported";
|
|
407
|
+
/**
|
|
408
|
+
* Represents a secret where the validation process failed due to a transient error, e.g. network issue. This result indicates that the validation process should be retried.
|
|
409
|
+
*/
|
|
410
|
+
ValidationResult[ValidationResult["TransientError"] = 5] = "TransientError";
|
|
407
411
|
})(ValidationResult = exports.ValidationResult || (exports.ValidationResult = {}));
|
|
408
412
|
});
|
package/Alert/Alert.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal"}(n.AlertListExpandOption||(n.AlertListExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License"}(n.AlertType||(n.AlertType={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(n.AlertValidationRequestStatus||(n.AlertValidationRequestStatus={}));!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(n.AlertValidityStatus||(n.AlertValidityStatus={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(n.Confidence||(n.Confidence={}));!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(n.DependencyKind||(n.DependencyKind={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(n.LicenseState||(n.LicenseState={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(n.LicenseType||(n.LicenseType={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(n.MetadataChangeType||(n.MetadataChangeType={}));!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(n.MetadataOperation||(n.MetadataOperation={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued"}(n.SarifJobStatus||(n.SarifJobStatus={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}));!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported"}(n.ValidationResult||(n.ValidationResult={}))});
|
|
1
|
+
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal"}(n.AlertListExpandOption||(n.AlertListExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License"}(n.AlertType||(n.AlertType={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(n.AlertValidationRequestStatus||(n.AlertValidationRequestStatus={}));!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(n.AlertValidityStatus||(n.AlertValidityStatus={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(n.Confidence||(n.Confidence={}));!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(n.DependencyKind||(n.DependencyKind={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(n.LicenseState||(n.LicenseState={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(n.LicenseType||(n.LicenseType={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(n.MetadataChangeType||(n.MetadataChangeType={}));!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(n.MetadataOperation||(n.MetadataOperation={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued"}(n.SarifJobStatus||(n.SarifJobStatus={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}));!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported",e[e.TransientError=5]="TransientError"}(n.ValidationResult||(n.ValidationResult={}))});
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -110,6 +110,12 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
110
110
|
* @param sarifId - Sarif ID returned when the Sarif was uploaded
|
|
111
111
|
*/
|
|
112
112
|
getSarif(sarifId: number): Promise<Alert.SarifUploadStatus>;
|
|
113
|
+
/**
|
|
114
|
+
* Upload a Sarif file at the organization level
|
|
115
|
+
*
|
|
116
|
+
* @param content - Content to upload
|
|
117
|
+
*/
|
|
118
|
+
uploadOrgSarif(content: string): Promise<number>;
|
|
113
119
|
/**
|
|
114
120
|
* Get the validity details for an alert.
|
|
115
121
|
*
|
package/Alert/AlertClient.js
CHANGED
|
@@ -394,6 +394,26 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
394
394
|
});
|
|
395
395
|
});
|
|
396
396
|
};
|
|
397
|
+
/**
|
|
398
|
+
* Upload a Sarif file at the organization level
|
|
399
|
+
*
|
|
400
|
+
* @param content - Content to upload
|
|
401
|
+
*/
|
|
402
|
+
AlertRestClient.prototype.uploadOrgSarif = function (content) {
|
|
403
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
404
|
+
return __generator(this, function (_a) {
|
|
405
|
+
return [2 /*return*/, this.beginRequest({
|
|
406
|
+
apiVersion: "7.2-preview.2",
|
|
407
|
+
method: "POST",
|
|
408
|
+
routeTemplate: "_apis/Alert/Sarifs/{sarifId}",
|
|
409
|
+
customHeaders: {
|
|
410
|
+
"Content-Type": "application/octet-stream",
|
|
411
|
+
},
|
|
412
|
+
body: content
|
|
413
|
+
})];
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
};
|
|
397
417
|
/**
|
|
398
418
|
* Get the validity details for an alert.
|
|
399
419
|
*
|
package/Alert/AlertClient.min.js
CHANGED
|
@@ -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 o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{u(o.next(e))}catch(e){n(e)}}function s(e){try{u(o.throw(e))}catch(e){n(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(n=2&r[0]?i.return:r[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,r[1])).done)return n;switch(i=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){s.label=r[1];break}if(6===r[0]&&s.label<n[1]){s.label=n[1],n=r;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(r);break}n[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],i=0}finally{o=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[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","../Common/Util/Serialization"],function(e,t,r,o){"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.getAlert=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.getAlerts=function(e,t,r,i,n,a,s){return __awaiter(this,void 0,void 0,function(){var u,p=this;return __generator(this,function(c){return u={top:r,orderBy:i,criteria:n,expand:a,continuationToken:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(p,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(o.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getAlertSarif=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:t,alertId:r,repository:o},body:e})]})})},t.prototype.getBranches=function(e,t,r,o,i,n,a){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={alertType:r,continuationToken:o,branchNameContains:i,top:n,includePullRequestBranches:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Branches"},queryParams:s})]})})},t.prototype.getUxFilters=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={alertType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Default"},queryParams:o})]})})},t.prototype.getAlertInstances=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.createLegalReview=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={alertId:r,ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:e,repository:t},queryParams:i})]})})},t.prototype.updateAlertsMetadata=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getOrgLevelAlertsByIds=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={alertIds:e&&e.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/alerts",queryParams:t})]})})},t.prototype.uploadSarif=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:t,repository:r},customHeaders:{"Content-Type":"application/octet-stream","X-AdvSec-NotificationSarif":o},body:e})]})})},t.prototype.getSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t.prototype.getValidityData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})]})})},t.prototype.initiateValidation=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})]})})},t}(r.RestClientBase);t.AlertRestClient=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 o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{u(o.next(e))}catch(e){n(e)}}function s(e){try{u(o.throw(e))}catch(e){n(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(n=2&r[0]?i.return:r[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,r[1])).done)return n;switch(i=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){s.label=r[1];break}if(6===r[0]&&s.label<n[1]){s.label=n[1],n=r;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(r);break}n[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],i=0}finally{o=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[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","../Common/Util/Serialization"],function(e,t,r,o){"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.getAlert=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.getAlerts=function(e,t,r,i,n,a,s){return __awaiter(this,void 0,void 0,function(){var u,p=this;return __generator(this,function(c){return u={top:r,orderBy:i,criteria:n,expand:a,continuationToken:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(p,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(o.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getAlertSarif=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:t,alertId:r,repository:o},body:e})]})})},t.prototype.getBranches=function(e,t,r,o,i,n,a){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={alertType:r,continuationToken:o,branchNameContains:i,top:n,includePullRequestBranches:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Branches"},queryParams:s})]})})},t.prototype.getUxFilters=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={alertType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Default"},queryParams:o})]})})},t.prototype.getAlertInstances=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.createLegalReview=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={alertId:r,ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:e,repository:t},queryParams:i})]})})},t.prototype.updateAlertsMetadata=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getOrgLevelAlertsByIds=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={alertIds:e&&e.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/alerts",queryParams:t})]})})},t.prototype.uploadSarif=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:t,repository:r},customHeaders:{"Content-Type":"application/octet-stream","X-AdvSec-NotificationSarif":o},body:e})]})})},t.prototype.getSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t.prototype.uploadOrgSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",customHeaders:{"Content-Type":"application/octet-stream"},body:e})]})})},t.prototype.getValidityData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})]})})},t.prototype.initiateValidation=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})]})})},t}(r.RestClientBase);t.AlertRestClient=i});
|
|
@@ -26,6 +26,12 @@ export declare class ExtensionManagementRestClient extends RestClientBase {
|
|
|
26
26
|
* @param extensionName -
|
|
27
27
|
*/
|
|
28
28
|
getAuditLog(publisherName: string, extensionName: string): Promise<ExtensionManagement.ExtensionAuditLog>;
|
|
29
|
+
/**
|
|
30
|
+
* @param publisherName -
|
|
31
|
+
* @param extensionName -
|
|
32
|
+
* @param registrationId -
|
|
33
|
+
*/
|
|
34
|
+
getAuthorization(publisherName: string, extensionName: string, registrationId: string): Promise<ExtensionManagement.ExtensionAuthorization>;
|
|
29
35
|
/**
|
|
30
36
|
* @param publisherName -
|
|
31
37
|
* @param extensionName -
|
|
@@ -121,6 +121,26 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* @param publisherName -
|
|
126
|
+
* @param extensionName -
|
|
127
|
+
* @param registrationId -
|
|
128
|
+
*/
|
|
129
|
+
ExtensionManagementRestClient.prototype.getAuthorization = function (publisherName, extensionName, registrationId) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
+
return __generator(this, function (_a) {
|
|
132
|
+
return [2 /*return*/, this.beginRequest({
|
|
133
|
+
apiVersion: "7.2-preview.1",
|
|
134
|
+
routeTemplate: "_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Authorizations/{registrationId}",
|
|
135
|
+
routeValues: {
|
|
136
|
+
publisherName: publisherName,
|
|
137
|
+
extensionName: extensionName,
|
|
138
|
+
registrationId: registrationId
|
|
139
|
+
}
|
|
140
|
+
})];
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
};
|
|
124
144
|
/**
|
|
125
145
|
* @param publisherName -
|
|
126
146
|
* @param extensionName -
|
|
@@ -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 n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!(r=r.length>0&&r[r.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}var i,o,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../Common/RestClientBase"],function(e,t,n){"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.getAcquisitionOptions=function(e,t,n,i,o,r,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={itemId:e,testCommerce:t,isFreeOrTrialInstall:n,isAccountOwner:i,isLinked:o,isConnectedServer:r,isBuyOperationValid:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/AcquisitionOptions",queryParams:a})]})})},t.prototype.requestAcquisition=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:"POST",routeTemplate:"_apis/ExtensionManagement/AcquisitionRequests",body:e})]})})},t.prototype.getAuditLog=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/AuditLog/{publisherName}/{extensionName}",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.registerAuthorization=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PUT",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Authorizations/{registrationId}",routeValues:{publisherName:e,extensionName:t,registrationId:n}})]})})},t.prototype.createDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:t,extensionName:n,scopeType:i,scopeValue:o,collectionName:r},body:e})]})})},t.prototype.deleteDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:e,extensionName:t,scopeType:n,scopeValue:i,collectionName:o,documentId:r}})]})})},t.prototype.getDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:e,extensionName:t,scopeType:n,scopeValue:i,collectionName:o,documentId:r}})]})})},t.prototype.getDocumentsByName=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:e,extensionName:t,scopeType:n,scopeValue:i,collectionName:o}})]})})},t.prototype.setDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PUT",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:t,extensionName:n,scopeType:i,scopeValue:o,collectionName:r},body:e})]})})},t.prototype.updateDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:t,extensionName:n,scopeType:i,scopeValue:o,collectionName:r},body:e})]})})},t.prototype.queryCollectionsByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/ExtensionDataCollectionQuery",routeValues:{publisherName:t,extensionName:n},body:e})]})})},t.prototype.getStates=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={includeDisabled:e,includeErrors:t,includeInstallationIssues:n,forceRefresh:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/ExtensionManagement/ExtensionStates",queryParams:o})]})})},t.prototype.queryExtensions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionQuery",body:e})]})})},t.prototype.getInstalledExtensions=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={includeDisabledExtensions:e,includeErrors:t,assetTypes:n&&n.join(":"),includeInstallationIssues:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{extensionId}",queryParams:o})]})})},t.prototype.updateInstalledExtension=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{extensionId}",body:e})]})})},t.prototype.getInstalledExtensionByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={assetTypes:n&&n.join(":")},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",routeValues:{publisherName:e,extensionName:t},queryParams:i})]})})},t.prototype.installExtensionByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",routeValues:{publisherName:e,extensionName:t,version:n}})]})})},t.prototype.uninstallExtensionByName=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={reason:n,reasonCode:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.getPolicies=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/ExtensionManagement/Policies/{userId}",routeValues:{userId:e}})]})})},t.prototype.resolveRequest=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={state:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/{requesterId}",routeValues:{publisherName:t,extensionName:n,requesterId:i},queryParams:r,body:e})]})})},t.prototype.getRequests=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions"})]})})},t.prototype.resolveAllRequests=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={state:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}",routeValues:{publisherName:t,extensionName:n},queryParams:o,body:e})]})})},t.prototype.deleteRequest=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/me",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.requestExtension=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/me",routeValues:{publisherName:e,extensionName:t},body:n})]})})},t.prototype.getToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/Token"})]})})},t.RESOURCE_AREA_ID="6c2b0933-3600-42ae-bf8b-93d4f7e83594",t}(n.RestClientBase);t.ExtensionManagementRestClient=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 n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!(r=r.length>0&&r[r.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}var i,o,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../Common/RestClientBase"],function(e,t,n){"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.getAcquisitionOptions=function(e,t,n,i,o,r,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={itemId:e,testCommerce:t,isFreeOrTrialInstall:n,isAccountOwner:i,isLinked:o,isConnectedServer:r,isBuyOperationValid:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/AcquisitionOptions",queryParams:a})]})})},t.prototype.requestAcquisition=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:"POST",routeTemplate:"_apis/ExtensionManagement/AcquisitionRequests",body:e})]})})},t.prototype.getAuditLog=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/AuditLog/{publisherName}/{extensionName}",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.getAuthorization=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Authorizations/{registrationId}",routeValues:{publisherName:e,extensionName:t,registrationId:n}})]})})},t.prototype.registerAuthorization=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PUT",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Authorizations/{registrationId}",routeValues:{publisherName:e,extensionName:t,registrationId:n}})]})})},t.prototype.createDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:t,extensionName:n,scopeType:i,scopeValue:o,collectionName:r},body:e})]})})},t.prototype.deleteDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:e,extensionName:t,scopeType:n,scopeValue:i,collectionName:o,documentId:r}})]})})},t.prototype.getDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:e,extensionName:t,scopeType:n,scopeValue:i,collectionName:o,documentId:r}})]})})},t.prototype.getDocumentsByName=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:e,extensionName:t,scopeType:n,scopeValue:i,collectionName:o}})]})})},t.prototype.setDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PUT",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:t,extensionName:n,scopeType:i,scopeValue:o,collectionName:r},body:e})]})})},t.prototype.updateDocumentByName=function(e,t,n,i,o,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/{scopeType}/{scopeValue}/Collections/{collectionName}/Documents/{documentId}",routeValues:{publisherName:t,extensionName:n,scopeType:i,scopeValue:o,collectionName:r},body:e})]})})},t.prototype.queryCollectionsByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/ExtensionDataCollectionQuery",routeValues:{publisherName:t,extensionName:n},body:e})]})})},t.prototype.getStates=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={includeDisabled:e,includeErrors:t,includeInstallationIssues:n,forceRefresh:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/ExtensionManagement/ExtensionStates",queryParams:o})]})})},t.prototype.queryExtensions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionQuery",body:e})]})})},t.prototype.getInstalledExtensions=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={includeDisabledExtensions:e,includeErrors:t,assetTypes:n&&n.join(":"),includeInstallationIssues:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{extensionId}",queryParams:o})]})})},t.prototype.updateInstalledExtension=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/InstalledExtensions/{extensionId}",body:e})]})})},t.prototype.getInstalledExtensionByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={assetTypes:n&&n.join(":")},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",routeValues:{publisherName:e,extensionName:t},queryParams:i})]})})},t.prototype.installExtensionByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",routeValues:{publisherName:e,extensionName:t,version:n}})]})})},t.prototype.uninstallExtensionByName=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={reason:n,reasonCode:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"_apis/ExtensionManagement/InstalledExtensionsByName/{publisherName}/{extensionName}/{version}",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.getPolicies=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/ExtensionManagement/Policies/{userId}",routeValues:{userId:e}})]})})},t.prototype.resolveRequest=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={state:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/{requesterId}",routeValues:{publisherName:t,extensionName:n,requesterId:i},queryParams:r,body:e})]})})},t.prototype.getRequests=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions"})]})})},t.prototype.resolveAllRequests=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={state:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}",routeValues:{publisherName:t,extensionName:n},queryParams:o,body:e})]})})},t.prototype.deleteRequest=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/me",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.requestExtension=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/RequestedExtensions/{publisherName}/{extensionName}/requests/me",routeValues:{publisherName:e,extensionName:t},body:n})]})})},t.prototype.getToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/ExtensionManagement/Token"})]})})},t.RESOURCE_AREA_ID="6c2b0933-3600-42ae-bf8b-93d4f7e83594",t}(n.RestClientBase);t.ExtensionManagementRestClient=i});
|
|
@@ -190,6 +190,10 @@ export interface IdentitySnapshot {
|
|
|
190
190
|
scopeId: string;
|
|
191
191
|
scopes: IdentityScope[];
|
|
192
192
|
}
|
|
193
|
+
export interface IdentityTranslation {
|
|
194
|
+
localId: string;
|
|
195
|
+
masterId: string;
|
|
196
|
+
}
|
|
193
197
|
export interface IdentityUpdateData {
|
|
194
198
|
id: string;
|
|
195
199
|
index: number;
|
|
@@ -157,11 +157,11 @@ export interface CodeSecurityFeatures {
|
|
|
157
157
|
*/
|
|
158
158
|
codeSecurityEnablementLastChangedDate: Date;
|
|
159
159
|
/**
|
|
160
|
-
* 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.
|
|
160
|
+
* 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.
|
|
161
161
|
*/
|
|
162
162
|
dependabotEnabled: boolean;
|
|
163
163
|
/**
|
|
164
|
-
* 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.
|
|
164
|
+
* 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.
|
|
165
165
|
*/
|
|
166
166
|
dependencyScanningInjectionEnabled: boolean;
|
|
167
167
|
}
|
|
@@ -9,64 +9,64 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
9
9
|
* @param meterUsage -
|
|
10
10
|
* @param plan -
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
createBillingSnapshot2(meterUsage: Management.MeterUsageForPlan, plan: Management.Plan): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Get all billable committers details, including those not matched with a VSID.
|
|
15
15
|
*
|
|
16
16
|
* @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
|
|
17
17
|
* @param billingDate - The date to query, or if not provided, today
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
getBillableCommitterDetails2(plan: Management.Plan, billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
|
|
20
20
|
/**
|
|
21
21
|
* @param plan -
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
getLastMeterUsage2(plan: Management.Plan): Promise<Management.MeterUsageForPlan>;
|
|
24
24
|
/**
|
|
25
25
|
* Get commiters used when calculating billing information.
|
|
26
26
|
*
|
|
27
27
|
* @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
|
|
28
28
|
* @param billingDate - The date to query, or if not provided, today
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
getMeterUsage2(plan: Management.Plan, billingDate?: Date): Promise<Management.MeterUsageForPlan>;
|
|
31
31
|
/**
|
|
32
32
|
* Get the current status of Advanced Security for the organization
|
|
33
33
|
*
|
|
34
34
|
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
getOrgEnablementStatus2(includeAllProperties?: boolean): Promise<Management.OrgEnablementSettings>;
|
|
37
37
|
/**
|
|
38
38
|
* Update the status of Advanced Security for the organization
|
|
39
39
|
*
|
|
40
40
|
* @param orgEnablementSettings - The new status
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
updateOrgEnablementStatus2(orgEnablementSettings: Management.OrgEnablementSettings): Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
45
45
|
*
|
|
46
46
|
* @param plan - The plan to query.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
getEstimatedBillablePushersDetailsForOrg2(plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
|
|
49
49
|
/**
|
|
50
50
|
* Get the current status of Advanced Security for a project
|
|
51
51
|
*
|
|
52
52
|
* @param project - Project ID or project name
|
|
53
53
|
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
|
|
56
56
|
/**
|
|
57
57
|
* Update the status of Advanced Security for the project
|
|
58
58
|
*
|
|
59
59
|
* @param projectEnablementSettings - The new status
|
|
60
60
|
* @param project - Project ID or project name
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
updateProjectEnablementStatus2(projectEnablementSettings: Management.ProjectEnablementSettings, project: string): Promise<void>;
|
|
63
63
|
/**
|
|
64
64
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
65
65
|
*
|
|
66
66
|
* @param project - Project ID or project name
|
|
67
67
|
* @param plan -
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
getEstimatedBillablePushersDetailsForProject2(project: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
|
|
70
70
|
/**
|
|
71
71
|
* Determines if Code Security, Secret Protection, and their features are enabled for the repository.
|
|
72
72
|
*
|
|
@@ -74,7 +74,7 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
74
74
|
* @param repository - The name or ID of the repository
|
|
75
75
|
* @param includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
getRepoEnablementStatus2(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.RepoEnablementSettings>;
|
|
78
78
|
/**
|
|
79
79
|
* Update the enablement status of Code Security and Secret Protection, along with their respective features, for a given repository.
|
|
80
80
|
*
|
|
@@ -82,7 +82,7 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
82
82
|
* @param project - Project ID or project name
|
|
83
83
|
* @param repository - Name or ID of the repository
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
updateRepoAdvSecEnablementStatus2(savedAdvSecEnablementStatus: Management.RepoEnablementSettings, project: string, repository: string): Promise<void>;
|
|
86
86
|
/**
|
|
87
87
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
|
|
88
88
|
*
|
|
@@ -90,5 +90,5 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
90
90
|
* @param repository - The name or ID of the repository
|
|
91
91
|
* @param plan - The plan to query.
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
getEstimatedBillableCommittersDetailsForRepo2(project: string, repository: string, plan?: Management.Plan): Promise<Management.MeterUsageEstimate>;
|
|
94
94
|
}
|
|
@@ -62,7 +62,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
62
62
|
* @param meterUsage -
|
|
63
63
|
* @param plan -
|
|
64
64
|
*/
|
|
65
|
-
ManagementRestClient.prototype.
|
|
65
|
+
ManagementRestClient.prototype.createBillingSnapshot2 = function (meterUsage, plan) {
|
|
66
66
|
return __awaiter(this, void 0, void 0, function () {
|
|
67
67
|
var queryValues;
|
|
68
68
|
return __generator(this, function (_a) {
|
|
@@ -88,7 +88,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
88
88
|
* @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
|
|
89
89
|
* @param billingDate - The date to query, or if not provided, today
|
|
90
90
|
*/
|
|
91
|
-
ManagementRestClient.prototype.
|
|
91
|
+
ManagementRestClient.prototype.getBillableCommitterDetails2 = function (plan, billingDate) {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function () {
|
|
93
93
|
var queryValues;
|
|
94
94
|
return __generator(this, function (_a) {
|
|
@@ -110,7 +110,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
110
110
|
/**
|
|
111
111
|
* @param plan -
|
|
112
112
|
*/
|
|
113
|
-
ManagementRestClient.prototype.
|
|
113
|
+
ManagementRestClient.prototype.getLastMeterUsage2 = function (plan) {
|
|
114
114
|
return __awaiter(this, void 0, void 0, function () {
|
|
115
115
|
var queryValues;
|
|
116
116
|
return __generator(this, function (_a) {
|
|
@@ -134,7 +134,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
134
134
|
* @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
|
|
135
135
|
* @param billingDate - The date to query, or if not provided, today
|
|
136
136
|
*/
|
|
137
|
-
ManagementRestClient.prototype.
|
|
137
|
+
ManagementRestClient.prototype.getMeterUsage2 = function (plan, billingDate) {
|
|
138
138
|
return __awaiter(this, void 0, void 0, function () {
|
|
139
139
|
var queryValues;
|
|
140
140
|
return __generator(this, function (_a) {
|
|
@@ -158,7 +158,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
158
158
|
*
|
|
159
159
|
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
160
160
|
*/
|
|
161
|
-
ManagementRestClient.prototype.
|
|
161
|
+
ManagementRestClient.prototype.getOrgEnablementStatus2 = function (includeAllProperties) {
|
|
162
162
|
return __awaiter(this, void 0, void 0, function () {
|
|
163
163
|
var queryValues;
|
|
164
164
|
return __generator(this, function (_a) {
|
|
@@ -178,7 +178,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
178
178
|
*
|
|
179
179
|
* @param orgEnablementSettings - The new status
|
|
180
180
|
*/
|
|
181
|
-
ManagementRestClient.prototype.
|
|
181
|
+
ManagementRestClient.prototype.updateOrgEnablementStatus2 = function (orgEnablementSettings) {
|
|
182
182
|
return __awaiter(this, void 0, void 0, function () {
|
|
183
183
|
return __generator(this, function (_a) {
|
|
184
184
|
return [2 /*return*/, this.beginRequest({
|
|
@@ -195,7 +195,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
195
195
|
*
|
|
196
196
|
* @param plan - The plan to query.
|
|
197
197
|
*/
|
|
198
|
-
ManagementRestClient.prototype.
|
|
198
|
+
ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForOrg2 = function (plan) {
|
|
199
199
|
return __awaiter(this, void 0, void 0, function () {
|
|
200
200
|
var queryValues;
|
|
201
201
|
return __generator(this, function (_a) {
|
|
@@ -219,7 +219,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
219
219
|
* @param project - Project ID or project name
|
|
220
220
|
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
221
221
|
*/
|
|
222
|
-
ManagementRestClient.prototype.
|
|
222
|
+
ManagementRestClient.prototype.getProjectEnablementStatus2 = function (project, includeAllProperties) {
|
|
223
223
|
return __awaiter(this, void 0, void 0, function () {
|
|
224
224
|
var queryValues;
|
|
225
225
|
return __generator(this, function (_a) {
|
|
@@ -243,7 +243,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
243
243
|
* @param projectEnablementSettings - The new status
|
|
244
244
|
* @param project - Project ID or project name
|
|
245
245
|
*/
|
|
246
|
-
ManagementRestClient.prototype.
|
|
246
|
+
ManagementRestClient.prototype.updateProjectEnablementStatus2 = function (projectEnablementSettings, project) {
|
|
247
247
|
return __awaiter(this, void 0, void 0, function () {
|
|
248
248
|
return __generator(this, function (_a) {
|
|
249
249
|
return [2 /*return*/, this.beginRequest({
|
|
@@ -264,7 +264,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
264
264
|
* @param project - Project ID or project name
|
|
265
265
|
* @param plan -
|
|
266
266
|
*/
|
|
267
|
-
ManagementRestClient.prototype.
|
|
267
|
+
ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForProject2 = function (project, plan) {
|
|
268
268
|
return __awaiter(this, void 0, void 0, function () {
|
|
269
269
|
var queryValues;
|
|
270
270
|
return __generator(this, function (_a) {
|
|
@@ -290,7 +290,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
290
290
|
* @param repository - The name or ID of the repository
|
|
291
291
|
* @param includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected
|
|
292
292
|
*/
|
|
293
|
-
ManagementRestClient.prototype.
|
|
293
|
+
ManagementRestClient.prototype.getRepoEnablementStatus2 = function (project, repository, includeAllProperties) {
|
|
294
294
|
return __awaiter(this, void 0, void 0, function () {
|
|
295
295
|
var queryValues;
|
|
296
296
|
return __generator(this, function (_a) {
|
|
@@ -316,7 +316,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
316
316
|
* @param project - Project ID or project name
|
|
317
317
|
* @param repository - Name or ID of the repository
|
|
318
318
|
*/
|
|
319
|
-
ManagementRestClient.prototype.
|
|
319
|
+
ManagementRestClient.prototype.updateRepoAdvSecEnablementStatus2 = function (savedAdvSecEnablementStatus, project, repository) {
|
|
320
320
|
return __awaiter(this, void 0, void 0, function () {
|
|
321
321
|
return __generator(this, function (_a) {
|
|
322
322
|
return [2 /*return*/, this.beginRequest({
|
|
@@ -339,7 +339,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
339
339
|
* @param repository - The name or ID of the repository
|
|
340
340
|
* @param plan - The plan to query.
|
|
341
341
|
*/
|
|
342
|
-
ManagementRestClient.prototype.
|
|
342
|
+
ManagementRestClient.prototype.getEstimatedBillableCommittersDetailsForRepo2 = function (project, repository, plan) {
|
|
343
343
|
return __awaiter(this, void 0, void 0, function () {
|
|
344
344
|
var queryValues;
|
|
345
345
|
return __generator(this, function (_a) {
|