Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

azure-devops-extension-api

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-devops-extension-api - npm Package Compare versions

Comparing version 0.141.5 to 0.141.6

2

clients/Accounts.d.ts

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * @param {Accounts.AccountCreateInfoInternal} info

@@ -120,5 +120,3 @@ /*

};
AccountsRestClient.defaultOptions = {
serviceInstanceType: "951917ac-a960-4999-8464-e3f0aa25b381"
};
AccountsRestClient.RESOURCE_AREA_ID = "0d55247a-1c47-4462-9b1f-5e2125590ee6";
return AccountsRestClient;

@@ -125,0 +123,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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 n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,a)}c((r=r.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function n(n){return function(u){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=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(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,u])}}var r,o,i,u,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.createAccount=function(t,e){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){return n={usePrecreated:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/Accounts/{accountId}",queryParams:n,body:t})]})})},e.prototype.getAccount=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Accounts/{accountId}",routeValues:{accountId:t}})]})})},e.prototype.getAccounts=function(t,e,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={ownerId:t,memberId:e,properties:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Accounts/{accountId}",queryParams:r})]})})},e.defaultOptions={serviceInstanceType:"951917ac-a960-4999-8464-e3f0aa25b381"},e}(n.RestClientBase);e.AccountsRestClient=r});
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,a)}c((r=r.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function n(n){return function(u){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=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(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,u])}}var r,o,i,u,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.createAccount=function(t,e){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){return n={usePrecreated:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/Accounts/{accountId}",queryParams:n,body:t})]})})},e.prototype.getAccount=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Accounts/{accountId}",routeValues:{accountId:t}})]})})},e.prototype.getAccounts=function(t,e,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={ownerId:t,memberId:e,properties:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Accounts/{accountId}",queryParams:r})]})})},e.RESOURCE_AREA_ID="0d55247a-1c47-4462-9b1f-5e2125590ee6",e}(n.RestClientBase);e.AccountsRestClient=r});

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * Add a new board for the project.

@@ -481,5 +481,3 @@ /*

};
BoardsRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
BoardsRestClient.RESOURCE_AREA_ID = "11635d5f-a4f9-43ea-a48b-d56be43fee0f";
return BoardsRestClient;

@@ -486,0 +484,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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{s(o.next(e))}catch(e){n(e)}}function u(e){try{s(o.throw(e))}catch(e){n(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,u)}s((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(;u;)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 u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(n=u.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){u.label=r[1];break}if(6===r[0]&&u.label<n[1]){u.label=n[1],n=r;break}if(n&&u.label<n[2]){u.label=n[2],u.ops.push(r);break}n[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}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,u={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","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createBoard=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:t},body:e})]})})},t.prototype.getBoard=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:e,id:t}})]})})},t.prototype.getBoards=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:e}})]})})},t.prototype.updateBoard=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:t,id:r},customHeaders:{ETag:o},body:e})]})})},t.prototype.createBoardColumn=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:t,board:r},body:e})]})})},t.prototype.deleteBoardColumn=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:e,board:t,id:r},customHeaders:{ETag:o}})]})})},t.prototype.getBoardColumn=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:e,board:t,id:r}})]})})},t.prototype.getBoardColumns=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:e,board:t}})]})})},t.prototype.updateBoardColumn=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:t,board:r,id:o},customHeaders:{ETag:i},body:e})]})})},t.prototype.createBoardItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:t,board:r},body:e})]})})},t.prototype.getBoardItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:e,board:t,id:r}})]})})},t.prototype.getBoardItems=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:e,board:t}})]})})},t.prototype.updateBoardItem=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:t,board:r,id:o},customHeaders:{ETag:i},body:e})]})})},t.prototype.createBoardRow=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:t,board:r},body:e})]})})},t.prototype.deleteBoardRow=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:e,board:t,id:r},customHeaders:{ETag:o}})]})})},t.prototype.getBoardRow=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:e,board:t,id:r}})]})})},t.prototype.getBoardRows=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:e,board:t}})]})})},t.prototype.updateBoardRow=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:t,board:r,id:o},customHeaders:{ETag:i},body:e})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.BoardsRestClient=o});
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{s(o.next(e))}catch(e){n(e)}}function u(e){try{s(o.throw(e))}catch(e){n(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,u)}s((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(;u;)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 u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(n=u.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){u.label=r[1];break}if(6===r[0]&&u.label<n[1]){u.label=n[1],n=r;break}if(n&&u.label<n[2]){u.label=n[2],u.ops.push(r);break}n[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}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,u={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","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createBoard=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:t},body:e})]})})},t.prototype.getBoard=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:e,id:t}})]})})},t.prototype.getBoards=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:e}})]})})},t.prototype.updateBoard=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/boards/boards/{id}",routeValues:{project:t,id:r},customHeaders:{ETag:o},body:e})]})})},t.prototype.createBoardColumn=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:t,board:r},body:e})]})})},t.prototype.deleteBoardColumn=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:e,board:t,id:r},customHeaders:{ETag:o}})]})})},t.prototype.getBoardColumn=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:e,board:t,id:r}})]})})},t.prototype.getBoardColumns=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:e,board:t}})]})})},t.prototype.updateBoardColumn=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/boards/boards/{board}/columns/{id}",routeValues:{project:t,board:r,id:o},customHeaders:{ETag:i},body:e})]})})},t.prototype.createBoardItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:t,board:r},body:e})]})})},t.prototype.getBoardItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:e,board:t,id:r}})]})})},t.prototype.getBoardItems=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:e,board:t}})]})})},t.prototype.updateBoardItem=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/boards/boards/{board}/items/{*id}",routeValues:{project:t,board:r,id:o},customHeaders:{ETag:i},body:e})]})})},t.prototype.createBoardRow=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:t,board:r},body:e})]})})},t.prototype.deleteBoardRow=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:e,board:t,id:r},customHeaders:{ETag:o}})]})})},t.prototype.getBoardRow=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:e,board:t,id:r}})]})})},t.prototype.getBoardRows=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:e,board:t}})]})})},t.prototype.updateBoardRow=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/boards/boards/{board}/rows/{id}",routeValues:{project:t,board:r,id:o},customHeaders:{ETag:i},body:e})]})})},t.RESOURCE_AREA_ID="11635d5f-a4f9-43ea-a48b-d56be43fee0f",t}(r.RestClientBase);t.BoardsRestClient=o});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * Associates an artifact with a build.

@@ -1,1 +0,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 i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(o,n){function u(e){try{s(r.next(e))}catch(e){n(e)}}function a(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}var r,o,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:i,buildId:t},body:e})]})})},t.prototype.getArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:i,buildId:e},queryParams:r})]})})},t.prototype.getArtifactContentZip=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:i,buildId:e},queryParams:r})]})})},t.prototype.getArtifacts=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:t,buildId:e}})]})})},t.prototype.getFile=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={artifactName:t,fileId:i,fileName:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:o,buildId:e},queryParams:n})]})})},t.prototype.getAttachments=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/attachments/{type}",routeValues:{project:e,buildId:t,type:i}})]})})},t.prototype.getAttachment=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}",routeValues:{project:e,buildId:t,timelineId:i,recordId:r,type:o,name:n}})]})})},t.prototype.getBadge=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/public/build/definitions/{project}/{definitionId}/badge",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.listBranches=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={serviceEndpointId:i,repository:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/branches",routeValues:{project:e,providerName:t},queryParams:o})]})})},t.prototype.getBuildBadge=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.getBuildBadgeData=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.deleteBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t,buildId:e}})]})})},t.prototype.getBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={propertyFilters:i},[2,this.beginRequest({apiVersion:"5.0-preview.4",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t,buildId:e},queryParams:r})]})})},t.prototype.getBuilds=function(e,t,i,r,o,n,u,a,s,p,d,c,l,_,f,v,h,b,g,m,y){return __awaiter(this,void 0,void 0,function(){var w;return __generator(this,function(j){return w={definitions:t&&t.join(","),queues:i&&i.join(","),buildNumber:r,minTime:o,maxTime:n,requestedFor:u,reasonFilter:a,statusFilter:s,resultFilter:p,tagFilters:d&&d.join(","),properties:c&&c.join(","),$top:l,continuationToken:_,maxBuildsPerDefinition:f,deletedFilter:v,queryOrder:h,branchName:b,buildIds:g&&g.join(","),repositoryId:m,repositoryType:y},[2,this.beginRequest({apiVersion:"5.0-preview.4",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e},queryParams:w})]})})},t.prototype.queueBuild=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={ignoreWarnings:i,checkInTicket:r,sourceBuildId:o},[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},queryParams:n,body:e})]})})},t.prototype.updateBuild=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={retry:r},[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:i,buildId:t},queryParams:o,body:e})]})})},t.prototype.updateBuilds=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},body:e})]})})},t.prototype.getBuildChanges=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={continuationToken:i,$top:r,includeSourceChange:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/changes",routeValues:{project:e,buildId:t},queryParams:n})]})})},t.prototype.getChangesBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/changes",routeValues:{project:e},queryParams:o})]})})},t.prototype.getBuildController=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",routeValues:{controllerId:e}})]})})},t.prototype.getBuildControllers=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(i){return t={name:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",queryParams:t})]})})},t.prototype.createDefinition=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={definitionToCloneId:i,definitionToCloneRevision:r},[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.deleteDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t,definitionId:e}})]})})},t.prototype.getDefinition=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={revision:i,minMetricsTime:r,propertyFilters:o&&o.join(","),includeLatestBuilds:n},[2,this.beginRequest({apiVersion:"5.0-preview.6",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t,definitionId:e},queryParams:u})]})})},t.prototype.getDefinitions=function(e,t,i,r,o,n,u,a,s,p,d,c,l,_,f,v,h){return __awaiter(this,void 0,void 0,function(){var b;return __generator(this,function(g){return b={name:t,repositoryId:i,repositoryType:r,queryOrder:o,$top:n,continuationToken:u,minMetricsTime:a,definitionIds:s&&s.join(","),path:p,builtAfter:d,notBuiltAfter:c,includeAllProperties:l,includeLatestBuilds:_,taskIdFilter:f,processType:v,yamlFilename:h},[2,this.beginRequest({apiVersion:"5.0-preview.6",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e},queryParams:b})]})})},t.prototype.restoreDefinition=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={deleted:t},[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:i,definitionId:e},queryParams:r})]})})},t.prototype.updateDefinition=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={secretsSourceDefinitionId:r,secretsSourceDefinitionRevision:o},[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:i,definitionId:t},queryParams:n,body:e})]})})},t.prototype.getFileContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/fileContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.createFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t,path:i},body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e,path:t}})]})})},t.prototype.getFolders=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={queryOrder:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e,path:t},queryParams:r})]})})},t.prototype.updateFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t,path:i},body:e})]})})},t.prototype.getLatestBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/latest/{*definition}",routeValues:{project:e,definition:t},queryParams:r})]})})},t.prototype.getBuildLog=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogLines=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogsZip=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogZip=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getProjectMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/Metrics/{metricAggregationType}",routeValues:{project:e,metricAggregationType:t},queryParams:r})]})})},t.prototype.getDefinitionMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/Metrics",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.getBuildOptionDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/options",routeValues:{project:e}})]})})},t.prototype.getPathContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pathContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.updateBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:t,buildId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:t,definitionId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getPullRequest=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={repositoryId:r,serviceEndpointId:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pullRequests/{pullRequestId}",routeValues:{project:e,providerName:t,pullRequestId:i},queryParams:n})]})})},t.prototype.getRelatedWorkItemsForCommits=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={commits:i&&i.join(","),repositoryId:r,serviceEndpointId:o,$top:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/relatedWorkItems",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getRelatedWorkItemsForPullRequest=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={pullRequestId:i,repositoryId:r,serviceEndpointId:o,$top:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/relatedWorkItems",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getBuildReport=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildReportHtmlContent=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/html",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.listRepositories=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={serviceEndpointId:i,repository:r,resultSet:o,pageResults:n,continuationToken:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/repositories",routeValues:{project:e,providerName:t},queryParams:a})]})})},t.prototype.authorizeDefinitionResources=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.getDefinitionResources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getResourceUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/build/ResourceUsage"})]})})},t.prototype.getDefinitionRevisions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/revisions",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getBuildSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:e}})]})})},t.prototype.updateBuildSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:t},body:e})]})})},t.prototype.listSourceProviders=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders",routeValues:{project:e}})]})})},t.prototype.getStatusBadge=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={branchName:i,stageName:r,jobName:o,configuration:n,label:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/status/{*definition}",routeValues:{project:e,definition:t},queryParams:a})]})})},t.prototype.addBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.addBuildTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.deleteBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.getBuildTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t}})]})})},t.prototype.addDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.addDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.getDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={revision:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/tags",routeValues:{project:e}})]})})},t.prototype.deleteTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplates=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e}})]})})},t.prototype.saveTemplate=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:t,templateId:i},body:e})]})})},t.prototype.getTicketedArtifactContentZip=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={projectId:t,artifactName:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/public/build/builds/{buildId}/ticketedArtifacts",routeValues:{buildId:e},customHeaders:{"X-VSS-DownloadTicket":r},queryParams:o})]})})},t.prototype.getTicketedLogsContentZip=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={projectId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/public/build/builds/{buildId}/ticketedLogs",routeValues:{buildId:e},customHeaders:{"X-VSS-DownloadTicket":i},queryParams:r})]})})},t.prototype.getBuildTimeline=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={changeId:r,planId:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",routeValues:{project:e,buildId:t,timelineId:i},queryParams:n})]})})},t.prototype.restoreWebhooks=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={serviceEndpointId:r,repository:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:t,providerName:i},queryParams:n,body:e})]})})},t.prototype.listWebhooks=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={serviceEndpointId:i,repository:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:e,providerName:t},queryParams:o})]})})},t.prototype.getBuildWorkItemsRefs=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildWorkItemsRefsFromCommits=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:t,buildId:i},queryParams:o,body:e})]})})},t.prototype.getWorkItemsBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/workitems",routeValues:{project:e},queryParams:o})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(i.RestClientBase);t.BuildRestClient=r});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(o,n){function u(e){try{s(r.next(e))}catch(e){n(e)}}function a(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}var r,o,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:i,buildId:t},body:e})]})})},t.prototype.getArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:i,buildId:e},queryParams:r})]})})},t.prototype.getArtifactContentZip=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:i,buildId:e},queryParams:r})]})})},t.prototype.getArtifacts=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:t,buildId:e}})]})})},t.prototype.getFile=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={artifactName:t,fileId:i,fileName:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:o,buildId:e},queryParams:n})]})})},t.prototype.getAttachments=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/attachments/{type}",routeValues:{project:e,buildId:t,type:i}})]})})},t.prototype.getAttachment=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}",routeValues:{project:e,buildId:t,timelineId:i,recordId:r,type:o,name:n}})]})})},t.prototype.getBadge=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/public/build/definitions/{project}/{definitionId}/badge",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.listBranches=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={serviceEndpointId:i,repository:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/branches",routeValues:{project:e,providerName:t},queryParams:o})]})})},t.prototype.getBuildBadge=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.getBuildBadgeData=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.deleteBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t,buildId:e}})]})})},t.prototype.getBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={propertyFilters:i},[2,this.beginRequest({apiVersion:"5.0-preview.4",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t,buildId:e},queryParams:r})]})})},t.prototype.getBuilds=function(e,t,i,r,o,n,u,a,s,p,d,c,l,_,f,h,v,b,g,m,y){return __awaiter(this,void 0,void 0,function(){var w;return __generator(this,function(j){return w={definitions:t&&t.join(","),queues:i&&i.join(","),buildNumber:r,minTime:o,maxTime:n,requestedFor:u,reasonFilter:a,statusFilter:s,resultFilter:p,tagFilters:d&&d.join(","),properties:c&&c.join(","),$top:l,continuationToken:_,maxBuildsPerDefinition:f,deletedFilter:h,queryOrder:v,branchName:b,buildIds:g&&g.join(","),repositoryId:m,repositoryType:y},[2,this.beginRequest({apiVersion:"5.0-preview.4",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e},queryParams:w})]})})},t.prototype.queueBuild=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={ignoreWarnings:i,checkInTicket:r,sourceBuildId:o},[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},queryParams:n,body:e})]})})},t.prototype.updateBuild=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={retry:r},[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:i,buildId:t},queryParams:o,body:e})]})})},t.prototype.updateBuilds=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},body:e})]})})},t.prototype.getBuildChanges=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={continuationToken:i,$top:r,includeSourceChange:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/changes",routeValues:{project:e,buildId:t},queryParams:n})]})})},t.prototype.getChangesBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/changes",routeValues:{project:e},queryParams:o})]})})},t.prototype.getBuildController=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",routeValues:{controllerId:e}})]})})},t.prototype.getBuildControllers=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(i){return t={name:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",queryParams:t})]})})},t.prototype.createDefinition=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={definitionToCloneId:i,definitionToCloneRevision:r},[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.deleteDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t,definitionId:e}})]})})},t.prototype.getDefinition=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={revision:i,minMetricsTime:r,propertyFilters:o&&o.join(","),includeLatestBuilds:n},[2,this.beginRequest({apiVersion:"5.0-preview.6",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t,definitionId:e},queryParams:u})]})})},t.prototype.getDefinitions=function(e,t,i,r,o,n,u,a,s,p,d,c,l,_,f,h,v){return __awaiter(this,void 0,void 0,function(){var b;return __generator(this,function(g){return b={name:t,repositoryId:i,repositoryType:r,queryOrder:o,$top:n,continuationToken:u,minMetricsTime:a,definitionIds:s&&s.join(","),path:p,builtAfter:d,notBuiltAfter:c,includeAllProperties:l,includeLatestBuilds:_,taskIdFilter:f,processType:h,yamlFilename:v},[2,this.beginRequest({apiVersion:"5.0-preview.6",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e},queryParams:b})]})})},t.prototype.restoreDefinition=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={deleted:t},[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:i,definitionId:e},queryParams:r})]})})},t.prototype.updateDefinition=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={secretsSourceDefinitionId:r,secretsSourceDefinitionRevision:o},[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:i,definitionId:t},queryParams:n,body:e})]})})},t.prototype.getFileContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/fileContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.createFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t,path:i},body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e,path:t}})]})})},t.prototype.getFolders=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={queryOrder:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e,path:t},queryParams:r})]})})},t.prototype.updateFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t,path:i},body:e})]})})},t.prototype.getLatestBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/latest/{*definition}",routeValues:{project:e,definition:t},queryParams:r})]})})},t.prototype.getBuildLog=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogLines=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogsZip=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogZip=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getProjectMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/Metrics/{metricAggregationType}",routeValues:{project:e,metricAggregationType:t},queryParams:r})]})})},t.prototype.getDefinitionMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/Metrics",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.getBuildOptionDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/options",routeValues:{project:e}})]})})},t.prototype.getPathContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pathContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.updateBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:t,buildId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:t,definitionId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getPullRequest=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={repositoryId:r,serviceEndpointId:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pullRequests/{pullRequestId}",routeValues:{project:e,providerName:t,pullRequestId:i},queryParams:n})]})})},t.prototype.getRelatedWorkItemsForCommits=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={commits:i&&i.join(","),repositoryId:r,serviceEndpointId:o,$top:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/relatedWorkItems",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getRelatedWorkItemsForPullRequest=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={pullRequestId:i,repositoryId:r,serviceEndpointId:o,$top:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/relatedWorkItems",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getBuildReport=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildReportHtmlContent=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/html",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.listRepositories=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={serviceEndpointId:i,repository:r,resultSet:o,pageResults:n,continuationToken:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/repositories",routeValues:{project:e,providerName:t},queryParams:a})]})})},t.prototype.authorizeDefinitionResources=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.getDefinitionResources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getResourceUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/build/ResourceUsage"})]})})},t.prototype.getDefinitionRevisions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/revisions",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getBuildSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:e}})]})})},t.prototype.updateBuildSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:t},body:e})]})})},t.prototype.listSourceProviders=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders",routeValues:{project:e}})]})})},t.prototype.getStatusBadge=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={branchName:i,stageName:r,jobName:o,configuration:n,label:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/build/status/{*definition}",routeValues:{project:e,definition:t},queryParams:a})]})})},t.prototype.addBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.addBuildTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.deleteBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.getBuildTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t}})]})})},t.prototype.addDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.addDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.getDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={revision:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/tags",routeValues:{project:e}})]})})},t.prototype.deleteTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplates=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e}})]})})},t.prototype.saveTemplate=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:t,templateId:i},body:e})]})})},t.prototype.getTicketedArtifactContentZip=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={projectId:t,artifactName:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/public/build/builds/{buildId}/ticketedArtifacts",routeValues:{buildId:e},customHeaders:{"X-VSS-DownloadTicket":r},queryParams:o})]})})},t.prototype.getTicketedLogsContentZip=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={projectId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/public/build/builds/{buildId}/ticketedLogs",routeValues:{buildId:e},customHeaders:{"X-VSS-DownloadTicket":i},queryParams:r})]})})},t.prototype.getBuildTimeline=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={changeId:r,planId:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",routeValues:{project:e,buildId:t,timelineId:i},queryParams:n})]})})},t.prototype.restoreWebhooks=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={serviceEndpointId:r,repository:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:t,providerName:i},queryParams:n,body:e})]})})},t.prototype.listWebhooks=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={serviceEndpointId:i,repository:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:e,providerName:t},queryParams:o})]})})},t.prototype.getBuildWorkItemsRefs=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildWorkItemsRefsFromCommits=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:t,buildId:i},queryParams:o,body:e})]})})},t.prototype.getWorkItemsBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/build/workitems",routeValues:{project:e},queryParams:o})]})})},t.RESOURCE_AREA_ID="965220d5-5bb9-42cf-8d67-9b146df2a5a4",t}(i.RestClientBase);t.BuildRestClient=r});

@@ -6,2 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static readonly RESOURCE_AREA_ID: string;
/**

@@ -8,0 +9,0 @@ * Query for contribution nodes and provider details according the parameters in the passed in query object.

@@ -143,2 +143,3 @@ /*

};
ContributionsRestClient.RESOURCE_AREA_ID = "8477aec9-a4c7-4bd4-a456-ba4c53c989cb";
return ContributionsRestClient;

@@ -145,0 +146,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(u){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=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(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,u])}}var r,o,i,u,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.queryContributionNodes=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/Contribution/nodes/query",body:e})]})})},t.prototype.queryDataProviders=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/Contribution/dataProviders/query/{scopeName}/{scopeValue}",routeValues:{scopeName:t,scopeValue:n},body:e})]})})},t.prototype.getInstalledExtensions=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={contributionIds:e&&e.join(";"),includeDisabledApps:t,assetTypes:n&&n.join(":")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Contribution/InstalledApps/{extensionId}",queryParams:r})]})})},t.prototype.getInstalledExtensionByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={assetTypes:n&&n.join(":")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Contribution/InstalledApps/{publisherName}/{extensionName}",routeValues:{publisherName:e,extensionName:t},queryParams:r})]})})},t}(n.RestClientBase);t.ContributionsRestClient=r});
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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,u)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){u.label=n[1];break}if(6===n[0]&&u.label<i[1]){u.label=i[1],i=n;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(n);break}i[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/RestClientBase"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.queryContributionNodes=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/Contribution/nodes/query",body:e})]})})},t.prototype.queryDataProviders=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/Contribution/dataProviders/query/{scopeName}/{scopeValue}",routeValues:{scopeName:t,scopeValue:n},body:e})]})})},t.prototype.getInstalledExtensions=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={contributionIds:e&&e.join(";"),includeDisabledApps:t,assetTypes:n&&n.join(":")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Contribution/InstalledApps/{extensionId}",queryParams:r})]})})},t.prototype.getInstalledExtensionByName=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={assetTypes:n&&n.join(":")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Contribution/InstalledApps/{publisherName}/{extensionName}",routeValues:{publisherName:e,extensionName:t},queryParams:r})]})})},t.RESOURCE_AREA_ID="8477aec9-a4c7-4bd4-a456-ba4c53c989cb",t}(n.RestClientBase);t.ContributionsRestClient=r});

@@ -8,3 +8,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -11,0 +11,0 @@ * @param {Core.WebApiConnectedServiceDetails} connectedServiceCreationData

@@ -656,5 +656,3 @@ /*

};
CoreRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
CoreRestClient.RESOURCE_AREA_ID = "79134c72-4a58-4b42-976c-04e7115f32bf";
return CoreRestClient;

@@ -661,0 +659,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,1 @@

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,n){function u(e){try{s(i.next(e))}catch(e){n(e)}}function a(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(u,a)}s((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(n=2&r[0]?o.return:r[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,r[1])).done)return n;switch(o=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){a.label=r[1];break}if(6===r[0]&&a.label<n[1]){a.label=n[1],n=r;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(r);break}n[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],o=0}finally{i=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,u])}}var i,o,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createConnectedService=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/projects/{projectId}/connectedServices/{name}",routeValues:{projectId:t},body:e})]})})},t.prototype.getConnectedServiceDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/projects/{projectId}/connectedServices/{name}",routeValues:{projectId:e,name:t}})]})})},t.prototype.getConnectedServices=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={kind:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/projects/{projectId}/connectedServices/{name}",routeValues:{projectId:e},queryParams:r})]})})},t.prototype.createIdentityMru=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:t},body:e})]})})},t.prototype.deleteIdentityMru=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:t}})]})})},t.prototype.getIdentityMru=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:e}})]})})},t.prototype.updateIdentityMru=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:t},body:e})]})})},t.prototype.getTeamMembersWithExtendedProperties=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$top:r,$skip:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projects/{projectId}/teams/{teamId}/members",routeValues:{projectId:e,teamId:t},queryParams:o})]})})},t.prototype.getProcessById=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/process/processes/{*processId}",routeValues:{processId:e}})]})})},t.prototype.getProcesses=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/process/processes/{*processId}"})]})})},t.prototype.getProjectCollection=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projectCollections/{collectionId}",routeValues:{collectionId:e}})]})})},t.prototype.getProjectCollections=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={$top:e,$skip:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projectCollections/{collectionId}",queryParams:r})]})})},t.prototype.getProjectHistoryEntries=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={minRevision:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projectHistory",queryParams:t})]})})},t.prototype.getProject=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={includeCapabilities:t,includeHistory:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/projects/{*projectId}",routeValues:{projectId:e},queryParams:i})]})})},t.prototype.getProjects=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={stateFilter:e,$top:t,$skip:r,continuationToken:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/projects/{*projectId}",queryParams:o})]})})},t.prototype.queueCreateProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"_apis/projects/{*projectId}",body:e})]})})},t.prototype.queueDeleteProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"_apis/projects/{*projectId}",routeValues:{projectId:e}})]})})},t.prototype.updateProject=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"_apis/projects/{*projectId}",routeValues:{projectId:t},body:e})]})})},t.prototype.getProjectProperties=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={keys:t&&t.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/projects/{projectId}/properties",routeValues:{projectId:e},queryParams:r})]})})},t.prototype.setProjectProperties=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/projects/{projectId}/properties",routeValues:{projectId:e},customHeaders:{"Content-Type":"application/json-patch+json"},body:t})]})})},t.prototype.createOrUpdateProxy=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/proxies",body:e})]})})},t.prototype.deleteProxy=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={proxyUrl:e,site:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/proxies",queryParams:r})]})})},t.prototype.getProxies=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={proxyUrl:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/proxies",queryParams:t})]})})},t.prototype.getAllTeams=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={$mine:e,$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/teams",queryParams:i})]})})},t.prototype.createTeam=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:t},body:e})]})})},t.prototype.deleteTeam=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:e,teamId:t}})]})})},t.prototype.getTeam=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:e,teamId:t}})]})})},t.prototype.getTeams=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$mine:t,$top:r,$skip:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:e},queryParams:o})]})})},t.prototype.updateTeam=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:t,teamId:r},body:e})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.CoreRestClient=i});
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 u(e){try{s(o.next(e))}catch(e){n(e)}}function a(e){try{s(o.throw(e))}catch(e){n(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(u,a)}s((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){a.label=r[1];break}if(6===r[0]&&a.label<n[1]){a.label=n[1],n=r;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(r);break}n[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}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,u])}}var o,i,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createConnectedService=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/projects/{projectId}/connectedServices/{name}",routeValues:{projectId:t},body:e})]})})},t.prototype.getConnectedServiceDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/projects/{projectId}/connectedServices/{name}",routeValues:{projectId:e,name:t}})]})})},t.prototype.getConnectedServices=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={kind:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/projects/{projectId}/connectedServices/{name}",routeValues:{projectId:e},queryParams:r})]})})},t.prototype.createIdentityMru=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:t},body:e})]})})},t.prototype.deleteIdentityMru=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:t}})]})})},t.prototype.getIdentityMru=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:e}})]})})},t.prototype.updateIdentityMru=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/core/identityMru/{mruName}",routeValues:{mruName:t},body:e})]})})},t.prototype.getTeamMembersWithExtendedProperties=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$top:r,$skip:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projects/{projectId}/teams/{teamId}/members",routeValues:{projectId:e,teamId:t},queryParams:i})]})})},t.prototype.getProcessById=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/process/processes/{*processId}",routeValues:{processId:e}})]})})},t.prototype.getProcesses=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/process/processes/{*processId}"})]})})},t.prototype.getProjectCollection=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projectCollections/{collectionId}",routeValues:{collectionId:e}})]})})},t.prototype.getProjectCollections=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$top:e,$skip:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projectCollections/{collectionId}",queryParams:r})]})})},t.prototype.getProjectHistoryEntries=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={minRevision:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projectHistory",queryParams:t})]})})},t.prototype.getProject=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={includeCapabilities:t,includeHistory:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/projects/{*projectId}",routeValues:{projectId:e},queryParams:o})]})})},t.prototype.getProjects=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={stateFilter:e,$top:t,$skip:r,continuationToken:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/projects/{*projectId}",queryParams:i})]})})},t.prototype.queueCreateProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"_apis/projects/{*projectId}",body:e})]})})},t.prototype.queueDeleteProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"_apis/projects/{*projectId}",routeValues:{projectId:e}})]})})},t.prototype.updateProject=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"_apis/projects/{*projectId}",routeValues:{projectId:t},body:e})]})})},t.prototype.getProjectProperties=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={keys:t&&t.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/projects/{projectId}/properties",routeValues:{projectId:e},queryParams:r})]})})},t.prototype.setProjectProperties=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/projects/{projectId}/properties",routeValues:{projectId:e},customHeaders:{"Content-Type":"application/json-patch+json"},body:t})]})})},t.prototype.createOrUpdateProxy=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/proxies",body:e})]})})},t.prototype.deleteProxy=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={proxyUrl:e,site:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/proxies",queryParams:r})]})})},t.prototype.getProxies=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={proxyUrl:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/proxies",queryParams:t})]})})},t.prototype.getAllTeams=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={$mine:e,$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/teams",queryParams:o})]})})},t.prototype.createTeam=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:t},body:e})]})})},t.prototype.deleteTeam=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:e,teamId:t}})]})})},t.prototype.getTeam=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:e,teamId:t}})]})})},t.prototype.getTeams=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$mine:t,$top:r,$skip:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:e},queryParams:i})]})})},t.prototype.updateTeam=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/projects/{projectId}/teams/{*teamId}",routeValues:{projectId:t,teamId:r},body:e})]})})},t.RESOURCE_AREA_ID="79134c72-4a58-4b42-976c-04e7115f32bf",t}(r.RestClientBase);t.CoreRestClient=o});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * Create the supplied dashboard.

@@ -389,5 +389,3 @@ /*

};
DashboardRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
DashboardRestClient.RESOURCE_AREA_ID = "31c84e0a-3ece-48fd-a29d-100849af99ba";
return DashboardRestClient;

@@ -394,0 +392,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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(a,i){function n(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o.throw(e))}catch(e){i(e)}}function d(e){e.done?a(e.value):new r(function(t){t(e.value)}).then(n,s)}d((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,a=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(6===r[0]&&s.label<i[1]){s.label=i[1],i=r;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(r);break}i[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],a=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,a,i,n,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createDashboard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o},body:e})]})})},t.prototype.deleteDashboard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o,dashboardId:t}})]})})},t.prototype.getDashboard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o,dashboardId:t}})]})})},t.prototype.getDashboards=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:t,team:r}})]})})},t.prototype.replaceDashboard=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:o,team:a,dashboardId:r},body:e})]})})},t.prototype.replaceDashboards=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o},body:e})]})})},t.prototype.createWidget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:o,team:a,dashboardId:r},body:e})]})})},t.prototype.deleteWidget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:o,team:a,dashboardId:t,widgetId:r}})]})})},t.prototype.getWidget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:o,team:a,dashboardId:t,widgetId:r}})]})})},t.prototype.replaceWidget=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var a,i;return __generator(this,function(n){return a=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:a,team:i,dashboardId:r,widgetId:o},body:e})]})})},t.prototype.updateWidget=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var a,i;return __generator(this,function(n){return a=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:a,team:i,dashboardId:r,widgetId:o},body:e})]})})},t.prototype.getWidgetMetadata=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Dashboard/WidgetTypes/{contributionId}",routeValues:{project:t,contributionId:e}})]})})},t.prototype.getWidgetTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$scope:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Dashboard/WidgetTypes/{contributionId}",routeValues:{project:t},queryParams:r})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.DashboardRestClient=o});
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(a,i){function n(e){try{s(o.next(e))}catch(e){i(e)}}function d(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){e.done?a(e.value):new r(function(t){t(e.value)}).then(n,d)}s((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;d;)try{if(o=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return d.label++,{value:r[1],done:!1};case 5:d.label++,a=r[1],r=[0];continue;case 7:r=d.ops.pop(),d.trys.pop();continue;default:if(i=d.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){d=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){d.label=r[1];break}if(6===r[0]&&d.label<i[1]){d.label=i[1],i=r;break}if(i&&d.label<i[2]){d.label=i[2],d.ops.push(r);break}i[2]&&d.ops.pop(),d.trys.pop();continue}r=t.call(e,d)}catch(e){r=[6,e],a=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,a,i,n,d={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createDashboard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o},body:e})]})})},t.prototype.deleteDashboard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o,dashboardId:t}})]})})},t.prototype.getDashboard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o,dashboardId:t}})]})})},t.prototype.getDashboards=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:t,team:r}})]})})},t.prototype.replaceDashboard=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:o,team:a,dashboardId:r},body:e})]})})},t.prototype.replaceDashboards=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(a){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",routeValues:{project:r,team:o},body:e})]})})},t.prototype.createWidget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:o,team:a,dashboardId:r},body:e})]})})},t.prototype.deleteWidget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:o,team:a,dashboardId:t,widgetId:r}})]})})},t.prototype.getWidget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(i){return o=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:o,team:a,dashboardId:t,widgetId:r}})]})})},t.prototype.replaceWidget=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var a,i;return __generator(this,function(n){return a=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:a,team:i,dashboardId:r,widgetId:o},body:e})]})})},t.prototype.updateWidget=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var a,i;return __generator(this,function(n){return a=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",routeValues:{project:a,team:i,dashboardId:r,widgetId:o},body:e})]})})},t.prototype.getWidgetMetadata=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Dashboard/WidgetTypes/{contributionId}",routeValues:{project:t,contributionId:e}})]})})},t.prototype.getWidgetTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$scope:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Dashboard/WidgetTypes/{contributionId}",routeValues:{project:t},queryParams:r})]})})},t.RESOURCE_AREA_ID="31c84e0a-3ece-48fd-a29d-100849af99ba",t}(r.RestClientBase);t.DashboardRestClient=o});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * @param {string} itemId

@@ -602,5 +602,3 @@ /*

};
ExtensionManagementRestClient.defaultOptions = {
serviceInstanceType: "00000028-0000-8888-8000-000000000000"
};
ExtensionManagementRestClient.RESOURCE_AREA_ID = "6c2b0933-3600-42ae-bf8b-93d4f7e83594";
return ExtensionManagementRestClient;

@@ -607,0 +605,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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","../core/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:"5.0-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:"5.0-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/AcquisitionRequests",body:e})]})})},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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={includeDisabled:e,includeErrors:t,includeInstallationIssues:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/ExtensionManagement/ExtensionStates",queryParams:i})]})})},t.prototype.queryExtensions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-preview.1",routeTemplate:"_apis/ExtensionManagement/Token"})]})})},t.defaultOptions={serviceInstanceType:"00000028-0000-8888-8000-000000000000"},t}(n.RestClientBase);t.ExtensionManagementRestClient=i});
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","../core/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:"5.0-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:"5.0-preview.1",method:"POST",routeTemplate:"_apis/ExtensionManagement/AcquisitionRequests",body:e})]})})},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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={includeDisabled:e,includeErrors:t,includeInstallationIssues:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/ExtensionManagement/ExtensionStates",queryParams:i})]})})},t.prototype.queryExtensions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-preview.1",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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-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:"5.0-preview.1",routeTemplate:"_apis/ExtensionManagement/Token"})]})})},t.RESOURCE_AREA_ID="6c2b0933-3600-42ae-bf8b-93d4f7e83594",t}(n.RestClientBase);t.ExtensionManagementRestClient=i});

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * @param {string} extensionId

@@ -1,1 +0,1 @@

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(s){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}var i,n,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.shareExtensionById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/extensions/{extensionId}/accounts/{accountName}",routeValues:{extensionId:e,accountName:t}})]})})},t.prototype.unshareExtensionById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/extensions/{extensionId}/accounts/{accountName}",routeValues:{extensionId:e,accountName:t}})]})})},t.prototype.shareExtension=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",routeValues:{publisherName:e,extensionName:t,accountName:r}})]})})},t.prototype.unshareExtension=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",routeValues:{publisherName:e,extensionName:t,accountName:r}})]})})},t.prototype.getAcquisitionOptions=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={installationTarget:t,testCommerce:r,isFreeOrTrialInstall:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/acquisitionoptions/{itemId}",routeValues:{itemId:e},queryParams:n})]})})},t.prototype.requestAcquisition=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/acquisitionrequests",body:e})]})})},t.prototype.getAssetByName=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={accountToken:n,acceptDefault:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assetbyname/{*assetType}",routeValues:{publisherName:e,extensionName:t,version:r,assetType:i},customHeaders:{"X-Market-AccountToken":s},queryParams:a})]})})},t.prototype.getAsset=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={accountToken:i,acceptDefault:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/public/gallery/extensions/{extensionId}/{version}/assets/{assetType}",routeValues:{extensionId:e,version:t,assetType:r},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.getAssetAuthenticated=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={accountToken:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assets/{*assetType}",routeValues:{publisherName:e,extensionName:t,version:r,assetType:i},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.associateAzurePublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={azurePublisherId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/azurepublisher",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.queryAssociatedAzurePublisher=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/azurepublisher",routeValues:{publisherName:e}})]})})},t.prototype.getCategories=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={languages:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/categories",queryParams:t})]})})},t.prototype.getCategoryDetails=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={languages:t,product:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/categories/{categoryName}",routeValues:{categoryName:e},queryParams:i})]})})},t.prototype.getCategoryTree=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={lcid:r,source:i,productVersion:n,skus:o,subSkus:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/{product}/categories/{categoryId}",routeValues:{product:e,categoryId:t},queryParams:a})]})})},t.prototype.getRootCategories=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={lcid:t,source:r,productVersion:i,skus:n,subSkus:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/{product}/categories/root",routeValues:{product:e},queryParams:s})]})})},t.prototype.getCertificate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/certificates/{version}",routeValues:{publisherName:e,extensionName:t,version:r}})]})})},t.prototype.getContentVerificationLog=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/contentverificationlog",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.createDraftForEditExtension=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.performEditExtensionDraftOperation=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",routeValues:{publisherName:t,extensionName:r,draftId:i},body:e})]})})},t.prototype.updatePayloadInDraftForEditExtension=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",routeValues:{publisherName:t,extensionName:r,draftId:i},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileName":n},body:e,isRawData:!0})]})})},t.prototype.addAssetForEditExtensionDraft=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:t,extensionName:r,draftId:i,assetType:n},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.createDraftForNewExtension=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}",routeValues:{publisherName:t},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileProduct":r,"X-Market-UploadFileName":i},body:e,isRawData:!0})]})})},t.prototype.performNewExtensionDraftOperation=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}",routeValues:{publisherName:t,draftId:r},body:e})]})})},t.prototype.updatePayloadInDraftForNewExtension=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}",routeValues:{publisherName:t,draftId:r},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileName":i},body:e,isRawData:!0})]})})},t.prototype.addAssetForNewExtensionDraft=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:t,draftId:r,assetType:i},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.getAssetFromEditExtensionDraft=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={extensionName:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:e,draftId:t,assetType:r},queryParams:n})]})})},t.prototype.getAssetFromNewExtensionDraft=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:e,draftId:t,assetType:r}})]})})},t.prototype.getExtensionEvents=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={count:r,afterDate:i,include:n,includeProperty:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/events",routeValues:{publisherName:e,extensionName:t},queryParams:s})]})})},t.prototype.publishExtensionEvents=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/events",body:e})]})})},t.prototype.queryExtensions=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={accountToken:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/public/gallery/extensionquery",customHeaders:{"X-Market-AccountToken":r},queryParams:i,body:e})]})})},t.prototype.createExtension=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/gallery/extensions/{extensionId}",customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.deleteExtensionById=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={version:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/gallery/extensions/{extensionId}",routeValues:{extensionId:e},queryParams:r})]})})},t.prototype.getExtensionById=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={version:t,flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/gallery/extensions/{extensionId}",routeValues:{extensionId:e},queryParams:i})]})})},t.prototype.updateExtensionById=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/gallery/extensions/{extensionId}",routeValues:{extensionId:e}})]})})},t.prototype.createExtensionWithPublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:t},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.deleteExtension=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={version:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:e,extensionName:t},queryParams:i})]})})},t.prototype.getExtension=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={version:r,flags:i,accountToken:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:e,extensionName:t},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.updateExtension=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={bypassScopeCheck:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:t,extensionName:r},customHeaders:{"Content-Type":"application/octet-stream"},queryParams:n,body:e,isRawData:!0})]})})},t.prototype.updateExtensionProperties=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:e,extensionName:t},queryParams:i})]})})},t.prototype.shareExtensionWithHost=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",routeValues:{publisherName:e,extensionName:t,hostType:r,hostName:i}})]})})},t.prototype.unshareExtensionWithHost=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",routeValues:{publisherName:e,extensionName:t,hostType:r,hostName:i}})]})})},t.prototype.extensionValidator=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/extensionValidator",body:e})]})})},t.prototype.sendNotifications=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/notifications",body:e})]})})},t.prototype.getPackage=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={accountToken:i,acceptDefault:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/package",routeValues:{publisherName:e,extensionName:t,version:r},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.getAssetWithToken=function(e,t,r,i,n,o,s,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={accountToken:o,acceptDefault:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/privateasset/{assetToken}/{*assetType}",routeValues:{publisherName:e,extensionName:t,version:r,assetType:i,assetToken:n},customHeaders:{"X-Market-AccountToken":a},queryParams:u})]})})},t.prototype.deletePublisherAsset=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={assetType:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/publisherasset",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.getPublisherAsset=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={assetType:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/publisherasset",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.updatePublisherAsset=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={assetType:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/publisherasset",routeValues:{publisherName:t},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileName":i},queryParams:n,body:e,isRawData:!0})]})})},t.prototype.queryPublishers=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/public/gallery/publisherquery",body:e})]})})},t.prototype.createPublisher=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}",body:e})]})})},t.prototype.deletePublisher=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}",routeValues:{publisherName:e}})]})})},t.prototype.getPublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={flags:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.updatePublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}",routeValues:{publisherName:t},body:e})]})})},t.prototype.getQuestions=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={count:r,page:i,afterDate:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/qna",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.reportQuestion=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/qna/{questionId}/concern",routeValues:{pubName:t,extName:r,questionId:i},body:e})]})})},t.prototype.createQuestion=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",routeValues:{publisherName:t,extensionName:r},body:e})]})})},t.prototype.deleteQuestion=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",routeValues:{publisherName:e,extensionName:t,questionId:r}})]})})},t.prototype.updateQuestion=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",routeValues:{publisherName:t,extensionName:r,questionId:i},body:e})]})})},t.prototype.createResponse=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",routeValues:{publisherName:t,extensionName:r,questionId:i},body:e})]})})},t.prototype.deleteResponse=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",routeValues:{publisherName:e,extensionName:t,questionId:r,responseId:i}})]})})},t.prototype.updateResponse=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",routeValues:{publisherName:t,extensionName:r,questionId:i,responseId:n},body:e})]})})},t.prototype.getExtensionReports=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={days:r,count:i,afterDate:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/reports",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.getReviews=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={count:r,filterOptions:i,beforeDate:n,afterDate:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/reviews",routeValues:{publisherName:e,extensionName:t},queryParams:s})]})})},t.prototype.getReviewsSummary=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={beforeDate:r,afterDate:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{pubName}/extensions/{extName}/reviews/summary",routeValues:{pubName:e,extName:t},queryParams:n})]})})},t.prototype.createReview=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",routeValues:{pubName:t,extName:r},body:e})]})})},t.prototype.deleteReview=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",routeValues:{pubName:e,extName:t,reviewId:r}})]})})},t.prototype.updateReview=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",routeValues:{pubName:t,extName:r,reviewId:i},body:e})]})})},t.prototype.createCategory=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/categories",body:e})]})})},t.prototype.getGalleryUserSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/settings/{userScope}/{*key}",routeValues:{userScope:e,key:t}})]})})},t.prototype.setGalleryUserSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/settings/{userScope}/{*key}",routeValues:{userScope:t},body:e})]})})},t.prototype.generateKey=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={expireCurrentSeconds:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/signingkey/{keyType}",routeValues:{keyType:e},queryParams:r})]})})},t.prototype.getSigningKey=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/signingkey/{keyType}",routeValues:{keyType:e}})]})})},t.prototype.updateExtensionStatistics=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/statistics",routeValues:{publisherName:t,extensionName:r},body:e})]})})},t.prototype.getExtensionDailyStats=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={days:r,aggregate:i,afterDate:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/stats",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.getExtensionDailyStatsAnonymous=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",routeValues:{publisherName:e,extensionName:t,version:r}})]})})},t.prototype.incrementExtensionDailyStat=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={statType:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",routeValues:{publisherName:e,extensionName:t,version:r},queryParams:n})]})})},t.prototype.getVerificationLog=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/verificationlog",routeValues:{publisherName:e,extensionName:t,version:r}})]})})},t.defaultOptions={serviceInstanceType:"00000029-0000-8888-8000-000000000000"},t}(r.RestClientBase);t.GalleryRestClient=i});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(s){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}var i,n,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.shareExtensionById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/extensions/{extensionId}/accounts/{accountName}",routeValues:{extensionId:e,accountName:t}})]})})},t.prototype.unshareExtensionById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/extensions/{extensionId}/accounts/{accountName}",routeValues:{extensionId:e,accountName:t}})]})})},t.prototype.shareExtension=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",routeValues:{publisherName:e,extensionName:t,accountName:r}})]})})},t.prototype.unshareExtension=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",routeValues:{publisherName:e,extensionName:t,accountName:r}})]})})},t.prototype.getAcquisitionOptions=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={installationTarget:t,testCommerce:r,isFreeOrTrialInstall:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/acquisitionoptions/{itemId}",routeValues:{itemId:e},queryParams:n})]})})},t.prototype.requestAcquisition=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/acquisitionrequests",body:e})]})})},t.prototype.getAssetByName=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={accountToken:n,acceptDefault:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assetbyname/{*assetType}",routeValues:{publisherName:e,extensionName:t,version:r,assetType:i},customHeaders:{"X-Market-AccountToken":s},queryParams:a})]})})},t.prototype.getAsset=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={accountToken:i,acceptDefault:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/public/gallery/extensions/{extensionId}/{version}/assets/{assetType}",routeValues:{extensionId:e,version:t,assetType:r},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.getAssetAuthenticated=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={accountToken:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assets/{*assetType}",routeValues:{publisherName:e,extensionName:t,version:r,assetType:i},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.associateAzurePublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={azurePublisherId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/azurepublisher",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.queryAssociatedAzurePublisher=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/azurepublisher",routeValues:{publisherName:e}})]})})},t.prototype.getCategories=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={languages:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/categories",queryParams:t})]})})},t.prototype.getCategoryDetails=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={languages:t,product:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/categories/{categoryName}",routeValues:{categoryName:e},queryParams:i})]})})},t.prototype.getCategoryTree=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={lcid:r,source:i,productVersion:n,skus:o,subSkus:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/{product}/categories/{categoryId}",routeValues:{product:e,categoryId:t},queryParams:a})]})})},t.prototype.getRootCategories=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={lcid:t,source:r,productVersion:i,skus:n,subSkus:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/{product}/categories/root",routeValues:{product:e},queryParams:s})]})})},t.prototype.getCertificate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/certificates/{version}",routeValues:{publisherName:e,extensionName:t,version:r}})]})})},t.prototype.getContentVerificationLog=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/contentverificationlog",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.createDraftForEditExtension=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",routeValues:{publisherName:e,extensionName:t}})]})})},t.prototype.performEditExtensionDraftOperation=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",routeValues:{publisherName:t,extensionName:r,draftId:i},body:e})]})})},t.prototype.updatePayloadInDraftForEditExtension=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",routeValues:{publisherName:t,extensionName:r,draftId:i},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileName":n},body:e,isRawData:!0})]})})},t.prototype.addAssetForEditExtensionDraft=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:t,extensionName:r,draftId:i,assetType:n},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.createDraftForNewExtension=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}",routeValues:{publisherName:t},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileProduct":r,"X-Market-UploadFileName":i},body:e,isRawData:!0})]})})},t.prototype.performNewExtensionDraftOperation=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}",routeValues:{publisherName:t,draftId:r},body:e})]})})},t.prototype.updatePayloadInDraftForNewExtension=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}",routeValues:{publisherName:t,draftId:r},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileName":i},body:e,isRawData:!0})]})})},t.prototype.addAssetForNewExtensionDraft=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:t,draftId:r,assetType:i},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.getAssetFromEditExtensionDraft=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={extensionName:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:e,draftId:t,assetType:r},queryParams:n})]})})},t.prototype.getAssetFromNewExtensionDraft=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",routeValues:{publisherName:e,draftId:t,assetType:r}})]})})},t.prototype.getExtensionEvents=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={count:r,afterDate:i,include:n,includeProperty:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/events",routeValues:{publisherName:e,extensionName:t},queryParams:s})]})})},t.prototype.publishExtensionEvents=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/events",body:e})]})})},t.prototype.queryExtensions=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={accountToken:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/public/gallery/extensionquery",customHeaders:{"X-Market-AccountToken":r},queryParams:i,body:e})]})})},t.prototype.createExtension=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/gallery/extensions/{extensionId}",customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.deleteExtensionById=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={version:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/gallery/extensions/{extensionId}",routeValues:{extensionId:e},queryParams:r})]})})},t.prototype.getExtensionById=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={version:t,flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/gallery/extensions/{extensionId}",routeValues:{extensionId:e},queryParams:i})]})})},t.prototype.updateExtensionById=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/gallery/extensions/{extensionId}",routeValues:{extensionId:e}})]})})},t.prototype.createExtensionWithPublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:t},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.deleteExtension=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={version:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:e,extensionName:t},queryParams:i})]})})},t.prototype.getExtension=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={version:r,flags:i,accountToken:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:e,extensionName:t},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.updateExtension=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={bypassScopeCheck:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:t,extensionName:r},customHeaders:{"Content-Type":"application/octet-stream"},queryParams:n,body:e,isRawData:!0})]})})},t.prototype.updateExtensionProperties=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",routeValues:{publisherName:e,extensionName:t},queryParams:i})]})})},t.prototype.shareExtensionWithHost=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",routeValues:{publisherName:e,extensionName:t,hostType:r,hostName:i}})]})})},t.prototype.unshareExtensionWithHost=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",routeValues:{publisherName:e,extensionName:t,hostType:r,hostName:i}})]})})},t.prototype.extensionValidator=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/extensionValidator",body:e})]})})},t.prototype.sendNotifications=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/notifications",body:e})]})})},t.prototype.getPackage=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={accountToken:i,acceptDefault:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/package",routeValues:{publisherName:e,extensionName:t,version:r},customHeaders:{"X-Market-AccountToken":o},queryParams:s})]})})},t.prototype.getAssetWithToken=function(e,t,r,i,n,o,s,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={accountToken:o,acceptDefault:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/privateasset/{assetToken}/{*assetType}",routeValues:{publisherName:e,extensionName:t,version:r,assetType:i,assetToken:n},customHeaders:{"X-Market-AccountToken":a},queryParams:u})]})})},t.prototype.deletePublisherAsset=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={assetType:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/publisherasset",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.getPublisherAsset=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={assetType:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/publisherasset",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.updatePublisherAsset=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={assetType:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}/publisherasset",routeValues:{publisherName:t},customHeaders:{"Content-Type":"application/octet-stream","X-Market-UploadFileName":i},queryParams:n,body:e,isRawData:!0})]})})},t.prototype.queryPublishers=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/public/gallery/publisherquery",body:e})]})})},t.prototype.createPublisher=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}",body:e})]})})},t.prototype.deletePublisher=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}",routeValues:{publisherName:e}})]})})},t.prototype.getPublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={flags:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}",routeValues:{publisherName:e},queryParams:r})]})})},t.prototype.updatePublisher=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/gallery/publishers/{publisherName}",routeValues:{publisherName:t},body:e})]})})},t.prototype.getQuestions=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={count:r,page:i,afterDate:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/qna",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.reportQuestion=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/qna/{questionId}/concern",routeValues:{pubName:t,extName:r,questionId:i},body:e})]})})},t.prototype.createQuestion=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",routeValues:{publisherName:t,extensionName:r},body:e})]})})},t.prototype.deleteQuestion=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",routeValues:{publisherName:e,extensionName:t,questionId:r}})]})})},t.prototype.updateQuestion=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",routeValues:{publisherName:t,extensionName:r,questionId:i},body:e})]})})},t.prototype.createResponse=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",routeValues:{publisherName:t,extensionName:r,questionId:i},body:e})]})})},t.prototype.deleteResponse=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",routeValues:{publisherName:e,extensionName:t,questionId:r,responseId:i}})]})})},t.prototype.updateResponse=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",routeValues:{publisherName:t,extensionName:r,questionId:i,responseId:n},body:e})]})})},t.prototype.getExtensionReports=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={days:r,count:i,afterDate:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/reports",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.getReviews=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={count:r,filterOptions:i,beforeDate:n,afterDate:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/reviews",routeValues:{publisherName:e,extensionName:t},queryParams:s})]})})},t.prototype.getReviewsSummary=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={beforeDate:r,afterDate:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{pubName}/extensions/{extName}/reviews/summary",routeValues:{pubName:e,extName:t},queryParams:n})]})})},t.prototype.createReview=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",routeValues:{pubName:t,extName:r},body:e})]})})},t.prototype.deleteReview=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",routeValues:{pubName:e,extName:t,reviewId:r}})]})})},t.prototype.updateReview=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",routeValues:{pubName:t,extName:r,reviewId:i},body:e})]})})},t.prototype.createCategory=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/categories",body:e})]})})},t.prototype.getGalleryUserSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/settings/{userScope}/{*key}",routeValues:{userScope:e,key:t}})]})})},t.prototype.setGalleryUserSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/settings/{userScope}/{*key}",routeValues:{userScope:t},body:e})]})})},t.prototype.generateKey=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={expireCurrentSeconds:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/gallery/signingkey/{keyType}",routeValues:{keyType:e},queryParams:r})]})})},t.prototype.getSigningKey=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/signingkey/{keyType}",routeValues:{keyType:e}})]})})},t.prototype.updateExtensionStatistics=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/gallery/publisher/{publisherName}/extension/{extensionName}/statistics",routeValues:{publisherName:t,extensionName:r},body:e})]})})},t.prototype.getExtensionDailyStats=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={days:r,aggregate:i,afterDate:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/stats",routeValues:{publisherName:e,extensionName:t},queryParams:o})]})})},t.prototype.getExtensionDailyStatsAnonymous=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",routeValues:{publisherName:e,extensionName:t,version:r}})]})})},t.prototype.incrementExtensionDailyStat=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={statType:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",routeValues:{publisherName:e,extensionName:t,version:r},queryParams:n})]})})},t.prototype.getVerificationLog=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/verificationlog",routeValues:{publisherName:e,extensionName:t,version:r}})]})})},t.RESOURCE_AREA_ID="69d21c00-f135-441b-b5ce-3626378e0819",t}(r.RestClientBase);t.GalleryRestClient=i});

@@ -1,1 +0,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,s){function u(e){try{p(o.next(e))}catch(e){s(e)}}function n(e){try{p(o.throw(e))}catch(e){s(e)}}function p(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(u,n)}p((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,i=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){n=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(6===r[0]&&n.label<s[1]){n.label=s[1],s=r;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(r);break}s[2]&&n.ops.pop(),n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,u])}}var o,i,s,u,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createAnnotatedTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getAnnotatedTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}",routeValues:{project:e,repositoryId:t,objectId:r}})]})})},t.prototype.getBlob=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={download:o,fileName:i,resolveLfs:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getBlobContent=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={download:o,fileName:i,resolveLfs:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getBlobsZip=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={filename:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:t},queryParams:i,body:e})]})})},t.prototype.getBlobZip=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={download:o,fileName:i,resolveLfs:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getBranch=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={name:t,baseVersionDescriptor:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/stats/branches",routeValues:{project:r,repositoryId:e},queryParams:i})]})})},t.prototype.getBranches=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={baseVersionDescriptor:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/stats/branches",routeValues:{project:t,repositoryId:e},queryParams:o})]})})},t.prototype.getBranchStatsBatch=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/stats/branches",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.getChanges=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={top:o,skip:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Changes",routeValues:{project:r,commitId:e,repositoryId:t},queryParams:s})]})})},t.prototype.getCherryPickRelationships=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/cherryPickRelationships/{commitId}",routeValues:{project:r,repositoryNameOrId:e,commitId:t},queryParams:i})]})})},t.prototype.createCherryPick=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getCherryPick=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",routeValues:{project:e,cherryPickId:t,repositoryId:r}})]})})},t.prototype.getCherryPickForRefName=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={refName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",routeValues:{project:e,repositoryId:t},queryParams:o})]})})},t.prototype.getCommit=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={changeCount:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",routeValues:{project:r,commitId:e,repositoryId:t},queryParams:i})]})})},t.prototype.getCommits=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={searchCriteria:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",routeValues:{project:r,repositoryId:e},queryParams:o})]})})},t.prototype.getPushCommits=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={pushId:t,top:o,skip:i,includeLinks:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",routeValues:{project:r,repositoryId:e},queryParams:u})]})})},t.prototype.getCommitsBatch=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={$skip:o,$top:i,includeStatuses:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/CommitsBatch",routeValues:{project:r,repositoryId:t},queryParams:u,body:e})]})})},t.prototype.getDeletedRepositories=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/DeletedRepositories",routeValues:{project:e}})]})})},t.prototype.getForks=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}",routeValues:{project:r,repositoryNameOrId:e,collectionId:t},queryParams:i})]})})},t.prototype.createForkSyncRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",routeValues:{project:r,repositoryNameOrId:t},queryParams:i,body:e})]})})},t.prototype.getForkSyncRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",routeValues:{project:r,repositoryNameOrId:e,forkSyncOperationId:t},queryParams:i})]})})},t.prototype.getForkSyncRequests=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeAbandoned:r,includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",routeValues:{project:t,repositoryNameOrId:e},queryParams:i})]})})},t.prototype.createImportRequest=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getImportRequest=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:e,repositoryId:t,importRequestId:r}})]})})},t.prototype.queryImportRequests=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={includeAbandoned:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:e,repositoryId:t},queryParams:o})]})})},t.prototype.updateImportRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:t,repositoryId:r,importRequestId:o},body:e})]})})},t.prototype.getItem=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItemContent=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItems=function(e,t,r,o,i,s,u,n,p){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(d){return a={scopePath:r,recursionLevel:o,includeContentMetadata:i,latestProcessedChange:s,download:u,includeLinks:n,versionDescriptor:p},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:t,repositoryId:e},queryParams:a})]})})},t.prototype.getItemText=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItemZip=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItemsBatch=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/ItemsBatch",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.getMergeBases=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={otherCommitId:r,otherCollectionId:i,otherRepositoryId:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/commits/{commitId}/mergeBases",routeValues:{project:o,repositoryNameOrId:e,commitId:t},queryParams:u})]})})},t.prototype.createAttachment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:i,fileName:t,repositoryId:r,pullRequestId:o},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.deleteAttachment=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:o,fileName:e,repositoryId:t,pullRequestId:r}})]})})},t.prototype.getAttachmentContent=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:o,fileName:e,repositoryId:t,pullRequestId:r}})]})})},t.prototype.getAttachments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.getAttachmentZip=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:o,fileName:e,repositoryId:t,pullRequestId:r}})]})})},t.prototype.createLike=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.deleteLike=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getLikes=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getPullRequestIterationCommits=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/commits",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r}})]})})},t.prototype.getPullRequestCommits=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/commits",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.getPullRequestConflict=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,conflictId:r}})]})})},t.prototype.getPullRequestConflicts=function(e,t,r,o,i,s,u,n){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(a){return p={$skip:o,$top:i,includeObsolete:s,excludeResolved:u,onlyResolved:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:p})]})})},t.prototype.updatePullRequestConflict=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,conflictId:o},body:e})]})})},t.prototype.updatePullRequestConflicts=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.getPullRequestIterationChanges=function(e,t,r,o,i,s,u){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(p){return n={$top:i,$skip:s,$compareTo:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r},queryParams:n})]})})},t.prototype.getPullRequestIteration=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r}})]})})},t.prototype.getPullRequestIterations=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeCommits:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:i})]})})},t.prototype.createPullRequestIterationStatus=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,iterationId:o},body:e})]})})},t.prototype.deletePullRequestIterationStatus=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,iterationId:r,statusId:o}})]})})},t.prototype.getPullRequestIterationStatus=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,iterationId:r,statusId:o}})]})})},t.prototype.getPullRequestIterationStatuses=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r}})]})})},t.prototype.updatePullRequestIterationStatuses=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,iterationId:o},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.createPullRequestLabel=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:o,repositoryId:t,pullRequestId:r},queryParams:s,body:e})]})})},t.prototype.deletePullRequestLabels=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:o,repositoryId:e,pullRequestId:t,labelIdOrName:r},queryParams:s})]})})},t.prototype.getPullRequestLabel=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:o,repositoryId:e,pullRequestId:t,labelIdOrName:r},queryParams:s})]})})},t.prototype.getPullRequestLabels=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={projectId:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:i})]})})},t.prototype.getPullRequestProperties=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.updatePullRequestProperties=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties",routeValues:{project:o,repositoryId:t,pullRequestId:r},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getPullRequestQuery=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequestQuery",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.createPullRequestReviewer=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,reviewerId:o},body:e})]})})},t.prototype.createPullRequestReviewers=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.deletePullRequestReviewer=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,reviewerId:r}})]})})},t.prototype.getPullRequestReviewer=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,reviewerId:r}})]})})},t.prototype.getPullRequestReviewers=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.updatePullRequestReviewers=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.getPullRequestById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/PullRequests/{pullRequestId}",routeValues:{project:t,pullRequestId:e}})]})})},t.prototype.getPullRequestsByProject=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={searchCriteria:t,maxCommentLength:r,$skip:o,$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/PullRequests",routeValues:{project:e},queryParams:s})]})})},t.prototype.createPullRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={supportsIterations:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:r,repositoryId:t},queryParams:i,body:e})]})})},t.prototype.getPullRequest=function(e,t,r,o,i,s,u,n){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(a){return p={maxCommentLength:o,$skip:i,$top:s,includeCommits:u,includeWorkItemRefs:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:p})]})})},t.prototype.getPullRequests=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={searchCriteria:t,maxCommentLength:o,$skip:i,$top:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:r,repositoryId:e},queryParams:u})]})})},t.prototype.updatePullRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.sharePullRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/share",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.createPullRequestStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.deletePullRequestStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,statusId:r}})]})})},t.prototype.getPullRequestStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,statusId:r}})]})})},t.prototype.getPullRequestStatuses=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.updatePullRequestStatuses=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.createComment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,threadId:o},body:e})]})})},t.prototype.deleteComment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getComment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getComments=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,threadId:r}})]})})},t.prototype.updateComment=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:s,repositoryId:t,pullRequestId:r,threadId:o,commentId:i},body:e})]})})},t.prototype.createThread=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.getPullRequestThread=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={$iteration:i,$baseIteration:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,threadId:r},queryParams:u})]})})},t.prototype.getThreads=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={$iteration:o,$baseIteration:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:s})]})})},t.prototype.updateThread=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,threadId:o},body:e})]})})},t.prototype.getPullRequestWorkItemRefs=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.createPush=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.getPush=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={includeCommits:o,includeRefUpdates:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",routeValues:{project:r,repositoryId:e,pushId:t},queryParams:s})]})})},t.prototype.getPushes=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={$skip:r,$top:o,searchCriteria:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",routeValues:{project:t,repositoryId:e},queryParams:s})]})})},t.prototype.deleteRepositoryFromRecycleBin=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/recycleBin/repositories/{repositoryId}",routeValues:{project:e,repositoryId:t}})]})})},t.prototype.getRecycleBinRepositories=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/recycleBin/repositories/{repositoryId}",routeValues:{project:e}})]})})},t.prototype.restoreRepositoryFromRecycleBin=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/recycleBin/repositories/{repositoryId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getRefs=function(e,t,r,o,i,s,u,n,p){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(d){return a={filter:r,includeLinks:o,includeStatuses:i,includeMyBranches:s,latestStatusesOnly:u,peelTags:n,filterContains:p},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",routeValues:{project:t,repositoryId:e},queryParams:a})]})})},t.prototype.updateRef=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={filter:r,projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",routeValues:{project:o,repositoryId:t},queryParams:s,body:e})]})})},t.prototype.updateRefs=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={projectId:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",routeValues:{project:r,repositoryId:t},queryParams:i,body:e})]})})},t.prototype.createFavorite=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRefFavorite=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:e,favoriteId:t}})]})})},t.prototype.getRefFavorite=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:e,favoriteId:t}})]})})},t.prototype.getRefFavorites=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={repositoryId:t,identityId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.createRepository=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={sourceRef:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.deleteRepository=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:t,repositoryId:e}})]})})},t.prototype.getRepositories=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:t,includeAllUrls:r,includeHidden:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getRepository=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:t,repositoryId:e}})]})})},t.prototype.getRepositoryWithParent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={includeParent:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:r,repositoryId:e},queryParams:o})]})})},t.prototype.updateRepository=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.createRevert=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getRevert=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",routeValues:{project:e,revertId:t,repositoryId:r}})]})})},t.prototype.getRevertForRefName=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={refName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",routeValues:{project:e,repositoryId:t},queryParams:o})]})})},t.prototype.createCommitStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses",routeValues:{project:o,commitId:t,repositoryId:r},body:e})]})})},t.prototype.getStatuses=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={top:o,skip:i,latestOnly:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses",routeValues:{project:r,commitId:e,repositoryId:t},queryParams:u})]})})},t.prototype.getSuggestions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/suggestions",routeValues:{project:t,repositoryId:e}})]})})},t.prototype.getTree=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={projectId:o,recursive:i,fileName:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getTreeZip=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={projectId:o,recursive:i,fileName:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.GitRestClient=o});
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,s){function u(e){try{p(o.next(e))}catch(e){s(e)}}function n(e){try{p(o.throw(e))}catch(e){s(e)}}function p(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(u,n)}p((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,i=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){n=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(6===r[0]&&n.label<s[1]){n.label=s[1],s=r;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(r);break}s[2]&&n.ops.pop(),n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,u])}}var o,i,s,u,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createAnnotatedTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getAnnotatedTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}",routeValues:{project:e,repositoryId:t,objectId:r}})]})})},t.prototype.getBlob=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={download:o,fileName:i,resolveLfs:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getBlobContent=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={download:o,fileName:i,resolveLfs:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getBlobsZip=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={filename:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:t},queryParams:i,body:e})]})})},t.prototype.getBlobZip=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={download:o,fileName:i,resolveLfs:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getBranch=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={name:t,baseVersionDescriptor:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/stats/branches",routeValues:{project:r,repositoryId:e},queryParams:i})]})})},t.prototype.getBranches=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={baseVersionDescriptor:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/stats/branches",routeValues:{project:t,repositoryId:e},queryParams:o})]})})},t.prototype.getBranchStatsBatch=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/stats/branches",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.getChanges=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={top:o,skip:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Changes",routeValues:{project:r,commitId:e,repositoryId:t},queryParams:s})]})})},t.prototype.getCherryPickRelationships=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/cherryPickRelationships/{commitId}",routeValues:{project:r,repositoryNameOrId:e,commitId:t},queryParams:i})]})})},t.prototype.createCherryPick=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getCherryPick=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",routeValues:{project:e,cherryPickId:t,repositoryId:r}})]})})},t.prototype.getCherryPickForRefName=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={refName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",routeValues:{project:e,repositoryId:t},queryParams:o})]})})},t.prototype.getCommit=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={changeCount:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",routeValues:{project:r,commitId:e,repositoryId:t},queryParams:i})]})})},t.prototype.getCommits=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={searchCriteria:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",routeValues:{project:r,repositoryId:e},queryParams:o})]})})},t.prototype.getPushCommits=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={pushId:t,top:o,skip:i,includeLinks:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",routeValues:{project:r,repositoryId:e},queryParams:u})]})})},t.prototype.getCommitsBatch=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={$skip:o,$top:i,includeStatuses:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/CommitsBatch",routeValues:{project:r,repositoryId:t},queryParams:u,body:e})]})})},t.prototype.getDeletedRepositories=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/DeletedRepositories",routeValues:{project:e}})]})})},t.prototype.getForks=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}",routeValues:{project:r,repositoryNameOrId:e,collectionId:t},queryParams:i})]})})},t.prototype.createForkSyncRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",routeValues:{project:r,repositoryNameOrId:t},queryParams:i,body:e})]})})},t.prototype.getForkSyncRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",routeValues:{project:r,repositoryNameOrId:e,forkSyncOperationId:t},queryParams:i})]})})},t.prototype.getForkSyncRequests=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeAbandoned:r,includeLinks:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",routeValues:{project:t,repositoryNameOrId:e},queryParams:i})]})})},t.prototype.createImportRequest=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getImportRequest=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:e,repositoryId:t,importRequestId:r}})]})})},t.prototype.queryImportRequests=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={includeAbandoned:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:e,repositoryId:t},queryParams:o})]})})},t.prototype.updateImportRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",routeValues:{project:t,repositoryId:r,importRequestId:o},body:e})]})})},t.prototype.getItem=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItemContent=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItems=function(e,t,r,o,i,s,u,n,p){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(d){return a={scopePath:r,recursionLevel:o,includeContentMetadata:i,latestProcessedChange:s,download:u,includeLinks:n,versionDescriptor:p},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:t,repositoryId:e},queryParams:a})]})})},t.prototype.getItemText=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItemZip=function(e,t,r,o,i,s,u,n,p,a,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={path:t,scopePath:o,recursionLevel:i,includeContentMetadata:s,latestProcessedChange:u,download:n,versionDescriptor:p,includeContent:a,resolveLfs:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",routeValues:{project:r,repositoryId:e},queryParams:c})]})})},t.prototype.getItemsBatch=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/ItemsBatch",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.getMergeBases=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={otherCommitId:r,otherCollectionId:i,otherRepositoryId:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryNameOrId}/commits/{commitId}/mergeBases",routeValues:{project:o,repositoryNameOrId:e,commitId:t},queryParams:u})]})})},t.prototype.createAttachment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:i,fileName:t,repositoryId:r,pullRequestId:o},customHeaders:{"Content-Type":"application/octet-stream"},body:e,isRawData:!0})]})})},t.prototype.deleteAttachment=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:o,fileName:e,repositoryId:t,pullRequestId:r}})]})})},t.prototype.getAttachmentContent=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:o,fileName:e,repositoryId:t,pullRequestId:r}})]})})},t.prototype.getAttachments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.getAttachmentZip=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",routeValues:{project:o,fileName:e,repositoryId:t,pullRequestId:r}})]})})},t.prototype.createLike=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.deleteLike=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getLikes=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getPullRequestIterationCommits=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/commits",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r}})]})})},t.prototype.getPullRequestCommits=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/commits",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.getPullRequestConflict=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,conflictId:r}})]})})},t.prototype.getPullRequestConflicts=function(e,t,r,o,i,s,u,n){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(a){return p={$skip:o,$top:i,includeObsolete:s,excludeResolved:u,onlyResolved:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:p})]})})},t.prototype.updatePullRequestConflict=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,conflictId:o},body:e})]})})},t.prototype.updatePullRequestConflicts=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.getPullRequestIterationChanges=function(e,t,r,o,i,s,u){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(p){return n={$top:i,$skip:s,$compareTo:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r},queryParams:n})]})})},t.prototype.getPullRequestIteration=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r}})]})})},t.prototype.getPullRequestIterations=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeCommits:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:i})]})})},t.prototype.createPullRequestIterationStatus=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,iterationId:o},body:e})]})})},t.prototype.deletePullRequestIterationStatus=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,iterationId:r,statusId:o}})]})})},t.prototype.getPullRequestIterationStatus=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,iterationId:r,statusId:o}})]})})},t.prototype.getPullRequestIterationStatuses=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,iterationId:r}})]})})},t.prototype.updatePullRequestIterationStatuses=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,iterationId:o},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.createPullRequestLabel=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:o,repositoryId:t,pullRequestId:r},queryParams:s,body:e})]})})},t.prototype.deletePullRequestLabels=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:o,repositoryId:e,pullRequestId:t,labelIdOrName:r},queryParams:s})]})})},t.prototype.getPullRequestLabel=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:o,repositoryId:e,pullRequestId:t,labelIdOrName:r},queryParams:s})]})})},t.prototype.getPullRequestLabels=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={projectId:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:i})]})})},t.prototype.getPullRequestProperties=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.updatePullRequestProperties=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties",routeValues:{project:o,repositoryId:t,pullRequestId:r},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getPullRequestQuery=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequestQuery",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.createPullRequestReviewer=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,reviewerId:o},body:e})]})})},t.prototype.createPullRequestReviewers=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.deletePullRequestReviewer=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,reviewerId:r}})]})})},t.prototype.getPullRequestReviewer=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,reviewerId:r}})]})})},t.prototype.getPullRequestReviewers=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.updatePullRequestReviewers=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.getPullRequestById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/PullRequests/{pullRequestId}",routeValues:{project:t,pullRequestId:e}})]})})},t.prototype.getPullRequestsByProject=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={searchCriteria:t,maxCommentLength:r,$skip:o,$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/PullRequests",routeValues:{project:e},queryParams:s})]})})},t.prototype.createPullRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={supportsIterations:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:r,repositoryId:t},queryParams:i,body:e})]})})},t.prototype.getPullRequest=function(e,t,r,o,i,s,u,n){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(a){return p={maxCommentLength:o,$skip:i,$top:s,includeCommits:u,includeWorkItemRefs:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:p})]})})},t.prototype.getPullRequests=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={searchCriteria:t,maxCommentLength:o,$skip:i,$top:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:r,repositoryId:e},queryParams:u})]})})},t.prototype.updatePullRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/PullRequests/{pullRequestId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.sharePullRequest=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/share",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.createPullRequestStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.deletePullRequestStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,statusId:r}})]})})},t.prototype.getPullRequestStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,statusId:r}})]})})},t.prototype.getPullRequestStatuses=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.updatePullRequestStatuses=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.createComment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,threadId:o},body:e})]})})},t.prototype.deleteComment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getComment=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:i,repositoryId:e,pullRequestId:t,threadId:r,commentId:o}})]})})},t.prototype.getComments=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,threadId:r}})]})})},t.prototype.updateComment=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",routeValues:{project:s,repositoryId:t,pullRequestId:r,threadId:o,commentId:i},body:e})]})})},t.prototype.createThread=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:o,repositoryId:t,pullRequestId:r},body:e})]})})},t.prototype.getPullRequestThread=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={$iteration:i,$baseIteration:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:o,repositoryId:e,pullRequestId:t,threadId:r},queryParams:u})]})})},t.prototype.getThreads=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={$iteration:o,$baseIteration:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:r,repositoryId:e,pullRequestId:t},queryParams:s})]})})},t.prototype.updateThread=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",routeValues:{project:i,repositoryId:t,pullRequestId:r,threadId:o},body:e})]})})},t.prototype.getPullRequestWorkItemRefs=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems",routeValues:{project:r,repositoryId:e,pullRequestId:t}})]})})},t.prototype.createPush=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.getPush=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={includeCommits:o,includeRefUpdates:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",routeValues:{project:r,repositoryId:e,pushId:t},queryParams:s})]})})},t.prototype.getPushes=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={$skip:r,$top:o,searchCriteria:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",routeValues:{project:t,repositoryId:e},queryParams:s})]})})},t.prototype.deleteRepositoryFromRecycleBin=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/recycleBin/repositories/{repositoryId}",routeValues:{project:e,repositoryId:t}})]})})},t.prototype.getRecycleBinRepositories=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/recycleBin/repositories/{repositoryId}",routeValues:{project:e}})]})})},t.prototype.restoreRepositoryFromRecycleBin=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/recycleBin/repositories/{repositoryId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getRefs=function(e,t,r,o,i,s,u,n,p){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(d){return a={filter:r,includeLinks:o,includeStatuses:i,includeMyBranches:s,latestStatusesOnly:u,peelTags:n,filterContains:p},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",routeValues:{project:t,repositoryId:e},queryParams:a})]})})},t.prototype.updateRef=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={filter:r,projectId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",routeValues:{project:o,repositoryId:t},queryParams:s,body:e})]})})},t.prototype.updateRefs=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={projectId:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",routeValues:{project:r,repositoryId:t},queryParams:i,body:e})]})})},t.prototype.createFavorite=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRefFavorite=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:e,favoriteId:t}})]})})},t.prototype.getRefFavorite=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:e,favoriteId:t}})]})})},t.prototype.getRefFavorites=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={repositoryId:t,identityId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/favorites/refs/{favoriteId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.createRepository=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={sourceRef:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.deleteRepository=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:t,repositoryId:e}})]})})},t.prototype.getRepositories=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(s){return i={includeLinks:t,includeAllUrls:r,includeHidden:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getRepository=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:t,repositoryId:e}})]})})},t.prototype.getRepositoryWithParent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={includeParent:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:r,repositoryId:e},queryParams:o})]})})},t.prototype.updateRepository=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/git/Repositories/{repositoryId}",routeValues:{project:r,repositoryId:t},body:e})]})})},t.prototype.createRevert=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",routeValues:{project:t,repositoryId:r},body:e})]})})},t.prototype.getRevert=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",routeValues:{project:e,revertId:t,repositoryId:r}})]})})},t.prototype.getRevertForRefName=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={refName:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",routeValues:{project:e,repositoryId:t},queryParams:o})]})})},t.prototype.createCommitStatus=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses",routeValues:{project:o,commitId:t,repositoryId:r},body:e})]})})},t.prototype.getStatuses=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={top:o,skip:i,latestOnly:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses",routeValues:{project:r,commitId:e,repositoryId:t},queryParams:u})]})})},t.prototype.getSuggestions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/suggestions",routeValues:{project:t,repositoryId:e}})]})})},t.prototype.getTree=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={projectId:o,recursive:i,fileName:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.prototype.getTreeZip=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(n){return u={projectId:o,recursive:i,fileName:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}",routeValues:{project:r,repositoryId:e,sha1:t},queryParams:u})]})})},t.RESOURCE_AREA_ID="4e080c62-fa21-4fbc-8fef-2a10a2b38049",t}(r.RestClientBase);t.GitRestClient=o});

@@ -7,3 +7,2 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
/**

@@ -10,0 +9,0 @@ * @param {Notification.BatchNotificationOperation} operation

@@ -481,5 +481,2 @@ /*

};
NotificationRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
return NotificationRestClient;

@@ -486,0 +483,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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 i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function s(t){try{a(n.next(t))}catch(t){o(t)}}function u(t){try{a(n.throw(t))}catch(t){o(t)}}function a(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(s,u)}a((n=n.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function i(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}var n,r,o,s,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../core/RestClientBase"],function(t,e,i){"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.performBatchNotificationOperations=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/BatchNotificationOperations",body:t})]})})},e.prototype.listLogs=function(t,e,i,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={startTime:i,endTime:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/DiagnosticLogs/{source}/entries/{entryId}",routeValues:{source:t,entryId:e},queryParams:r})]})})},e.prototype.getSubscriptionDiagnostics=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/subscriptions/{subscriptionId}/diagnostics",routeValues:{subscriptionId:t}})]})})},e.prototype.updateSubscriptionDiagnostics=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/notification/subscriptions/{subscriptionId}/diagnostics",routeValues:{subscriptionId:e},body:t})]})})},e.prototype.publishEvent=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/Events",body:t})]})})},e.prototype.transformEvent=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/EventTransforms",body:t})]})})},e.prototype.queryEventTypes=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/eventTypes/{eventType}/fieldValuesQuery",routeValues:{eventType:e},body:t})]})})},e.prototype.getEventType=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/EventTypes/{eventType}",routeValues:{eventType:t}})]})})},e.prototype.listEventTypes=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(i){return e={publisherId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/EventTypes/{eventType}",queryParams:e})]})})},e.prototype.getNotificationReasons=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/NotificationReasons/{notificationId}",routeValues:{notificationId:t}})]})})},e.prototype.listNotificationReasons=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(i){return e={notificationIds:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/NotificationReasons/{notificationId}",queryParams:e})]})})},e.prototype.getSettings=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Settings"})]})})},e.prototype.updateSettings=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/notification/Settings",body:t})]})})},e.prototype.getSubscriber=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Subscribers/{subscriberId}",routeValues:{subscriberId:t}})]})})},e.prototype.updateSubscriber=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/notification/Subscribers/{subscriberId}",routeValues:{subscriberId:e},body:t})]})})},e.prototype.querySubscriptions=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/SubscriptionQuery",body:t})]})})},e.prototype.createSubscription=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",body:t})]})})},e.prototype.deleteSubscription=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",routeValues:{subscriptionId:t}})]})})},e.prototype.getSubscription=function(t,e){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={queryFlags:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",routeValues:{subscriptionId:t},queryParams:i})]})})},e.prototype.listSubscriptions=function(t,e,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){return n={targetId:t,ids:e&&e.join(","),queryFlags:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",queryParams:n})]})})},e.prototype.updateSubscription=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",routeValues:{subscriptionId:e},body:t})]})})},e.prototype.getSubscriptionTemplates=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/SubscriptionTemplates"})]})})},e.prototype.updateSubscriptionUserSettings=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}/UserSettings/{userId}",routeValues:{subscriptionId:e,userId:i},body:t})]})})},e.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},e}(i.RestClientBase);e.NotificationRestClient=n});
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function s(t){try{a(n.next(t))}catch(t){o(t)}}function u(t){try{a(n.throw(t))}catch(t){o(t)}}function a(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(s,u)}a((n=n.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function i(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}var n,r,o,s,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../core/RestClientBase"],function(t,e,i){"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.performBatchNotificationOperations=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/BatchNotificationOperations",body:t})]})})},e.prototype.listLogs=function(t,e,i,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={startTime:i,endTime:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/DiagnosticLogs/{source}/entries/{entryId}",routeValues:{source:t,entryId:e},queryParams:r})]})})},e.prototype.getSubscriptionDiagnostics=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/subscriptions/{subscriptionId}/diagnostics",routeValues:{subscriptionId:t}})]})})},e.prototype.updateSubscriptionDiagnostics=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/notification/subscriptions/{subscriptionId}/diagnostics",routeValues:{subscriptionId:e},body:t})]})})},e.prototype.publishEvent=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/Events",body:t})]})})},e.prototype.transformEvent=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/EventTransforms",body:t})]})})},e.prototype.queryEventTypes=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/eventTypes/{eventType}/fieldValuesQuery",routeValues:{eventType:e},body:t})]})})},e.prototype.getEventType=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/EventTypes/{eventType}",routeValues:{eventType:t}})]})})},e.prototype.listEventTypes=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(i){return e={publisherId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/EventTypes/{eventType}",queryParams:e})]})})},e.prototype.getNotificationReasons=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/NotificationReasons/{notificationId}",routeValues:{notificationId:t}})]})})},e.prototype.listNotificationReasons=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(i){return e={notificationIds:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/NotificationReasons/{notificationId}",queryParams:e})]})})},e.prototype.getSettings=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Settings"})]})})},e.prototype.updateSettings=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/notification/Settings",body:t})]})})},e.prototype.getSubscriber=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Subscribers/{subscriberId}",routeValues:{subscriberId:t}})]})})},e.prototype.updateSubscriber=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/notification/Subscribers/{subscriberId}",routeValues:{subscriberId:e},body:t})]})})},e.prototype.querySubscriptions=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/SubscriptionQuery",body:t})]})})},e.prototype.createSubscription=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",body:t})]})})},e.prototype.deleteSubscription=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",routeValues:{subscriptionId:t}})]})})},e.prototype.getSubscription=function(t,e){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={queryFlags:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",routeValues:{subscriptionId:t},queryParams:i})]})})},e.prototype.listSubscriptions=function(t,e,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){return n={targetId:t,ids:e&&e.join(","),queryFlags:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",queryParams:n})]})})},e.prototype.updateSubscription=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}",routeValues:{subscriptionId:e},body:t})]})})},e.prototype.getSubscriptionTemplates=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/notification/SubscriptionTemplates"})]})})},e.prototype.updateSubscriptionUserSettings=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/notification/Subscriptions/{subscriptionId}/UserSettings/{userId}",routeValues:{subscriptionId:e,userId:i},body:t})]})})},e}(i.RestClientBase);e.NotificationRestClient=n});

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * Create a policy configuration of a given policy type.

@@ -331,5 +331,3 @@ /*

};
PolicyRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
PolicyRestClient.RESOURCE_AREA_ID = "fb13a388-40dd-4a04-b530-013a739c72ef";
return PolicyRestClient;

@@ -336,0 +334,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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 i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(t,e,i,o){return new(i||(i=Promise))(function(r,n){function u(t){try{s(o.next(t))}catch(t){n(t)}}function a(t){try{s(o.throw(t))}catch(t){n(t)}}function s(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(u,a)}s((o=o.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function i(i){return function(u){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{o=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}var o,r,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.createPolicyConfiguration=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:e,configurationId:i},body:t})]})})},e.prototype.deletePolicyConfiguration=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t,configurationId:e}})]})})},e.prototype.getPolicyConfiguration=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t,configurationId:e}})]})})},e.prototype.getPolicyConfigurations=function(t,e,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={scope:e,policyType:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t},queryParams:o})]})})},e.prototype.updatePolicyConfiguration=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:e,configurationId:i},body:t})]})})},e.prototype.getPolicyEvaluation=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Evaluations/{evaluationId}",routeValues:{project:t,evaluationId:e}})]})})},e.prototype.requeuePolicyEvaluation=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/policy/Evaluations/{evaluationId}",routeValues:{project:t,evaluationId:e}})]})})},e.prototype.getPolicyEvaluations=function(t,e,i,o,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={artifactId:e,includeNotApplicable:i,$top:o,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Evaluations",routeValues:{project:t},queryParams:n})]})})},e.prototype.getPolicyConfigurationRevision=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",routeValues:{project:t,configurationId:e,revisionId:i}})]})})},e.prototype.getPolicyConfigurationRevisions=function(t,e,i,o){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={$top:i,$skip:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",routeValues:{project:t,configurationId:e},queryParams:r})]})})},e.prototype.getPolicyType=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Types/{typeId}",routeValues:{project:t,typeId:e}})]})})},e.prototype.getPolicyTypes=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Types/{typeId}",routeValues:{project:t}})]})})},e.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},e}(i.RestClientBase);e.PolicyRestClient=o});
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(t,e,i,o){return new(i||(i=Promise))(function(r,n){function u(t){try{s(o.next(t))}catch(t){n(t)}}function a(t){try{s(o.throw(t))}catch(t){n(t)}}function s(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(u,a)}s((o=o.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function i(i){return function(u){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{o=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}var o,r,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.createPolicyConfiguration=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:e,configurationId:i},body:t})]})})},e.prototype.deletePolicyConfiguration=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t,configurationId:e}})]})})},e.prototype.getPolicyConfiguration=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t,configurationId:e}})]})})},e.prototype.getPolicyConfigurations=function(t,e,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(r){return o={scope:e,policyType:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:t},queryParams:o})]})})},e.prototype.updatePolicyConfiguration=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/policy/Configurations/{configurationId}",routeValues:{project:e,configurationId:i},body:t})]})})},e.prototype.getPolicyEvaluation=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Evaluations/{evaluationId}",routeValues:{project:t,evaluationId:e}})]})})},e.prototype.requeuePolicyEvaluation=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/policy/Evaluations/{evaluationId}",routeValues:{project:t,evaluationId:e}})]})})},e.prototype.getPolicyEvaluations=function(t,e,i,o,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={artifactId:e,includeNotApplicable:i,$top:o,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Evaluations",routeValues:{project:t},queryParams:n})]})})},e.prototype.getPolicyConfigurationRevision=function(t,e,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",routeValues:{project:t,configurationId:e,revisionId:i}})]})})},e.prototype.getPolicyConfigurationRevisions=function(t,e,i,o){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={$top:i,$skip:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/configurations/{configurationId}/Revisions/{revisionId}",routeValues:{project:t,configurationId:e},queryParams:r})]})})},e.prototype.getPolicyType=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Types/{typeId}",routeValues:{project:t,typeId:e}})]})})},e.prototype.getPolicyTypes=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/policy/Types/{typeId}",routeValues:{project:t}})]})})},e.RESOURCE_AREA_ID="fb13a388-40dd-4a04-b530-013a739c72ef",e}(i.RestClientBase);e.PolicyRestClient=o});

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * @param {string} project - Project ID or project name

@@ -155,5 +155,3 @@ /*

};
ProjectAnalysisRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
ProjectAnalysisRestClient.RESOURCE_AREA_ID = "7658fa33-b1bf-4580-990f-fac5896773d3";
return ProjectAnalysisRestClient;

@@ -160,0 +158,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(a,s)}u((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(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=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(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=e.call(t,s)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,i,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/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.getProjectLanguageAnalytics=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/languagemetrics",routeValues:{project:t}})]})})},e.prototype.getProjectActivityMetrics=function(t,e,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={fromDate:e,aggregationType:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/projectactivitymetrics",routeValues:{project:t},queryParams:n})]})})},e.prototype.getGitRepositoriesActivityMetrics=function(t,e,r,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={fromDate:e,aggregationType:r,$skip:n,$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/repositoryactivitymetrics/{repositoryId}",routeValues:{project:t},queryParams:o})]})})},e.prototype.getRepositoryActivityMetrics=function(t,e,r,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={fromDate:r,aggregationType:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/repositoryactivitymetrics/{repositoryId}",routeValues:{project:t,repositoryId:e},queryParams:i})]})})},e.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},e}(r.RestClientBase);e.ProjectAnalysisRestClient=n});
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{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,s)}u((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(;s;)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 s.label++,{value:r[1],done:!1};case 5:s.label++,o=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(6===r[0]&&s.label<i[1]){s.label=i[1],i=r;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(r);break}i[2]&&s.ops.pop(),s.trys.pop();continue}r=e.call(t,s)}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,s={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","../core/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.getProjectLanguageAnalytics=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/languagemetrics",routeValues:{project:t}})]})})},e.prototype.getProjectActivityMetrics=function(t,e,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={fromDate:e,aggregationType:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/projectactivitymetrics",routeValues:{project:t},queryParams:n})]})})},e.prototype.getGitRepositoriesActivityMetrics=function(t,e,r,n,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(a){return i={fromDate:e,aggregationType:r,$skip:n,$top:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/repositoryactivitymetrics/{repositoryId}",routeValues:{project:t},queryParams:i})]})})},e.prototype.getRepositoryActivityMetrics=function(t,e,r,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={fromDate:r,aggregationType:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/projectanalysis/repositoryactivitymetrics/{repositoryId}",routeValues:{project:t,repositoryId:e},queryParams:o})]})})},e.RESOURCE_AREA_ID="7658fa33-b1bf-4580-990f-fac5896773d3",e}(r.RestClientBase);e.ProjectAnalysisRestClient=n});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * Returns the artifact details that automation agent requires

@@ -1,1 +0,1 @@

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,s)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var i,n,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAgentArtifactDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/agentartifacts",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getApprovals=function(e,t,r,i,n,o,a,s,u){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(l){return p={assignedToFilter:t,statusFilter:r,releaseIdsFilter:i&&i.join(","),typeFilter:n,top:o,continuationToken:a,queryOrder:s,includeMyGroupApprovals:u},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:e},queryParams:p})]})})},t.prototype.getApprovalHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalStepId}/history",routeValues:{project:e,approvalStepId:t}})]})})},t.prototype.getApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeHistory:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:e,approvalId:t},queryParams:i})]})})},t.prototype.updateReleaseApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:t,approvalId:r},body:e})]})})},t.prototype.updateReleaseApprovals=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:t},body:e})]})})},t.prototype.getTaskAttachmentContent=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,recordId:o,type:a,name:s}})]})})},t.prototype.getReleaseTaskAttachmentContent=function(e,t,r,i,n,o,a,s,u){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(p){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,timelineId:o,recordId:a,type:s,name:u}})]})})},t.prototype.getTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,type:o}})]})})},t.prototype.getReleaseTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,type:o}})]})})},t.prototype.getAutoTriggerIssues=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={artifactType:e,sourceId:t,artifactVersionId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/autotriggerissues",routeValues:{project:i},queryParams:n})]})})},t.prototype.getDeploymentBadge=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/Release/badge/{projectId}/{releaseDefinitionId}/{environmentId}/{branchName}",routeValues:{projectId:e,releaseDefinitionId:t,environmentId:r,branchName:i}})]})})},t.prototype.getReleaseChanges=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/changes",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.prototype.getDefinitionEnvironments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={taskGroupId:t,propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitionEnvironments",routeValues:{project:e},queryParams:i})]})})},t.prototype.createReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteReleaseDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={comment:r,forceDelete:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:n})]})})},t.prototype.getReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={revision:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitions=function(e,t,r,i,n,o,a,s,u,p,l,d,c,_){return __awaiter(this,void 0,void 0,function(){var v;return __generator(this,function(f){return v={searchText:t,$expand:r,artifactType:i,artifactSourceId:n,$top:o,continuationToken:a,queryOrder:s,path:u,isExactNameMatch:p,tagFilter:l&&l.join(","),propertyFilters:d&&d.join(","),definitionIdFilter:c&&c.join(","),isDeleted:_},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e},queryParams:v})]})})},t.prototype.undeleteReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t,definitionId:r},body:e})]})})},t.prototype.updateReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PUT",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.getDeployments=function(e,t,r,i,n,o,a,s,u,p,l,d,c,_,v,f){return __awaiter(this,void 0,void 0,function(){var h;return __generator(this,function(m){return h={definitionId:t,definitionEnvironmentId:r,createdBy:i,minModifiedTime:n,maxModifiedTime:o,deploymentStatus:a,operationStatus:s,latestAttemptsOnly:u,queryOrder:p,$top:l,continuationToken:d,createdFor:c,minStartedTime:_,maxStartedTime:v,sourceBranch:f},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:e},queryParams:h})]})})},t.prototype.getDeploymentsForMultipleEnvironments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseEnvironment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.6",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:e,releaseId:t,environmentId:r}})]})})},t.prototype.updateReleaseEnvironment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:t,releaseId:r,environmentId:i},body:e})]})})},t.prototype.createDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:t},body:e})]})})},t.prototype.deleteDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.getDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.listDefinitionEnvironmentTemplates=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={isDeleted:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.undeleteReleaseDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.createFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:t,scope:r},queryParams:n,body:e})]})})},t.prototype.deleteFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:r,favoriteItemIds:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:n})]})})},t.prototype.getFavorites=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={identityId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:i})]})})},t.prototype.getFlightAssignments=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={flightName:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Release/flightAssignments",queryParams:t})]})})},t.prototype.createFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t}})]})})},t.prototype.getFolders=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={queryOrder:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t},queryParams:i})]})})},t.prototype.updateFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.updateGates=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/gates/{gateStepId}",routeValues:{project:t,gateStepId:r},body:e})]})})},t.prototype.getReleaseHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/history",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getInputValues=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/inputvaluesquery",routeValues:{project:t},body:e})]})})},t.prototype.getIssues=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={sourceId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/issues/{buildId}",routeValues:{project:e,buildId:t},queryParams:i})]})})},t.prototype.getGateLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/gates/{gateId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,gateId:i,taskId:n}})]})})},t.prototype.getLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/logs",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={attemptId:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,taskId:i},queryParams:o})]})})},t.prototype.getTaskLog2=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={startLine:a,endLine:s},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,taskId:o},queryParams:u})]})})},t.prototype.getTaskLog=function(e,t,r,i,n,o,a){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={startLine:o,endLine:a},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i,taskId:n},queryParams:s})]})})},t.prototype.getManualIntervention=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t,manualInterventionId:r}})]})})},t.prototype.getManualInterventions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.updateManualIntervention=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:t,releaseId:r,manualInterventionId:i},body:e})]})})},t.prototype.getMetrics=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={minMetricsTime:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/metrics",routeValues:{project:e},queryParams:r})]})})},t.prototype.getReleaseProjects=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={artifactType:e,artifactSourceId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Release/projects",queryParams:r})]})})},t.prototype.getReleases=function(e,t,r,i,n,o,a,s,u,p,l,d,c,_,v,f,h,m,g,I,y){return __awaiter(this,void 0,void 0,function(){var R;return __generator(this,function(w){return R={definitionId:t,definitionEnvironmentId:r,searchText:i,createdBy:n,statusFilter:o,environmentStatusFilter:a,minCreatedTime:s,maxCreatedTime:u,queryOrder:p,$top:l,continuationToken:d,$expand:c,artifactTypeId:_,sourceId:v,artifactVersionId:f,sourceBranchFilter:h,isDeleted:m,tagFilter:g&&g.join(","),propertyFilters:I&&I.join(","),releaseIdFilter:y&&y.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.8",routeTemplate:"{project}/_apis/Release/releases",routeValues:{project:e},queryParams:R})]})})},t.prototype.createRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.getRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={approvalFilters:r,propertyFilters:i&&i.join(","),$expand:n,$topGateRecords:o},[2,this.beginRequest({apiVersion:"5.0-preview.8",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:a})]})})},t.prototype.getReleaseDefinitionSummary=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={definitionId:t,releaseCount:r,includeArtifact:i,definitionEnvironmentIdsFilter:n&&n.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.8",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getReleaseRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={definitionSnapshotRevision:r},[2,this.beginRequest({apiVersion:"5.0-preview.8",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.undeleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.updateRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.updateReleaseResource=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:e}})]})})},t.prototype.updateReleaseSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:t},body:e})]})})},t.prototype.getDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t,revision:r}})]})})},t.prototype.getReleaseDefinitionHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getSummaryMailSections=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.sendSummaryMail=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getSourceBranches=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/sourcebranches",routeValues:{project:e,definitionId:t}})]})})},t.prototype.addDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.addDefinitionTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:t,releaseDefinitionId:r},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.getDefinitionTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t}})]})})},t.prototype.addReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.addReleaseTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.deleteReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.getReleaseTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/tags",routeValues:{project:e}})]})})},t.prototype.getTasksForTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i}})]})})},t.prototype.getTasks2=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n}})]})})},t.prototype.getTasks=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={attemptId:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r},queryParams:n})]})})},t.prototype.getArtifactTypeDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/types",routeValues:{project:e}})]})})},t.prototype.getArtifactVersions=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={releaseDefinitionId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:e},queryParams:r})]})})},t.prototype.getArtifactVersionsForSources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseWorkItemsRefs=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/workitems",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.defaultOptions={serviceInstanceType:"0000000d-0000-8888-8000-000000000000"},t}(r.RestClientBase);t.ReleaseRestClient=i});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,s)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var i,n,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAgentArtifactDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/agentartifacts",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getApprovals=function(e,t,r,i,n,o,a,s,u){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(l){return p={assignedToFilter:t,statusFilter:r,releaseIdsFilter:i&&i.join(","),typeFilter:n,top:o,continuationToken:a,queryOrder:s,includeMyGroupApprovals:u},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:e},queryParams:p})]})})},t.prototype.getApprovalHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalStepId}/history",routeValues:{project:e,approvalStepId:t}})]})})},t.prototype.getApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeHistory:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:e,approvalId:t},queryParams:i})]})})},t.prototype.updateReleaseApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:t,approvalId:r},body:e})]})})},t.prototype.updateReleaseApprovals=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:t},body:e})]})})},t.prototype.getTaskAttachmentContent=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,recordId:o,type:a,name:s}})]})})},t.prototype.getReleaseTaskAttachmentContent=function(e,t,r,i,n,o,a,s,u){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(p){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,timelineId:o,recordId:a,type:s,name:u}})]})})},t.prototype.getTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,type:o}})]})})},t.prototype.getReleaseTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,type:o}})]})})},t.prototype.getAutoTriggerIssues=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={artifactType:e,sourceId:t,artifactVersionId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/autotriggerissues",routeValues:{project:i},queryParams:n})]})})},t.prototype.getDeploymentBadge=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/public/Release/badge/{projectId}/{releaseDefinitionId}/{environmentId}/{branchName}",routeValues:{projectId:e,releaseDefinitionId:t,environmentId:r,branchName:i}})]})})},t.prototype.getReleaseChanges=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/changes",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.prototype.getDefinitionEnvironments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={taskGroupId:t,propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitionEnvironments",routeValues:{project:e},queryParams:i})]})})},t.prototype.createReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteReleaseDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={comment:r,forceDelete:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:n})]})})},t.prototype.getReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={revision:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitions=function(e,t,r,i,n,o,a,s,u,p,l,d,c,_){return __awaiter(this,void 0,void 0,function(){var v;return __generator(this,function(f){return v={searchText:t,$expand:r,artifactType:i,artifactSourceId:n,$top:o,continuationToken:a,queryOrder:s,path:u,isExactNameMatch:p,tagFilter:l&&l.join(","),propertyFilters:d&&d.join(","),definitionIdFilter:c&&c.join(","),isDeleted:_},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e},queryParams:v})]})})},t.prototype.undeleteReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t,definitionId:r},body:e})]})})},t.prototype.updateReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PUT",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.getDeployments=function(e,t,r,i,n,o,a,s,u,p,l,d,c,_,v,f){return __awaiter(this,void 0,void 0,function(){var h;return __generator(this,function(m){return h={definitionId:t,definitionEnvironmentId:r,createdBy:i,minModifiedTime:n,maxModifiedTime:o,deploymentStatus:a,operationStatus:s,latestAttemptsOnly:u,queryOrder:p,$top:l,continuationToken:d,createdFor:c,minStartedTime:_,maxStartedTime:v,sourceBranch:f},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:e},queryParams:h})]})})},t.prototype.getDeploymentsForMultipleEnvironments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseEnvironment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.6",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:e,releaseId:t,environmentId:r}})]})})},t.prototype.updateReleaseEnvironment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.6",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:t,releaseId:r,environmentId:i},body:e})]})})},t.prototype.createDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:t},body:e})]})})},t.prototype.deleteDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.getDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.listDefinitionEnvironmentTemplates=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={isDeleted:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.undeleteReleaseDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.createFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:t,scope:r},queryParams:n,body:e})]})})},t.prototype.deleteFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:r,favoriteItemIds:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:n})]})})},t.prototype.getFavorites=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={identityId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:i})]})})},t.prototype.getFlightAssignments=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={flightName:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Release/flightAssignments",queryParams:t})]})})},t.prototype.createFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t}})]})})},t.prototype.getFolders=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={queryOrder:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t},queryParams:i})]})})},t.prototype.updateFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.updateGates=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/gates/{gateStepId}",routeValues:{project:t,gateStepId:r},body:e})]})})},t.prototype.getReleaseHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/history",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getInputValues=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/inputvaluesquery",routeValues:{project:t},body:e})]})})},t.prototype.getIssues=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={sourceId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/issues/{buildId}",routeValues:{project:e,buildId:t},queryParams:i})]})})},t.prototype.getGateLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/gates/{gateId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,gateId:i,taskId:n}})]})})},t.prototype.getLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/logs",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={attemptId:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,taskId:i},queryParams:o})]})})},t.prototype.getTaskLog2=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={startLine:a,endLine:s},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,taskId:o},queryParams:u})]})})},t.prototype.getTaskLog=function(e,t,r,i,n,o,a){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={startLine:o,endLine:a},[2,this.beginRequest({apiVersion:"5.0-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i,taskId:n},queryParams:s})]})})},t.prototype.getManualIntervention=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t,manualInterventionId:r}})]})})},t.prototype.getManualInterventions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.updateManualIntervention=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:t,releaseId:r,manualInterventionId:i},body:e})]})})},t.prototype.getMetrics=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={minMetricsTime:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/metrics",routeValues:{project:e},queryParams:r})]})})},t.prototype.getReleaseProjects=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={artifactType:e,artifactSourceId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/Release/projects",queryParams:r})]})})},t.prototype.getReleases=function(e,t,r,i,n,o,a,s,u,p,l,d,c,_,v,f,h,m,g,I,R){return __awaiter(this,void 0,void 0,function(){var y;return __generator(this,function(w){return y={definitionId:t,definitionEnvironmentId:r,searchText:i,createdBy:n,statusFilter:o,environmentStatusFilter:a,minCreatedTime:s,maxCreatedTime:u,queryOrder:p,$top:l,continuationToken:d,$expand:c,artifactTypeId:_,sourceId:v,artifactVersionId:f,sourceBranchFilter:h,isDeleted:m,tagFilter:g&&g.join(","),propertyFilters:I&&I.join(","),releaseIdFilter:R&&R.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.8",routeTemplate:"{project}/_apis/Release/releases",routeValues:{project:e},queryParams:y})]})})},t.prototype.createRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.getRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={approvalFilters:r,propertyFilters:i&&i.join(","),$expand:n,$topGateRecords:o},[2,this.beginRequest({apiVersion:"5.0-preview.8",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:a})]})})},t.prototype.getReleaseDefinitionSummary=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={definitionId:t,releaseCount:r,includeArtifact:i,definitionEnvironmentIdsFilter:n&&n.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.8",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getReleaseRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={definitionSnapshotRevision:r},[2,this.beginRequest({apiVersion:"5.0-preview.8",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.undeleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.updateRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.updateReleaseResource=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.8",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:e}})]})})},t.prototype.updateReleaseSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:t},body:e})]})})},t.prototype.getDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t,revision:r}})]})})},t.prototype.getReleaseDefinitionHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getSummaryMailSections=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.sendSummaryMail=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getSourceBranches=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/sourcebranches",routeValues:{project:e,definitionId:t}})]})})},t.prototype.addDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.addDefinitionTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:t,releaseDefinitionId:r},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.getDefinitionTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t}})]})})},t.prototype.addReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.addReleaseTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.deleteReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.getReleaseTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/tags",routeValues:{project:e}})]})})},t.prototype.getTasksForTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i}})]})})},t.prototype.getTasks2=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n}})]})})},t.prototype.getTasks=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={attemptId:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r},queryParams:n})]})})},t.prototype.getArtifactTypeDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/types",routeValues:{project:e}})]})})},t.prototype.getArtifactVersions=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={releaseDefinitionId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:e},queryParams:r})]})})},t.prototype.getArtifactVersionsForSources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseWorkItemsRefs=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/workitems",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.RESOURCE_AREA_ID="efc2f575-36ef-48e9-b672-0c6fb4a48ac5",t}(r.RestClientBase);t.ReleaseRestClient=i});

@@ -6,2 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static readonly RESOURCE_AREA_ID: string;
/**

@@ -8,0 +9,0 @@ * Returns list of azure subscriptions

@@ -520,2 +520,3 @@ /*

};
ServiceEndpointRestClient.RESOURCE_AREA_ID = "1814ab31-2f4f-4a9f-8761-f4d77dc5a5d7";
return ServiceEndpointRestClient;

@@ -522,0 +523,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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(r,o){function u(e){try{p(i.next(e))}catch(e){o(e)}}function a(e){try{p(i.throw(e))}catch(e){o(e)}}function p(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(u,a)}p((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(u){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,r&&(o=2&n[0]?r.return:n[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,n[1])).done)return o;switch(r=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){a.label=n[1];break}if(6===n[0]&&a.label<o[1]){a.label=o[1],o=n;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(n);break}o[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],r=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,u])}}var i,r,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/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.getAzureManagementGroups=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/endpointproxy/azurermmanagementgroups"})]})})},t.prototype.getAzureSubscriptions=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/endpointproxy/azurermsubscriptions"})]})})},t.prototype.executeServiceEndpointRequest=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={endpointId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/endpointproxy",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.queryServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/endpointproxy",routeValues:{project:t},body:e})]})})},t.prototype.createServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteServiceEndpoint=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={deep:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e,endpointId:t},queryParams:i})]})})},t.prototype.getServiceEndpointDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e,endpointId:t}})]})})},t.prototype.getServiceEndpoints=function(e,t,n,i,r,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={type:t,authSchemes:n&&n.join(","),endpointIds:i&&i.join(","),includeFailed:r,includeDetails:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e},queryParams:u})]})})},t.prototype.getServiceEndpointsByNames=function(e,t,n,i,r,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={endpointNames:t&&t.join(","),type:n,authSchemes:i&&i.join(","),includeFailed:r,includeDetails:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e},queryParams:u})]})})},t.prototype.updateServiceEndpoint=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={operation:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:t,endpointId:n},queryParams:r,body:e})]})})},t.prototype.updateServiceEndpoints=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.getServiceEndpointExecutionRecords=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={top:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/serviceendpoint/{endpointId}/executionhistory",routeValues:{project:e,endpointId:t},queryParams:i})]})})},t.prototype.addServiceEndpointExecutionRecords=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/executionhistory",routeValues:{project:t},body:e})]})})},t.prototype.createOAuthConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",body:e})]})})},t.prototype.deleteOAuthConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",routeValues:{configurationId:e}})]})})},t.prototype.getOAuthConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",routeValues:{configurationId:e}})]})})},t.prototype.getOAuthConfigurations=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={endpointType:e,actionFilter:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",queryParams:n})]})})},t.prototype.updateOAuthConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",routeValues:{configurationId:t},body:e})]})})},t.prototype.querySharedProjects=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={project:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/share/{endpointId}",routeValues:{endpointId:e},queryParams:n})]})})},t.prototype.shareEndpointWithProject=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={fromProject:t,withProject:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/serviceendpoint/share/{endpointId}",routeValues:{endpointId:e},queryParams:i})]})})},t.prototype.getServiceEndpointTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={type:e,scheme:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/types",queryParams:n})]})})},t}(n.RestClientBase);t.ServiceEndpointRestClient=i});
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(r,o){function u(e){try{p(i.next(e))}catch(e){o(e)}}function a(e){try{p(i.throw(e))}catch(e){o(e)}}function p(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(u,a)}p((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(u){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,r&&(o=2&n[0]?r.return:n[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,n[1])).done)return o;switch(r=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){a.label=n[1];break}if(6===n[0]&&a.label<o[1]){a.label=o[1],o=n;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(n);break}o[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],r=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,u])}}var i,r,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/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.getAzureManagementGroups=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/endpointproxy/azurermmanagementgroups"})]})})},t.prototype.getAzureSubscriptions=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/endpointproxy/azurermsubscriptions"})]})})},t.prototype.executeServiceEndpointRequest=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={endpointId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/endpointproxy",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.queryServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/endpointproxy",routeValues:{project:t},body:e})]})})},t.prototype.createServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteServiceEndpoint=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={deep:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e,endpointId:t},queryParams:i})]})})},t.prototype.getServiceEndpointDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e,endpointId:t}})]})})},t.prototype.getServiceEndpoints=function(e,t,n,i,r,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={type:t,authSchemes:n&&n.join(","),endpointIds:i&&i.join(","),includeFailed:r,includeDetails:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e},queryParams:u})]})})},t.prototype.getServiceEndpointsByNames=function(e,t,n,i,r,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={endpointNames:t&&t.join(","),type:n,authSchemes:i&&i.join(","),includeFailed:r,includeDetails:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:e},queryParams:u})]})})},t.prototype.updateServiceEndpoint=function(e,t,n,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={operation:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:t,endpointId:n},queryParams:r,body:e})]})})},t.prototype.updateServiceEndpoints=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/serviceendpoint/endpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.getServiceEndpointExecutionRecords=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={top:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/serviceendpoint/{endpointId}/executionhistory",routeValues:{project:e,endpointId:t},queryParams:i})]})})},t.prototype.addServiceEndpointExecutionRecords=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/serviceendpoint/executionhistory",routeValues:{project:t},body:e})]})})},t.prototype.createOAuthConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",body:e})]})})},t.prototype.deleteOAuthConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",routeValues:{configurationId:e}})]})})},t.prototype.getOAuthConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",routeValues:{configurationId:e}})]})})},t.prototype.getOAuthConfigurations=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={endpointType:e,actionFilter:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",queryParams:n})]})})},t.prototype.updateOAuthConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/serviceendpoint/oauthconfiguration/{configurationId}",routeValues:{configurationId:t},body:e})]})})},t.prototype.querySharedProjects=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={project:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/share/{endpointId}",routeValues:{endpointId:e},queryParams:n})]})})},t.prototype.shareEndpointWithProject=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={fromProject:t,withProject:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/serviceendpoint/share/{endpointId}",routeValues:{endpointId:e},queryParams:i})]})})},t.prototype.getServiceEndpointTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={type:e,scheme:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/serviceendpoint/types",queryParams:n})]})})},t.RESOURCE_AREA_ID="1814ab31-2f4f-4a9f-8761-f4d77dc5a5d7",t}(n.RestClientBase);t.ServiceEndpointRestClient=i});

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * @param {TaskAgent.TaskAgentCloud} agentCloud

@@ -1,1 +0,1 @@

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,n){function u(e){try{a(i.next(e))}catch(e){n(e)}}function s(e){try{a(i.throw(e))}catch(e){n(e)}}function a(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(u,s)}a((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,o&&(n=2&r[0]?o.return:r[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,r[1])).done)return n;switch(o=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++,o=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],o=0}finally{i=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,u])}}var i,o,n,u,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.addAgentCloud=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}",body:e})]})})},t.prototype.deleteAgentCloud=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}",routeValues:{agentCloudId:e}})]})})},t.prototype.getAgentCloud=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}",routeValues:{agentCloudId:e}})]})})},t.prototype.getAgentClouds=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}"})]})})},t.prototype.getAgentCloudTypes=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentcloudtypes"})]})})},t.prototype.queueAgentRequest=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/queues/{queueId}/agentrequests/{requestId}",routeValues:{queueId:t},body:e})]})})},t.prototype.addAgent=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:t},body:e})]})})},t.prototype.deleteAgent=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:e,agentId:t}})]})})},t.prototype.getAgent=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={includeCapabilities:r,includeAssignedRequest:i,propertyFilters:o&&o.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:e,agentId:t},queryParams:n})]})})},t.prototype.getAgents=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(s){return u={agentName:t,includeCapabilities:r,includeAssignedRequest:i,propertyFilters:o&&o.join(","),demands:n&&n.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:e},queryParams:u})]})})},t.prototype.replaceAgent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:t,agentId:r},body:e})]})})},t.prototype.updateAgent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:t,agentId:r},body:e})]})})},t.prototype.getAzureManagementGroups=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointproxy/azurermmanagementgroups"})]})})},t.prototype.getAzureSubscriptions=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointproxy/azurermsubscriptions"})]})})},t.prototype.generateDeploymentGroupAccessToken=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroupaccesstoken/{deploymentGroupId}",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.addDeploymentGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteDeploymentGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.getDeploymentGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={actionFilter:r,$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.getDeploymentGroups=function(e,t,r,i,o,n,u){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={name:t,actionFilter:r,$expand:i,continuationToken:o,$top:n,ids:u&&u.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateDeploymentGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.getDeploymentGroupsMetrics=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={deploymentGroupName:t,continuationToken:r,$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/deploymentgroupsmetrics",routeValues:{project:e},queryParams:o})]})})},t.prototype.getAgentRequestsForDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={machineId:r,completedRequestCount:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.getAgentRequestsForDeploymentMachines=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={machineIds:r&&r.join(","),completedRequestCount:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.refreshDeploymentMachines=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinemessages",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.generateDeploymentPoolAccessToken=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/deploymentpoolaccesstoken/{poolId}",routeValues:{poolId:e}})]})})},t.prototype.getDeploymentPoolsSummary=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={poolName:e,expands:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/deploymentPools/deploymentPoolsSummary",queryParams:r})]})})},t.prototype.getAgentRequestsForDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={targetId:r,completedRequestCount:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.getAgentRequestsForDeploymentTargets=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(s){return u={targetIds:r&&r.join(","),ownerId:i,completedOn:o,completedRequestCount:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",routeValues:{project:e,deploymentGroupId:t},queryParams:u})]})})},t.prototype.refreshDeploymentTargets=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetMessages",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.queryEndpoint=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/endpoint",body:e})]})})},t.prototype.getServiceEndpointExecutionRecords=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={top:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}/executionhistory",routeValues:{project:e,endpointId:t},queryParams:i})]})})},t.prototype.addServiceEndpointExecutionRecords=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/executionhistory",routeValues:{project:t},body:e})]})})},t.prototype.getTaskHubLicenseDetails=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={includeEnterpriseUsersCount:t,includeHostedAgentMinutesCount:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/distributedtask/hublicense/{hubName}",routeValues:{hubName:e},queryParams:i})]})})},t.prototype.updateTaskHubLicenseDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PUT",routeTemplate:"_apis/distributedtask/hublicense/{hubName}",routeValues:{hubName:t},body:e})]})})},t.prototype.validateInputs=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/inputvalidation",body:e})]})})},t.prototype.deleteAgentRequest=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={lockToken:r,result:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e,requestId:t},queryParams:o})]})})},t.prototype.getAgentRequest=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e,requestId:t}})]})})},t.prototype.getAgentRequestsForAgent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={agentId:t,completedRequestCount:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.getAgentRequestsForAgents=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={agentIds:t&&t.join(","),completedRequestCount:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.getAgentRequestsForPlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={planId:t,jobId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.queueAgentRequestByPool=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:t},body:e})]})})},t.prototype.updateAgentRequest=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={lockToken:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:t,requestId:r},queryParams:o,body:e})]})})},t.prototype.generateDeploymentMachineGroupAccessToken=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/machinegroupaccesstoken/{machineGroupId}",routeValues:{project:e,machineGroupId:t}})]})})},t.prototype.addDeploymentMachineGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteDeploymentMachineGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:e,machineGroupId:t}})]})})},t.prototype.getDeploymentMachineGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:e,machineGroupId:t},queryParams:i})]})})},t.prototype.getDeploymentMachineGroups=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={machineGroupName:t,actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.updateDeploymentMachineGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:t,machineGroupId:r},body:e})]})})},t.prototype.getDeploymentMachineGroupMachines=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={tagFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",routeValues:{project:e,machineGroupId:t},queryParams:i})]})})},t.prototype.updateDeploymentMachineGroupMachines=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",routeValues:{project:t,machineGroupId:r},body:e})]})})},t.prototype.addDeploymentMachine=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.deleteDeploymentMachine=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:e,deploymentGroupId:t,machineId:r}})]})})},t.prototype.getDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:e,deploymentGroupId:t,machineId:r},queryParams:o})]})})},t.prototype.getDeploymentMachines=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={tags:r&&r.join(","),name:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:e,deploymentGroupId:t},queryParams:n})]})})},t.prototype.replaceDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r,machineId:i},body:e})]})})},t.prototype.updateDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r,machineId:i},body:e})]})})},t.prototype.updateDeploymentMachines=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.createAgentPoolMaintenanceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:t},body:e})]})})},t.prototype.deleteAgentPoolMaintenanceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:e,definitionId:t}})]})})},t.prototype.getAgentPoolMaintenanceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:e,definitionId:t}})]})})},t.prototype.getAgentPoolMaintenanceDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:e}})]})})},t.prototype.updateAgentPoolMaintenanceDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:t,definitionId:r},body:e})]})})},t.prototype.deleteAgentPoolMaintenanceJob=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e,jobId:t}})]})})},t.prototype.getAgentPoolMaintenanceJob=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e,jobId:t}})]})})},t.prototype.getAgentPoolMaintenanceJobLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e,jobId:t}})]})})},t.prototype.getAgentPoolMaintenanceJobs=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={definitionId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e},queryParams:r})]})})},t.prototype.queueAgentPoolMaintenanceJob=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:t},body:e})]})})},t.prototype.updateAgentPoolMaintenanceJob=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:t,jobId:r},body:e})]})})},t.prototype.deleteMessage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={sessionId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e,messageId:t},queryParams:i})]})})},t.prototype.getMessage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={sessionId:t,lastMessageId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.refreshAgent=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={agentId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e},queryParams:r})]})})},t.prototype.refreshAgents=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e}})]})})},t.prototype.sendMessage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={requestId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:t},queryParams:i,body:e})]})})},t.prototype.getPackage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/distributedtask/packages/{packageType}/{platform}/{version}",routeValues:{packageType:e,platform:t,version:r}})]})})},t.prototype.getPackages=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/distributedtask/packages/{packageType}/{platform}/{version}",routeValues:{packageType:e,platform:t},queryParams:i})]})})},t.prototype.getAgentPoolMetadata=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"_apis/distributedtask/pools/{poolId}/poolmetadata",routeValues:{poolId:e}})]})})},t.prototype.addAgentPool=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}",body:e})]})})},t.prototype.deleteAgentPool=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}",routeValues:{poolId:e}})]})})},t.prototype.getAgentPool=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={properties:t&&t.join(","),actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.getAgentPools=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={poolName:e,properties:t&&t.join(","),poolType:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}",queryParams:o})]})})},t.prototype.updateAgentPool=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}",routeValues:{poolId:t},body:e})]})})},t.prototype.addAgentQueue=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t},body:e})]})})},t.prototype.createTeamProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:e}})]})})},t.prototype.deleteAgentQueue=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t,queueId:e}})]})})},t.prototype.getAgentQueue=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t,queueId:e},queryParams:i})]})})},t.prototype.getAgentQueues=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={queueName:t,actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getAgentQueuesByIds=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={queueIds:e&&e.join(","),actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t},queryParams:i})]})})},t.prototype.getAgentQueuesByNames=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={queueNames:e&&e.join(","),actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t},queryParams:i})]})})},t.prototype.getAgentCloudRequests=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}/requests",routeValues:{agentCloudId:e}})]})})},t.prototype.getResourceLimits=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/resourcelimits"})]})})},t.prototype.getResourceUsage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={parallelismTag:e,poolIsHosted:t,includeRunningRequests:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/distributedtask/resourceusage",queryParams:i})]})})},t.prototype.getTaskGroupHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}/revisions",routeValues:{project:e,taskGroupId:t}})]})})},t.prototype.deleteSecureFile=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e,secureFileId:t}})]})})},t.prototype.downloadSecureFile=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={ticket:r,download:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e,secureFileId:t},queryParams:o})]})})},t.prototype.getSecureFile=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={includeDownloadTicket:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e,secureFileId:t},queryParams:o})]})})},t.prototype.getSecureFiles=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={namePattern:t,includeDownloadTickets:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getSecureFilesByIds=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={secureFileIds:t&&t.join(","),includeDownloadTickets:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getSecureFilesByNames=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={secureFileNames:t&&t.join(","),includeDownloadTickets:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.querySecureFilesByProperties=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={namePattern:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.updateSecureFile=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t,secureFileId:r},body:e})]})})},t.prototype.updateSecureFiles=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t},body:e})]})})},t.prototype.uploadSecureFile=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={name:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t},customHeaders:{"Content-Type":"application/octet-stream"},queryParams:i,body:e,isRawData:!0})]})})},t.prototype.executeServiceEndpointRequest=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={endpointId:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpointproxy",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.queryServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpointproxy",routeValues:{project:t},body:e})]})})},t.prototype.createServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e,endpointId:t}})]})})},t.prototype.getServiceEndpointDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e,endpointId:t}})]})})},t.prototype.getServiceEndpoints=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={type:t,authSchemes:r&&r.join(","),endpointIds:i&&i.join(","),includeFailed:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e},queryParams:n})]})})},t.prototype.getServiceEndpointsByNames=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={endpointNames:t&&t.join(","),type:r,authSchemes:i&&i.join(","),includeFailed:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e},queryParams:n})]})})},t.prototype.updateServiceEndpoint=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={operation:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:t,endpointId:r},queryParams:o,body:e})]})})},t.prototype.updateServiceEndpoints=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.getServiceEndpointTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={type:e,scheme:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointtypes",queryParams:r})]})})},t.prototype.createAgentSession=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",routeValues:{poolId:t},body:e})]})})},t.prototype.deleteAgentSession=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",routeValues:{poolId:e,sessionId:t}})]})})},t.prototype.addDeploymentTarget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.deleteDeploymentTarget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:e,deploymentGroupId:t,targetId:r}})]})})},t.prototype.getDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:e,deploymentGroupId:t,targetId:r},queryParams:o})]})})},t.prototype.getDeploymentTargets=function(e,t,r,i,o,n,u,s,a,p,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={tags:r&&r.join(","),name:i,partialNameMatch:o,$expand:n,agentStatus:u,agentJobResult:s,continuationToken:a,$top:p,enabled:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:e,deploymentGroupId:t},queryParams:c})]})})},t.prototype.replaceDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r,targetId:i},body:e})]})})},t.prototype.updateDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r,targetId:i},body:e})]})})},t.prototype.updateDeploymentTargets=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.addTaskGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTaskGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={comment:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:i})]})})},t.prototype.getTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={versionSpec:r,$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:o})]})})},t.prototype.getTaskGroupRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={revision:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:i})]})})},t.prototype.getTaskGroups=function(e,t,r,i,o,n,u,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(p){return a={expanded:r,taskIdFilter:i,deleted:o,$top:n,continuationToken:u,queryOrder:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:a})]})})},t.prototype.publishPreviewTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={disablePriorVersions:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t,taskGroupId:r},queryParams:o,body:e})]})})},t.prototype.publishTaskGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={parentTaskGroupId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.undeleteTaskGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.updateTaskGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t,taskGroupId:r},body:e})]})})},t.prototype.deleteTaskDefinition=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e}})]})})},t.prototype.getTaskContentZip=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={visibility:r,scopeLocal:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e,versionString:t},queryParams:o})]})})},t.prototype.getTaskDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={visibility:r,scopeLocal:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e,versionString:t},queryParams:o})]})})},t.prototype.getTaskDefinitions=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={visibility:t,scopeLocal:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e},queryParams:i})]})})},t.prototype.updateAgentUpdateState=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={currentState:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}/updates",routeValues:{poolId:e,agentId:t},queryParams:i})]})})},t.prototype.updateAgentUserCapabilities=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}/usercapabilities",routeValues:{poolId:t,agentId:r},body:e})]})})},t.prototype.addVariableGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteVariableGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e,groupId:t}})]})})},t.prototype.getVariableGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e,groupId:t}})]})})},t.prototype.getVariableGroups=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(s){return u={groupName:t,actionFilter:r,$top:i,continuationToken:o,queryOrder:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e},queryParams:u})]})})},t.prototype.getVariableGroupsById=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={groupIds:t&&t.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateVariableGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:t,groupId:r},body:e})]})})},t.prototype.acquireAccessToken=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/serviceendpointproxy/vstsaadoauth",body:e})]})})},t.prototype.createAadOAuthRequest=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={tenantId:e,redirectUri:t,promptOption:r,completeCallbackPayload:i,completeCallbackByAuthCode:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/serviceendpointproxy/vstsaadoauth",queryParams:n})]})})},t.prototype.getVstsAadTenantId=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointproxy/vstsaadoauth"})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.TaskAgentRestClient=i});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,n){function u(e){try{a(i.next(e))}catch(e){n(e)}}function s(e){try{a(i.throw(e))}catch(e){n(e)}}function a(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(u,s)}a((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,o&&(n=2&r[0]?o.return:r[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,r[1])).done)return n;switch(o=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++,o=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],o=0}finally{i=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,u])}}var i,o,n,u,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.addAgentCloud=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}",body:e})]})})},t.prototype.deleteAgentCloud=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}",routeValues:{agentCloudId:e}})]})})},t.prototype.getAgentCloud=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}",routeValues:{agentCloudId:e}})]})})},t.prototype.getAgentClouds=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}"})]})})},t.prototype.getAgentCloudTypes=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentcloudtypes"})]})})},t.prototype.queueAgentRequest=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/queues/{queueId}/agentrequests/{requestId}",routeValues:{queueId:t},body:e})]})})},t.prototype.addAgent=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:t},body:e})]})})},t.prototype.deleteAgent=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:e,agentId:t}})]})})},t.prototype.getAgent=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={includeCapabilities:r,includeAssignedRequest:i,propertyFilters:o&&o.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:e,agentId:t},queryParams:n})]})})},t.prototype.getAgents=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(s){return u={agentName:t,includeCapabilities:r,includeAssignedRequest:i,propertyFilters:o&&o.join(","),demands:n&&n.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:e},queryParams:u})]})})},t.prototype.replaceAgent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:t,agentId:r},body:e})]})})},t.prototype.updateAgent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}",routeValues:{poolId:t,agentId:r},body:e})]})})},t.prototype.getAzureManagementGroups=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointproxy/azurermmanagementgroups"})]})})},t.prototype.getAzureSubscriptions=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointproxy/azurermsubscriptions"})]})})},t.prototype.generateDeploymentGroupAccessToken=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroupaccesstoken/{deploymentGroupId}",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.addDeploymentGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteDeploymentGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.getDeploymentGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={actionFilter:r,$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.getDeploymentGroups=function(e,t,r,i,o,n,u){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={name:t,actionFilter:r,$expand:i,continuationToken:o,$top:n,ids:u&&u.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateDeploymentGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.getDeploymentGroupsMetrics=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={deploymentGroupName:t,continuationToken:r,$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/deploymentgroupsmetrics",routeValues:{project:e},queryParams:o})]})})},t.prototype.getAgentRequestsForDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={machineId:r,completedRequestCount:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.getAgentRequestsForDeploymentMachines=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={machineIds:r&&r.join(","),completedRequestCount:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.refreshDeploymentMachines=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinemessages",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.generateDeploymentPoolAccessToken=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/deploymentpoolaccesstoken/{poolId}",routeValues:{poolId:e}})]})})},t.prototype.getDeploymentPoolsSummary=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={poolName:e,expands:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/deploymentPools/deploymentPoolsSummary",queryParams:r})]})})},t.prototype.getAgentRequestsForDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={targetId:r,completedRequestCount:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",routeValues:{project:e,deploymentGroupId:t},queryParams:o})]})})},t.prototype.getAgentRequestsForDeploymentTargets=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(s){return u={targetIds:r&&r.join(","),ownerId:i,completedOn:o,completedRequestCount:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",routeValues:{project:e,deploymentGroupId:t},queryParams:u})]})})},t.prototype.refreshDeploymentTargets=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetMessages",routeValues:{project:e,deploymentGroupId:t}})]})})},t.prototype.queryEndpoint=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/endpoint",body:e})]})})},t.prototype.getServiceEndpointExecutionRecords=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={top:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}/executionhistory",routeValues:{project:e,endpointId:t},queryParams:i})]})})},t.prototype.addServiceEndpointExecutionRecords=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/executionhistory",routeValues:{project:t},body:e})]})})},t.prototype.getTaskHubLicenseDetails=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={includeEnterpriseUsersCount:t,includeHostedAgentMinutesCount:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/distributedtask/hublicense/{hubName}",routeValues:{hubName:e},queryParams:i})]})})},t.prototype.updateTaskHubLicenseDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PUT",routeTemplate:"_apis/distributedtask/hublicense/{hubName}",routeValues:{hubName:t},body:e})]})})},t.prototype.validateInputs=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/inputvalidation",body:e})]})})},t.prototype.deleteAgentRequest=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={lockToken:r,result:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e,requestId:t},queryParams:o})]})})},t.prototype.getAgentRequest=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e,requestId:t}})]})})},t.prototype.getAgentRequestsForAgent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={agentId:t,completedRequestCount:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.getAgentRequestsForAgents=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={agentIds:t&&t.join(","),completedRequestCount:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.getAgentRequestsForPlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={planId:t,jobId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.queueAgentRequestByPool=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:t},body:e})]})})},t.prototype.updateAgentRequest=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={lockToken:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",routeValues:{poolId:t,requestId:r},queryParams:o,body:e})]})})},t.prototype.generateDeploymentMachineGroupAccessToken=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/machinegroupaccesstoken/{machineGroupId}",routeValues:{project:e,machineGroupId:t}})]})})},t.prototype.addDeploymentMachineGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteDeploymentMachineGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:e,machineGroupId:t}})]})})},t.prototype.getDeploymentMachineGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:e,machineGroupId:t},queryParams:i})]})})},t.prototype.getDeploymentMachineGroups=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={machineGroupName:t,actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.updateDeploymentMachineGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}",routeValues:{project:t,machineGroupId:r},body:e})]})})},t.prototype.getDeploymentMachineGroupMachines=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={tagFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",routeValues:{project:e,machineGroupId:t},queryParams:i})]})})},t.prototype.updateDeploymentMachineGroupMachines=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",routeValues:{project:t,machineGroupId:r},body:e})]})})},t.prototype.addDeploymentMachine=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.deleteDeploymentMachine=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:e,deploymentGroupId:t,machineId:r}})]})})},t.prototype.getDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:e,deploymentGroupId:t,machineId:r},queryParams:o})]})})},t.prototype.getDeploymentMachines=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={tags:r&&r.join(","),name:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:e,deploymentGroupId:t},queryParams:n})]})})},t.prototype.replaceDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r,machineId:i},body:e})]})})},t.prototype.updateDeploymentMachine=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r,machineId:i},body:e})]})})},t.prototype.updateDeploymentMachines=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.createAgentPoolMaintenanceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:t},body:e})]})})},t.prototype.deleteAgentPoolMaintenanceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:e,definitionId:t}})]})})},t.prototype.getAgentPoolMaintenanceDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:e,definitionId:t}})]})})},t.prototype.getAgentPoolMaintenanceDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:e}})]})})},t.prototype.updateAgentPoolMaintenanceDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",routeValues:{poolId:t,definitionId:r},body:e})]})})},t.prototype.deleteAgentPoolMaintenanceJob=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e,jobId:t}})]})})},t.prototype.getAgentPoolMaintenanceJob=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e,jobId:t}})]})})},t.prototype.getAgentPoolMaintenanceJobLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e,jobId:t}})]})})},t.prototype.getAgentPoolMaintenanceJobs=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={definitionId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:e},queryParams:r})]})})},t.prototype.queueAgentPoolMaintenanceJob=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:t},body:e})]})})},t.prototype.updateAgentPoolMaintenanceJob=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",routeValues:{poolId:t,jobId:r},body:e})]})})},t.prototype.deleteMessage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={sessionId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e,messageId:t},queryParams:i})]})})},t.prototype.getMessage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={sessionId:t,lastMessageId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.refreshAgent=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={agentId:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e},queryParams:r})]})})},t.prototype.refreshAgents=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:e}})]})})},t.prototype.sendMessage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={requestId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/messages/{messageId}",routeValues:{poolId:t},queryParams:i,body:e})]})})},t.prototype.getPackage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/distributedtask/packages/{packageType}/{platform}/{version}",routeValues:{packageType:e,platform:t,version:r}})]})})},t.prototype.getPackages=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/distributedtask/packages/{packageType}/{platform}/{version}",routeValues:{packageType:e,platform:t},queryParams:i})]})})},t.prototype.getAgentPoolMetadata=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"_apis/distributedtask/pools/{poolId}/poolmetadata",routeValues:{poolId:e}})]})})},t.prototype.addAgentPool=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}",body:e})]})})},t.prototype.deleteAgentPool=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}",routeValues:{poolId:e}})]})})},t.prototype.getAgentPool=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={properties:t&&t.join(","),actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}",routeValues:{poolId:e},queryParams:i})]})})},t.prototype.getAgentPools=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={poolName:e,properties:t&&t.join(","),poolType:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/pools/{poolId}",queryParams:o})]})})},t.prototype.updateAgentPool=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/distributedtask/pools/{poolId}",routeValues:{poolId:t},body:e})]})})},t.prototype.addAgentQueue=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t},body:e})]})})},t.prototype.createTeamProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:e}})]})})},t.prototype.deleteAgentQueue=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t,queueId:e}})]})})},t.prototype.getAgentQueue=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t,queueId:e},queryParams:i})]})})},t.prototype.getAgentQueues=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={queueName:t,actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getAgentQueuesByIds=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={queueIds:e&&e.join(","),actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t},queryParams:i})]})})},t.prototype.getAgentQueuesByNames=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={queueNames:e&&e.join(","),actionFilter:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/queues/{queueId}",routeValues:{project:t},queryParams:i})]})})},t.prototype.getAgentCloudRequests=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/agentclouds/{agentCloudId}/requests",routeValues:{agentCloudId:e}})]})})},t.prototype.getResourceLimits=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/resourcelimits"})]})})},t.prototype.getResourceUsage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={parallelismTag:e,poolIsHosted:t,includeRunningRequests:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/distributedtask/resourceusage",queryParams:i})]})})},t.prototype.getTaskGroupHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}/revisions",routeValues:{project:e,taskGroupId:t}})]})})},t.prototype.deleteSecureFile=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e,secureFileId:t}})]})})},t.prototype.downloadSecureFile=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={ticket:r,download:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e,secureFileId:t},queryParams:o})]})})},t.prototype.getSecureFile=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={includeDownloadTicket:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e,secureFileId:t},queryParams:o})]})})},t.prototype.getSecureFiles=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={namePattern:t,includeDownloadTickets:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getSecureFilesByIds=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={secureFileIds:t&&t.join(","),includeDownloadTickets:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getSecureFilesByNames=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={secureFileNames:t&&t.join(","),includeDownloadTickets:r,actionFilter:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.querySecureFilesByProperties=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={namePattern:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.updateSecureFile=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t,secureFileId:r},body:e})]})})},t.prototype.updateSecureFiles=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t},body:e})]})})},t.prototype.uploadSecureFile=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={name:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/securefiles/{secureFileId}",routeValues:{project:t},customHeaders:{"Content-Type":"application/octet-stream"},queryParams:i,body:e,isRawData:!0})]})})},t.prototype.executeServiceEndpointRequest=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={endpointId:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpointproxy",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.queryServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpointproxy",routeValues:{project:t},body:e})]})})},t.prototype.createServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteServiceEndpoint=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e,endpointId:t}})]})})},t.prototype.getServiceEndpointDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e,endpointId:t}})]})})},t.prototype.getServiceEndpoints=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={type:t,authSchemes:r&&r.join(","),endpointIds:i&&i.join(","),includeFailed:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e},queryParams:n})]})})},t.prototype.getServiceEndpointsByNames=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={endpointNames:t&&t.join(","),type:r,authSchemes:i&&i.join(","),includeFailed:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:e},queryParams:n})]})})},t.prototype.updateServiceEndpoint=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={operation:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:t,endpointId:r},queryParams:o,body:e})]})})},t.prototype.updateServiceEndpoints=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/serviceendpoints/{endpointId}",routeValues:{project:t},body:e})]})})},t.prototype.getServiceEndpointTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={type:e,scheme:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointtypes",queryParams:r})]})})},t.prototype.createAgentSession=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",routeValues:{poolId:t},body:e})]})})},t.prototype.deleteAgentSession=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",routeValues:{poolId:e,sessionId:t}})]})})},t.prototype.addDeploymentTarget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.deleteDeploymentTarget=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:e,deploymentGroupId:t,targetId:r}})]})})},t.prototype.getDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:e,deploymentGroupId:t,targetId:r},queryParams:o})]})})},t.prototype.getDeploymentTargets=function(e,t,r,i,o,n,u,s,a,p,d){return __awaiter(this,void 0,void 0,function(){var c;return __generator(this,function(l){return c={tags:r&&r.join(","),name:i,partialNameMatch:o,$expand:n,agentStatus:u,agentJobResult:s,continuationToken:a,$top:p,enabled:d},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:e,deploymentGroupId:t},queryParams:c})]})})},t.prototype.replaceDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r,targetId:i},body:e})]})})},t.prototype.updateDeploymentTarget=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r,targetId:i},body:e})]})})},t.prototype.updateDeploymentTargets=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",routeValues:{project:t,deploymentGroupId:r},body:e})]})})},t.prototype.addTaskGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTaskGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={comment:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:i})]})})},t.prototype.getTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={versionSpec:r,$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:o})]})})},t.prototype.getTaskGroupRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={revision:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:i})]})})},t.prototype.getTaskGroups=function(e,t,r,i,o,n,u,s){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(p){return a={expanded:r,taskIdFilter:i,deleted:o,$top:n,continuationToken:u,queryOrder:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:e,taskGroupId:t},queryParams:a})]})})},t.prototype.publishPreviewTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={disablePriorVersions:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t,taskGroupId:r},queryParams:o,body:e})]})})},t.prototype.publishTaskGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={parentTaskGroupId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.undeleteTaskGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t},body:e})]})})},t.prototype.updateTaskGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/taskgroups/{taskGroupId}",routeValues:{project:t,taskGroupId:r},body:e})]})})},t.prototype.deleteTaskDefinition=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e}})]})})},t.prototype.getTaskContentZip=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={visibility:r,scopeLocal:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e,versionString:t},queryParams:o})]})})},t.prototype.getTaskDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={visibility:r,scopeLocal:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e,versionString:t},queryParams:o})]})})},t.prototype.getTaskDefinitions=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={visibility:t,scopeLocal:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/tasks/{taskId}/{versionString}",routeValues:{taskId:e},queryParams:i})]})})},t.prototype.updateAgentUpdateState=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={currentState:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}/updates",routeValues:{poolId:e,agentId:t},queryParams:i})]})})},t.prototype.updateAgentUserCapabilities=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/distributedtask/pools/{poolId}/agents/{agentId}/usercapabilities",routeValues:{poolId:t,agentId:r},body:e})]})})},t.prototype.addVariableGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteVariableGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e,groupId:t}})]})})},t.prototype.getVariableGroup=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e,groupId:t}})]})})},t.prototype.getVariableGroups=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(s){return u={groupName:t,actionFilter:r,$top:i,continuationToken:o,queryOrder:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e},queryParams:u})]})})},t.prototype.getVariableGroupsById=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={groupIds:t&&t.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateVariableGroup=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/distributedtask/variablegroups/{groupId}",routeValues:{project:t,groupId:r},body:e})]})})},t.prototype.acquireAccessToken=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/serviceendpointproxy/vstsaadoauth",body:e})]})})},t.prototype.createAadOAuthRequest=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={tenantId:e,redirectUri:t,promptOption:r,completeCallbackPayload:i,completeCallbackByAuthCode:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/distributedtask/serviceendpointproxy/vstsaadoauth",queryParams:n})]})})},t.prototype.getVstsAadTenantId=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/distributedtask/serviceendpointproxy/vstsaadoauth"})]})})},t.RESOURCE_AREA_ID="a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd",t}(r.RestClientBase);t.TaskAgentRestClient=i});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * Gets the action results for an iteration in a test result.

@@ -1,1 +0,1 @@

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function u(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(s,u)}a((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(s){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,n=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}var i,n,o,s,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getActionResults=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}/ActionResults/{actionPath}",routeValues:{project:e,runId:t,testCaseResultId:r,iterationId:i,actionPath:n}})]})})},t.prototype.createTestIterationResultAttachment=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={iterationId:n,actionPath:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:i},queryParams:s,body:e})]})})},t.prototype.createTestResultAttachment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:i},body:e})]})})},t.prototype.createTestSubResultAttachment=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={testSubResultId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:i},queryParams:o,body:e})]})})},t.prototype.getTestResultAttachmentContent=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i}})]})})},t.prototype.getTestResultAttachments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.getTestResultAttachmentZip=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i}})]})})},t.prototype.getTestSubResultAttachmentContent=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={testSubResultId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i},queryParams:o})]})})},t.prototype.getTestSubResultAttachments=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={testSubResultId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getTestSubResultAttachmentZip=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={testSubResultId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i},queryParams:o})]})})},t.prototype.createTestRunAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestRunAttachmentContent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getTestRunAttachments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunAttachmentZip=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getBugsLinkedToTestResult=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Bugs",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.getCloneInformation=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$includeDetails:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/CloneOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t},queryParams:i})]})})},t.prototype.cloneTestPlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/CloneOperation",routeValues:{project:t,planId:r},body:e})]})})},t.prototype.cloneTestSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{sourceSuiteId}/CloneOperation",routeValues:{project:t,planId:r,sourceSuiteId:i},body:e})]})})},t.prototype.getBuildCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={buildId:t,flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/CodeCoverage",routeValues:{project:e},queryParams:i})]})})},t.prototype.getCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={buildId:t,deltaBuildId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/CodeCoverage",routeValues:{project:e},queryParams:i})]})})},t.prototype.updateCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={buildId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/CodeCoverage",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.getTestRunCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/CodeCoverage",routeValues:{project:e,runId:t},queryParams:i})]})})},t.prototype.createTestConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:e,testConfigurationId:t}})]})})},t.prototype.getTestConfigurationById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:e,testConfigurationId:t}})]})})},t.prototype.getTestConfigurations=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={$skip:t,$top:r,continuationToken:i,includeAllProperties:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.updateTestConfiguration=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:t,testConfigurationId:r},body:e})]})})},t.prototype.addCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ExtensionFields",routeValues:{project:t},body:e})]})})},t.prototype.queryCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={scopeFilter:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ExtensionFields",routeValues:{project:e},queryParams:r})]})})},t.prototype.queryTestResultHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Results/History",routeValues:{project:t},body:e})]})})},t.prototype.getTestIteration=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={includeActionResults:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",routeValues:{project:e,runId:t,testCaseResultId:r,iterationId:i},queryParams:o})]})})},t.prototype.getTestIterations=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={includeActionResults:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getLinkedWorkItemsByQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/LinkedWorkItemsQuery",routeValues:{project:t},body:e})]})})},t.prototype.getTestRunLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/MessageLogs",routeValues:{project:e,runId:t}})]})})},t.prototype.getResultParameters=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={paramName:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}/ParameterResults",routeValues:{project:e,runId:t,testCaseResultId:r,iterationId:i},queryParams:o})]})})},t.prototype.createTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getPlanById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getPlans=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={owner:t,$skip:r,$top:i,includePlanDetails:n,filterActivePlans:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateTestPlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:t,planId:r},body:e})]})})},t.prototype.getPoint=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={witFields:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",routeValues:{project:e,planId:t,suiteId:r,pointIds:i},queryParams:o})]})})},t.prototype.getPoints=function(e,t,r,i,n,o,s,u,a,p){return __awaiter(this,void 0,void 0,function(){var d;return __generator(this,function(c){return d={witFields:i,configurationId:n,testCaseId:o,testPointIds:s,includePointDetails:u,$skip:a,$top:p},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",routeValues:{project:e,planId:t,suiteId:r},queryParams:d})]})})},t.prototype.updateTestPoints=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",routeValues:{project:t,planId:r,suiteId:i,pointIds:n},body:e})]})})},t.prototype.getPointsByQuery=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={$skip:r,$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Points",routeValues:{project:t},queryParams:n,body:e})]})})},t.prototype.getTestResultDetailsForBuild=function(e,t,r,i,n,o,s,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(p){return a={buildId:t,publishContext:r,groupBy:i,$filter:n,$orderby:o,shouldIncludeResults:s,queryRunSummaryForInProgress:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultDetailsByBuild",routeValues:{project:e},queryParams:a})]})})},t.prototype.getTestResultDetailsForRelease=function(e,t,r,i,n,o,s,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(d){return p={releaseId:t,releaseEnvId:r,publishContext:i,groupBy:n,$filter:o,$orderby:s,shouldIncludeResults:u,queryRunSummaryForInProgress:a},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultDetailsByRelease",routeValues:{project:e},queryParams:p})]})})},t.prototype.publishTestResultDocument=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/ResultDocument",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getResultGroupsByBuild=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={buildId:t,publishContext:r,fields:i&&i.join(","),continuationToken:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultGroupsByBuild",routeValues:{project:e},queryParams:o})]})})},t.prototype.getResultGroupsByRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={releaseId:t,publishContext:r,releaseEnvId:i,fields:n&&n.join(","),continuationToken:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultGroupsByRelease",routeValues:{project:e},queryParams:s})]})})},t.prototype.getTestResultsMetaData=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={testReferenceIds:t&&t.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Results/ResultMetaData",routeValues:{project:e},queryParams:r})]})})},t.prototype.getResultRetentionSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultRetentionSettings",routeValues:{project:e}})]})})},t.prototype.updateResultRetentionSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/test/ResultRetentionSettings",routeValues:{project:t},body:e})]})})},t.prototype.addTestResultsToTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.5",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={detailsToInclude:i},[2,this.beginRequest({apiVersion:"5.0-preview.5",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getTestResults=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={detailsToInclude:r,$skip:i,$top:n,outcomes:o&&o.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.5",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.updateTestResults=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.5",method:"PATCH",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultsByQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.5",method:"POST",routeTemplate:"{project}/_apis/test/Results",routeValues:{project:t},body:e})]})})},t.prototype.getTestResultsByBuild=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={buildId:t,publishContext:r,outcomes:i&&i.join(","),$top:n,continuationToken:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultsByBuild",routeValues:{project:e},queryParams:s})]})})},t.prototype.getTestResultsByRelease=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={releaseId:t,releaseEnvid:r,publishContext:i,outcomes:n&&n.join(","),$top:o,continuationToken:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultsByRelease",routeValues:{project:e},queryParams:u})]})})},t.prototype.queryTestResultsReportForBuild=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={buildId:t,publishContext:r,includeFailureDetails:i,buildToCompare:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultSummaryByBuild",routeValues:{project:e},queryParams:o})]})})},t.prototype.queryTestResultsReportForRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={releaseId:t,releaseEnvId:r,publishContext:i,includeFailureDetails:n,releaseToCompare:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultSummaryByRelease",routeValues:{project:e},queryParams:s})]})})},t.prototype.queryTestResultsSummaryForReleases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/ResultSummaryByRelease",routeValues:{project:t},body:e})]})})},t.prototype.queryTestSummaryByRequirement=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={workItemIds:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ResultSummaryByRequirement",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.queryResultTrendForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ResultTrendByBuild",routeValues:{project:t},body:e})]})})},t.prototype.queryResultTrendForRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ResultTrendByRelease",routeValues:{project:t},body:e})]})})},t.prototype.getTestRunStatistics=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}/Statistics",routeValues:{project:e,runId:t}})]})})},t.prototype.createTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunById=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeDetails:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e,runId:t},queryParams:i})]})})},t.prototype.getTestRuns=function(e,t,r,i,n,o,s,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(d){return p={buildUri:t,owner:r,tmiRunId:i,planId:n,includeRunDetails:o,automated:s,$skip:u,$top:a},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e},queryParams:p})]})})},t.prototype.queryTestRuns=function(e,t,r,i,n,o,s,u,a,p,d,c,l,_,h,v,f){return __awaiter(this,void 0,void 0,function(){var m;return __generator(this,function(I){return m={minLastUpdatedDate:t,maxLastUpdatedDate:r,state:i,planIds:n&&n.join(","),isAutomated:o,publishContext:s,buildIds:u&&u.join(","),buildDefIds:a&&a.join(","),branchName:p,releaseIds:d&&d.join(","),releaseDefIds:c&&c.join(","),releaseEnvIds:l&&l.join(","),releaseEnvDefIds:_&&_.join(","),runTitle:h,$top:v,continuationToken:f},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e},queryParams:m})]})})},t.prototype.updateTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.createTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,i;return __generator(this,function(n){return r=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/{team}/_apis/test/Session/{testSessionId}",routeValues:{project:r,team:i},body:e})]})})},t.prototype.getTestSessions=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s,u,a;return __generator(this,function(p){return s={period:t,allSessions:r,includeAllProperties:i,source:n,includeOnlyCompletedSessions:o},u=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/test/Session/{testSessionId}",routeValues:{project:u,team:a},queryParams:s})]})})},t.prototype.updateTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,i;return __generator(this,function(n){return r=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/test/Session/{testSessionId}",routeValues:{project:r,team:i},body:e})]})})},t.prototype.deleteSharedParameter=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/SharedParameter/{sharedParameterId}",routeValues:{project:e,sharedParameterId:t}})]})})},t.prototype.deleteSharedStep=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/SharedStep/{sharedStepId}",routeValues:{project:e,sharedStepId:t}})]})})},t.prototype.getSuiteEntries=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/SuiteEntry/{suiteId}",routeValues:{project:e,suiteId:t}})]})})},t.prototype.reorderSuiteEntries=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/test/SuiteEntry/{suiteId}",routeValues:{project:t,suiteId:r},body:e})]})})},t.prototype.addTestCasesToSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,testCaseIds:i,action:"TestCases"}})]})})},t.prototype.getTestCaseById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,testCaseIds:i,action:"TestCases"}})]})})},t.prototype.getTestCases=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,action:"TestCases"}})]})})},t.prototype.removeTestCasesFromSuiteUrl=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,testCaseIds:i,action:"TestCases"}})]})})},t.prototype.updateSuiteTestCases=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:t,planId:r,suiteId:i,testCaseIds:n,action:"TestCases"},body:e})]})})},t.prototype.createTestSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:r,suiteId:i},body:e})]})})},t.prototype.deleteTestSuite=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:r}})]})})},t.prototype.getTestSuiteById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:r},queryParams:n})]})})},t.prototype.getTestSuitesForPlan=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={$expand:r,$skip:i,$top:n,$asTreeView:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t},queryParams:s})]})})},t.prototype.updateTestSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:r,suiteId:i},body:e})]})})},t.prototype.getSuitesByTestCaseId=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={testCaseId:e},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/test/Suites",queryParams:t})]})})},t.prototype.deleteTestCase=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/TestCases/{testCaseId}",routeValues:{project:e,testCaseId:t}})]})})},t.prototype.queryTestHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Results/TestHistory",routeValues:{project:t},body:e})]})})},t.prototype.createTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/TestSettings/{testSettingsId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/TestSettings/{testSettingsId}",routeValues:{project:e,testSettingsId:t}})]})})},t.prototype.getTestSettingsById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/TestSettings/{testSettingsId}",routeValues:{project:e,testSettingsId:t}})]})})},t.prototype.createTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariableById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariables=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$skip:t,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.updateTestVariable=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:t,testVariableId:r},body:e})]})})},t.prototype.addWorkItemToTestLinks=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/TestMethods/WorkItems",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestMethodToWorkItemLink=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={testName:t,workItemId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.queryTestMethodLinkedWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={testName:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",routeValues:{project:e},queryParams:r})]})})},t.prototype.queryTestResultWorkItems=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={workItemCategory:t,automatedTestName:r,testCaseId:i,maxCompleteDate:n,days:o,$workItemCount:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Results/WorkItems",routeValues:{project:e},queryParams:u})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.TestRestClient=i});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function u(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(s,u)}a((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(s){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,n=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}var i,n,o,s,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getActionResults=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}/ActionResults/{actionPath}",routeValues:{project:e,runId:t,testCaseResultId:r,iterationId:i,actionPath:n}})]})})},t.prototype.createTestIterationResultAttachment=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={iterationId:n,actionPath:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:i},queryParams:s,body:e})]})})},t.prototype.createTestResultAttachment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:i},body:e})]})})},t.prototype.createTestSubResultAttachment=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={testSubResultId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:i},queryParams:o,body:e})]})})},t.prototype.getTestResultAttachmentContent=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i}})]})})},t.prototype.getTestResultAttachments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.getTestResultAttachmentZip=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i}})]})})},t.prototype.getTestSubResultAttachmentContent=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={testSubResultId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i},queryParams:o})]})})},t.prototype.getTestSubResultAttachments=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={testSubResultId:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getTestSubResultAttachmentZip=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={testSubResultId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:i},queryParams:o})]})})},t.prototype.createTestRunAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestRunAttachmentContent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getTestRunAttachments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunAttachmentZip=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getBugsLinkedToTestResult=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Bugs",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.getCloneInformation=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$includeDetails:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/CloneOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t},queryParams:i})]})})},t.prototype.cloneTestPlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/CloneOperation",routeValues:{project:t,planId:r},body:e})]})})},t.prototype.cloneTestSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{sourceSuiteId}/CloneOperation",routeValues:{project:t,planId:r,sourceSuiteId:i},body:e})]})})},t.prototype.getBuildCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={buildId:t,flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/CodeCoverage",routeValues:{project:e},queryParams:i})]})})},t.prototype.getCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={buildId:t,deltaBuildId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/CodeCoverage",routeValues:{project:e},queryParams:i})]})})},t.prototype.updateCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={buildId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/CodeCoverage",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.getTestRunCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={flags:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/CodeCoverage",routeValues:{project:e,runId:t},queryParams:i})]})})},t.prototype.createTestConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:e,testConfigurationId:t}})]})})},t.prototype.getTestConfigurationById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:e,testConfigurationId:t}})]})})},t.prototype.getTestConfigurations=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={$skip:t,$top:r,continuationToken:i,includeAllProperties:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.updateTestConfiguration=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Configurations/{testConfigurationId}",routeValues:{project:t,testConfigurationId:r},body:e})]})})},t.prototype.addCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ExtensionFields",routeValues:{project:t},body:e})]})})},t.prototype.queryCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={scopeFilter:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ExtensionFields",routeValues:{project:e},queryParams:r})]})})},t.prototype.queryTestResultHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Results/History",routeValues:{project:t},body:e})]})})},t.prototype.getTestIteration=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={includeActionResults:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",routeValues:{project:e,runId:t,testCaseResultId:r,iterationId:i},queryParams:o})]})})},t.prototype.getTestIterations=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={includeActionResults:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getLinkedWorkItemsByQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/LinkedWorkItemsQuery",routeValues:{project:t},body:e})]})})},t.prototype.getTestRunLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Runs/{runId}/MessageLogs",routeValues:{project:e,runId:t}})]})})},t.prototype.getResultParameters=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={paramName:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}/ParameterResults",routeValues:{project:e,runId:t,testCaseResultId:r,iterationId:i},queryParams:o})]})})},t.prototype.createTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getPlanById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getPlans=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={owner:t,$skip:r,$top:i,includePlanDetails:n,filterActivePlans:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateTestPlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}",routeValues:{project:t,planId:r},body:e})]})})},t.prototype.getPoint=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={witFields:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",routeValues:{project:e,planId:t,suiteId:r,pointIds:i},queryParams:o})]})})},t.prototype.getPoints=function(e,t,r,i,n,o,s,u,a,p){return __awaiter(this,void 0,void 0,function(){var d;return __generator(this,function(c){return d={witFields:i,configurationId:n,testCaseId:o,testPointIds:s,includePointDetails:u,$skip:a,$top:p},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",routeValues:{project:e,planId:t,suiteId:r},queryParams:d})]})})},t.prototype.updateTestPoints=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",routeValues:{project:t,planId:r,suiteId:i,pointIds:n},body:e})]})})},t.prototype.getPointsByQuery=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={$skip:r,$top:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Points",routeValues:{project:t},queryParams:n,body:e})]})})},t.prototype.getTestResultDetailsForBuild=function(e,t,r,i,n,o,s,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(p){return a={buildId:t,publishContext:r,groupBy:i,$filter:n,$orderby:o,shouldIncludeResults:s,queryRunSummaryForInProgress:u},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultDetailsByBuild",routeValues:{project:e},queryParams:a})]})})},t.prototype.getTestResultDetailsForRelease=function(e,t,r,i,n,o,s,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(d){return p={releaseId:t,releaseEnvId:r,publishContext:i,groupBy:n,$filter:o,$orderby:s,shouldIncludeResults:u,queryRunSummaryForInProgress:a},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultDetailsByRelease",routeValues:{project:e},queryParams:p})]})})},t.prototype.publishTestResultDocument=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/ResultDocument",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getResultGroupsByBuild=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={buildId:t,publishContext:r,fields:i&&i.join(","),continuationToken:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultGroupsByBuild",routeValues:{project:e},queryParams:o})]})})},t.prototype.getResultGroupsByRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={releaseId:t,publishContext:r,releaseEnvId:i,fields:n&&n.join(","),continuationToken:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultGroupsByRelease",routeValues:{project:e},queryParams:s})]})})},t.prototype.getTestResultsMetaData=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={testReferenceIds:t&&t.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Results/ResultMetaData",routeValues:{project:e},queryParams:r})]})})},t.prototype.getResultRetentionSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultRetentionSettings",routeValues:{project:e}})]})})},t.prototype.updateResultRetentionSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/test/ResultRetentionSettings",routeValues:{project:t},body:e})]})})},t.prototype.addTestResultsToTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.5",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={detailsToInclude:i},[2,this.beginRequest({apiVersion:"5.0-preview.5",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getTestResults=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={detailsToInclude:r,$skip:i,$top:n,outcomes:o&&o.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.5",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.updateTestResults=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.5",method:"PATCH",routeTemplate:"{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultsByQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.5",method:"POST",routeTemplate:"{project}/_apis/test/Results",routeValues:{project:t},body:e})]})})},t.prototype.getTestResultsByBuild=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={buildId:t,publishContext:r,outcomes:i&&i.join(","),$top:n,continuationToken:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultsByBuild",routeValues:{project:e},queryParams:s})]})})},t.prototype.getTestResultsByRelease=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={releaseId:t,releaseEnvid:r,publishContext:i,outcomes:n&&n.join(","),$top:o,continuationToken:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/ResultsByRelease",routeValues:{project:e},queryParams:u})]})})},t.prototype.queryTestResultsReportForBuild=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(s){return o={buildId:t,publishContext:r,includeFailureDetails:i,buildToCompare:n},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultSummaryByBuild",routeValues:{project:e},queryParams:o})]})})},t.prototype.queryTestResultsReportForRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={releaseId:t,releaseEnvId:r,publishContext:i,includeFailureDetails:n,releaseToCompare:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/ResultSummaryByRelease",routeValues:{project:e},queryParams:s})]})})},t.prototype.queryTestResultsSummaryForReleases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/ResultSummaryByRelease",routeValues:{project:t},body:e})]})})},t.prototype.queryTestSummaryByRequirement=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={workItemIds:r&&r.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ResultSummaryByRequirement",routeValues:{project:t},queryParams:i,body:e})]})})},t.prototype.queryResultTrendForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ResultTrendByBuild",routeValues:{project:t},body:e})]})})},t.prototype.queryResultTrendForRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/ResultTrendByRelease",routeValues:{project:t},body:e})]})})},t.prototype.getTestRunStatistics=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}/Statistics",routeValues:{project:e,runId:t}})]})})},t.prototype.createTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunById=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeDetails:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e,runId:t},queryParams:i})]})})},t.prototype.getTestRuns=function(e,t,r,i,n,o,s,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(d){return p={buildUri:t,owner:r,tmiRunId:i,planId:n,includeRunDetails:o,automated:s,$skip:u,$top:a},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e},queryParams:p})]})})},t.prototype.queryTestRuns=function(e,t,r,i,n,o,s,u,a,p,d,c,l,_,h,v,f){return __awaiter(this,void 0,void 0,function(){var m;return __generator(this,function(I){return m={minLastUpdatedDate:t,maxLastUpdatedDate:r,state:i,planIds:n&&n.join(","),isAutomated:o,publishContext:s,buildIds:u&&u.join(","),buildDefIds:a&&a.join(","),branchName:p,releaseIds:d&&d.join(","),releaseDefIds:c&&c.join(","),releaseEnvIds:l&&l.join(","),releaseEnvDefIds:_&&_.join(","),runTitle:h,$top:v,continuationToken:f},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:e},queryParams:m})]})})},t.prototype.updateTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/test/Runs/{runId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.createTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,i;return __generator(this,function(n){return r=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/{team}/_apis/test/Session/{testSessionId}",routeValues:{project:r,team:i},body:e})]})})},t.prototype.getTestSessions=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s,u,a;return __generator(this,function(p){return s={period:t,allSessions:r,includeAllProperties:i,source:n,includeOnlyCompletedSessions:o},u=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/test/Session/{testSessionId}",routeValues:{project:u,team:a},queryParams:s})]})})},t.prototype.updateTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,i;return __generator(this,function(n){return r=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/test/Session/{testSessionId}",routeValues:{project:r,team:i},body:e})]})})},t.prototype.deleteSharedParameter=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/SharedParameter/{sharedParameterId}",routeValues:{project:e,sharedParameterId:t}})]})})},t.prototype.deleteSharedStep=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/SharedStep/{sharedStepId}",routeValues:{project:e,sharedStepId:t}})]})})},t.prototype.getSuiteEntries=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/SuiteEntry/{suiteId}",routeValues:{project:e,suiteId:t}})]})})},t.prototype.reorderSuiteEntries=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/test/SuiteEntry/{suiteId}",routeValues:{project:t,suiteId:r},body:e})]})})},t.prototype.addTestCasesToSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,testCaseIds:i,action:"TestCases"}})]})})},t.prototype.getTestCaseById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,testCaseIds:i,action:"TestCases"}})]})})},t.prototype.getTestCases=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,action:"TestCases"}})]})})},t.prototype.removeTestCasesFromSuiteUrl=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:e,planId:t,suiteId:r,testCaseIds:i,action:"TestCases"}})]})})},t.prototype.updateSuiteTestCases=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",routeValues:{project:t,planId:r,suiteId:i,testCaseIds:n,action:"TestCases"},body:e})]})})},t.prototype.createTestSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:r,suiteId:i},body:e})]})})},t.prototype.deleteTestSuite=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:r}})]})})},t.prototype.getTestSuiteById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:r},queryParams:n})]})})},t.prototype.getTestSuitesForPlan=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={$expand:r,$skip:i,$top:n,$asTreeView:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t},queryParams:s})]})})},t.prototype.updateTestSuite=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/test/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:r,suiteId:i},body:e})]})})},t.prototype.getSuitesByTestCaseId=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={testCaseId:e},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"_apis/test/Suites",queryParams:t})]})})},t.prototype.deleteTestCase=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/TestCases/{testCaseId}",routeValues:{project:e,testCaseId:t}})]})})},t.prototype.queryTestHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Results/TestHistory",routeValues:{project:t},body:e})]})})},t.prototype.createTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/TestSettings/{testSettingsId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/TestSettings/{testSettingsId}",routeValues:{project:e,testSettingsId:t}})]})})},t.prototype.getTestSettingsById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/TestSettings/{testSettingsId}",routeValues:{project:e,testSettingsId:t}})]})})},t.prototype.createTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariableById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariables=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$skip:t,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.updateTestVariable=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/test/Variables/{testVariableId}",routeValues:{project:t,testVariableId:r},body:e})]})})},t.prototype.addWorkItemToTestLinks=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/TestMethods/WorkItems",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestMethodToWorkItemLink=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={testName:t,workItemId:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.queryTestMethodLinkedWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={testName:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",routeValues:{project:e},queryParams:r})]})})},t.prototype.queryTestResultWorkItems=function(e,t,r,i,n,o,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={workItemCategory:t,automatedTestName:r,testCaseId:i,maxCompleteDate:n,days:o,$workItemCount:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/test/Results/WorkItems",routeValues:{project:e},queryParams:u})]})})},t.RESOURCE_AREA_ID="c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e",t}(r.RestClientBase);t.TestRestClient=i});

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * Get a single branch hierarchy at the given path with parents or children as specified.

@@ -715,5 +715,3 @@ /*

};
TfvcRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
TfvcRestClient.RESOURCE_AREA_ID = "8aa40520-446d-40e6-89f6-9c9f9ce44c48";
return TfvcRestClient;

@@ -720,0 +718,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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 n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=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(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,i,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getBranch=function(e,t,r,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={path:e,includeParent:r,includeChildren:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Branches/{*path}",routeValues:{project:t},queryParams:i})]})})},t.prototype.getBranches=function(e,t,r,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={includeParent:t,includeChildren:r,includeDeleted:n,includeLinks:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Branches/{*path}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getBranchRefs=function(e,t,r,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={scopePath:e,includeDeleted:r,includeLinks:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Branches/{*path}",routeValues:{project:t},queryParams:i})]})})},t.prototype.getChangesetChanges=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={$skip:t,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/changesets/{id}/changes",routeValues:{id:e},queryParams:n})]})})},t.prototype.createChangeset=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/tfvc/changesets/{id}",routeValues:{project:t},body:e})]})})},t.prototype.getChangeset=function(e,t,r,n,i,o,a,s,u,p,c){return __awaiter(this,void 0,void 0,function(){var h;return __generator(this,function(l){return h={maxChangeCount:r,includeDetails:n,includeWorkItems:i,maxCommentLength:o,includeSourceRename:a,$skip:s,$top:u,$orderby:p,searchCriteria:c},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/tfvc/changesets/{id}",routeValues:{project:t,id:e},queryParams:h})]})})},t.prototype.getChangesets=function(e,t,r,n,i,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={maxCommentLength:t,$skip:r,$top:n,$orderby:i,searchCriteria:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/tfvc/changesets/{id}",routeValues:{project:e},queryParams:a})]})})},t.prototype.getBatchedChangesets=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/tfvc/ChangesetsBatch",body:e})]})})},t.prototype.getChangesetWorkItems=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/changesets/{id}/workItems",routeValues:{id:e}})]})})},t.prototype.getItemsBatch=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/tfvc/ItemBatch",routeValues:{project:t},body:e})]})})},t.prototype.getItemsBatchZip=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/tfvc/ItemBatch",routeValues:{project:t},body:e})]})})},t.prototype.getItem=function(e,t,r,n,i,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:n,scopePath:i,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getItemContent=function(e,t,r,n,i,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:n,scopePath:i,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getItems=function(e,t,r,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={scopePath:t,recursionLevel:r,includeLinks:n,versionDescriptor:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getItemText=function(e,t,r,n,i,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:n,scopePath:i,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getItemZip=function(e,t,r,n,i,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:n,scopePath:i,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getLabelItems=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/labels/{labelId}/items",routeValues:{labelId:e},queryParams:n})]})})},t.prototype.getLabel=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={requestData:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Labels/{labelId}",routeValues:{project:r,labelId:e},queryParams:n})]})})},t.prototype.getLabels=function(e,t,r,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={requestData:e,$top:r,$skip:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Labels/{labelId}",routeValues:{project:t},queryParams:i})]})})},t.prototype.getShelvesetChanges=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={shelvesetId:e,$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets/changes",queryParams:n})]})})},t.prototype.getShelveset=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={shelvesetId:e,requestData:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets",queryParams:r})]})})},t.prototype.getShelvesets=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={requestData:e,$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets",queryParams:n})]})})},t.prototype.getShelvesetWorkItems=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={shelvesetId:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets/workitems",queryParams:t})]})})},t.prototype.getTfvcStatistics=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={scopePath:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/stats",routeValues:{project:e},queryParams:r})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.TfvcRestClient=n});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,s)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var i,n,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getBranch=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={path:e,includeParent:r,includeChildren:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Branches/{*path}",routeValues:{project:t},queryParams:n})]})})},t.prototype.getBranches=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={includeParent:t,includeChildren:r,includeDeleted:i,includeLinks:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Branches/{*path}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getBranchRefs=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={scopePath:e,includeDeleted:r,includeLinks:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Branches/{*path}",routeValues:{project:t},queryParams:n})]})})},t.prototype.getChangesetChanges=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$skip:t,$top:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/changesets/{id}/changes",routeValues:{id:e},queryParams:i})]})})},t.prototype.createChangeset=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/tfvc/changesets/{id}",routeValues:{project:t},body:e})]})})},t.prototype.getChangeset=function(e,t,r,i,n,o,a,s,u,p,c){return __awaiter(this,void 0,void 0,function(){var h;return __generator(this,function(l){return h={maxChangeCount:r,includeDetails:i,includeWorkItems:n,maxCommentLength:o,includeSourceRename:a,$skip:s,$top:u,$orderby:p,searchCriteria:c},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/tfvc/changesets/{id}",routeValues:{project:t,id:e},queryParams:h})]})})},t.prototype.getChangesets=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={maxCommentLength:t,$skip:r,$top:i,$orderby:n,searchCriteria:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/tfvc/changesets/{id}",routeValues:{project:e},queryParams:a})]})})},t.prototype.getBatchedChangesets=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/tfvc/ChangesetsBatch",body:e})]})})},t.prototype.getChangesetWorkItems=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/changesets/{id}/workItems",routeValues:{id:e}})]})})},t.prototype.getItemsBatch=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/tfvc/ItemBatch",routeValues:{project:t},body:e})]})})},t.prototype.getItemsBatchZip=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/tfvc/ItemBatch",routeValues:{project:t},body:e})]})})},t.prototype.getItem=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:i,scopePath:n,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getItemContent=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:i,scopePath:n,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getItems=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={scopePath:t,recursionLevel:r,includeLinks:i,versionDescriptor:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getItemText=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:i,scopePath:n,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getItemZip=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={path:e,fileName:r,download:i,scopePath:n,recursionLevel:o,versionDescriptor:a,includeContent:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/tfvc/Items/{*path}",routeValues:{project:t},queryParams:u})]})})},t.prototype.getLabelItems=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/labels/{labelId}/items",routeValues:{labelId:e},queryParams:i})]})})},t.prototype.getLabel=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={requestData:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Labels/{labelId}",routeValues:{project:r,labelId:e},queryParams:i})]})})},t.prototype.getLabels=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={requestData:e,$top:r,$skip:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/Labels/{labelId}",routeValues:{project:t},queryParams:n})]})})},t.prototype.getShelvesetChanges=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={shelvesetId:e,$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets/changes",queryParams:i})]})})},t.prototype.getShelveset=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={shelvesetId:e,requestData:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets",queryParams:r})]})})},t.prototype.getShelvesets=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={requestData:e,$top:t,$skip:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets",queryParams:i})]})})},t.prototype.getShelvesetWorkItems=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={shelvesetId:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/tfvc/shelvesets/workitems",queryParams:t})]})})},t.prototype.getTfvcStatistics=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={scopePath:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/tfvc/stats",routeValues:{project:e},queryParams:r})]})})},t.RESOURCE_AREA_ID="8aa40520-446d-40e6-89f6-9c9f9ce44c48",t}(r.RestClientBase);t.TfvcRestClient=i});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.

@@ -259,5 +259,3 @@ /*

};
WikiRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
WikiRestClient.RESOURCE_AREA_ID = "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3";
return WikiRestClient;

@@ -264,0 +262,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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 i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?n(e.value):new i(function(t){t(e.value)}).then(a,u)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}var r,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/RestClientBase"],function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getPageText=function(e,t,i,r,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={path:i,recursionLevel:r,versionDescriptor:n,includeContent:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:t},queryParams:a})]})})},t.prototype.getPageZip=function(e,t,i,r,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={path:i,recursionLevel:r,versionDescriptor:n,includeContent:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:t},queryParams:a})]})})},t.prototype.createOrUpdatePageViewStats=function(e,t,i,r,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={wikiVersion:i,path:r,oldPath:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pageViewStats/{*path}",routeValues:{project:e,wikiIdentifier:t},queryParams:o})]})})},t.prototype.createWiki=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t},body:e})]})})},t.prototype.deleteWiki=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t,wikiIdentifier:e}})]})})},t.prototype.getAllWikis=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:e}})]})})},t.prototype.getWiki=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t,wikiIdentifier:e}})]})})},t.prototype.updateWiki=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i,wikiIdentifier:t},body:e})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(i.RestClientBase);t.WikiRestClient=r});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?n(e.value):new i(function(t){t(e.value)}).then(a,u)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}var r,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../core/RestClientBase"],function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getPageText=function(e,t,i,r,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={path:i,recursionLevel:r,versionDescriptor:n,includeContent:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:t},queryParams:a})]})})},t.prototype.getPageZip=function(e,t,i,r,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={path:i,recursionLevel:r,versionDescriptor:n,includeContent:o},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{*path}",routeValues:{project:e,wikiIdentifier:t},queryParams:a})]})})},t.prototype.createOrUpdatePageViewStats=function(e,t,i,r,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={wikiVersion:i,path:r,oldPath:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}/pageViewStats/{*path}",routeValues:{project:e,wikiIdentifier:t},queryParams:o})]})})},t.prototype.createWiki=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t},body:e})]})})},t.prototype.deleteWiki=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t,wikiIdentifier:e}})]})})},t.prototype.getAllWikis=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:e}})]})})},t.prototype.getWiki=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:t,wikiIdentifier:e}})]})})},t.prototype.updateWiki=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wiki/wikis/{wikiIdentifier}",routeValues:{project:i,wikiIdentifier:t},body:e})]})})},t.RESOURCE_AREA_ID="bf7d82a0-8aa5-4613-94ef-6172a5ea01f3",t}(i.RestClientBase);t.WikiRestClient=r});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * Gets backlog configuration for a team

@@ -1150,5 +1150,3 @@ /*

};
WorkRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
WorkRestClient.RESOURCE_AREA_ID = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9";
return WorkRestClient;

@@ -1155,0 +1153,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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,a){function n(e){try{s(o.next(e))}catch(e){a(e)}}function u(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(n,u)}s((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=2&r[0]?i.return:r[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;switch(i=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){u.label=r[1];break}if(6===r[0]&&u.label<a[1]){u.label=a[1],a=r;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(r);break}a[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,i,a,n,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getBacklogConfigurations=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogconfiguration",routeValues:{project:t,team:r}})]})})},t.prototype.getBacklogLevelWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogs/{backlogId}/workItems",routeValues:{project:r,team:o,backlogId:t}})]})})},t.prototype.getBacklog=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogs/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getBacklogs=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogs/{id}",routeValues:{project:t,team:r}})]})})},t.prototype.getColumnSuggestedValues=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/boardcolumns",routeValues:{project:e}})]})})},t.prototype.getBoardMappingParentItems=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i,a;return __generator(this,function(n){return o={childBacklogContextCategoryRefName:t,workitemIds:r&&r.join(",")},i=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/boardparents",routeValues:{project:i,team:a},queryParams:o})]})})},t.prototype.getRowSuggestedValues=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/boardrows",routeValues:{project:e}})]})})},t.prototype.getBoard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getBoards=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{id}",routeValues:{project:t,team:r}})]})})},t.prototype.setBoardOptions=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{id}",routeValues:{project:o,team:i,id:r},body:e})]})})},t.prototype.getBoardUserSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/boardusersettings",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardUserSettings=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/boardusersettings",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getCapacities=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:r,team:o,iterationId:t}})]})})},t.prototype.getCapacity=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=e.projectId||e.project,i=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:o,team:i,iterationId:t,teamMemberId:r}})]})})},t.prototype.replaceCapacities=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:o,team:i,iterationId:r},body:e})]})})},t.prototype.updateCapacity=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i,a;return __generator(this,function(n){return i=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:i,team:a,iterationId:r,teamMemberId:o},body:e})]})})},t.prototype.getBoardCardRuleSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardrulesettings",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardCardRuleSettings=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardrulesettings",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getBoardCardSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardsettings",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardCardSettings=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardsettings",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getBoardChart=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=e.projectId||e.project,i=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/charts/{name}",routeValues:{project:o,team:i,board:t,name:r}})]})})},t.prototype.getBoardCharts=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/charts/{name}",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardChart=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i,a;return __generator(this,function(n){return i=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/charts/{name}",routeValues:{project:i,team:a,board:r,name:o},body:e})]})})},t.prototype.getBoardColumns=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/columns/{id}",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardColumns=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/columns/{id}",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getDeliveryTimelineData=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(n){return a={revision:r,startDate:o,endDate:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/plans/{id}/deliverytimeline",routeValues:{project:e,id:t},queryParams:a})]})})},t.prototype.deleteTeamIteration=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getTeamIteration=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getTeamIterations=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o,i;return __generator(this,function(a){return r={$timeframe:t},o=e.projectId||e.project,i=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:o,team:i},queryParams:r})]})})},t.prototype.postTeamIteration=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:r,team:o},body:e})]})})},t.prototype.createPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:t},body:e})]})})},t.prototype.deletePlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:e,id:t}})]})})},t.prototype.getPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:e,id:t}})]})})},t.prototype.getPlans=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:e}})]})})},t.prototype.updatePlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:t,id:r},body:e})]})})},t.prototype.getProcessConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/processconfiguration",routeValues:{project:e}})]})})},t.prototype.getBoardRows=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/rows/{id}",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardRows=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/rows/{id}",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getTeamDaysOff=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff",routeValues:{project:r,team:o,iterationId:t}})]})})},t.prototype.updateTeamDaysOff=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff",routeValues:{project:o,team:i,iterationId:r},body:e})]})})},t.prototype.getTeamFieldValues=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/teamfieldvalues",routeValues:{project:t,team:r}})]})})},t.prototype.updateTeamFieldValues=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings/teamfieldvalues",routeValues:{project:r,team:o},body:e})]})})},t.prototype.getTeamSettings=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings",routeValues:{project:t,team:r}})]})})},t.prototype.updateTeamSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings",routeValues:{project:r,team:o},body:e})]})})},t.prototype.getIterationWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/workitems",routeValues:{project:r,team:o,iterationId:t}})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.WorkRestClient=o});
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,a){function n(e){try{s(o.next(e))}catch(e){a(e)}}function u(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(n,u)}s((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=2&r[0]?i.return:r[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;switch(i=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){u.label=r[1];break}if(6===r[0]&&u.label<a[1]){u.label=a[1],a=r;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(r);break}a[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,i,a,n,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getBacklogConfigurations=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogconfiguration",routeValues:{project:t,team:r}})]})})},t.prototype.getBacklogLevelWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogs/{backlogId}/workItems",routeValues:{project:r,team:o,backlogId:t}})]})})},t.prototype.getBacklog=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogs/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getBacklogs=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/backlogs/{id}",routeValues:{project:t,team:r}})]})})},t.prototype.getColumnSuggestedValues=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/boardcolumns",routeValues:{project:e}})]})})},t.prototype.getBoardMappingParentItems=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i,a;return __generator(this,function(n){return o={childBacklogContextCategoryRefName:t,workitemIds:r&&r.join(",")},i=e.projectId||e.project,a=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/boardparents",routeValues:{project:i,team:a},queryParams:o})]})})},t.prototype.getRowSuggestedValues=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/boardrows",routeValues:{project:e}})]})})},t.prototype.getBoard=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getBoards=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{id}",routeValues:{project:t,team:r}})]})})},t.prototype.setBoardOptions=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{id}",routeValues:{project:o,team:i,id:r},body:e})]})})},t.prototype.getBoardUserSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/boardusersettings",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardUserSettings=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/boardusersettings",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getCapacities=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:r,team:o,iterationId:t}})]})})},t.prototype.getCapacity=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=e.projectId||e.project,i=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:o,team:i,iterationId:t,teamMemberId:r}})]})})},t.prototype.replaceCapacities=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:o,team:i,iterationId:r},body:e})]})})},t.prototype.updateCapacity=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i,a;return __generator(this,function(n){return i=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",routeValues:{project:i,team:a,iterationId:r,teamMemberId:o},body:e})]})})},t.prototype.getBoardCardRuleSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardrulesettings",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardCardRuleSettings=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardrulesettings",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getBoardCardSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardsettings",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardCardSettings=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/cardsettings",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getBoardChart=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=e.projectId||e.project,i=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/charts/{name}",routeValues:{project:o,team:i,board:t,name:r}})]})})},t.prototype.getBoardCharts=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/charts/{name}",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardChart=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i,a;return __generator(this,function(n){return i=t.projectId||t.project,a=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/charts/{name}",routeValues:{project:i,team:a,board:r,name:o},body:e})]})})},t.prototype.getBoardColumns=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/columns/{id}",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardColumns=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/columns/{id}",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getDeliveryTimelineData=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(n){return a={revision:r,startDate:o,endDate:i},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/plans/{id}/deliverytimeline",routeValues:{project:e,id:t},queryParams:a})]})})},t.prototype.deleteTeamIteration=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getTeamIteration=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:r,team:o,id:t}})]})})},t.prototype.getTeamIterations=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o,i;return __generator(this,function(a){return r={$timeframe:t},o=e.projectId||e.project,i=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:o,team:i},queryParams:r})]})})},t.prototype.postTeamIteration=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{id}",routeValues:{project:r,team:o},body:e})]})})},t.prototype.createPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:t},body:e})]})})},t.prototype.deletePlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:e,id:t}})]})})},t.prototype.getPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:e,id:t}})]})})},t.prototype.getPlans=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:e}})]})})},t.prototype.updatePlan=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/_apis/work/plans/{id}",routeValues:{project:t,id:r},body:e})]})})},t.prototype.getProcessConfiguration=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/work/processconfiguration",routeValues:{project:e}})]})})},t.prototype.getBoardRows=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/rows/{id}",routeValues:{project:r,team:o,board:t}})]})})},t.prototype.updateBoardRows=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/work/boards/{board}/rows/{id}",routeValues:{project:o,team:i,board:r},body:e})]})})},t.prototype.getTeamDaysOff=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff",routeValues:{project:r,team:o,iterationId:t}})]})})},t.prototype.updateTeamDaysOff=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o,i;return __generator(this,function(a){return o=t.projectId||t.project,i=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff",routeValues:{project:o,team:i,iterationId:r},body:e})]})})},t.prototype.getTeamFieldValues=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/teamfieldvalues",routeValues:{project:t,team:r}})]})})},t.prototype.updateTeamFieldValues=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings/teamfieldvalues",routeValues:{project:r,team:o},body:e})]})})},t.prototype.getTeamSettings=function(e){return __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(o){return t=e.projectId||e.project,r=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings",routeValues:{project:t,team:r}})]})})},t.prototype.updateTeamSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=t.projectId||t.project,o=t.teamId||t.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"{project}/{team}/_apis/work/teamsettings",routeValues:{project:r,team:o},body:e})]})})},t.prototype.getIterationWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(i){return r=e.projectId||e.project,o=e.teamId||e.team,[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/workitems",routeValues:{project:r,team:o,iterationId:t}})]})})},t.RESOURCE_AREA_ID="1d4f49f9-02b9-4e26-b826-2cdb6195f2a9",t}(r.RestClientBase);t.WorkRestClient=o});

@@ -7,3 +7,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -10,0 +10,0 @@ * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details.

@@ -1,1 +0,1 @@

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,n){function u(e){try{s(i.next(e))}catch(e){n(e)}}function a(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(u,a)}s((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(n=2&r[0]?o.return:r[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,r[1])).done)return n;switch(o=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){a.label=r[1];break}if(6===r[0]&&a.label<n[1]){a.label=n[1],n=r;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(r);break}n[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],o=0}finally{i=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,u])}}var i,o,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAccountMyWorkData=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={$queryOption:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/accountMyWork",queryParams:t})]})})},t.prototype.getRecentActivityData=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/accountMyWorkRecentActivity"})]})})},t.prototype.getRecentMentions=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/accountRecentMentions"})]})})},t.prototype.getWorkArtifactLinkTypes=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/artifactLinkTypes"})]})})},t.prototype.queryWorkItemsForArtifactUris=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wit/artifactUriQuery",routeValues:{project:t},body:e})]})})},t.prototype.createAttachment=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fileName:r,uploadType:i,areaPath:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/wit/attachments/{id}",routeValues:{project:t},customHeaders:{"Content-Type":"application/octet-stream"},queryParams:n,body:e,isRawData:!0})]})})},t.prototype.getAttachmentContent=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fileName:r,download:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/wit/attachments/{id}",routeValues:{project:t,id:e},queryParams:o})]})})},t.prototype.getAttachmentZip=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fileName:r,download:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wit/attachments/{id}",routeValues:{project:t,id:e},queryParams:o})]})})},t.prototype.getClassificationNodes=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={ids:t&&t.join(","),$depth:r,errorPolicy:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/classificationNodes",routeValues:{project:e},queryParams:o})]})})},t.prototype.getRootNodes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={$depth:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/classificationNodes",routeValues:{project:e},queryParams:r})]})})},t.prototype.createOrUpdateClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:t,structureGroup:r,path:i},body:e})]})})},t.prototype.deleteClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$reclassifyId:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:e,structureGroup:t,path:r},queryParams:o})]})})},t.prototype.getClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$depth:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:e,structureGroup:t,path:r},queryParams:o})]})})},t.prototype.updateClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:t,structureGroup:r,path:i},body:e})]})})},t.prototype.getComment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItems/{id}/comments/{revision}",routeValues:{project:r,id:e,revision:t}})]})})},t.prototype.getComments=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fromRevision:r,$top:i,order:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItems/{id}/comments/{revision}",routeValues:{project:t,id:e},queryParams:n})]})})},t.prototype.createField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:t},body:e})]})})},t.prototype.deleteField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:t,fieldNameOrRefName:e}})]})})},t.prototype.getField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:t,fieldNameOrRefName:e}})]})})},t.prototype.getFields=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:e},queryParams:r})]})})},t.prototype.createQuery=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:t,query:r},body:e})]})})},t.prototype.deleteQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e,query:t}})]})})},t.prototype.getQueries=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:t,$depth:r,$includeDeleted:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getQuery=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={$expand:r,$depth:i,$includeDeleted:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e,query:t},queryParams:n})]})})},t.prototype.searchQueries=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={$filter:t,$top:r,$expand:i,$includeDeleted:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e},queryParams:n})]})})},t.prototype.updateQuery=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$undeleteDescendants:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:t,query:r},queryParams:o,body:e})]})})},t.prototype.destroyWorkItem=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:t,id:e}})]})})},t.prototype.getDeletedWorkItem=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:t,id:e}})]})})},t.prototype.getDeletedWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={ids:e&&e.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:t},queryParams:r})]})})},t.prototype.getDeletedWorkItemShallowReferences=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:e}})]})})},t.prototype.restoreWorkItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:r,id:t},body:e})]})})},t.prototype.getRevision=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",routeValues:{project:r,id:e,revisionNumber:t},queryParams:o})]})})},t.prototype.getRevisions=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={$top:r,$skip:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",routeValues:{project:t,id:e},queryParams:n})]})})},t.prototype.evaluateRulesOnField=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/wit/$ruleEngine",body:e})]})})},t.prototype.createTemplate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/{team}/_apis/wit/templates",routeValues:{project:t,team:r},body:e})]})})},t.prototype.getTemplates=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={workitemtypename:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/wit/templates",routeValues:{project:e,team:t},queryParams:i})]})})},t.prototype.deleteTemplate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/{team}/_apis/wit/templates/{templateId}",routeValues:{project:e,team:t,templateId:r}})]})})},t.prototype.getTemplate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/wit/templates/{templateId}",routeValues:{project:e,team:t,templateId:r}})]})})},t.prototype.replaceTemplate=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/wit/templates/{templateId}",routeValues:{project:t,team:r,templateId:i},body:e})]})})},t.prototype.getUpdate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",routeValues:{project:r,id:e,updateNumber:t}})]})})},t.prototype.getUpdates=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$top:r,$skip:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",routeValues:{project:t,id:e},queryParams:o})]})})},t.prototype.queryByWiql=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={timePrecision:i,$top:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/{team}/_apis/wit/wiql",routeValues:{project:t,team:r},queryParams:n,body:e})]})})},t.prototype.getQueryResultCount=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={timePrecision:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"HEAD",routeTemplate:"{project}/{team}/_apis/wit/wiql/{id}",routeValues:{project:t,team:r,id:e},queryParams:o})]})})},t.prototype.queryById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={timePrecision:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/wit/wiql/{id}",routeValues:{project:t,team:r,id:e},queryParams:o})]})})},t.prototype.getWorkItemIconJson=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={color:t,v:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/workItemIcons/{icon}",routeValues:{icon:e},queryParams:i})]})})},t.prototype.getWorkItemIcons=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/workItemIcons/{icon}"})]})})},t.prototype.getWorkItemIconSvg=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={color:t,v:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"image/svg+xml",routeTemplate:"_apis/wit/workItemIcons/{icon}",routeValues:{icon:e},queryParams:i})]})})},t.prototype.getWorkItemIconXaml=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={color:t,v:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"image/xaml+xml",routeTemplate:"_apis/wit/workItemIcons/{icon}",routeValues:{icon:e},queryParams:i})]})})},t.prototype.getReportingLinksByLinkType=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={linkTypes:t&&t.join(","),types:r&&r.join(","),continuationToken:i,startDateTime:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/reporting/workItemLinks",routeValues:{project:e},queryParams:n})]})})},t.prototype.getRelationType=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/wit/workItemRelationTypes/{relation}",routeValues:{relation:e}})]})})},t.prototype.getRelationTypes=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/wit/workItemRelationTypes/{relation}"})]})})},t.prototype.readReportingRevisionsGet=function(e,t,r,i,o,n,u,a,s,p,c,_){return __awaiter(this,void 0,void 0,function(){var d;return __generator(this,function(l){return d={fields:t&&t.join(","),types:r&&r.join(","),continuationToken:i,startDateTime:o,includeIdentityRef:n,includeDeleted:u,includeTagRef:a,includeLatestOnly:s,$expand:p,includeDiscussionChangesOnly:c,$maxPageSize:_},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/reporting/workItemRevisions",routeValues:{project:e},queryParams:d})]})})},t.prototype.readReportingRevisionsPost=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={continuationToken:r,startDateTime:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/reporting/workItemRevisions",routeValues:{project:t},queryParams:n,body:e})]})})},t.prototype.createWorkItem=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={validateOnly:i,bypassRules:o,suppressNotifications:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/wit/workItems/${type}",routeValues:{project:t,type:r},customHeaders:{"Content-Type":"application/json-patch+json"},queryParams:u,body:e})]})})},t.prototype.getWorkItemTemplate=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fields:r,asOf:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/${type}",routeValues:{project:e,type:t},queryParams:n})]})})},t.prototype.deleteWorkItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={destroy:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:t,id:e},queryParams:i})]})})},t.prototype.getWorkItem=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fields:r&&r.join(","),asOf:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:t,id:e},queryParams:n})]})})},t.prototype.getWorkItems=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={ids:e&&e.join(","),fields:r&&r.join(","),asOf:i,$expand:o,errorPolicy:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:t},queryParams:u})]})})},t.prototype.updateWorkItem=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={validateOnly:i,bypassRules:o,suppressNotifications:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:r,id:t},customHeaders:{"Content-Type":"application/json-patch+json"},queryParams:u,body:e})]})})},t.prototype.getWorkItemsBatch=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wit/workItemsBatch",routeValues:{project:t},body:e})]})})},t.prototype.getWorkItemStateColors=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/workitemStateColor",body:e})]})})},t.prototype.getWorkItemNextStatesOnCheckinAction=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={ids:e&&e.join(","),action:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/workItemTransitions",queryParams:r})]})})},t.prototype.getWorkItemTypeCategories=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypeCategories/{category}",routeValues:{project:e}})]})})},t.prototype.getWorkItemTypeCategory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypeCategories/{category}",routeValues:{project:e,category:t}})]})})},t.prototype.getWorkItemTypeColors=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/workitemTypeColor",body:e})]})})},t.prototype.getWorkItemTypeColorAndIcons=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/wit/workItemTypeColorAndIcon",body:e})]})})},t.prototype.getWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypes/{type}",routeValues:{project:e,type:t}})]})})},t.prototype.getWorkItemTypes=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypes/{type}",routeValues:{project:e}})]})})},t.prototype.getWorkItemTypeFieldsWithReferences=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workitemtypes/{type}/fields/{field}",routeValues:{project:e,type:t},queryParams:i})]})})},t.prototype.getWorkItemTypeFieldWithReferences=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workitemtypes/{type}/fields/{field}",routeValues:{project:e,type:t,field:r},queryParams:o})]})})},t.prototype.getWorkItemTypeStates=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/wit/workitemtypes/{type}/states",routeValues:{project:e,type:t}})]})})},t.prototype.exportWorkItemTypeDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={exportGlobalLists:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/wit/workItemTypeTemplate/{type}",routeValues:{project:e,type:t},queryParams:i})]})})},t.prototype.updateWorkItemTypeDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wit/workItemTypeTemplate/{type}",routeValues:{project:t},body:e})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.WorkItemTrackingRestClient=i});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,n){function u(e){try{s(i.next(e))}catch(e){n(e)}}function a(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(u,a)}s((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(u){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(n=2&r[0]?o.return:r[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,r[1])).done)return n;switch(o=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){a.label=r[1];break}if(6===r[0]&&a.label<n[1]){a.label=n[1],n=r;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(r);break}n[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],o=0}finally{i=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,u])}}var i,o,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAccountMyWorkData=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={$queryOption:e},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/accountMyWork",queryParams:t})]})})},t.prototype.getRecentActivityData=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/accountMyWorkRecentActivity"})]})})},t.prototype.getRecentMentions=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/accountRecentMentions"})]})})},t.prototype.getWorkArtifactLinkTypes=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/artifactLinkTypes"})]})})},t.prototype.queryWorkItemsForArtifactUris=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wit/artifactUriQuery",routeValues:{project:t},body:e})]})})},t.prototype.createAttachment=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fileName:r,uploadType:i,areaPath:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/wit/attachments/{id}",routeValues:{project:t},customHeaders:{"Content-Type":"application/octet-stream"},queryParams:n,body:e,isRawData:!0})]})})},t.prototype.getAttachmentContent=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fileName:r,download:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/wit/attachments/{id}",routeValues:{project:t,id:e},queryParams:o})]})})},t.prototype.getAttachmentZip=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fileName:r,download:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/wit/attachments/{id}",routeValues:{project:t,id:e},queryParams:o})]})})},t.prototype.getClassificationNodes=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={ids:t&&t.join(","),$depth:r,errorPolicy:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/classificationNodes",routeValues:{project:e},queryParams:o})]})})},t.prototype.getRootNodes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={$depth:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/classificationNodes",routeValues:{project:e},queryParams:r})]})})},t.prototype.createOrUpdateClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:t,structureGroup:r,path:i},body:e})]})})},t.prototype.deleteClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$reclassifyId:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:e,structureGroup:t,path:r},queryParams:o})]})})},t.prototype.getClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$depth:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:e,structureGroup:t,path:r},queryParams:o})]})})},t.prototype.updateClassificationNode=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",routeValues:{project:t,structureGroup:r,path:i},body:e})]})})},t.prototype.getComment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItems/{id}/comments/{revision}",routeValues:{project:r,id:e,revision:t}})]})})},t.prototype.getComments=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fromRevision:r,$top:i,order:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItems/{id}/comments/{revision}",routeValues:{project:t,id:e},queryParams:n})]})})},t.prototype.createField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:t},body:e})]})})},t.prototype.deleteField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:t,fieldNameOrRefName:e}})]})})},t.prototype.getField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:t,fieldNameOrRefName:e}})]})})},t.prototype.getFields=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/fields/{fieldNameOrRefName}",routeValues:{project:e},queryParams:r})]})})},t.prototype.createQuery=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:t,query:r},body:e})]})})},t.prototype.deleteQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e,query:t}})]})})},t.prototype.getQueries=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:t,$depth:r,$includeDeleted:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getQuery=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={$expand:r,$depth:i,$includeDeleted:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e,query:t},queryParams:n})]})})},t.prototype.searchQueries=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={$filter:t,$top:r,$expand:i,$includeDeleted:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:e},queryParams:n})]})})},t.prototype.updateQuery=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$undeleteDescendants:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wit/queries/{*query}",routeValues:{project:t,query:r},queryParams:o,body:e})]})})},t.prototype.destroyWorkItem=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:t,id:e}})]})})},t.prototype.getDeletedWorkItem=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:t,id:e}})]})})},t.prototype.getDeletedWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={ids:e&&e.join(",")},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:t},queryParams:r})]})})},t.prototype.getDeletedWorkItemShallowReferences=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:e}})]})})},t.prototype.restoreWorkItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/wit/recyclebin/{id}",routeValues:{project:r,id:t},body:e})]})})},t.prototype.getRevision=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",routeValues:{project:r,id:e,revisionNumber:t},queryParams:o})]})})},t.prototype.getRevisions=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={$top:r,$skip:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",routeValues:{project:t,id:e},queryParams:n})]})})},t.prototype.evaluateRulesOnField=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/wit/$ruleEngine",body:e})]})})},t.prototype.createTemplate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/{team}/_apis/wit/templates",routeValues:{project:t,team:r},body:e})]})})},t.prototype.getTemplates=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={workitemtypename:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/wit/templates",routeValues:{project:e,team:t},queryParams:i})]})})},t.prototype.deleteTemplate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"{project}/{team}/_apis/wit/templates/{templateId}",routeValues:{project:e,team:t,templateId:r}})]})})},t.prototype.getTemplate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/{team}/_apis/wit/templates/{templateId}",routeValues:{project:e,team:t,templateId:r}})]})})},t.prototype.replaceTemplate=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"{project}/{team}/_apis/wit/templates/{templateId}",routeValues:{project:t,team:r,templateId:i},body:e})]})})},t.prototype.getUpdate=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",routeValues:{project:r,id:e,updateNumber:t}})]})})},t.prototype.getUpdates=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$top:r,$skip:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",routeValues:{project:t,id:e},queryParams:o})]})})},t.prototype.queryByWiql=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={timePrecision:i,$top:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/{team}/_apis/wit/wiql",routeValues:{project:t,team:r},queryParams:n,body:e})]})})},t.prototype.getQueryResultCount=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={timePrecision:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"HEAD",routeTemplate:"{project}/{team}/_apis/wit/wiql/{id}",routeValues:{project:t,team:r,id:e},queryParams:o})]})})},t.prototype.queryById=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={timePrecision:i},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/{team}/_apis/wit/wiql/{id}",routeValues:{project:t,team:r,id:e},queryParams:o})]})})},t.prototype.getWorkItemIconJson=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={color:t,v:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/workItemIcons/{icon}",routeValues:{icon:e},queryParams:i})]})})},t.prototype.getWorkItemIcons=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/workItemIcons/{icon}"})]})})},t.prototype.getWorkItemIconSvg=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={color:t,v:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"image/svg+xml",routeTemplate:"_apis/wit/workItemIcons/{icon}",routeValues:{icon:e},queryParams:i})]})})},t.prototype.getWorkItemIconXaml=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={color:t,v:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",httpResponseType:"image/xaml+xml",routeTemplate:"_apis/wit/workItemIcons/{icon}",routeValues:{icon:e},queryParams:i})]})})},t.prototype.getReportingLinksByLinkType=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={linkTypes:t&&t.join(","),types:r&&r.join(","),continuationToken:i,startDateTime:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/reporting/workItemLinks",routeValues:{project:e},queryParams:n})]})})},t.prototype.getRelationType=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/wit/workItemRelationTypes/{relation}",routeValues:{relation:e}})]})})},t.prototype.getRelationTypes=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/wit/workItemRelationTypes/{relation}"})]})})},t.prototype.readReportingRevisionsGet=function(e,t,r,i,o,n,u,a,s,p,c,_){return __awaiter(this,void 0,void 0,function(){var d;return __generator(this,function(l){return d={fields:t&&t.join(","),types:r&&r.join(","),continuationToken:i,startDateTime:o,includeIdentityRef:n,includeDeleted:u,includeTagRef:a,includeLatestOnly:s,$expand:p,includeDiscussionChangesOnly:c,$maxPageSize:_},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/reporting/workItemRevisions",routeValues:{project:e},queryParams:d})]})})},t.prototype.readReportingRevisionsPost=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={continuationToken:r,startDateTime:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"{project}/_apis/wit/reporting/workItemRevisions",routeValues:{project:t},queryParams:n,body:e})]})})},t.prototype.createWorkItem=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={validateOnly:i,bypassRules:o,suppressNotifications:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"POST",routeTemplate:"{project}/_apis/wit/workItems/${type}",routeValues:{project:t,type:r},customHeaders:{"Content-Type":"application/json-patch+json"},queryParams:u,body:e})]})})},t.prototype.getWorkItemTemplate=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fields:r,asOf:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/${type}",routeValues:{project:e,type:t},queryParams:n})]})})},t.prototype.deleteWorkItem=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={destroy:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:t,id:e},queryParams:i})]})})},t.prototype.getWorkItem=function(e,t,r,i,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={fields:r&&r.join(","),asOf:i,$expand:o},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:t,id:e},queryParams:n})]})})},t.prototype.getWorkItems=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={ids:e&&e.join(","),fields:r&&r.join(","),asOf:i,$expand:o,errorPolicy:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:t},queryParams:u})]})})},t.prototype.updateWorkItem=function(e,t,r,i,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={validateOnly:i,bypassRules:o,suppressNotifications:n},[2,this.beginRequest({apiVersion:"5.0-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/wit/workItems/{id}",routeValues:{project:r,id:t},customHeaders:{"Content-Type":"application/json-patch+json"},queryParams:u,body:e})]})})},t.prototype.getWorkItemsBatch=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wit/workItemsBatch",routeValues:{project:t},body:e})]})})},t.prototype.getWorkItemStateColors=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/workitemStateColor",body:e})]})})},t.prototype.getWorkItemNextStatesOnCheckinAction=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={ids:e&&e.join(","),action:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/wit/workItemTransitions",queryParams:r})]})})},t.prototype.getWorkItemTypeCategories=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypeCategories/{category}",routeValues:{project:e}})]})})},t.prototype.getWorkItemTypeCategory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypeCategories/{category}",routeValues:{project:e,category:t}})]})})},t.prototype.getWorkItemTypeColors=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/workitemTypeColor",body:e})]})})},t.prototype.getWorkItemTypeColorAndIcons=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/wit/workItemTypeColorAndIcon",body:e})]})})},t.prototype.getWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypes/{type}",routeValues:{project:e,type:t}})]})})},t.prototype.getWorkItemTypes=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"{project}/_apis/wit/workItemTypes/{type}",routeValues:{project:e}})]})})},t.prototype.getWorkItemTypeFieldsWithReferences=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workitemtypes/{type}/fields/{field}",routeValues:{project:e,type:t},queryParams:i})]})})},t.prototype.getWorkItemTypeFieldWithReferences=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$expand:i},[2,this.beginRequest({apiVersion:"5.0-preview.3",routeTemplate:"{project}/_apis/wit/workitemtypes/{type}/fields/{field}",routeValues:{project:e,type:t,field:r},queryParams:o})]})})},t.prototype.getWorkItemTypeStates=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/wit/workitemtypes/{type}/states",routeValues:{project:e,type:t}})]})})},t.prototype.exportWorkItemTypeDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={exportGlobalLists:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"{project}/_apis/wit/workItemTypeTemplate/{type}",routeValues:{project:e,type:t},queryParams:i})]})})},t.prototype.updateWorkItemTypeDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"{project}/_apis/wit/workItemTypeTemplate/{type}",routeValues:{project:t},body:e})]})})},t.RESOURCE_AREA_ID="5264459e-e5e0-4bd8-b118-0985e68a4ec5",t}(r.RestClientBase);t.WorkItemTrackingRestClient=i});

@@ -6,3 +6,2 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
/**

@@ -9,0 +8,0 @@ * Creates a single behavior in the given process.

@@ -1,1 +0,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,s){function n(e){try{u(o.next(e))}catch(e){s(e)}}function a(e){try{u(o.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(n,a)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,i,s,n,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createProcessBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteProcessBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:e,behaviorRefName:t}})]})})},t.prototype.getProcessBehavior=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:e,behaviorRefName:t},queryParams:o})]})})},t.prototype.getProcessBehaviors=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:e},queryParams:r})]})})},t.prototype.updateProcessBehavior=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:t,behaviorRefName:r},body:e})]})})},t.prototype.createControlInGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o},body:e})]})})},t.prototype.moveControlToGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={removeFromGroupId:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},queryParams:n,body:e})]})})},t.prototype.removeControlFromGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:e,witRefName:t,groupId:r,controlId:o}})]})})},t.prototype.updateControl=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},body:e})]})})},t.prototype.addFieldToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.getAllWorkItemTypeFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getWorkItemTypeField=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:e,witRefName:t,fieldRefName:r}})]})})},t.prototype.removeWorkItemTypeField=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:e,witRefName:t,fieldRefName:r}})]})})},t.prototype.updateWorkItemTypeField=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:t,witRefName:r,fieldRefName:o},body:e})]})})},t.prototype.addGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i},body:e})]})})},t.prototype.moveGroupToPage=function(e,t,r,o,i,s,n,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={removeFromPageId:n,removeFromSectionId:a},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:u,body:e})]})})},t.prototype.moveGroupToSection=function(e,t,r,o,i,s,n){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={removeFromSectionId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:a,body:e})]})})},t.prototype.removeGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:e,witRefName:t,pageId:r,sectionId:o,groupId:i}})]})})},t.prototype.updateGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},body:e})]})})},t.prototype.getFormLayout=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.createList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/lists/{listId}",body:e})]})})},t.prototype.deleteList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.getList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.getListsMetadata=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/lists/{listId}"})]})})},t.prototype.updateList=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/lists/{listId}",routeValues:{listId:t},body:e})]})})},t.prototype.addPage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.removePage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:e,witRefName:t,pageId:r}})]})})},t.prototype.updatePage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.createNewProcess=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processTypeId}",body:e})]})})},t.prototype.deleteProcessById=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processTypeId}",routeValues:{processTypeId:e}})]})})},t.prototype.editProcess=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/work/processes/{processTypeId}",routeValues:{processTypeId:t},body:e})]})})},t.prototype.getListOfProcesses=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={$expand:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processTypeId}",queryParams:t})]})})},t.prototype.getProcessByItsId=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processTypeId}",routeValues:{processTypeId:e},queryParams:r})]})})},t.prototype.addProcessWorkItemTypeRule=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.deleteProcessWorkItemTypeRule=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:e,witRefName:t,ruleId:r}})]})})},t.prototype.getProcessWorkItemTypeRule=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:e,witRefName:t,ruleId:r}})]})})},t.prototype.getProcessWorkItemTypeRules=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.updateProcessWorkItemTypeRule=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:t,witRefName:r,ruleId:o},body:e})]})})},t.prototype.createStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.deleteStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.hideStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.updateStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.createProcessWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteProcessWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getProcessWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t},queryParams:o})]})})},t.prototype.getProcessWorkItemTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e},queryParams:r})]})})},t.prototype.updateProcessWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.addBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t.prototype.getBehaviorForWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.getBehaviorsForWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t}})]})})},t.prototype.removeBehaviorFromWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.updateBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.WorkItemTrackingProcessRestClient=o});
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,s){function n(e){try{u(o.next(e))}catch(e){s(e)}}function a(e){try{u(o.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(n,a)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,i,s,n,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createProcessBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteProcessBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:e,behaviorRefName:t}})]})})},t.prototype.getProcessBehavior=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:e,behaviorRefName:t},queryParams:o})]})})},t.prototype.getProcessBehaviors=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:e},queryParams:r})]})})},t.prototype.updateProcessBehavior=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/behaviors/{behaviorRefName}",routeValues:{processId:t,behaviorRefName:r},body:e})]})})},t.prototype.createControlInGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o},body:e})]})})},t.prototype.moveControlToGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={removeFromGroupId:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},queryParams:n,body:e})]})})},t.prototype.removeControlFromGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:e,witRefName:t,groupId:r,controlId:o}})]})})},t.prototype.updateControl=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},body:e})]})})},t.prototype.addFieldToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.getAllWorkItemTypeFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getWorkItemTypeField=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:e,witRefName:t,fieldRefName:r}})]})})},t.prototype.removeWorkItemTypeField=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:e,witRefName:t,fieldRefName:r}})]})})},t.prototype.updateWorkItemTypeField=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}",routeValues:{processId:t,witRefName:r,fieldRefName:o},body:e})]})})},t.prototype.addGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i},body:e})]})})},t.prototype.moveGroupToPage=function(e,t,r,o,i,s,n,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={removeFromPageId:n,removeFromSectionId:a},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:u,body:e})]})})},t.prototype.moveGroupToSection=function(e,t,r,o,i,s,n){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={removeFromSectionId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:a,body:e})]})})},t.prototype.removeGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:e,witRefName:t,pageId:r,sectionId:o,groupId:i}})]})})},t.prototype.updateGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},body:e})]})})},t.prototype.getFormLayout=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.createList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/lists/{listId}",body:e})]})})},t.prototype.deleteList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.getList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.getListsMetadata=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/lists/{listId}"})]})})},t.prototype.updateList=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/lists/{listId}",routeValues:{listId:t},body:e})]})})},t.prototype.addPage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.removePage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:e,witRefName:t,pageId:r}})]})})},t.prototype.updatePage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.createNewProcess=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processTypeId}",body:e})]})})},t.prototype.deleteProcessById=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processTypeId}",routeValues:{processTypeId:e}})]})})},t.prototype.editProcess=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/work/processes/{processTypeId}",routeValues:{processTypeId:t},body:e})]})})},t.prototype.getListOfProcesses=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={$expand:e},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processTypeId}",queryParams:t})]})})},t.prototype.getProcessByItsId=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processTypeId}",routeValues:{processTypeId:e},queryParams:r})]})})},t.prototype.addProcessWorkItemTypeRule=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.deleteProcessWorkItemTypeRule=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:e,witRefName:t,ruleId:r}})]})})},t.prototype.getProcessWorkItemTypeRule=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:e,witRefName:t,ruleId:r}})]})})},t.prototype.getProcessWorkItemTypeRules=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.updateProcessWorkItemTypeRule=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}",routeValues:{processId:t,witRefName:r,ruleId:o},body:e})]})})},t.prototype.createStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.deleteStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.hideStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.updateStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.createProcessWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteProcessWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getProcessWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t},queryParams:o})]})})},t.prototype.getProcessWorkItemTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.2",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e},queryParams:r})]})})},t.prototype.updateProcessWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.2",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.addBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t.prototype.getBehaviorForWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.getBehaviorsForWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t}})]})})},t.prototype.removeBehaviorFromWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.updateBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processes/{processId}/workItemTypesBehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t}(r.RestClientBase);t.WorkItemTrackingProcessRestClient=o});

@@ -6,3 +6,3 @@ import { IVssRestClientOptions } from "../core/Context";

constructor(options: IVssRestClientOptions);
static defaultOptions: IVssRestClientOptions;
static readonly RESOURCE_AREA_ID: string;
/**

@@ -9,0 +9,0 @@ * Creates a single behavior in the given process.

@@ -1099,5 +1099,3 @@ /*

};
WorkItemTrackingProcessDefinitionsRestClient.defaultOptions = {
serviceInstanceType: "00025394-6065-48ca-87d9-7f5672854ef7"
};
WorkItemTrackingProcessDefinitionsRestClient.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5";
return WorkItemTrackingProcessDefinitionsRestClient;

@@ -1104,0 +1102,0 @@ }(RestClientBase_1.RestClientBase));

@@ -1,1 +0,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,s){function n(e){try{u(o.next(e))}catch(e){s(e)}}function a(e){try{u(o.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(n,a)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,i,s,n,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:e,behaviorId:t}})]})})},t.prototype.getBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:e,behaviorId:t}})]})})},t.prototype.getBehaviors=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:e}})]})})},t.prototype.replaceBehavior=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:t,behaviorId:r},body:e})]})})},t.prototype.addControlToGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o},body:e})]})})},t.prototype.editControl=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},body:e})]})})},t.prototype.removeControlFromGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:e,witRefName:t,groupId:r,controlId:o}})]})})},t.prototype.setControlInGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={removeFromGroupId:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},queryParams:n,body:e})]})})},t.prototype.createField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/fields/{field}",routeValues:{processId:t},body:e})]})})},t.prototype.updateField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/fields/{field}",routeValues:{processId:t},body:e})]})})},t.prototype.addGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i},body:e})]})})},t.prototype.editGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},body:e})]})})},t.prototype.removeGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:e,witRefName:t,pageId:r,sectionId:o,groupId:i}})]})})},t.prototype.setGroupInPage=function(e,t,r,o,i,s,n,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={removeFromPageId:n,removeFromSectionId:a},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:u,body:e})]})})},t.prototype.setGroupInSection=function(e,t,r,o,i,s,n){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={removeFromSectionId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:a,body:e})]})})},t.prototype.getFormLayout=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getListsMetadata=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/lists"})]})})},t.prototype.createList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",body:e})]})})},t.prototype.deleteList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.getList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.updateList=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",routeValues:{listId:t},body:e})]})})},t.prototype.addPage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.editPage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.removePage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:e,witRefName:t,pageId:r}})]})})},t.prototype.createStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.deleteStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.hideStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.updateStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.addBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t.prototype.getBehaviorForWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.getBehaviorsForWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t}})]})})},t.prototype.removeBehaviorFromWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.updateBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t.prototype.createWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t},queryParams:o})]})})},t.prototype.getWorkItemTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e},queryParams:r})]})})},t.prototype.updateWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.addFieldToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:t,witRefNameForFields:r},body:e})]})})},t.prototype.getWorkItemTypeField=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:e,witRefNameForFields:t,fieldRefName:r}})]})})},t.prototype.getWorkItemTypeFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:e,witRefNameForFields:t}})]})})},t.prototype.removeFieldFromWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:e,witRefNameForFields:t,fieldRefName:r}})]})})},t.defaultOptions={serviceInstanceType:"00025394-6065-48ca-87d9-7f5672854ef7"},t}(r.RestClientBase);t.WorkItemTrackingProcessDefinitionsRestClient=o});
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,s){function n(e){try{u(o.next(e))}catch(e){s(e)}}function a(e){try{u(o.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(n,a)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(n){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,n])}}var o,i,s,n,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return n={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n};define(["require","exports","../core/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:e,behaviorId:t}})]})})},t.prototype.getBehavior=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:e,behaviorId:t}})]})})},t.prototype.getBehaviors=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:e}})]})})},t.prototype.replaceBehavior=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/behaviors/{behaviorId}",routeValues:{processId:t,behaviorId:r},body:e})]})})},t.prototype.addControlToGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o},body:e})]})})},t.prototype.editControl=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},body:e})]})})},t.prototype.removeControlFromGroup=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:e,witRefName:t,groupId:r,controlId:o}})]})})},t.prototype.setControlInGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={removeFromGroupId:s},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/Controls/{controlId}",routeValues:{processId:t,witRefName:r,groupId:o,controlId:i},queryParams:n,body:e})]})})},t.prototype.createField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/fields/{field}",routeValues:{processId:t},body:e})]})})},t.prototype.updateField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/fields/{field}",routeValues:{processId:t},body:e})]})})},t.prototype.addGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i},body:e})]})})},t.prototype.editGroup=function(e,t,r,o,i,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},body:e})]})})},t.prototype.removeGroup=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:e,witRefName:t,pageId:r,sectionId:o,groupId:i}})]})})},t.prototype.setGroupInPage=function(e,t,r,o,i,s,n,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={removeFromPageId:n,removeFromSectionId:a},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:u,body:e})]})})},t.prototype.setGroupInSection=function(e,t,r,o,i,s,n){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(u){return a={removeFromSectionId:n},[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/Groups/{groupId}",routeValues:{processId:t,witRefName:r,pageId:o,sectionId:i,groupId:s},queryParams:a,body:e})]})})},t.prototype.getFormLayout=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getListsMetadata=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/lists"})]})})},t.prototype.createList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",body:e})]})})},t.prototype.deleteList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.getList=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",routeValues:{listId:e}})]})})},t.prototype.updateList=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/lists/{listId}",routeValues:{listId:t},body:e})]})})},t.prototype.addPage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.editPage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.removePage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/layout/Pages/{pageId}",routeValues:{processId:e,witRefName:t,pageId:r}})]})})},t.prototype.createStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.deleteStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t,stateId:r}})]})})},t.prototype.getStateDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.hideStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PUT",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.updateStateDefinition=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}",routeValues:{processId:t,witRefName:r,stateId:o},body:e})]})})},t.prototype.addBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t.prototype.getBehaviorForWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.getBehaviorsForWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t}})]})})},t.prototype.removeBehaviorFromWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:e,witRefNameForBehaviors:t,behaviorRefName:r}})]})})},t.prototype.updateBehaviorToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}",routeValues:{processId:t,witRefNameForBehaviors:r},body:e})]})})},t.prototype.createWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t},body:e})]})})},t.prototype.deleteWorkItemType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t}})]})})},t.prototype.getWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={$expand:r},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e,witRefName:t},queryParams:o})]})})},t.prototype.getWorkItemTypes=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$expand:t},[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:e},queryParams:r})]})})},t.prototype.updateWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"PATCH",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefName}",routeValues:{processId:t,witRefName:r},body:e})]})})},t.prototype.addFieldToWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"POST",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:t,witRefNameForFields:r},body:e})]})})},t.prototype.getWorkItemTypeField=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:e,witRefNameForFields:t,fieldRefName:r}})]})})},t.prototype.getWorkItemTypeFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"5.0-preview.1",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:e,witRefNameForFields:t}})]})})},t.prototype.removeFieldFromWorkItemType=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"5.0-preview.1",method:"DELETE",routeTemplate:"_apis/work/processDefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}",routeValues:{processId:e,witRefNameForFields:t,fieldRefName:r}})]})})},t.RESOURCE_AREA_ID="5264459e-e5e0-4bd8-b118-0985e68a4ec5",t}(r.RestClientBase);t.WorkItemTrackingProcessDefinitionsRestClient=o});

@@ -7,4 +7,4 @@ import { IVssRestClientOptions } from "./core/Context";

new (options: IVssRestClientOptions): T;
defaultOptions?: IVssRestClientOptions;
RESOURCE_AREA_ID: string;
};
export declare function getClient<T>(clientClass: RestClientFactory<T>, clientOptions?: IVssRestClientOptions): T;

@@ -1,9 +0,1 @@

var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
define(["require", "exports", "azure-devops-extension-sdk"], function (require, exports, DevOps) {

@@ -13,11 +5,6 @@ "use strict";

function getClient(clientClass, clientOptions) {
var options = __assign({}, clientClass.defaultOptions, clientOptions);
var options = clientOptions || {};
if (!options.rootPath) {
options.rootPath = DevOps.getService("ms.vss-features.location-service" /* LocationService */).then(function (locationService) {
return locationService.getServiceLocation(options.serviceInstanceType).then(function (url) {
if (url === undefined) {
throw "Could not find service location" + options.serviceInstanceType ? " for " + options.serviceInstanceType : "";
}
return url;
});
return locationService.getResourceAreaLocation(clientClass.RESOURCE_AREA_ID);
});

@@ -24,0 +11,0 @@ }

@@ -1,1 +0,1 @@

var __assign=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};define(["require","exports","azure-devops-extension-sdk"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getClient=function(e,t){var r=__assign({},e.defaultOptions,t);return r.rootPath||(r.rootPath=n.getService("ms.vss-features.location-service").then(function(e){return e.getServiceLocation(r.serviceInstanceType).then(function(e){if(void 0===e)throw r.serviceInstanceType," for "+r.serviceInstanceType;return e})})),r.authTokenProvider||(r.authTokenProvider={getAuthorizationHeader:function(){return n.getAccessToken().then(function(e){return"Bearer "+e})}}),new e(r)}});
define(["require","exports","azure-devops-extension-sdk"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getClient=function(e,t){var n=t||{};return n.rootPath||(n.rootPath=r.getService("ms.vss-features.location-service").then(function(t){return t.getResourceAreaLocation(e.RESOURCE_AREA_ID)})),n.authTokenProvider||(n.authTokenProvider={getAuthorizationHeader:function(){return r.getAccessToken().then(function(e){return"Bearer "+e})}}),new e(n)}});
{
"name": "azure-devops-extension-api",
"version": "0.141.5",
"version": "0.141.6",
"description": "REST client libraries and contracts for Azure DevOps web extension developers.",

@@ -24,3 +24,3 @@ "repository": {

"dependencies": {
"azure-devops-extension-sdk": "1.141.8"
"azure-devops-extension-sdk": "1.141.10"
},

@@ -27,0 +27,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc